@openmeter/client 1.0.0-beta.235 → 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,6 +1,10 @@
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';
5
+ import type { ExecuteAppActionRequest, ExecuteAppActionResponse } from '../models/operations/apps.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';
7
+ import type { NotificationEvent, NotificationRule } from '../models/types.js';
4
8
  /**
5
9
  * Operations marked internal in the API definition. They are not part of
6
10
  * the customer surface: they may require additional permissions, and they
@@ -9,8 +13,38 @@ import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, U
9
13
  export declare class Internal {
10
14
  private readonly _client;
11
15
  constructor(_client: Client);
16
+ private _customers?;
17
+ get customers(): InternalCustomers;
12
18
  private _subscriptions?;
13
19
  get subscriptions(): InternalSubscriptions;
20
+ private _apps?;
21
+ get apps(): InternalApps;
22
+ private _notifications?;
23
+ get notifications(): InternalNotifications;
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>;
14
48
  }
15
49
  export declare class InternalSubscriptions {
16
50
  private readonly _client;
@@ -34,3 +68,118 @@ export declare class InternalSubscriptions {
34
68
  */
35
69
  updateAddon(request: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise<UpdateSubscriptionAddonResponse>;
36
70
  }
71
+ export declare class InternalApps {
72
+ private readonly _client;
73
+ constructor(_client: Client);
74
+ /**
75
+ * Execute app action
76
+ *
77
+ * Execute an operator action on an installed app. The action must be listed in the
78
+ * app's `actions`; otherwise the request is rejected.
79
+ *
80
+ * POST /openmeter/apps/{appId}/action
81
+ */
82
+ executeAction(request: ExecuteAppActionRequest, options?: RequestOptions): Promise<ExecuteAppActionResponse>;
83
+ }
84
+ export declare class InternalNotifications {
85
+ private readonly _client;
86
+ constructor(_client: Client);
87
+ /**
88
+ * List notification rules
89
+ *
90
+ * List all notification rules.
91
+ *
92
+ * GET /openmeter/notification/rules
93
+ */
94
+ listBillingRules(request?: ListBillingNotificationRulesRequest, options?: RequestOptions): Promise<ListBillingNotificationRulesResponse>;
95
+ /**
96
+ * List notification rules
97
+ *
98
+ * List all notification rules.
99
+ *
100
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
101
+ *
102
+ * GET /openmeter/notification/rules
103
+ */
104
+ listBillingRulesAll(request?: ListBillingNotificationRulesRequest, options?: RequestOptions): AsyncIterable<NotificationRule>;
105
+ /**
106
+ * Create notification rule
107
+ *
108
+ * Create a notification rule.
109
+ *
110
+ * POST /openmeter/notification/rules
111
+ */
112
+ createBillingRule(request: CreateBillingNotificationRuleRequest, options?: RequestOptions): Promise<CreateBillingNotificationRuleResponse>;
113
+ /**
114
+ * Get notification rule
115
+ *
116
+ * Get a notification rule by id.
117
+ *
118
+ * GET /openmeter/notification/rules/{notificationRuleId}
119
+ */
120
+ getBillingRule(request: GetBillingNotificationRuleRequest, options?: RequestOptions): Promise<GetBillingNotificationRuleResponse>;
121
+ /**
122
+ * Update notification rule
123
+ *
124
+ * Update a notification rule by id.
125
+ *
126
+ * PUT /openmeter/notification/rules/{notificationRuleId}
127
+ */
128
+ updateBillingRule(request: UpdateBillingNotificationRuleRequest, options?: RequestOptions): Promise<UpdateBillingNotificationRuleResponse>;
129
+ /**
130
+ * Delete notification rule
131
+ *
132
+ * Delete a notification rule by id.
133
+ *
134
+ * DELETE /openmeter/notification/rules/{notificationRuleId}
135
+ */
136
+ deleteBillingRule(request: DeleteBillingNotificationRuleRequest, options?: RequestOptions): Promise<DeleteBillingNotificationRuleResponse>;
137
+ /**
138
+ * Test notification rule
139
+ *
140
+ * Test a notification rule by generating an event with sample data and delivering
141
+ * it to the rule's channels. The test event is persisted and listed like any other
142
+ * event.
143
+ *
144
+ * POST /openmeter/notification/rules/{notificationRuleId}/test
145
+ */
146
+ testBillingRule(request: TestBillingNotificationRuleRequest, options?: RequestOptions): Promise<TestBillingNotificationRuleResponse>;
147
+ /**
148
+ * List notification events
149
+ *
150
+ * List all notification events.
151
+ *
152
+ * GET /openmeter/notification/events
153
+ */
154
+ listBillingEvents(request?: ListBillingNotificationEventsRequest, options?: RequestOptions): Promise<ListBillingNotificationEventsResponse>;
155
+ /**
156
+ * List notification events
157
+ *
158
+ * List all notification events.
159
+ *
160
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
161
+ *
162
+ * GET /openmeter/notification/events
163
+ */
164
+ listBillingEventsAll(request?: ListBillingNotificationEventsRequest, options?: RequestOptions): AsyncIterable<NotificationEvent>;
165
+ /**
166
+ * Get notification event
167
+ *
168
+ * Get a notification event by id.
169
+ *
170
+ * GET /openmeter/notification/events/{notificationEventId}
171
+ */
172
+ getBillingEvent(request: GetBillingNotificationEventRequest, options?: RequestOptions): Promise<GetBillingNotificationEventResponse>;
173
+ /**
174
+ * Resend notification event
175
+ *
176
+ * Resend a notification event to the channels of the rule that generated it.
177
+ *
178
+ * Delivery is asynchronous: the request marks the selected channels for redelivery
179
+ * and returns immediately. Channels whose delivery is still pending or already
180
+ * being resent are left untouched.
181
+ *
182
+ * POST /openmeter/notification/events/{notificationEventId}/resend
183
+ */
184
+ resendBillingEvent(request: ResendBillingNotificationEventRequest, options?: RequestOptions): Promise<ResendBillingNotificationEventResponse>;
185
+ }
@@ -1,6 +1,10 @@
1
1
  // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
2
  import { unwrap } from '../lib/types.js';
3
+ import { paginatePages } from '../lib/paginate.js';
4
+ import { invoiceCustomerCharges } from '../funcs/customers.js';
3
5
  import { createSubscriptionAddon, updateSubscriptionAddon, } from '../funcs/subscriptions.js';
6
+ import { executeAppAction } from '../funcs/apps.js';
7
+ import { listBillingNotificationRules, createBillingNotificationRule, getBillingNotificationRule, updateBillingNotificationRule, deleteBillingNotificationRule, testBillingNotificationRule, listBillingNotificationEvents, getBillingNotificationEvent, resendBillingNotificationEvent, } from '../funcs/notifications.js';
4
8
  /**
5
9
  * Operations marked internal in the API definition. They are not part of
6
10
  * the customer surface: they may require additional permissions, and they
@@ -11,10 +15,54 @@ export class Internal {
11
15
  constructor(_client) {
12
16
  this._client = _client;
13
17
  }
18
+ _customers;
19
+ get customers() {
20
+ return (this._customers ??= new InternalCustomers(this._client));
21
+ }
14
22
  _subscriptions;
15
23
  get subscriptions() {
16
24
  return (this._subscriptions ??= new InternalSubscriptions(this._client));
17
25
  }
26
+ _apps;
27
+ get apps() {
28
+ return (this._apps ??= new InternalApps(this._client));
29
+ }
30
+ _notifications;
31
+ get notifications() {
32
+ return (this._notifications ??= new InternalNotifications(this._client));
33
+ }
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
+ }
18
66
  }
19
67
  export class InternalSubscriptions {
20
68
  _client;
@@ -44,3 +92,146 @@ export class InternalSubscriptions {
44
92
  return unwrap(await updateSubscriptionAddon(this._client, request, options));
45
93
  }
46
94
  }
95
+ export class InternalApps {
96
+ _client;
97
+ constructor(_client) {
98
+ this._client = _client;
99
+ }
100
+ /**
101
+ * Execute app action
102
+ *
103
+ * Execute an operator action on an installed app. The action must be listed in the
104
+ * app's `actions`; otherwise the request is rejected.
105
+ *
106
+ * POST /openmeter/apps/{appId}/action
107
+ */
108
+ async executeAction(request, options) {
109
+ return unwrap(await executeAppAction(this._client, request, options));
110
+ }
111
+ }
112
+ export class InternalNotifications {
113
+ _client;
114
+ constructor(_client) {
115
+ this._client = _client;
116
+ }
117
+ /**
118
+ * List notification rules
119
+ *
120
+ * List all notification rules.
121
+ *
122
+ * GET /openmeter/notification/rules
123
+ */
124
+ async listBillingRules(request, options) {
125
+ return unwrap(await listBillingNotificationRules(this._client, request, options));
126
+ }
127
+ /**
128
+ * List notification rules
129
+ *
130
+ * List all notification rules.
131
+ *
132
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
133
+ *
134
+ * GET /openmeter/notification/rules
135
+ */
136
+ listBillingRulesAll(request, options) {
137
+ return paginatePages((req, opts) => listBillingNotificationRules(this._client, req, opts), request ?? {}, options);
138
+ }
139
+ /**
140
+ * Create notification rule
141
+ *
142
+ * Create a notification rule.
143
+ *
144
+ * POST /openmeter/notification/rules
145
+ */
146
+ async createBillingRule(request, options) {
147
+ return unwrap(await createBillingNotificationRule(this._client, request, options));
148
+ }
149
+ /**
150
+ * Get notification rule
151
+ *
152
+ * Get a notification rule by id.
153
+ *
154
+ * GET /openmeter/notification/rules/{notificationRuleId}
155
+ */
156
+ async getBillingRule(request, options) {
157
+ return unwrap(await getBillingNotificationRule(this._client, request, options));
158
+ }
159
+ /**
160
+ * Update notification rule
161
+ *
162
+ * Update a notification rule by id.
163
+ *
164
+ * PUT /openmeter/notification/rules/{notificationRuleId}
165
+ */
166
+ async updateBillingRule(request, options) {
167
+ return unwrap(await updateBillingNotificationRule(this._client, request, options));
168
+ }
169
+ /**
170
+ * Delete notification rule
171
+ *
172
+ * Delete a notification rule by id.
173
+ *
174
+ * DELETE /openmeter/notification/rules/{notificationRuleId}
175
+ */
176
+ async deleteBillingRule(request, options) {
177
+ return unwrap(await deleteBillingNotificationRule(this._client, request, options));
178
+ }
179
+ /**
180
+ * Test notification rule
181
+ *
182
+ * Test a notification rule by generating an event with sample data and delivering
183
+ * it to the rule's channels. The test event is persisted and listed like any other
184
+ * event.
185
+ *
186
+ * POST /openmeter/notification/rules/{notificationRuleId}/test
187
+ */
188
+ async testBillingRule(request, options) {
189
+ return unwrap(await testBillingNotificationRule(this._client, request, options));
190
+ }
191
+ /**
192
+ * List notification events
193
+ *
194
+ * List all notification events.
195
+ *
196
+ * GET /openmeter/notification/events
197
+ */
198
+ async listBillingEvents(request, options) {
199
+ return unwrap(await listBillingNotificationEvents(this._client, request, options));
200
+ }
201
+ /**
202
+ * List notification events
203
+ *
204
+ * List all notification events.
205
+ *
206
+ * Iterates every item across all pages, fetching more as the returned iterable is consumed.
207
+ *
208
+ * GET /openmeter/notification/events
209
+ */
210
+ listBillingEventsAll(request, options) {
211
+ return paginatePages((req, opts) => listBillingNotificationEvents(this._client, req, opts), request ?? {}, options);
212
+ }
213
+ /**
214
+ * Get notification event
215
+ *
216
+ * Get a notification event by id.
217
+ *
218
+ * GET /openmeter/notification/events/{notificationEventId}
219
+ */
220
+ async getBillingEvent(request, options) {
221
+ return unwrap(await getBillingNotificationEvent(this._client, request, options));
222
+ }
223
+ /**
224
+ * Resend notification event
225
+ *
226
+ * Resend a notification event to the channels of the rule that generated it.
227
+ *
228
+ * Delivery is asynchronous: the request marks the selected channels for redelivery
229
+ * and returns immediately. Channels whose delivery is still pending or already
230
+ * being resent are left untouched.
231
+ *
232
+ * POST /openmeter/notification/events/{notificationEventId}/resend
233
+ */
234
+ async resendBillingEvent(request, options) {
235
+ return unwrap(await resendBillingNotificationEvent(this._client, request, options));
236
+ }
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.235",
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",