diff --git a/src/model/Cost.ts b/src/model/Cost.ts index be4a887..583b5cc 100644 --- a/src/model/Cost.ts +++ b/src/model/Cost.ts @@ -16,11 +16,13 @@ export type FormattedCostWithTitle = FormattedCost & { export type FormattedCostMeasure = FormattedCostWithQuantity & { usage_type: "measure"; current_usage: number; + current_usage_formatted: string; }; export type FormattedCostCounter = FormattedCostWithQuantity & { usage_type: "counter"; current_usage: number; + current_usage_formatted: string; daily_average: number; }; diff --git a/src/model/OrganizationSubscription.ts b/src/model/OrganizationSubscription.ts index 2d79f9b..b9689ea 100644 --- a/src/model/OrganizationSubscription.ts +++ b/src/model/OrganizationSubscription.ts @@ -23,37 +23,14 @@ export type OrganizationSubscriptionQueryParams = { // @ts-expect-error solve the query function inheritance ts error export class OrganizationSubscription extends Subscription { agency_site: boolean; - big_dev: null; big_dev_service: null; - continuous_profiling: null; - created_at: string; - enterprise_tag: string; - environments: number; - fastly_service_ids: null; - green: boolean; + fastly_service_ids: string[] | null; hipaa: boolean; - id: string; invoiced: boolean; is_trial_plan: boolean; locked: null; - options_url: string; - owner: string; - owner_info: { - type: string; - }; - - plan: string; - project_id: string; project_notes: string; - project_region_label: string; - project_title: string; - project_ui: string; services: unknown[]; - storage: number; - support_tier: string; - updated_at: string; - user_licenses: number; - vendor: string; constructor(subscription: APIObject, customUrl?: string) { const { organizationId } = subscription; @@ -70,34 +47,14 @@ export class OrganizationSubscription extends Subscription { this._creatableField.push("organizationId"); this.agency_site = subscription.agency_site; - this.big_dev = subscription.big_dev; this.big_dev_service = subscription.big_dev_service; - this.continuous_profiling = subscription.continuous_profiling; - this.created_at = subscription.created_at; - this.enterprise_tag = subscription.enterprise_tag; - this.environments = subscription.environments; this.fastly_service_ids = subscription.fastly_service_ids; - this.green = subscription.green; this.hipaa = subscription.hipaa; - this.id = subscription.id; this.invoiced = subscription.invoiced; this.is_trial_plan = subscription.is_trial_plan; this.locked = subscription.locked; - this.options_url = subscription.options_url; - this.owner = subscription.owner; - this.owner_info = subscription.owner_info; - this.plan = subscription.plan; - this.project_id = subscription.project_id; this.project_notes = subscription.project_notes; - this.project_region_label = subscription.project_region_label; - this.project_title = subscription.project_title; - this.project_ui = subscription.project_ui; this.services = subscription.services; - this.storage = subscription.storage; - this.support_tier = subscription.support_tier; - this.updated_at = subscription.updated_at; - this.user_licenses = subscription.user_licenses; - this.vendor = subscription.vendor; } static async get( diff --git a/src/model/Subscription.ts b/src/model/Subscription.ts index 16899ed..fc6ce3b 100644 --- a/src/model/Subscription.ts +++ b/src/model/Subscription.ts @@ -185,6 +185,7 @@ export class Subscription extends Ressource { id: string; status: SubscriptionStatusEnum; created_at: string; + updated_at: string; owner_info: { type: string; username?: string; @@ -274,7 +275,7 @@ export class Subscription extends Ressource { enterprise_tag: string; support_tier: string; continuous_profiling: null | "UPSUN-FEATURE-CONTINUOUS-PROFILING"; - options_url?: unknown; + options_url?: string; options_custom?: unknown; default_branch?: unknown; @@ -313,6 +314,7 @@ export class Subscription extends Ressource { }; this.organization = subscription.organization; this.created_at = subscription.created_at; + this.updated_at = subscription.updated_at; this.users_licenses = subscription.users_licenses; this.license_uri = subscription.license_uri; this.organization_id = subscription.organization_id;