@openmeter/client 1.0.0-beta.233 → 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.
@@ -1,14 +1,17 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { unwrap } from '../lib/types.js';
3
3
  import { paginatePages } from '../lib/paginate.js';
4
- import { voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
5
- import { unscheduleSubscription, restoreSubscription, migrateSubscription, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
6
- import { listApps, uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
4
+ import { createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, voidCreditGrant, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
5
+ import { getCustomerEntitlementAccess, getCustomerEntitlementValueByFeatureKey, listEntitlements, getEntitlement, getCustomerEntitlementValue, } from '../funcs/entitlements.js';
6
+ import { listGrants, voidGrant } from '../funcs/grants.js';
7
+ import { unscheduleSubscription, restoreSubscription, migrateSubscription, createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
8
+ import { uninstallApp, updateApp, listAppCatalog, getAppCatalogItem, installApp, } from '../funcs/apps.js';
7
9
  import { listInvoices, getInvoice, updateInvoice, deleteInvoice, advanceInvoice, approveInvoice, retryInvoice, snapshotQuantitiesInvoice, } from '../funcs/invoices.js';
8
10
  import { listCharges } from '../funcs/charges.js';
9
11
  import { listCurrencies, createCustomCurrency, getCustomCurrency, listCostBases, createCostBasis, } from '../funcs/currencies.js';
10
12
  import { listPlanAddons } from '../funcs/planAddons.js';
11
13
  import { queryEntitlementAccess } from '../funcs/entitlementAccess.js';
14
+ import { listNotificationChannels, createNotificationChannel, getNotificationChannel, updateNotificationChannel, deleteNotificationChannel, } from '../funcs/notifications.js';
12
15
  /**
13
16
  * Operations marked internal in the API definition. They are not part of
14
17
  * the customer surface: they may require additional permissions, and they
@@ -23,6 +26,14 @@ export class Internal {
23
26
  get customers() {
24
27
  return (this._customers ??= new InternalCustomers(this._client));
25
28
  }
29
+ _entitlements;
30
+ get entitlements() {
31
+ return (this._entitlements ??= new InternalEntitlements(this._client));
32
+ }
33
+ _grants;
34
+ get grants() {
35
+ return (this._grants ??= new InternalGrants(this._client));
36
+ }
26
37
  _subscriptions;
27
38
  get subscriptions() {
28
39
  return (this._subscriptions ??= new InternalSubscriptions(this._client));
@@ -51,12 +62,20 @@ export class Internal {
51
62
  get entitlementAccess() {
52
63
  return (this._entitlementAccess ??= new InternalEntitlementAccess(this._client));
53
64
  }
65
+ _notifications;
66
+ get notifications() {
67
+ return (this._notifications ??= new InternalNotifications(this._client));
68
+ }
54
69
  }
55
70
  export class InternalCustomers {
56
71
  _client;
57
72
  constructor(_client) {
58
73
  this._client = _client;
59
74
  }
75
+ _entitlements;
76
+ get entitlements() {
77
+ return (this._entitlements ??= new InternalCustomersEntitlements(this._client));
78
+ }
60
79
  _credits;
61
80
  get credits() {
62
81
  return (this._credits ??= new InternalCustomersCredits(this._client));
@@ -66,6 +85,181 @@ export class InternalCustomers {
66
85
  return (this._charges ??= new InternalCustomersCharges(this._client));
67
86
  }
68
87
  }
88
+ export class InternalCustomersEntitlements {
89
+ _client;
90
+ constructor(_client) {
91
+ this._client = _client;
92
+ }
93
+ /**
94
+ * Create customer entitlement
95
+ *
96
+ * Create an entitlement for the customer.
97
+ *
98
+ * A customer can have only one active entitlement per feature. The feature must be
99
+ * compatible with the entitlement type. Entitlements cannot be modified after
100
+ * creation, only deleted.
101
+ *
102
+ * POST /openmeter/customers/{customerId}/entitlements
103
+ */
104
+ async create(request, options) {
105
+ return unwrap(await createCustomerEntitlement(this._client, request, options));
106
+ }
107
+ /**
108
+ * Override customer entitlement
109
+ *
110
+ * Override an entitlement of the customer with a new one.
111
+ *
112
+ * The referenced entitlement ends and the new one starts at the same instant, so
113
+ * access continues without a gap. Both must belong to the same feature. Use this
114
+ * for upgrades and downgrades.
115
+ *
116
+ * Fails if the referenced entitlement does not exist, is deleted, or is no longer
117
+ * active.
118
+ *
119
+ * PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override
120
+ */
121
+ async override(request, options) {
122
+ return unwrap(await overrideCustomerEntitlement(this._client, request, options));
123
+ }
124
+ /**
125
+ * Get customer entitlement history
126
+ *
127
+ * Get the balance and usage history of a metered entitlement. The queried range
128
+ * may span multiple usage periods.
129
+ *
130
+ * `windowed_history` groups usage into windows of the requested size and reports
131
+ * the balance at the start of each window. `burndown_history` lists the periods in
132
+ * which grants were consumed in a fixed order, together with the usage taken from
133
+ * each grant.
134
+ *
135
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history
136
+ */
137
+ async getHistory(request, options) {
138
+ return unwrap(await getCustomerEntitlementHistory(this._client, request, options));
139
+ }
140
+ /**
141
+ * Get customer entitlement
142
+ *
143
+ * Get an entitlement of the customer by ID. For checking entitlement access, use
144
+ * the entitlement access endpoints instead.
145
+ *
146
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}
147
+ */
148
+ async get(request, options) {
149
+ return unwrap(await getCustomerEntitlement(this._client, request, options));
150
+ }
151
+ /**
152
+ * List customer entitlements
153
+ *
154
+ * List the entitlements of the customer that are active at the time of the
155
+ * request. For checking entitlement access, use the entitlement access endpoints
156
+ * instead.
157
+ *
158
+ * GET /openmeter/customers/{customerId}/entitlements
159
+ */
160
+ async list(request, options) {
161
+ return unwrap(await listCustomerEntitlements(this._client, request, options));
162
+ }
163
+ /**
164
+ * List customer entitlements
165
+ *
166
+ * List the entitlements of the customer that are active at the time of the
167
+ * request. For checking entitlement access, use the entitlement access endpoints
168
+ * instead.
169
+ *
170
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
171
+ *
172
+ * GET /openmeter/customers/{customerId}/entitlements
173
+ */
174
+ listAll(request, options) {
175
+ return paginatePages((req, opts) => listCustomerEntitlements(this._client, req, opts), request, options);
176
+ }
177
+ /**
178
+ * Reset customer entitlement usage
179
+ *
180
+ * Reset the usage of a metered entitlement. The reset starts a new usage period:
181
+ * usage is zeroed and grants roll over according to their rollover settings.
182
+ *
183
+ * Usage is reset automatically at the end of each usage period. Use this operation
184
+ * to reset it earlier, for example to align the entitlement with the customer's
185
+ * billing period. The usage period anchor can be moved at the same time.
186
+ *
187
+ * POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset
188
+ */
189
+ async resetUsage(request, options) {
190
+ return unwrap(await resetCustomerEntitlementUsage(this._client, request, options));
191
+ }
192
+ /**
193
+ * Delete customer entitlement
194
+ *
195
+ * Deletes the entitlement and revokes access to its feature. A customer can hold
196
+ * only one active entitlement per feature, so migrating a feature requires
197
+ * deleting the previous entitlement first.
198
+ *
199
+ * Deletion sets the `deleted_at` timestamp instead of removing history. Access and
200
+ * status queries for earlier points in time still treat the entitlement as active,
201
+ * so access changes are never retroactive.
202
+ *
203
+ * DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}
204
+ */
205
+ async delete(request, options) {
206
+ return unwrap(await deleteCustomerEntitlement(this._client, request, options));
207
+ }
208
+ _grants;
209
+ get grants() {
210
+ return (this._grants ??= new InternalCustomersEntitlementsGrants(this._client));
211
+ }
212
+ }
213
+ export class InternalCustomersEntitlementsGrants {
214
+ _client;
215
+ constructor(_client) {
216
+ this._client = _client;
217
+ }
218
+ /**
219
+ * Create customer entitlement grant
220
+ *
221
+ * Issue a grant for a metered entitlement of the customer. Boolean and static
222
+ * entitlements cannot have grants, so the request is rejected for them.
223
+ *
224
+ * Grants are immutable. The amount is added to the balance from `effective_at`,
225
+ * which cannot be earlier than the start of the current usage period.
226
+ *
227
+ * POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
228
+ */
229
+ async create(request, options) {
230
+ return unwrap(await createCustomerEntitlementGrant(this._client, request, options));
231
+ }
232
+ /**
233
+ * List customer entitlement grants
234
+ *
235
+ * List the grants issued for an entitlement of the customer. Grants only exist for
236
+ * metered entitlements, so the list is empty for boolean and static entitlements.
237
+ *
238
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
239
+ * grants are always included, as they are part of the balance history.
240
+ *
241
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
242
+ */
243
+ async list(request, options) {
244
+ return unwrap(await listCustomerEntitlementGrants(this._client, request, options));
245
+ }
246
+ /**
247
+ * List customer entitlement grants
248
+ *
249
+ * List the grants issued for an entitlement of the customer. Grants only exist for
250
+ * metered entitlements, so the list is empty for boolean and static entitlements.
251
+ *
252
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
253
+ * grants are always included, as they are part of the balance history.
254
+ *
255
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
256
+ *
257
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants
258
+ */
259
+ listAll(request, options) {
260
+ return paginatePages((req, opts) => listCustomerEntitlementGrants(this._client, req, opts), request, options);
261
+ }
262
+ }
69
263
  export class InternalCustomersCredits {
70
264
  _client;
71
265
  constructor(_client) {
@@ -144,6 +338,128 @@ export class InternalCustomersCharges {
144
338
  return unwrap(await createCustomerCharges(this._client, request, options));
145
339
  }
146
340
  }
341
+ export class InternalEntitlements {
342
+ _client;
343
+ constructor(_client) {
344
+ this._client = _client;
345
+ }
346
+ /**
347
+ * Get customer entitlement access
348
+ *
349
+ * Get the customer's access to a single feature.
350
+ *
351
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}
352
+ */
353
+ async getCustomerAccess(request, options) {
354
+ return unwrap(await getCustomerEntitlementAccess(this._client, request, options));
355
+ }
356
+ /**
357
+ * Get customer entitlement value by feature key
358
+ *
359
+ * Get the customer's entitlement value for a feature at a point in time. Without
360
+ * an active entitlement, the result denies access and omits the type.
361
+ *
362
+ * GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value
363
+ */
364
+ async getCustomerValueByFeatureKey(request, options) {
365
+ return unwrap(await getCustomerEntitlementValueByFeatureKey(this._client, request, options));
366
+ }
367
+ /**
368
+ * List entitlements
369
+ *
370
+ * List the active entitlements of all customers. Intended for administrative use.
371
+ * To list the entitlements of a single customer, use the customer entitlements
372
+ * endpoints; to check entitlement access, use the entitlement access endpoints.
373
+ *
374
+ * GET /openmeter/entitlements
375
+ */
376
+ async list(request, options) {
377
+ return unwrap(await listEntitlements(this._client, request, options));
378
+ }
379
+ /**
380
+ * List entitlements
381
+ *
382
+ * List the active entitlements of all customers. Intended for administrative use.
383
+ * To list the entitlements of a single customer, use the customer entitlements
384
+ * endpoints; to check entitlement access, use the entitlement access endpoints.
385
+ *
386
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
387
+ *
388
+ * GET /openmeter/entitlements
389
+ */
390
+ listAll(request, options) {
391
+ return paginatePages((req, opts) => listEntitlements(this._client, req, opts), request ?? {}, options);
392
+ }
393
+ /**
394
+ * Get entitlement
395
+ *
396
+ * Get an entitlement by ID. To check entitlement access, use the entitlement
397
+ * access endpoints instead.
398
+ *
399
+ * GET /openmeter/entitlements/{entitlementId}
400
+ */
401
+ async get(request, options) {
402
+ return unwrap(await getEntitlement(this._client, request, options));
403
+ }
404
+ /**
405
+ * Get customer entitlement value
406
+ *
407
+ * Get the customer's access through a single entitlement, optionally evaluated at
408
+ * a point in time.
409
+ *
410
+ * GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value
411
+ */
412
+ async getCustomerValue(request, options) {
413
+ return unwrap(await getCustomerEntitlementValue(this._client, request, options));
414
+ }
415
+ }
416
+ export class InternalGrants {
417
+ _client;
418
+ constructor(_client) {
419
+ this._client = _client;
420
+ }
421
+ /**
422
+ * List grants
423
+ *
424
+ * List the grants of all customers and entitlements. To list the grants of a
425
+ * single entitlement, use the customer entitlement grants endpoint.
426
+ *
427
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
428
+ * grants are always included, as they are part of the balance history.
429
+ *
430
+ * GET /openmeter/grants
431
+ */
432
+ async list(request, options) {
433
+ return unwrap(await listGrants(this._client, request, options));
434
+ }
435
+ /**
436
+ * List grants
437
+ *
438
+ * List the grants of all customers and entitlements. To list the grants of a
439
+ * single entitlement, use the customer entitlement grants endpoint.
440
+ *
441
+ * Deleted grants are excluded unless `include_deleted` is set. Voided and expired
442
+ * grants are always included, as they are part of the balance history.
443
+ *
444
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
445
+ *
446
+ * GET /openmeter/grants
447
+ */
448
+ listAll(request, options) {
449
+ return paginatePages((req, opts) => listGrants(this._client, req, opts), request ?? {}, options);
450
+ }
451
+ /**
452
+ * Void grant
453
+ *
454
+ * Void a grant so it no longer adds to the balance. Usage already deducted from
455
+ * the grant is kept.
456
+ *
457
+ * DELETE /openmeter/grants/{grantId}
458
+ */
459
+ async void(request, options) {
460
+ return unwrap(await voidGrant(this._client, request, options));
461
+ }
462
+ }
147
463
  export class InternalSubscriptions {
148
464
  _client;
149
465
  constructor(_client) {
@@ -193,6 +509,16 @@ export class InternalSubscriptions {
193
509
  async migrate(request, options) {
194
510
  return unwrap(await migrateSubscription(this._client, request, options));
195
511
  }
512
+ /**
513
+ * Create a new subscription add-on
514
+ *
515
+ * Add add-on to a subscription.
516
+ *
517
+ * POST /openmeter/subscriptions/{subscriptionId}/addons
518
+ */
519
+ async createAddon(request, options) {
520
+ return unwrap(await createSubscriptionAddon(this._client, request, options));
521
+ }
196
522
  /**
197
523
  * Update subscription addon
198
524
  *
@@ -211,28 +537,6 @@ export class InternalApps {
211
537
  constructor(_client) {
212
538
  this._client = _client;
213
539
  }
214
- /**
215
- * List apps
216
- *
217
- * List installed apps.
218
- *
219
- * GET /openmeter/apps
220
- */
221
- async list(request, options) {
222
- return unwrap(await listApps(this._client, request, options));
223
- }
224
- /**
225
- * List apps
226
- *
227
- * List installed apps.
228
- *
229
- * Iterates every item across all pages, fetching more as the returned iterable is consumed.
230
- *
231
- * GET /openmeter/apps
232
- */
233
- listAll(request, options) {
234
- return paginatePages((req, opts) => listApps(this._client, req, opts), request ?? {}, options);
235
- }
236
540
  /**
237
541
  * Uninstall app
238
542
  *
@@ -607,3 +911,71 @@ export class InternalEntitlementAccess {
607
911
  return unwrap(await queryEntitlementAccess(this._client, request, options));
608
912
  }
609
913
  }
914
+ export class InternalNotifications {
915
+ _client;
916
+ constructor(_client) {
917
+ this._client = _client;
918
+ }
919
+ /**
920
+ * List notification channels
921
+ *
922
+ * List all notification channels.
923
+ *
924
+ * GET /openmeter/notification/channels
925
+ */
926
+ async listChannels(request, options) {
927
+ return unwrap(await listNotificationChannels(this._client, request, options));
928
+ }
929
+ /**
930
+ * List notification channels
931
+ *
932
+ * List all notification channels.
933
+ *
934
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
935
+ *
936
+ * GET /openmeter/notification/channels
937
+ */
938
+ listChannelsAll(request, options) {
939
+ return paginatePages((req, opts) => listNotificationChannels(this._client, req, opts), request ?? {}, options);
940
+ }
941
+ /**
942
+ * Create notification channel
943
+ *
944
+ * Create a notification channel.
945
+ *
946
+ * POST /openmeter/notification/channels
947
+ */
948
+ async createChannel(request, options) {
949
+ return unwrap(await createNotificationChannel(this._client, request, options));
950
+ }
951
+ /**
952
+ * Get notification channel
953
+ *
954
+ * Get a notification channel by id.
955
+ *
956
+ * GET /openmeter/notification/channels/{notificationChannelId}
957
+ */
958
+ async getChannel(request, options) {
959
+ return unwrap(await getNotificationChannel(this._client, request, options));
960
+ }
961
+ /**
962
+ * Update notification channel
963
+ *
964
+ * Update a notification channel by id.
965
+ *
966
+ * PUT /openmeter/notification/channels/{notificationChannelId}
967
+ */
968
+ async updateChannel(request, options) {
969
+ return unwrap(await updateNotificationChannel(this._client, request, options));
970
+ }
971
+ /**
972
+ * Delete notification channel
973
+ *
974
+ * Delete a notification channel by id.
975
+ *
976
+ * DELETE /openmeter/notification/channels/{notificationChannelId}
977
+ */
978
+ async deleteChannel(request, options) {
979
+ return unwrap(await deleteNotificationChannel(this._client, request, options));
980
+ }
981
+ }
@@ -0,0 +1,58 @@
1
+ import { type Client } from '../core.js';
2
+ import { type RequestOptions } from '../lib/types.js';
3
+ import type { ListNotificationChannelsRequest, ListNotificationChannelsResponse, CreateNotificationChannelRequest, CreateNotificationChannelResponse, GetNotificationChannelRequest, GetNotificationChannelResponse, UpdateNotificationChannelRequest, UpdateNotificationChannelResponse, DeleteNotificationChannelRequest, DeleteNotificationChannelResponse } from '../models/operations/notifications.js';
4
+ import type { NotificationChannel } from '../models/types.js';
5
+ export declare class Notifications {
6
+ private readonly _client;
7
+ constructor(_client: Client);
8
+ /**
9
+ * List notification channels
10
+ *
11
+ * List all notification channels.
12
+ *
13
+ * GET /openmeter/notification/channels
14
+ */
15
+ listChannels(request?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<ListNotificationChannelsResponse>;
16
+ /**
17
+ * List notification channels
18
+ *
19
+ * List all notification channels.
20
+ *
21
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
22
+ *
23
+ * GET /openmeter/notification/channels
24
+ */
25
+ listChannelsAll(request?: ListNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
26
+ /**
27
+ * Create notification channel
28
+ *
29
+ * Create a notification channel.
30
+ *
31
+ * POST /openmeter/notification/channels
32
+ */
33
+ createChannel(request: CreateNotificationChannelRequest, options?: RequestOptions): Promise<CreateNotificationChannelResponse>;
34
+ /**
35
+ * Get notification channel
36
+ *
37
+ * Get a notification channel by id.
38
+ *
39
+ * GET /openmeter/notification/channels/{notificationChannelId}
40
+ */
41
+ getChannel(request: GetNotificationChannelRequest, options?: RequestOptions): Promise<GetNotificationChannelResponse>;
42
+ /**
43
+ * Update notification channel
44
+ *
45
+ * Update a notification channel by id.
46
+ *
47
+ * PUT /openmeter/notification/channels/{notificationChannelId}
48
+ */
49
+ updateChannel(request: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<UpdateNotificationChannelResponse>;
50
+ /**
51
+ * Delete notification channel
52
+ *
53
+ * Delete a notification channel by id.
54
+ *
55
+ * DELETE /openmeter/notification/channels/{notificationChannelId}
56
+ */
57
+ deleteChannel(request: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<DeleteNotificationChannelResponse>;
58
+ }
@@ -0,0 +1,72 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ import { unwrap } from '../lib/types.js';
3
+ import { paginatePages } from '../lib/paginate.js';
4
+ import { listNotificationChannels, createNotificationChannel, getNotificationChannel, updateNotificationChannel, deleteNotificationChannel, } from '../funcs/notifications.js';
5
+ export class Notifications {
6
+ _client;
7
+ constructor(_client) {
8
+ this._client = _client;
9
+ }
10
+ /**
11
+ * List notification channels
12
+ *
13
+ * List all notification channels.
14
+ *
15
+ * GET /openmeter/notification/channels
16
+ */
17
+ async listChannels(request, options) {
18
+ return unwrap(await listNotificationChannels(this._client, request, options));
19
+ }
20
+ /**
21
+ * List notification channels
22
+ *
23
+ * List all notification channels.
24
+ *
25
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
26
+ *
27
+ * GET /openmeter/notification/channels
28
+ */
29
+ listChannelsAll(request, options) {
30
+ return paginatePages((req, opts) => listNotificationChannels(this._client, req, opts), request ?? {}, options);
31
+ }
32
+ /**
33
+ * Create notification channel
34
+ *
35
+ * Create a notification channel.
36
+ *
37
+ * POST /openmeter/notification/channels
38
+ */
39
+ async createChannel(request, options) {
40
+ return unwrap(await createNotificationChannel(this._client, request, options));
41
+ }
42
+ /**
43
+ * Get notification channel
44
+ *
45
+ * Get a notification channel by id.
46
+ *
47
+ * GET /openmeter/notification/channels/{notificationChannelId}
48
+ */
49
+ async getChannel(request, options) {
50
+ return unwrap(await getNotificationChannel(this._client, request, options));
51
+ }
52
+ /**
53
+ * Update notification channel
54
+ *
55
+ * Update a notification channel by id.
56
+ *
57
+ * PUT /openmeter/notification/channels/{notificationChannelId}
58
+ */
59
+ async updateChannel(request, options) {
60
+ return unwrap(await updateNotificationChannel(this._client, request, options));
61
+ }
62
+ /**
63
+ * Delete notification channel
64
+ *
65
+ * Delete a notification channel by id.
66
+ *
67
+ * DELETE /openmeter/notification/channels/{notificationChannelId}
68
+ */
69
+ async deleteChannel(request, options) {
70
+ return unwrap(await deleteNotificationChannel(this._client, request, options));
71
+ }
72
+ }
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
- import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
3
+ import type { CreateSubscriptionRequest, CreateSubscriptionResponse, ListSubscriptionsRequest, ListSubscriptionsResponse, GetSubscriptionRequest, GetSubscriptionResponse, CancelSubscriptionRequest, CancelSubscriptionResponse, UnscheduleCancelationRequest, UnscheduleCancelationResponse, ChangeSubscriptionRequest, ChangeSubscriptionResponse, EditSubscriptionRequest, EditSubscriptionResponse, ListSubscriptionAddonsRequest, ListSubscriptionAddonsResponse, GetSubscriptionAddonRequest, GetSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
4
4
  import type { Subscription, SubscriptionAddon } from '../models/types.js';
5
5
  export declare class Subscriptions {
6
6
  private readonly _client;
@@ -68,14 +68,6 @@ export declare class Subscriptions {
68
68
  * POST /openmeter/subscriptions/{subscriptionId}/edit
69
69
  */
70
70
  edit(request: EditSubscriptionRequest, options?: RequestOptions): Promise<EditSubscriptionResponse>;
71
- /**
72
- * Create a new subscription add-on
73
- *
74
- * Add add-on to a subscription.
75
- *
76
- * POST /openmeter/subscriptions/{subscriptionId}/addons
77
- */
78
- createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise<CreateSubscriptionAddonResponse>;
79
71
  /**
80
72
  * List subscription addons
81
73
  *
@@ -1,7 +1,7 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { unwrap } from '../lib/types.js';
3
3
  import { paginatePages } from '../lib/paginate.js';
4
- import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, editSubscription, createSubscriptionAddon, listSubscriptionAddons, getSubscriptionAddon, } from '../funcs/subscriptions.js';
4
+ import { createSubscription, listSubscriptions, getSubscription, cancelSubscription, unscheduleCancelation, changeSubscription, editSubscription, listSubscriptionAddons, getSubscriptionAddon, } from '../funcs/subscriptions.js';
5
5
  export class Subscriptions {
6
6
  _client;
7
7
  constructor(_client) {
@@ -86,16 +86,6 @@ export class Subscriptions {
86
86
  async edit(request, options) {
87
87
  return unwrap(await editSubscription(this._client, request, options));
88
88
  }
89
- /**
90
- * Create a new subscription add-on
91
- *
92
- * Add add-on to a subscription.
93
- *
94
- * POST /openmeter/subscriptions/{subscriptionId}/addons
95
- */
96
- async createAddon(request, options) {
97
- return unwrap(await createSubscriptionAddon(this._client, request, options));
98
- }
99
89
  /**
100
90
  * List subscription addons
101
91
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta.233",
3
+ "version": "1.0.0-beta.234",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",