@stigg/typescript 0.1.0-beta.42 → 0.1.0-beta.44

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/package.json +1 -1
  3. package/resources/v1/customers/customers.d.mts +5 -13
  4. package/resources/v1/customers/customers.d.mts.map +1 -1
  5. package/resources/v1/customers/customers.d.ts +5 -13
  6. package/resources/v1/customers/customers.d.ts.map +1 -1
  7. package/resources/v1/customers/customers.js +0 -8
  8. package/resources/v1/customers/customers.js.map +1 -1
  9. package/resources/v1/customers/customers.mjs +0 -8
  10. package/resources/v1/customers/customers.mjs.map +1 -1
  11. package/resources/v1/customers/index.d.mts +0 -2
  12. package/resources/v1/customers/index.d.mts.map +1 -1
  13. package/resources/v1/customers/index.d.ts +0 -2
  14. package/resources/v1/customers/index.d.ts.map +1 -1
  15. package/resources/v1/customers/index.js +1 -5
  16. package/resources/v1/customers/index.js.map +1 -1
  17. package/resources/v1/customers/index.mjs +0 -2
  18. package/resources/v1/customers/index.mjs.map +1 -1
  19. package/resources/v1/customers/integrations.d.mts +3 -3
  20. package/resources/v1/customers/integrations.d.mts.map +1 -1
  21. package/resources/v1/customers/integrations.d.ts +3 -3
  22. package/resources/v1/customers/integrations.d.ts.map +1 -1
  23. package/resources/v1/customers/payment-method.d.mts +1 -1
  24. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  25. package/resources/v1/customers/payment-method.d.ts +1 -1
  26. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  27. package/resources/v1/events/events.d.mts +0 -4
  28. package/resources/v1/events/events.d.mts.map +1 -1
  29. package/resources/v1/events/events.d.ts +0 -4
  30. package/resources/v1/events/events.d.ts.map +1 -1
  31. package/resources/v1/events/events.js +0 -4
  32. package/resources/v1/events/events.js.map +1 -1
  33. package/resources/v1/events/events.mjs +0 -4
  34. package/resources/v1/events/events.mjs.map +1 -1
  35. package/resources/v1/events/index.d.mts +0 -1
  36. package/resources/v1/events/index.d.mts.map +1 -1
  37. package/resources/v1/events/index.d.ts +0 -1
  38. package/resources/v1/events/index.d.ts.map +1 -1
  39. package/resources/v1/events/index.js +3 -5
  40. package/resources/v1/events/index.js.map +1 -1
  41. package/resources/v1/events/index.mjs +0 -1
  42. package/resources/v1/events/index.mjs.map +1 -1
  43. package/resources/v1-beta/customers/customers.d.mts +160 -0
  44. package/resources/v1-beta/customers/customers.d.mts.map +1 -1
  45. package/resources/v1-beta/customers/customers.d.ts +160 -0
  46. package/resources/v1-beta/customers/customers.d.ts.map +1 -1
  47. package/resources/v1-beta/customers/customers.js +29 -0
  48. package/resources/v1-beta/customers/customers.js.map +1 -1
  49. package/resources/v1-beta/customers/customers.mjs +29 -0
  50. package/resources/v1-beta/customers/customers.mjs.map +1 -1
  51. package/resources/v1-beta/customers/index.d.mts +1 -1
  52. package/resources/v1-beta/customers/index.d.mts.map +1 -1
  53. package/resources/v1-beta/customers/index.d.ts +1 -1
  54. package/resources/v1-beta/customers/index.d.ts.map +1 -1
  55. package/resources/v1-beta/customers/index.js.map +1 -1
  56. package/resources/v1-beta/customers/index.mjs +1 -1
  57. package/resources/v1-beta/customers/index.mjs.map +1 -1
  58. package/resources/v1-beta/index.d.mts +1 -1
  59. package/resources/v1-beta/index.d.mts.map +1 -1
  60. package/resources/v1-beta/index.d.ts +1 -1
  61. package/resources/v1-beta/index.d.ts.map +1 -1
  62. package/resources/v1-beta/index.js.map +1 -1
  63. package/resources/v1-beta/index.mjs +1 -1
  64. package/resources/v1-beta/index.mjs.map +1 -1
  65. package/resources/v1-beta/v1-beta.d.mts +2 -2
  66. package/resources/v1-beta/v1-beta.d.mts.map +1 -1
  67. package/resources/v1-beta/v1-beta.d.ts +2 -2
  68. package/resources/v1-beta/v1-beta.d.ts.map +1 -1
  69. package/resources/v1-beta/v1-beta.js.map +1 -1
  70. package/resources/v1-beta/v1-beta.mjs +1 -1
  71. package/resources/v1-beta/v1-beta.mjs.map +1 -1
  72. package/src/resources/v1/customers/customers.ts +10 -17
  73. package/src/resources/v1/customers/index.ts +0 -2
  74. package/src/resources/v1/customers/integrations.ts +5 -2
  75. package/src/resources/v1/customers/payment-method.ts +2 -1
  76. package/src/resources/v1/events/events.ts +0 -6
  77. package/src/resources/v1/events/index.ts +0 -1
  78. package/src/resources/v1-beta/customers/customers.ts +211 -0
  79. package/src/resources/v1-beta/customers/index.ts +5 -1
  80. package/src/resources/v1-beta/index.ts +5 -1
  81. package/src/resources/v1-beta/v1-beta.ts +10 -2
  82. package/src/version.ts +1 -1
  83. package/version.d.mts +1 -1
  84. package/version.d.ts +1 -1
  85. package/version.js +1 -1
  86. package/version.mjs +1 -1
  87. package/resources/v1/customers/events.d.mts +0 -4
  88. package/resources/v1/customers/events.d.mts.map +0 -1
  89. package/resources/v1/customers/events.d.ts +0 -4
  90. package/resources/v1/customers/events.d.ts.map +0 -1
  91. package/resources/v1/customers/events.js +0 -9
  92. package/resources/v1/customers/events.js.map +0 -1
  93. package/resources/v1/customers/events.mjs +0 -5
  94. package/resources/v1/customers/events.mjs.map +0 -1
  95. package/resources/v1/customers/usage.d.mts +0 -4
  96. package/resources/v1/customers/usage.d.mts.map +0 -1
  97. package/resources/v1/customers/usage.d.ts +0 -4
  98. package/resources/v1/customers/usage.d.ts.map +0 -1
  99. package/resources/v1/customers/usage.js +0 -9
  100. package/resources/v1/customers/usage.js.map +0 -1
  101. package/resources/v1/customers/usage.mjs +0 -5
  102. package/resources/v1/customers/usage.mjs.map +0 -1
  103. package/resources/v1/events/beta/beta.d.mts +0 -10
  104. package/resources/v1/events/beta/beta.d.mts.map +0 -1
  105. package/resources/v1/events/beta/beta.d.ts +0 -10
  106. package/resources/v1/events/beta/beta.d.ts.map +0 -1
  107. package/resources/v1/events/beta/beta.js +0 -17
  108. package/resources/v1/events/beta/beta.js.map +0 -1
  109. package/resources/v1/events/beta/beta.mjs +0 -12
  110. package/resources/v1/events/beta/beta.mjs.map +0 -1
  111. package/resources/v1/events/beta/customers.d.mts +0 -160
  112. package/resources/v1/events/beta/customers.d.mts.map +0 -1
  113. package/resources/v1/events/beta/customers.d.ts +0 -160
  114. package/resources/v1/events/beta/customers.d.ts.map +0 -1
  115. package/resources/v1/events/beta/customers.js +0 -32
  116. package/resources/v1/events/beta/customers.js.map +0 -1
  117. package/resources/v1/events/beta/customers.mjs +0 -28
  118. package/resources/v1/events/beta/customers.mjs.map +0 -1
  119. package/resources/v1/events/beta/index.d.mts +0 -3
  120. package/resources/v1/events/beta/index.d.mts.map +0 -1
  121. package/resources/v1/events/beta/index.d.ts +0 -3
  122. package/resources/v1/events/beta/index.d.ts.map +0 -1
  123. package/resources/v1/events/beta/index.js +0 -9
  124. package/resources/v1/events/beta/index.js.map +0 -1
  125. package/resources/v1/events/beta/index.mjs +0 -4
  126. package/resources/v1/events/beta/index.mjs.map +0 -1
  127. package/resources/v1/events/beta.d.mts +0 -2
  128. package/resources/v1/events/beta.d.mts.map +0 -1
  129. package/resources/v1/events/beta.d.ts +0 -2
  130. package/resources/v1/events/beta.d.ts.map +0 -1
  131. package/resources/v1/events/beta.js +0 -6
  132. package/resources/v1/events/beta.js.map +0 -1
  133. package/resources/v1/events/beta.mjs +0 -3
  134. package/resources/v1/events/beta.mjs.map +0 -1
  135. package/src/resources/v1/customers/events.ts +0 -5
  136. package/src/resources/v1/customers/usage.ts +0 -5
  137. package/src/resources/v1/events/beta/beta.ts +0 -19
  138. package/src/resources/v1/events/beta/customers.ts +0 -212
  139. package/src/resources/v1/events/beta/index.ts +0 -8
  140. package/src/resources/v1/events/beta.ts +0 -3
@@ -3,7 +3,7 @@ import { APIResource } from "../../core/resource.mjs";
3
3
  import * as EntityTypesAPI from "./entity-types.mjs";
4
4
  import { EntityTypes, } from "./entity-types.mjs";
5
5
  import * as CustomersAPI from "./customers/customers.mjs";
6
- import { Customers } from "./customers/customers.mjs";
6
+ import { Customers, } from "./customers/customers.mjs";
7
7
  export class V1Beta extends APIResource {
8
8
  constructor() {
9
9
  super(...arguments);
@@ -1 +1 @@
1
- {"version":3,"file":"v1-beta.mjs","sourceRoot":"","sources":["../../src/resources/v1-beta/v1-beta.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,2BAAuB;AACjD,OAAO,EAML,WAAW,GACZ,2BAAuB;AACxB,OAAO,KAAK,YAAY,kCAA8B;AACtD,OAAO,EAAE,SAAS,EAAE,kCAA8B;AAElD,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAED,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"v1-beta.mjs","sourceRoot":"","sources":["../../src/resources/v1-beta/v1-beta.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,cAAc,2BAAuB;AACjD,OAAO,EAML,WAAW,GACZ,2BAAuB;AACxB,OAAO,KAAK,YAAY,kCAA8B;AACtD,OAAO,EAGL,SAAS,GACV,kCAA8B;AAE/B,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzF,CAAC;CAAA;AAED,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -1,8 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as EventsAPI from './events';
5
- import { Events } from './events';
6
4
  import * as IntegrationsAPI from './integrations';
7
5
  import {
8
6
  IntegrationLinkParams,
@@ -27,8 +25,6 @@ import {
27
25
  PromotionalEntitlementRevokeResponse,
28
26
  PromotionalEntitlements,
29
27
  } from './promotional-entitlements';
30
- import * as UsageAPI from './usage';
31
- import { Usage } from './usage';
32
28
  import { APIPromise } from '../../../core/api-promise';
33
29
  import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
34
30
  import { buildHeaders } from '../../../internal/headers';
@@ -40,8 +36,6 @@ export class Customers extends APIResource {
40
36
  promotionalEntitlements: PromotionalEntitlementsAPI.PromotionalEntitlements =
41
37
  new PromotionalEntitlementsAPI.PromotionalEntitlements(this._client);
42
38
  integrations: IntegrationsAPI.Integrations = new IntegrationsAPI.Integrations(this._client);
43
- events: EventsAPI.Events = new EventsAPI.Events(this._client);
44
- usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
45
39
 
46
40
  /**
47
41
  * Retrieves a customer by their unique identifier, including billing information
@@ -314,7 +308,8 @@ export namespace CustomerIntegrationResponse {
314
308
  | 'APP_STORE'
315
309
  | 'RECEIVED'
316
310
  | 'PREQUEL'
317
- | 'AIRWALLEX';
311
+ | 'AIRWALLEX'
312
+ | 'STRIPE_INVOICING';
318
313
 
319
314
  /**
320
315
  * Price billing sync revision data containing billing ID, link URL, and price
@@ -645,7 +640,8 @@ export namespace CustomerResponse {
645
640
  | 'APP_STORE'
646
641
  | 'RECEIVED'
647
642
  | 'PREQUEL'
648
- | 'AIRWALLEX';
643
+ | 'AIRWALLEX'
644
+ | 'STRIPE_INVOICING';
649
645
  }
650
646
 
651
647
  /**
@@ -1230,7 +1226,8 @@ export namespace CustomerListResponse {
1230
1226
  | 'APP_STORE'
1231
1227
  | 'RECEIVED'
1232
1228
  | 'PREQUEL'
1233
- | 'AIRWALLEX';
1229
+ | 'AIRWALLEX'
1230
+ | 'STRIPE_INVOICING';
1234
1231
  }
1235
1232
 
1236
1233
  /**
@@ -2212,7 +2209,8 @@ export namespace CustomerUpdateParams {
2212
2209
  | 'APP_STORE'
2213
2210
  | 'RECEIVED'
2214
2211
  | 'PREQUEL'
2215
- | 'AIRWALLEX';
2212
+ | 'AIRWALLEX'
2213
+ | 'STRIPE_INVOICING';
2216
2214
  }
2217
2215
 
2218
2216
  /**
@@ -2990,7 +2988,8 @@ export namespace CustomerProvisionParams {
2990
2988
  | 'APP_STORE'
2991
2989
  | 'RECEIVED'
2992
2990
  | 'PREQUEL'
2993
- | 'AIRWALLEX';
2991
+ | 'AIRWALLEX'
2992
+ | 'STRIPE_INVOICING';
2994
2993
  }
2995
2994
 
2996
2995
  /**
@@ -3354,8 +3353,6 @@ export interface CustomerUnarchiveParams {
3354
3353
  Customers.PaymentMethod = PaymentMethod;
3355
3354
  Customers.PromotionalEntitlements = PromotionalEntitlements;
3356
3355
  Customers.Integrations = Integrations;
3357
- Customers.Events = Events;
3358
- Customers.Usage = Usage;
3359
3356
 
3360
3357
  export declare namespace Customers {
3361
3358
  export {
@@ -3407,8 +3404,4 @@ export declare namespace Customers {
3407
3404
  type IntegrationLinkParams as IntegrationLinkParams,
3408
3405
  type IntegrationUnlinkParams as IntegrationUnlinkParams,
3409
3406
  };
3410
-
3411
- export { Events as Events };
3412
-
3413
- export { Usage as Usage };
3414
3407
  }
@@ -22,7 +22,6 @@ export {
22
22
  type CustomerListResponsesMyCursorIDPage,
23
23
  type CustomerListResourcesResponsesMyCursorIDPage,
24
24
  } from './customers';
25
- export { Events } from './events';
26
25
  export {
27
26
  Integrations,
28
27
  type IntegrationListResponse,
@@ -48,4 +47,3 @@ export {
48
47
  type PromotionalEntitlementRevokeParams,
49
48
  type PromotionalEntitlementListResponsesMyCursorIDPage,
50
49
  } from './promotional-entitlements';
51
- export { Usage } from './usage';
@@ -157,7 +157,8 @@ export interface IntegrationListResponse {
157
157
  | 'APP_STORE'
158
158
  | 'RECEIVED'
159
159
  | 'PREQUEL'
160
- | 'AIRWALLEX';
160
+ | 'AIRWALLEX'
161
+ | 'STRIPE_INVOICING';
161
162
 
162
163
  /**
163
164
  * Price billing sync revision data containing billing ID, link URL, and price
@@ -282,6 +283,7 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
282
283
  | 'RECEIVED'
283
284
  | 'PREQUEL'
284
285
  | 'AIRWALLEX'
286
+ | 'STRIPE_INVOICING'
285
287
  >;
286
288
 
287
289
  /**
@@ -325,7 +327,8 @@ export interface IntegrationLinkParams {
325
327
  | 'APP_STORE'
326
328
  | 'RECEIVED'
327
329
  | 'PREQUEL'
328
- | 'AIRWALLEX';
330
+ | 'AIRWALLEX'
331
+ | 'STRIPE_INVOICING';
329
332
 
330
333
  /**
331
334
  * Header param: Account ID — optional when authenticating with a user JWT (Bearer
@@ -84,7 +84,8 @@ export interface PaymentMethodAttachParams {
84
84
  | 'APP_STORE'
85
85
  | 'RECEIVED'
86
86
  | 'PREQUEL'
87
- | 'AIRWALLEX';
87
+ | 'AIRWALLEX'
88
+ | 'STRIPE_INVOICING';
88
89
 
89
90
  /**
90
91
  * Body param: Customers selected currency
@@ -1,8 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
- import * as BetaAPI from './beta/beta';
5
- import { Beta } from './beta/beta';
6
4
  import * as DataExportAPI from './data-export/data-export';
7
5
  import {
8
6
  DataExport,
@@ -22,7 +20,6 @@ import { RequestOptions } from '../../../internal/request-options';
22
20
  */
23
21
  export class Events extends APIResource {
24
22
  dataExport: DataExportAPI.DataExport = new DataExportAPI.DataExport(this._client);
25
- beta: BetaAPI.Beta = new BetaAPI.Beta(this._client);
26
23
 
27
24
  /**
28
25
  * Estimates the credit cost of a usage event without ingesting it. Returns the
@@ -251,7 +248,6 @@ export namespace EventReportParams {
251
248
  }
252
249
 
253
250
  Events.DataExport = DataExport;
254
- Events.Beta = Beta;
255
251
 
256
252
  export declare namespace Events {
257
253
  export {
@@ -270,6 +266,4 @@ export declare namespace Events {
270
266
  type DataExportMintScopedTokenParams as DataExportMintScopedTokenParams,
271
267
  type DataExportTriggerSyncParams as DataExportTriggerSyncParams,
272
268
  };
273
-
274
- export { Beta as Beta };
275
269
  }
@@ -1,6 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Beta } from './beta/index';
4
3
  export {
5
4
  DataExport,
6
5
  type DataExportListModelsResponse,
@@ -27,11 +27,217 @@ import {
27
27
  } from './entities';
28
28
  import * as EntitlementsAPI from './entitlements';
29
29
  import { EntitlementCheckParams, EntitlementCheckResponse, Entitlements } from './entitlements';
30
+ import { APIPromise } from '../../../core/api-promise';
31
+ import { buildHeaders } from '../../../internal/headers';
32
+ import { RequestOptions } from '../../../internal/request-options';
33
+ import { path } from '../../../internal/utils/path';
30
34
 
31
35
  export class Customers extends APIResource {
32
36
  entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
33
37
  entities: EntitiesAPI.Entities = new EntitiesAPI.Entities(this._client);
34
38
  assignments: AssignmentsAPI.Assignments = new AssignmentsAPI.Assignments(this._client);
39
+
40
+ /**
41
+ * Queries the customer's governance hierarchy tree, returning a cursor-paginated
42
+ * list of nodes with their usage configuration (limit, cadence, scope) and current
43
+ * usage, sortable and filterable by usage. Each node carries `parentId` so the
44
+ * tree can be rebuilt client-side. Usage is read from a periodically-refreshed
45
+ * read model and never gates access.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const response =
50
+ * await client.v1Beta.customers.retrieveGovernance('id');
51
+ * ```
52
+ */
53
+ retrieveGovernance(
54
+ id: string,
55
+ params: CustomerRetrieveGovernanceParams | null | undefined = {},
56
+ options?: RequestOptions,
57
+ ): APIPromise<CustomerRetrieveGovernanceResponse> {
58
+ const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
59
+ return this._client.get(path`/api/v1-beta/customers/${id}/governance`, {
60
+ query,
61
+ ...options,
62
+ headers: buildHeaders([
63
+ {
64
+ ...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
65
+ ...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
66
+ },
67
+ options?.headers,
68
+ ]),
69
+ });
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Paginated list of governance tree nodes, each with its usage configuration and
75
+ * current usage.
76
+ */
77
+ export interface CustomerRetrieveGovernanceResponse {
78
+ data: Array<CustomerRetrieveGovernanceResponse.Data>;
79
+
80
+ pagination: CustomerRetrieveGovernanceResponse.Pagination;
81
+ }
82
+
83
+ export namespace CustomerRetrieveGovernanceResponse {
84
+ /**
85
+ * A node of the governance hierarchy tree with its usage configuration (limit,
86
+ * cadence, scope) and current usage. Usage is read from a periodically-refreshed
87
+ * read model and may lag the live counter by a short interval; it never gates
88
+ * access.
89
+ */
90
+ export interface Data {
91
+ /**
92
+ * Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
93
+ * `PT1M`; `null` when the node has no usage configuration.
94
+ */
95
+ cadence: string | null;
96
+
97
+ /**
98
+ * Usage consumed in the current cadence period (may lag the live counter by a
99
+ * short interval).
100
+ */
101
+ currentUsage: number | null;
102
+
103
+ /**
104
+ * External id of the entity at this node.
105
+ */
106
+ entityId: string;
107
+
108
+ /**
109
+ * External id of the entity type (e.g. `team`, `user`).
110
+ */
111
+ entityTypeId: string;
112
+
113
+ /**
114
+ * External id of the parent entity in the tree; `null` for a root. Use it to
115
+ * rebuild the tree.
116
+ */
117
+ parentId: string | null;
118
+
119
+ /**
120
+ * The configuration scope (entity ids). Empty is the node-wide configuration; a
121
+ * non-empty set is a dimension-scoped sub-configuration.
122
+ */
123
+ scopeEntityIds: Array<string>;
124
+
125
+ /**
126
+ * Hard usage limit for this node per cadence period.
127
+ */
128
+ usageLimit: number | null;
129
+
130
+ /**
131
+ * Exclusive end of the cadence period — when usage resets; `null` once the period
132
+ * has rolled over.
133
+ */
134
+ usagePeriodEnd: string | null;
135
+
136
+ /**
137
+ * Start of the cadence period the usage snapshot belongs to; `null` once the
138
+ * period has rolled over.
139
+ */
140
+ usagePeriodStart: string | null;
141
+
142
+ /**
143
+ * `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The
144
+ * cross-capability-safe sort key.
145
+ */
146
+ utilization: number | null;
147
+
148
+ /**
149
+ * The metered currency ID (present when the configured capability is a credit
150
+ * currency).
151
+ */
152
+ currencyId?: string;
153
+
154
+ /**
155
+ * The metered feature ID (present when the configured capability is a feature).
156
+ */
157
+ featureId?: string;
158
+ }
159
+
160
+ export interface Pagination {
161
+ /**
162
+ * Cursor for fetching the next page of results, or null if no additional pages
163
+ * exist
164
+ */
165
+ next: string | null;
166
+ }
167
+ }
168
+
169
+ export interface CustomerRetrieveGovernanceParams {
170
+ /**
171
+ * Query param: Return items that come after this cursor
172
+ */
173
+ after?: string;
174
+
175
+ /**
176
+ * Query param: Currency ids to include, repeated per value (e.g.
177
+ * `?currencyIds=credits`). Omit both featureIds and currencyIds for tree mode.
178
+ */
179
+ currencyIds?: Array<string>;
180
+
181
+ /**
182
+ * Query param: Case-insensitive substring match on the entity id (`%`/`_` matched
183
+ * literally).
184
+ */
185
+ entityIdSearch?: string;
186
+
187
+ /**
188
+ * Query param: Filter to one or more entity types, repeated per value (e.g.
189
+ * `?entityTypeIds=team&entityTypeIds=user`).
190
+ */
191
+ entityTypeIds?: Array<string>;
192
+
193
+ /**
194
+ * Query param: Feature ids to include, repeated per value (e.g.
195
+ * `?featureIds=ai-tokens&featureIds=seats`). Omit both featureIds and currencyIds
196
+ * for tree mode — every node in the hierarchy with no usage configuration
197
+ * attached.
198
+ */
199
+ featureIds?: Array<string>;
200
+
201
+ /**
202
+ * Query param: Maximum number of items to return
203
+ */
204
+ limit?: number;
205
+
206
+ /**
207
+ * Query param: Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for
208
+ * at/over limit).
209
+ */
210
+ minUtilization?: number;
211
+
212
+ /**
213
+ * Query param: Sort direction: `asc` or `desc` (default `desc`).
214
+ */
215
+ order?: 'asc' | 'desc';
216
+
217
+ /**
218
+ * Query param: Filter by configuration scope: `all` (default), `nodeWide` (`[]`
219
+ * only), or `scoped` (non-empty only).
220
+ */
221
+ scope?: 'all' | 'nodeWide' | 'scoped';
222
+
223
+ /**
224
+ * Query param: Sort key: `utilization` (default, cross-capability-safe),
225
+ * `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.
226
+ */
227
+ sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt';
228
+
229
+ /**
230
+ * Header param: Account ID — optional when authenticating with a user JWT (Bearer
231
+ * token); falls back to the user's first membership. Ignored for API-key auth.
232
+ */
233
+ 'X-ACCOUNT-ID'?: string;
234
+
235
+ /**
236
+ * Header param: Environment ID — required when authenticating with a user JWT
237
+ * (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
238
+ * intrinsic to the key).
239
+ */
240
+ 'X-ENVIRONMENT-ID'?: string;
35
241
  }
36
242
 
37
243
  Customers.Entitlements = Entitlements;
@@ -39,6 +245,11 @@ Customers.Entities = Entities;
39
245
  Customers.Assignments = Assignments;
40
246
 
41
247
  export declare namespace Customers {
248
+ export {
249
+ type CustomerRetrieveGovernanceResponse as CustomerRetrieveGovernanceResponse,
250
+ type CustomerRetrieveGovernanceParams as CustomerRetrieveGovernanceParams,
251
+ };
252
+
42
253
  export {
43
254
  Entitlements as Entitlements,
44
255
  type EntitlementCheckResponse as EntitlementCheckResponse,
@@ -8,7 +8,11 @@ export {
8
8
  type AssignmentUpsertParams,
9
9
  type AssignmentListResponsesMyCursorIDPage,
10
10
  } from './assignments';
11
- export { Customers } from './customers';
11
+ export {
12
+ Customers,
13
+ type CustomerRetrieveGovernanceResponse,
14
+ type CustomerRetrieveGovernanceParams,
15
+ } from './customers';
12
16
  export {
13
17
  Entities,
14
18
  type EntityRetrieveResponse,
@@ -1,6 +1,10 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export { Customers } from './customers/index';
3
+ export {
4
+ Customers,
5
+ type CustomerRetrieveGovernanceResponse,
6
+ type CustomerRetrieveGovernanceParams,
7
+ } from './customers/index';
4
8
  export {
5
9
  EntityTypes,
6
10
  type EntityTypeListResponse,
@@ -11,7 +11,11 @@ import {
11
11
  EntityTypes,
12
12
  } from './entity-types';
13
13
  import * as CustomersAPI from './customers/customers';
14
- import { Customers } from './customers/customers';
14
+ import {
15
+ CustomerRetrieveGovernanceParams,
16
+ CustomerRetrieveGovernanceResponse,
17
+ Customers,
18
+ } from './customers/customers';
15
19
 
16
20
  export class V1Beta extends APIResource {
17
21
  customers: CustomersAPI.Customers = new CustomersAPI.Customers(this._client);
@@ -22,7 +26,11 @@ V1Beta.Customers = Customers;
22
26
  V1Beta.EntityTypes = EntityTypes;
23
27
 
24
28
  export declare namespace V1Beta {
25
- export { Customers as Customers };
29
+ export {
30
+ Customers as Customers,
31
+ type CustomerRetrieveGovernanceResponse as CustomerRetrieveGovernanceResponse,
32
+ type CustomerRetrieveGovernanceParams as CustomerRetrieveGovernanceParams,
33
+ };
26
34
 
27
35
  export {
28
36
  EntityTypes as EntityTypes,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-beta.42'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.44'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.42";
1
+ export declare const VERSION = "0.1.0-beta.44";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.42";
1
+ export declare const VERSION = "0.1.0-beta.44";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-beta.42'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-beta.44'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-beta.42'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.44'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,4 +0,0 @@
1
- import { APIResource } from "../../../core/resource.mjs";
2
- export declare class Events extends APIResource {
3
- }
4
- //# sourceMappingURL=events.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,qBAAa,MAAO,SAAQ,WAAW;CAAG"}
@@ -1,4 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- export declare class Events extends APIResource {
3
- }
4
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/events.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AAErD,qBAAa,MAAO,SAAQ,WAAW;CAAG"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Events = void 0;
5
- const resource_1 = require("../../../core/resource.js");
6
- class Events extends resource_1.APIResource {
7
- }
8
- exports.Events = Events;
9
- //# sourceMappingURL=events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,MAAa,MAAO,SAAQ,sBAAW;CAAG;AAA1C,wBAA0C"}
@@ -1,5 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../../core/resource.mjs";
3
- export class Events extends APIResource {
4
- }
5
- //# sourceMappingURL=events.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/events.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,MAAM,OAAO,MAAO,SAAQ,WAAW;CAAG"}
@@ -1,4 +0,0 @@
1
- import { APIResource } from "../../../core/resource.mjs";
2
- export declare class Usage extends APIResource {
3
- }
4
- //# sourceMappingURL=usage.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
@@ -1,4 +0,0 @@
1
- import { APIResource } from "../../../core/resource.js";
2
- export declare class Usage extends APIResource {
3
- }
4
- //# sourceMappingURL=usage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AAErD,qBAAa,KAAM,SAAQ,WAAW;CAAG"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Usage = void 0;
5
- const resource_1 = require("../../../core/resource.js");
6
- class Usage extends resource_1.APIResource {
7
- }
8
- exports.Usage = Usage;
9
- //# sourceMappingURL=usage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/usage.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,MAAa,KAAM,SAAQ,sBAAW;CAAG;AAAzC,sBAAyC"}
@@ -1,5 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../../core/resource.mjs";
3
- export class Usage extends APIResource {
4
- }
5
- //# sourceMappingURL=usage.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/usage.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,MAAM,OAAO,KAAM,SAAQ,WAAW;CAAG"}
@@ -1,10 +0,0 @@
1
- import { APIResource } from "../../../../core/resource.mjs";
2
- import * as CustomersAPI from "./customers.mjs";
3
- import { CustomerRetrieveGovernanceParams, CustomerRetrieveGovernanceResponse, Customers } from "./customers.mjs";
4
- export declare class Beta extends APIResource {
5
- customers: CustomersAPI.Customers;
6
- }
7
- export declare namespace Beta {
8
- export { Customers as Customers, type CustomerRetrieveGovernanceResponse as CustomerRetrieveGovernanceResponse, type CustomerRetrieveGovernanceParams as CustomerRetrieveGovernanceParams, };
9
- }
10
- //# sourceMappingURL=beta.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beta.d.mts","sourceRoot":"","sources":["../../../../src/resources/v1/events/beta/beta.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,sCAAkC;AACxD,OAAO,KAAK,YAAY,wBAAoB;AAC5C,OAAO,EAAE,gCAAgC,EAAE,kCAAkC,EAAE,SAAS,EAAE,wBAAoB;AAE9G,qBAAa,IAAK,SAAQ,WAAW;IACnC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;CAC9E;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
@@ -1,10 +0,0 @@
1
- import { APIResource } from "../../../../core/resource.js";
2
- import * as CustomersAPI from "./customers.js";
3
- import { CustomerRetrieveGovernanceParams, CustomerRetrieveGovernanceResponse, Customers } from "./customers.js";
4
- export declare class Beta extends APIResource {
5
- customers: CustomersAPI.Customers;
6
- }
7
- export declare namespace Beta {
8
- export { Customers as Customers, type CustomerRetrieveGovernanceResponse as CustomerRetrieveGovernanceResponse, type CustomerRetrieveGovernanceParams as CustomerRetrieveGovernanceParams, };
9
- }
10
- //# sourceMappingURL=beta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beta.d.ts","sourceRoot":"","sources":["../../../../src/resources/v1/events/beta/beta.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,KAAK,YAAY,uBAAoB;AAC5C,OAAO,EAAE,gCAAgC,EAAE,kCAAkC,EAAE,SAAS,EAAE,uBAAoB;AAE9G,qBAAa,IAAK,SAAQ,WAAW;IACnC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;CAC9E;AAID,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,gCAAgC,IAAI,gCAAgC,GAC1E,CAAC;CACH"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Beta = void 0;
5
- const tslib_1 = require("../../../../internal/tslib.js");
6
- const resource_1 = require("../../../../core/resource.js");
7
- const CustomersAPI = tslib_1.__importStar(require("./customers.js"));
8
- const customers_1 = require("./customers.js");
9
- class Beta extends resource_1.APIResource {
10
- constructor() {
11
- super(...arguments);
12
- this.customers = new CustomersAPI.Customers(this._client);
13
- }
14
- }
15
- exports.Beta = Beta;
16
- Beta.Customers = customers_1.Customers;
17
- //# sourceMappingURL=beta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"beta.js","sourceRoot":"","sources":["../../../../src/resources/v1/events/beta/beta.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,2DAAwD;AACxD,qEAA4C;AAC5C,8CAA8G;AAE9G,MAAa,IAAK,SAAQ,sBAAW;IAArC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/E,CAAC;CAAA;AAFD,oBAEC;AAED,IAAI,CAAC,SAAS,GAAG,qBAAS,CAAC"}