waldur-js-client 8.0.8 → 8.0.9-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.gen.js CHANGED
@@ -9830,30 +9830,6 @@ export const customersAddUser = (options) => {
9830
9830
  }
9831
9831
  });
9832
9832
  };
9833
- /**
9834
- * Get customer resource usage statistics broken down per offering
9835
- * Returns one row per (offering, component type, billing type) for all non-terminated resources within the customer. Each row's `usage` and `limit_usage` are aggregated using the offering's own `limit_period`, so quarterly offerings report quarter-to-date, yearly report year-to-date, total report lifetime, and monthly report current month. Each row also includes the resolved current period bounds (`current_period_label`, `current_period_start`, `current_period_end`).
9836
- */
9837
- export const customersComponentsUsageRetrieve = (options) => {
9838
- return (options.client ?? _heyApiClient).get({
9839
- security: [
9840
- {
9841
- name: 'Authorization',
9842
- type: 'apiKey'
9843
- },
9844
- {
9845
- scheme: 'bearer',
9846
- type: 'http'
9847
- },
9848
- {
9849
- scheme: 'bearer',
9850
- type: 'http'
9851
- }
9852
- ],
9853
- url: '/api/customers/{uuid}/components-usage/',
9854
- ...options
9855
- });
9856
- };
9857
9833
  /**
9858
9834
  * Update customer contact details
9859
9835
  * Update organization contact information. Requires CUSTOMER_CONTACT_UPDATE or CUSTOMER.UPDATE permission.
@@ -17842,6 +17818,78 @@ export const marketplaceCustomerServiceAccountsRotateApiKey = (options) => {
17842
17818
  ...options
17843
17819
  });
17844
17820
  };
17821
+ /**
17822
+ * Get resource usage statistics broken down per offering
17823
+ * Returns one row per (offering, component type, billing type) for all non-terminated resources within the scope. Each row's `usage` and `limit_usage` are aggregated using the offering's own `limit_period`.
17824
+ */
17825
+ export const marketplaceCustomerUsageComponentsUsageRetrieve = (options) => {
17826
+ return (options.client ?? _heyApiClient).get({
17827
+ security: [
17828
+ {
17829
+ name: 'Authorization',
17830
+ type: 'apiKey'
17831
+ },
17832
+ {
17833
+ scheme: 'bearer',
17834
+ type: 'http'
17835
+ },
17836
+ {
17837
+ scheme: 'bearer',
17838
+ type: 'http'
17839
+ }
17840
+ ],
17841
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage/',
17842
+ ...options
17843
+ });
17844
+ };
17845
+ /**
17846
+ * Get per-project usage breakdown for a single offering
17847
+ * Returns the customer's usage of one offering broken down by project. Each project entry includes an in-period total `usage` and a monthly `buckets` array. Projects are sorted by usage descending.
17848
+ */
17849
+ export const marketplaceCustomerUsageComponentsUsageByProjectRetrieve = (options) => {
17850
+ return (options.client ?? _heyApiClient).get({
17851
+ security: [
17852
+ {
17853
+ name: 'Authorization',
17854
+ type: 'apiKey'
17855
+ },
17856
+ {
17857
+ scheme: 'bearer',
17858
+ type: 'http'
17859
+ },
17860
+ {
17861
+ scheme: 'bearer',
17862
+ type: 'http'
17863
+ }
17864
+ ],
17865
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage-by-project/',
17866
+ ...options
17867
+ });
17868
+ };
17869
+ /**
17870
+ * Get monthly usage buckets for a single offering
17871
+ * Returns a per-month timeseries of `ComponentUsage` for one offering, restricted to that offering's current `limit_period`. Buckets are keyed by `billing_period` (always month-start). `period_offset` shifts the window backward by N periods.
17872
+ */
17873
+ export const marketplaceCustomerUsageComponentsUsageTimeseriesRetrieve = (options) => {
17874
+ return (options.client ?? _heyApiClient).get({
17875
+ security: [
17876
+ {
17877
+ name: 'Authorization',
17878
+ type: 'apiKey'
17879
+ },
17880
+ {
17881
+ scheme: 'bearer',
17882
+ type: 'http'
17883
+ },
17884
+ {
17885
+ scheme: 'bearer',
17886
+ type: 'http'
17887
+ }
17888
+ ],
17889
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage-timeseries/',
17890
+ ...options
17891
+ });
17892
+ };
17845
17893
  /**
17846
17894
  * Get demo preset details
17847
17895
  * Returns detailed information about a specific demo preset. Staff access only.
@@ -21738,6 +21786,54 @@ export const marketplaceProjectUpdateRequestsReject = (options) => {
21738
21786
  }
21739
21787
  });
21740
21788
  };
21789
+ /**
21790
+ * Get resource usage statistics broken down per offering
21791
+ * Returns one row per (offering, component type, billing type) for all non-terminated resources within the scope. Each row's `usage` and `limit_usage` are aggregated using the offering's own `limit_period`.
21792
+ */
21793
+ export const marketplaceProjectUsageComponentsUsageRetrieve = (options) => {
21794
+ return (options.client ?? _heyApiClient).get({
21795
+ security: [
21796
+ {
21797
+ name: 'Authorization',
21798
+ type: 'apiKey'
21799
+ },
21800
+ {
21801
+ scheme: 'bearer',
21802
+ type: 'http'
21803
+ },
21804
+ {
21805
+ scheme: 'bearer',
21806
+ type: 'http'
21807
+ }
21808
+ ],
21809
+ url: '/api/marketplace-project-usage/{uuid}/components-usage/',
21810
+ ...options
21811
+ });
21812
+ };
21813
+ /**
21814
+ * Get monthly usage buckets for a single offering
21815
+ * Returns a per-month timeseries of `ComponentUsage` for one offering, restricted to that offering's current `limit_period`. Buckets are keyed by `billing_period` (always month-start). `period_offset` shifts the window backward by N periods.
21816
+ */
21817
+ export const marketplaceProjectUsageComponentsUsageTimeseriesRetrieve = (options) => {
21818
+ return (options.client ?? _heyApiClient).get({
21819
+ security: [
21820
+ {
21821
+ name: 'Authorization',
21822
+ type: 'apiKey'
21823
+ },
21824
+ {
21825
+ scheme: 'bearer',
21826
+ type: 'http'
21827
+ },
21828
+ {
21829
+ scheme: 'bearer',
21830
+ type: 'http'
21831
+ }
21832
+ ],
21833
+ url: '/api/marketplace-project-usage/{uuid}/components-usage-timeseries/',
21834
+ ...options
21835
+ });
21836
+ };
21741
21837
  /**
21742
21838
  * List provider offerings
21743
21839
  * Returns a paginated list of offerings for the provider.
@@ -35889,30 +35985,6 @@ export const openportalUnmanagedProjectsCompletionStatusRetrieve = (options) =>
35889
35985
  ...options
35890
35986
  });
35891
35987
  };
35892
- /**
35893
- * Get project resource usage statistics broken down per offering
35894
- * Returns one row per (offering, component type, billing type) for all non-terminated resources within the project. Each row's `usage` and `limit_usage` are aggregated using the offering's own `limit_period`, so quarterly offerings report quarter-to-date, yearly report year-to-date, total report lifetime, and monthly report current month. Each row also includes the resolved current period bounds (`current_period_label`, `current_period_start`, `current_period_end`).
35895
- */
35896
- export const openportalUnmanagedProjectsComponentsUsageRetrieve = (options) => {
35897
- return (options.client ?? _heyApiClient).get({
35898
- security: [
35899
- {
35900
- name: 'Authorization',
35901
- type: 'apiKey'
35902
- },
35903
- {
35904
- scheme: 'bearer',
35905
- type: 'http'
35906
- },
35907
- {
35908
- scheme: 'bearer',
35909
- type: 'http'
35910
- }
35911
- ],
35912
- url: '/api/openportal-unmanaged-projects/{uuid}/components-usage/',
35913
- ...options
35914
- });
35915
- };
35916
35988
  /**
35917
35989
  * Revoke a role from a user
35918
35990
  * Removes a specific role from a user within the current scope. This effectively revokes their permissions associated with that role.
@@ -45139,30 +45211,6 @@ export const projectsCompletionStatusRetrieve = (options) => {
45139
45211
  ...options
45140
45212
  });
45141
45213
  };
45142
- /**
45143
- * Get project resource usage statistics broken down per offering
45144
- * Returns one row per (offering, component type, billing type) for all non-terminated resources within the project. Each row's `usage` and `limit_usage` are aggregated using the offering's own `limit_period`, so quarterly offerings report quarter-to-date, yearly report year-to-date, total report lifetime, and monthly report current month. Each row also includes the resolved current period bounds (`current_period_label`, `current_period_start`, `current_period_end`).
45145
- */
45146
- export const projectsComponentsUsageRetrieve = (options) => {
45147
- return (options.client ?? _heyApiClient).get({
45148
- security: [
45149
- {
45150
- name: 'Authorization',
45151
- type: 'apiKey'
45152
- },
45153
- {
45154
- scheme: 'bearer',
45155
- type: 'http'
45156
- },
45157
- {
45158
- scheme: 'bearer',
45159
- type: 'http'
45160
- }
45161
- ],
45162
- url: '/api/projects/{uuid}/components-usage/',
45163
- ...options
45164
- });
45165
- };
45166
45214
  /**
45167
45215
  * Revoke a role from a user
45168
45216
  * Removes a specific role from a user within the current scope. This effectively revokes their permissions associated with that role.
@@ -12645,6 +12645,22 @@ export type OfferingThumbnailRequest = {
12645
12645
  thumbnail: Blob | File;
12646
12646
  };
12647
12647
  export type OfferingTypeEnum = 'Support.OfferingTemplate' | 'Marketplace.Booking' | 'Marketplace.Basic' | 'OpenStack.Tenant' | 'OpenStack.Instance' | 'OpenStack.Volume' | 'Marketplace.Rancher' | 'VMware.VirtualMachine' | 'Waldur.RemoteOffering' | 'Marketplace.Script' | 'SlurmInvoices.SlurmPackage' | 'Marketplace.Slurm';
12648
+ export type OfferingUsageByProject = {
12649
+ readonly offering_uuid: string;
12650
+ readonly offering_name: string;
12651
+ readonly type: string;
12652
+ readonly name: string;
12653
+ readonly measured_unit: string;
12654
+ readonly billing_type: string;
12655
+ readonly limit_period: string | null;
12656
+ readonly limit: number | null;
12657
+ readonly current_period_label: string;
12658
+ readonly current_period_start: string | null;
12659
+ readonly current_period_end: string | null;
12660
+ readonly today: string;
12661
+ readonly total_usage: number;
12662
+ readonly projects: Array<ProjectUsageEntry>;
12663
+ };
12648
12664
  export type OfferingUsagePolicy = {
12649
12665
  readonly uuid: string;
12650
12666
  readonly url: string;
@@ -12686,6 +12702,21 @@ export type OfferingUsagePolicyRequest = {
12686
12702
  component_limits_set: Array<NestedOfferingComponentLimitRequest>;
12687
12703
  period?: PolicyPeriodEnum;
12688
12704
  };
12705
+ export type OfferingUsageTimeseries = {
12706
+ readonly offering_uuid: string;
12707
+ readonly offering_name: string;
12708
+ readonly type: string;
12709
+ readonly name: string;
12710
+ readonly measured_unit: string;
12711
+ readonly billing_type: string;
12712
+ readonly limit_period: string | null;
12713
+ readonly limit: number | null;
12714
+ readonly current_period_label: string;
12715
+ readonly current_period_start: string | null;
12716
+ readonly current_period_end: string | null;
12717
+ readonly today: string;
12718
+ readonly buckets: Array<UsageTimeseriesBucket>;
12719
+ };
12689
12720
  export type OfferingUser = {
12690
12721
  readonly url?: string;
12691
12722
  readonly uuid?: string;
@@ -18753,6 +18784,12 @@ export type ProjectType = {
18753
18784
  name: string;
18754
18785
  description?: string;
18755
18786
  };
18787
+ export type ProjectUsageEntry = {
18788
+ readonly project_uuid: string;
18789
+ readonly project_name: string;
18790
+ readonly usage: number;
18791
+ readonly buckets: Array<UsageTimeseriesBucket>;
18792
+ };
18756
18793
  export type ProjectUsageReport = {
18757
18794
  /**
18758
18795
  * ProjectIdentifier string e.g. "aiproject.brics"
@@ -25154,6 +25191,10 @@ export type UrgencyEnum = 'low' | 'medium' | 'high';
25154
25191
  export type Usage = {
25155
25192
  seconds: number;
25156
25193
  };
25194
+ export type UsageTimeseriesBucket = {
25195
+ readonly billing_period: string;
25196
+ readonly usage: number;
25197
+ };
25157
25198
  export type User = {
25158
25199
  readonly url?: string;
25159
25200
  readonly uuid?: string;
@@ -37303,18 +37344,6 @@ export type CustomersAddUserResponses = {
37303
37344
  201: UserRoleExpirationTime;
37304
37345
  };
37305
37346
  export type CustomersAddUserResponse = CustomersAddUserResponses[keyof CustomersAddUserResponses];
37306
- export type CustomersComponentsUsageRetrieveData = {
37307
- body?: never;
37308
- path: {
37309
- uuid: string;
37310
- };
37311
- query?: never;
37312
- url: '/api/customers/{uuid}/components-usage/';
37313
- };
37314
- export type CustomersComponentsUsageRetrieveResponses = {
37315
- 200: ComponentsUsageStatsPerOffering;
37316
- };
37317
- export type CustomersComponentsUsageRetrieveResponse = CustomersComponentsUsageRetrieveResponses[keyof CustomersComponentsUsageRetrieveResponses];
37318
37347
  export type CustomersContactData = {
37319
37348
  body?: CustomerContactUpdateRequest;
37320
37349
  path: {
@@ -44328,6 +44357,50 @@ export type MarketplaceCustomerServiceAccountsRotateApiKeyResponses = {
44328
44357
  200: CustomerServiceAccount;
44329
44358
  };
44330
44359
  export type MarketplaceCustomerServiceAccountsRotateApiKeyResponse = MarketplaceCustomerServiceAccountsRotateApiKeyResponses[keyof MarketplaceCustomerServiceAccountsRotateApiKeyResponses];
44360
+ export type MarketplaceCustomerUsageComponentsUsageRetrieveData = {
44361
+ body?: never;
44362
+ path: {
44363
+ uuid: string;
44364
+ };
44365
+ query?: never;
44366
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage/';
44367
+ };
44368
+ export type MarketplaceCustomerUsageComponentsUsageRetrieveResponses = {
44369
+ 200: ComponentsUsageStatsPerOffering;
44370
+ };
44371
+ export type MarketplaceCustomerUsageComponentsUsageRetrieveResponse = MarketplaceCustomerUsageComponentsUsageRetrieveResponses[keyof MarketplaceCustomerUsageComponentsUsageRetrieveResponses];
44372
+ export type MarketplaceCustomerUsageComponentsUsageByProjectRetrieveData = {
44373
+ body?: never;
44374
+ path: {
44375
+ uuid: string;
44376
+ };
44377
+ query: {
44378
+ component_type?: string;
44379
+ offering_uuid: string;
44380
+ period_offset?: number;
44381
+ };
44382
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage-by-project/';
44383
+ };
44384
+ export type MarketplaceCustomerUsageComponentsUsageByProjectRetrieveResponses = {
44385
+ 200: OfferingUsageByProject;
44386
+ };
44387
+ export type MarketplaceCustomerUsageComponentsUsageByProjectRetrieveResponse = MarketplaceCustomerUsageComponentsUsageByProjectRetrieveResponses[keyof MarketplaceCustomerUsageComponentsUsageByProjectRetrieveResponses];
44388
+ export type MarketplaceCustomerUsageComponentsUsageTimeseriesRetrieveData = {
44389
+ body?: never;
44390
+ path: {
44391
+ uuid: string;
44392
+ };
44393
+ query: {
44394
+ component_type?: string;
44395
+ offering_uuid: string;
44396
+ period_offset?: number;
44397
+ };
44398
+ url: '/api/marketplace-customer-usage/{uuid}/components-usage-timeseries/';
44399
+ };
44400
+ export type MarketplaceCustomerUsageComponentsUsageTimeseriesRetrieveResponses = {
44401
+ 200: OfferingUsageTimeseries;
44402
+ };
44403
+ export type MarketplaceCustomerUsageComponentsUsageTimeseriesRetrieveResponse = MarketplaceCustomerUsageComponentsUsageTimeseriesRetrieveResponses[keyof MarketplaceCustomerUsageComponentsUsageTimeseriesRetrieveResponses];
44331
44404
  export type MarketplaceDemoPresetsInfoRetrieveData = {
44332
44405
  body?: never;
44333
44406
  path: {
@@ -47785,6 +47858,34 @@ export type MarketplaceProjectUpdateRequestsRejectResponses = {
47785
47858
  */
47786
47859
  200: unknown;
47787
47860
  };
47861
+ export type MarketplaceProjectUsageComponentsUsageRetrieveData = {
47862
+ body?: never;
47863
+ path: {
47864
+ uuid: string;
47865
+ };
47866
+ query?: never;
47867
+ url: '/api/marketplace-project-usage/{uuid}/components-usage/';
47868
+ };
47869
+ export type MarketplaceProjectUsageComponentsUsageRetrieveResponses = {
47870
+ 200: ComponentsUsageStatsPerOffering;
47871
+ };
47872
+ export type MarketplaceProjectUsageComponentsUsageRetrieveResponse = MarketplaceProjectUsageComponentsUsageRetrieveResponses[keyof MarketplaceProjectUsageComponentsUsageRetrieveResponses];
47873
+ export type MarketplaceProjectUsageComponentsUsageTimeseriesRetrieveData = {
47874
+ body?: never;
47875
+ path: {
47876
+ uuid: string;
47877
+ };
47878
+ query: {
47879
+ component_type?: string;
47880
+ offering_uuid: string;
47881
+ period_offset?: number;
47882
+ };
47883
+ url: '/api/marketplace-project-usage/{uuid}/components-usage-timeseries/';
47884
+ };
47885
+ export type MarketplaceProjectUsageComponentsUsageTimeseriesRetrieveResponses = {
47886
+ 200: OfferingUsageTimeseries;
47887
+ };
47888
+ export type MarketplaceProjectUsageComponentsUsageTimeseriesRetrieveResponse = MarketplaceProjectUsageComponentsUsageTimeseriesRetrieveResponses[keyof MarketplaceProjectUsageComponentsUsageTimeseriesRetrieveResponses];
47788
47889
  export type MarketplaceProviderOfferingsListData = {
47789
47890
  body?: never;
47790
47891
  path?: never;
@@ -63159,18 +63260,6 @@ export type OpenportalUnmanagedProjectsCompletionStatusRetrieveResponses = {
63159
63260
  200: ChecklistCompletion;
63160
63261
  };
63161
63262
  export type OpenportalUnmanagedProjectsCompletionStatusRetrieveResponse = OpenportalUnmanagedProjectsCompletionStatusRetrieveResponses[keyof OpenportalUnmanagedProjectsCompletionStatusRetrieveResponses];
63162
- export type OpenportalUnmanagedProjectsComponentsUsageRetrieveData = {
63163
- body?: never;
63164
- path: {
63165
- uuid: string;
63166
- };
63167
- query?: never;
63168
- url: '/api/openportal-unmanaged-projects/{uuid}/components-usage/';
63169
- };
63170
- export type OpenportalUnmanagedProjectsComponentsUsageRetrieveResponses = {
63171
- 200: ComponentsUsageStatsPerOffering;
63172
- };
63173
- export type OpenportalUnmanagedProjectsComponentsUsageRetrieveResponse = OpenportalUnmanagedProjectsComponentsUsageRetrieveResponses[keyof OpenportalUnmanagedProjectsComponentsUsageRetrieveResponses];
63174
63263
  export type OpenportalUnmanagedProjectsDeleteUserData = {
63175
63264
  body: UserRoleDeleteRequest;
63176
63265
  path: {
@@ -72221,18 +72310,6 @@ export type ProjectsCompletionStatusRetrieveResponses = {
72221
72310
  200: ChecklistCompletion;
72222
72311
  };
72223
72312
  export type ProjectsCompletionStatusRetrieveResponse = ProjectsCompletionStatusRetrieveResponses[keyof ProjectsCompletionStatusRetrieveResponses];
72224
- export type ProjectsComponentsUsageRetrieveData = {
72225
- body?: never;
72226
- path: {
72227
- uuid: string;
72228
- };
72229
- query?: never;
72230
- url: '/api/projects/{uuid}/components-usage/';
72231
- };
72232
- export type ProjectsComponentsUsageRetrieveResponses = {
72233
- 200: ComponentsUsageStatsPerOffering;
72234
- };
72235
- export type ProjectsComponentsUsageRetrieveResponse = ProjectsComponentsUsageRetrieveResponses[keyof ProjectsComponentsUsageRetrieveResponses];
72236
72313
  export type ProjectsDeleteUserData = {
72237
72314
  body: UserRoleDeleteRequest;
72238
72315
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waldur-js-client",
3
- "version": "8.0.8",
3
+ "version": "8.0.9-dev.0",
4
4
  "description": "JavaScript client for Waldur MasterMind generated from OpenAPI schema",
5
5
  "author": "Waldur Platform",
6
6
  "license": "MIT",