@openmeter/client 1.0.0-beta.232 → 1.0.0-beta.234
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -43
- package/dist/funcs/apps.js +7 -2
- package/dist/funcs/billing.js +7 -2
- package/dist/funcs/charges.d.ts +14 -0
- package/dist/funcs/charges.js +42 -0
- package/dist/funcs/customers.d.ts +112 -1
- package/dist/funcs/customers.js +430 -0
- package/dist/funcs/{governance.d.ts → entitlementAccess.d.ts} +4 -4
- package/dist/funcs/{governance.js → entitlementAccess.js} +10 -10
- package/dist/funcs/entitlements.d.ts +46 -1
- package/dist/funcs/entitlements.js +213 -1
- package/dist/funcs/grants.d.ts +24 -0
- package/dist/funcs/grants.js +78 -0
- package/dist/funcs/index.d.ts +4 -1
- package/dist/funcs/index.js +4 -1
- package/dist/funcs/notifications.d.ts +43 -0
- package/dist/funcs/notifications.js +163 -0
- package/dist/funcs/planAddons.js +7 -2
- package/dist/funcs/subscriptions.d.ts +60 -1
- package/dist/funcs/subscriptions.js +204 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/wire.js +62 -6
- package/dist/models/operations/apps.d.ts +17 -1
- package/dist/models/operations/billing.d.ts +19 -1
- package/dist/models/operations/charges.d.ts +54 -0
- package/dist/models/operations/customers.d.ts +127 -5
- package/dist/models/operations/entitlementAccess.d.ts +9 -0
- package/dist/models/operations/entitlementAccess.js +2 -0
- package/dist/models/operations/entitlements.d.ts +73 -1
- package/dist/models/operations/grants.d.ts +43 -0
- package/dist/models/operations/grants.js +2 -0
- package/dist/models/operations/notifications.d.ts +46 -0
- package/dist/models/operations/notifications.js +2 -0
- package/dist/models/operations/planAddons.d.ts +14 -1
- package/dist/models/operations/subscriptions.d.ts +27 -3
- package/dist/models/schemas.d.ts +51330 -23237
- package/dist/models/schemas.js +4837 -1735
- package/dist/models/types.d.ts +4758 -1592
- package/dist/sdk/apps.d.ts +2 -44
- package/dist/sdk/apps.js +1 -53
- package/dist/sdk/customers.d.ts +2 -56
- package/dist/sdk/customers.js +1 -67
- package/dist/sdk/internal.d.ts +491 -28
- package/dist/sdk/internal.js +607 -30
- package/dist/sdk/invoices.d.ts +112 -0
- package/dist/sdk/invoices.js +115 -0
- package/dist/sdk/notifications.d.ts +58 -0
- package/dist/sdk/notifications.js +72 -0
- package/dist/sdk/planAddons.d.ts +1 -20
- package/dist/sdk/planAddons.js +1 -24
- package/dist/sdk/sdk.d.ts +3 -0
- package/dist/sdk/sdk.js +5 -0
- package/dist/sdk/subscriptions.d.ts +12 -1
- package/dist/sdk/subscriptions.js +14 -1
- package/package.json +1 -1
- package/dist/models/operations/governance.d.ts +0 -9
- /package/dist/models/operations/{governance.js → charges.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse,
|
|
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';
|
|
3
3
|
export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
|
|
4
4
|
export type CreateCustomerResponse = Customer;
|
|
5
5
|
export type GetCustomerRequest = {
|
|
@@ -65,6 +65,114 @@ export type CreateCustomerStripePortalSessionRequest = AcceptDateStrings<{
|
|
|
65
65
|
body: CustomerStripeCreateCustomerPortalSessionRequest;
|
|
66
66
|
}>;
|
|
67
67
|
export type CreateCustomerStripePortalSessionResponse = AppStripeCreateCustomerPortalSessionResult;
|
|
68
|
+
export type CreateCustomerEntitlementRequest = AcceptDateStrings<{
|
|
69
|
+
customerId: string;
|
|
70
|
+
body: CreateEntitlementRequestInput;
|
|
71
|
+
}>;
|
|
72
|
+
export type CreateCustomerEntitlementResponse = Entitlement;
|
|
73
|
+
export type OverrideCustomerEntitlementRequest = AcceptDateStrings<{
|
|
74
|
+
customerId: string;
|
|
75
|
+
entitlementId: string;
|
|
76
|
+
body: CreateEntitlementRequestInput;
|
|
77
|
+
}>;
|
|
78
|
+
export type OverrideCustomerEntitlementResponse = Entitlement;
|
|
79
|
+
export interface GetCustomerEntitlementHistoryQuery {
|
|
80
|
+
/**
|
|
81
|
+
* The start of the queried range. Defaults to the last reset. Truncated to the
|
|
82
|
+
* minute. The range may span at most 1000 windows.
|
|
83
|
+
*/
|
|
84
|
+
from?: Date;
|
|
85
|
+
/**
|
|
86
|
+
* The end of the queried range. Defaults to the current time. Truncated to the
|
|
87
|
+
* minute unless it is the current time.
|
|
88
|
+
*/
|
|
89
|
+
to?: Date;
|
|
90
|
+
/** The size of the windows the usage is grouped into. */
|
|
91
|
+
windowSize: EntitlementHistoryWindowSize;
|
|
92
|
+
/** The IANA time zone the windows are aligned to. */
|
|
93
|
+
timeZone?: string;
|
|
94
|
+
}
|
|
95
|
+
export type GetCustomerEntitlementHistoryRequest = AcceptDateStrings<GetCustomerEntitlementHistoryQuery & {
|
|
96
|
+
customerId: string;
|
|
97
|
+
entitlementId: string;
|
|
98
|
+
}>;
|
|
99
|
+
export type GetCustomerEntitlementHistoryResponse = EntitlementHistory;
|
|
100
|
+
export type GetCustomerEntitlementRequest = {
|
|
101
|
+
customerId: string;
|
|
102
|
+
entitlementId: string;
|
|
103
|
+
};
|
|
104
|
+
export type GetCustomerEntitlementResponse = Entitlement;
|
|
105
|
+
export interface ListCustomerEntitlementsQuery {
|
|
106
|
+
/** Determines which page of the collection to retrieve. */
|
|
107
|
+
page?: {
|
|
108
|
+
size?: number;
|
|
109
|
+
number?: number;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Sort entitlements returned in the response. Supported sort attributes are:
|
|
113
|
+
*
|
|
114
|
+
* - `created_at` (default)
|
|
115
|
+
* - `updated_at`
|
|
116
|
+
*
|
|
117
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
118
|
+
* suffix is used to specify a descending order.
|
|
119
|
+
*/
|
|
120
|
+
sort?: SortQueryInput;
|
|
121
|
+
/**
|
|
122
|
+
* Filter entitlements returned in the response.
|
|
123
|
+
*
|
|
124
|
+
* To filter entitlements by feature key add the following query param:
|
|
125
|
+
* `filter[feature_key]=my-feature`
|
|
126
|
+
*/
|
|
127
|
+
filter?: ListCustomerEntitlementsParamsFilter;
|
|
128
|
+
}
|
|
129
|
+
export type ListCustomerEntitlementsRequest = AcceptDateStrings<ListCustomerEntitlementsQuery & {
|
|
130
|
+
customerId: string;
|
|
131
|
+
}>;
|
|
132
|
+
export type ListCustomerEntitlementsResponse = EntitlementPagePaginatedResponse;
|
|
133
|
+
export type ResetCustomerEntitlementUsageRequest = AcceptDateStrings<{
|
|
134
|
+
customerId: string;
|
|
135
|
+
entitlementId: string;
|
|
136
|
+
body: ResetCustomerEntitlementUsageRequestInput;
|
|
137
|
+
}>;
|
|
138
|
+
export type ResetCustomerEntitlementUsageResponse = void;
|
|
139
|
+
export type DeleteCustomerEntitlementRequest = {
|
|
140
|
+
customerId: string;
|
|
141
|
+
entitlementId: string;
|
|
142
|
+
};
|
|
143
|
+
export type DeleteCustomerEntitlementResponse = void;
|
|
144
|
+
export type CreateCustomerEntitlementGrantRequest = AcceptDateStrings<{
|
|
145
|
+
customerId: string;
|
|
146
|
+
entitlementId: string;
|
|
147
|
+
body: EntitlementGrantCreateRequest;
|
|
148
|
+
}>;
|
|
149
|
+
export type CreateCustomerEntitlementGrantResponse = EntitlementGrant;
|
|
150
|
+
export interface ListCustomerEntitlementGrantsQuery {
|
|
151
|
+
/** Determines which page of the collection to retrieve. */
|
|
152
|
+
page?: {
|
|
153
|
+
size?: number;
|
|
154
|
+
number?: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Sort grants returned in the response. Supported sort attributes are:
|
|
158
|
+
*
|
|
159
|
+
* - `created_at` (default)
|
|
160
|
+
* - `updated_at`
|
|
161
|
+
* - `effective_at`
|
|
162
|
+
* - `expires_at`
|
|
163
|
+
*
|
|
164
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
165
|
+
* suffix is used to specify a descending order.
|
|
166
|
+
*/
|
|
167
|
+
sort?: SortQueryInput;
|
|
168
|
+
/** Include deleted grants in the response. */
|
|
169
|
+
includeDeleted?: boolean;
|
|
170
|
+
}
|
|
171
|
+
export type ListCustomerEntitlementGrantsRequest = AcceptDateStrings<ListCustomerEntitlementGrantsQuery & {
|
|
172
|
+
customerId: string;
|
|
173
|
+
entitlementId: string;
|
|
174
|
+
}>;
|
|
175
|
+
export type ListCustomerEntitlementGrantsResponse = EntitlementGrantPagePaginatedResponse;
|
|
68
176
|
export type CreateCreditGrantRequest = AcceptDateStrings<{
|
|
69
177
|
customerId: string;
|
|
70
178
|
body: CreateCreditGrantRequestInput;
|
|
@@ -150,16 +258,30 @@ export interface ListCustomerChargesQuery {
|
|
|
150
258
|
*
|
|
151
259
|
* To filter charges by status add the following query param:
|
|
152
260
|
* `filter[status][oeq]=created,active`
|
|
261
|
+
*
|
|
262
|
+
* To filter charges by feature, use `filter[feature_id][oeq]=<id>,<id>` or
|
|
263
|
+
* `filter[feature_key][oeq]=<key>,<key>`.
|
|
264
|
+
*
|
|
265
|
+
* See the `service_period_from` filter field for expressing a service-period
|
|
266
|
+
* window query.
|
|
153
267
|
*/
|
|
154
|
-
filter?:
|
|
268
|
+
filter?: ListCustomerChargesParamsFilter;
|
|
155
269
|
/**
|
|
156
270
|
* Expand full objects for referenced entities.
|
|
157
271
|
*
|
|
158
272
|
* Supported values are:
|
|
159
273
|
*
|
|
160
|
-
* - `real_time_usage`: Expand the charge's real-time usage
|
|
274
|
+
* - `real_time_usage`: Expand the charge's real-time usage; it sets the `usage`
|
|
275
|
+
* and the `totals.realtime` fields.
|
|
276
|
+
* - `customer`: Expand the charge's customer to the complete entity.
|
|
277
|
+
* - `feature`: Expand the charge's feature to the complete entity.
|
|
278
|
+
* - `subscription`: Expand the charge's subscription to the complete entity.
|
|
279
|
+
* - `realization.invoice`: Expand each realization's invoice to the complete
|
|
280
|
+
* entity.
|
|
281
|
+
* - `realization.totals`: Expand each realization run's `totals`.
|
|
282
|
+
* - `realization.detailed_lines`: Expand each realization run's `detailed_lines`.
|
|
161
283
|
*/
|
|
162
|
-
expand?: 'real_time_usage'[];
|
|
284
|
+
expand?: ('real_time_usage' | 'customer' | 'feature' | 'subscription' | 'realization.invoice' | 'realization.totals' | 'realization.detailed_lines')[];
|
|
163
285
|
}
|
|
164
286
|
export type ListCustomerChargesRequest = AcceptDateStrings<ListCustomerChargesQuery & {
|
|
165
287
|
customerId: string;
|
|
@@ -167,6 +289,6 @@ export type ListCustomerChargesRequest = AcceptDateStrings<ListCustomerChargesQu
|
|
|
167
289
|
export type ListCustomerChargesResponse = ChargePagePaginatedResponse;
|
|
168
290
|
export type CreateCustomerChargesRequest = AcceptDateStrings<{
|
|
169
291
|
customerId: string;
|
|
170
|
-
body:
|
|
292
|
+
body: CreateChargeRequestInput;
|
|
171
293
|
}>;
|
|
172
294
|
export type CreateCustomerChargesResponse = Charge;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { CursorPaginationQueryPage, EntitlementAccessQueryRequestInput, EntitlementAccessQueryResponse } from '../types.js';
|
|
3
|
+
export interface QueryEntitlementAccessQuery {
|
|
4
|
+
page?: CursorPaginationQueryPage;
|
|
5
|
+
}
|
|
6
|
+
export type QueryEntitlementAccessRequest = AcceptDateStrings<{
|
|
7
|
+
body: EntitlementAccessQueryRequestInput;
|
|
8
|
+
} & QueryEntitlementAccessQuery>;
|
|
9
|
+
export type QueryEntitlementAccessResponse = EntitlementAccessQueryResponse;
|
|
@@ -1,5 +1,77 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { Entitlement, EntitlementAccessCheckResult, EntitlementFeatureValueResult, EntitlementPagePaginatedResponse, EntitlementValueResult, ListCustomerEntitlementAccessResponseData, ListEntitlementsParamsFilter, SortQueryInput } from '../types.js';
|
|
2
3
|
export type ListCustomerEntitlementAccessRequest = {
|
|
3
4
|
customerId: string;
|
|
4
5
|
};
|
|
5
6
|
export type ListCustomerEntitlementAccessResponse = ListCustomerEntitlementAccessResponseData;
|
|
7
|
+
export type GetCustomerEntitlementAccessRequest = {
|
|
8
|
+
customerId: string;
|
|
9
|
+
featureKey: string;
|
|
10
|
+
};
|
|
11
|
+
export type GetCustomerEntitlementAccessResponse = EntitlementAccessCheckResult;
|
|
12
|
+
export interface GetCustomerEntitlementValueByFeatureKeyQuery {
|
|
13
|
+
/**
|
|
14
|
+
* Expand computed fields.
|
|
15
|
+
*
|
|
16
|
+
* Supported values are:
|
|
17
|
+
*
|
|
18
|
+
* - `value`: Expand the balance details of a metered entitlement; it sets the
|
|
19
|
+
* `value` field.
|
|
20
|
+
*/
|
|
21
|
+
expand?: 'value'[];
|
|
22
|
+
/** The point in time to evaluate the entitlement at. Defaults to the current time. */
|
|
23
|
+
at?: Date;
|
|
24
|
+
}
|
|
25
|
+
export type GetCustomerEntitlementValueByFeatureKeyRequest = AcceptDateStrings<GetCustomerEntitlementValueByFeatureKeyQuery & {
|
|
26
|
+
customerId: string;
|
|
27
|
+
featureKey: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type GetCustomerEntitlementValueByFeatureKeyResponse = EntitlementFeatureValueResult;
|
|
30
|
+
export interface ListEntitlementsQuery {
|
|
31
|
+
/** Determines which page of the collection to retrieve. */
|
|
32
|
+
page?: {
|
|
33
|
+
size?: number;
|
|
34
|
+
number?: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Sort entitlements returned in the response. Supported sort attributes are:
|
|
38
|
+
*
|
|
39
|
+
* - `created_at` (default)
|
|
40
|
+
* - `updated_at`
|
|
41
|
+
*
|
|
42
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
43
|
+
* suffix is used to specify a descending order.
|
|
44
|
+
*/
|
|
45
|
+
sort?: SortQueryInput;
|
|
46
|
+
/**
|
|
47
|
+
* Filter entitlements returned in the response.
|
|
48
|
+
*
|
|
49
|
+
* To filter entitlements by customer, add the following query param:
|
|
50
|
+
* `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
|
|
51
|
+
*/
|
|
52
|
+
filter?: ListEntitlementsParamsFilter;
|
|
53
|
+
}
|
|
54
|
+
export type ListEntitlementsRequest = AcceptDateStrings<ListEntitlementsQuery>;
|
|
55
|
+
export type ListEntitlementsResponse = EntitlementPagePaginatedResponse;
|
|
56
|
+
export type GetEntitlementRequest = {
|
|
57
|
+
entitlementId: string;
|
|
58
|
+
};
|
|
59
|
+
export type GetEntitlementResponse = Entitlement;
|
|
60
|
+
export interface GetCustomerEntitlementValueQuery {
|
|
61
|
+
/**
|
|
62
|
+
* Expand computed fields.
|
|
63
|
+
*
|
|
64
|
+
* Supported values are:
|
|
65
|
+
*
|
|
66
|
+
* - `value`: Expand the balance details of a metered entitlement; it sets the
|
|
67
|
+
* `value` field.
|
|
68
|
+
*/
|
|
69
|
+
expand?: 'value'[];
|
|
70
|
+
/** The point in time to evaluate the entitlement at. Defaults to the current time. */
|
|
71
|
+
at?: Date;
|
|
72
|
+
}
|
|
73
|
+
export type GetCustomerEntitlementValueRequest = AcceptDateStrings<GetCustomerEntitlementValueQuery & {
|
|
74
|
+
customerId: string;
|
|
75
|
+
entitlementId: string;
|
|
76
|
+
}>;
|
|
77
|
+
export type GetCustomerEntitlementValueResponse = EntitlementValueResult;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { EntitlementGrantPagePaginatedResponse, ListGrantsParamsFilter, SortQueryInput } from '../types.js';
|
|
3
|
+
export interface ListGrantsQuery {
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: {
|
|
6
|
+
size?: number;
|
|
7
|
+
number?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort grants returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `created_at` (default)
|
|
13
|
+
* - `updated_at`
|
|
14
|
+
* - `effective_at`
|
|
15
|
+
* - `expires_at`
|
|
16
|
+
*
|
|
17
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
18
|
+
* suffix is used to specify a descending order.
|
|
19
|
+
*/
|
|
20
|
+
sort?: SortQueryInput;
|
|
21
|
+
/**
|
|
22
|
+
* Filter grants returned in the response.
|
|
23
|
+
*
|
|
24
|
+
* To filter grants by customer, add the following query param:
|
|
25
|
+
* `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
|
|
26
|
+
*/
|
|
27
|
+
filter?: ListGrantsParamsFilter;
|
|
28
|
+
/** Include deleted grants in the response. */
|
|
29
|
+
includeDeleted?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type ListGrantsRequest = AcceptDateStrings<ListGrantsQuery>;
|
|
32
|
+
export type ListGrantsResponse = EntitlementGrantPagePaginatedResponse;
|
|
33
|
+
export interface VoidGrantQuery {
|
|
34
|
+
/**
|
|
35
|
+
* The time the grant is voided from. Defaults to now; it cannot be in the future
|
|
36
|
+
* or before the start of the current usage period.
|
|
37
|
+
*/
|
|
38
|
+
voidedAt?: Date;
|
|
39
|
+
}
|
|
40
|
+
export type VoidGrantRequest = AcceptDateStrings<VoidGrantQuery & {
|
|
41
|
+
grantId: string;
|
|
42
|
+
}>;
|
|
43
|
+
export type VoidGrantResponse = void;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { CreateNotificationChannelRequestInput, ListNotificationChannelsParamsFilter, NotificationChannel, NotificationChannelPagePaginatedResponse, SortQueryInput, UpdateNotificationChannelRequestInput } from '../types.js';
|
|
3
|
+
export interface ListNotificationChannelsQuery {
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: {
|
|
6
|
+
size?: number;
|
|
7
|
+
number?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort notification channels returned in the response. Supported sort attributes
|
|
11
|
+
* are:
|
|
12
|
+
*
|
|
13
|
+
* - `id` (default)
|
|
14
|
+
* - `type`
|
|
15
|
+
* - `created_at`
|
|
16
|
+
* - `updated_at`
|
|
17
|
+
*
|
|
18
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
19
|
+
* suffix is used to specify a descending order.
|
|
20
|
+
*/
|
|
21
|
+
sort?: SortQueryInput;
|
|
22
|
+
/**
|
|
23
|
+
* Filter notification channels returned in the response.
|
|
24
|
+
*
|
|
25
|
+
* To filter notification channels by type add the following query param:
|
|
26
|
+
* filter[type]=webhook
|
|
27
|
+
*/
|
|
28
|
+
filter?: ListNotificationChannelsParamsFilter;
|
|
29
|
+
}
|
|
30
|
+
export type ListNotificationChannelsRequest = AcceptDateStrings<ListNotificationChannelsQuery>;
|
|
31
|
+
export type ListNotificationChannelsResponse = NotificationChannelPagePaginatedResponse;
|
|
32
|
+
export type CreateNotificationChannelRequest = AcceptDateStrings<CreateNotificationChannelRequestInput>;
|
|
33
|
+
export type CreateNotificationChannelResponse = NotificationChannel;
|
|
34
|
+
export type GetNotificationChannelRequest = {
|
|
35
|
+
notificationChannelId: string;
|
|
36
|
+
};
|
|
37
|
+
export type GetNotificationChannelResponse = NotificationChannel;
|
|
38
|
+
export type UpdateNotificationChannelRequest = AcceptDateStrings<{
|
|
39
|
+
notificationChannelId: string;
|
|
40
|
+
body: UpdateNotificationChannelRequestInput;
|
|
41
|
+
}>;
|
|
42
|
+
export type UpdateNotificationChannelResponse = NotificationChannel;
|
|
43
|
+
export type DeleteNotificationChannelRequest = {
|
|
44
|
+
notificationChannelId: string;
|
|
45
|
+
};
|
|
46
|
+
export type DeleteNotificationChannelResponse = void;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, PlanAddon, PlanAddonPagePaginatedResponse, UpsertPlanAddonRequest } from '../types.js';
|
|
2
|
+
import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, ListPlanAddonsParamsFilter, PlanAddon, PlanAddonPagePaginatedResponse, SortQueryInput, UpsertPlanAddonRequest } from '../types.js';
|
|
3
3
|
export interface ListPlanAddonsQuery {
|
|
4
4
|
/** Determines which page of the collection to retrieve. */
|
|
5
5
|
page?: {
|
|
6
6
|
size?: number;
|
|
7
7
|
number?: number;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort plan add-ons returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `id` (default)
|
|
13
|
+
* - `created_at`
|
|
14
|
+
* - `updated_at`
|
|
15
|
+
*
|
|
16
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
17
|
+
* suffix is used to specify a descending order.
|
|
18
|
+
*/
|
|
19
|
+
sort?: SortQueryInput;
|
|
20
|
+
/** Filter plan add-ons returned in the response. */
|
|
21
|
+
filter?: ListPlanAddonsParamsFilter;
|
|
9
22
|
}
|
|
10
23
|
export type ListPlanAddonsRequest = AcceptDateStrings<ListPlanAddonsQuery & {
|
|
11
24
|
planId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
-
import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput,
|
|
3
|
-
export type CreateSubscriptionRequest = AcceptDateStrings<
|
|
2
|
+
import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionAddonUpdate, SubscriptionCancelInput, SubscriptionChangeInput, SubscriptionChangeResponse, SubscriptionCreateInput, SubscriptionEditInput, SubscriptionMigrateInput, SubscriptionMigrateResponse, SubscriptionPagePaginatedResponse } from '../types.js';
|
|
3
|
+
export type CreateSubscriptionRequest = AcceptDateStrings<SubscriptionCreateInput>;
|
|
4
4
|
export type CreateSubscriptionResponse = Subscription;
|
|
5
5
|
export interface ListSubscriptionsQuery {
|
|
6
6
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -37,11 +37,29 @@ export type UnscheduleCancelationRequest = {
|
|
|
37
37
|
subscriptionId: string;
|
|
38
38
|
};
|
|
39
39
|
export type UnscheduleCancelationResponse = Subscription;
|
|
40
|
+
export type UnscheduleSubscriptionRequest = {
|
|
41
|
+
subscriptionId: string;
|
|
42
|
+
};
|
|
43
|
+
export type UnscheduleSubscriptionResponse = void;
|
|
44
|
+
export type RestoreSubscriptionRequest = {
|
|
45
|
+
subscriptionId: string;
|
|
46
|
+
};
|
|
47
|
+
export type RestoreSubscriptionResponse = Subscription;
|
|
40
48
|
export type ChangeSubscriptionRequest = AcceptDateStrings<{
|
|
41
49
|
subscriptionId: string;
|
|
42
|
-
body:
|
|
50
|
+
body: SubscriptionChangeInput;
|
|
43
51
|
}>;
|
|
44
52
|
export type ChangeSubscriptionResponse = SubscriptionChangeResponse;
|
|
53
|
+
export type MigrateSubscriptionRequest = AcceptDateStrings<{
|
|
54
|
+
subscriptionId: string;
|
|
55
|
+
body: SubscriptionMigrateInput;
|
|
56
|
+
}>;
|
|
57
|
+
export type MigrateSubscriptionResponse = SubscriptionMigrateResponse;
|
|
58
|
+
export type EditSubscriptionRequest = AcceptDateStrings<{
|
|
59
|
+
subscriptionId: string;
|
|
60
|
+
body: SubscriptionEditInput;
|
|
61
|
+
}>;
|
|
62
|
+
export type EditSubscriptionResponse = Subscription;
|
|
45
63
|
export type CreateSubscriptionAddonRequest = AcceptDateStrings<{
|
|
46
64
|
subscriptionId: string;
|
|
47
65
|
body: CreateSubscriptionAddonRequestBody;
|
|
@@ -75,3 +93,9 @@ export type GetSubscriptionAddonRequest = {
|
|
|
75
93
|
subscriptionAddonId: string;
|
|
76
94
|
};
|
|
77
95
|
export type GetSubscriptionAddonResponse = SubscriptionAddon;
|
|
96
|
+
export type UpdateSubscriptionAddonRequest = AcceptDateStrings<{
|
|
97
|
+
subscriptionId: string;
|
|
98
|
+
subscriptionAddonId: string;
|
|
99
|
+
body: SubscriptionAddonUpdate;
|
|
100
|
+
}>;
|
|
101
|
+
export type UpdateSubscriptionAddonResponse = SubscriptionAddon;
|