@stigg/typescript 0.1.0-beta.62 → 0.1.0-beta.63
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/CHANGELOG.md +30 -0
- package/package.json +1 -1
- package/resources/v1/credits/reservations.d.mts +1 -1
- package/resources/v1/credits/reservations.d.mts.map +1 -1
- package/resources/v1/credits/reservations.d.ts +1 -1
- package/resources/v1/credits/reservations.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +2 -2
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +2 -2
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/events/beta/customers.d.mts +18 -7
- package/resources/v1/events/beta/customers.d.mts.map +1 -1
- package/resources/v1/events/beta/customers.d.ts +18 -7
- package/resources/v1/events/beta/customers.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.mts +2 -1
- package/resources/v1-beta/customers/assignments.d.mts.map +1 -1
- package/resources/v1-beta/customers/assignments.d.ts +2 -1
- package/resources/v1-beta/customers/assignments.d.ts.map +1 -1
- package/resources/v1-beta/customers/customers.d.mts +4 -0
- package/resources/v1-beta/customers/customers.d.mts.map +1 -1
- package/resources/v1-beta/customers/customers.d.ts +4 -0
- package/resources/v1-beta/customers/customers.d.ts.map +1 -1
- package/resources/v1-beta/customers/customers.js +4 -0
- package/resources/v1-beta/customers/customers.js.map +1 -1
- package/resources/v1-beta/customers/customers.mjs +4 -0
- package/resources/v1-beta/customers/customers.mjs.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.mts +1 -1
- package/resources/v1-beta/customers/entitlements.d.mts.map +1 -1
- package/resources/v1-beta/customers/entitlements.d.ts +1 -1
- package/resources/v1-beta/customers/entitlements.d.ts.map +1 -1
- package/resources/v1-beta/customers/governance.d.mts +156 -0
- package/resources/v1-beta/customers/governance.d.mts.map +1 -0
- package/resources/v1-beta/customers/governance.d.ts +156 -0
- package/resources/v1-beta/customers/governance.d.ts.map +1 -0
- package/resources/v1-beta/customers/governance.js +43 -0
- package/resources/v1-beta/customers/governance.js.map +1 -0
- package/resources/v1-beta/customers/governance.mjs +39 -0
- package/resources/v1-beta/customers/governance.mjs.map +1 -0
- package/resources/v1-beta/customers/index.d.mts +1 -0
- package/resources/v1-beta/customers/index.d.mts.map +1 -1
- package/resources/v1-beta/customers/index.d.ts +1 -0
- package/resources/v1-beta/customers/index.d.ts.map +1 -1
- package/resources/v1-beta/customers/index.js +3 -1
- package/resources/v1-beta/customers/index.js.map +1 -1
- package/resources/v1-beta/customers/index.mjs +1 -0
- package/resources/v1-beta/customers/index.mjs.map +1 -1
- package/src/resources/v1/credits/reservations.ts +1 -1
- package/src/resources/v1/customers/customers.ts +2 -2
- package/src/resources/v1/events/beta/customers.ts +20 -7
- package/src/resources/v1/subscriptions/subscriptions.ts +1 -1
- package/src/resources/v1-beta/customers/assignments.ts +2 -1
- package/src/resources/v1-beta/customers/customers.ts +16 -0
- package/src/resources/v1-beta/customers/entitlements.ts +1 -1
- package/src/resources/v1-beta/customers/governance.ts +210 -0
- package/src/resources/v1-beta/customers/index.ts +6 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.mjs";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
+
export declare class Governance extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Queries the customer's governance hierarchy tree, returning a cursor-paginated
|
|
7
|
+
* list of nodes with their usage configuration (limit, cadence, scope) and current
|
|
8
|
+
* usage, sortable and filterable by usage. Each node carries `parentId` so the
|
|
9
|
+
* tree can be rebuilt client-side. Usage is read from a periodically-refreshed
|
|
10
|
+
* read model and never gates access.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const governanceListResponse of client.v1Beta.customers.governance.list(
|
|
16
|
+
* 'id',
|
|
17
|
+
* )) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
list(id: string, params?: GovernanceListParams | null | undefined, options?: RequestOptions): PagePromise<GovernanceListResponsesMyCursorIDPage, GovernanceListResponse>;
|
|
23
|
+
}
|
|
24
|
+
export type GovernanceListResponsesMyCursorIDPage = MyCursorIDPage<GovernanceListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* A node of the governance hierarchy tree with its usage configuration (limit,
|
|
27
|
+
* cadence, scope) and current usage. Usage is read from a periodically-refreshed
|
|
28
|
+
* read model and may lag the live counter by a short interval; it never gates
|
|
29
|
+
* access.
|
|
30
|
+
*/
|
|
31
|
+
export interface GovernanceListResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
|
|
34
|
+
* `PT1M`; `null` when the node has no usage configuration.
|
|
35
|
+
*/
|
|
36
|
+
cadence: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Usage consumed in the current cadence period (may lag the live counter by a
|
|
39
|
+
* short interval).
|
|
40
|
+
*/
|
|
41
|
+
currentUsage: number | null;
|
|
42
|
+
/**
|
|
43
|
+
* Human-readable name of the entity, or null when none is set (display the entity
|
|
44
|
+
* id instead).
|
|
45
|
+
*/
|
|
46
|
+
displayName: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* External id of the entity at this node.
|
|
49
|
+
*/
|
|
50
|
+
entityId: string;
|
|
51
|
+
/**
|
|
52
|
+
* External id of the entity type (e.g. `team`, `user`).
|
|
53
|
+
*/
|
|
54
|
+
entityTypeId: string;
|
|
55
|
+
/**
|
|
56
|
+
* External id of the parent entity in the tree. `null` means the entity is either
|
|
57
|
+
* a root or not yet placed in the hierarchy — placement rides on an assignment, so
|
|
58
|
+
* an entity with no limits set has no parent yet. Both render at the top level;
|
|
59
|
+
* use it to rebuild the tree.
|
|
60
|
+
*/
|
|
61
|
+
parentId: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* The configuration scope (entity ids). Empty is the node-wide configuration; a
|
|
64
|
+
* non-empty set is a dimension-scoped sub-configuration.
|
|
65
|
+
*/
|
|
66
|
+
scopeEntityIds: Array<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Hard usage limit for this node per cadence period.
|
|
69
|
+
*/
|
|
70
|
+
usageLimit: number | null;
|
|
71
|
+
/**
|
|
72
|
+
* Exclusive end of the cadence period in progress now — when usage resets. `null`
|
|
73
|
+
* when the node has no usage configuration, or when a stored cadence cannot be
|
|
74
|
+
* parsed.
|
|
75
|
+
*/
|
|
76
|
+
usagePeriodEnd: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Start of the cadence period in progress now, derived from the cadence and the
|
|
79
|
+
* assignment anchor — it stays correct across a rollover. `null` when the node has
|
|
80
|
+
* no usage configuration, or when a stored cadence cannot be parsed.
|
|
81
|
+
*/
|
|
82
|
+
usagePeriodStart: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The
|
|
85
|
+
* cross-capability-safe sort key.
|
|
86
|
+
*/
|
|
87
|
+
utilization: number | null;
|
|
88
|
+
/**
|
|
89
|
+
* The metered currency ID (present when the configured capability is a credit
|
|
90
|
+
* currency).
|
|
91
|
+
*/
|
|
92
|
+
currencyId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The metered feature ID (present when the configured capability is a feature).
|
|
95
|
+
*/
|
|
96
|
+
featureId?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface GovernanceListParams extends MyCursorIDPageParams {
|
|
99
|
+
/**
|
|
100
|
+
* Query param: Currency ids to include, comma-separated (e.g.
|
|
101
|
+
* `?currencyIds=credits`), up to 100. Omit both featureIds and currencyIds for
|
|
102
|
+
* tree mode.
|
|
103
|
+
*/
|
|
104
|
+
currencyIds?: Array<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Query param: Case-insensitive substring match on the entity id or its display
|
|
107
|
+
* name (`%`/`_` matched literally).
|
|
108
|
+
*/
|
|
109
|
+
entityIdSearch?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Query param: Filter to one or more entity types, comma-separated (e.g.
|
|
112
|
+
* `?entityTypeIds=team,user`), up to 100.
|
|
113
|
+
*/
|
|
114
|
+
entityTypeIds?: Array<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Query param: Feature ids to include, comma-separated (e.g.
|
|
117
|
+
* `?featureIds=ai-tokens,seats`), up to 100. Omit both featureIds and currencyIds
|
|
118
|
+
* for tree mode — every node in the hierarchy with no usage configuration
|
|
119
|
+
* attached.
|
|
120
|
+
*/
|
|
121
|
+
featureIds?: Array<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Query param: Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for
|
|
124
|
+
* at/over limit).
|
|
125
|
+
*/
|
|
126
|
+
minUtilization?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Query param: Sort direction: `asc` or `desc` (default `desc`).
|
|
129
|
+
*/
|
|
130
|
+
order?: 'asc' | 'desc';
|
|
131
|
+
/**
|
|
132
|
+
* Query param: Filter by configuration scope: `all` (default), `nodeWide` (`[]`
|
|
133
|
+
* only), or `scoped` (non-empty only).
|
|
134
|
+
*/
|
|
135
|
+
scope?: 'all' | 'nodeWide' | 'scoped';
|
|
136
|
+
/**
|
|
137
|
+
* Query param: Sort key: `utilization` (default, cross-capability-safe),
|
|
138
|
+
* `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.
|
|
139
|
+
*/
|
|
140
|
+
sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt';
|
|
141
|
+
/**
|
|
142
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
143
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
144
|
+
*/
|
|
145
|
+
'X-ACCOUNT-ID'?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
148
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
149
|
+
* intrinsic to the key).
|
|
150
|
+
*/
|
|
151
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
152
|
+
}
|
|
153
|
+
export declare namespace Governance {
|
|
154
|
+
export { type GovernanceListResponse as GovernanceListResponse, type GovernanceListResponsesMyCursorIDPage as GovernanceListResponsesMyCursorIDPage, type GovernanceListParams as GovernanceListParams, };
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=governance.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance.d.mts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/governance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,qCAAiC;AAElG,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qCAAqC,EAAE,sBAAsB,CAAC;CAkB9E;AAED,MAAM,MAAM,qCAAqC,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;IAEtC;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,IAAI,GAAG,WAAW,CAAC;IAE1F;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from "../../../core/pagination.js";
|
|
3
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
+
export declare class Governance extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Queries the customer's governance hierarchy tree, returning a cursor-paginated
|
|
7
|
+
* list of nodes with their usage configuration (limit, cadence, scope) and current
|
|
8
|
+
* usage, sortable and filterable by usage. Each node carries `parentId` so the
|
|
9
|
+
* tree can be rebuilt client-side. Usage is read from a periodically-refreshed
|
|
10
|
+
* read model and never gates access.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const governanceListResponse of client.v1Beta.customers.governance.list(
|
|
16
|
+
* 'id',
|
|
17
|
+
* )) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
list(id: string, params?: GovernanceListParams | null | undefined, options?: RequestOptions): PagePromise<GovernanceListResponsesMyCursorIDPage, GovernanceListResponse>;
|
|
23
|
+
}
|
|
24
|
+
export type GovernanceListResponsesMyCursorIDPage = MyCursorIDPage<GovernanceListResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* A node of the governance hierarchy tree with its usage configuration (limit,
|
|
27
|
+
* cadence, scope) and current usage. Usage is read from a periodically-refreshed
|
|
28
|
+
* read model and may lag the live counter by a short interval; it never gates
|
|
29
|
+
* access.
|
|
30
|
+
*/
|
|
31
|
+
export interface GovernanceListResponse {
|
|
32
|
+
/**
|
|
33
|
+
* Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`,
|
|
34
|
+
* `PT1M`; `null` when the node has no usage configuration.
|
|
35
|
+
*/
|
|
36
|
+
cadence: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Usage consumed in the current cadence period (may lag the live counter by a
|
|
39
|
+
* short interval).
|
|
40
|
+
*/
|
|
41
|
+
currentUsage: number | null;
|
|
42
|
+
/**
|
|
43
|
+
* Human-readable name of the entity, or null when none is set (display the entity
|
|
44
|
+
* id instead).
|
|
45
|
+
*/
|
|
46
|
+
displayName: string | null;
|
|
47
|
+
/**
|
|
48
|
+
* External id of the entity at this node.
|
|
49
|
+
*/
|
|
50
|
+
entityId: string;
|
|
51
|
+
/**
|
|
52
|
+
* External id of the entity type (e.g. `team`, `user`).
|
|
53
|
+
*/
|
|
54
|
+
entityTypeId: string;
|
|
55
|
+
/**
|
|
56
|
+
* External id of the parent entity in the tree. `null` means the entity is either
|
|
57
|
+
* a root or not yet placed in the hierarchy — placement rides on an assignment, so
|
|
58
|
+
* an entity with no limits set has no parent yet. Both render at the top level;
|
|
59
|
+
* use it to rebuild the tree.
|
|
60
|
+
*/
|
|
61
|
+
parentId: string | null;
|
|
62
|
+
/**
|
|
63
|
+
* The configuration scope (entity ids). Empty is the node-wide configuration; a
|
|
64
|
+
* non-empty set is a dimension-scoped sub-configuration.
|
|
65
|
+
*/
|
|
66
|
+
scopeEntityIds: Array<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Hard usage limit for this node per cadence period.
|
|
69
|
+
*/
|
|
70
|
+
usageLimit: number | null;
|
|
71
|
+
/**
|
|
72
|
+
* Exclusive end of the cadence period in progress now — when usage resets. `null`
|
|
73
|
+
* when the node has no usage configuration, or when a stored cadence cannot be
|
|
74
|
+
* parsed.
|
|
75
|
+
*/
|
|
76
|
+
usagePeriodEnd: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Start of the cadence period in progress now, derived from the cadence and the
|
|
79
|
+
* assignment anchor — it stays correct across a rollover. `null` when the node has
|
|
80
|
+
* no usage configuration, or when a stored cadence cannot be parsed.
|
|
81
|
+
*/
|
|
82
|
+
usagePeriodStart: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The
|
|
85
|
+
* cross-capability-safe sort key.
|
|
86
|
+
*/
|
|
87
|
+
utilization: number | null;
|
|
88
|
+
/**
|
|
89
|
+
* The metered currency ID (present when the configured capability is a credit
|
|
90
|
+
* currency).
|
|
91
|
+
*/
|
|
92
|
+
currencyId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The metered feature ID (present when the configured capability is a feature).
|
|
95
|
+
*/
|
|
96
|
+
featureId?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface GovernanceListParams extends MyCursorIDPageParams {
|
|
99
|
+
/**
|
|
100
|
+
* Query param: Currency ids to include, comma-separated (e.g.
|
|
101
|
+
* `?currencyIds=credits`), up to 100. Omit both featureIds and currencyIds for
|
|
102
|
+
* tree mode.
|
|
103
|
+
*/
|
|
104
|
+
currencyIds?: Array<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Query param: Case-insensitive substring match on the entity id or its display
|
|
107
|
+
* name (`%`/`_` matched literally).
|
|
108
|
+
*/
|
|
109
|
+
entityIdSearch?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Query param: Filter to one or more entity types, comma-separated (e.g.
|
|
112
|
+
* `?entityTypeIds=team,user`), up to 100.
|
|
113
|
+
*/
|
|
114
|
+
entityTypeIds?: Array<string>;
|
|
115
|
+
/**
|
|
116
|
+
* Query param: Feature ids to include, comma-separated (e.g.
|
|
117
|
+
* `?featureIds=ai-tokens,seats`), up to 100. Omit both featureIds and currencyIds
|
|
118
|
+
* for tree mode — every node in the hierarchy with no usage configuration
|
|
119
|
+
* attached.
|
|
120
|
+
*/
|
|
121
|
+
featureIds?: Array<string>;
|
|
122
|
+
/**
|
|
123
|
+
* Query param: Only nodes with utilization ≥ this value (e.g. 0.8 for ≥80%, 1 for
|
|
124
|
+
* at/over limit).
|
|
125
|
+
*/
|
|
126
|
+
minUtilization?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Query param: Sort direction: `asc` or `desc` (default `desc`).
|
|
129
|
+
*/
|
|
130
|
+
order?: 'asc' | 'desc';
|
|
131
|
+
/**
|
|
132
|
+
* Query param: Filter by configuration scope: `all` (default), `nodeWide` (`[]`
|
|
133
|
+
* only), or `scoped` (non-empty only).
|
|
134
|
+
*/
|
|
135
|
+
scope?: 'all' | 'nodeWide' | 'scoped';
|
|
136
|
+
/**
|
|
137
|
+
* Query param: Sort key: `utilization` (default, cross-capability-safe),
|
|
138
|
+
* `currentUsage`, `usageLimit`, `scopeSize`, `id`, or `createdAt`.
|
|
139
|
+
*/
|
|
140
|
+
sortBy?: 'utilization' | 'currentUsage' | 'usageLimit' | 'scopeSize' | 'id' | 'createdAt';
|
|
141
|
+
/**
|
|
142
|
+
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
143
|
+
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
144
|
+
*/
|
|
145
|
+
'X-ACCOUNT-ID'?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Header param: Environment ID — required when authenticating with a user JWT
|
|
148
|
+
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
149
|
+
* intrinsic to the key).
|
|
150
|
+
*/
|
|
151
|
+
'X-ENVIRONMENT-ID'?: string;
|
|
152
|
+
}
|
|
153
|
+
export declare namespace Governance {
|
|
154
|
+
export { type GovernanceListResponse as GovernanceListResponse, type GovernanceListResponsesMyCursorIDPage as GovernanceListResponsesMyCursorIDPage, type GovernanceListParams as GovernanceListParams, };
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=governance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/governance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,WAAW,EAAE,oCAAiC;AAElG,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qCAAqC,EAAE,sBAAsB,CAAC;CAkB9E;AAED,MAAM,MAAM,qCAAqC,GAAG,cAAc,CAAC,sBAAsB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;OAGG;IACH,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;IAEtC;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,IAAI,GAAG,WAAW,CAAC;IAE1F;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.Governance = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../../../internal/headers.js");
|
|
8
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
9
|
+
class Governance extends resource_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Queries the customer's governance hierarchy tree, returning a cursor-paginated
|
|
12
|
+
* list of nodes with their usage configuration (limit, cadence, scope) and current
|
|
13
|
+
* usage, sortable and filterable by usage. Each node carries `parentId` so the
|
|
14
|
+
* tree can be rebuilt client-side. Usage is read from a periodically-refreshed
|
|
15
|
+
* read model and never gates access.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* // Automatically fetches more pages as needed.
|
|
20
|
+
* for await (const governanceListResponse of client.v1Beta.customers.governance.list(
|
|
21
|
+
* 'id',
|
|
22
|
+
* )) {
|
|
23
|
+
* // ...
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
list(id, params = {}, options) {
|
|
28
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
29
|
+
return this._client.getAPIList((0, path_1.path) `/api/v1-beta/customers/${id}/governance`, (pagination_1.MyCursorIDPage), {
|
|
30
|
+
query,
|
|
31
|
+
...options,
|
|
32
|
+
headers: (0, headers_1.buildHeaders)([
|
|
33
|
+
{
|
|
34
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
35
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
36
|
+
},
|
|
37
|
+
options?.headers,
|
|
38
|
+
]),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.Governance = Governance;
|
|
43
|
+
//# sourceMappingURL=governance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance.js","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/governance.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AACrD,4DAAkG;AAClG,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,0BAA0B,EAAE,aAAa,EAC7C,CAAA,2BAAsC,CAAA,EACtC;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;CACF;AAxCD,gCAwCC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { MyCursorIDPage } from "../../../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
5
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
6
|
+
export class Governance extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Queries the customer's governance hierarchy tree, returning a cursor-paginated
|
|
9
|
+
* list of nodes with their usage configuration (limit, cadence, scope) and current
|
|
10
|
+
* usage, sortable and filterable by usage. Each node carries `parentId` so the
|
|
11
|
+
* tree can be rebuilt client-side. Usage is read from a periodically-refreshed
|
|
12
|
+
* read model and never gates access.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* // Automatically fetches more pages as needed.
|
|
17
|
+
* for await (const governanceListResponse of client.v1Beta.customers.governance.list(
|
|
18
|
+
* 'id',
|
|
19
|
+
* )) {
|
|
20
|
+
* // ...
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
list(id, params = {}, options) {
|
|
25
|
+
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...query } = params ?? {};
|
|
26
|
+
return this._client.getAPIList(path `/api/v1-beta/customers/${id}/governance`, (MyCursorIDPage), {
|
|
27
|
+
query,
|
|
28
|
+
...options,
|
|
29
|
+
headers: buildHeaders([
|
|
30
|
+
{
|
|
31
|
+
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
32
|
+
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
33
|
+
},
|
|
34
|
+
options?.headers,
|
|
35
|
+
]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=governance.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"governance.mjs","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/governance.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,cAAc,EAA0C,qCAAiC;AAClG,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,EAAU,EACV,SAAkD,EAAE,EACpD,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAClG,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,0BAA0B,EAAE,aAAa,EAC7C,CAAA,cAAsC,CAAA,EACtC;YACE,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;oBACpE,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;iBACjF;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -2,4 +2,5 @@ export { Assignments, type AssignmentListResponse, type AssignmentUpsertResponse
|
|
|
2
2
|
export { Customers } from "./customers.mjs";
|
|
3
3
|
export { Entities, type EntityRetrieveResponse, type EntityListResponse, type EntityArchiveResponse, type EntityUnarchiveResponse, type EntityUpsertResponse, type EntityRetrieveParams, type EntityListParams, type EntityArchiveParams, type EntityUnarchiveParams, type EntityUpsertParams, type EntityListResponsesMyCursorIDPage, } from "./entities.mjs";
|
|
4
4
|
export { Entitlements, type EntitlementCheckResponse, type EntitlementCheckParams } from "./entitlements.mjs";
|
|
5
|
+
export { Governance, type GovernanceListResponse, type GovernanceListParams, type GovernanceListResponsesMyCursorIDPage, } from "./governance.mjs";
|
|
5
6
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qCAAqC,GAC3C,0BAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC,uBAAmB;AACpB,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,2BAAuB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qCAAqC,GAC3C,0BAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC,uBAAmB;AACpB,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,2BAAuB;AAC1G,OAAO,EACL,UAAU,EACV,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,qCAAqC,GAC3C,yBAAqB"}
|
|
@@ -2,4 +2,5 @@ export { Assignments, type AssignmentListResponse, type AssignmentUpsertResponse
|
|
|
2
2
|
export { Customers } from "./customers.js";
|
|
3
3
|
export { Entities, type EntityRetrieveResponse, type EntityListResponse, type EntityArchiveResponse, type EntityUnarchiveResponse, type EntityUpsertResponse, type EntityRetrieveParams, type EntityListParams, type EntityArchiveParams, type EntityUnarchiveParams, type EntityUpsertParams, type EntityListResponsesMyCursorIDPage, } from "./entities.js";
|
|
4
4
|
export { Entitlements, type EntitlementCheckResponse, type EntitlementCheckParams } from "./entitlements.js";
|
|
5
|
+
export { Governance, type GovernanceListResponse, type GovernanceListParams, type GovernanceListResponsesMyCursorIDPage, } from "./governance.js";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qCAAqC,GAC3C,yBAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC,sBAAmB;AACpB,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,0BAAuB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,WAAW,EACX,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qCAAqC,GAC3C,yBAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,uBAAoB;AACxC,OAAO,EACL,QAAQ,EACR,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,iCAAiC,GACvC,sBAAmB;AACpB,OAAO,EAAE,YAAY,EAAE,KAAK,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,0BAAuB;AAC1G,OAAO,EACL,UAAU,EACV,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,qCAAqC,GAC3C,wBAAqB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Entitlements = exports.Entities = exports.Customers = exports.Assignments = void 0;
|
|
4
|
+
exports.Governance = exports.Entitlements = exports.Entities = exports.Customers = exports.Assignments = void 0;
|
|
5
5
|
var assignments_1 = require("./assignments.js");
|
|
6
6
|
Object.defineProperty(exports, "Assignments", { enumerable: true, get: function () { return assignments_1.Assignments; } });
|
|
7
7
|
var customers_1 = require("./customers.js");
|
|
@@ -10,4 +10,6 @@ var entities_1 = require("./entities.js");
|
|
|
10
10
|
Object.defineProperty(exports, "Entities", { enumerable: true, get: function () { return entities_1.Entities; } });
|
|
11
11
|
var entitlements_1 = require("./entitlements.js");
|
|
12
12
|
Object.defineProperty(exports, "Entitlements", { enumerable: true, get: function () { return entitlements_1.Entitlements; } });
|
|
13
|
+
var governance_1 = require("./governance.js");
|
|
14
|
+
Object.defineProperty(exports, "Governance", { enumerable: true, get: function () { return governance_1.Governance; } });
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAOuB;AANrB,0GAAA,WAAW,OAAA;AAOb,4CAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,0CAaoB;AAZlB,oGAAA,QAAQ,OAAA;AAaV,kDAA0G;AAAjG,4GAAA,YAAY,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAOuB;AANrB,0GAAA,WAAW,OAAA;AAOb,4CAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,0CAaoB;AAZlB,oGAAA,QAAQ,OAAA;AAaV,kDAA0G;AAAjG,4GAAA,YAAY,OAAA;AACrB,8CAKsB;AAJpB,wGAAA,UAAU,OAAA"}
|
|
@@ -3,4 +3,5 @@ export { Assignments, } from "./assignments.mjs";
|
|
|
3
3
|
export { Customers } from "./customers.mjs";
|
|
4
4
|
export { Entities, } from "./entities.mjs";
|
|
5
5
|
export { Entitlements } from "./entitlements.mjs";
|
|
6
|
+
export { Governance, } from "./governance.mjs";
|
|
6
7
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,WAAW,GAMZ,0BAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,OAAO,EACL,QAAQ,GAYT,uBAAmB;AACpB,OAAO,EAAE,YAAY,EAA8D,2BAAuB"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1-beta/customers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,WAAW,GAMZ,0BAAsB;AACvB,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,OAAO,EACL,QAAQ,GAYT,uBAAmB;AACpB,OAAO,EAAE,YAAY,EAA8D,2BAAuB;AAC1G,OAAO,EACL,UAAU,GAIX,yBAAqB"}
|
|
@@ -1873,7 +1873,7 @@ export namespace CustomerCheckEntitlementResponse {
|
|
|
1873
1873
|
/**
|
|
1874
1874
|
* The status of the reservation.
|
|
1875
1875
|
*/
|
|
1876
|
-
status: 'ACTIVE' | 'RELEASED';
|
|
1876
|
+
status: 'ACTIVE' | 'RELEASED' | 'EXPIRED';
|
|
1877
1877
|
}
|
|
1878
1878
|
}
|
|
1879
1879
|
}
|
|
@@ -2625,7 +2625,7 @@ export namespace CustomerRetrieveEntitlementsResponse {
|
|
|
2625
2625
|
/**
|
|
2626
2626
|
* The status of the reservation.
|
|
2627
2627
|
*/
|
|
2628
|
-
status: 'ACTIVE' | 'RELEASED';
|
|
2628
|
+
status: 'ACTIVE' | 'RELEASED' | 'EXPIRED';
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
2631
|
}
|
|
@@ -137,18 +137,31 @@ export namespace CustomerRetrieveGovernanceResponse {
|
|
|
137
137
|
* exist
|
|
138
138
|
*/
|
|
139
139
|
next: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Cursor for fetching the previous page of results, or null if at the beginning
|
|
143
|
+
*/
|
|
144
|
+
prev: string | null;
|
|
140
145
|
}
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
export interface CustomerRetrieveGovernanceParams {
|
|
144
149
|
/**
|
|
145
|
-
* Query param:
|
|
150
|
+
* Query param: Opaque cursor from a page’s `next`; returns the page after it.
|
|
151
|
+
* Mutually exclusive with `before`.
|
|
146
152
|
*/
|
|
147
153
|
after?: string;
|
|
148
154
|
|
|
149
155
|
/**
|
|
150
|
-
* Query param:
|
|
151
|
-
*
|
|
156
|
+
* Query param: Opaque cursor from a page’s `prev`; returns the page before it.
|
|
157
|
+
* Mutually exclusive with `after`.
|
|
158
|
+
*/
|
|
159
|
+
before?: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Query param: Currency ids to include, comma-separated (e.g.
|
|
163
|
+
* `?currencyIds=credits`), up to 100. Omit both featureIds and currencyIds for
|
|
164
|
+
* tree mode.
|
|
152
165
|
*/
|
|
153
166
|
currencyIds?: Array<string>;
|
|
154
167
|
|
|
@@ -159,14 +172,14 @@ export interface CustomerRetrieveGovernanceParams {
|
|
|
159
172
|
entityIdSearch?: string;
|
|
160
173
|
|
|
161
174
|
/**
|
|
162
|
-
* Query param: Filter to one or more entity types,
|
|
163
|
-
* `?entityTypeIds=team
|
|
175
|
+
* Query param: Filter to one or more entity types, comma-separated (e.g.
|
|
176
|
+
* `?entityTypeIds=team,user`), up to 100.
|
|
164
177
|
*/
|
|
165
178
|
entityTypeIds?: Array<string>;
|
|
166
179
|
|
|
167
180
|
/**
|
|
168
|
-
* Query param: Feature ids to include,
|
|
169
|
-
* `?featureIds=ai-tokens
|
|
181
|
+
* Query param: Feature ids to include, comma-separated (e.g.
|
|
182
|
+
* `?featureIds=ai-tokens,seats`), up to 100. Omit both featureIds and currencyIds
|
|
170
183
|
* for tree mode — every node in the hierarchy with no usage configuration
|
|
171
184
|
* attached.
|
|
172
185
|
*/
|
|
@@ -312,7 +312,8 @@ export namespace AssignmentUpsertParams {
|
|
|
312
312
|
/**
|
|
313
313
|
* Parent entity ID in the hierarchy. Omit to leave the current parent untouched (a
|
|
314
314
|
* new node defaults to a root); `null` detaches to a root; an ID sets or changes
|
|
315
|
-
* the parent. Reparenting an existing node is leaf-only
|
|
315
|
+
* the parent. Reparenting or detaching an existing node is leaf-only; place a
|
|
316
|
+
* parent before its children, or in the same batch.
|
|
316
317
|
*/
|
|
317
318
|
parentId?: string | null;
|
|
318
319
|
|
|
@@ -27,16 +27,25 @@ import {
|
|
|
27
27
|
} from './entities';
|
|
28
28
|
import * as EntitlementsAPI from './entitlements';
|
|
29
29
|
import { EntitlementCheckParams, EntitlementCheckResponse, Entitlements } from './entitlements';
|
|
30
|
+
import * as GovernanceAPI from './governance';
|
|
31
|
+
import {
|
|
32
|
+
Governance,
|
|
33
|
+
GovernanceListParams,
|
|
34
|
+
GovernanceListResponse,
|
|
35
|
+
GovernanceListResponsesMyCursorIDPage,
|
|
36
|
+
} from './governance';
|
|
30
37
|
|
|
31
38
|
export class Customers extends APIResource {
|
|
32
39
|
entitlements: EntitlementsAPI.Entitlements = new EntitlementsAPI.Entitlements(this._client);
|
|
33
40
|
entities: EntitiesAPI.Entities = new EntitiesAPI.Entities(this._client);
|
|
34
41
|
assignments: AssignmentsAPI.Assignments = new AssignmentsAPI.Assignments(this._client);
|
|
42
|
+
governance: GovernanceAPI.Governance = new GovernanceAPI.Governance(this._client);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
Customers.Entitlements = Entitlements;
|
|
38
46
|
Customers.Entities = Entities;
|
|
39
47
|
Customers.Assignments = Assignments;
|
|
48
|
+
Customers.Governance = Governance;
|
|
40
49
|
|
|
41
50
|
export declare namespace Customers {
|
|
42
51
|
export {
|
|
@@ -68,4 +77,11 @@ export declare namespace Customers {
|
|
|
68
77
|
type AssignmentListParams as AssignmentListParams,
|
|
69
78
|
type AssignmentUpsertParams as AssignmentUpsertParams,
|
|
70
79
|
};
|
|
80
|
+
|
|
81
|
+
export {
|
|
82
|
+
Governance as Governance,
|
|
83
|
+
type GovernanceListResponse as GovernanceListResponse,
|
|
84
|
+
type GovernanceListResponsesMyCursorIDPage as GovernanceListResponsesMyCursorIDPage,
|
|
85
|
+
type GovernanceListParams as GovernanceListParams,
|
|
86
|
+
};
|
|
71
87
|
}
|