@openmeter/client 1.0.0-beta.236 → 1.0.0-beta.237

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,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
- import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
3
+ import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingProfileRequest, UpdateCustomerBillingProfileResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCustomerEntitlementGrantRequest, CreateCustomerEntitlementGrantResponse, ListCustomerEntitlementGrantsRequest, ListCustomerEntitlementGrantsResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
4
4
  import type { Charge, CreditGrant, CreditTransaction, Customer, Entitlement, EntitlementGrant } from '../models/types.js';
5
5
  export declare class Customers {
6
6
  private readonly _client;
@@ -64,9 +64,23 @@ export declare class CustomersBilling {
64
64
  /**
65
65
  * Update customer billing data
66
66
  *
67
+ * Update billing data while preserving the current profile selection when
68
+ * billing_profile is omitted or null. Use the dedicated billing profile endpoint
69
+ * to remove the selection.
70
+ *
67
71
  * PUT /openmeter/customers/{customerId}/billing
68
72
  */
69
73
  update(request: UpdateCustomerBillingRequest, options?: RequestOptions): Promise<UpdateCustomerBillingResponse>;
74
+ /**
75
+ * Update customer billing profile
76
+ *
77
+ * Set the customer's explicit billing profile selection. Omitting billing_profile
78
+ * or setting it to null removes the selection and uses the current namespace
79
+ * default.
80
+ *
81
+ * PUT /openmeter/customers/{customerId}/billing/profile
82
+ */
83
+ updateProfile(request: UpdateCustomerBillingProfileRequest, options?: RequestOptions): Promise<UpdateCustomerBillingProfileResponse>;
70
84
  /**
71
85
  * Update customer billing app data
72
86
  *
@@ -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 { paginateCursor, paginatePages } from '../lib/paginate.js';
4
- import { createCustomer, getCustomer, listCustomers, upsertCustomer, deleteCustomer, getCustomerBilling, updateCustomerBilling, updateCustomerBillingAppData, createCustomerStripeCheckoutSession, createCustomerStripePortalSession, createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, createCreditGrant, getCreditGrant, listCreditGrants, getCustomerCreditBalance, createCreditAdjustment, voidCreditGrant, updateCreditGrantExternalSettlement, listCreditTransactions, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
4
+ import { createCustomer, getCustomer, listCustomers, upsertCustomer, deleteCustomer, getCustomerBilling, updateCustomerBilling, updateCustomerBillingProfile, updateCustomerBillingAppData, createCustomerStripeCheckoutSession, createCustomerStripePortalSession, createCustomerEntitlement, overrideCustomerEntitlement, getCustomerEntitlementHistory, getCustomerEntitlement, listCustomerEntitlements, resetCustomerEntitlementUsage, deleteCustomerEntitlement, createCustomerEntitlementGrant, listCustomerEntitlementGrants, createCreditGrant, getCreditGrant, listCreditGrants, getCustomerCreditBalance, createCreditAdjustment, voidCreditGrant, updateCreditGrantExternalSettlement, listCreditTransactions, listCustomerCharges, createCustomerCharges, } from '../funcs/customers.js';
5
5
  export class Customers {
6
6
  _client;
7
7
  constructor(_client) {
@@ -90,11 +90,27 @@ export class CustomersBilling {
90
90
  /**
91
91
  * Update customer billing data
92
92
  *
93
+ * Update billing data while preserving the current profile selection when
94
+ * billing_profile is omitted or null. Use the dedicated billing profile endpoint
95
+ * to remove the selection.
96
+ *
93
97
  * PUT /openmeter/customers/{customerId}/billing
94
98
  */
95
99
  async update(request, options) {
96
100
  return unwrap(await updateCustomerBilling(this._client, request, options));
97
101
  }
102
+ /**
103
+ * Update customer billing profile
104
+ *
105
+ * Set the customer's explicit billing profile selection. Omitting billing_profile
106
+ * or setting it to null removes the selection and uses the current namespace
107
+ * default.
108
+ *
109
+ * PUT /openmeter/customers/{customerId}/billing/profile
110
+ */
111
+ async updateProfile(request, options) {
112
+ return unwrap(await updateCustomerBillingProfile(this._client, request, options));
113
+ }
98
114
  /**
99
115
  * Update customer billing app data
100
116
  *
@@ -1,8 +1,9 @@
1
1
  import { type Client } from '../core.js';
2
2
  import { type RequestOptions } from '../lib/types.js';
3
+ import type { InvoiceCustomerChargesRequest, InvoiceCustomerChargesResponse } from '../models/operations/customers.js';
3
4
  import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js';
4
5
  import type { ExecuteAppActionRequest, ExecuteAppActionResponse } from '../models/operations/apps.js';
5
- import type { ListNotificationRulesRequest, ListNotificationRulesResponse, CreateNotificationRuleRequest, CreateNotificationRuleResponse, GetNotificationRuleRequest, GetNotificationRuleResponse, UpdateNotificationRuleRequest, UpdateNotificationRuleResponse, DeleteNotificationRuleRequest, DeleteNotificationRuleResponse, TestNotificationRuleRequest, TestNotificationRuleResponse, ListNotificationEventsRequest, ListNotificationEventsResponse, GetNotificationEventRequest, GetNotificationEventResponse, ResendNotificationEventRequest, ResendNotificationEventResponse } from '../models/operations/notifications.js';
6
+ import type { ListBillingNotificationRulesRequest, ListBillingNotificationRulesResponse, CreateBillingNotificationRuleRequest, CreateBillingNotificationRuleResponse, GetBillingNotificationRuleRequest, GetBillingNotificationRuleResponse, UpdateBillingNotificationRuleRequest, UpdateBillingNotificationRuleResponse, DeleteBillingNotificationRuleRequest, DeleteBillingNotificationRuleResponse, TestBillingNotificationRuleRequest, TestBillingNotificationRuleResponse, ListBillingNotificationEventsRequest, ListBillingNotificationEventsResponse, GetBillingNotificationEventRequest, GetBillingNotificationEventResponse, ResendBillingNotificationEventRequest, ResendBillingNotificationEventResponse } from '../models/operations/notifications.js';
6
7
  import type { NotificationEvent, NotificationRule } from '../models/types.js';
7
8
  /**
8
9
  * Operations marked internal in the API definition. They are not part of
@@ -12,6 +13,8 @@ import type { NotificationEvent, NotificationRule } from '../models/types.js';
12
13
  export declare class Internal {
13
14
  private readonly _client;
14
15
  constructor(_client: Client);
16
+ private _customers?;
17
+ get customers(): InternalCustomers;
15
18
  private _subscriptions?;
16
19
  get subscriptions(): InternalSubscriptions;
17
20
  private _apps?;
@@ -19,6 +22,30 @@ export declare class Internal {
19
22
  private _notifications?;
20
23
  get notifications(): InternalNotifications;
21
24
  }
25
+ export declare class InternalCustomers {
26
+ private readonly _client;
27
+ constructor(_client: Client);
28
+ private _charges?;
29
+ get charges(): InternalCustomersCharges;
30
+ }
31
+ export declare class InternalCustomersCharges {
32
+ private readonly _client;
33
+ constructor(_client: Client);
34
+ /**
35
+ * Invoice a customer's charges
36
+ *
37
+ * Invoice a customer's charges outside the normal billing cycle. Collection
38
+ * alignment is bypassed. The customer's progressive billing setting applies unless
39
+ * explicitly overridden. All eligible pending lines are considered.
40
+ *
41
+ * Returns the created standard invoices, one per collected currency. Lines blocked
42
+ * by their owning engine remain pending. If all eligible lines are blocked or no
43
+ * lines are eligible, returns a validation error.
44
+ *
45
+ * POST /openmeter/customers/{customerId}/charges/invoice
46
+ */
47
+ invoice(request: InvoiceCustomerChargesRequest, options?: RequestOptions): Promise<InvoiceCustomerChargesResponse>;
48
+ }
22
49
  export declare class InternalSubscriptions {
23
50
  private readonly _client;
24
51
  constructor(_client: Client);
@@ -64,7 +91,7 @@ export declare class InternalNotifications {
64
91
  *
65
92
  * GET /openmeter/notification/rules
66
93
  */
67
- listRules(request?: ListNotificationRulesRequest, options?: RequestOptions): Promise<ListNotificationRulesResponse>;
94
+ listBillingRules(request?: ListBillingNotificationRulesRequest, options?: RequestOptions): Promise<ListBillingNotificationRulesResponse>;
68
95
  /**
69
96
  * List notification rules
70
97
  *
@@ -74,7 +101,7 @@ export declare class InternalNotifications {
74
101
  *
75
102
  * GET /openmeter/notification/rules
76
103
  */
77
- listRulesAll(request?: ListNotificationRulesRequest, options?: RequestOptions): AsyncIterable<NotificationRule>;
104
+ listBillingRulesAll(request?: ListBillingNotificationRulesRequest, options?: RequestOptions): AsyncIterable<NotificationRule>;
78
105
  /**
79
106
  * Create notification rule
80
107
  *
@@ -82,7 +109,7 @@ export declare class InternalNotifications {
82
109
  *
83
110
  * POST /openmeter/notification/rules
84
111
  */
85
- createRule(request: CreateNotificationRuleRequest, options?: RequestOptions): Promise<CreateNotificationRuleResponse>;
112
+ createBillingRule(request: CreateBillingNotificationRuleRequest, options?: RequestOptions): Promise<CreateBillingNotificationRuleResponse>;
86
113
  /**
87
114
  * Get notification rule
88
115
  *
@@ -90,7 +117,7 @@ export declare class InternalNotifications {
90
117
  *
91
118
  * GET /openmeter/notification/rules/{notificationRuleId}
92
119
  */
93
- getRule(request: GetNotificationRuleRequest, options?: RequestOptions): Promise<GetNotificationRuleResponse>;
120
+ getBillingRule(request: GetBillingNotificationRuleRequest, options?: RequestOptions): Promise<GetBillingNotificationRuleResponse>;
94
121
  /**
95
122
  * Update notification rule
96
123
  *
@@ -98,7 +125,7 @@ export declare class InternalNotifications {
98
125
  *
99
126
  * PUT /openmeter/notification/rules/{notificationRuleId}
100
127
  */
101
- updateRule(request: UpdateNotificationRuleRequest, options?: RequestOptions): Promise<UpdateNotificationRuleResponse>;
128
+ updateBillingRule(request: UpdateBillingNotificationRuleRequest, options?: RequestOptions): Promise<UpdateBillingNotificationRuleResponse>;
102
129
  /**
103
130
  * Delete notification rule
104
131
  *
@@ -106,7 +133,7 @@ export declare class InternalNotifications {
106
133
  *
107
134
  * DELETE /openmeter/notification/rules/{notificationRuleId}
108
135
  */
109
- deleteRule(request: DeleteNotificationRuleRequest, options?: RequestOptions): Promise<DeleteNotificationRuleResponse>;
136
+ deleteBillingRule(request: DeleteBillingNotificationRuleRequest, options?: RequestOptions): Promise<DeleteBillingNotificationRuleResponse>;
110
137
  /**
111
138
  * Test notification rule
112
139
  *
@@ -116,7 +143,7 @@ export declare class InternalNotifications {
116
143
  *
117
144
  * POST /openmeter/notification/rules/{notificationRuleId}/test
118
145
  */
119
- testRule(request: TestNotificationRuleRequest, options?: RequestOptions): Promise<TestNotificationRuleResponse>;
146
+ testBillingRule(request: TestBillingNotificationRuleRequest, options?: RequestOptions): Promise<TestBillingNotificationRuleResponse>;
120
147
  /**
121
148
  * List notification events
122
149
  *
@@ -124,7 +151,7 @@ export declare class InternalNotifications {
124
151
  *
125
152
  * GET /openmeter/notification/events
126
153
  */
127
- listEvents(request?: ListNotificationEventsRequest, options?: RequestOptions): Promise<ListNotificationEventsResponse>;
154
+ listBillingEvents(request?: ListBillingNotificationEventsRequest, options?: RequestOptions): Promise<ListBillingNotificationEventsResponse>;
128
155
  /**
129
156
  * List notification events
130
157
  *
@@ -134,7 +161,7 @@ export declare class InternalNotifications {
134
161
  *
135
162
  * GET /openmeter/notification/events
136
163
  */
137
- listEventsAll(request?: ListNotificationEventsRequest, options?: RequestOptions): AsyncIterable<NotificationEvent>;
164
+ listBillingEventsAll(request?: ListBillingNotificationEventsRequest, options?: RequestOptions): AsyncIterable<NotificationEvent>;
138
165
  /**
139
166
  * Get notification event
140
167
  *
@@ -142,7 +169,7 @@ export declare class InternalNotifications {
142
169
  *
143
170
  * GET /openmeter/notification/events/{notificationEventId}
144
171
  */
145
- getEvent(request: GetNotificationEventRequest, options?: RequestOptions): Promise<GetNotificationEventResponse>;
172
+ getBillingEvent(request: GetBillingNotificationEventRequest, options?: RequestOptions): Promise<GetBillingNotificationEventResponse>;
146
173
  /**
147
174
  * Resend notification event
148
175
  *
@@ -154,5 +181,5 @@ export declare class InternalNotifications {
154
181
  *
155
182
  * POST /openmeter/notification/events/{notificationEventId}/resend
156
183
  */
157
- resendEvent(request: ResendNotificationEventRequest, options?: RequestOptions): Promise<ResendNotificationEventResponse>;
184
+ resendBillingEvent(request: ResendBillingNotificationEventRequest, options?: RequestOptions): Promise<ResendBillingNotificationEventResponse>;
158
185
  }
@@ -1,9 +1,10 @@
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 { invoiceCustomerCharges } from '../funcs/customers.js';
4
5
  import { createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
5
6
  import { executeAppAction } from '../funcs/apps.js';
6
- import { listNotificationRules, createNotificationRule, getNotificationRule, updateNotificationRule, deleteNotificationRule, testNotificationRule, listNotificationEvents, getNotificationEvent, resendNotificationEvent, } from '../funcs/notifications.js';
7
+ import { listBillingNotificationRules, createBillingNotificationRule, getBillingNotificationRule, updateBillingNotificationRule, deleteBillingNotificationRule, testBillingNotificationRule, listBillingNotificationEvents, getBillingNotificationEvent, resendBillingNotificationEvent, } from '../funcs/notifications.js';
7
8
  /**
8
9
  * Operations marked internal in the API definition. They are not part of
9
10
  * the customer surface: they may require additional permissions, and they
@@ -14,6 +15,10 @@ export class Internal {
14
15
  constructor(_client) {
15
16
  this._client = _client;
16
17
  }
18
+ _customers;
19
+ get customers() {
20
+ return (this._customers ??= new InternalCustomers(this._client));
21
+ }
17
22
  _subscriptions;
18
23
  get subscriptions() {
19
24
  return (this._subscriptions ??= new InternalSubscriptions(this._client));
@@ -27,6 +32,38 @@ export class Internal {
27
32
  return (this._notifications ??= new InternalNotifications(this._client));
28
33
  }
29
34
  }
35
+ export class InternalCustomers {
36
+ _client;
37
+ constructor(_client) {
38
+ this._client = _client;
39
+ }
40
+ _charges;
41
+ get charges() {
42
+ return (this._charges ??= new InternalCustomersCharges(this._client));
43
+ }
44
+ }
45
+ export class InternalCustomersCharges {
46
+ _client;
47
+ constructor(_client) {
48
+ this._client = _client;
49
+ }
50
+ /**
51
+ * Invoice a customer's charges
52
+ *
53
+ * Invoice a customer's charges outside the normal billing cycle. Collection
54
+ * alignment is bypassed. The customer's progressive billing setting applies unless
55
+ * explicitly overridden. All eligible pending lines are considered.
56
+ *
57
+ * Returns the created standard invoices, one per collected currency. Lines blocked
58
+ * by their owning engine remain pending. If all eligible lines are blocked or no
59
+ * lines are eligible, returns a validation error.
60
+ *
61
+ * POST /openmeter/customers/{customerId}/charges/invoice
62
+ */
63
+ async invoice(request, options) {
64
+ return unwrap(await invoiceCustomerCharges(this._client, request, options));
65
+ }
66
+ }
30
67
  export class InternalSubscriptions {
31
68
  _client;
32
69
  constructor(_client) {
@@ -84,8 +121,8 @@ export class InternalNotifications {
84
121
  *
85
122
  * GET /openmeter/notification/rules
86
123
  */
87
- async listRules(request, options) {
88
- return unwrap(await listNotificationRules(this._client, request, options));
124
+ async listBillingRules(request, options) {
125
+ return unwrap(await listBillingNotificationRules(this._client, request, options));
89
126
  }
90
127
  /**
91
128
  * List notification rules
@@ -96,8 +133,8 @@ export class InternalNotifications {
96
133
  *
97
134
  * GET /openmeter/notification/rules
98
135
  */
99
- listRulesAll(request, options) {
100
- return paginatePages((req, opts) => listNotificationRules(this._client, req, opts), request ?? {}, options);
136
+ listBillingRulesAll(request, options) {
137
+ return paginatePages((req, opts) => listBillingNotificationRules(this._client, req, opts), request ?? {}, options);
101
138
  }
102
139
  /**
103
140
  * Create notification rule
@@ -106,8 +143,8 @@ export class InternalNotifications {
106
143
  *
107
144
  * POST /openmeter/notification/rules
108
145
  */
109
- async createRule(request, options) {
110
- return unwrap(await createNotificationRule(this._client, request, options));
146
+ async createBillingRule(request, options) {
147
+ return unwrap(await createBillingNotificationRule(this._client, request, options));
111
148
  }
112
149
  /**
113
150
  * Get notification rule
@@ -116,8 +153,8 @@ export class InternalNotifications {
116
153
  *
117
154
  * GET /openmeter/notification/rules/{notificationRuleId}
118
155
  */
119
- async getRule(request, options) {
120
- return unwrap(await getNotificationRule(this._client, request, options));
156
+ async getBillingRule(request, options) {
157
+ return unwrap(await getBillingNotificationRule(this._client, request, options));
121
158
  }
122
159
  /**
123
160
  * Update notification rule
@@ -126,8 +163,8 @@ export class InternalNotifications {
126
163
  *
127
164
  * PUT /openmeter/notification/rules/{notificationRuleId}
128
165
  */
129
- async updateRule(request, options) {
130
- return unwrap(await updateNotificationRule(this._client, request, options));
166
+ async updateBillingRule(request, options) {
167
+ return unwrap(await updateBillingNotificationRule(this._client, request, options));
131
168
  }
132
169
  /**
133
170
  * Delete notification rule
@@ -136,8 +173,8 @@ export class InternalNotifications {
136
173
  *
137
174
  * DELETE /openmeter/notification/rules/{notificationRuleId}
138
175
  */
139
- async deleteRule(request, options) {
140
- return unwrap(await deleteNotificationRule(this._client, request, options));
176
+ async deleteBillingRule(request, options) {
177
+ return unwrap(await deleteBillingNotificationRule(this._client, request, options));
141
178
  }
142
179
  /**
143
180
  * Test notification rule
@@ -148,8 +185,8 @@ export class InternalNotifications {
148
185
  *
149
186
  * POST /openmeter/notification/rules/{notificationRuleId}/test
150
187
  */
151
- async testRule(request, options) {
152
- return unwrap(await testNotificationRule(this._client, request, options));
188
+ async testBillingRule(request, options) {
189
+ return unwrap(await testBillingNotificationRule(this._client, request, options));
153
190
  }
154
191
  /**
155
192
  * List notification events
@@ -158,8 +195,8 @@ export class InternalNotifications {
158
195
  *
159
196
  * GET /openmeter/notification/events
160
197
  */
161
- async listEvents(request, options) {
162
- return unwrap(await listNotificationEvents(this._client, request, options));
198
+ async listBillingEvents(request, options) {
199
+ return unwrap(await listBillingNotificationEvents(this._client, request, options));
163
200
  }
164
201
  /**
165
202
  * List notification events
@@ -170,8 +207,8 @@ export class InternalNotifications {
170
207
  *
171
208
  * GET /openmeter/notification/events
172
209
  */
173
- listEventsAll(request, options) {
174
- return paginatePages((req, opts) => listNotificationEvents(this._client, req, opts), request ?? {}, options);
210
+ listBillingEventsAll(request, options) {
211
+ return paginatePages((req, opts) => listBillingNotificationEvents(this._client, req, opts), request ?? {}, options);
175
212
  }
176
213
  /**
177
214
  * Get notification event
@@ -180,8 +217,8 @@ export class InternalNotifications {
180
217
  *
181
218
  * GET /openmeter/notification/events/{notificationEventId}
182
219
  */
183
- async getEvent(request, options) {
184
- return unwrap(await getNotificationEvent(this._client, request, options));
220
+ async getBillingEvent(request, options) {
221
+ return unwrap(await getBillingNotificationEvent(this._client, request, options));
185
222
  }
186
223
  /**
187
224
  * Resend notification event
@@ -194,7 +231,7 @@ export class InternalNotifications {
194
231
  *
195
232
  * POST /openmeter/notification/events/{notificationEventId}/resend
196
233
  */
197
- async resendEvent(request, options) {
198
- return unwrap(await resendNotificationEvent(this._client, request, options));
234
+ async resendBillingEvent(request, options) {
235
+ return unwrap(await resendBillingNotificationEvent(this._client, request, options));
199
236
  }
200
237
  }
@@ -1,6 +1,6 @@
1
1
  import { type Client } from '../core.js';
2
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';
3
+ import type { ListBillingNotificationChannelsRequest, ListBillingNotificationChannelsResponse, CreateBillingNotificationChannelRequest, CreateBillingNotificationChannelResponse, GetBillingNotificationChannelRequest, GetBillingNotificationChannelResponse, UpdateBillingNotificationChannelRequest, UpdateBillingNotificationChannelResponse, DeleteBillingNotificationChannelRequest, DeleteBillingNotificationChannelResponse } from '../models/operations/notifications.js';
4
4
  import type { NotificationChannel } from '../models/types.js';
5
5
  export declare class Notifications {
6
6
  private readonly _client;
@@ -12,7 +12,7 @@ export declare class Notifications {
12
12
  *
13
13
  * GET /openmeter/notification/channels
14
14
  */
15
- listChannels(request?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<ListNotificationChannelsResponse>;
15
+ listBillingChannels(request?: ListBillingNotificationChannelsRequest, options?: RequestOptions): Promise<ListBillingNotificationChannelsResponse>;
16
16
  /**
17
17
  * List notification channels
18
18
  *
@@ -22,7 +22,7 @@ export declare class Notifications {
22
22
  *
23
23
  * GET /openmeter/notification/channels
24
24
  */
25
- listChannelsAll(request?: ListNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
25
+ listBillingChannelsAll(request?: ListBillingNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
26
26
  /**
27
27
  * Create notification channel
28
28
  *
@@ -30,7 +30,7 @@ export declare class Notifications {
30
30
  *
31
31
  * POST /openmeter/notification/channels
32
32
  */
33
- createChannel(request: CreateNotificationChannelRequest, options?: RequestOptions): Promise<CreateNotificationChannelResponse>;
33
+ createBillingChannel(request: CreateBillingNotificationChannelRequest, options?: RequestOptions): Promise<CreateBillingNotificationChannelResponse>;
34
34
  /**
35
35
  * Get notification channel
36
36
  *
@@ -38,7 +38,7 @@ export declare class Notifications {
38
38
  *
39
39
  * GET /openmeter/notification/channels/{notificationChannelId}
40
40
  */
41
- getChannel(request: GetNotificationChannelRequest, options?: RequestOptions): Promise<GetNotificationChannelResponse>;
41
+ getBillingChannel(request: GetBillingNotificationChannelRequest, options?: RequestOptions): Promise<GetBillingNotificationChannelResponse>;
42
42
  /**
43
43
  * Update notification channel
44
44
  *
@@ -46,7 +46,7 @@ export declare class Notifications {
46
46
  *
47
47
  * PUT /openmeter/notification/channels/{notificationChannelId}
48
48
  */
49
- updateChannel(request: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<UpdateNotificationChannelResponse>;
49
+ updateBillingChannel(request: UpdateBillingNotificationChannelRequest, options?: RequestOptions): Promise<UpdateBillingNotificationChannelResponse>;
50
50
  /**
51
51
  * Delete notification channel
52
52
  *
@@ -54,5 +54,5 @@ export declare class Notifications {
54
54
  *
55
55
  * DELETE /openmeter/notification/channels/{notificationChannelId}
56
56
  */
57
- deleteChannel(request: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<DeleteNotificationChannelResponse>;
57
+ deleteBillingChannel(request: DeleteBillingNotificationChannelRequest, options?: RequestOptions): Promise<DeleteBillingNotificationChannelResponse>;
58
58
  }
@@ -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 { listNotificationChannels, createNotificationChannel, getNotificationChannel, updateNotificationChannel, deleteNotificationChannel, } from '../funcs/notifications.js';
4
+ import { listBillingNotificationChannels, createBillingNotificationChannel, getBillingNotificationChannel, updateBillingNotificationChannel, deleteBillingNotificationChannel, } from '../funcs/notifications.js';
5
5
  export class Notifications {
6
6
  _client;
7
7
  constructor(_client) {
@@ -14,8 +14,8 @@ export class Notifications {
14
14
  *
15
15
  * GET /openmeter/notification/channels
16
16
  */
17
- async listChannels(request, options) {
18
- return unwrap(await listNotificationChannels(this._client, request, options));
17
+ async listBillingChannels(request, options) {
18
+ return unwrap(await listBillingNotificationChannels(this._client, request, options));
19
19
  }
20
20
  /**
21
21
  * List notification channels
@@ -26,8 +26,8 @@ export class Notifications {
26
26
  *
27
27
  * GET /openmeter/notification/channels
28
28
  */
29
- listChannelsAll(request, options) {
30
- return paginatePages((req, opts) => listNotificationChannels(this._client, req, opts), request ?? {}, options);
29
+ listBillingChannelsAll(request, options) {
30
+ return paginatePages((req, opts) => listBillingNotificationChannels(this._client, req, opts), request ?? {}, options);
31
31
  }
32
32
  /**
33
33
  * Create notification channel
@@ -36,8 +36,8 @@ export class Notifications {
36
36
  *
37
37
  * POST /openmeter/notification/channels
38
38
  */
39
- async createChannel(request, options) {
40
- return unwrap(await createNotificationChannel(this._client, request, options));
39
+ async createBillingChannel(request, options) {
40
+ return unwrap(await createBillingNotificationChannel(this._client, request, options));
41
41
  }
42
42
  /**
43
43
  * Get notification channel
@@ -46,8 +46,8 @@ export class Notifications {
46
46
  *
47
47
  * GET /openmeter/notification/channels/{notificationChannelId}
48
48
  */
49
- async getChannel(request, options) {
50
- return unwrap(await getNotificationChannel(this._client, request, options));
49
+ async getBillingChannel(request, options) {
50
+ return unwrap(await getBillingNotificationChannel(this._client, request, options));
51
51
  }
52
52
  /**
53
53
  * Update notification channel
@@ -56,8 +56,8 @@ export class Notifications {
56
56
  *
57
57
  * PUT /openmeter/notification/channels/{notificationChannelId}
58
58
  */
59
- async updateChannel(request, options) {
60
- return unwrap(await updateNotificationChannel(this._client, request, options));
59
+ async updateBillingChannel(request, options) {
60
+ return unwrap(await updateBillingNotificationChannel(this._client, request, options));
61
61
  }
62
62
  /**
63
63
  * Delete notification channel
@@ -66,7 +66,7 @@ export class Notifications {
66
66
  *
67
67
  * DELETE /openmeter/notification/channels/{notificationChannelId}
68
68
  */
69
- async deleteChannel(request, options) {
70
- return unwrap(await deleteNotificationChannel(this._client, request, options));
69
+ async deleteBillingChannel(request, options) {
70
+ return unwrap(await deleteBillingNotificationChannel(this._client, request, options));
71
71
  }
72
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta.236",
3
+ "version": "1.0.0-beta.237",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",
@@ -26,7 +26,7 @@
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
28
  "ky": "^2.0.2",
29
- "zod": "^4.4.3"
29
+ "zod": "^4.6.7"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "26.1.1",