@openmeter/client 1.0.0-beta.236 → 1.0.0-beta.238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -22
- package/dist/funcs/charges.d.ts +11 -1
- package/dist/funcs/charges.js +45 -1
- package/dist/funcs/customers.d.ts +29 -1
- package/dist/funcs/customers.js +96 -2
- package/dist/funcs/features.js +1 -1
- package/dist/funcs/notifications.d.ts +15 -15
- package/dist/funcs/notifications.js +73 -73
- package/dist/index.d.ts +1 -1
- package/dist/lib/paginate.d.ts +12 -6
- package/dist/lib/paginate.js +23 -9
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/charges.d.ts +16 -3
- package/dist/models/operations/customers.d.ts +26 -6
- package/dist/models/operations/entitlementAccess.d.ts +3 -2
- package/dist/models/operations/events.d.ts +3 -2
- package/dist/models/operations/features.d.ts +1 -1
- package/dist/models/operations/notifications.d.ts +33 -33
- package/dist/models/schemas.d.ts +93856 -42843
- package/dist/models/schemas.js +5228 -911
- package/dist/models/types.d.ts +2626 -378
- package/dist/sdk/charges.d.ts +11 -1
- package/dist/sdk/charges.js +13 -1
- package/dist/sdk/customers.d.ts +15 -1
- package/dist/sdk/customers.js +17 -1
- package/dist/sdk/internal.d.ts +39 -12
- package/dist/sdk/internal.js +60 -23
- package/dist/sdk/notifications.d.ts +7 -7
- package/dist/sdk/notifications.js +13 -13
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementGrant, EntitlementGrantCreateRequest, EntitlementGrantPagePaginatedResponse, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, ResetCustomerEntitlementUsageRequestInput, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
|
|
2
|
+
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequestInput, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreateEntitlementRequestInput, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerProfile, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, Entitlement, EntitlementGrant, EntitlementGrantCreateRequest, EntitlementGrantPagePaginatedResponse, EntitlementHistory, EntitlementHistoryWindowSize, EntitlementPagePaginatedResponse, GetCreditBalanceParamsFilter, InvoiceCustomerChargesInput, InvoiceCustomerChargesResult, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomerChargesParamsFilter, ListCustomerEntitlementsParamsFilter, ListCustomersParamsFilter, ResetCustomerEntitlementUsageRequestInput, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerBillingProfileRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
|
|
3
3
|
export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
|
|
4
4
|
export type CreateCustomerResponse = Customer;
|
|
5
5
|
export type GetCustomerRequest = {
|
|
@@ -50,6 +50,11 @@ export type UpdateCustomerBillingRequest = AcceptDateStrings<{
|
|
|
50
50
|
body: UpsertCustomerBillingDataRequest;
|
|
51
51
|
}>;
|
|
52
52
|
export type UpdateCustomerBillingResponse = CustomerData;
|
|
53
|
+
export type UpdateCustomerBillingProfileRequest = AcceptDateStrings<{
|
|
54
|
+
customerId: string;
|
|
55
|
+
body: UpsertCustomerBillingProfileRequest;
|
|
56
|
+
}>;
|
|
57
|
+
export type UpdateCustomerBillingProfileResponse = CustomerProfile;
|
|
53
58
|
export type UpdateCustomerBillingAppDataRequest = AcceptDateStrings<{
|
|
54
59
|
customerId: string;
|
|
55
60
|
body: UpsertAppCustomerDataRequest;
|
|
@@ -133,7 +138,7 @@ export type ListCustomerEntitlementsResponse = EntitlementPagePaginatedResponse;
|
|
|
133
138
|
export type ResetCustomerEntitlementUsageRequest = AcceptDateStrings<{
|
|
134
139
|
customerId: string;
|
|
135
140
|
entitlementId: string;
|
|
136
|
-
body
|
|
141
|
+
body?: ResetCustomerEntitlementUsageRequestInput;
|
|
137
142
|
}>;
|
|
138
143
|
export type ResetCustomerEntitlementUsageResponse = void;
|
|
139
144
|
export type DeleteCustomerEntitlementRequest = {
|
|
@@ -189,6 +194,12 @@ export interface ListCreditGrantsQuery {
|
|
|
189
194
|
size?: number;
|
|
190
195
|
number?: number;
|
|
191
196
|
};
|
|
197
|
+
/**
|
|
198
|
+
* Sort credit grants by `created_at`, `updated_at`, `name`, or `id`. Defaults to
|
|
199
|
+
* `created_at desc`. The `asc` suffix is optional when a sort attribute is
|
|
200
|
+
* supplied. Supports one attribute; ties are broken by `id` in the same direction.
|
|
201
|
+
*/
|
|
202
|
+
sort?: SortQueryInput;
|
|
192
203
|
/** Filter credit grants returned in the response. */
|
|
193
204
|
filter?: ListCreditGrantsParamsFilter;
|
|
194
205
|
}
|
|
@@ -198,7 +209,9 @@ export type ListCreditGrantsRequest = AcceptDateStrings<ListCreditGrantsQuery &
|
|
|
198
209
|
export type ListCreditGrantsResponse = CreditGrantPagePaginatedResponse;
|
|
199
210
|
export interface GetCustomerCreditBalanceQuery {
|
|
200
211
|
/**
|
|
201
|
-
* Return
|
|
212
|
+
* Return credit balances at this timestamp using all currently recorded postings,
|
|
213
|
+
* including corrections recorded later. This is not a snapshot of what was known
|
|
214
|
+
* at the requested time.
|
|
202
215
|
*
|
|
203
216
|
* Defaults to the current time. Historical responses return `live` as zero because
|
|
204
217
|
* live charge impacts are only available for current balances.
|
|
@@ -218,7 +231,7 @@ export type CreateCreditAdjustmentResponse = CreditAdjustment;
|
|
|
218
231
|
export type VoidCreditGrantRequest = AcceptDateStrings<{
|
|
219
232
|
customerId: string;
|
|
220
233
|
creditGrantId: string;
|
|
221
|
-
body
|
|
234
|
+
body?: VoidCreditGrantRequestInput;
|
|
222
235
|
}>;
|
|
223
236
|
export type VoidCreditGrantResponse = CreditGrant;
|
|
224
237
|
export type UpdateCreditGrantExternalSettlementRequest = AcceptDateStrings<{
|
|
@@ -271,8 +284,10 @@ export interface ListCustomerChargesQuery {
|
|
|
271
284
|
*
|
|
272
285
|
* Supported values are:
|
|
273
286
|
*
|
|
274
|
-
* - `real_time_usage`:
|
|
275
|
-
* and
|
|
287
|
+
* - `real_time_usage`: Set `usage` and `totals.realtime` for active usage-based
|
|
288
|
+
* charges and created usage-based charges whose effective service period
|
|
289
|
+
* contains the current time (inclusive start, exclusive end). Deleted charges
|
|
290
|
+
* are skipped.
|
|
276
291
|
* - `customer`: Expand the charge's customer to the complete entity.
|
|
277
292
|
* - `feature`: Expand the charge's feature to the complete entity.
|
|
278
293
|
* - `subscription`: Expand the charge's subscription to the complete entity.
|
|
@@ -292,3 +307,8 @@ export type CreateCustomerChargesRequest = AcceptDateStrings<{
|
|
|
292
307
|
body: CreateChargeRequestInput;
|
|
293
308
|
}>;
|
|
294
309
|
export type CreateCustomerChargesResponse = Charge;
|
|
310
|
+
export type InvoiceCustomerChargesRequest = AcceptDateStrings<{
|
|
311
|
+
customerId: string;
|
|
312
|
+
body?: InvoiceCustomerChargesInput;
|
|
313
|
+
}>;
|
|
314
|
+
export type InvoiceCustomerChargesResponse = InvoiceCustomerChargesResult;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { EntitlementAccessQueryPage, EntitlementAccessQueryRequestInput, EntitlementAccessQueryResponse } from '../types.js';
|
|
3
3
|
export interface QueryEntitlementAccessQuery {
|
|
4
|
-
page
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: EntitlementAccessQueryPage;
|
|
5
6
|
}
|
|
6
7
|
export type QueryEntitlementAccessRequest = AcceptDateStrings<{
|
|
7
8
|
body: EntitlementAccessQueryRequestInput;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { EventInput, IngestedEventPaginatedResponse, ListEventsPage, ListEventsParamsFilter, SortQueryInput } from '../types.js';
|
|
3
3
|
export interface ListMeteringEventsQuery {
|
|
4
|
-
page
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: ListEventsPage;
|
|
5
6
|
/**
|
|
6
7
|
* Filter events returned in the response.
|
|
7
8
|
*
|
|
@@ -45,6 +45,6 @@ export type DeleteFeatureRequest = {
|
|
|
45
45
|
export type DeleteFeatureResponse = void;
|
|
46
46
|
export type QueryFeatureCostRequest = AcceptDateStrings<{
|
|
47
47
|
featureId: string;
|
|
48
|
-
body
|
|
48
|
+
body?: MeterQueryRequestInput;
|
|
49
49
|
}>;
|
|
50
50
|
export type QueryFeatureCostResponse = FeatureCostQueryResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { CreateNotificationChannelRequestInput, ListNotificationChannelsParamsFilter, ListNotificationEventsParamsFilter, ListNotificationRulesParamsFilter, NotificationChannel, NotificationChannelPagePaginatedResponse, NotificationEvent, NotificationEventPagePaginatedResponse, NotificationRule, NotificationRulePagePaginatedResponse, NotificationRuleRequestInput, ResendBillingNotificationEventRequest, SortQueryInput, UpdateBillingNotificationChannelRequestInput } from '../types.js';
|
|
3
|
-
export interface
|
|
2
|
+
import type { CreateNotificationChannelRequestInput, ListNotificationChannelsParamsFilter, ListNotificationEventsParamsFilter, ListNotificationRulesParamsFilter, NotificationChannel, NotificationChannelPagePaginatedResponse, NotificationEvent, NotificationEventPagePaginatedResponse, NotificationRule, NotificationRulePagePaginatedResponse, NotificationRuleRequestInput, ResendBillingNotificationEventRequest as ResendBillingNotificationEventRequestBody, SortQueryInput, UpdateBillingNotificationChannelRequestInput } from '../types.js';
|
|
3
|
+
export interface ListBillingNotificationChannelsQuery {
|
|
4
4
|
/** Determines which page of the collection to retrieve. */
|
|
5
5
|
page?: {
|
|
6
6
|
size?: number;
|
|
@@ -27,24 +27,24 @@ export interface ListNotificationChannelsQuery {
|
|
|
27
27
|
*/
|
|
28
28
|
filter?: ListNotificationChannelsParamsFilter;
|
|
29
29
|
}
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
32
|
-
export type
|
|
33
|
-
export type
|
|
34
|
-
export type
|
|
30
|
+
export type ListBillingNotificationChannelsRequest = AcceptDateStrings<ListBillingNotificationChannelsQuery>;
|
|
31
|
+
export type ListBillingNotificationChannelsResponse = NotificationChannelPagePaginatedResponse;
|
|
32
|
+
export type CreateBillingNotificationChannelRequest = AcceptDateStrings<CreateNotificationChannelRequestInput>;
|
|
33
|
+
export type CreateBillingNotificationChannelResponse = NotificationChannel;
|
|
34
|
+
export type GetBillingNotificationChannelRequest = {
|
|
35
35
|
notificationChannelId: string;
|
|
36
36
|
};
|
|
37
|
-
export type
|
|
38
|
-
export type
|
|
37
|
+
export type GetBillingNotificationChannelResponse = NotificationChannel;
|
|
38
|
+
export type UpdateBillingNotificationChannelRequest = AcceptDateStrings<{
|
|
39
39
|
notificationChannelId: string;
|
|
40
40
|
body: UpdateBillingNotificationChannelRequestInput;
|
|
41
41
|
}>;
|
|
42
|
-
export type
|
|
43
|
-
export type
|
|
42
|
+
export type UpdateBillingNotificationChannelResponse = NotificationChannel;
|
|
43
|
+
export type DeleteBillingNotificationChannelRequest = {
|
|
44
44
|
notificationChannelId: string;
|
|
45
45
|
};
|
|
46
|
-
export type
|
|
47
|
-
export interface
|
|
46
|
+
export type DeleteBillingNotificationChannelResponse = void;
|
|
47
|
+
export interface ListBillingNotificationRulesQuery {
|
|
48
48
|
/** Determines which page of the collection to retrieve. */
|
|
49
49
|
page?: {
|
|
50
50
|
size?: number;
|
|
@@ -73,28 +73,28 @@ export interface ListNotificationRulesQuery {
|
|
|
73
73
|
*/
|
|
74
74
|
filter?: ListNotificationRulesParamsFilter;
|
|
75
75
|
}
|
|
76
|
-
export type
|
|
77
|
-
export type
|
|
78
|
-
export type
|
|
79
|
-
export type
|
|
80
|
-
export type
|
|
76
|
+
export type ListBillingNotificationRulesRequest = AcceptDateStrings<ListBillingNotificationRulesQuery>;
|
|
77
|
+
export type ListBillingNotificationRulesResponse = NotificationRulePagePaginatedResponse;
|
|
78
|
+
export type CreateBillingNotificationRuleRequest = AcceptDateStrings<NotificationRuleRequestInput>;
|
|
79
|
+
export type CreateBillingNotificationRuleResponse = NotificationRule;
|
|
80
|
+
export type GetBillingNotificationRuleRequest = {
|
|
81
81
|
notificationRuleId: string;
|
|
82
82
|
};
|
|
83
|
-
export type
|
|
84
|
-
export type
|
|
83
|
+
export type GetBillingNotificationRuleResponse = NotificationRule;
|
|
84
|
+
export type UpdateBillingNotificationRuleRequest = AcceptDateStrings<{
|
|
85
85
|
notificationRuleId: string;
|
|
86
86
|
body: NotificationRuleRequestInput;
|
|
87
87
|
}>;
|
|
88
|
-
export type
|
|
89
|
-
export type
|
|
88
|
+
export type UpdateBillingNotificationRuleResponse = NotificationRule;
|
|
89
|
+
export type DeleteBillingNotificationRuleRequest = {
|
|
90
90
|
notificationRuleId: string;
|
|
91
91
|
};
|
|
92
|
-
export type
|
|
93
|
-
export type
|
|
92
|
+
export type DeleteBillingNotificationRuleResponse = void;
|
|
93
|
+
export type TestBillingNotificationRuleRequest = {
|
|
94
94
|
notificationRuleId: string;
|
|
95
95
|
};
|
|
96
|
-
export type
|
|
97
|
-
export interface
|
|
96
|
+
export type TestBillingNotificationRuleResponse = NotificationEvent;
|
|
97
|
+
export interface ListBillingNotificationEventsQuery {
|
|
98
98
|
/** Determines which page of the collection to retrieve. */
|
|
99
99
|
page?: {
|
|
100
100
|
size?: number;
|
|
@@ -124,14 +124,14 @@ export interface ListNotificationEventsQuery {
|
|
|
124
124
|
*/
|
|
125
125
|
filter?: ListNotificationEventsParamsFilter;
|
|
126
126
|
}
|
|
127
|
-
export type
|
|
128
|
-
export type
|
|
129
|
-
export type
|
|
127
|
+
export type ListBillingNotificationEventsRequest = AcceptDateStrings<ListBillingNotificationEventsQuery>;
|
|
128
|
+
export type ListBillingNotificationEventsResponse = NotificationEventPagePaginatedResponse;
|
|
129
|
+
export type GetBillingNotificationEventRequest = {
|
|
130
130
|
notificationEventId: string;
|
|
131
131
|
};
|
|
132
|
-
export type
|
|
133
|
-
export type
|
|
132
|
+
export type GetBillingNotificationEventResponse = NotificationEvent;
|
|
133
|
+
export type ResendBillingNotificationEventRequest = AcceptDateStrings<{
|
|
134
134
|
notificationEventId: string;
|
|
135
|
-
body:
|
|
135
|
+
body: ResendBillingNotificationEventRequestBody;
|
|
136
136
|
}>;
|
|
137
|
-
export type
|
|
137
|
+
export type ResendBillingNotificationEventResponse = void;
|