diff --git a/openapitools.json b/openapitools.json index 66977e9..5db9013 100644 --- a/openapitools.json +++ b/openapitools.json @@ -22,7 +22,7 @@ }, "additionalProperties": { "npmName": "@cirrobio/api-client", - "npmVersion": "0.13.26", + "npmVersion": "0.13.27", "author": "CirroBio", "stringEnums": true, "supportsES6": true diff --git a/packages/api-client/.openapi-generator/FILES b/packages/api-client/.openapi-generator/FILES index 0aa9473..59c80fb 100644 --- a/packages/api-client/.openapi-generator/FILES +++ b/packages/api-client/.openapi-generator/FILES @@ -64,7 +64,9 @@ src/models/ComputeEnvironmentConfigurationInput.ts src/models/ConfigSource.ts src/models/Contact.ts src/models/ContactInput.ts +src/models/CostComponent.ts src/models/CostResponse.ts +src/models/CostSource.ts src/models/CreateProjectAccessRequest.ts src/models/CreateReferenceRequest.ts src/models/CreateResponse.ts diff --git a/packages/api-client/README.md b/packages/api-client/README.md index 945553e..f5041c5 100644 --- a/packages/api-client/README.md +++ b/packages/api-client/README.md @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co _published:_ ``` -npm install @cirrobio/api-client@0.13.26 --save +npm install @cirrobio/api-client@0.13.27 --save ``` _unPublished (not recommended):_ diff --git a/packages/api-client/package.json b/packages/api-client/package.json index de4886d..c82168a 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -1,6 +1,6 @@ { "name": "@cirrobio/api-client", - "version": "0.13.26", + "version": "0.13.27", "description": "API client for Cirro", "author": "CirroBio", "repository": { diff --git a/packages/api-client/src/models/CostComponent.ts b/packages/api-client/src/models/CostComponent.ts new file mode 100644 index 0000000..faf55cf --- /dev/null +++ b/packages/api-client/src/models/CostComponent.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Cirro Data + * Cirro Data Platform service API + * + * The version of the OpenAPI document: latest + * Contact: support@cirro.bio + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * A billed component of a run's cost + * @export + * @enum {string} + */ +export enum CostComponent { + RunStorage = 'RUN_STORAGE', + EphemeralStorage = 'EPHEMERAL_STORAGE' +} + + +export function instanceOfCostComponent(value: any): boolean { + for (const key in CostComponent) { + if (Object.prototype.hasOwnProperty.call(CostComponent, key)) { + if (CostComponent[key as keyof typeof CostComponent] === value) { + return true; + } + } + } + return false; +} + +export function CostComponentFromJSON(json: any): CostComponent { + return CostComponentFromJSONTyped(json, false); +} + +export function CostComponentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CostComponent { + return json as CostComponent; +} + +export function CostComponentToJSON(value?: CostComponent | null): any { + return value as any; +} + +export function CostComponentToJSONTyped(value: any, ignoreDiscriminator: boolean): CostComponent { + return value as CostComponent; +} + diff --git a/packages/api-client/src/models/CostResponse.ts b/packages/api-client/src/models/CostResponse.ts index 7d1dda5..484523e 100644 --- a/packages/api-client/src/models/CostResponse.ts +++ b/packages/api-client/src/models/CostResponse.ts @@ -20,6 +20,13 @@ import { TaskCostToJSON, TaskCostToJSONTyped, } from './TaskCost'; +import type { CostComponent } from './CostComponent'; +import { + CostComponentFromJSON, + CostComponentFromJSONTyped, + CostComponentToJSON, + CostComponentToJSONTyped, +} from './CostComponent'; import type { GroupCost } from './GroupCost'; import { GroupCostFromJSON, @@ -27,6 +34,13 @@ import { GroupCostToJSON, GroupCostToJSONTyped, } from './GroupCost'; +import type { CostSource } from './CostSource'; +import { + CostSourceFromJSON, + CostSourceFromJSONTyped, + CostSourceToJSON, + CostSourceToJSONTyped, +} from './CostSource'; /** * @@ -58,8 +72,28 @@ export interface CostResponse { * @memberof CostResponse */ isEstimate?: boolean; + /** + * Run storage cost, included in totalCost; null when not reported by the billing source + * @type {number} + * @memberof CostResponse + */ + storageCost?: number | null; + /** + * How this cost was derived: BATCH_MODEL (regression model) or OMICS_MANIFEST (HealthOmics run manifest at published prices) + * @type {CostSource} + * @memberof CostResponse + */ + costSource?: CostSource; + /** + * Billed components known to be excluded from totalCost (e.g. run storage when usage was not reported) + * @type {Array} + * @memberof CostResponse + */ + omittedComponents?: Array | null; } + + /** * Check if a given object implements the CostResponse interface. */ @@ -81,6 +115,9 @@ export function CostResponseFromJSONTyped(json: any, ignoreDiscriminator: boolea 'groups': json['groups'] == null ? undefined : ((json['groups'] as Array).map(GroupCostFromJSON)), 'tasks': json['tasks'] == null ? undefined : ((json['tasks'] as Array).map(TaskCostFromJSON)), 'isEstimate': json['isEstimate'] == null ? undefined : json['isEstimate'], + 'storageCost': json['storageCost'] == null ? undefined : json['storageCost'], + 'costSource': json['costSource'] == null ? undefined : CostSourceFromJSON(json['costSource']), + 'omittedComponents': json['omittedComponents'] == null ? undefined : ((json['omittedComponents'] as Array).map(CostComponentFromJSON)), }; } @@ -99,6 +136,9 @@ export function CostResponseToJSONTyped(value?: CostResponse | null, ignoreDiscr 'groups': value['groups'] == null ? undefined : ((value['groups'] as Array).map(GroupCostToJSON)), 'tasks': value['tasks'] == null ? undefined : ((value['tasks'] as Array).map(TaskCostToJSON)), 'isEstimate': value['isEstimate'], + 'storageCost': value['storageCost'], + 'costSource': CostSourceToJSON(value['costSource']), + 'omittedComponents': value['omittedComponents'] == null ? undefined : ((value['omittedComponents'] as Array).map(CostComponentToJSON)), }; } diff --git a/packages/api-client/src/models/CostSource.ts b/packages/api-client/src/models/CostSource.ts new file mode 100644 index 0000000..8261402 --- /dev/null +++ b/packages/api-client/src/models/CostSource.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Cirro Data + * Cirro Data Platform service API + * + * The version of the OpenAPI document: latest + * Contact: support@cirro.bio + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * How a cost was derived + * @export + * @enum {string} + */ +export enum CostSource { + BatchModel = 'BATCH_MODEL', + OmicsManifest = 'OMICS_MANIFEST' +} + + +export function instanceOfCostSource(value: any): boolean { + for (const key in CostSource) { + if (Object.prototype.hasOwnProperty.call(CostSource, key)) { + if (CostSource[key as keyof typeof CostSource] === value) { + return true; + } + } + } + return false; +} + +export function CostSourceFromJSON(json: any): CostSource { + return CostSourceFromJSONTyped(json, false); +} + +export function CostSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CostSource { + return json as CostSource; +} + +export function CostSourceToJSON(value?: CostSource | null): any { + return value as any; +} + +export function CostSourceToJSONTyped(value: any, ignoreDiscriminator: boolean): CostSource { + return value as CostSource; +} + diff --git a/packages/api-client/src/models/index.ts b/packages/api-client/src/models/index.ts index 537a94b..d89e656 100644 --- a/packages/api-client/src/models/index.ts +++ b/packages/api-client/src/models/index.ts @@ -37,7 +37,9 @@ export * from './ComputeEnvironmentConfigurationInput'; export * from './ConfigSource'; export * from './Contact'; export * from './ContactInput'; +export * from './CostComponent'; export * from './CostResponse'; +export * from './CostSource'; export * from './CreateProjectAccessRequest'; export * from './CreateReferenceRequest'; export * from './CreateResponse'; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index ebc7119..4a10e75 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@cirrobio/sdk", - "version": "0.13.26", + "version": "0.13.27", "description": "SDK for Cirro", "author": "CirroBio", "repository": {