Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-platform committed Sep 7, 2024
1 parent 3cb0d7f commit 0962347
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/model/EnvironmentAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export type EnvironmentAccessQueryParams = {
};

export default class EnvironmentAccess extends Ressource {
id = "";
user = "";
email = "";
role = "";
project = "";
environment = "";
id: string;
user: string;
email: string;
role: string;
project: string;
environment: string;

constructor(environmentAccess: APIObject, url: string) {
super(
Expand Down
4 changes: 2 additions & 2 deletions src/model/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ export default class Project extends Ressource {
* Add an integration to the project.
*
* @param string type
* @param array data
* @param object data
*
* @return Result
*/
async addIntegration(type: string, data = []) {
async addIntegration(type: string, data?: APIObject) {
const body = { type, ...data };
const integration = new Integration(body, this.getLink("integrations"));

Expand Down
17 changes: 10 additions & 7 deletions src/model/Subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ type ResourceType = {
environments?: number;
memory?: number;
storage?: number;
projects?: number;
};

type ProjectResourcesType = ResourceType & { subscription_id: number };
Expand Down Expand Up @@ -217,13 +218,15 @@ export default class Subscription extends Ressource {
};

green?: boolean;
resources_limit?: {
limit: ResourceType;
used: {
projects: ProjectResourcesType[];
totals: ResourceType;
};
};
resources_limit?:
| {
limit: ResourceType;
used: {
projects: ProjectResourcesType[];
totals: ResourceType;
};
}
| false;

environment_options: string[];
enterprise_tag: string;
Expand Down

0 comments on commit 0962347

Please sign in to comment.