@openmeter/client 1.0.0-beta.232 → 1.0.0-beta.234
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/README.md +112 -43
- package/dist/funcs/apps.js +7 -2
- package/dist/funcs/billing.js +7 -2
- package/dist/funcs/charges.d.ts +14 -0
- package/dist/funcs/charges.js +42 -0
- package/dist/funcs/customers.d.ts +112 -1
- package/dist/funcs/customers.js +430 -0
- package/dist/funcs/{governance.d.ts → entitlementAccess.d.ts} +4 -4
- package/dist/funcs/{governance.js → entitlementAccess.js} +10 -10
- package/dist/funcs/entitlements.d.ts +46 -1
- package/dist/funcs/entitlements.js +213 -1
- package/dist/funcs/grants.d.ts +24 -0
- package/dist/funcs/grants.js +78 -0
- package/dist/funcs/index.d.ts +4 -1
- package/dist/funcs/index.js +4 -1
- package/dist/funcs/notifications.d.ts +43 -0
- package/dist/funcs/notifications.js +163 -0
- package/dist/funcs/planAddons.js +7 -2
- package/dist/funcs/subscriptions.d.ts +60 -1
- package/dist/funcs/subscriptions.js +204 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/wire.js +62 -6
- package/dist/models/operations/apps.d.ts +17 -1
- package/dist/models/operations/billing.d.ts +19 -1
- package/dist/models/operations/charges.d.ts +54 -0
- package/dist/models/operations/customers.d.ts +127 -5
- package/dist/models/operations/entitlementAccess.d.ts +9 -0
- package/dist/models/operations/entitlementAccess.js +2 -0
- package/dist/models/operations/entitlements.d.ts +73 -1
- package/dist/models/operations/grants.d.ts +43 -0
- package/dist/models/operations/grants.js +2 -0
- package/dist/models/operations/notifications.d.ts +46 -0
- package/dist/models/operations/notifications.js +2 -0
- package/dist/models/operations/planAddons.d.ts +14 -1
- package/dist/models/operations/subscriptions.d.ts +27 -3
- package/dist/models/schemas.d.ts +51330 -23237
- package/dist/models/schemas.js +4837 -1735
- package/dist/models/types.d.ts +4758 -1592
- package/dist/sdk/apps.d.ts +2 -44
- package/dist/sdk/apps.js +1 -53
- package/dist/sdk/customers.d.ts +2 -56
- package/dist/sdk/customers.js +1 -67
- package/dist/sdk/internal.d.ts +491 -28
- package/dist/sdk/internal.js +607 -30
- package/dist/sdk/invoices.d.ts +112 -0
- package/dist/sdk/invoices.js +115 -0
- package/dist/sdk/notifications.d.ts +58 -0
- package/dist/sdk/notifications.js +72 -0
- package/dist/sdk/planAddons.d.ts +1 -20
- package/dist/sdk/planAddons.js +1 -24
- package/dist/sdk/sdk.d.ts +3 -0
- package/dist/sdk/sdk.js +5 -0
- package/dist/sdk/subscriptions.d.ts +12 -1
- package/dist/sdk/subscriptions.js +14 -1
- package/package.json +1 -1
- package/dist/models/operations/governance.d.ts +0 -9
- /package/dist/models/operations/{governance.js → charges.js} +0 -0
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
3
|
+
import type { CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
|
+
import type { GetCustomerEntitlementAccessRequest, GetCustomerEntitlementAccessResponse, GetCustomerEntitlementValueByFeatureKeyRequest, GetCustomerEntitlementValueByFeatureKeyResponse, ListEntitlementsRequest, ListEntitlementsResponse, GetEntitlementRequest, GetEntitlementResponse, GetCustomerEntitlementValueRequest, GetCustomerEntitlementValueResponse } from '../models/operations/entitlements.js';
|
|
5
|
+
import type { ListGrantsRequest, ListGrantsResponse, VoidGrantRequest, VoidGrantResponse } from '../models/operations/grants.js';
|
|
6
|
+
import type { UnscheduleSubscriptionRequest, UnscheduleSubscriptionResponse, RestoreSubscriptionRequest, RestoreSubscriptionResponse, MigrateSubscriptionRequest, MigrateSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
|
|
7
|
+
import type { UninstallAppRequest, UninstallAppResponse, UpdateAppRequest, UpdateAppResponse, ListAppCatalogRequest, ListAppCatalogResponse, GetAppCatalogItemRequest, GetAppCatalogItemResponse, InstallAppRequest, InstallAppResponse } from '../models/operations/apps.js';
|
|
5
8
|
import type { ListInvoicesRequest, ListInvoicesResponse, GetInvoiceRequest, GetInvoiceResponse, UpdateInvoiceRequest, UpdateInvoiceResponse, DeleteInvoiceRequest, DeleteInvoiceResponse, AdvanceInvoiceRequest, AdvanceInvoiceResponse, ApproveInvoiceRequest, ApproveInvoiceResponse, RetryInvoiceRequest, RetryInvoiceResponse, SnapshotQuantitiesInvoiceRequest, SnapshotQuantitiesInvoiceResponse } from '../models/operations/invoices.js';
|
|
9
|
+
import type { ListChargesRequest, ListChargesResponse } from '../models/operations/charges.js';
|
|
6
10
|
import type { ListCurrenciesRequest, ListCurrenciesResponse, CreateCustomCurrencyRequest, CreateCustomCurrencyResponse, GetCustomCurrencyRequest, GetCustomCurrencyResponse, ListCostBasesRequest, ListCostBasesResponse, CreateCostBasisRequest, CreateCostBasisResponse } from '../models/operations/currencies.js';
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
11
|
+
import type { ListPlanAddonsRequest, ListPlanAddonsResponse } from '../models/operations/planAddons.js';
|
|
12
|
+
import type { QueryEntitlementAccessRequest, QueryEntitlementAccessResponse } from '../models/operations/entitlementAccess.js';
|
|
13
|
+
import type { ListNotificationChannelsRequest, ListNotificationChannelsResponse, CreateNotificationChannelRequest, CreateNotificationChannelResponse, GetNotificationChannelRequest, GetNotificationChannelResponse, UpdateNotificationChannelRequest, UpdateNotificationChannelResponse, DeleteNotificationChannelRequest, DeleteNotificationChannelResponse } from '../models/operations/notifications.js';
|
|
14
|
+
import type { AppCatalogItem, Charge, CostBasis, Currency, Entitlement, EntitlementGrant, Invoice, NotificationChannel, PlanAddon } from '../models/types.js';
|
|
9
15
|
/**
|
|
10
16
|
* Operations marked internal in the API definition. They are not part of
|
|
11
17
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -14,58 +20,411 @@ import type { App, AppCatalogItem, CostBasis, Currency, Invoice } from '../model
|
|
|
14
20
|
export declare class Internal {
|
|
15
21
|
private readonly _client;
|
|
16
22
|
constructor(_client: Client);
|
|
23
|
+
private _customers?;
|
|
24
|
+
get customers(): InternalCustomers;
|
|
25
|
+
private _entitlements?;
|
|
26
|
+
get entitlements(): InternalEntitlements;
|
|
27
|
+
private _grants?;
|
|
28
|
+
get grants(): InternalGrants;
|
|
17
29
|
private _subscriptions?;
|
|
18
30
|
get subscriptions(): InternalSubscriptions;
|
|
19
31
|
private _apps?;
|
|
20
32
|
get apps(): InternalApps;
|
|
21
33
|
private _invoices?;
|
|
22
34
|
get invoices(): InternalInvoices;
|
|
35
|
+
private _charges?;
|
|
36
|
+
get charges(): InternalCharges;
|
|
23
37
|
private _currencies?;
|
|
24
38
|
get currencies(): InternalCurrencies;
|
|
25
|
-
private
|
|
26
|
-
get
|
|
39
|
+
private _planAddons?;
|
|
40
|
+
get planAddons(): InternalPlanAddons;
|
|
41
|
+
private _entitlementAccess?;
|
|
42
|
+
get entitlementAccess(): InternalEntitlementAccess;
|
|
43
|
+
private _notifications?;
|
|
44
|
+
get notifications(): InternalNotifications;
|
|
27
45
|
}
|
|
28
|
-
export declare class
|
|
46
|
+
export declare class InternalCustomers {
|
|
47
|
+
private readonly _client;
|
|
48
|
+
constructor(_client: Client);
|
|
49
|
+
private _entitlements?;
|
|
50
|
+
get entitlements(): InternalCustomersEntitlements;
|
|
51
|
+
private _credits?;
|
|
52
|
+
get credits(): InternalCustomersCredits;
|
|
53
|
+
private _charges?;
|
|
54
|
+
get charges(): InternalCustomersCharges;
|
|
55
|
+
}
|
|
56
|
+
export declare class InternalCustomersEntitlements {
|
|
29
57
|
private readonly _client;
|
|
30
58
|
constructor(_client: Client);
|
|
31
59
|
/**
|
|
32
|
-
* Create
|
|
60
|
+
* Create customer entitlement
|
|
33
61
|
*
|
|
34
|
-
*
|
|
62
|
+
* Create an entitlement for the customer.
|
|
35
63
|
*
|
|
36
|
-
*
|
|
64
|
+
* A customer can have only one active entitlement per feature. The feature must be
|
|
65
|
+
* compatible with the entitlement type. Entitlements cannot be modified after
|
|
66
|
+
* creation, only deleted.
|
|
67
|
+
*
|
|
68
|
+
* POST /openmeter/customers/{customerId}/entitlements
|
|
37
69
|
*/
|
|
38
|
-
|
|
70
|
+
create(request: CreateCustomerEntitlementRequest, options?: RequestOptions): Promise<CreateCustomerEntitlementResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Override customer entitlement
|
|
73
|
+
*
|
|
74
|
+
* Override an entitlement of the customer with a new one.
|
|
75
|
+
*
|
|
76
|
+
* The referenced entitlement ends and the new one starts at the same instant, so
|
|
77
|
+
* access continues without a gap. Both must belong to the same feature. Use this
|
|
78
|
+
* for upgrades and downgrades.
|
|
79
|
+
*
|
|
80
|
+
* Fails if the referenced entitlement does not exist, is deleted, or is no longer
|
|
81
|
+
* active.
|
|
82
|
+
*
|
|
83
|
+
* PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override
|
|
84
|
+
*/
|
|
85
|
+
override(request: OverrideCustomerEntitlementRequest, options?: RequestOptions): Promise<OverrideCustomerEntitlementResponse>;
|
|
86
|
+
/**
|
|
87
|
+
* Get customer entitlement history
|
|
88
|
+
*
|
|
89
|
+
* Get the balance and usage history of a metered entitlement. The queried range
|
|
90
|
+
* may span multiple usage periods.
|
|
91
|
+
*
|
|
92
|
+
* `windowed_history` groups usage into windows of the requested size and reports
|
|
93
|
+
* the balance at the start of each window. `burndown_history` lists the periods in
|
|
94
|
+
* which grants were consumed in a fixed order, together with the usage taken from
|
|
95
|
+
* each grant.
|
|
96
|
+
*
|
|
97
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history
|
|
98
|
+
*/
|
|
99
|
+
getHistory(request: GetCustomerEntitlementHistoryRequest, options?: RequestOptions): Promise<GetCustomerEntitlementHistoryResponse>;
|
|
100
|
+
/**
|
|
101
|
+
* Get customer entitlement
|
|
102
|
+
*
|
|
103
|
+
* Get an entitlement of the customer by ID. For checking entitlement access, use
|
|
104
|
+
* the entitlement access endpoints instead.
|
|
105
|
+
*
|
|
106
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}
|
|
107
|
+
*/
|
|
108
|
+
get(request: GetCustomerEntitlementRequest, options?: RequestOptions): Promise<GetCustomerEntitlementResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* List customer entitlements
|
|
111
|
+
*
|
|
112
|
+
* List the entitlements of the customer that are active at the time of the
|
|
113
|
+
* request. For checking entitlement access, use the entitlement access endpoints
|
|
114
|
+
* instead.
|
|
115
|
+
*
|
|
116
|
+
* GET /openmeter/customers/{customerId}/entitlements
|
|
117
|
+
*/
|
|
118
|
+
list(request: ListCustomerEntitlementsRequest, options?: RequestOptions): Promise<ListCustomerEntitlementsResponse>;
|
|
119
|
+
/**
|
|
120
|
+
* List customer entitlements
|
|
121
|
+
*
|
|
122
|
+
* List the entitlements of the customer that are active at the time of the
|
|
123
|
+
* request. For checking entitlement access, use the entitlement access endpoints
|
|
124
|
+
* instead.
|
|
125
|
+
*
|
|
126
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
127
|
+
*
|
|
128
|
+
* GET /openmeter/customers/{customerId}/entitlements
|
|
129
|
+
*/
|
|
130
|
+
listAll(request: ListCustomerEntitlementsRequest, options?: RequestOptions): AsyncIterable<Entitlement>;
|
|
131
|
+
/**
|
|
132
|
+
* Reset customer entitlement usage
|
|
133
|
+
*
|
|
134
|
+
* Reset the usage of a metered entitlement. The reset starts a new usage period:
|
|
135
|
+
* usage is zeroed and grants roll over according to their rollover settings.
|
|
136
|
+
*
|
|
137
|
+
* Usage is reset automatically at the end of each usage period. Use this operation
|
|
138
|
+
* to reset it earlier, for example to align the entitlement with the customer's
|
|
139
|
+
* billing period. The usage period anchor can be moved at the same time.
|
|
140
|
+
*
|
|
141
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
|
|
142
|
+
*/
|
|
143
|
+
resetUsage(request: ResetCustomerEntitlementUsageRequest, options?: RequestOptions): Promise<ResetCustomerEntitlementUsageResponse>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete customer entitlement
|
|
146
|
+
*
|
|
147
|
+
* Deletes the entitlement and revokes access to its feature. A customer can hold
|
|
148
|
+
* only one active entitlement per feature, so migrating a feature requires
|
|
149
|
+
* deleting the previous entitlement first.
|
|
150
|
+
*
|
|
151
|
+
* Deletion sets the `deleted_at` timestamp instead of removing history. Access and
|
|
152
|
+
* status queries for earlier points in time still treat the entitlement as active,
|
|
153
|
+
* so access changes are never retroactive.
|
|
154
|
+
*
|
|
155
|
+
* DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}
|
|
156
|
+
*/
|
|
157
|
+
delete(request: DeleteCustomerEntitlementRequest, options?: RequestOptions): Promise<DeleteCustomerEntitlementResponse>;
|
|
158
|
+
private _grants?;
|
|
159
|
+
get grants(): InternalCustomersEntitlementsGrants;
|
|
39
160
|
}
|
|
40
|
-
export declare class
|
|
161
|
+
export declare class InternalCustomersEntitlementsGrants {
|
|
41
162
|
private readonly _client;
|
|
42
163
|
constructor(_client: Client);
|
|
43
164
|
/**
|
|
44
|
-
*
|
|
165
|
+
* Create customer entitlement grant
|
|
45
166
|
*
|
|
46
|
-
*
|
|
167
|
+
* Issue a grant for a metered entitlement of the customer. Boolean and static
|
|
168
|
+
* entitlements cannot have grants, so the request is rejected for them.
|
|
47
169
|
*
|
|
48
|
-
*
|
|
170
|
+
* Grants are immutable. The amount is added to the balance from `effective_at`,
|
|
171
|
+
* which cannot be earlier than the start of the current usage period.
|
|
172
|
+
*
|
|
173
|
+
* POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
49
174
|
*/
|
|
50
|
-
|
|
175
|
+
create(request: CreateCustomerEntitlementGrantRequest, options?: RequestOptions): Promise<CreateCustomerEntitlementGrantResponse>;
|
|
51
176
|
/**
|
|
52
|
-
* List
|
|
177
|
+
* List customer entitlement grants
|
|
178
|
+
*
|
|
179
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
180
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
53
181
|
*
|
|
54
|
-
*
|
|
182
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
183
|
+
* grants are always included, as they are part of the balance history.
|
|
184
|
+
*
|
|
185
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
186
|
+
*/
|
|
187
|
+
list(request: ListCustomerEntitlementGrantsRequest, options?: RequestOptions): Promise<ListCustomerEntitlementGrantsResponse>;
|
|
188
|
+
/**
|
|
189
|
+
* List customer entitlement grants
|
|
190
|
+
*
|
|
191
|
+
* List the grants issued for an entitlement of the customer. Grants only exist for
|
|
192
|
+
* metered entitlements, so the list is empty for boolean and static entitlements.
|
|
193
|
+
*
|
|
194
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
195
|
+
* grants are always included, as they are part of the balance history.
|
|
55
196
|
*
|
|
56
197
|
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
57
198
|
*
|
|
58
|
-
* GET /openmeter/
|
|
199
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
|
|
59
200
|
*/
|
|
60
|
-
listAll(request
|
|
201
|
+
listAll(request: ListCustomerEntitlementGrantsRequest, options?: RequestOptions): AsyncIterable<EntitlementGrant>;
|
|
202
|
+
}
|
|
203
|
+
export declare class InternalCustomersCredits {
|
|
204
|
+
private readonly _client;
|
|
205
|
+
constructor(_client: Client);
|
|
206
|
+
private _grants?;
|
|
207
|
+
get grants(): InternalCustomersCreditsGrants;
|
|
208
|
+
}
|
|
209
|
+
export declare class InternalCustomersCreditsGrants {
|
|
210
|
+
private readonly _client;
|
|
211
|
+
constructor(_client: Client);
|
|
212
|
+
/**
|
|
213
|
+
* Void credit grant
|
|
214
|
+
*
|
|
215
|
+
* Void a credit grant, forfeiting the remaining unused balance.
|
|
216
|
+
*
|
|
217
|
+
* Voiding is a forward-looking, irreversible operation. Credits already consumed
|
|
218
|
+
* by usage remain unaffected — only the remaining balance is forfeited. The grant
|
|
219
|
+
* reads as `voided` status afterwards. Payment state is not adjusted when
|
|
220
|
+
* `payment_adjustment` is `none`, so invoice-backed or externally collected
|
|
221
|
+
* payments may still collect the original amount. Only `active` grants can be
|
|
222
|
+
* voided; voiding a pending, expired, or fully consumed grant returns a conflict.
|
|
223
|
+
* Retrying a successful void is an idempotent success.
|
|
224
|
+
*
|
|
225
|
+
* POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void
|
|
226
|
+
*/
|
|
227
|
+
void(request: VoidCreditGrantRequest, options?: RequestOptions): Promise<VoidCreditGrantResponse>;
|
|
228
|
+
}
|
|
229
|
+
export declare class InternalCustomersCharges {
|
|
230
|
+
private readonly _client;
|
|
231
|
+
constructor(_client: Client);
|
|
61
232
|
/**
|
|
62
|
-
*
|
|
233
|
+
* List customer charges
|
|
234
|
+
*
|
|
235
|
+
* List customer charges.
|
|
63
236
|
*
|
|
64
|
-
*
|
|
237
|
+
* Returns the customer's charges that are represented as either flat fee or
|
|
238
|
+
* usage-based charges.
|
|
65
239
|
*
|
|
66
|
-
* GET /openmeter/
|
|
240
|
+
* GET /openmeter/customers/{customerId}/charges
|
|
67
241
|
*/
|
|
68
|
-
|
|
242
|
+
list(request: ListCustomerChargesRequest, options?: RequestOptions): Promise<ListCustomerChargesResponse>;
|
|
243
|
+
/**
|
|
244
|
+
* List customer charges
|
|
245
|
+
*
|
|
246
|
+
* List customer charges.
|
|
247
|
+
*
|
|
248
|
+
* Returns the customer's charges that are represented as either flat fee or
|
|
249
|
+
* usage-based charges.
|
|
250
|
+
*
|
|
251
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
252
|
+
*
|
|
253
|
+
* GET /openmeter/customers/{customerId}/charges
|
|
254
|
+
*/
|
|
255
|
+
listAll(request: ListCustomerChargesRequest, options?: RequestOptions): AsyncIterable<Charge>;
|
|
256
|
+
/**
|
|
257
|
+
* Create customer charge
|
|
258
|
+
*
|
|
259
|
+
* Create customer charge.
|
|
260
|
+
*
|
|
261
|
+
* POST /openmeter/customers/{customerId}/charges
|
|
262
|
+
*/
|
|
263
|
+
create(request: CreateCustomerChargesRequest, options?: RequestOptions): Promise<CreateCustomerChargesResponse>;
|
|
264
|
+
}
|
|
265
|
+
export declare class InternalEntitlements {
|
|
266
|
+
private readonly _client;
|
|
267
|
+
constructor(_client: Client);
|
|
268
|
+
/**
|
|
269
|
+
* Get customer entitlement access
|
|
270
|
+
*
|
|
271
|
+
* Get the customer's access to a single feature.
|
|
272
|
+
*
|
|
273
|
+
* GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
|
|
274
|
+
*/
|
|
275
|
+
getCustomerAccess(request: GetCustomerEntitlementAccessRequest, options?: RequestOptions): Promise<GetCustomerEntitlementAccessResponse>;
|
|
276
|
+
/**
|
|
277
|
+
* Get customer entitlement value by feature key
|
|
278
|
+
*
|
|
279
|
+
* Get the customer's entitlement value for a feature at a point in time. Without
|
|
280
|
+
* an active entitlement, the result denies access and omits the type.
|
|
281
|
+
*
|
|
282
|
+
* GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value
|
|
283
|
+
*/
|
|
284
|
+
getCustomerValueByFeatureKey(request: GetCustomerEntitlementValueByFeatureKeyRequest, options?: RequestOptions): Promise<GetCustomerEntitlementValueByFeatureKeyResponse>;
|
|
285
|
+
/**
|
|
286
|
+
* List entitlements
|
|
287
|
+
*
|
|
288
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
289
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
290
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
291
|
+
*
|
|
292
|
+
* GET /openmeter/entitlements
|
|
293
|
+
*/
|
|
294
|
+
list(request?: ListEntitlementsRequest, options?: RequestOptions): Promise<ListEntitlementsResponse>;
|
|
295
|
+
/**
|
|
296
|
+
* List entitlements
|
|
297
|
+
*
|
|
298
|
+
* List the active entitlements of all customers. Intended for administrative use.
|
|
299
|
+
* To list the entitlements of a single customer, use the customer entitlements
|
|
300
|
+
* endpoints; to check entitlement access, use the entitlement access endpoints.
|
|
301
|
+
*
|
|
302
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
303
|
+
*
|
|
304
|
+
* GET /openmeter/entitlements
|
|
305
|
+
*/
|
|
306
|
+
listAll(request?: ListEntitlementsRequest, options?: RequestOptions): AsyncIterable<Entitlement>;
|
|
307
|
+
/**
|
|
308
|
+
* Get entitlement
|
|
309
|
+
*
|
|
310
|
+
* Get an entitlement by ID. To check entitlement access, use the entitlement
|
|
311
|
+
* access endpoints instead.
|
|
312
|
+
*
|
|
313
|
+
* GET /openmeter/entitlements/{entitlementId}
|
|
314
|
+
*/
|
|
315
|
+
get(request: GetEntitlementRequest, options?: RequestOptions): Promise<GetEntitlementResponse>;
|
|
316
|
+
/**
|
|
317
|
+
* Get customer entitlement value
|
|
318
|
+
*
|
|
319
|
+
* Get the customer's access through a single entitlement, optionally evaluated at
|
|
320
|
+
* a point in time.
|
|
321
|
+
*
|
|
322
|
+
* GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
|
|
323
|
+
*/
|
|
324
|
+
getCustomerValue(request: GetCustomerEntitlementValueRequest, options?: RequestOptions): Promise<GetCustomerEntitlementValueResponse>;
|
|
325
|
+
}
|
|
326
|
+
export declare class InternalGrants {
|
|
327
|
+
private readonly _client;
|
|
328
|
+
constructor(_client: Client);
|
|
329
|
+
/**
|
|
330
|
+
* List grants
|
|
331
|
+
*
|
|
332
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
333
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
334
|
+
*
|
|
335
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
336
|
+
* grants are always included, as they are part of the balance history.
|
|
337
|
+
*
|
|
338
|
+
* GET /openmeter/grants
|
|
339
|
+
*/
|
|
340
|
+
list(request?: ListGrantsRequest, options?: RequestOptions): Promise<ListGrantsResponse>;
|
|
341
|
+
/**
|
|
342
|
+
* List grants
|
|
343
|
+
*
|
|
344
|
+
* List the grants of all customers and entitlements. To list the grants of a
|
|
345
|
+
* single entitlement, use the customer entitlement grants endpoint.
|
|
346
|
+
*
|
|
347
|
+
* Deleted grants are excluded unless `include_deleted` is set. Voided and expired
|
|
348
|
+
* grants are always included, as they are part of the balance history.
|
|
349
|
+
*
|
|
350
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
351
|
+
*
|
|
352
|
+
* GET /openmeter/grants
|
|
353
|
+
*/
|
|
354
|
+
listAll(request?: ListGrantsRequest, options?: RequestOptions): AsyncIterable<EntitlementGrant>;
|
|
355
|
+
/**
|
|
356
|
+
* Void grant
|
|
357
|
+
*
|
|
358
|
+
* Void a grant so it no longer adds to the balance. Usage already deducted from
|
|
359
|
+
* the grant is kept.
|
|
360
|
+
*
|
|
361
|
+
* DELETE /openmeter/grants/{grantId}
|
|
362
|
+
*/
|
|
363
|
+
void(request: VoidGrantRequest, options?: RequestOptions): Promise<VoidGrantResponse>;
|
|
364
|
+
}
|
|
365
|
+
export declare class InternalSubscriptions {
|
|
366
|
+
private readonly _client;
|
|
367
|
+
constructor(_client: Client);
|
|
368
|
+
/**
|
|
369
|
+
* Unschedule subscription
|
|
370
|
+
*
|
|
371
|
+
* Deletes a scheduled subscription that has not yet become active, removing it and
|
|
372
|
+
* resolving any scheduling conflict it was holding. This is distinct from
|
|
373
|
+
* canceling: cancel ends a running subscription, whereas unscheduling removes a
|
|
374
|
+
* not-yet-active one. Only scheduled subscriptions can be unscheduled;
|
|
375
|
+
* unscheduling an active or already-started subscription is rejected.
|
|
376
|
+
*
|
|
377
|
+
* POST /openmeter/subscriptions/{subscriptionId}/unschedule
|
|
378
|
+
*/
|
|
379
|
+
unschedule(request: UnscheduleSubscriptionRequest, options?: RequestOptions): Promise<UnscheduleSubscriptionResponse>;
|
|
380
|
+
/**
|
|
381
|
+
* Restore subscription
|
|
382
|
+
*
|
|
383
|
+
* Restores the subscription by deleting any later-scheduled successor
|
|
384
|
+
* subscriptions and continuing this one indefinitely. This is the inverse of a
|
|
385
|
+
* future-dated change, which schedules a successor. Restore is not available when
|
|
386
|
+
* multi-subscription is enabled.
|
|
387
|
+
*
|
|
388
|
+
* POST /openmeter/subscriptions/{subscriptionId}/restore
|
|
389
|
+
*/
|
|
390
|
+
restore(request: RestoreSubscriptionRequest, options?: RequestOptions): Promise<RestoreSubscriptionResponse>;
|
|
391
|
+
/**
|
|
392
|
+
* Migrate subscription
|
|
393
|
+
*
|
|
394
|
+
* Migrates to a later version of the current plan. With starting_phase omitted and
|
|
395
|
+
* billing_anchor omitted or unchanged, migration amends the subscription in place:
|
|
396
|
+
* unchanged items retain their service periods and both response entries have the
|
|
397
|
+
* same ID. Existing addons must remain compatible with the target plan.
|
|
398
|
+
* Incompatible phase timelines or billing settings return an error. Providing
|
|
399
|
+
* starting_phase or a different billing_anchor explicitly requests replacement,
|
|
400
|
+
* which resets the phase timeline, may produce billing adjustments, and does not
|
|
401
|
+
* transfer addons. Custom subscriptions cannot be migrated.
|
|
402
|
+
*
|
|
403
|
+
* POST /openmeter/subscriptions/{subscriptionId}/migrate
|
|
404
|
+
*/
|
|
405
|
+
migrate(request: MigrateSubscriptionRequest, options?: RequestOptions): Promise<MigrateSubscriptionResponse>;
|
|
406
|
+
/**
|
|
407
|
+
* Create a new subscription add-on
|
|
408
|
+
*
|
|
409
|
+
* Add add-on to a subscription.
|
|
410
|
+
*
|
|
411
|
+
* POST /openmeter/subscriptions/{subscriptionId}/addons
|
|
412
|
+
*/
|
|
413
|
+
createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
|
|
414
|
+
/**
|
|
415
|
+
* Update subscription addon
|
|
416
|
+
*
|
|
417
|
+
* Update a subscription add-on. Only the quantity is mutable; the timing controls
|
|
418
|
+
* when the new quantity takes effect. A new entry is appended to the add-on's
|
|
419
|
+
* timeline.
|
|
420
|
+
*
|
|
421
|
+
* PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
|
|
422
|
+
*/
|
|
423
|
+
updateAddon(request: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise<UpdateSubscriptionAddonResponse>;
|
|
424
|
+
}
|
|
425
|
+
export declare class InternalApps {
|
|
426
|
+
private readonly _client;
|
|
427
|
+
constructor(_client: Client);
|
|
69
428
|
/**
|
|
70
429
|
* Uninstall app
|
|
71
430
|
*
|
|
@@ -240,6 +599,34 @@ export declare class InternalInvoices {
|
|
|
240
599
|
*/
|
|
241
600
|
snapshotQuantities(request: SnapshotQuantitiesInvoiceRequest, options?: RequestOptions): Promise<SnapshotQuantitiesInvoiceResponse>;
|
|
242
601
|
}
|
|
602
|
+
export declare class InternalCharges {
|
|
603
|
+
private readonly _client;
|
|
604
|
+
constructor(_client: Client);
|
|
605
|
+
/**
|
|
606
|
+
* List charges
|
|
607
|
+
*
|
|
608
|
+
* List charges.
|
|
609
|
+
*
|
|
610
|
+
* Returns the charges of every customer that are represented as either flat fee or
|
|
611
|
+
* usage-based charges.
|
|
612
|
+
*
|
|
613
|
+
* GET /openmeter/charges
|
|
614
|
+
*/
|
|
615
|
+
list(request?: ListChargesRequest, options?: RequestOptions): Promise<ListChargesResponse>;
|
|
616
|
+
/**
|
|
617
|
+
* List charges
|
|
618
|
+
*
|
|
619
|
+
* List charges.
|
|
620
|
+
*
|
|
621
|
+
* Returns the charges of every customer that are represented as either flat fee or
|
|
622
|
+
* usage-based charges.
|
|
623
|
+
*
|
|
624
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
625
|
+
*
|
|
626
|
+
* GET /openmeter/charges
|
|
627
|
+
*/
|
|
628
|
+
listAll(request?: ListChargesRequest, options?: RequestOptions): AsyncIterable<Charge>;
|
|
629
|
+
}
|
|
243
630
|
export declare class InternalCurrencies {
|
|
244
631
|
private readonly _client;
|
|
245
632
|
constructor(_client: Client);
|
|
@@ -307,11 +694,33 @@ export declare class InternalCurrencies {
|
|
|
307
694
|
*/
|
|
308
695
|
createCostBasis(request: CreateCostBasisRequest, options?: RequestOptions): Promise<CreateCostBasisResponse>;
|
|
309
696
|
}
|
|
310
|
-
export declare class
|
|
697
|
+
export declare class InternalPlanAddons {
|
|
311
698
|
private readonly _client;
|
|
312
699
|
constructor(_client: Client);
|
|
313
700
|
/**
|
|
314
|
-
*
|
|
701
|
+
* List add-ons for plan
|
|
702
|
+
*
|
|
703
|
+
* List add-ons associated with a plan.
|
|
704
|
+
*
|
|
705
|
+
* GET /openmeter/plans/{planId}/addons
|
|
706
|
+
*/
|
|
707
|
+
list(request: ListPlanAddonsRequest, options?: RequestOptions): Promise<ListPlanAddonsResponse>;
|
|
708
|
+
/**
|
|
709
|
+
* List add-ons for plan
|
|
710
|
+
*
|
|
711
|
+
* List add-ons associated with a plan.
|
|
712
|
+
*
|
|
713
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
714
|
+
*
|
|
715
|
+
* GET /openmeter/plans/{planId}/addons
|
|
716
|
+
*/
|
|
717
|
+
listAll(request: ListPlanAddonsRequest, options?: RequestOptions): AsyncIterable<PlanAddon>;
|
|
718
|
+
}
|
|
719
|
+
export declare class InternalEntitlementAccess {
|
|
720
|
+
private readonly _client;
|
|
721
|
+
constructor(_client: Client);
|
|
722
|
+
/**
|
|
723
|
+
* Query entitlement access
|
|
315
724
|
*
|
|
316
725
|
* Query feature access for a list of customers.
|
|
317
726
|
*
|
|
@@ -322,7 +731,61 @@ export declare class InternalGovernance {
|
|
|
322
731
|
* _Designed to be called on a fixed refresh interval and the query response is
|
|
323
732
|
* intended to be cached._
|
|
324
733
|
*
|
|
325
|
-
* POST /openmeter/
|
|
734
|
+
* POST /openmeter/entitlement-access/query
|
|
735
|
+
*/
|
|
736
|
+
query(request: QueryEntitlementAccessRequest, options?: RequestOptions): Promise<QueryEntitlementAccessResponse>;
|
|
737
|
+
}
|
|
738
|
+
export declare class InternalNotifications {
|
|
739
|
+
private readonly _client;
|
|
740
|
+
constructor(_client: Client);
|
|
741
|
+
/**
|
|
742
|
+
* List notification channels
|
|
743
|
+
*
|
|
744
|
+
* List all notification channels.
|
|
745
|
+
*
|
|
746
|
+
* GET /openmeter/notification/channels
|
|
747
|
+
*/
|
|
748
|
+
listChannels(request?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<ListNotificationChannelsResponse>;
|
|
749
|
+
/**
|
|
750
|
+
* List notification channels
|
|
751
|
+
*
|
|
752
|
+
* List all notification channels.
|
|
753
|
+
*
|
|
754
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
755
|
+
*
|
|
756
|
+
* GET /openmeter/notification/channels
|
|
757
|
+
*/
|
|
758
|
+
listChannelsAll(request?: ListNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
|
|
759
|
+
/**
|
|
760
|
+
* Create notification channel
|
|
761
|
+
*
|
|
762
|
+
* Create a notification channel.
|
|
763
|
+
*
|
|
764
|
+
* POST /openmeter/notification/channels
|
|
765
|
+
*/
|
|
766
|
+
createChannel(request: CreateNotificationChannelRequest, options?: RequestOptions): Promise<CreateNotificationChannelResponse>;
|
|
767
|
+
/**
|
|
768
|
+
* Get notification channel
|
|
769
|
+
*
|
|
770
|
+
* Get a notification channel by id.
|
|
771
|
+
*
|
|
772
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
773
|
+
*/
|
|
774
|
+
getChannel(request: GetNotificationChannelRequest, options?: RequestOptions): Promise<GetNotificationChannelResponse>;
|
|
775
|
+
/**
|
|
776
|
+
* Update notification channel
|
|
777
|
+
*
|
|
778
|
+
* Update a notification channel by id.
|
|
779
|
+
*
|
|
780
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
781
|
+
*/
|
|
782
|
+
updateChannel(request: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<UpdateNotificationChannelResponse>;
|
|
783
|
+
/**
|
|
784
|
+
* Delete notification channel
|
|
785
|
+
*
|
|
786
|
+
* Delete a notification channel by id.
|
|
787
|
+
*
|
|
788
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
326
789
|
*/
|
|
327
|
-
|
|
790
|
+
deleteChannel(request: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<DeleteNotificationChannelResponse>;
|
|
328
791
|
}
|