@openmeter/client 1.0.0-beta.228 → 1.0.0-beta.229
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 +108 -108
- package/dist/funcs/addons.js +18 -14
- package/dist/funcs/apps.js +1 -3
- package/dist/funcs/billing.js +1 -3
- package/dist/funcs/customers.js +33 -19
- package/dist/funcs/features.js +13 -7
- package/dist/funcs/governance.js +5 -1
- package/dist/funcs/llmCost.js +7 -5
- package/dist/funcs/meters.js +13 -7
- package/dist/funcs/planAddons.js +19 -8
- package/dist/funcs/plans.js +9 -11
- package/dist/funcs/subscriptions.js +19 -14
- package/dist/funcs/tax.js +10 -6
- package/dist/lib/config.js +1 -7
- package/dist/models/operations/customers.d.ts +1 -1
- package/dist/models/schemas.d.ts +9 -9
- package/dist/models/schemas.js +927 -930
- package/dist/models/types.d.ts +119 -119
- package/dist/sdk/apps.js +1 -1
- package/dist/sdk/entitlements.js +1 -1
- package/dist/sdk/events.js +1 -1
- package/dist/sdk/governance.js +1 -1
- package/package.json +1 -1
package/dist/models/schemas.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export const labels = z
|
|
3
3
|
.record(z.string(), z.string())
|
|
4
|
-
.describe(
|
|
4
|
+
.describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
|
|
5
5
|
export const currencyCode = z
|
|
6
6
|
.string()
|
|
7
7
|
.min(3)
|
|
8
8
|
.max(3)
|
|
9
|
-
.regex(new RegExp(
|
|
10
|
-
.describe(
|
|
9
|
+
.regex(new RegExp('^[A-Z]{3}$'))
|
|
10
|
+
.describe('Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.');
|
|
11
11
|
export const numeric = z
|
|
12
12
|
.string()
|
|
13
|
-
.regex(new RegExp(
|
|
14
|
-
.describe(
|
|
13
|
+
.regex(new RegExp('^\\-?[0-9]+(\\.[0-9]+)?$'))
|
|
14
|
+
.describe('Numeric represents an arbitrary precision number.');
|
|
15
15
|
export const cursorPaginationQueryPage = z
|
|
16
16
|
.object({
|
|
17
17
|
size: z
|
|
18
18
|
.number()
|
|
19
19
|
.int()
|
|
20
20
|
.optional()
|
|
21
|
-
.describe(
|
|
21
|
+
.describe('The number of items to include per page.'),
|
|
22
22
|
after: z
|
|
23
23
|
.string()
|
|
24
24
|
.optional()
|
|
25
|
-
.describe(
|
|
25
|
+
.describe('Request the next page of data, starting with the item after this parameter.'),
|
|
26
26
|
before: z
|
|
27
27
|
.string()
|
|
28
28
|
.optional()
|
|
29
|
-
.describe(
|
|
29
|
+
.describe('Request the previous page of data, starting with the item before this parameter.'),
|
|
30
30
|
})
|
|
31
|
-
.describe(
|
|
31
|
+
.describe('Determines which page of the collection to retrieve.');
|
|
32
32
|
export const stringFieldFilter = z
|
|
33
33
|
.union([
|
|
34
34
|
z.string(),
|
|
@@ -36,224 +36,224 @@ export const stringFieldFilter = z
|
|
|
36
36
|
eq: z
|
|
37
37
|
.string()
|
|
38
38
|
.optional()
|
|
39
|
-
.describe(
|
|
39
|
+
.describe('Value strictly equals the given string value.'),
|
|
40
40
|
neq: z
|
|
41
41
|
.string()
|
|
42
42
|
.optional()
|
|
43
|
-
.describe(
|
|
43
|
+
.describe('Value does not equal the given string value.'),
|
|
44
44
|
contains: z
|
|
45
45
|
.string()
|
|
46
46
|
.optional()
|
|
47
|
-
.describe(
|
|
47
|
+
.describe('Value contains the given string value (fuzzy match).'),
|
|
48
48
|
ocontains: z
|
|
49
49
|
.array(z.string())
|
|
50
50
|
.optional()
|
|
51
|
-
.describe(
|
|
51
|
+
.describe('Returns entities that fuzzy-match any of the comma-delimited phrases in the filter string.'),
|
|
52
52
|
oeq: z
|
|
53
53
|
.array(z.string())
|
|
54
54
|
.optional()
|
|
55
|
-
.describe(
|
|
55
|
+
.describe('Returns entities that exact match any of the comma-delimited phrases in the filter string.'),
|
|
56
56
|
gt: z
|
|
57
57
|
.string()
|
|
58
58
|
.optional()
|
|
59
|
-
.describe(
|
|
59
|
+
.describe('Value is greater than the given string value (lexicographic compare).'),
|
|
60
60
|
gte: z
|
|
61
61
|
.string()
|
|
62
62
|
.optional()
|
|
63
|
-
.describe(
|
|
63
|
+
.describe('Value is greater than or equal to the given string value (lexicographic compare).'),
|
|
64
64
|
lt: z
|
|
65
65
|
.string()
|
|
66
66
|
.optional()
|
|
67
|
-
.describe(
|
|
67
|
+
.describe('Value is less than the given string value (lexicographic compare).'),
|
|
68
68
|
lte: z
|
|
69
69
|
.string()
|
|
70
70
|
.optional()
|
|
71
|
-
.describe(
|
|
71
|
+
.describe('Value is less than or equal to the given string value (lexicographic compare).'),
|
|
72
72
|
exists: z
|
|
73
73
|
.boolean()
|
|
74
74
|
.optional()
|
|
75
|
-
.describe(
|
|
76
|
-
})
|
|
75
|
+
.describe('When true, the field must be present (non-null); when false, the field must be absent (null).'),
|
|
76
|
+
}),
|
|
77
77
|
])
|
|
78
|
-
.describe(
|
|
78
|
+
.describe('Filters on the given string field value by either exact or fuzzy match. All properties are optional; provide exactly one to specify the comparison.');
|
|
79
79
|
export const ulid = z
|
|
80
80
|
.string()
|
|
81
|
-
.regex(new RegExp(
|
|
82
|
-
.describe(
|
|
81
|
+
.regex(new RegExp('^[0-7][0-9A-HJKMNP-TV-Z]{25}$'))
|
|
82
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).');
|
|
83
83
|
export const dateTime = z
|
|
84
84
|
.string()
|
|
85
85
|
.datetime()
|
|
86
|
-
.describe(
|
|
86
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.');
|
|
87
87
|
export const sortQuery = z
|
|
88
88
|
.object({
|
|
89
|
-
by: z.string().describe(
|
|
89
|
+
by: z.string().describe('The attribute to sort by.'),
|
|
90
90
|
order: z
|
|
91
|
-
.union([z.literal(
|
|
91
|
+
.union([z.literal('asc'), z.literal('desc')])
|
|
92
92
|
.optional()
|
|
93
|
-
.default(
|
|
94
|
-
.describe(
|
|
93
|
+
.default('asc')
|
|
94
|
+
.describe('The sort order. `asc` for ascending, `desc` for descending.'),
|
|
95
95
|
})
|
|
96
|
-
.describe(
|
|
96
|
+
.describe('Sort query. The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order.');
|
|
97
97
|
export const ingestedEventValidationError = z
|
|
98
98
|
.object({
|
|
99
|
-
code: z.string().describe(
|
|
99
|
+
code: z.string().describe('The machine readable code of the error.'),
|
|
100
100
|
message: z
|
|
101
101
|
.string()
|
|
102
|
-
.describe(
|
|
102
|
+
.describe('The human readable description of the error.'),
|
|
103
103
|
attributes: z
|
|
104
104
|
.record(z.string(), z.unknown())
|
|
105
105
|
.optional()
|
|
106
|
-
.describe(
|
|
106
|
+
.describe('Additional attributes.'),
|
|
107
107
|
})
|
|
108
|
-
.describe(
|
|
108
|
+
.describe('Event validation errors.');
|
|
109
109
|
export const cursorMetaPage = z
|
|
110
110
|
.object({
|
|
111
|
-
first: z.string().optional().describe(
|
|
112
|
-
last: z.string().optional().describe(
|
|
113
|
-
next: z.string().optional().describe(
|
|
114
|
-
previous: z.string().optional().describe(
|
|
115
|
-
size: z.number().int().optional().describe(
|
|
111
|
+
first: z.string().optional().describe('URI to the first page.'),
|
|
112
|
+
last: z.string().optional().describe('URI to the last page.'),
|
|
113
|
+
next: z.string().optional().describe('URI to the next page.'),
|
|
114
|
+
previous: z.string().optional().describe('URI to the previous page.'),
|
|
115
|
+
size: z.number().int().optional().describe('Requested page size.'),
|
|
116
116
|
})
|
|
117
|
-
.describe(
|
|
117
|
+
.describe('Cursor pagination metadata.');
|
|
118
118
|
export const invalidRules = z
|
|
119
119
|
.enum([
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
120
|
+
'required',
|
|
121
|
+
'is_array',
|
|
122
|
+
'is_base64',
|
|
123
|
+
'is_boolean',
|
|
124
|
+
'is_date_time',
|
|
125
|
+
'is_integer',
|
|
126
|
+
'is_null',
|
|
127
|
+
'is_number',
|
|
128
|
+
'is_object',
|
|
129
|
+
'is_string',
|
|
130
|
+
'is_uuid',
|
|
131
|
+
'is_fqdn',
|
|
132
|
+
'is_arn',
|
|
133
|
+
'unknown_property',
|
|
134
|
+
'missing_reference',
|
|
135
|
+
'is_label',
|
|
136
|
+
'matches_regex',
|
|
137
|
+
'invalid',
|
|
138
|
+
'is_supported_network_availability_zone_list',
|
|
139
|
+
'is_supported_network_cidr_block',
|
|
140
|
+
'is_supported_provider_region',
|
|
141
|
+
'type',
|
|
142
142
|
])
|
|
143
|
-
.describe(
|
|
143
|
+
.describe('The validation rule that a parameter failed.');
|
|
144
144
|
export const invalidParameterMinimumRule = z
|
|
145
145
|
.enum([
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
146
|
+
'min_length',
|
|
147
|
+
'min_digits',
|
|
148
|
+
'min_lowercase',
|
|
149
|
+
'min_uppercase',
|
|
150
|
+
'min_symbols',
|
|
151
|
+
'min_items',
|
|
152
|
+
'min',
|
|
153
153
|
])
|
|
154
|
-
.describe(
|
|
154
|
+
.describe('Minimum-length (or minimum-value) validation rules.');
|
|
155
155
|
export const invalidParameterMaximumRule = z
|
|
156
|
-
.enum([
|
|
157
|
-
.describe(
|
|
156
|
+
.enum(['max_length', 'max_items', 'max'])
|
|
157
|
+
.describe('Maximum-length (or maximum-value) validation rules.');
|
|
158
158
|
export const invalidParameterChoiceRule = z
|
|
159
|
-
.enum([
|
|
160
|
-
.describe(
|
|
159
|
+
.enum(['enum'])
|
|
160
|
+
.describe('The enum validation rule.');
|
|
161
161
|
export const invalidParameterDependentRule = z
|
|
162
|
-
.enum([
|
|
163
|
-
.describe(
|
|
162
|
+
.enum(['dependent_fields'])
|
|
163
|
+
.describe('The dependent-fields validation rule.');
|
|
164
164
|
export const baseError = z
|
|
165
165
|
.intersection(z.object({
|
|
166
166
|
type: z
|
|
167
167
|
.string()
|
|
168
|
-
.default(
|
|
169
|
-
.describe(
|
|
168
|
+
.default('about:blank')
|
|
169
|
+
.describe('Type contains a URI that identifies the problem type.'),
|
|
170
170
|
status: z
|
|
171
171
|
.number()
|
|
172
172
|
.int()
|
|
173
|
-
.describe(
|
|
173
|
+
.describe('The HTTP status code generated by the origin server for this occurrence of the problem.'),
|
|
174
174
|
title: z
|
|
175
175
|
.string()
|
|
176
|
-
.describe(
|
|
176
|
+
.describe('A a short, human-readable summary of the problem type.'),
|
|
177
177
|
detail: z
|
|
178
178
|
.string()
|
|
179
|
-
.describe(
|
|
179
|
+
.describe('A human-readable explanation specific to this occurrence of the problem.'),
|
|
180
180
|
instance: z
|
|
181
181
|
.string()
|
|
182
|
-
.describe(
|
|
182
|
+
.describe('A URI reference that identifies the specific occurrence of the problem.'),
|
|
183
183
|
}), z.record(z.string(), z.unknown()))
|
|
184
|
-
.describe(
|
|
184
|
+
.describe('Standard error response.');
|
|
185
185
|
export const resourceKey = z
|
|
186
186
|
.string()
|
|
187
187
|
.min(1)
|
|
188
188
|
.max(64)
|
|
189
|
-
.regex(new RegExp(
|
|
190
|
-
.describe(
|
|
189
|
+
.regex(new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$'))
|
|
190
|
+
.describe('A key is a unique string that is used to identify a resource.');
|
|
191
191
|
export const meterAggregation = z
|
|
192
192
|
.union([
|
|
193
|
-
z.literal(
|
|
194
|
-
z.literal(
|
|
195
|
-
z.literal(
|
|
196
|
-
z.literal(
|
|
197
|
-
z.literal(
|
|
198
|
-
z.literal(
|
|
199
|
-
z.literal(
|
|
193
|
+
z.literal('sum'),
|
|
194
|
+
z.literal('count'),
|
|
195
|
+
z.literal('unique_count'),
|
|
196
|
+
z.literal('avg'),
|
|
197
|
+
z.literal('min'),
|
|
198
|
+
z.literal('max'),
|
|
199
|
+
z.literal('latest'),
|
|
200
200
|
])
|
|
201
|
-
.describe(
|
|
201
|
+
.describe('The aggregation type to use for the meter.');
|
|
202
202
|
export const pageMeta = z
|
|
203
203
|
.object({
|
|
204
|
-
number: z.number().int().describe(
|
|
205
|
-
size: z.number().int().describe(
|
|
204
|
+
number: z.number().int().describe('Page number.'),
|
|
205
|
+
size: z.number().int().describe('Page size.'),
|
|
206
206
|
total: z
|
|
207
207
|
.number()
|
|
208
208
|
.int()
|
|
209
|
-
.describe(
|
|
209
|
+
.describe('Total number of items in the collection.'),
|
|
210
210
|
})
|
|
211
|
-
.describe(
|
|
211
|
+
.describe('Pagination information.');
|
|
212
212
|
export const meterQueryGranularity = z
|
|
213
213
|
.union([
|
|
214
|
-
z.literal(
|
|
215
|
-
z.literal(
|
|
216
|
-
z.literal(
|
|
217
|
-
z.literal(
|
|
214
|
+
z.literal('PT1M'),
|
|
215
|
+
z.literal('PT1H'),
|
|
216
|
+
z.literal('P1D'),
|
|
217
|
+
z.literal('P1M'),
|
|
218
218
|
])
|
|
219
|
-
.describe(
|
|
219
|
+
.describe('The granularity of the time grouping. Time durations are specified in ISO 8601 format.');
|
|
220
220
|
export const queryFilterString = z
|
|
221
221
|
.object({
|
|
222
222
|
eq: z
|
|
223
223
|
.string()
|
|
224
224
|
.optional()
|
|
225
|
-
.describe(
|
|
225
|
+
.describe('The attribute equals the provided value.'),
|
|
226
226
|
neq: z
|
|
227
227
|
.string()
|
|
228
228
|
.optional()
|
|
229
|
-
.describe(
|
|
229
|
+
.describe('The attribute does not equal the provided value.'),
|
|
230
230
|
in: z
|
|
231
231
|
.array(z.string())
|
|
232
232
|
.min(1)
|
|
233
233
|
.max(100)
|
|
234
234
|
.optional()
|
|
235
|
-
.describe(
|
|
235
|
+
.describe('The attribute is one of the provided values.'),
|
|
236
236
|
nin: z
|
|
237
237
|
.array(z.string())
|
|
238
238
|
.min(1)
|
|
239
239
|
.max(100)
|
|
240
240
|
.optional()
|
|
241
|
-
.describe(
|
|
241
|
+
.describe('The attribute is not one of the provided values.'),
|
|
242
242
|
contains: z
|
|
243
243
|
.string()
|
|
244
244
|
.optional()
|
|
245
|
-
.describe(
|
|
245
|
+
.describe('The attribute contains the provided value.'),
|
|
246
246
|
ncontains: z
|
|
247
247
|
.string()
|
|
248
248
|
.optional()
|
|
249
|
-
.describe(
|
|
249
|
+
.describe('The attribute does not contain the provided value.'),
|
|
250
250
|
get and() {
|
|
251
251
|
return z
|
|
252
252
|
.array(queryFilterString)
|
|
253
253
|
.min(1)
|
|
254
254
|
.max(10)
|
|
255
255
|
.optional()
|
|
256
|
-
.describe(
|
|
256
|
+
.describe('Combines the provided filters with a logical AND.');
|
|
257
257
|
},
|
|
258
258
|
get or() {
|
|
259
259
|
return z
|
|
@@ -261,40 +261,40 @@ export const queryFilterString = z
|
|
|
261
261
|
.min(1)
|
|
262
262
|
.max(10)
|
|
263
263
|
.optional()
|
|
264
|
-
.describe(
|
|
264
|
+
.describe('Combines the provided filters with a logical OR.');
|
|
265
265
|
},
|
|
266
266
|
})
|
|
267
|
-
.describe(
|
|
267
|
+
.describe('A query filter for a string attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
268
268
|
export const externalResourceKey = z
|
|
269
269
|
.string()
|
|
270
270
|
.min(1)
|
|
271
271
|
.max(256)
|
|
272
|
-
.describe(
|
|
272
|
+
.describe('ExternalResourceKey is a unique string that is used to identify a resource in an external system.');
|
|
273
273
|
export const usageAttributionSubjectKey = z
|
|
274
274
|
.string()
|
|
275
275
|
.min(1)
|
|
276
|
-
.describe(
|
|
276
|
+
.describe('Subject key.');
|
|
277
277
|
export const countryCode = z
|
|
278
278
|
.string()
|
|
279
279
|
.min(2)
|
|
280
280
|
.max(2)
|
|
281
|
-
.regex(new RegExp(
|
|
282
|
-
.describe(
|
|
281
|
+
.regex(new RegExp('^[A-Z]{2}$'))
|
|
282
|
+
.describe('[ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.');
|
|
283
283
|
export const appStripeCreateCheckoutSessionBillingAddressCollection = z
|
|
284
|
-
.enum([
|
|
284
|
+
.enum(['auto', 'required'])
|
|
285
285
|
.describe("Controls whether Checkout collects the customer's billing address.");
|
|
286
286
|
export const appStripeCreateCheckoutSessionCustomerUpdateBehavior = z
|
|
287
|
-
.enum([
|
|
288
|
-
.describe(
|
|
287
|
+
.enum(['auto', 'never'])
|
|
288
|
+
.describe('Behavior for updating customer fields from checkout session.');
|
|
289
289
|
export const appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = z
|
|
290
|
-
.enum([
|
|
291
|
-
.describe(
|
|
290
|
+
.enum(['auto', 'hidden'])
|
|
291
|
+
.describe('Position of payment method reuse agreement in the UI.');
|
|
292
292
|
export const appStripeCreateCheckoutSessionConsentCollectionPromotions = z
|
|
293
|
-
.enum([
|
|
294
|
-
.describe(
|
|
293
|
+
.enum(['auto', 'none'])
|
|
294
|
+
.describe('Promotional communication consent collection setting.');
|
|
295
295
|
export const appStripeCreateCheckoutSessionConsentCollectionTermsOfService = z
|
|
296
|
-
.enum([
|
|
297
|
-
.describe(
|
|
296
|
+
.enum(['none', 'required'])
|
|
297
|
+
.describe('Terms of service acceptance requirement.');
|
|
298
298
|
export const appStripeCheckoutSessionCustomTextParams = z
|
|
299
299
|
.object({
|
|
300
300
|
after_submit: z
|
|
@@ -303,60 +303,60 @@ export const appStripeCheckoutSessionCustomTextParams = z
|
|
|
303
303
|
.string()
|
|
304
304
|
.max(1200)
|
|
305
305
|
.optional()
|
|
306
|
-
.describe(
|
|
306
|
+
.describe('The custom message text (max 1200 characters).'),
|
|
307
307
|
})
|
|
308
308
|
.optional()
|
|
309
|
-
.describe(
|
|
309
|
+
.describe('Text displayed after the payment confirmation button.'),
|
|
310
310
|
shipping_address: z
|
|
311
311
|
.object({
|
|
312
312
|
message: z
|
|
313
313
|
.string()
|
|
314
314
|
.max(1200)
|
|
315
315
|
.optional()
|
|
316
|
-
.describe(
|
|
316
|
+
.describe('The custom message text (max 1200 characters).'),
|
|
317
317
|
})
|
|
318
318
|
.optional()
|
|
319
|
-
.describe(
|
|
319
|
+
.describe('Text displayed alongside shipping address collection.'),
|
|
320
320
|
submit: z
|
|
321
321
|
.object({
|
|
322
322
|
message: z
|
|
323
323
|
.string()
|
|
324
324
|
.max(1200)
|
|
325
325
|
.optional()
|
|
326
|
-
.describe(
|
|
326
|
+
.describe('The custom message text (max 1200 characters).'),
|
|
327
327
|
})
|
|
328
328
|
.optional()
|
|
329
|
-
.describe(
|
|
329
|
+
.describe('Text displayed alongside the payment confirmation button.'),
|
|
330
330
|
terms_of_service_acceptance: z
|
|
331
331
|
.object({
|
|
332
332
|
message: z
|
|
333
333
|
.string()
|
|
334
334
|
.max(1200)
|
|
335
335
|
.optional()
|
|
336
|
-
.describe(
|
|
336
|
+
.describe('The custom message text (max 1200 characters).'),
|
|
337
337
|
})
|
|
338
338
|
.optional()
|
|
339
|
-
.describe(
|
|
339
|
+
.describe('Text replacing the default terms of service agreement text.'),
|
|
340
340
|
})
|
|
341
|
-
.describe(
|
|
341
|
+
.describe('Custom text displayed at various stages of the checkout flow.');
|
|
342
342
|
export const appStripeCheckoutSessionUiMode = z
|
|
343
|
-
.enum([
|
|
344
|
-
.describe(
|
|
343
|
+
.enum(['embedded', 'hosted'])
|
|
344
|
+
.describe('Checkout Session UI mode.');
|
|
345
345
|
export const appStripeCreateCheckoutSessionRedirectOnCompletion = z
|
|
346
|
-
.enum([
|
|
347
|
-
.describe(
|
|
346
|
+
.enum(['always', 'if_required', 'never'])
|
|
347
|
+
.describe('Redirect behavior for embedded checkout sessions.');
|
|
348
348
|
export const appStripeCreateCheckoutSessionTaxIdCollectionRequired = z
|
|
349
|
-
.enum([
|
|
350
|
-
.describe(
|
|
349
|
+
.enum(['if_supported', 'never'])
|
|
350
|
+
.describe('Tax ID collection requirement level.');
|
|
351
351
|
export const appStripeCheckoutSessionMode = z
|
|
352
|
-
.enum([
|
|
353
|
-
.describe(
|
|
352
|
+
.enum(['setup'])
|
|
353
|
+
.describe('Stripe Checkout Session mode. Determines the primary purpose of the checkout session.');
|
|
354
354
|
export const appStripeCreateCustomerPortalSessionOptions = z
|
|
355
355
|
.object({
|
|
356
356
|
configuration_id: z
|
|
357
357
|
.string()
|
|
358
358
|
.optional()
|
|
359
|
-
.describe(
|
|
359
|
+
.describe('The ID of an existing [Stripe configuration](https://docs.stripe.com/api/customer_portal/configurations) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.'),
|
|
360
360
|
locale: z
|
|
361
361
|
.string()
|
|
362
362
|
.optional()
|
|
@@ -364,34 +364,34 @@ export const appStripeCreateCustomerPortalSessionOptions = z
|
|
|
364
364
|
return_url: z
|
|
365
365
|
.string()
|
|
366
366
|
.optional()
|
|
367
|
-
.describe(
|
|
367
|
+
.describe('The [URL to redirect](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) the customer to after they have completed their requested actions.'),
|
|
368
368
|
})
|
|
369
|
-
.describe(
|
|
369
|
+
.describe('Request to create a Stripe Customer Portal Session.');
|
|
370
370
|
export const entitlementType = z
|
|
371
|
-
.enum([
|
|
372
|
-
.describe(
|
|
371
|
+
.enum(['metered', 'static', 'boolean'])
|
|
372
|
+
.describe('The type of the entitlement.');
|
|
373
373
|
export const createLabels = z
|
|
374
374
|
.record(z.string(), z.string())
|
|
375
|
-
.describe(
|
|
375
|
+
.describe('Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "\\_".');
|
|
376
376
|
export const creditFundingMethod = z
|
|
377
|
-
.enum([
|
|
378
|
-
.describe(
|
|
377
|
+
.enum(['none', 'invoice', 'external'])
|
|
378
|
+
.describe('The funding method describes how the grant is funded. - `none`: No funding workflow applies, for example promotional grants - `invoice`: The grant is funded by an in-system invoice flow - `external`: The grant is funded outside the system (e.g., wire transfer, external invoice, or manual reconciliation)');
|
|
379
379
|
export const creditAvailabilityPolicy = z
|
|
380
|
-
.enum([
|
|
381
|
-
.describe(
|
|
380
|
+
.enum(['on_creation'])
|
|
381
|
+
.describe('When credits become available for consumption. - `on_creation`: Credits are available as soon as the grant is created. - `on_authorization`: Credits are available once the payment is authorized. - `on_settlement`: Credits are available once the payment is settled.');
|
|
382
382
|
export const taxBehavior = z
|
|
383
|
-
.enum([
|
|
384
|
-
.describe(
|
|
383
|
+
.enum(['inclusive', 'exclusive'])
|
|
384
|
+
.describe('Tax behavior. This enum is used to specify whether tax is included in the price or excluded from the price.');
|
|
385
385
|
export const iso8601Duration = z
|
|
386
386
|
.string()
|
|
387
|
-
.regex(new RegExp(
|
|
388
|
-
.describe(
|
|
387
|
+
.regex(new RegExp('^P(?:\\d+(?:\\.\\d+)?Y)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?W)?(?:\\d+(?:\\.\\d+)?D)?(?:T(?:\\d+(?:\\.\\d+)?H)?(?:\\d+(?:\\.\\d+)?M)?(?:\\d+(?:\\.\\d+)?S)?)?$'))
|
|
388
|
+
.describe('[ISO 8601 Duration](https://docs.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm) string.');
|
|
389
389
|
export const creditPurchasePaymentSettlementStatus = z
|
|
390
|
-
.enum([
|
|
391
|
-
.describe(
|
|
390
|
+
.enum(['pending', 'authorized', 'settled'])
|
|
391
|
+
.describe('Credit purchase payment settlement status. - `pending`: Payment has been initiated and is not yet authorized. - `authorized`: Payment has been authorized. - `settled`: Payment has been settled.');
|
|
392
392
|
export const creditGrantStatus = z
|
|
393
|
-
.enum([
|
|
394
|
-
.describe(
|
|
393
|
+
.enum(['pending', 'active', 'expired', 'voided'])
|
|
394
|
+
.describe('Credit grant lifecycle status. - `pending`: The credit block has been created but is not yet valid. (`effective_at` is in the future or availability_policy is not met) - `active`: The credit block is currently valid and eligible for consumption. (`effective_at` is in the past, `expires_at` is in the future and availability_policy is met) - `expired`: The credit block expired with remaining unused balance, `expires_at` time has passed. - `voided`: The credit block was voided. Remaining balance is forfeited.');
|
|
395
395
|
export const stringFieldFilterExact = z
|
|
396
396
|
.union([
|
|
397
397
|
z.string(),
|
|
@@ -399,57 +399,57 @@ export const stringFieldFilterExact = z
|
|
|
399
399
|
eq: z
|
|
400
400
|
.string()
|
|
401
401
|
.optional()
|
|
402
|
-
.describe(
|
|
402
|
+
.describe('Value strictly equals the given string value.'),
|
|
403
403
|
oeq: z
|
|
404
404
|
.array(z.string())
|
|
405
405
|
.optional()
|
|
406
|
-
.describe(
|
|
406
|
+
.describe('Returns entities that exact match any of the comma-delimited phrases in the filter string.'),
|
|
407
407
|
neq: z
|
|
408
408
|
.string()
|
|
409
409
|
.optional()
|
|
410
|
-
.describe(
|
|
411
|
-
})
|
|
410
|
+
.describe('Value does not equal the given string value.'),
|
|
411
|
+
}),
|
|
412
412
|
])
|
|
413
|
-
.describe(
|
|
413
|
+
.describe('Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
|
|
414
414
|
export const creditTransactionType = z
|
|
415
|
-
.enum([
|
|
416
|
-
.describe(
|
|
415
|
+
.enum(['funded', 'consumed', 'expired'])
|
|
416
|
+
.describe('The type of the credit transaction. - `funded`: Credit granted and available for consumption. - `consumed`: Credit consumed by usage or fees. - `expired`: Credit removed because it expired before being used.');
|
|
417
417
|
export const chargesExpand = z
|
|
418
|
-
.enum([
|
|
418
|
+
.enum(['real_time_usage'])
|
|
419
419
|
.describe("Expands for customer charges. Values: - `real_time_usage`: The charge's real-time usage.");
|
|
420
420
|
export const resourceManagedBy = z
|
|
421
|
-
.enum([
|
|
422
|
-
.describe(
|
|
421
|
+
.enum(['manual', 'system', 'subscription'])
|
|
422
|
+
.describe('Identifies which system manages a resource. Values: - `manual`: The resource is managed manually (overridden by our API users). - `system`: The resource is managed by the system. - `subscription`: The resource is managed by the subscription.');
|
|
423
423
|
export const chargeStatus = z
|
|
424
|
-
.enum([
|
|
425
|
-
.describe(
|
|
424
|
+
.enum(['created', 'active', 'final', 'deleted'])
|
|
425
|
+
.describe('Lifecycle status of a charge. Values: - `created`: The charge has been created but is not active yet. - `active`: The charge is active. - `final`: The charge is fully finalized and no further changes are expected. - `deleted`: The charge has been deleted.');
|
|
426
426
|
export const priceFree = z
|
|
427
427
|
.object({
|
|
428
|
-
type: z.literal(
|
|
428
|
+
type: z.literal('free').describe('The type of the price.'),
|
|
429
429
|
})
|
|
430
|
-
.describe(
|
|
430
|
+
.describe('Free price.');
|
|
431
431
|
export const settlementMode = z
|
|
432
|
-
.enum([
|
|
433
|
-
.describe(
|
|
432
|
+
.enum(['credit_then_invoice', 'credit_only'])
|
|
433
|
+
.describe('Settlement mode for billing. Values: - `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits.');
|
|
434
434
|
export const taxConfigStripe = z
|
|
435
435
|
.object({
|
|
436
436
|
code: z
|
|
437
437
|
.string()
|
|
438
|
-
.regex(new RegExp(
|
|
439
|
-
.describe(
|
|
438
|
+
.regex(new RegExp('^txcd_\\d{8}$'))
|
|
439
|
+
.describe('Product [tax code](https://docs.stripe.com/tax/tax-codes).'),
|
|
440
440
|
})
|
|
441
|
-
.describe(
|
|
441
|
+
.describe('The tax config for Stripe.');
|
|
442
442
|
export const taxConfigExternalInvoicing = z
|
|
443
443
|
.object({
|
|
444
444
|
code: z
|
|
445
445
|
.string()
|
|
446
446
|
.max(64)
|
|
447
|
-
.describe(
|
|
447
|
+
.describe('The tax code should be interpreted by the external invoicing provider.'),
|
|
448
448
|
})
|
|
449
|
-
.describe(
|
|
449
|
+
.describe('External invoicing tax config.');
|
|
450
450
|
export const pricePaymentTerm = z
|
|
451
|
-
.union([z.literal(
|
|
452
|
-
.describe(
|
|
451
|
+
.union([z.literal('in_advance'), z.literal('in_arrears')])
|
|
452
|
+
.describe('The payment term of a flat price.');
|
|
453
453
|
export const flatFeeDiscounts = z
|
|
454
454
|
.object({
|
|
455
455
|
percentage: z
|
|
@@ -457,215 +457,215 @@ export const flatFeeDiscounts = z
|
|
|
457
457
|
.nonnegative()
|
|
458
458
|
.lte(100)
|
|
459
459
|
.optional()
|
|
460
|
-
.describe(
|
|
460
|
+
.describe('Percentage discount applied to the price (0–100).'),
|
|
461
461
|
})
|
|
462
|
-
.describe(
|
|
462
|
+
.describe('Discounts applicable to flat fee charges. This is the same as `ProductCatalog.Discounts` but without the `usage` field, which is not applicable to flat fee charges.');
|
|
463
463
|
export const rateCardProrationMode = z
|
|
464
|
-
.enum([
|
|
465
|
-
.describe(
|
|
464
|
+
.enum(['no_proration', 'prorate_prices'])
|
|
465
|
+
.describe('The proration mode of the rate card. Values: - `no_proration`: No proration. - `prorate_prices`: Prorate the price based on the time remaining in the billing period.');
|
|
466
466
|
export const subscriptionStatus = z
|
|
467
|
-
.enum([
|
|
468
|
-
.describe(
|
|
467
|
+
.enum(['active', 'inactive', 'canceled', 'scheduled'])
|
|
468
|
+
.describe('Subscription status.');
|
|
469
469
|
export const subscriptionEditTimingEnum = z
|
|
470
|
-
.enum([
|
|
471
|
-
.describe(
|
|
470
|
+
.enum(['immediate', 'next_billing_cycle'])
|
|
471
|
+
.describe('Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.');
|
|
472
472
|
export const appType = z
|
|
473
|
-
.enum([
|
|
474
|
-
.describe(
|
|
473
|
+
.enum(['sandbox', 'stripe', 'external_invoicing'])
|
|
474
|
+
.describe('The type of the app.');
|
|
475
475
|
export const appStatus = z
|
|
476
|
-
.enum([
|
|
477
|
-
.describe(
|
|
476
|
+
.enum(['ready', 'unauthorized'])
|
|
477
|
+
.describe('Connection status of an installed app.');
|
|
478
478
|
export const taxIdentificationCode = z
|
|
479
479
|
.string()
|
|
480
480
|
.min(1)
|
|
481
481
|
.max(32)
|
|
482
|
-
.describe(
|
|
482
|
+
.describe('Tax identifier code is a normalized tax code shown on the original identity document.');
|
|
483
483
|
export const workflowCollectionAlignmentSubscription = z
|
|
484
484
|
.object({
|
|
485
|
-
type: z.literal(
|
|
485
|
+
type: z.literal('subscription').describe('The type of alignment.'),
|
|
486
486
|
})
|
|
487
|
-
.describe(
|
|
487
|
+
.describe('BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice.');
|
|
488
488
|
export const workflowInvoicingSettings = z
|
|
489
489
|
.object({
|
|
490
490
|
auto_advance: z
|
|
491
491
|
.boolean()
|
|
492
492
|
.optional()
|
|
493
493
|
.default(true)
|
|
494
|
-
.describe(
|
|
494
|
+
.describe('Whether to automatically issue the invoice after the draftPeriod has passed.'),
|
|
495
495
|
draft_period: z
|
|
496
496
|
.string()
|
|
497
497
|
.optional()
|
|
498
|
-
.default(
|
|
499
|
-
.describe(
|
|
498
|
+
.default('P0D')
|
|
499
|
+
.describe('The period for the invoice to be kept in draft status for manual reviews.'),
|
|
500
500
|
progressive_billing: z
|
|
501
501
|
.boolean()
|
|
502
502
|
.optional()
|
|
503
503
|
.default(true)
|
|
504
|
-
.describe(
|
|
504
|
+
.describe('Should progressive billing be allowed for this workflow?'),
|
|
505
505
|
})
|
|
506
|
-
.describe(
|
|
506
|
+
.describe('Invoice settings for a billing workflow.');
|
|
507
507
|
export const workflowPaymentChargeAutomaticallySettings = z
|
|
508
508
|
.object({
|
|
509
509
|
collection_method: z
|
|
510
|
-
.literal(
|
|
511
|
-
.describe(
|
|
510
|
+
.literal('charge_automatically')
|
|
511
|
+
.describe('The collection method for the invoice.'),
|
|
512
512
|
})
|
|
513
|
-
.describe(
|
|
513
|
+
.describe('Payment settings for a billing workflow when the collection method is charge automatically.');
|
|
514
514
|
export const workflowPaymentSendInvoiceSettings = z
|
|
515
515
|
.object({
|
|
516
516
|
collection_method: z
|
|
517
|
-
.literal(
|
|
518
|
-
.describe(
|
|
517
|
+
.literal('send_invoice')
|
|
518
|
+
.describe('The collection method for the invoice.'),
|
|
519
519
|
due_after: z
|
|
520
520
|
.string()
|
|
521
521
|
.optional()
|
|
522
|
-
.default(
|
|
522
|
+
.default('P30D')
|
|
523
523
|
.describe("The period after which the invoice is due. With some payment solutions it's only applicable for manual collection method."),
|
|
524
524
|
})
|
|
525
|
-
.describe(
|
|
525
|
+
.describe('Payment settings for a billing workflow when the collection method is send invoice.');
|
|
526
526
|
export const currencyType = z
|
|
527
|
-
.enum([
|
|
528
|
-
.describe(
|
|
527
|
+
.enum(['fiat', 'custom'])
|
|
528
|
+
.describe('Currency type for custom currencies. It should be a unique code but not conflicting with any existing standard currency codes.');
|
|
529
529
|
export const currencyCodeCustom = z
|
|
530
530
|
.string()
|
|
531
531
|
.min(3)
|
|
532
532
|
.max(24)
|
|
533
|
-
.describe(
|
|
533
|
+
.describe('Custom currency code. It should be a unique code but not conflicting with any existing fiat currency codes.');
|
|
534
534
|
export const featureLlmTokenType = z
|
|
535
535
|
.enum([
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
536
|
+
'input',
|
|
537
|
+
'output',
|
|
538
|
+
'cache_read',
|
|
539
|
+
'cache_write',
|
|
540
|
+
'reasoning',
|
|
541
|
+
'request',
|
|
542
|
+
'response',
|
|
543
543
|
])
|
|
544
|
-
.describe(
|
|
544
|
+
.describe('Token type for LLM cost lookup.');
|
|
545
545
|
export const llmCostProvider = z
|
|
546
546
|
.object({
|
|
547
547
|
id: z
|
|
548
548
|
.string()
|
|
549
|
-
.describe(
|
|
549
|
+
.describe('Identifier of the provider, e.g., "openai", "anthropic".'),
|
|
550
550
|
name: z
|
|
551
551
|
.string()
|
|
552
|
-
.describe(
|
|
552
|
+
.describe('Name of the provider, e.g., "OpenAI", "Anthropic".'),
|
|
553
553
|
})
|
|
554
|
-
.describe(
|
|
554
|
+
.describe('LLM Provider');
|
|
555
555
|
export const llmCostModel = z
|
|
556
556
|
.object({
|
|
557
557
|
id: z
|
|
558
558
|
.string()
|
|
559
|
-
.describe(
|
|
559
|
+
.describe('Identifier of the model, e.g., "gpt-4", "claude-3-5-sonnet".'),
|
|
560
560
|
name: z
|
|
561
561
|
.string()
|
|
562
|
-
.describe(
|
|
562
|
+
.describe('Name of the model, e.g., "GPT-4", "Claude 3.5 Sonnet".'),
|
|
563
563
|
})
|
|
564
|
-
.describe(
|
|
564
|
+
.describe('LLM Model');
|
|
565
565
|
export const llmCostPriceSource = z
|
|
566
|
-
.enum([
|
|
567
|
-
.describe(
|
|
566
|
+
.enum(['manual', 'system'])
|
|
567
|
+
.describe('Identifies where an LLM cost price came from.');
|
|
568
568
|
export const planStatus = z
|
|
569
|
-
.enum([
|
|
570
|
-
.describe(
|
|
569
|
+
.enum(['draft', 'active', 'archived', 'scheduled'])
|
|
570
|
+
.describe('The status of a plan. - `draft`: The plan has not yet been published and can be edited. - `active`: The plan is published and can be used in subscriptions. - `archived`: The plan is no longer available for use. - `scheduled`: The plan is scheduled to be published at a future date.');
|
|
571
571
|
export const productCatalogValidationError = z
|
|
572
572
|
.object({
|
|
573
|
-
code: z.string().describe(
|
|
574
|
-
message: z.string().describe(
|
|
573
|
+
code: z.string().describe('Machine-readable error code.'),
|
|
574
|
+
message: z.string().describe('Human-readable description of the error.'),
|
|
575
575
|
attributes: z
|
|
576
576
|
.record(z.string(), z.unknown())
|
|
577
577
|
.optional()
|
|
578
|
-
.describe(
|
|
579
|
-
field: z.string().describe(
|
|
578
|
+
.describe('Additional structured context.'),
|
|
579
|
+
field: z.string().describe('The path to the field.'),
|
|
580
580
|
})
|
|
581
|
-
.describe(
|
|
581
|
+
.describe('Validation errors providing detailed description of the issue.');
|
|
582
582
|
export const addonInstanceType = z
|
|
583
|
-
.enum([
|
|
584
|
-
.describe(
|
|
583
|
+
.enum(['single', 'multiple'])
|
|
584
|
+
.describe('The instanceType of the add-on. - `single`: Can be added to a subscription only once. - `multiple`: Can be added to a subscription more than once.');
|
|
585
585
|
export const addonStatus = z
|
|
586
|
-
.enum([
|
|
587
|
-
.describe(
|
|
586
|
+
.enum(['draft', 'active', 'archived'])
|
|
587
|
+
.describe('The status of the add-on defined by the `effective_from` and `effective_to` properties. - `draft`: The add-on has not yet been published and can be edited. - `active`: The add-on is published and available for use. - `archived`: The add-on is no longer available for use.');
|
|
588
588
|
export const governanceQueryRequestCustomers = z
|
|
589
589
|
.object({
|
|
590
590
|
keys: z
|
|
591
591
|
.array(z.string())
|
|
592
592
|
.min(1)
|
|
593
593
|
.max(100)
|
|
594
|
-
.describe(
|
|
594
|
+
.describe('Each entry can be a customer `key` or a usage-attribution subject `key`. Identifiers that cannot be resolved to a customer are reported in the response `errors` array.'),
|
|
595
595
|
})
|
|
596
|
-
.describe(
|
|
596
|
+
.describe('List of customer identifiers to evaluate access for.');
|
|
597
597
|
export const governanceQueryRequestFeatures = z
|
|
598
598
|
.object({
|
|
599
599
|
keys: z
|
|
600
600
|
.array(z.string())
|
|
601
601
|
.min(1)
|
|
602
602
|
.max(100)
|
|
603
|
-
.describe(
|
|
603
|
+
.describe('List of feature keys to evaluate access for.'),
|
|
604
604
|
})
|
|
605
|
-
.describe(
|
|
605
|
+
.describe('Optional list of feature keys to evaluate access for. If omitted, all features available in the organization are returned. Providing this list is recommended to reduce the response size and the load on the backend services.');
|
|
606
606
|
export const governanceFeatureAccessReasonCode = z
|
|
607
607
|
.enum([
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
608
|
+
'unknown',
|
|
609
|
+
'usage_limit_reached',
|
|
610
|
+
'feature_unavailable',
|
|
611
|
+
'feature_not_found',
|
|
612
|
+
'no_credit_available',
|
|
613
613
|
])
|
|
614
|
-
.describe(
|
|
614
|
+
.describe('Machine-readable reason code for denied feature access.');
|
|
615
615
|
export const governanceQueryErrorCode = z
|
|
616
|
-
.enum([
|
|
617
|
-
.describe(
|
|
616
|
+
.enum(['unknown', 'customer_not_found'])
|
|
617
|
+
.describe('Error code for a governance query failure.');
|
|
618
618
|
export const queryFilterInteger = z
|
|
619
619
|
.object({
|
|
620
620
|
eq: z
|
|
621
621
|
.number()
|
|
622
622
|
.int()
|
|
623
623
|
.optional()
|
|
624
|
-
.describe(
|
|
624
|
+
.describe('The attribute equals the provided value.'),
|
|
625
625
|
neq: z
|
|
626
626
|
.number()
|
|
627
627
|
.int()
|
|
628
628
|
.optional()
|
|
629
|
-
.describe(
|
|
629
|
+
.describe('The attribute does not equal the provided value.'),
|
|
630
630
|
in: z
|
|
631
631
|
.array(z.number().int())
|
|
632
632
|
.min(1)
|
|
633
633
|
.max(100)
|
|
634
634
|
.optional()
|
|
635
|
-
.describe(
|
|
635
|
+
.describe('The attribute is one of the provided values.'),
|
|
636
636
|
nin: z
|
|
637
637
|
.array(z.number().int())
|
|
638
638
|
.min(1)
|
|
639
639
|
.max(100)
|
|
640
640
|
.optional()
|
|
641
|
-
.describe(
|
|
641
|
+
.describe('The attribute is not one of the provided values.'),
|
|
642
642
|
gt: z
|
|
643
643
|
.number()
|
|
644
644
|
.int()
|
|
645
645
|
.optional()
|
|
646
|
-
.describe(
|
|
646
|
+
.describe('The attribute is greater than the provided value.'),
|
|
647
647
|
gte: z
|
|
648
648
|
.number()
|
|
649
649
|
.int()
|
|
650
650
|
.optional()
|
|
651
|
-
.describe(
|
|
651
|
+
.describe('The attribute is greater than or equal to the provided value.'),
|
|
652
652
|
lt: z
|
|
653
653
|
.number()
|
|
654
654
|
.int()
|
|
655
655
|
.optional()
|
|
656
|
-
.describe(
|
|
656
|
+
.describe('The attribute is less than the provided value.'),
|
|
657
657
|
lte: z
|
|
658
658
|
.number()
|
|
659
659
|
.int()
|
|
660
660
|
.optional()
|
|
661
|
-
.describe(
|
|
661
|
+
.describe('The attribute is less than or equal to the provided value.'),
|
|
662
662
|
get and() {
|
|
663
663
|
return z
|
|
664
664
|
.array(queryFilterInteger)
|
|
665
665
|
.min(1)
|
|
666
666
|
.max(10)
|
|
667
667
|
.optional()
|
|
668
|
-
.describe(
|
|
668
|
+
.describe('Combines the provided filters with a logical AND.');
|
|
669
669
|
},
|
|
670
670
|
get or() {
|
|
671
671
|
return z
|
|
@@ -673,35 +673,35 @@ export const queryFilterInteger = z
|
|
|
673
673
|
.min(1)
|
|
674
674
|
.max(10)
|
|
675
675
|
.optional()
|
|
676
|
-
.describe(
|
|
676
|
+
.describe('Combines the provided filters with a logical OR.');
|
|
677
677
|
},
|
|
678
678
|
})
|
|
679
|
-
.describe(
|
|
679
|
+
.describe('A query filter for an integer attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
680
680
|
export const queryFilterFloat = z
|
|
681
681
|
.object({
|
|
682
682
|
gt: z
|
|
683
683
|
.number()
|
|
684
684
|
.optional()
|
|
685
|
-
.describe(
|
|
685
|
+
.describe('The attribute is greater than the provided value.'),
|
|
686
686
|
gte: z
|
|
687
687
|
.number()
|
|
688
688
|
.optional()
|
|
689
|
-
.describe(
|
|
689
|
+
.describe('The attribute is greater than or equal to the provided value.'),
|
|
690
690
|
lt: z
|
|
691
691
|
.number()
|
|
692
692
|
.optional()
|
|
693
|
-
.describe(
|
|
693
|
+
.describe('The attribute is less than the provided value.'),
|
|
694
694
|
lte: z
|
|
695
695
|
.number()
|
|
696
696
|
.optional()
|
|
697
|
-
.describe(
|
|
697
|
+
.describe('The attribute is less than or equal to the provided value.'),
|
|
698
698
|
get and() {
|
|
699
699
|
return z
|
|
700
700
|
.array(queryFilterFloat)
|
|
701
701
|
.min(1)
|
|
702
702
|
.max(10)
|
|
703
703
|
.optional()
|
|
704
|
-
.describe(
|
|
704
|
+
.describe('Combines the provided filters with a logical AND.');
|
|
705
705
|
},
|
|
706
706
|
get or() {
|
|
707
707
|
return z
|
|
@@ -709,18 +709,18 @@ export const queryFilterFloat = z
|
|
|
709
709
|
.min(1)
|
|
710
710
|
.max(10)
|
|
711
711
|
.optional()
|
|
712
|
-
.describe(
|
|
712
|
+
.describe('Combines the provided filters with a logical OR.');
|
|
713
713
|
},
|
|
714
714
|
})
|
|
715
|
-
.describe(
|
|
715
|
+
.describe('A query filter for a float attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
716
716
|
export const queryFilterBoolean = z
|
|
717
717
|
.object({
|
|
718
718
|
eq: z
|
|
719
719
|
.boolean()
|
|
720
720
|
.optional()
|
|
721
|
-
.describe(
|
|
721
|
+
.describe('The attribute equals the provided value.'),
|
|
722
722
|
})
|
|
723
|
-
.describe(
|
|
723
|
+
.describe('A query filter for a boolean attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
724
724
|
export const pagePaginationQuery = z
|
|
725
725
|
.object({
|
|
726
726
|
page: z
|
|
@@ -729,26 +729,26 @@ export const pagePaginationQuery = z
|
|
|
729
729
|
.number()
|
|
730
730
|
.int()
|
|
731
731
|
.optional()
|
|
732
|
-
.describe(
|
|
733
|
-
number: z.number().int().optional().describe(
|
|
732
|
+
.describe('The number of items to include per page.'),
|
|
733
|
+
number: z.number().int().optional().describe('The page number.'),
|
|
734
734
|
})
|
|
735
735
|
.optional()
|
|
736
|
-
.describe(
|
|
736
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
737
737
|
})
|
|
738
|
-
.describe(
|
|
738
|
+
.describe('Page pagination query.');
|
|
739
739
|
export const publicLabels = z
|
|
740
740
|
.record(z.string(), z.string())
|
|
741
|
-
.describe(
|
|
741
|
+
.describe('Public labels store information about an entity that can be used for filtering a list of objects.');
|
|
742
742
|
export const booleanFieldFilter = z
|
|
743
743
|
.union([
|
|
744
744
|
z.boolean(),
|
|
745
745
|
z.object({
|
|
746
746
|
eq: z
|
|
747
747
|
.boolean()
|
|
748
|
-
.describe(
|
|
749
|
-
})
|
|
748
|
+
.describe('Value strictly equals the given boolean value.'),
|
|
749
|
+
}),
|
|
750
750
|
])
|
|
751
|
-
.describe(
|
|
751
|
+
.describe('Filter by a boolean value (true/false).');
|
|
752
752
|
export const numericFieldFilter = z
|
|
753
753
|
.union([
|
|
754
754
|
z.number(),
|
|
@@ -756,78 +756,78 @@ export const numericFieldFilter = z
|
|
|
756
756
|
eq: z
|
|
757
757
|
.number()
|
|
758
758
|
.optional()
|
|
759
|
-
.describe(
|
|
759
|
+
.describe('Value strictly equals the given numeric value.'),
|
|
760
760
|
neq: z
|
|
761
761
|
.number()
|
|
762
762
|
.optional()
|
|
763
|
-
.describe(
|
|
763
|
+
.describe('Value does not equal the given numeric value.'),
|
|
764
764
|
oeq: z
|
|
765
765
|
.array(z.number())
|
|
766
766
|
.optional()
|
|
767
|
-
.describe(
|
|
767
|
+
.describe('Returns entities that match any of the comma-delimited numeric values.'),
|
|
768
768
|
lt: z
|
|
769
769
|
.number()
|
|
770
770
|
.optional()
|
|
771
|
-
.describe(
|
|
771
|
+
.describe('Value is less than the given numeric value.'),
|
|
772
772
|
lte: z
|
|
773
773
|
.number()
|
|
774
774
|
.optional()
|
|
775
|
-
.describe(
|
|
775
|
+
.describe('Value is less than or equal to the given numeric value.'),
|
|
776
776
|
gt: z
|
|
777
777
|
.number()
|
|
778
778
|
.optional()
|
|
779
|
-
.describe(
|
|
779
|
+
.describe('Value is greater than the given numeric value.'),
|
|
780
780
|
gte: z
|
|
781
781
|
.number()
|
|
782
782
|
.optional()
|
|
783
|
-
.describe(
|
|
784
|
-
})
|
|
783
|
+
.describe('Value is greater than or equal to the given numeric value.'),
|
|
784
|
+
}),
|
|
785
785
|
])
|
|
786
|
-
.describe(
|
|
786
|
+
.describe('Filter by a numeric value. All properties are optional; provide exactly one to specify the comparison.');
|
|
787
787
|
export const chargeType = z
|
|
788
|
-
.enum([
|
|
789
|
-
.describe(
|
|
788
|
+
.enum(['flat_fee', 'usage_based'])
|
|
789
|
+
.describe('Type of a charge. Values: - `flat_fee`: A fixed-amount charge. - `usage_based`: A usage-priced charge.');
|
|
790
790
|
export const invoiceNumber = z
|
|
791
791
|
.string()
|
|
792
792
|
.min(1)
|
|
793
793
|
.max(256)
|
|
794
|
-
.describe(
|
|
794
|
+
.describe('InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)');
|
|
795
795
|
export const collectionAlignment = z
|
|
796
|
-
.enum([
|
|
797
|
-
.describe(
|
|
796
|
+
.enum(['subscription', 'anchored'])
|
|
797
|
+
.describe('BillingCollectionAlignment specifies when the pending line items should be collected into an invoice.');
|
|
798
798
|
export const collectionMethod = z
|
|
799
|
-
.enum([
|
|
800
|
-
.describe(
|
|
799
|
+
.enum(['charge_automatically', 'send_invoice'])
|
|
800
|
+
.describe('Collection method specifies how the invoice should be collected (automatic or manual).');
|
|
801
801
|
export const unitConfigOperation = z
|
|
802
|
-
.enum([
|
|
803
|
-
.describe(
|
|
802
|
+
.enum(['divide', 'multiply'])
|
|
803
|
+
.describe('The arithmetic operation used to convert raw metered units into billing units. - `divide`: Divide the metered quantity by the conversion factor (e.g., bytes ÷ 1e9 = GB). - `multiply`: Multiply the metered quantity by the conversion factor (e.g., cost × 1.2 = cost + 20% margin).');
|
|
804
804
|
export const unitConfigRoundingMode = z
|
|
805
|
-
.enum([
|
|
806
|
-
.describe(
|
|
805
|
+
.enum(['ceiling', 'floor', 'half_up', 'none'])
|
|
806
|
+
.describe('The rounding mode applied to the converted quantity for invoicing. Rounding is applied only to the invoiced quantity. Entitlement balance checks use the precise decimal value after conversion. - `ceiling`: Round up to the next integer (typical for package-style billing). - `floor`: Round down to the previous integer. - `half_up`: Round to the nearest integer, with 0.5 rounding up. - `none`: No rounding; the converted value is used as-is.');
|
|
807
807
|
export const priceType = z
|
|
808
|
-
.enum([
|
|
808
|
+
.enum(['free', 'flat', 'unit', 'graduated', 'volume'])
|
|
809
809
|
.describe("The type of the price. - `free`: No charge, the rate card is included at no cost. - `flat`: A fixed amount charged once per billing period, regardless of usage. - `unit`: A fixed rate charged per billing unit consumed. - `graduated`: Tiered pricing where each tier's rate applies only to usage within that tier. - `volume`: Tiered pricing where the rate for the highest tier reached applies to all units in the period.");
|
|
810
810
|
export const featureUnitCostType = z
|
|
811
|
-
.enum([
|
|
812
|
-
.describe(
|
|
811
|
+
.enum(['llm', 'manual'])
|
|
812
|
+
.describe('The type of unit cost.');
|
|
813
813
|
export const systemAccountAccessToken = z
|
|
814
814
|
.object({
|
|
815
|
-
type: z.literal(
|
|
816
|
-
scheme: z.literal(
|
|
815
|
+
type: z.literal('http').describe('Http authentication'),
|
|
816
|
+
scheme: z.literal('Bearer').describe('bearer auth scheme'),
|
|
817
817
|
})
|
|
818
|
-
.describe(
|
|
818
|
+
.describe('The system account access token is meant for automations and integrations that are not directly associated with a human identity.');
|
|
819
819
|
export const personalAccessToken = z
|
|
820
820
|
.object({
|
|
821
|
-
type: z.literal(
|
|
822
|
-
scheme: z.literal(
|
|
821
|
+
type: z.literal('http').describe('Http authentication'),
|
|
822
|
+
scheme: z.literal('Bearer').describe('bearer auth scheme'),
|
|
823
823
|
})
|
|
824
|
-
.describe(
|
|
824
|
+
.describe('The personal access token is meant to be used as an alternative to basic-auth when accessing Konnect via APIs.');
|
|
825
825
|
export const konnectAccessToken = z
|
|
826
826
|
.object({
|
|
827
|
-
type: z.literal(
|
|
828
|
-
scheme: z.literal(
|
|
827
|
+
type: z.literal('http').describe('Http authentication'),
|
|
828
|
+
scheme: z.literal('Bearer').describe('bearer auth scheme'),
|
|
829
829
|
})
|
|
830
|
-
.describe(
|
|
830
|
+
.describe('The Konnect access token is meant to be used by the Konnect dashboard and the decK CLI authenticate with.');
|
|
831
831
|
export const updateMeterRequest = z
|
|
832
832
|
.object({
|
|
833
833
|
name: z
|
|
@@ -835,63 +835,63 @@ export const updateMeterRequest = z
|
|
|
835
835
|
.min(1)
|
|
836
836
|
.max(256)
|
|
837
837
|
.optional()
|
|
838
|
-
.describe(
|
|
838
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
839
839
|
description: z
|
|
840
840
|
.string()
|
|
841
841
|
.max(1024)
|
|
842
842
|
.optional()
|
|
843
|
-
.describe(
|
|
843
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
844
844
|
labels: labels.optional(),
|
|
845
845
|
dimensions: z
|
|
846
846
|
.record(z.string(), z.string())
|
|
847
847
|
.optional()
|
|
848
|
-
.describe(
|
|
848
|
+
.describe('Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.'),
|
|
849
849
|
})
|
|
850
|
-
.describe(
|
|
850
|
+
.describe('Meter update request.');
|
|
851
851
|
export const appCustomerDataStripe = z
|
|
852
852
|
.object({
|
|
853
|
-
customer_id: z.string().optional().describe(
|
|
853
|
+
customer_id: z.string().optional().describe('The Stripe customer ID used.'),
|
|
854
854
|
default_payment_method_id: z
|
|
855
855
|
.string()
|
|
856
856
|
.optional()
|
|
857
|
-
.describe(
|
|
857
|
+
.describe('The Stripe default payment method ID.'),
|
|
858
858
|
labels: labels.optional(),
|
|
859
859
|
})
|
|
860
|
-
.describe(
|
|
860
|
+
.describe('Stripe customer data.');
|
|
861
861
|
export const appCustomerDataExternalInvoicing = z
|
|
862
862
|
.object({
|
|
863
863
|
labels: labels.optional(),
|
|
864
864
|
})
|
|
865
|
-
.describe(
|
|
865
|
+
.describe('External invoicing customer data.');
|
|
866
866
|
export const billingCurrencyCode = z
|
|
867
867
|
.union([currencyCode])
|
|
868
|
-
.describe(
|
|
868
|
+
.describe('Fiat or custom currency code.');
|
|
869
869
|
export const createCurrencyCode = z
|
|
870
870
|
.union([currencyCode])
|
|
871
|
-
.describe(
|
|
871
|
+
.describe('Fiat or custom currency code.');
|
|
872
872
|
export const listCostBasesParamsFilter = z
|
|
873
873
|
.object({
|
|
874
874
|
fiat_code: currencyCode.optional(),
|
|
875
875
|
})
|
|
876
|
-
.describe(
|
|
876
|
+
.describe('Filter options for listing cost bases.');
|
|
877
877
|
export const priceFlat = z
|
|
878
878
|
.object({
|
|
879
|
-
type: z.literal(
|
|
879
|
+
type: z.literal('flat').describe('The type of the price.'),
|
|
880
880
|
amount: numeric,
|
|
881
881
|
})
|
|
882
|
-
.describe(
|
|
882
|
+
.describe('Flat price.');
|
|
883
883
|
export const priceUnit = z
|
|
884
884
|
.object({
|
|
885
|
-
type: z.literal(
|
|
885
|
+
type: z.literal('unit').describe('The type of the price.'),
|
|
886
886
|
amount: numeric,
|
|
887
887
|
})
|
|
888
|
-
.describe(
|
|
888
|
+
.describe('Unit price. Charges a fixed rate per billing unit. When UnitConfig is present on the rate card, billing units are the converted quantities (e.g. GB instead of bytes).');
|
|
889
889
|
export const currencyAmount = z
|
|
890
890
|
.object({
|
|
891
891
|
amount: numeric,
|
|
892
892
|
currency: currencyCode,
|
|
893
893
|
})
|
|
894
|
-
.describe(
|
|
894
|
+
.describe('Monetary amount in a specific currency.');
|
|
895
895
|
export const rateCardDiscounts = z
|
|
896
896
|
.object({
|
|
897
897
|
percentage: z
|
|
@@ -899,10 +899,10 @@ export const rateCardDiscounts = z
|
|
|
899
899
|
.nonnegative()
|
|
900
900
|
.lte(100)
|
|
901
901
|
.optional()
|
|
902
|
-
.describe(
|
|
902
|
+
.describe('Percentage discount applied to the price (0–100).'),
|
|
903
903
|
usage: numeric.optional(),
|
|
904
904
|
})
|
|
905
|
-
.describe(
|
|
905
|
+
.describe('Discount configuration for a rate card.');
|
|
906
906
|
export const totals = z
|
|
907
907
|
.object({
|
|
908
908
|
amount: numeric,
|
|
@@ -914,15 +914,15 @@ export const totals = z
|
|
|
914
914
|
credits_total: numeric,
|
|
915
915
|
total: numeric,
|
|
916
916
|
})
|
|
917
|
-
.describe(
|
|
917
|
+
.describe('Totals contains the summaries of all calculations for a billing resource.');
|
|
918
918
|
export const featureManualUnitCost = z
|
|
919
919
|
.object({
|
|
920
920
|
type: z
|
|
921
|
-
.literal(
|
|
922
|
-
.describe(
|
|
921
|
+
.literal('manual')
|
|
922
|
+
.describe('The type discriminator for manual unit cost.'),
|
|
923
923
|
amount: numeric,
|
|
924
924
|
})
|
|
925
|
-
.describe(
|
|
925
|
+
.describe('A fixed per-unit cost amount.');
|
|
926
926
|
export const featureLlmUnitCostPricing = z
|
|
927
927
|
.object({
|
|
928
928
|
input_per_token: numeric,
|
|
@@ -931,7 +931,7 @@ export const featureLlmUnitCostPricing = z
|
|
|
931
931
|
reasoning_per_token: numeric.optional(),
|
|
932
932
|
cache_write_per_token: numeric.optional(),
|
|
933
933
|
})
|
|
934
|
-
.describe(
|
|
934
|
+
.describe('Resolved per-token pricing from the LLM cost database.');
|
|
935
935
|
export const llmCostModelPricing = z
|
|
936
936
|
.object({
|
|
937
937
|
input_per_token: numeric,
|
|
@@ -940,13 +940,13 @@ export const llmCostModelPricing = z
|
|
|
940
940
|
cache_write_per_token: numeric.optional(),
|
|
941
941
|
reasoning_per_token: numeric.optional(),
|
|
942
942
|
})
|
|
943
|
-
.describe(
|
|
943
|
+
.describe('Token pricing for an LLM model, denominated per token.');
|
|
944
944
|
export const spendCommitments = z
|
|
945
945
|
.object({
|
|
946
946
|
minimum_amount: numeric.optional(),
|
|
947
947
|
maximum_amount: numeric.optional(),
|
|
948
948
|
})
|
|
949
|
-
.describe(
|
|
949
|
+
.describe('Spend commitments for a rate card. The customer is committed to spend at least the minimum amount and at most the maximum amount.');
|
|
950
950
|
export const queryFilterNumeric = z
|
|
951
951
|
.object({
|
|
952
952
|
gt: numeric.optional(),
|
|
@@ -959,7 +959,7 @@ export const queryFilterNumeric = z
|
|
|
959
959
|
.min(1)
|
|
960
960
|
.max(10)
|
|
961
961
|
.optional()
|
|
962
|
-
.describe(
|
|
962
|
+
.describe('Combines the provided filters with a logical AND.');
|
|
963
963
|
},
|
|
964
964
|
get or() {
|
|
965
965
|
return z
|
|
@@ -967,21 +967,21 @@ export const queryFilterNumeric = z
|
|
|
967
967
|
.min(1)
|
|
968
968
|
.max(10)
|
|
969
969
|
.optional()
|
|
970
|
-
.describe(
|
|
970
|
+
.describe('Combines the provided filters with a logical OR.');
|
|
971
971
|
},
|
|
972
972
|
})
|
|
973
|
-
.describe(
|
|
973
|
+
.describe('A query filter for a numeric attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
974
974
|
export const cursorPaginationQuery = z
|
|
975
975
|
.object({
|
|
976
976
|
page: cursorPaginationQueryPage.optional(),
|
|
977
977
|
})
|
|
978
|
-
.describe(
|
|
978
|
+
.describe('Cursor page query.');
|
|
979
979
|
export const listMetersParamsFilter = z
|
|
980
980
|
.object({
|
|
981
981
|
key: stringFieldFilter.optional(),
|
|
982
982
|
name: stringFieldFilter.optional(),
|
|
983
983
|
})
|
|
984
|
-
.describe(
|
|
984
|
+
.describe('Filter options for listing meters.');
|
|
985
985
|
export const listLlmCostPricesParamsFilter = z
|
|
986
986
|
.object({
|
|
987
987
|
provider: stringFieldFilter.optional(),
|
|
@@ -990,7 +990,7 @@ export const listLlmCostPricesParamsFilter = z
|
|
|
990
990
|
currency: stringFieldFilter.optional(),
|
|
991
991
|
source: stringFieldFilter.optional(),
|
|
992
992
|
})
|
|
993
|
-
.describe(
|
|
993
|
+
.describe('Filter options for listing LLM cost prices.');
|
|
994
994
|
export const labelsFieldFilter = z
|
|
995
995
|
.record(z.string(), stringFieldFilter)
|
|
996
996
|
.describe("Filters on the resource's `labels` field. The schema is a map keyed by the label name; each value is a `StringFieldFilter`. Both deepObject forms are accepted: `filter[labels][key]=value` (nested) and `filter[labels.key]=value` (dot-notation).");
|
|
@@ -1002,31 +1002,31 @@ export const ulidFieldFilter = z
|
|
|
1002
1002
|
oeq: z
|
|
1003
1003
|
.array(ulid)
|
|
1004
1004
|
.optional()
|
|
1005
|
-
.describe(
|
|
1005
|
+
.describe('Returns entities that exact match any of the comma-delimited ULIDs in the filter string.'),
|
|
1006
1006
|
neq: ulid.optional(),
|
|
1007
|
-
})
|
|
1007
|
+
}),
|
|
1008
1008
|
])
|
|
1009
|
-
.describe(
|
|
1009
|
+
.describe('Filters on the given ULID field value by exact match. All properties are optional; provide exactly one to specify the comparison.');
|
|
1010
1010
|
export const customerReference = z
|
|
1011
1011
|
.object({
|
|
1012
1012
|
id: ulid,
|
|
1013
1013
|
})
|
|
1014
|
-
.describe(
|
|
1014
|
+
.describe('Customer reference.');
|
|
1015
1015
|
export const profileReference = z
|
|
1016
1016
|
.object({
|
|
1017
1017
|
id: ulid,
|
|
1018
1018
|
})
|
|
1019
|
-
.describe(
|
|
1019
|
+
.describe('Billing profile reference.');
|
|
1020
1020
|
export const createResourceReference = z
|
|
1021
1021
|
.object({
|
|
1022
1022
|
id: ulid,
|
|
1023
1023
|
})
|
|
1024
|
-
.describe(
|
|
1024
|
+
.describe('TaxCode reference.');
|
|
1025
1025
|
export const taxCodeReference = z
|
|
1026
1026
|
.object({
|
|
1027
1027
|
id: ulid,
|
|
1028
1028
|
})
|
|
1029
|
-
.describe(
|
|
1029
|
+
.describe('TaxCode reference.');
|
|
1030
1030
|
export const creditGrantInvoiceReference = z
|
|
1031
1031
|
.object({
|
|
1032
1032
|
id: ulid.optional(),
|
|
@@ -1035,14 +1035,14 @@ export const creditGrantInvoiceReference = z
|
|
|
1035
1035
|
id: ulid,
|
|
1036
1036
|
})
|
|
1037
1037
|
.optional()
|
|
1038
|
-
.describe(
|
|
1038
|
+
.describe('Identifier of the invoice line associated with the grant.'),
|
|
1039
1039
|
})
|
|
1040
|
-
.describe(
|
|
1040
|
+
.describe('Invoice references for the grant.');
|
|
1041
1041
|
export const billingCustomerReference = z
|
|
1042
1042
|
.object({
|
|
1043
1043
|
id: ulid,
|
|
1044
1044
|
})
|
|
1045
|
-
.describe(
|
|
1045
|
+
.describe('Customer reference.');
|
|
1046
1046
|
export const subscriptionReference = z
|
|
1047
1047
|
.object({
|
|
1048
1048
|
id: ulid,
|
|
@@ -1053,49 +1053,49 @@ export const subscriptionReference = z
|
|
|
1053
1053
|
.object({
|
|
1054
1054
|
id: ulid,
|
|
1055
1055
|
})
|
|
1056
|
-
.describe(
|
|
1056
|
+
.describe('The item of the phase.'),
|
|
1057
1057
|
})
|
|
1058
|
-
.describe(
|
|
1058
|
+
.describe('The phase of the subscription.'),
|
|
1059
1059
|
})
|
|
1060
|
-
.describe(
|
|
1060
|
+
.describe('Subscription reference represents a reference to the specific subscription item this entity represents.');
|
|
1061
1061
|
export const addonReference = z
|
|
1062
1062
|
.object({
|
|
1063
1063
|
id: ulid,
|
|
1064
1064
|
})
|
|
1065
|
-
.describe(
|
|
1065
|
+
.describe('Addon reference.');
|
|
1066
1066
|
export const appReference = z
|
|
1067
1067
|
.object({
|
|
1068
1068
|
id: ulid,
|
|
1069
1069
|
})
|
|
1070
|
-
.describe(
|
|
1070
|
+
.describe('App reference.');
|
|
1071
1071
|
export const currencyFiat = z
|
|
1072
1072
|
.object({
|
|
1073
1073
|
id: ulid,
|
|
1074
|
-
type: z.literal(
|
|
1074
|
+
type: z.literal('fiat').describe('The type of the currency.'),
|
|
1075
1075
|
name: z
|
|
1076
1076
|
.string()
|
|
1077
1077
|
.min(1)
|
|
1078
1078
|
.max(256)
|
|
1079
|
-
.describe(
|
|
1079
|
+
.describe('The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro".'),
|
|
1080
1080
|
description: z
|
|
1081
1081
|
.string()
|
|
1082
1082
|
.min(1)
|
|
1083
1083
|
.max(256)
|
|
1084
1084
|
.optional()
|
|
1085
|
-
.describe(
|
|
1085
|
+
.describe('Description of the currency.'),
|
|
1086
1086
|
symbol: z
|
|
1087
1087
|
.string()
|
|
1088
1088
|
.min(1)
|
|
1089
1089
|
.optional()
|
|
1090
|
-
.describe(
|
|
1090
|
+
.describe('The symbol of the currency. It should be a string that represents the symbol of the currency, such as "$" for US Dollar or "€" for Euro.'),
|
|
1091
1091
|
code: currencyCode,
|
|
1092
1092
|
})
|
|
1093
|
-
.describe(
|
|
1093
|
+
.describe('Currency describes a currency supported by the billing system.');
|
|
1094
1094
|
export const featureReference = z
|
|
1095
1095
|
.object({
|
|
1096
1096
|
id: ulid,
|
|
1097
1097
|
})
|
|
1098
|
-
.describe(
|
|
1098
|
+
.describe('Feature reference.');
|
|
1099
1099
|
export const dateTimeFieldFilter = z
|
|
1100
1100
|
.union([
|
|
1101
1101
|
dateTime,
|
|
@@ -1105,47 +1105,47 @@ export const dateTimeFieldFilter = z
|
|
|
1105
1105
|
lte: dateTime.optional(),
|
|
1106
1106
|
gt: dateTime.optional(),
|
|
1107
1107
|
gte: dateTime.optional(),
|
|
1108
|
-
})
|
|
1108
|
+
}),
|
|
1109
1109
|
])
|
|
1110
|
-
.describe(
|
|
1110
|
+
.describe('Filters on the given datetime (RFC-3339) field value. All properties are optional; provide exactly one to specify the comparison.');
|
|
1111
1111
|
export const event = z
|
|
1112
1112
|
.object({
|
|
1113
|
-
id: z.string().min(1).describe(
|
|
1113
|
+
id: z.string().min(1).describe('Identifies the event.'),
|
|
1114
1114
|
source: z
|
|
1115
1115
|
.string()
|
|
1116
1116
|
.min(1)
|
|
1117
|
-
.describe(
|
|
1117
|
+
.describe('Identifies the context in which an event happened.'),
|
|
1118
1118
|
specversion: z
|
|
1119
1119
|
.string()
|
|
1120
1120
|
.min(1)
|
|
1121
|
-
.default(
|
|
1122
|
-
.describe(
|
|
1121
|
+
.default('1.0')
|
|
1122
|
+
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
1123
1123
|
type: z
|
|
1124
1124
|
.string()
|
|
1125
1125
|
.min(1)
|
|
1126
|
-
.describe(
|
|
1126
|
+
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
1127
1127
|
datacontenttype: z
|
|
1128
|
-
.union([z.literal(
|
|
1128
|
+
.union([z.literal('application/json'), z.null()])
|
|
1129
1129
|
.optional()
|
|
1130
|
-
.describe(
|
|
1130
|
+
.describe('Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.'),
|
|
1131
1131
|
dataschema: z
|
|
1132
1132
|
.union([z.string(), z.null()])
|
|
1133
1133
|
.optional()
|
|
1134
|
-
.describe(
|
|
1134
|
+
.describe('Identifies the schema that data adheres to.'),
|
|
1135
1135
|
subject: z
|
|
1136
1136
|
.string()
|
|
1137
1137
|
.min(1)
|
|
1138
|
-
.describe(
|
|
1138
|
+
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
1139
1139
|
time: z
|
|
1140
1140
|
.union([dateTime, z.null()])
|
|
1141
1141
|
.optional()
|
|
1142
|
-
.describe(
|
|
1142
|
+
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
1143
1143
|
data: z
|
|
1144
1144
|
.union([z.record(z.string(), z.unknown()), z.null()])
|
|
1145
1145
|
.optional()
|
|
1146
|
-
.describe(
|
|
1146
|
+
.describe('The event payload. Optional, if present it must be a JSON object.'),
|
|
1147
1147
|
})
|
|
1148
|
-
.describe(
|
|
1148
|
+
.describe('Metering event following the CloudEvents specification.');
|
|
1149
1149
|
export const meterQueryRow = z
|
|
1150
1150
|
.object({
|
|
1151
1151
|
value: numeric,
|
|
@@ -1153,39 +1153,39 @@ export const meterQueryRow = z
|
|
|
1153
1153
|
to: dateTime,
|
|
1154
1154
|
dimensions: z
|
|
1155
1155
|
.record(z.string(), z.string())
|
|
1156
|
-
.describe(
|
|
1156
|
+
.describe('The dimensions the value is aggregated over. `subject` and `customer_id` are reserved dimensions.'),
|
|
1157
1157
|
})
|
|
1158
|
-
.describe(
|
|
1158
|
+
.describe('A row in the result of a meter query.');
|
|
1159
1159
|
export const appStripeCreateCustomerPortalSessionResult = z
|
|
1160
1160
|
.object({
|
|
1161
1161
|
id: z
|
|
1162
1162
|
.string()
|
|
1163
|
-
.describe(
|
|
1164
|
-
stripe_customer_id: z.string().describe(
|
|
1163
|
+
.describe('The ID of the customer portal session. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id'),
|
|
1164
|
+
stripe_customer_id: z.string().describe('The ID of the stripe customer.'),
|
|
1165
1165
|
configuration_id: z
|
|
1166
1166
|
.string()
|
|
1167
|
-
.describe(
|
|
1167
|
+
.describe('Configuration used to customize the customer portal. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration'),
|
|
1168
1168
|
livemode: z
|
|
1169
1169
|
.boolean()
|
|
1170
|
-
.describe(
|
|
1170
|
+
.describe('Livemode. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode'),
|
|
1171
1171
|
created_at: dateTime,
|
|
1172
1172
|
return_url: z
|
|
1173
1173
|
.string()
|
|
1174
|
-
.describe(
|
|
1174
|
+
.describe('Return URL. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url'),
|
|
1175
1175
|
locale: z
|
|
1176
1176
|
.string()
|
|
1177
|
-
.describe(
|
|
1177
|
+
.describe('The IETF language tag of the locale customer portal is displayed in. See: https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale'),
|
|
1178
1178
|
url: z
|
|
1179
1179
|
.string()
|
|
1180
|
-
.describe(
|
|
1180
|
+
.describe('The URL to redirect the customer to after they have completed their requested actions.'),
|
|
1181
1181
|
})
|
|
1182
|
-
.describe(
|
|
1182
|
+
.describe('Result of creating a [Stripe Customer Portal Session](https://docs.stripe.com/api/customer_portal/sessions/object). Contains all the information needed to redirect the customer to the Stripe Customer Portal.');
|
|
1183
1183
|
export const closedPeriod = z
|
|
1184
1184
|
.object({
|
|
1185
1185
|
from: dateTime,
|
|
1186
1186
|
to: dateTime,
|
|
1187
1187
|
})
|
|
1188
|
-
.describe(
|
|
1188
|
+
.describe('A period with defined start and end dates. The period is always inclusive at the start and exclusive at the end.');
|
|
1189
1189
|
export const costBasis = z
|
|
1190
1190
|
.object({
|
|
1191
1191
|
id: ulid,
|
|
@@ -1194,32 +1194,32 @@ export const costBasis = z
|
|
|
1194
1194
|
effective_from: dateTime.optional(),
|
|
1195
1195
|
created_at: dateTime,
|
|
1196
1196
|
})
|
|
1197
|
-
.describe(
|
|
1197
|
+
.describe('Describes currency basis supported by billing system.');
|
|
1198
1198
|
export const createCostBasisRequest = z
|
|
1199
1199
|
.object({
|
|
1200
1200
|
fiat_code: currencyCode,
|
|
1201
1201
|
rate: numeric,
|
|
1202
1202
|
effective_from: dateTime.optional(),
|
|
1203
1203
|
})
|
|
1204
|
-
.describe(
|
|
1204
|
+
.describe('CostBasis create request.');
|
|
1205
1205
|
export const featureCostQueryRow = z
|
|
1206
1206
|
.object({
|
|
1207
1207
|
usage: numeric,
|
|
1208
1208
|
cost: z
|
|
1209
1209
|
.union([numeric, z.null()])
|
|
1210
|
-
.describe(
|
|
1210
|
+
.describe('The computed cost amount (usage × unit cost). Null when pricing is not available for the given combination of dimensions.'),
|
|
1211
1211
|
currency: currencyCode,
|
|
1212
1212
|
detail: z
|
|
1213
1213
|
.string()
|
|
1214
1214
|
.optional()
|
|
1215
|
-
.describe(
|
|
1215
|
+
.describe('Detail message when cost amount is null, explaining why the cost could not be resolved.'),
|
|
1216
1216
|
from: dateTime,
|
|
1217
1217
|
to: dateTime,
|
|
1218
1218
|
dimensions: z
|
|
1219
1219
|
.record(z.string(), z.string())
|
|
1220
|
-
.describe(
|
|
1220
|
+
.describe('The dimensions the value is aggregated over. `subject` and `customer_id` are reserved dimensions.'),
|
|
1221
1221
|
})
|
|
1222
|
-
.describe(
|
|
1222
|
+
.describe('A row in the result of a feature cost query.');
|
|
1223
1223
|
export const resource = z
|
|
1224
1224
|
.object({
|
|
1225
1225
|
id: ulid,
|
|
@@ -1227,18 +1227,18 @@ export const resource = z
|
|
|
1227
1227
|
.string()
|
|
1228
1228
|
.min(1)
|
|
1229
1229
|
.max(256)
|
|
1230
|
-
.describe(
|
|
1230
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1231
1231
|
description: z
|
|
1232
1232
|
.string()
|
|
1233
1233
|
.max(1024)
|
|
1234
1234
|
.optional()
|
|
1235
|
-
.describe(
|
|
1235
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1236
1236
|
labels: labels.optional(),
|
|
1237
1237
|
created_at: dateTime,
|
|
1238
1238
|
updated_at: dateTime,
|
|
1239
1239
|
deleted_at: dateTime.optional(),
|
|
1240
1240
|
})
|
|
1241
|
-
.describe(
|
|
1241
|
+
.describe('Represents common fields of resources.');
|
|
1242
1242
|
export const resourceImmutable = z
|
|
1243
1243
|
.object({
|
|
1244
1244
|
id: ulid,
|
|
@@ -1246,16 +1246,16 @@ export const resourceImmutable = z
|
|
|
1246
1246
|
.string()
|
|
1247
1247
|
.min(1)
|
|
1248
1248
|
.max(256)
|
|
1249
|
-
.describe(
|
|
1249
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1250
1250
|
description: z
|
|
1251
1251
|
.string()
|
|
1252
1252
|
.max(1024)
|
|
1253
1253
|
.optional()
|
|
1254
|
-
.describe(
|
|
1254
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1255
1255
|
labels: labels.optional(),
|
|
1256
1256
|
created_at: dateTime,
|
|
1257
1257
|
})
|
|
1258
|
-
.describe(
|
|
1258
|
+
.describe('Represents common fields of immutable resources.');
|
|
1259
1259
|
export const queryFilterDateTime = z
|
|
1260
1260
|
.object({
|
|
1261
1261
|
gt: dateTime.optional(),
|
|
@@ -1268,7 +1268,7 @@ export const queryFilterDateTime = z
|
|
|
1268
1268
|
.min(1)
|
|
1269
1269
|
.max(10)
|
|
1270
1270
|
.optional()
|
|
1271
|
-
.describe(
|
|
1271
|
+
.describe('Combines the provided filters with a logical AND.');
|
|
1272
1272
|
},
|
|
1273
1273
|
get or() {
|
|
1274
1274
|
return z
|
|
@@ -1276,131 +1276,129 @@ export const queryFilterDateTime = z
|
|
|
1276
1276
|
.min(1)
|
|
1277
1277
|
.max(10)
|
|
1278
1278
|
.optional()
|
|
1279
|
-
.describe(
|
|
1279
|
+
.describe('Combines the provided filters with a logical OR.');
|
|
1280
1280
|
},
|
|
1281
1281
|
})
|
|
1282
|
-
.describe(
|
|
1282
|
+
.describe('A query filter for a time attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
1283
1283
|
export const cursorMeta = z
|
|
1284
1284
|
.object({
|
|
1285
1285
|
page: cursorMetaPage,
|
|
1286
1286
|
})
|
|
1287
|
-
.describe(
|
|
1287
|
+
.describe('Cursor pagination metadata.');
|
|
1288
1288
|
export const invalidParameterStandard = z
|
|
1289
1289
|
.object({
|
|
1290
|
-
field: z.string().describe(
|
|
1290
|
+
field: z.string().describe('The name of the field that failed validation.'),
|
|
1291
1291
|
rule: invalidRules.optional(),
|
|
1292
1292
|
source: z
|
|
1293
1293
|
.string()
|
|
1294
1294
|
.optional()
|
|
1295
|
-
.describe(
|
|
1295
|
+
.describe('The part of the request the field came from (e.g. `body`, `query`).'),
|
|
1296
1296
|
reason: z
|
|
1297
1297
|
.string()
|
|
1298
|
-
.describe(
|
|
1298
|
+
.describe('A human readable explanation of why the field failed validation.'),
|
|
1299
1299
|
})
|
|
1300
|
-
.describe(
|
|
1300
|
+
.describe('A parameter that failed a standard validation rule.');
|
|
1301
1301
|
export const invalidParameterMinimumLength = z
|
|
1302
1302
|
.object({
|
|
1303
|
-
field: z.string().describe(
|
|
1303
|
+
field: z.string().describe('The name of the field that failed validation.'),
|
|
1304
1304
|
rule: invalidParameterMinimumRule,
|
|
1305
|
-
minimum: z.number().int().describe(
|
|
1305
|
+
minimum: z.number().int().describe('The minimum allowed value or length.'),
|
|
1306
1306
|
source: z
|
|
1307
1307
|
.string()
|
|
1308
1308
|
.optional()
|
|
1309
|
-
.describe(
|
|
1309
|
+
.describe('The part of the request the field came from (e.g. `body`, `query`).'),
|
|
1310
1310
|
reason: z
|
|
1311
1311
|
.string()
|
|
1312
|
-
.describe(
|
|
1312
|
+
.describe('A human readable explanation of why the field failed validation.'),
|
|
1313
1313
|
})
|
|
1314
|
-
.describe(
|
|
1314
|
+
.describe('A parameter that failed a minimum-length (or minimum-value) validation rule.');
|
|
1315
1315
|
export const invalidParameterMaximumLength = z
|
|
1316
1316
|
.object({
|
|
1317
|
-
field: z.string().describe(
|
|
1317
|
+
field: z.string().describe('The name of the field that failed validation.'),
|
|
1318
1318
|
rule: invalidParameterMaximumRule,
|
|
1319
|
-
maximum: z.number().int().describe(
|
|
1319
|
+
maximum: z.number().int().describe('The maximum allowed value or length.'),
|
|
1320
1320
|
source: z
|
|
1321
1321
|
.string()
|
|
1322
1322
|
.optional()
|
|
1323
|
-
.describe(
|
|
1323
|
+
.describe('The part of the request the field came from (e.g. `body`, `query`).'),
|
|
1324
1324
|
reason: z
|
|
1325
1325
|
.string()
|
|
1326
|
-
.describe(
|
|
1326
|
+
.describe('A human readable explanation of why the field failed validation.'),
|
|
1327
1327
|
})
|
|
1328
|
-
.describe(
|
|
1328
|
+
.describe('A parameter that failed a maximum-length (or maximum-value) validation rule.');
|
|
1329
1329
|
export const invalidParameterChoiceItem = z
|
|
1330
1330
|
.object({
|
|
1331
|
-
field: z.string().describe(
|
|
1331
|
+
field: z.string().describe('The name of the field that failed validation.'),
|
|
1332
1332
|
rule: invalidParameterChoiceRule,
|
|
1333
1333
|
reason: z
|
|
1334
1334
|
.string()
|
|
1335
|
-
.describe(
|
|
1335
|
+
.describe('A human readable explanation of why the field failed validation.'),
|
|
1336
1336
|
choices: z
|
|
1337
1337
|
.array(z.unknown())
|
|
1338
1338
|
.min(1)
|
|
1339
|
-
.describe(
|
|
1339
|
+
.describe('The allowed choices for the field.'),
|
|
1340
1340
|
source: z
|
|
1341
1341
|
.string()
|
|
1342
1342
|
.optional()
|
|
1343
|
-
.describe(
|
|
1343
|
+
.describe('The part of the request the field came from (e.g. `body`, `query`).'),
|
|
1344
1344
|
})
|
|
1345
|
-
.describe(
|
|
1345
|
+
.describe('A parameter whose value was not one of the allowed choices.');
|
|
1346
1346
|
export const invalidParameterDependentItem = z
|
|
1347
1347
|
.object({
|
|
1348
|
-
field: z.string().describe(
|
|
1348
|
+
field: z.string().describe('The name of the field that failed validation.'),
|
|
1349
1349
|
rule: invalidParameterDependentRule,
|
|
1350
1350
|
reason: z
|
|
1351
1351
|
.string()
|
|
1352
|
-
.describe(
|
|
1352
|
+
.describe('A human readable explanation of why the field failed validation.'),
|
|
1353
1353
|
dependents: z
|
|
1354
1354
|
.array(z.unknown())
|
|
1355
|
-
.describe(
|
|
1355
|
+
.describe('The fields that this field depends on.'),
|
|
1356
1356
|
source: z
|
|
1357
1357
|
.string()
|
|
1358
1358
|
.optional()
|
|
1359
|
-
.describe(
|
|
1360
|
-
})
|
|
1361
|
-
.describe(
|
|
1362
|
-
export const unauthorized = baseError.describe(
|
|
1363
|
-
export const forbidden = baseError.describe(
|
|
1364
|
-
export const notFound = baseError.describe(
|
|
1365
|
-
export const gone = baseError.describe(
|
|
1366
|
-
export const conflict = baseError.describe(
|
|
1367
|
-
export const payloadTooLarge = baseError.describe(
|
|
1368
|
-
export const unsupportedMediaType = baseError
|
|
1369
|
-
|
|
1370
|
-
export const
|
|
1371
|
-
|
|
1372
|
-
export const
|
|
1373
|
-
export const
|
|
1374
|
-
export const notImplemented = baseError.describe("Not Implemented.");
|
|
1375
|
-
export const notAvailable = baseError.describe("Not Available.");
|
|
1359
|
+
.describe('The part of the request the field came from (e.g. `body`, `query`).'),
|
|
1360
|
+
})
|
|
1361
|
+
.describe('A parameter that failed a dependent-fields validation rule.');
|
|
1362
|
+
export const unauthorized = baseError.describe('Unauthorized.');
|
|
1363
|
+
export const forbidden = baseError.describe('Forbidden.');
|
|
1364
|
+
export const notFound = baseError.describe('Not Found.');
|
|
1365
|
+
export const gone = baseError.describe('Gone.');
|
|
1366
|
+
export const conflict = baseError.describe('Conflict.');
|
|
1367
|
+
export const payloadTooLarge = baseError.describe('Payload Too Large.');
|
|
1368
|
+
export const unsupportedMediaType = baseError.describe('Unsupported Media Type.');
|
|
1369
|
+
export const unprocessableContent = baseError.describe('Unprocessable Content.');
|
|
1370
|
+
export const tooManyRequests = baseError.describe('Too Many Requests.');
|
|
1371
|
+
export const internal = baseError.describe('Internal Server Error.');
|
|
1372
|
+
export const notImplemented = baseError.describe('Not Implemented.');
|
|
1373
|
+
export const notAvailable = baseError.describe('Not Available.');
|
|
1376
1374
|
export const createCreditGrantFilters = z
|
|
1377
1375
|
.object({
|
|
1378
1376
|
features: z
|
|
1379
1377
|
.array(resourceKey)
|
|
1380
1378
|
.optional()
|
|
1381
|
-
.describe(
|
|
1379
|
+
.describe('Limit the credit grant to specific features. If no features are specified, the credit grant can be used for any feature.'),
|
|
1382
1380
|
})
|
|
1383
|
-
.describe(
|
|
1381
|
+
.describe('Filters for the credit grant.');
|
|
1384
1382
|
export const creditGrantFilters = z
|
|
1385
1383
|
.object({
|
|
1386
1384
|
features: z
|
|
1387
1385
|
.array(resourceKey)
|
|
1388
1386
|
.optional()
|
|
1389
|
-
.describe(
|
|
1387
|
+
.describe('Limit the credit grant to specific features. If no features are specified, the credit grant can be used for any feature.'),
|
|
1390
1388
|
})
|
|
1391
|
-
.describe(
|
|
1389
|
+
.describe('Filters for the credit grant.');
|
|
1392
1390
|
export const upsertPlanAddonRequest = z
|
|
1393
1391
|
.object({
|
|
1394
1392
|
name: z
|
|
1395
1393
|
.string()
|
|
1396
1394
|
.min(1)
|
|
1397
1395
|
.max(256)
|
|
1398
|
-
.describe(
|
|
1396
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1399
1397
|
description: z
|
|
1400
1398
|
.string()
|
|
1401
1399
|
.max(1024)
|
|
1402
1400
|
.optional()
|
|
1403
|
-
.describe(
|
|
1401
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1404
1402
|
labels: labels.optional(),
|
|
1405
1403
|
from_plan_phase: resourceKey,
|
|
1406
1404
|
max_quantity: z
|
|
@@ -1408,9 +1406,9 @@ export const upsertPlanAddonRequest = z
|
|
|
1408
1406
|
.int()
|
|
1409
1407
|
.gte(1)
|
|
1410
1408
|
.optional()
|
|
1411
|
-
.describe(
|
|
1409
|
+
.describe('The maximum number of times the add-on can be purchased for the plan. For single-instance add-ons this field must be omitted. For multi-instance add-ons when omitted, unlimited quantity can be purchased.'),
|
|
1412
1410
|
})
|
|
1413
|
-
.describe(
|
|
1411
|
+
.describe('PlanAddon upsert request.');
|
|
1414
1412
|
export const resourceWithKey = z
|
|
1415
1413
|
.object({
|
|
1416
1414
|
id: ulid,
|
|
@@ -1418,41 +1416,41 @@ export const resourceWithKey = z
|
|
|
1418
1416
|
.string()
|
|
1419
1417
|
.min(1)
|
|
1420
1418
|
.max(256)
|
|
1421
|
-
.describe(
|
|
1419
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1422
1420
|
description: z
|
|
1423
1421
|
.string()
|
|
1424
1422
|
.max(1024)
|
|
1425
1423
|
.optional()
|
|
1426
|
-
.describe(
|
|
1424
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1427
1425
|
labels: labels.optional(),
|
|
1428
1426
|
created_at: dateTime,
|
|
1429
1427
|
updated_at: dateTime,
|
|
1430
1428
|
deleted_at: dateTime.optional(),
|
|
1431
1429
|
key: resourceKey,
|
|
1432
1430
|
})
|
|
1433
|
-
.describe(
|
|
1431
|
+
.describe('Represents common fields of resources with a key.');
|
|
1434
1432
|
export const ulidOrResourceKey = z
|
|
1435
1433
|
.union([ulid, resourceKey])
|
|
1436
|
-
.describe(
|
|
1434
|
+
.describe('ULID ID or Resource Key.');
|
|
1437
1435
|
export const createMeterRequest = z
|
|
1438
1436
|
.object({
|
|
1439
1437
|
name: z
|
|
1440
1438
|
.string()
|
|
1441
1439
|
.min(1)
|
|
1442
1440
|
.max(256)
|
|
1443
|
-
.describe(
|
|
1441
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1444
1442
|
description: z
|
|
1445
1443
|
.string()
|
|
1446
1444
|
.max(1024)
|
|
1447
1445
|
.optional()
|
|
1448
|
-
.describe(
|
|
1446
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1449
1447
|
labels: labels.optional(),
|
|
1450
1448
|
key: resourceKey,
|
|
1451
1449
|
aggregation: meterAggregation,
|
|
1452
1450
|
event_type: z
|
|
1453
1451
|
.string()
|
|
1454
1452
|
.min(1)
|
|
1455
|
-
.describe(
|
|
1453
|
+
.describe('The event type to include in the aggregation.'),
|
|
1456
1454
|
events_from: dateTime.optional(),
|
|
1457
1455
|
value_property: z
|
|
1458
1456
|
.string()
|
|
@@ -1462,9 +1460,9 @@ export const createMeterRequest = z
|
|
|
1462
1460
|
dimensions: z
|
|
1463
1461
|
.record(z.string(), z.string())
|
|
1464
1462
|
.optional()
|
|
1465
|
-
.describe(
|
|
1463
|
+
.describe('Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.'),
|
|
1466
1464
|
})
|
|
1467
|
-
.describe(
|
|
1465
|
+
.describe('Meter create request.');
|
|
1468
1466
|
export const meter = z
|
|
1469
1467
|
.object({
|
|
1470
1468
|
id: ulid,
|
|
@@ -1472,12 +1470,12 @@ export const meter = z
|
|
|
1472
1470
|
.string()
|
|
1473
1471
|
.min(1)
|
|
1474
1472
|
.max(256)
|
|
1475
|
-
.describe(
|
|
1473
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1476
1474
|
description: z
|
|
1477
1475
|
.string()
|
|
1478
1476
|
.max(1024)
|
|
1479
1477
|
.optional()
|
|
1480
|
-
.describe(
|
|
1478
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1481
1479
|
labels: labels.optional(),
|
|
1482
1480
|
created_at: dateTime,
|
|
1483
1481
|
updated_at: dateTime,
|
|
@@ -1487,7 +1485,7 @@ export const meter = z
|
|
|
1487
1485
|
event_type: z
|
|
1488
1486
|
.string()
|
|
1489
1487
|
.min(1)
|
|
1490
|
-
.describe(
|
|
1488
|
+
.describe('The event type to include in the aggregation.'),
|
|
1491
1489
|
events_from: dateTime.optional(),
|
|
1492
1490
|
value_property: z
|
|
1493
1491
|
.string()
|
|
@@ -1497,59 +1495,59 @@ export const meter = z
|
|
|
1497
1495
|
dimensions: z
|
|
1498
1496
|
.record(z.string(), z.string())
|
|
1499
1497
|
.optional()
|
|
1500
|
-
.describe(
|
|
1498
|
+
.describe('Named JSONPath expressions to extract the group by values from the event data. Keys must be unique and consist only alphanumeric and underscore characters.'),
|
|
1501
1499
|
})
|
|
1502
|
-
.describe(
|
|
1500
|
+
.describe('A meter is a configuration that defines how to match and aggregate events.');
|
|
1503
1501
|
export const paginatedMeta = z
|
|
1504
1502
|
.object({
|
|
1505
1503
|
page: pageMeta,
|
|
1506
1504
|
})
|
|
1507
|
-
.describe(
|
|
1505
|
+
.describe('Pagination metadata.');
|
|
1508
1506
|
export const queryFilterStringMapItem = z
|
|
1509
1507
|
.object({
|
|
1510
|
-
exists: z.boolean().optional().describe(
|
|
1508
|
+
exists: z.boolean().optional().describe('The attribute exists.'),
|
|
1511
1509
|
eq: z
|
|
1512
1510
|
.string()
|
|
1513
1511
|
.optional()
|
|
1514
|
-
.describe(
|
|
1512
|
+
.describe('The attribute equals the provided value.'),
|
|
1515
1513
|
neq: z
|
|
1516
1514
|
.string()
|
|
1517
1515
|
.optional()
|
|
1518
|
-
.describe(
|
|
1516
|
+
.describe('The attribute does not equal the provided value.'),
|
|
1519
1517
|
in: z
|
|
1520
1518
|
.array(z.string())
|
|
1521
1519
|
.min(1)
|
|
1522
1520
|
.max(100)
|
|
1523
1521
|
.optional()
|
|
1524
|
-
.describe(
|
|
1522
|
+
.describe('The attribute is one of the provided values.'),
|
|
1525
1523
|
nin: z
|
|
1526
1524
|
.array(z.string())
|
|
1527
1525
|
.min(1)
|
|
1528
1526
|
.max(100)
|
|
1529
1527
|
.optional()
|
|
1530
|
-
.describe(
|
|
1528
|
+
.describe('The attribute is not one of the provided values.'),
|
|
1531
1529
|
contains: z
|
|
1532
1530
|
.string()
|
|
1533
1531
|
.optional()
|
|
1534
|
-
.describe(
|
|
1532
|
+
.describe('The attribute contains the provided value.'),
|
|
1535
1533
|
ncontains: z
|
|
1536
1534
|
.string()
|
|
1537
1535
|
.optional()
|
|
1538
|
-
.describe(
|
|
1536
|
+
.describe('The attribute does not contain the provided value.'),
|
|
1539
1537
|
and: z
|
|
1540
1538
|
.array(queryFilterString)
|
|
1541
1539
|
.min(1)
|
|
1542
1540
|
.max(10)
|
|
1543
1541
|
.optional()
|
|
1544
|
-
.describe(
|
|
1542
|
+
.describe('Combines the provided filters with a logical AND.'),
|
|
1545
1543
|
or: z
|
|
1546
1544
|
.array(queryFilterString)
|
|
1547
1545
|
.min(1)
|
|
1548
1546
|
.max(10)
|
|
1549
1547
|
.optional()
|
|
1550
|
-
.describe(
|
|
1548
|
+
.describe('Combines the provided filters with a logical OR.'),
|
|
1551
1549
|
})
|
|
1552
|
-
.describe(
|
|
1550
|
+
.describe('A query filter for an item in a string map attribute. Operators are mutually exclusive, only one operator is allowed at a time.');
|
|
1553
1551
|
export const subscriptionCreate = z
|
|
1554
1552
|
.object({
|
|
1555
1553
|
labels: labels.optional(),
|
|
@@ -1558,7 +1556,7 @@ export const subscriptionCreate = z
|
|
|
1558
1556
|
id: ulid.optional(),
|
|
1559
1557
|
key: externalResourceKey.optional(),
|
|
1560
1558
|
})
|
|
1561
|
-
.describe(
|
|
1559
|
+
.describe('The customer to create the subscription for.'),
|
|
1562
1560
|
plan: z
|
|
1563
1561
|
.object({
|
|
1564
1562
|
id: ulid.optional(),
|
|
@@ -1567,96 +1565,95 @@ export const subscriptionCreate = z
|
|
|
1567
1565
|
.number()
|
|
1568
1566
|
.int()
|
|
1569
1567
|
.optional()
|
|
1570
|
-
.describe(
|
|
1568
|
+
.describe('The plan version of the subscription, if any. If not provided, the latest version of the plan will be used.'),
|
|
1571
1569
|
})
|
|
1572
|
-
.describe(
|
|
1570
|
+
.describe('The plan reference of the subscription.'),
|
|
1573
1571
|
billing_anchor: dateTime.optional(),
|
|
1574
1572
|
})
|
|
1575
|
-
.describe(
|
|
1573
|
+
.describe('Subscription create request.');
|
|
1576
1574
|
export const ulidOrExternalResourceKey = z
|
|
1577
1575
|
.union([ulid, externalResourceKey])
|
|
1578
|
-
.describe(
|
|
1576
|
+
.describe('ULID ID or External Resource Key.');
|
|
1579
1577
|
export const customerKeyReference = z
|
|
1580
1578
|
.object({
|
|
1581
1579
|
key: externalResourceKey,
|
|
1582
1580
|
})
|
|
1583
|
-
.describe(
|
|
1581
|
+
.describe('Customer reference by external key.');
|
|
1584
1582
|
export const customerUsageAttribution = z
|
|
1585
1583
|
.object({
|
|
1586
1584
|
subject_keys: z
|
|
1587
1585
|
.array(usageAttributionSubjectKey)
|
|
1588
|
-
.describe(
|
|
1586
|
+
.describe('The subjects that are attributed to the customer. Can be empty when no usage event subjects are associated with the customer.'),
|
|
1589
1587
|
})
|
|
1590
|
-
.describe(
|
|
1588
|
+
.describe('Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.');
|
|
1591
1589
|
export const billingAddress = z
|
|
1592
1590
|
.object({
|
|
1593
1591
|
country: countryCode.optional(),
|
|
1594
|
-
postal_code: z.string().optional().describe(
|
|
1595
|
-
state: z.string().optional().describe(
|
|
1596
|
-
city: z.string().optional().describe(
|
|
1597
|
-
line1: z.string().optional().describe(
|
|
1598
|
-
line2: z.string().optional().describe(
|
|
1599
|
-
phone_number: z.string().optional().describe(
|
|
1600
|
-
})
|
|
1601
|
-
.describe(
|
|
1592
|
+
postal_code: z.string().optional().describe('Postal code.'),
|
|
1593
|
+
state: z.string().optional().describe('State or province.'),
|
|
1594
|
+
city: z.string().optional().describe('City.'),
|
|
1595
|
+
line1: z.string().optional().describe('First line of the address.'),
|
|
1596
|
+
line2: z.string().optional().describe('Second line of the address.'),
|
|
1597
|
+
phone_number: z.string().optional().describe('Phone number.'),
|
|
1598
|
+
})
|
|
1599
|
+
.describe('Address');
|
|
1602
1600
|
export const address = z
|
|
1603
1601
|
.object({
|
|
1604
1602
|
country: countryCode.optional(),
|
|
1605
|
-
postal_code: z.string().optional().describe(
|
|
1606
|
-
state: z.string().optional().describe(
|
|
1607
|
-
city: z.string().optional().describe(
|
|
1608
|
-
line1: z.string().optional().describe(
|
|
1609
|
-
line2: z.string().optional().describe(
|
|
1610
|
-
phone_number: z.string().optional().describe(
|
|
1611
|
-
})
|
|
1612
|
-
.describe(
|
|
1603
|
+
postal_code: z.string().optional().describe('Postal code.'),
|
|
1604
|
+
state: z.string().optional().describe('State or province.'),
|
|
1605
|
+
city: z.string().optional().describe('City.'),
|
|
1606
|
+
line1: z.string().optional().describe('First line of the address.'),
|
|
1607
|
+
line2: z.string().optional().describe('Second line of the address.'),
|
|
1608
|
+
phone_number: z.string().optional().describe('Phone number.'),
|
|
1609
|
+
})
|
|
1610
|
+
.describe('Address');
|
|
1613
1611
|
export const appStripeCreateCheckoutSessionCustomerUpdate = z
|
|
1614
1612
|
.object({
|
|
1615
1613
|
address: appStripeCreateCheckoutSessionCustomerUpdateBehavior
|
|
1616
1614
|
.optional()
|
|
1617
|
-
.default(
|
|
1615
|
+
.default('never'),
|
|
1618
1616
|
name: appStripeCreateCheckoutSessionCustomerUpdateBehavior
|
|
1619
1617
|
.optional()
|
|
1620
|
-
.default(
|
|
1618
|
+
.default('never'),
|
|
1621
1619
|
shipping: appStripeCreateCheckoutSessionCustomerUpdateBehavior
|
|
1622
1620
|
.optional()
|
|
1623
|
-
.default(
|
|
1621
|
+
.default('never'),
|
|
1624
1622
|
})
|
|
1625
|
-
.describe(
|
|
1623
|
+
.describe('Controls which customer fields can be updated by the checkout session.');
|
|
1626
1624
|
export const appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement = z
|
|
1627
1625
|
.object({
|
|
1628
|
-
position: appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition
|
|
1629
|
-
.optional(),
|
|
1626
|
+
position: appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition.optional(),
|
|
1630
1627
|
})
|
|
1631
|
-
.describe(
|
|
1628
|
+
.describe('Payment method reuse agreement configuration.');
|
|
1632
1629
|
export const appStripeCreateCheckoutSessionTaxIdCollection = z
|
|
1633
1630
|
.object({
|
|
1634
1631
|
enabled: z
|
|
1635
1632
|
.boolean()
|
|
1636
1633
|
.optional()
|
|
1637
1634
|
.default(false)
|
|
1638
|
-
.describe(
|
|
1635
|
+
.describe('Enable tax ID collection during checkout. Defaults to false.'),
|
|
1639
1636
|
required: appStripeCreateCheckoutSessionTaxIdCollectionRequired
|
|
1640
1637
|
.optional()
|
|
1641
|
-
.default(
|
|
1638
|
+
.default('never'),
|
|
1642
1639
|
})
|
|
1643
|
-
.describe(
|
|
1640
|
+
.describe('Tax ID collection configuration for checkout sessions.');
|
|
1644
1641
|
export const appStripeCreateCheckoutSessionResult = z
|
|
1645
1642
|
.object({
|
|
1646
1643
|
customer_id: ulid,
|
|
1647
|
-
stripe_customer_id: z.string().describe(
|
|
1648
|
-
session_id: z.string().describe(
|
|
1644
|
+
stripe_customer_id: z.string().describe('The Stripe customer ID.'),
|
|
1645
|
+
session_id: z.string().describe('The Stripe checkout session ID.'),
|
|
1649
1646
|
setup_intent_id: z
|
|
1650
1647
|
.string()
|
|
1651
|
-
.describe(
|
|
1648
|
+
.describe('The setup intent ID created for collecting the payment method.'),
|
|
1652
1649
|
client_secret: z
|
|
1653
1650
|
.string()
|
|
1654
1651
|
.optional()
|
|
1655
|
-
.describe(
|
|
1652
|
+
.describe('Client secret for initializing Stripe.js on the client side. Required for embedded checkout sessions. See: https://docs.stripe.com/payments/checkout/custom-success-page'),
|
|
1656
1653
|
client_reference_id: z
|
|
1657
1654
|
.string()
|
|
1658
1655
|
.optional()
|
|
1659
|
-
.describe(
|
|
1656
|
+
.describe('The client reference ID provided in the request. Useful for reconciling the session with your internal systems.'),
|
|
1660
1657
|
customer_email: z
|
|
1661
1658
|
.string()
|
|
1662
1659
|
.optional()
|
|
@@ -1667,95 +1664,95 @@ export const appStripeCreateCheckoutSessionResult = z
|
|
|
1667
1664
|
metadata: z
|
|
1668
1665
|
.record(z.string(), z.string())
|
|
1669
1666
|
.optional()
|
|
1670
|
-
.describe(
|
|
1667
|
+
.describe('Metadata attached to the checkout session.'),
|
|
1671
1668
|
status: z
|
|
1672
1669
|
.string()
|
|
1673
1670
|
.optional()
|
|
1674
|
-
.describe(
|
|
1671
|
+
.describe('The status of the checkout session. See: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-status'),
|
|
1675
1672
|
url: z
|
|
1676
1673
|
.string()
|
|
1677
1674
|
.optional()
|
|
1678
|
-
.describe(
|
|
1675
|
+
.describe('URL to redirect customers to the checkout page (for hosted mode).'),
|
|
1679
1676
|
mode: appStripeCheckoutSessionMode,
|
|
1680
1677
|
cancel_url: z
|
|
1681
1678
|
.string()
|
|
1682
1679
|
.optional()
|
|
1683
|
-
.describe(
|
|
1680
|
+
.describe('The cancel URL where customers are redirected if they cancel.'),
|
|
1684
1681
|
success_url: z
|
|
1685
1682
|
.string()
|
|
1686
1683
|
.optional()
|
|
1687
|
-
.describe(
|
|
1684
|
+
.describe('The success URL where customers are redirected after completion.'),
|
|
1688
1685
|
return_url: z
|
|
1689
1686
|
.string()
|
|
1690
1687
|
.optional()
|
|
1691
|
-
.describe(
|
|
1688
|
+
.describe('The return URL for embedded sessions after authentication.'),
|
|
1692
1689
|
})
|
|
1693
|
-
.describe(
|
|
1690
|
+
.describe('Result of creating a Stripe Checkout Session. Contains all the information needed to redirect customers to the checkout or initialize an embedded checkout flow.');
|
|
1694
1691
|
export const customerStripeCreateCustomerPortalSessionRequest = z
|
|
1695
1692
|
.object({
|
|
1696
1693
|
stripe_options: appStripeCreateCustomerPortalSessionOptions,
|
|
1697
1694
|
})
|
|
1698
|
-
.describe(
|
|
1695
|
+
.describe('Request to create a Stripe Customer Portal Session for the customer. Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.');
|
|
1699
1696
|
export const entitlementAccessResult = z
|
|
1700
1697
|
.object({
|
|
1701
1698
|
type: entitlementType,
|
|
1702
1699
|
feature_key: resourceKey,
|
|
1703
1700
|
has_access: z
|
|
1704
1701
|
.boolean()
|
|
1705
|
-
.describe(
|
|
1702
|
+
.describe('Whether the customer has access to the feature. Always true for `boolean` and `static` entitlements. Depends on balance for `metered` entitlements.'),
|
|
1706
1703
|
config: z
|
|
1707
1704
|
.string()
|
|
1708
1705
|
.optional()
|
|
1709
|
-
.describe(
|
|
1706
|
+
.describe('Only available for static entitlements. Config is the JSON parsable configuration of the entitlement. Useful to describe per customer configuration.'),
|
|
1710
1707
|
})
|
|
1711
|
-
.describe(
|
|
1708
|
+
.describe('Entitlement access result.');
|
|
1712
1709
|
export const createCreditGrantPurchase = z
|
|
1713
1710
|
.object({
|
|
1714
1711
|
currency: currencyCode,
|
|
1715
|
-
per_unit_cost_basis: numeric.optional().default(
|
|
1712
|
+
per_unit_cost_basis: numeric.optional().default('1.0'),
|
|
1716
1713
|
availability_policy: creditAvailabilityPolicy
|
|
1717
1714
|
.optional()
|
|
1718
|
-
.default(
|
|
1715
|
+
.default('on_creation'),
|
|
1719
1716
|
})
|
|
1720
|
-
.describe(
|
|
1717
|
+
.describe('Purchase and payment terms of the grant.');
|
|
1721
1718
|
export const recurringPeriod = z
|
|
1722
1719
|
.object({
|
|
1723
1720
|
anchor: dateTime,
|
|
1724
1721
|
interval: iso8601Duration,
|
|
1725
1722
|
})
|
|
1726
|
-
.describe(
|
|
1723
|
+
.describe('Recurring period with an anchor and an interval.');
|
|
1727
1724
|
export const creditGrantPurchase = z
|
|
1728
1725
|
.object({
|
|
1729
1726
|
currency: currencyCode,
|
|
1730
|
-
per_unit_cost_basis: numeric.optional().default(
|
|
1727
|
+
per_unit_cost_basis: numeric.optional().default('1.0'),
|
|
1731
1728
|
amount: numeric,
|
|
1732
1729
|
availability_policy: creditAvailabilityPolicy
|
|
1733
1730
|
.optional()
|
|
1734
|
-
.default(
|
|
1731
|
+
.default('on_creation'),
|
|
1735
1732
|
settlement_status: creditPurchasePaymentSettlementStatus.optional(),
|
|
1736
1733
|
})
|
|
1737
|
-
.describe(
|
|
1734
|
+
.describe('Purchase and payment terms of the grant.');
|
|
1738
1735
|
export const updateCreditGrantExternalSettlementRequest = z
|
|
1739
1736
|
.object({
|
|
1740
1737
|
status: creditPurchasePaymentSettlementStatus,
|
|
1741
1738
|
})
|
|
1742
|
-
.describe(
|
|
1739
|
+
.describe('Request body for updating the external payment settlement status of a credit grant.');
|
|
1743
1740
|
export const listCreditGrantsParamsFilter = z
|
|
1744
1741
|
.object({
|
|
1745
1742
|
status: creditGrantStatus.optional(),
|
|
1746
1743
|
currency: currencyCode.optional(),
|
|
1747
1744
|
})
|
|
1748
|
-
.describe(
|
|
1745
|
+
.describe('Filter options for listing credit grants.');
|
|
1749
1746
|
export const getCreditBalanceParamsFilter = z
|
|
1750
1747
|
.object({
|
|
1751
1748
|
currency: stringFieldFilterExact.optional(),
|
|
1752
1749
|
})
|
|
1753
|
-
.describe(
|
|
1750
|
+
.describe('Filter options for getting a credit balance.');
|
|
1754
1751
|
export const listChargesParamsFilter = z
|
|
1755
1752
|
.object({
|
|
1756
1753
|
status: stringFieldFilterExact.optional(),
|
|
1757
1754
|
})
|
|
1758
|
-
.describe(
|
|
1755
|
+
.describe('Filter options for listing charges.');
|
|
1759
1756
|
export const listPlansParamsFilter = z
|
|
1760
1757
|
.object({
|
|
1761
1758
|
key: stringFieldFilter.optional(),
|
|
@@ -1763,12 +1760,12 @@ export const listPlansParamsFilter = z
|
|
|
1763
1760
|
status: stringFieldFilterExact.optional(),
|
|
1764
1761
|
currency: stringFieldFilterExact.optional(),
|
|
1765
1762
|
})
|
|
1766
|
-
.describe(
|
|
1763
|
+
.describe('Filter options for listing plans.');
|
|
1767
1764
|
export const rateCardProrationConfiguration = z
|
|
1768
1765
|
.object({
|
|
1769
1766
|
mode: rateCardProrationMode,
|
|
1770
1767
|
})
|
|
1771
|
-
.describe(
|
|
1768
|
+
.describe('The proration configuration of the rate card.');
|
|
1772
1769
|
export const subscription = z
|
|
1773
1770
|
.object({
|
|
1774
1771
|
id: ulid,
|
|
@@ -1781,161 +1778,161 @@ export const subscription = z
|
|
|
1781
1778
|
billing_anchor: dateTime,
|
|
1782
1779
|
status: subscriptionStatus,
|
|
1783
1780
|
})
|
|
1784
|
-
.describe(
|
|
1781
|
+
.describe('Subscription.');
|
|
1785
1782
|
export const subscriptionEditTiming = z
|
|
1786
1783
|
.union([subscriptionEditTimingEnum, dateTime])
|
|
1787
|
-
.describe(
|
|
1784
|
+
.describe('Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.');
|
|
1788
1785
|
export const appCatalogItem = z
|
|
1789
1786
|
.object({
|
|
1790
1787
|
type: appType,
|
|
1791
|
-
name: z.string().describe(
|
|
1792
|
-
description: z.string().describe(
|
|
1788
|
+
name: z.string().describe('Name of the app.'),
|
|
1789
|
+
description: z.string().describe('Description of the app.'),
|
|
1793
1790
|
})
|
|
1794
|
-
.describe(
|
|
1791
|
+
.describe('Available apps for billing integrations to connect with third-party services. Apps can have various capabilities like syncing data from or to external systems, integrating with third-party services for tax calculation, delivery of invoices, collection of payments, etc.');
|
|
1795
1792
|
export const taxCodeAppMapping = z
|
|
1796
1793
|
.object({
|
|
1797
1794
|
app_type: appType,
|
|
1798
|
-
tax_code: z.string().describe(
|
|
1795
|
+
tax_code: z.string().describe('Tax code.'),
|
|
1799
1796
|
})
|
|
1800
|
-
.describe(
|
|
1797
|
+
.describe('Mapping of app types to tax codes.');
|
|
1801
1798
|
export const partyTaxIdentity = z
|
|
1802
1799
|
.object({
|
|
1803
1800
|
code: taxIdentificationCode.optional(),
|
|
1804
1801
|
})
|
|
1805
|
-
.describe(
|
|
1802
|
+
.describe('Identity stores the details required to identify an entity for tax purposes in a specific country.');
|
|
1806
1803
|
export const workflowPaymentSettings = z
|
|
1807
|
-
.discriminatedUnion(
|
|
1804
|
+
.discriminatedUnion('collection_method', [
|
|
1808
1805
|
workflowPaymentChargeAutomaticallySettings,
|
|
1809
|
-
workflowPaymentSendInvoiceSettings
|
|
1806
|
+
workflowPaymentSendInvoiceSettings,
|
|
1810
1807
|
])
|
|
1811
|
-
.describe(
|
|
1808
|
+
.describe('Payment settings for a billing workflow.');
|
|
1812
1809
|
export const listCurrenciesParamsFilter = z
|
|
1813
1810
|
.object({
|
|
1814
1811
|
type: currencyType.optional(),
|
|
1815
1812
|
code: stringFieldFilter.optional(),
|
|
1816
1813
|
})
|
|
1817
|
-
.describe(
|
|
1814
|
+
.describe('Filter options for listing currencies.');
|
|
1818
1815
|
export const currencyCustom = z
|
|
1819
1816
|
.object({
|
|
1820
1817
|
id: ulid,
|
|
1821
|
-
type: z.literal(
|
|
1818
|
+
type: z.literal('custom').describe('The type of the currency.'),
|
|
1822
1819
|
name: z
|
|
1823
1820
|
.string()
|
|
1824
1821
|
.min(1)
|
|
1825
1822
|
.max(256)
|
|
1826
|
-
.describe(
|
|
1823
|
+
.describe('The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro".'),
|
|
1827
1824
|
description: z
|
|
1828
1825
|
.string()
|
|
1829
1826
|
.min(1)
|
|
1830
1827
|
.max(256)
|
|
1831
1828
|
.optional()
|
|
1832
|
-
.describe(
|
|
1829
|
+
.describe('Description of the currency.'),
|
|
1833
1830
|
symbol: z
|
|
1834
1831
|
.string()
|
|
1835
1832
|
.min(1)
|
|
1836
1833
|
.optional()
|
|
1837
|
-
.describe(
|
|
1834
|
+
.describe('The symbol of the currency. It should be a string that represents the symbol of the currency, such as "$" for US Dollar or "€" for Euro.'),
|
|
1838
1835
|
code: currencyCodeCustom,
|
|
1839
1836
|
created_at: dateTime,
|
|
1840
1837
|
})
|
|
1841
|
-
.describe(
|
|
1838
|
+
.describe('Describes custom currency.');
|
|
1842
1839
|
export const createCurrencyCustomRequest = z
|
|
1843
1840
|
.object({
|
|
1844
1841
|
name: z
|
|
1845
1842
|
.string()
|
|
1846
1843
|
.min(1)
|
|
1847
1844
|
.max(256)
|
|
1848
|
-
.describe(
|
|
1845
|
+
.describe('The name of the currency. It should be a human-readable string that represents the name of the currency, such as "US Dollar" or "Euro".'),
|
|
1849
1846
|
description: z
|
|
1850
1847
|
.string()
|
|
1851
1848
|
.min(1)
|
|
1852
1849
|
.max(256)
|
|
1853
1850
|
.optional()
|
|
1854
|
-
.describe(
|
|
1851
|
+
.describe('Description of the currency.'),
|
|
1855
1852
|
symbol: z
|
|
1856
1853
|
.string()
|
|
1857
1854
|
.min(1)
|
|
1858
1855
|
.optional()
|
|
1859
|
-
.describe(
|
|
1856
|
+
.describe('The symbol of the currency. It should be a string that represents the symbol of the currency, such as "$" for US Dollar or "€" for Euro.'),
|
|
1860
1857
|
code: currencyCodeCustom,
|
|
1861
1858
|
})
|
|
1862
|
-
.describe(
|
|
1859
|
+
.describe('CurrencyCustom create request.');
|
|
1863
1860
|
export const governanceQueryRequest = z
|
|
1864
1861
|
.object({
|
|
1865
1862
|
include_credits: z
|
|
1866
1863
|
.boolean()
|
|
1867
1864
|
.optional()
|
|
1868
1865
|
.default(false)
|
|
1869
|
-
.describe(
|
|
1866
|
+
.describe('Whether to include credit balance availability for each resolved customer. When true, each feature evaluation includes credit balance checks. Defaults to `false`.'),
|
|
1870
1867
|
customer: governanceQueryRequestCustomers,
|
|
1871
1868
|
feature: governanceQueryRequestFeatures.optional(),
|
|
1872
1869
|
})
|
|
1873
|
-
.describe(
|
|
1870
|
+
.describe('Query to evaluate feature access for a list of customers.');
|
|
1874
1871
|
export const governanceFeatureAccessReason = z
|
|
1875
1872
|
.object({
|
|
1876
1873
|
code: governanceFeatureAccessReasonCode,
|
|
1877
|
-
message: z.string().describe(
|
|
1874
|
+
message: z.string().describe('Human-readable description of the error.'),
|
|
1878
1875
|
attributes: z
|
|
1879
1876
|
.record(z.string(), z.unknown())
|
|
1880
1877
|
.optional()
|
|
1881
|
-
.describe(
|
|
1878
|
+
.describe('Additional structured context.'),
|
|
1882
1879
|
})
|
|
1883
|
-
.describe(
|
|
1880
|
+
.describe('Reason a feature is not accessible to a customer.');
|
|
1884
1881
|
export const governanceQueryError = z
|
|
1885
1882
|
.object({
|
|
1886
1883
|
code: governanceQueryErrorCode,
|
|
1887
|
-
message: z.string().describe(
|
|
1884
|
+
message: z.string().describe('Human-readable description of the error.'),
|
|
1888
1885
|
attributes: z
|
|
1889
1886
|
.record(z.string(), z.unknown())
|
|
1890
1887
|
.optional()
|
|
1891
|
-
.describe(
|
|
1888
|
+
.describe('Additional structured context.'),
|
|
1892
1889
|
customer: z
|
|
1893
1890
|
.string()
|
|
1894
1891
|
.optional()
|
|
1895
|
-
.describe(
|
|
1892
|
+
.describe('The customer identifier from the request that produced this error.'),
|
|
1896
1893
|
})
|
|
1897
|
-
.describe(
|
|
1894
|
+
.describe('Query error within a partially successful governance query response.');
|
|
1898
1895
|
export const unitConfig = z
|
|
1899
1896
|
.object({
|
|
1900
1897
|
operation: unitConfigOperation,
|
|
1901
1898
|
conversion_factor: numeric,
|
|
1902
|
-
rounding: unitConfigRoundingMode.optional().default(
|
|
1899
|
+
rounding: unitConfigRoundingMode.optional().default('none'),
|
|
1903
1900
|
precision: z
|
|
1904
1901
|
.number()
|
|
1905
1902
|
.int()
|
|
1906
1903
|
.optional()
|
|
1907
1904
|
.default(0)
|
|
1908
|
-
.describe(
|
|
1905
|
+
.describe('The number of decimal places to retain after rounding. Only meaningful when rounding is not "none". Defaults to 0 (round to whole numbers).'),
|
|
1909
1906
|
display_unit: z
|
|
1910
1907
|
.string()
|
|
1911
1908
|
.optional()
|
|
1912
|
-
.describe(
|
|
1909
|
+
.describe('A human-readable label for the converted unit shown on invoices and in the customer portal (e.g., "GB", "hours", "M tokens"). Optional. When omitted, no unit label is rendered.'),
|
|
1913
1910
|
})
|
|
1914
|
-
.describe(
|
|
1911
|
+
.describe('Unit conversion configuration. Transforms raw metered quantities into billing-ready units before pricing and entitlement evaluation. Applied at the rate card level so the same feature can be billed in different units across plans. Examples: - Meter bytes, bill GB: operation=divide, conversionFactor=1e9, rounding=ceiling, displayUnit="GB" - Meter seconds, bill hours: operation=divide, conversionFactor=3600, rounding=ceiling, displayUnit="hours" - Cost + 20% margin: operation=multiply, conversionFactor=1.2 - Bill per million tokens: operation=divide, conversionFactor=1e6, rounding=ceiling, displayUnit="M" v1 equivalents: - DynamicPrice(multiplier): operation=multiply, conversionFactor=multiplier + UnitPrice(amount=1) - PackagePrice(amount, quantityPerPkg): operation=divide, conversionFactor=quantityPerPkg, rounding=ceiling + UnitPrice(amount)');
|
|
1915
1912
|
export const appCustomerData = z
|
|
1916
1913
|
.object({
|
|
1917
1914
|
stripe: appCustomerDataStripe.optional(),
|
|
1918
1915
|
external_invoicing: appCustomerDataExternalInvoicing.optional(),
|
|
1919
1916
|
})
|
|
1920
|
-
.describe(
|
|
1917
|
+
.describe('App customer data.');
|
|
1921
1918
|
export const upsertAppCustomerDataRequest = z
|
|
1922
1919
|
.object({
|
|
1923
1920
|
stripe: appCustomerDataStripe.optional(),
|
|
1924
1921
|
external_invoicing: appCustomerDataExternalInvoicing.optional(),
|
|
1925
1922
|
})
|
|
1926
|
-
.describe(
|
|
1923
|
+
.describe('AppCustomerData upsert request.');
|
|
1927
1924
|
export const creditAdjustment = z
|
|
1928
1925
|
.object({
|
|
1929
1926
|
name: z
|
|
1930
1927
|
.string()
|
|
1931
1928
|
.min(1)
|
|
1932
1929
|
.max(256)
|
|
1933
|
-
.describe(
|
|
1930
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1934
1931
|
description: z
|
|
1935
1932
|
.string()
|
|
1936
1933
|
.max(1024)
|
|
1937
1934
|
.optional()
|
|
1938
|
-
.describe(
|
|
1935
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1939
1936
|
labels: labels.optional(),
|
|
1940
1937
|
currency: billingCurrencyCode,
|
|
1941
1938
|
amount: numeric,
|
|
@@ -1947,30 +1944,30 @@ export const creditBalance = z
|
|
|
1947
1944
|
pending: numeric,
|
|
1948
1945
|
available: numeric,
|
|
1949
1946
|
})
|
|
1950
|
-
.describe(
|
|
1947
|
+
.describe('The credit balance by currency.');
|
|
1951
1948
|
export const createCreditAdjustmentRequest = z
|
|
1952
1949
|
.object({
|
|
1953
1950
|
name: z
|
|
1954
1951
|
.string()
|
|
1955
1952
|
.min(1)
|
|
1956
1953
|
.max(256)
|
|
1957
|
-
.describe(
|
|
1954
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1958
1955
|
description: z
|
|
1959
1956
|
.string()
|
|
1960
1957
|
.max(1024)
|
|
1961
1958
|
.optional()
|
|
1962
|
-
.describe(
|
|
1959
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1963
1960
|
labels: labels.optional(),
|
|
1964
1961
|
currency: billingCurrencyCode,
|
|
1965
1962
|
amount: numeric,
|
|
1966
1963
|
})
|
|
1967
|
-
.describe(
|
|
1964
|
+
.describe('CreditAdjustment create request.');
|
|
1968
1965
|
export const listCreditTransactionsParamsFilter = z
|
|
1969
1966
|
.object({
|
|
1970
1967
|
type: creditTransactionType.optional(),
|
|
1971
1968
|
currency: billingCurrencyCode.optional(),
|
|
1972
1969
|
})
|
|
1973
|
-
.describe(
|
|
1970
|
+
.describe('Filter options for listing credit transactions.');
|
|
1974
1971
|
export const creditTransaction = z
|
|
1975
1972
|
.object({
|
|
1976
1973
|
id: ulid,
|
|
@@ -1978,12 +1975,12 @@ export const creditTransaction = z
|
|
|
1978
1975
|
.string()
|
|
1979
1976
|
.min(1)
|
|
1980
1977
|
.max(256)
|
|
1981
|
-
.describe(
|
|
1978
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
1982
1979
|
description: z
|
|
1983
1980
|
.string()
|
|
1984
1981
|
.max(1024)
|
|
1985
1982
|
.optional()
|
|
1986
|
-
.describe(
|
|
1983
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
1987
1984
|
labels: labels.optional(),
|
|
1988
1985
|
created_at: dateTime,
|
|
1989
1986
|
booked_at: dateTime,
|
|
@@ -1995,7 +1992,7 @@ export const creditTransaction = z
|
|
|
1995
1992
|
before: numeric,
|
|
1996
1993
|
after: numeric,
|
|
1997
1994
|
})
|
|
1998
|
-
.describe(
|
|
1995
|
+
.describe('The available balance before and after the transaction.'),
|
|
1999
1996
|
})
|
|
2000
1997
|
.describe("A credit transaction represents a single credit movement on the customer's balance. Credit transactions are immutable.");
|
|
2001
1998
|
export const priceTier = z
|
|
@@ -2004,42 +2001,42 @@ export const priceTier = z
|
|
|
2004
2001
|
flat_price: priceFlat.optional(),
|
|
2005
2002
|
unit_price: priceUnit.optional(),
|
|
2006
2003
|
})
|
|
2007
|
-
.describe(
|
|
2004
|
+
.describe('A price tier used in graduated and volume pricing. At least one price component (flat_price or unit_price) must be set. When UnitConfig is present on the rate card, up_to_amount is expressed in converted billing units.');
|
|
2008
2005
|
export const chargeTotals = z
|
|
2009
2006
|
.object({
|
|
2010
2007
|
booked: totals,
|
|
2011
2008
|
realtime: totals.optional(),
|
|
2012
2009
|
})
|
|
2013
|
-
.describe(
|
|
2010
|
+
.describe('The totals of a change. RealTime is only expanded when the `real_time_usage` expand is used.');
|
|
2014
2011
|
export const featureLlmUnitCost = z
|
|
2015
2012
|
.object({
|
|
2016
2013
|
type: z
|
|
2017
|
-
.literal(
|
|
2018
|
-
.describe(
|
|
2014
|
+
.literal('llm')
|
|
2015
|
+
.describe('The type discriminator for LLM unit cost.'),
|
|
2019
2016
|
provider_property: z
|
|
2020
2017
|
.string()
|
|
2021
2018
|
.optional()
|
|
2022
|
-
.describe(
|
|
2019
|
+
.describe('Meter group-by property that holds the LLM provider. Use this when the meter has a group-by dimension for provider. Mutually exclusive with `provider`.'),
|
|
2023
2020
|
provider: z
|
|
2024
2021
|
.string()
|
|
2025
2022
|
.optional()
|
|
2026
|
-
.describe(
|
|
2023
|
+
.describe('Static LLM provider value (e.g., "openai", "anthropic"). Use this when the feature tracks a single provider. Mutually exclusive with `provider_property`.'),
|
|
2027
2024
|
model_property: z
|
|
2028
2025
|
.string()
|
|
2029
2026
|
.optional()
|
|
2030
|
-
.describe(
|
|
2027
|
+
.describe('Meter group-by property that holds the model ID. Use this when the meter has a group-by dimension for model. Mutually exclusive with `model`.'),
|
|
2031
2028
|
model: z
|
|
2032
2029
|
.string()
|
|
2033
2030
|
.optional()
|
|
2034
|
-
.describe(
|
|
2031
|
+
.describe('Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet"). Use this when the feature tracks a single model. Mutually exclusive with `model_property`.'),
|
|
2035
2032
|
token_type_property: z
|
|
2036
2033
|
.string()
|
|
2037
2034
|
.optional()
|
|
2038
|
-
.describe(
|
|
2035
|
+
.describe('Meter group-by property that holds the token type. Use this when the meter has a group-by dimension for token type. Mutually exclusive with `token_type`.'),
|
|
2039
2036
|
token_type: featureLlmTokenType.optional(),
|
|
2040
2037
|
pricing: featureLlmUnitCostPricing.optional(),
|
|
2041
2038
|
})
|
|
2042
|
-
.describe(
|
|
2039
|
+
.describe('LLM cost lookup configuration. Each dimension (provider, model, token type) can be specified as either a static value or a meter group-by property name (mutually exclusive).');
|
|
2043
2040
|
export const llmCostPrice = z
|
|
2044
2041
|
.object({
|
|
2045
2042
|
id: ulid,
|
|
@@ -2053,18 +2050,18 @@ export const llmCostPrice = z
|
|
|
2053
2050
|
created_at: dateTime,
|
|
2054
2051
|
updated_at: dateTime,
|
|
2055
2052
|
})
|
|
2056
|
-
.describe(
|
|
2053
|
+
.describe('An LLM cost price record, representing the cost per token for a specific model from a specific provider.');
|
|
2057
2054
|
export const llmCostOverrideCreate = z
|
|
2058
2055
|
.object({
|
|
2059
|
-
provider: z.string().describe(
|
|
2060
|
-
model_id: z.string().describe(
|
|
2061
|
-
model_name: z.string().optional().describe(
|
|
2056
|
+
provider: z.string().describe('Provider/vendor of the model.'),
|
|
2057
|
+
model_id: z.string().describe('Canonical model identifier.'),
|
|
2058
|
+
model_name: z.string().optional().describe('Human-readable model name.'),
|
|
2062
2059
|
pricing: llmCostModelPricing,
|
|
2063
2060
|
currency: currencyCode,
|
|
2064
2061
|
effective_from: dateTime,
|
|
2065
2062
|
effective_to: dateTime.optional(),
|
|
2066
2063
|
})
|
|
2067
|
-
.describe(
|
|
2064
|
+
.describe('Input for creating a per-namespace price override. Unique per provider, model and currency. If an override already exists for the given provider, model and currency, it will be updated. If an override does not exist, it will be created.');
|
|
2068
2065
|
export const listCustomersParamsFilter = z
|
|
2069
2066
|
.object({
|
|
2070
2067
|
key: stringFieldFilter.optional(),
|
|
@@ -2074,7 +2071,7 @@ export const listCustomersParamsFilter = z
|
|
|
2074
2071
|
plan_key: stringFieldFilter.optional(),
|
|
2075
2072
|
billing_profile_id: ulidFieldFilter.optional(),
|
|
2076
2073
|
})
|
|
2077
|
-
.describe(
|
|
2074
|
+
.describe('Filter options for listing customers.');
|
|
2078
2075
|
export const listSubscriptionsParamsFilter = z
|
|
2079
2076
|
.object({
|
|
2080
2077
|
id: ulidFieldFilter.optional(),
|
|
@@ -2083,14 +2080,14 @@ export const listSubscriptionsParamsFilter = z
|
|
|
2083
2080
|
plan_id: ulidFieldFilter.optional(),
|
|
2084
2081
|
plan_key: stringFieldFilterExact.optional(),
|
|
2085
2082
|
})
|
|
2086
|
-
.describe(
|
|
2083
|
+
.describe('Filter options for listing subscriptions.');
|
|
2087
2084
|
export const listFeatureParamsFilter = z
|
|
2088
2085
|
.object({
|
|
2089
2086
|
meter_id: ulidFieldFilter.optional(),
|
|
2090
2087
|
key: stringFieldFilter.optional(),
|
|
2091
2088
|
name: stringFieldFilter.optional(),
|
|
2092
2089
|
})
|
|
2093
|
-
.describe(
|
|
2090
|
+
.describe('Filter options for listing features.');
|
|
2094
2091
|
export const listAddonsParamsFilter = z
|
|
2095
2092
|
.object({
|
|
2096
2093
|
id: ulidFieldFilter.optional(),
|
|
@@ -2099,19 +2096,19 @@ export const listAddonsParamsFilter = z
|
|
|
2099
2096
|
status: stringFieldFilterExact.optional(),
|
|
2100
2097
|
currency: stringFieldFilterExact.optional(),
|
|
2101
2098
|
})
|
|
2102
|
-
.describe(
|
|
2099
|
+
.describe('Filter options for listing add-ons.');
|
|
2103
2100
|
export const createCreditGrantTaxConfig = z
|
|
2104
2101
|
.object({
|
|
2105
2102
|
behavior: taxBehavior.optional(),
|
|
2106
2103
|
tax_code: createResourceReference.optional(),
|
|
2107
2104
|
})
|
|
2108
|
-
.describe(
|
|
2105
|
+
.describe('Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants.');
|
|
2109
2106
|
export const creditGrantTaxConfig = z
|
|
2110
2107
|
.object({
|
|
2111
2108
|
behavior: taxBehavior.optional(),
|
|
2112
2109
|
tax_code: taxCodeReference.optional(),
|
|
2113
2110
|
})
|
|
2114
|
-
.describe(
|
|
2111
|
+
.describe('Tax configuration for a credit grant. Tax configuration should be provided to ensure correct revenue recognition, including for externally funded grants.');
|
|
2115
2112
|
export const taxConfig = z
|
|
2116
2113
|
.object({
|
|
2117
2114
|
behavior: taxBehavior.optional(),
|
|
@@ -2120,13 +2117,13 @@ export const taxConfig = z
|
|
|
2120
2117
|
tax_code_id: ulid.optional(),
|
|
2121
2118
|
tax_code: taxCodeReference.optional(),
|
|
2122
2119
|
})
|
|
2123
|
-
.describe(
|
|
2120
|
+
.describe('Set of provider specific tax configs.');
|
|
2124
2121
|
export const rateCardTaxConfig = z
|
|
2125
2122
|
.object({
|
|
2126
2123
|
behavior: taxBehavior.optional(),
|
|
2127
2124
|
code: taxCodeReference,
|
|
2128
2125
|
})
|
|
2129
|
-
.describe(
|
|
2126
|
+
.describe('The tax config of the rate card.');
|
|
2130
2127
|
export const organizationDefaultTaxCodes = z
|
|
2131
2128
|
.object({
|
|
2132
2129
|
invoicing_tax_code: taxCodeReference,
|
|
@@ -2134,13 +2131,13 @@ export const organizationDefaultTaxCodes = z
|
|
|
2134
2131
|
created_at: dateTime,
|
|
2135
2132
|
updated_at: dateTime,
|
|
2136
2133
|
})
|
|
2137
|
-
.describe(
|
|
2134
|
+
.describe('Organization-level default tax code references. Stores the default tax codes applied to specific billing contexts for this organization. Provisioned automatically when the organization is created.');
|
|
2138
2135
|
export const updateOrganizationDefaultTaxCodesRequest = z
|
|
2139
2136
|
.object({
|
|
2140
2137
|
invoicing_tax_code: taxCodeReference.optional(),
|
|
2141
2138
|
credit_grant_tax_code: taxCodeReference.optional(),
|
|
2142
2139
|
})
|
|
2143
|
-
.describe(
|
|
2140
|
+
.describe('OrganizationDefaultTaxCodes update request.');
|
|
2144
2141
|
export const subscriptionAddon = z
|
|
2145
2142
|
.object({
|
|
2146
2143
|
id: ulid,
|
|
@@ -2148,12 +2145,12 @@ export const subscriptionAddon = z
|
|
|
2148
2145
|
.string()
|
|
2149
2146
|
.min(1)
|
|
2150
2147
|
.max(256)
|
|
2151
|
-
.describe(
|
|
2148
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2152
2149
|
description: z
|
|
2153
2150
|
.string()
|
|
2154
2151
|
.max(1024)
|
|
2155
2152
|
.optional()
|
|
2156
|
-
.describe(
|
|
2153
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2157
2154
|
labels: labels.optional(),
|
|
2158
2155
|
created_at: dateTime,
|
|
2159
2156
|
updated_at: dateTime,
|
|
@@ -2163,12 +2160,12 @@ export const subscriptionAddon = z
|
|
|
2163
2160
|
.number()
|
|
2164
2161
|
.int()
|
|
2165
2162
|
.gte(1)
|
|
2166
|
-
.describe(
|
|
2163
|
+
.describe('The quantity of the add-on. Always 1 for single instance add-ons.'),
|
|
2167
2164
|
quantity_at: dateTime,
|
|
2168
2165
|
active_from: dateTime,
|
|
2169
2166
|
active_to: dateTime.optional(),
|
|
2170
2167
|
})
|
|
2171
|
-
.describe(
|
|
2168
|
+
.describe('Addon purchased with a subscription.');
|
|
2172
2169
|
export const planAddon = z
|
|
2173
2170
|
.object({
|
|
2174
2171
|
id: ulid,
|
|
@@ -2176,12 +2173,12 @@ export const planAddon = z
|
|
|
2176
2173
|
.string()
|
|
2177
2174
|
.min(1)
|
|
2178
2175
|
.max(256)
|
|
2179
|
-
.describe(
|
|
2176
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2180
2177
|
description: z
|
|
2181
2178
|
.string()
|
|
2182
2179
|
.max(1024)
|
|
2183
2180
|
.optional()
|
|
2184
|
-
.describe(
|
|
2181
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2185
2182
|
labels: labels.optional(),
|
|
2186
2183
|
created_at: dateTime,
|
|
2187
2184
|
updated_at: dateTime,
|
|
@@ -2193,25 +2190,25 @@ export const planAddon = z
|
|
|
2193
2190
|
.int()
|
|
2194
2191
|
.gte(1)
|
|
2195
2192
|
.optional()
|
|
2196
|
-
.describe(
|
|
2193
|
+
.describe('The maximum number of times the add-on can be purchased for the plan. For single-instance add-ons this field must be omitted. For multi-instance add-ons when omitted, unlimited quantity can be purchased.'),
|
|
2197
2194
|
validation_errors: z
|
|
2198
2195
|
.array(productCatalogValidationError)
|
|
2199
2196
|
.optional()
|
|
2200
|
-
.describe(
|
|
2197
|
+
.describe('List of validation errors.'),
|
|
2201
2198
|
})
|
|
2202
|
-
.describe(
|
|
2199
|
+
.describe('PlanAddon represents an association between a plan and an add-on, controlling which add-ons are available for purchase within a plan.');
|
|
2203
2200
|
export const createPlanAddonRequest = z
|
|
2204
2201
|
.object({
|
|
2205
2202
|
name: z
|
|
2206
2203
|
.string()
|
|
2207
2204
|
.min(1)
|
|
2208
2205
|
.max(256)
|
|
2209
|
-
.describe(
|
|
2206
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2210
2207
|
description: z
|
|
2211
2208
|
.string()
|
|
2212
2209
|
.max(1024)
|
|
2213
2210
|
.optional()
|
|
2214
|
-
.describe(
|
|
2211
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2215
2212
|
labels: labels.optional(),
|
|
2216
2213
|
addon: addonReference,
|
|
2217
2214
|
from_plan_phase: resourceKey,
|
|
@@ -2220,16 +2217,16 @@ export const createPlanAddonRequest = z
|
|
|
2220
2217
|
.int()
|
|
2221
2218
|
.gte(1)
|
|
2222
2219
|
.optional()
|
|
2223
|
-
.describe(
|
|
2220
|
+
.describe('The maximum number of times the add-on can be purchased for the plan. For single-instance add-ons this field must be omitted. For multi-instance add-ons when omitted, unlimited quantity can be purchased.'),
|
|
2224
2221
|
})
|
|
2225
|
-
.describe(
|
|
2222
|
+
.describe('PlanAddon create request.');
|
|
2226
2223
|
export const profileAppReferences = z
|
|
2227
2224
|
.object({
|
|
2228
2225
|
tax: appReference,
|
|
2229
2226
|
invoicing: appReference,
|
|
2230
2227
|
payment: appReference,
|
|
2231
2228
|
})
|
|
2232
|
-
.describe(
|
|
2229
|
+
.describe('References to the applications used by a billing profile.');
|
|
2233
2230
|
export const listEventsParamsFilter = z
|
|
2234
2231
|
.object({
|
|
2235
2232
|
id: stringFieldFilter.optional(),
|
|
@@ -2241,7 +2238,7 @@ export const listEventsParamsFilter = z
|
|
|
2241
2238
|
ingested_at: dateTimeFieldFilter.optional(),
|
|
2242
2239
|
stored_at: dateTimeFieldFilter.optional(),
|
|
2243
2240
|
})
|
|
2244
|
-
.describe(
|
|
2241
|
+
.describe('Filter options for listing ingested events.');
|
|
2245
2242
|
export const resourceFilters = z
|
|
2246
2243
|
.object({
|
|
2247
2244
|
name: stringFieldFilter.optional(),
|
|
@@ -2251,7 +2248,7 @@ export const resourceFilters = z
|
|
|
2251
2248
|
updated_at: dateTimeFieldFilter.optional(),
|
|
2252
2249
|
deleted_at: dateTimeFieldFilter.optional(),
|
|
2253
2250
|
})
|
|
2254
|
-
.describe(
|
|
2251
|
+
.describe('Resource filters.');
|
|
2255
2252
|
export const fieldFilters = z
|
|
2256
2253
|
.object({
|
|
2257
2254
|
boolean: booleanFieldFilter.optional(),
|
|
@@ -2262,7 +2259,7 @@ export const fieldFilters = z
|
|
|
2262
2259
|
datetime: dateTimeFieldFilter.optional(),
|
|
2263
2260
|
labels: labelsFieldFilter.optional(),
|
|
2264
2261
|
})
|
|
2265
|
-
.describe(
|
|
2262
|
+
.describe('Field filters with all supported types.');
|
|
2266
2263
|
export const ingestedEvent = z
|
|
2267
2264
|
.object({
|
|
2268
2265
|
event: event,
|
|
@@ -2272,86 +2269,86 @@ export const ingestedEvent = z
|
|
|
2272
2269
|
validation_errors: z
|
|
2273
2270
|
.array(ingestedEventValidationError)
|
|
2274
2271
|
.optional()
|
|
2275
|
-
.describe(
|
|
2272
|
+
.describe('The validation errors of the ingested event.'),
|
|
2276
2273
|
})
|
|
2277
|
-
.describe(
|
|
2274
|
+
.describe('An ingested metering event with ingestion metadata.');
|
|
2278
2275
|
export const meterQueryResult = z
|
|
2279
2276
|
.object({
|
|
2280
2277
|
from: dateTime.optional(),
|
|
2281
2278
|
to: dateTime.optional(),
|
|
2282
2279
|
data: z
|
|
2283
2280
|
.array(meterQueryRow)
|
|
2284
|
-
.describe(
|
|
2281
|
+
.describe('The usage data. If no data is available, an empty array is returned.'),
|
|
2285
2282
|
})
|
|
2286
|
-
.describe(
|
|
2283
|
+
.describe('Meter query result.');
|
|
2287
2284
|
export const featureCostQueryResult = z
|
|
2288
2285
|
.object({
|
|
2289
2286
|
from: dateTime.optional(),
|
|
2290
2287
|
to: dateTime.optional(),
|
|
2291
|
-
data: z.array(featureCostQueryRow).describe(
|
|
2288
|
+
data: z.array(featureCostQueryRow).describe('The cost data rows.'),
|
|
2292
2289
|
})
|
|
2293
|
-
.describe(
|
|
2290
|
+
.describe('Result of a feature cost query.');
|
|
2294
2291
|
export const invalidParameter = z
|
|
2295
2292
|
.union([
|
|
2296
2293
|
invalidParameterStandard,
|
|
2297
2294
|
invalidParameterMinimumLength,
|
|
2298
2295
|
invalidParameterMaximumLength,
|
|
2299
2296
|
invalidParameterChoiceItem,
|
|
2300
|
-
invalidParameterDependentItem
|
|
2297
|
+
invalidParameterDependentItem,
|
|
2301
2298
|
])
|
|
2302
|
-
.describe(
|
|
2299
|
+
.describe('A parameter that failed validation.');
|
|
2303
2300
|
export const meterPagePaginatedResponse = z
|
|
2304
2301
|
.object({
|
|
2305
2302
|
data: z.array(meter),
|
|
2306
2303
|
meta: paginatedMeta,
|
|
2307
2304
|
})
|
|
2308
|
-
.describe(
|
|
2305
|
+
.describe('Page paginated response.');
|
|
2309
2306
|
export const costBasisPagePaginatedResponse = z
|
|
2310
2307
|
.object({
|
|
2311
2308
|
data: z.array(costBasis),
|
|
2312
2309
|
meta: paginatedMeta,
|
|
2313
2310
|
})
|
|
2314
|
-
.describe(
|
|
2311
|
+
.describe('Page paginated response.');
|
|
2315
2312
|
export const meterQueryFilters = z
|
|
2316
2313
|
.object({
|
|
2317
2314
|
dimensions: z
|
|
2318
2315
|
.record(z.string(), queryFilterStringMapItem)
|
|
2319
2316
|
.optional()
|
|
2320
|
-
.describe(
|
|
2317
|
+
.describe('Filters to apply to the dimensions of the query. For `subject` and `customer_id` only equals ("eq", "in") comparisons are supported.'),
|
|
2321
2318
|
})
|
|
2322
|
-
.describe(
|
|
2319
|
+
.describe('Filters to apply to a meter query.');
|
|
2323
2320
|
export const featureMeterReference = z
|
|
2324
2321
|
.object({
|
|
2325
2322
|
id: ulid,
|
|
2326
2323
|
filters: z
|
|
2327
2324
|
.record(z.string(), queryFilterStringMapItem)
|
|
2328
2325
|
.optional()
|
|
2329
|
-
.describe(
|
|
2326
|
+
.describe('Filters to apply to the dimensions of the meter.'),
|
|
2330
2327
|
})
|
|
2331
|
-
.describe(
|
|
2328
|
+
.describe('Reference to a meter associated with a feature.');
|
|
2332
2329
|
export const createCustomerRequest = z
|
|
2333
2330
|
.object({
|
|
2334
2331
|
name: z
|
|
2335
2332
|
.string()
|
|
2336
2333
|
.min(1)
|
|
2337
2334
|
.max(256)
|
|
2338
|
-
.describe(
|
|
2335
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2339
2336
|
description: z
|
|
2340
2337
|
.string()
|
|
2341
2338
|
.max(1024)
|
|
2342
2339
|
.optional()
|
|
2343
|
-
.describe(
|
|
2340
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2344
2341
|
labels: labels.optional(),
|
|
2345
2342
|
key: externalResourceKey,
|
|
2346
2343
|
usage_attribution: customerUsageAttribution.optional(),
|
|
2347
2344
|
primary_email: z
|
|
2348
2345
|
.string()
|
|
2349
2346
|
.optional()
|
|
2350
|
-
.describe(
|
|
2347
|
+
.describe('The primary email address of the customer.'),
|
|
2351
2348
|
currency: currencyCode.optional(),
|
|
2352
2349
|
billing_address: billingAddress.optional(),
|
|
2353
2350
|
})
|
|
2354
|
-
.describe(
|
|
2351
|
+
.describe('Customer create request.');
|
|
2355
2352
|
export const customer = z
|
|
2356
2353
|
.object({
|
|
2357
2354
|
id: ulid,
|
|
@@ -2359,12 +2356,12 @@ export const customer = z
|
|
|
2359
2356
|
.string()
|
|
2360
2357
|
.min(1)
|
|
2361
2358
|
.max(256)
|
|
2362
|
-
.describe(
|
|
2359
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2363
2360
|
description: z
|
|
2364
2361
|
.string()
|
|
2365
2362
|
.max(1024)
|
|
2366
2363
|
.optional()
|
|
2367
|
-
.describe(
|
|
2364
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2368
2365
|
labels: labels.optional(),
|
|
2369
2366
|
created_at: dateTime,
|
|
2370
2367
|
updated_at: dateTime,
|
|
@@ -2374,78 +2371,75 @@ export const customer = z
|
|
|
2374
2371
|
primary_email: z
|
|
2375
2372
|
.string()
|
|
2376
2373
|
.optional()
|
|
2377
|
-
.describe(
|
|
2374
|
+
.describe('The primary email address of the customer.'),
|
|
2378
2375
|
currency: currencyCode.optional(),
|
|
2379
2376
|
billing_address: billingAddress.optional(),
|
|
2380
2377
|
})
|
|
2381
|
-
.describe(
|
|
2378
|
+
.describe('Customers can be individuals or organizations that can subscribe to plans and have access to features.');
|
|
2382
2379
|
export const upsertCustomerRequest = z
|
|
2383
2380
|
.object({
|
|
2384
2381
|
name: z
|
|
2385
2382
|
.string()
|
|
2386
2383
|
.min(1)
|
|
2387
2384
|
.max(256)
|
|
2388
|
-
.describe(
|
|
2385
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2389
2386
|
description: z
|
|
2390
2387
|
.string()
|
|
2391
2388
|
.max(1024)
|
|
2392
2389
|
.optional()
|
|
2393
|
-
.describe(
|
|
2390
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2394
2391
|
labels: labels.optional(),
|
|
2395
2392
|
usage_attribution: customerUsageAttribution.optional(),
|
|
2396
2393
|
primary_email: z
|
|
2397
2394
|
.string()
|
|
2398
2395
|
.optional()
|
|
2399
|
-
.describe(
|
|
2396
|
+
.describe('The primary email address of the customer.'),
|
|
2400
2397
|
currency: currencyCode.optional(),
|
|
2401
2398
|
billing_address: billingAddress.optional(),
|
|
2402
2399
|
})
|
|
2403
|
-
.describe(
|
|
2400
|
+
.describe('Customer upsert request.');
|
|
2404
2401
|
export const partyAddresses = z
|
|
2405
2402
|
.object({
|
|
2406
2403
|
billing_address: address,
|
|
2407
2404
|
})
|
|
2408
|
-
.describe(
|
|
2405
|
+
.describe('A collection of addresses for the party.');
|
|
2409
2406
|
export const appStripeCreateCheckoutSessionConsentCollection = z
|
|
2410
2407
|
.object({
|
|
2411
|
-
payment_method_reuse_agreement: appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
.optional(),
|
|
2415
|
-
terms_of_service: appStripeCreateCheckoutSessionConsentCollectionTermsOfService
|
|
2416
|
-
.optional(),
|
|
2408
|
+
payment_method_reuse_agreement: appStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement.optional(),
|
|
2409
|
+
promotions: appStripeCreateCheckoutSessionConsentCollectionPromotions.optional(),
|
|
2410
|
+
terms_of_service: appStripeCreateCheckoutSessionConsentCollectionTermsOfService.optional(),
|
|
2417
2411
|
})
|
|
2418
|
-
.describe(
|
|
2412
|
+
.describe('Checkout Session consent collection configuration.');
|
|
2419
2413
|
export const listCustomerEntitlementAccessResponseData = z
|
|
2420
2414
|
.object({
|
|
2421
2415
|
data: z
|
|
2422
2416
|
.array(entitlementAccessResult)
|
|
2423
|
-
.describe(
|
|
2417
|
+
.describe('The list of entitlement access results.'),
|
|
2424
2418
|
})
|
|
2425
|
-
.describe(
|
|
2419
|
+
.describe('List customer entitlement access response data.');
|
|
2426
2420
|
export const workflowCollectionAlignmentAnchored = z
|
|
2427
2421
|
.object({
|
|
2428
|
-
type: z.literal(
|
|
2422
|
+
type: z.literal('anchored').describe('The type of alignment.'),
|
|
2429
2423
|
recurring_period: recurringPeriod,
|
|
2430
2424
|
})
|
|
2431
|
-
.describe(
|
|
2425
|
+
.describe('BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.');
|
|
2432
2426
|
export const subscriptionPagePaginatedResponse = z
|
|
2433
2427
|
.object({
|
|
2434
2428
|
data: z.array(subscription),
|
|
2435
2429
|
meta: paginatedMeta,
|
|
2436
2430
|
})
|
|
2437
|
-
.describe(
|
|
2431
|
+
.describe('Page paginated response.');
|
|
2438
2432
|
export const subscriptionChangeResponse = z
|
|
2439
2433
|
.object({
|
|
2440
2434
|
current: subscription,
|
|
2441
2435
|
next: subscription,
|
|
2442
2436
|
})
|
|
2443
|
-
.describe(
|
|
2437
|
+
.describe('Response for changing a subscription.');
|
|
2444
2438
|
export const subscriptionCancel = z
|
|
2445
2439
|
.object({
|
|
2446
|
-
timing: subscriptionEditTiming.optional().default(
|
|
2440
|
+
timing: subscriptionEditTiming.optional().default('immediate'),
|
|
2447
2441
|
})
|
|
2448
|
-
.describe(
|
|
2442
|
+
.describe('Request for canceling a subscription.');
|
|
2449
2443
|
export const subscriptionChange = z
|
|
2450
2444
|
.object({
|
|
2451
2445
|
labels: labels.optional(),
|
|
@@ -2454,7 +2448,7 @@ export const subscriptionChange = z
|
|
|
2454
2448
|
id: ulid.optional(),
|
|
2455
2449
|
key: externalResourceKey.optional(),
|
|
2456
2450
|
})
|
|
2457
|
-
.describe(
|
|
2451
|
+
.describe('The customer to create the subscription for.'),
|
|
2458
2452
|
plan: z
|
|
2459
2453
|
.object({
|
|
2460
2454
|
id: ulid.optional(),
|
|
@@ -2463,13 +2457,13 @@ export const subscriptionChange = z
|
|
|
2463
2457
|
.number()
|
|
2464
2458
|
.int()
|
|
2465
2459
|
.optional()
|
|
2466
|
-
.describe(
|
|
2460
|
+
.describe('The plan version of the subscription, if any. If not provided, the latest version of the plan will be used.'),
|
|
2467
2461
|
})
|
|
2468
|
-
.describe(
|
|
2462
|
+
.describe('The plan reference of the subscription.'),
|
|
2469
2463
|
billing_anchor: dateTime.optional(),
|
|
2470
2464
|
timing: subscriptionEditTiming,
|
|
2471
2465
|
})
|
|
2472
|
-
.describe(
|
|
2466
|
+
.describe('Request for changing a subscription.');
|
|
2473
2467
|
export const appStripe = z
|
|
2474
2468
|
.object({
|
|
2475
2469
|
id: ulid,
|
|
@@ -2477,34 +2471,34 @@ export const appStripe = z
|
|
|
2477
2471
|
.string()
|
|
2478
2472
|
.min(1)
|
|
2479
2473
|
.max(256)
|
|
2480
|
-
.describe(
|
|
2474
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2481
2475
|
description: z
|
|
2482
2476
|
.string()
|
|
2483
2477
|
.max(1024)
|
|
2484
2478
|
.optional()
|
|
2485
|
-
.describe(
|
|
2479
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2486
2480
|
labels: labels.optional(),
|
|
2487
2481
|
created_at: dateTime,
|
|
2488
2482
|
updated_at: dateTime,
|
|
2489
2483
|
deleted_at: dateTime.optional(),
|
|
2490
|
-
type: z.literal(
|
|
2484
|
+
type: z.literal('stripe').describe('The app type.'),
|
|
2491
2485
|
definition: appCatalogItem,
|
|
2492
2486
|
status: appStatus,
|
|
2493
2487
|
account_id: z
|
|
2494
2488
|
.string()
|
|
2495
|
-
.describe(
|
|
2489
|
+
.describe('The Stripe account ID associated with the connected Stripe account.'),
|
|
2496
2490
|
livemode: z
|
|
2497
2491
|
.boolean()
|
|
2498
|
-
.describe(
|
|
2492
|
+
.describe('Indicates whether the app is connected to a live Stripe account.'),
|
|
2499
2493
|
masked_api_key: z
|
|
2500
2494
|
.string()
|
|
2501
|
-
.describe(
|
|
2495
|
+
.describe('The masked Stripe API key that only exposes the first and last few characters.'),
|
|
2502
2496
|
secret_api_key: z
|
|
2503
2497
|
.string()
|
|
2504
2498
|
.optional()
|
|
2505
|
-
.describe(
|
|
2499
|
+
.describe('The Stripe secret API key used to authenticate API requests.'),
|
|
2506
2500
|
})
|
|
2507
|
-
.describe(
|
|
2501
|
+
.describe('Stripe app.');
|
|
2508
2502
|
export const appSandbox = z
|
|
2509
2503
|
.object({
|
|
2510
2504
|
id: ulid,
|
|
@@ -2512,21 +2506,21 @@ export const appSandbox = z
|
|
|
2512
2506
|
.string()
|
|
2513
2507
|
.min(1)
|
|
2514
2508
|
.max(256)
|
|
2515
|
-
.describe(
|
|
2509
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2516
2510
|
description: z
|
|
2517
2511
|
.string()
|
|
2518
2512
|
.max(1024)
|
|
2519
2513
|
.optional()
|
|
2520
|
-
.describe(
|
|
2514
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2521
2515
|
labels: labels.optional(),
|
|
2522
2516
|
created_at: dateTime,
|
|
2523
2517
|
updated_at: dateTime,
|
|
2524
2518
|
deleted_at: dateTime.optional(),
|
|
2525
|
-
type: z.literal(
|
|
2519
|
+
type: z.literal('sandbox').describe('The app type.'),
|
|
2526
2520
|
definition: appCatalogItem,
|
|
2527
2521
|
status: appStatus,
|
|
2528
2522
|
})
|
|
2529
|
-
.describe(
|
|
2523
|
+
.describe('Sandbox app can be used for testing billing features.');
|
|
2530
2524
|
export const appExternalInvoicing = z
|
|
2531
2525
|
.object({
|
|
2532
2526
|
id: ulid,
|
|
@@ -2534,46 +2528,46 @@ export const appExternalInvoicing = z
|
|
|
2534
2528
|
.string()
|
|
2535
2529
|
.min(1)
|
|
2536
2530
|
.max(256)
|
|
2537
|
-
.describe(
|
|
2531
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2538
2532
|
description: z
|
|
2539
2533
|
.string()
|
|
2540
2534
|
.max(1024)
|
|
2541
2535
|
.optional()
|
|
2542
|
-
.describe(
|
|
2536
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2543
2537
|
labels: labels.optional(),
|
|
2544
2538
|
created_at: dateTime,
|
|
2545
2539
|
updated_at: dateTime,
|
|
2546
2540
|
deleted_at: dateTime.optional(),
|
|
2547
|
-
type: z.literal(
|
|
2541
|
+
type: z.literal('external_invoicing').describe('The app type.'),
|
|
2548
2542
|
definition: appCatalogItem,
|
|
2549
2543
|
status: appStatus,
|
|
2550
2544
|
enable_draft_sync_hook: z
|
|
2551
2545
|
.boolean()
|
|
2552
|
-
.describe(
|
|
2546
|
+
.describe('Enable draft synchronization hook. When enabled, invoices will pause at the draft state and wait for the integration to call the draft synchronized endpoint before progressing to the issuing state. This allows the external system to validate and prepare the invoice data. When disabled, invoices automatically progress through the draft state based on the configured workflow timing.'),
|
|
2553
2547
|
enable_issuing_sync_hook: z
|
|
2554
2548
|
.boolean()
|
|
2555
|
-
.describe(
|
|
2549
|
+
.describe('Enable issuing synchronization hook. When enabled, invoices will pause at the issuing state and wait for the integration to call the issuing synchronized endpoint before progressing to the issued state. This ensures the external invoicing system has successfully created and finalized the invoice before it is marked as issued. When disabled, invoices automatically progress through the issuing state and are immediately marked as issued.'),
|
|
2556
2550
|
})
|
|
2557
|
-
.describe(
|
|
2551
|
+
.describe('External Invoicing app enables integration with third-party invoicing or payment system. The app supports a bi-directional synchronization pattern where OpenMeter Billing manages the invoice lifecycle while the external system handles invoice presentation and payment collection. Integration workflow: 1. The billing system creates invoices and transitions them through lifecycle states (draft → issuing → issued) 2. The integration receives webhook notifications about invoice state changes 3. The integration calls back to provide external system IDs and metadata 4. The integration reports payment events back via the payment status API State synchronization is controlled by hooks that pause invoice progression until the external system confirms synchronization via API callbacks.');
|
|
2558
2552
|
export const createTaxCodeRequest = z
|
|
2559
2553
|
.object({
|
|
2560
2554
|
name: z
|
|
2561
2555
|
.string()
|
|
2562
2556
|
.min(1)
|
|
2563
2557
|
.max(256)
|
|
2564
|
-
.describe(
|
|
2558
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2565
2559
|
description: z
|
|
2566
2560
|
.string()
|
|
2567
2561
|
.max(1024)
|
|
2568
2562
|
.optional()
|
|
2569
|
-
.describe(
|
|
2563
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2570
2564
|
labels: labels.optional(),
|
|
2571
2565
|
key: resourceKey,
|
|
2572
2566
|
app_mappings: z
|
|
2573
2567
|
.array(taxCodeAppMapping)
|
|
2574
|
-
.describe(
|
|
2568
|
+
.describe('Mapping of app types to tax codes.'),
|
|
2575
2569
|
})
|
|
2576
|
-
.describe(
|
|
2570
|
+
.describe('TaxCode create request.');
|
|
2577
2571
|
export const taxCode = z
|
|
2578
2572
|
.object({
|
|
2579
2573
|
id: ulid,
|
|
@@ -2581,12 +2575,12 @@ export const taxCode = z
|
|
|
2581
2575
|
.string()
|
|
2582
2576
|
.min(1)
|
|
2583
2577
|
.max(256)
|
|
2584
|
-
.describe(
|
|
2578
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2585
2579
|
description: z
|
|
2586
2580
|
.string()
|
|
2587
2581
|
.max(1024)
|
|
2588
2582
|
.optional()
|
|
2589
|
-
.describe(
|
|
2583
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2590
2584
|
labels: labels.optional(),
|
|
2591
2585
|
created_at: dateTime,
|
|
2592
2586
|
updated_at: dateTime,
|
|
@@ -2594,38 +2588,38 @@ export const taxCode = z
|
|
|
2594
2588
|
key: resourceKey,
|
|
2595
2589
|
app_mappings: z
|
|
2596
2590
|
.array(taxCodeAppMapping)
|
|
2597
|
-
.describe(
|
|
2591
|
+
.describe('Mapping of app types to tax codes.'),
|
|
2598
2592
|
})
|
|
2599
|
-
.describe(
|
|
2593
|
+
.describe('Tax codes by provider.');
|
|
2600
2594
|
export const upsertTaxCodeRequest = z
|
|
2601
2595
|
.object({
|
|
2602
2596
|
name: z
|
|
2603
2597
|
.string()
|
|
2604
2598
|
.min(1)
|
|
2605
2599
|
.max(256)
|
|
2606
|
-
.describe(
|
|
2600
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2607
2601
|
description: z
|
|
2608
2602
|
.string()
|
|
2609
2603
|
.max(1024)
|
|
2610
2604
|
.optional()
|
|
2611
|
-
.describe(
|
|
2605
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2612
2606
|
labels: labels.optional(),
|
|
2613
2607
|
app_mappings: z
|
|
2614
2608
|
.array(taxCodeAppMapping)
|
|
2615
|
-
.describe(
|
|
2609
|
+
.describe('Mapping of app types to tax codes.'),
|
|
2616
2610
|
})
|
|
2617
|
-
.describe(
|
|
2611
|
+
.describe('TaxCode upsert request.');
|
|
2618
2612
|
export const currency = z
|
|
2619
|
-
.discriminatedUnion(
|
|
2620
|
-
.describe(
|
|
2613
|
+
.discriminatedUnion('type', [currencyFiat, currencyCustom])
|
|
2614
|
+
.describe('Fiat or custom currency.');
|
|
2621
2615
|
export const governanceFeatureAccess = z
|
|
2622
2616
|
.object({
|
|
2623
2617
|
has_access: z
|
|
2624
2618
|
.boolean()
|
|
2625
|
-
.describe(
|
|
2619
|
+
.describe('Whether the customer currently has access to the feature. `true` for boolean and static entitlements that are available, and for metered entitlements with remaining balance. `false` when the feature is unavailable, the usage limit has been reached, or (when applicable) credits have been exhausted.'),
|
|
2626
2620
|
reason: governanceFeatureAccessReason.optional(),
|
|
2627
2621
|
})
|
|
2628
|
-
.describe(
|
|
2622
|
+
.describe('Access status for a single feature.');
|
|
2629
2623
|
export const invoiceUsageQuantityDetail = z
|
|
2630
2624
|
.object({
|
|
2631
2625
|
raw_quantity: numeric,
|
|
@@ -2634,73 +2628,73 @@ export const invoiceUsageQuantityDetail = z
|
|
|
2634
2628
|
display_unit: z
|
|
2635
2629
|
.string()
|
|
2636
2630
|
.optional()
|
|
2637
|
-
.describe(
|
|
2631
|
+
.describe('The display unit label (e.g., "GB", "hours", "M tokens").'),
|
|
2638
2632
|
applied_unit_config: unitConfig,
|
|
2639
2633
|
})
|
|
2640
|
-
.describe(
|
|
2634
|
+
.describe('Usage quantity details on an invoice line item when UnitConfig is in effect. Provides the full audit trail from raw meter output to the invoiced amount.');
|
|
2641
2635
|
export const customerData = z
|
|
2642
2636
|
.object({
|
|
2643
2637
|
billing_profile: profileReference.optional(),
|
|
2644
2638
|
app_data: appCustomerData.optional(),
|
|
2645
2639
|
})
|
|
2646
|
-
.describe(
|
|
2640
|
+
.describe('Billing customer data.');
|
|
2647
2641
|
export const upsertCustomerBillingDataRequest = z
|
|
2648
2642
|
.object({
|
|
2649
2643
|
billing_profile: profileReference.optional(),
|
|
2650
2644
|
app_data: appCustomerData.optional(),
|
|
2651
2645
|
})
|
|
2652
|
-
.describe(
|
|
2646
|
+
.describe('CustomerBillingData upsert request.');
|
|
2653
2647
|
export const creditBalances = z
|
|
2654
2648
|
.object({
|
|
2655
2649
|
retrieved_at: dateTime,
|
|
2656
|
-
balances: z.array(creditBalance).describe(
|
|
2650
|
+
balances: z.array(creditBalance).describe('The balances by currencies.'),
|
|
2657
2651
|
})
|
|
2658
|
-
.describe(
|
|
2652
|
+
.describe('The balances of the credits of a customer.');
|
|
2659
2653
|
export const creditTransactionPaginatedResponse = z
|
|
2660
2654
|
.object({
|
|
2661
2655
|
data: z.array(creditTransaction),
|
|
2662
2656
|
meta: cursorMeta,
|
|
2663
2657
|
})
|
|
2664
|
-
.describe(
|
|
2658
|
+
.describe('Cursor paginated response.');
|
|
2665
2659
|
export const priceGraduated = z
|
|
2666
2660
|
.object({
|
|
2667
|
-
type: z.literal(
|
|
2661
|
+
type: z.literal('graduated').describe('The type of the price.'),
|
|
2668
2662
|
tiers: z
|
|
2669
2663
|
.array(priceTier)
|
|
2670
2664
|
.min(1)
|
|
2671
|
-
.describe(
|
|
2665
|
+
.describe('The tiers of the graduated price. At least one tier is required.'),
|
|
2672
2666
|
})
|
|
2673
2667
|
.describe("Graduated tiered price. Each tier's rate applies only to the usage within that tier. Pricing can change as cumulative usage crosses tier boundaries. When UnitConfig is present on the rate card, tier boundaries (up_to_amount) are expressed in converted billing units.");
|
|
2674
2668
|
export const priceVolume = z
|
|
2675
2669
|
.object({
|
|
2676
|
-
type: z.literal(
|
|
2670
|
+
type: z.literal('volume').describe('The type of the price.'),
|
|
2677
2671
|
tiers: z
|
|
2678
2672
|
.array(priceTier)
|
|
2679
2673
|
.min(1)
|
|
2680
|
-
.describe(
|
|
2674
|
+
.describe('The tiers of the volume price. At least one tier is required.'),
|
|
2681
2675
|
})
|
|
2682
|
-
.describe(
|
|
2676
|
+
.describe('Volume tiered price. The maximum quantity within a period determines the per-unit price for all units in that period. When UnitConfig is present on the rate card, tier boundaries (up_to_amount) are expressed in converted billing units.');
|
|
2683
2677
|
export const featureUnitCost = z
|
|
2684
|
-
.discriminatedUnion(
|
|
2685
|
-
.describe(
|
|
2678
|
+
.discriminatedUnion('type', [featureManualUnitCost, featureLlmUnitCost])
|
|
2679
|
+
.describe('Per-unit cost configuration for a feature. Either a fixed manual amount or a dynamic LLM cost lookup.');
|
|
2686
2680
|
export const pricePagePaginatedResponse = z
|
|
2687
2681
|
.object({
|
|
2688
2682
|
data: z.array(llmCostPrice),
|
|
2689
2683
|
meta: paginatedMeta,
|
|
2690
2684
|
})
|
|
2691
|
-
.describe(
|
|
2685
|
+
.describe('Page paginated response.');
|
|
2692
2686
|
export const createCreditGrantRequest = z
|
|
2693
2687
|
.object({
|
|
2694
2688
|
name: z
|
|
2695
2689
|
.string()
|
|
2696
2690
|
.min(1)
|
|
2697
2691
|
.max(256)
|
|
2698
|
-
.describe(
|
|
2692
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2699
2693
|
description: z
|
|
2700
2694
|
.string()
|
|
2701
2695
|
.max(1024)
|
|
2702
2696
|
.optional()
|
|
2703
|
-
.describe(
|
|
2697
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2704
2698
|
labels: createLabels.optional(),
|
|
2705
2699
|
funding_method: creditFundingMethod,
|
|
2706
2700
|
currency: createCurrencyCode,
|
|
@@ -2708,16 +2702,17 @@ export const createCreditGrantRequest = z
|
|
|
2708
2702
|
purchase: createCreditGrantPurchase.optional(),
|
|
2709
2703
|
tax_config: createCreditGrantTaxConfig.optional(),
|
|
2710
2704
|
filters: createCreditGrantFilters.optional(),
|
|
2711
|
-
priority: z
|
|
2712
|
-
.
|
|
2713
|
-
.
|
|
2714
|
-
.
|
|
2705
|
+
priority: z
|
|
2706
|
+
.number()
|
|
2707
|
+
.int()
|
|
2708
|
+
.gte(1)
|
|
2709
|
+
.lte(1000)
|
|
2715
2710
|
.optional()
|
|
2716
|
-
.default(
|
|
2717
|
-
.describe(
|
|
2711
|
+
.default(10)
|
|
2712
|
+
.describe('Draw-down priority of the grant. Lower values have higher priority.'),
|
|
2718
2713
|
expires_after: iso8601Duration.optional(),
|
|
2719
2714
|
})
|
|
2720
|
-
.describe(
|
|
2715
|
+
.describe('CreditGrant create request.');
|
|
2721
2716
|
export const creditGrant = z
|
|
2722
2717
|
.object({
|
|
2723
2718
|
id: ulid,
|
|
@@ -2725,12 +2720,12 @@ export const creditGrant = z
|
|
|
2725
2720
|
.string()
|
|
2726
2721
|
.min(1)
|
|
2727
2722
|
.max(256)
|
|
2728
|
-
.describe(
|
|
2723
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2729
2724
|
description: z
|
|
2730
2725
|
.string()
|
|
2731
2726
|
.max(1024)
|
|
2732
2727
|
.optional()
|
|
2733
|
-
.describe(
|
|
2728
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2734
2729
|
labels: labels.optional(),
|
|
2735
2730
|
created_at: dateTime,
|
|
2736
2731
|
updated_at: dateTime,
|
|
@@ -2742,56 +2737,57 @@ export const creditGrant = z
|
|
|
2742
2737
|
tax_config: creditGrantTaxConfig.optional(),
|
|
2743
2738
|
invoice: creditGrantInvoiceReference.optional(),
|
|
2744
2739
|
filters: creditGrantFilters.optional(),
|
|
2745
|
-
priority: z
|
|
2746
|
-
.
|
|
2747
|
-
.
|
|
2748
|
-
.
|
|
2740
|
+
priority: z
|
|
2741
|
+
.number()
|
|
2742
|
+
.int()
|
|
2743
|
+
.gte(1)
|
|
2744
|
+
.lte(1000)
|
|
2749
2745
|
.optional()
|
|
2750
|
-
.default(
|
|
2751
|
-
.describe(
|
|
2746
|
+
.default(10)
|
|
2747
|
+
.describe('Draw-down priority of the grant. Lower values have higher priority.'),
|
|
2752
2748
|
expires_after: iso8601Duration.optional(),
|
|
2753
2749
|
expires_at: dateTime.optional(),
|
|
2754
2750
|
voided_at: dateTime.optional(),
|
|
2755
2751
|
status: creditGrantStatus,
|
|
2756
2752
|
})
|
|
2757
|
-
.describe(
|
|
2753
|
+
.describe('A credit grant allocates credits to a customer. Credits are drawn down against charges according to the settlement mode configured on the rate card.');
|
|
2758
2754
|
export const workflowTaxSettings = z
|
|
2759
2755
|
.object({
|
|
2760
2756
|
enabled: z
|
|
2761
2757
|
.boolean()
|
|
2762
2758
|
.optional()
|
|
2763
2759
|
.default(true)
|
|
2764
|
-
.describe(
|
|
2760
|
+
.describe('Enable automatic tax calculation when tax is supported by the app. For example, with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.'),
|
|
2765
2761
|
enforced: z
|
|
2766
2762
|
.boolean()
|
|
2767
2763
|
.optional()
|
|
2768
2764
|
.default(false)
|
|
2769
|
-
.describe(
|
|
2765
|
+
.describe('Enforce tax calculation when tax is supported by the app. When enabled, the billing system will not allow to create an invoice without tax calculation. Enforcement is different per apps, for example, Stripe app requires customer to have a tax location when starting a paid subscription.'),
|
|
2770
2766
|
default_tax_config: taxConfig.optional(),
|
|
2771
2767
|
})
|
|
2772
|
-
.describe(
|
|
2768
|
+
.describe('Tax settings for a billing workflow.');
|
|
2773
2769
|
export const subscriptionAddonPagePaginatedResponse = z
|
|
2774
2770
|
.object({
|
|
2775
2771
|
data: z.array(subscriptionAddon),
|
|
2776
2772
|
meta: paginatedMeta,
|
|
2777
2773
|
})
|
|
2778
|
-
.describe(
|
|
2774
|
+
.describe('Page paginated response.');
|
|
2779
2775
|
export const planAddonPagePaginatedResponse = z
|
|
2780
2776
|
.object({
|
|
2781
2777
|
data: z.array(planAddon),
|
|
2782
2778
|
meta: paginatedMeta,
|
|
2783
2779
|
})
|
|
2784
|
-
.describe(
|
|
2780
|
+
.describe('Page paginated response.');
|
|
2785
2781
|
export const ingestedEventPaginatedResponse = z
|
|
2786
2782
|
.object({
|
|
2787
2783
|
data: z.array(ingestedEvent),
|
|
2788
2784
|
meta: cursorMeta,
|
|
2789
2785
|
})
|
|
2790
|
-
.describe(
|
|
2786
|
+
.describe('Cursor paginated response.');
|
|
2791
2787
|
export const invalidParameters = z
|
|
2792
2788
|
.array(invalidParameter)
|
|
2793
2789
|
.min(1)
|
|
2794
|
-
.describe(
|
|
2790
|
+
.describe('The list of parameters that failed validation.');
|
|
2795
2791
|
export const meterQueryRequest = z
|
|
2796
2792
|
.object({
|
|
2797
2793
|
from: dateTime.optional(),
|
|
@@ -2800,50 +2796,49 @@ export const meterQueryRequest = z
|
|
|
2800
2796
|
time_zone: z
|
|
2801
2797
|
.string()
|
|
2802
2798
|
.optional()
|
|
2803
|
-
.default(
|
|
2804
|
-
.describe(
|
|
2799
|
+
.default('UTC')
|
|
2800
|
+
.describe('The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones). The time zone is used to determine the start and end of the time buckets. If not specified, the UTC timezone will be used.'),
|
|
2805
2801
|
group_by_dimensions: z
|
|
2806
2802
|
.array(z.string())
|
|
2807
2803
|
.max(100)
|
|
2808
2804
|
.optional()
|
|
2809
|
-
.describe(
|
|
2805
|
+
.describe('The dimensions to group the results by.'),
|
|
2810
2806
|
filters: meterQueryFilters.optional(),
|
|
2811
2807
|
})
|
|
2812
|
-
.describe(
|
|
2808
|
+
.describe('A meter query request.');
|
|
2813
2809
|
export const customerPagePaginatedResponse = z
|
|
2814
2810
|
.object({
|
|
2815
2811
|
data: z.array(customer),
|
|
2816
2812
|
meta: paginatedMeta,
|
|
2817
2813
|
})
|
|
2818
|
-
.describe(
|
|
2814
|
+
.describe('Page paginated response.');
|
|
2819
2815
|
export const party = z
|
|
2820
2816
|
.object({
|
|
2821
|
-
id: z.string().optional().describe(
|
|
2817
|
+
id: z.string().optional().describe('Unique identifier for the party.'),
|
|
2822
2818
|
key: externalResourceKey.optional(),
|
|
2823
2819
|
name: z
|
|
2824
2820
|
.string()
|
|
2825
2821
|
.optional()
|
|
2826
|
-
.describe(
|
|
2822
|
+
.describe('Legal name or representation of the party.'),
|
|
2827
2823
|
tax_id: partyTaxIdentity.optional(),
|
|
2828
2824
|
addresses: partyAddresses.optional(),
|
|
2829
2825
|
})
|
|
2830
|
-
.describe(
|
|
2826
|
+
.describe('Party represents a person or business entity.');
|
|
2831
2827
|
export const appStripeCreateCheckoutSessionRequestOptions = z
|
|
2832
2828
|
.object({
|
|
2833
2829
|
billing_address_collection: appStripeCreateCheckoutSessionBillingAddressCollection
|
|
2834
2830
|
.optional()
|
|
2835
|
-
.default(
|
|
2831
|
+
.default('auto'),
|
|
2836
2832
|
cancel_url: z
|
|
2837
2833
|
.string()
|
|
2838
2834
|
.optional()
|
|
2839
|
-
.describe(
|
|
2835
|
+
.describe('URL to redirect customers who cancel the checkout session. Not allowed when ui_mode is "embedded".'),
|
|
2840
2836
|
client_reference_id: z
|
|
2841
2837
|
.string()
|
|
2842
2838
|
.optional()
|
|
2843
|
-
.describe(
|
|
2839
|
+
.describe('Unique reference string for reconciling sessions with internal systems. Can be a customer ID, cart ID, or any other identifier.'),
|
|
2844
2840
|
customer_update: appStripeCreateCheckoutSessionCustomerUpdate.optional(),
|
|
2845
|
-
consent_collection: appStripeCreateCheckoutSessionConsentCollection
|
|
2846
|
-
.optional(),
|
|
2841
|
+
consent_collection: appStripeCreateCheckoutSessionConsentCollection.optional(),
|
|
2847
2842
|
currency: currencyCode.optional(),
|
|
2848
2843
|
custom_text: appStripeCheckoutSessionCustomTextParams.optional(),
|
|
2849
2844
|
expires_at: z.coerce
|
|
@@ -2851,72 +2846,77 @@ export const appStripeCreateCheckoutSessionRequestOptions = z
|
|
|
2851
2846
|
.gte(-9223372036854775808n)
|
|
2852
2847
|
.lte(9223372036854775807n)
|
|
2853
2848
|
.optional()
|
|
2854
|
-
.describe(
|
|
2849
|
+
.describe('Unix timestamp when the checkout session expires. Can be 30 minutes to 24 hours from creation. Defaults to 24 hours.'),
|
|
2855
2850
|
locale: z
|
|
2856
2851
|
.string()
|
|
2857
2852
|
.optional()
|
|
2858
|
-
.describe(
|
|
2853
|
+
.describe('IETF language tag for the checkout UI locale. If blank or "auto", uses the browser\'s locale. Example: "en", "fr", "de".'),
|
|
2859
2854
|
metadata: z
|
|
2860
2855
|
.record(z.string(), z.string())
|
|
2861
2856
|
.optional()
|
|
2862
|
-
.describe(
|
|
2857
|
+
.describe('Set of key-value pairs to attach to the checkout session. Useful for storing additional structured information.'),
|
|
2863
2858
|
return_url: z
|
|
2864
2859
|
.string()
|
|
2865
2860
|
.optional()
|
|
2866
|
-
.describe(
|
|
2861
|
+
.describe('Return URL for embedded checkout sessions after payment authentication. Required if ui_mode is "embedded" and redirect-based payment methods are enabled.'),
|
|
2867
2862
|
success_url: z
|
|
2868
2863
|
.string()
|
|
2869
2864
|
.optional()
|
|
2870
|
-
.describe(
|
|
2871
|
-
ui_mode: appStripeCheckoutSessionUiMode.optional().default(
|
|
2865
|
+
.describe('Success URL to redirect customers after completing payment or setup. Not allowed when ui_mode is "embedded". See: https://docs.stripe.com/payments/checkout/custom-success-page'),
|
|
2866
|
+
ui_mode: appStripeCheckoutSessionUiMode.optional().default('hosted'),
|
|
2872
2867
|
payment_method_types: z
|
|
2873
2868
|
.array(z.string())
|
|
2874
2869
|
.optional()
|
|
2875
|
-
.describe(
|
|
2876
|
-
redirect_on_completion: appStripeCreateCheckoutSessionRedirectOnCompletion
|
|
2877
|
-
.optional(),
|
|
2870
|
+
.describe('List of payment method types to enable (e.g., "card", "us_bank_account"). If not specified, Stripe enables all relevant payment methods.'),
|
|
2871
|
+
redirect_on_completion: appStripeCreateCheckoutSessionRedirectOnCompletion.optional(),
|
|
2878
2872
|
tax_id_collection: appStripeCreateCheckoutSessionTaxIdCollection.optional(),
|
|
2879
2873
|
})
|
|
2880
2874
|
.describe("Configuration options for creating a Stripe Checkout Session. Based on Stripe's [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create).");
|
|
2881
2875
|
export const workflowCollectionAlignment = z
|
|
2882
|
-
.discriminatedUnion(
|
|
2876
|
+
.discriminatedUnion('type', [
|
|
2883
2877
|
workflowCollectionAlignmentSubscription,
|
|
2884
|
-
workflowCollectionAlignmentAnchored
|
|
2878
|
+
workflowCollectionAlignmentAnchored,
|
|
2885
2879
|
])
|
|
2886
|
-
.describe(
|
|
2880
|
+
.describe('The alignment for collecting the pending line items into an invoice. Defaults to subscription, which means that we are to create a new invoice every time the a subscription period starts (for in advance items) or ends (for in arrears items).');
|
|
2887
2881
|
export const app = z
|
|
2888
|
-
.discriminatedUnion(
|
|
2889
|
-
.describe(
|
|
2882
|
+
.discriminatedUnion('type', [appStripe, appSandbox, appExternalInvoicing])
|
|
2883
|
+
.describe('Installed application.');
|
|
2890
2884
|
export const taxCodePagePaginatedResponse = z
|
|
2891
2885
|
.object({
|
|
2892
2886
|
data: z.array(taxCode),
|
|
2893
2887
|
meta: paginatedMeta,
|
|
2894
2888
|
})
|
|
2895
|
-
.describe(
|
|
2889
|
+
.describe('Page paginated response.');
|
|
2896
2890
|
export const currencyPagePaginatedResponse = z
|
|
2897
2891
|
.object({
|
|
2898
2892
|
data: z.array(currency),
|
|
2899
2893
|
meta: paginatedMeta,
|
|
2900
2894
|
})
|
|
2901
|
-
.describe(
|
|
2895
|
+
.describe('Page paginated response.');
|
|
2902
2896
|
export const governanceQueryResult = z
|
|
2903
2897
|
.object({
|
|
2904
2898
|
matched: z
|
|
2905
2899
|
.array(z.string())
|
|
2906
|
-
.describe(
|
|
2900
|
+
.describe('The list of identifiers from the request that resolved to this customer. Each entry is either the customer `key` or one of its usage-attribution subject `key`s. Duplicate or aliased identifiers that resolve to the same customer collapse to a single result entry, with every requested identifier listed here.'),
|
|
2907
2901
|
customer: customer,
|
|
2908
2902
|
features: z
|
|
2909
2903
|
.record(z.string(), governanceFeatureAccess)
|
|
2910
|
-
.describe(
|
|
2904
|
+
.describe('Map of features with their access status. Map keys are the feature keys requested in `feature.keys`, or every feature `key` available in the organization when the feature filter was omitted.'),
|
|
2911
2905
|
updated_at: dateTime,
|
|
2912
2906
|
})
|
|
2913
|
-
.describe(
|
|
2907
|
+
.describe('Access evaluation result for a single resolved customer.');
|
|
2914
2908
|
export const price = z
|
|
2915
|
-
.discriminatedUnion(
|
|
2916
|
-
|
|
2909
|
+
.discriminatedUnion('type', [
|
|
2910
|
+
priceFree,
|
|
2911
|
+
priceFlat,
|
|
2912
|
+
priceUnit,
|
|
2913
|
+
priceGraduated,
|
|
2914
|
+
priceVolume,
|
|
2915
|
+
])
|
|
2916
|
+
.describe('Price.');
|
|
2917
2917
|
export const priceUsageBased = z
|
|
2918
|
-
.discriminatedUnion(
|
|
2919
|
-
.describe(
|
|
2918
|
+
.discriminatedUnion('type', [priceUnit, priceGraduated, priceVolume])
|
|
2919
|
+
.describe('Usage-based price types that can appear on a usage-based rate card. When UnitConfig is present on the rate card, these price types operate on billing units (i.e. post-conversion quantities), not raw metered units.');
|
|
2920
2920
|
export const feature = z
|
|
2921
2921
|
.object({
|
|
2922
2922
|
id: ulid,
|
|
@@ -2924,12 +2924,12 @@ export const feature = z
|
|
|
2924
2924
|
.string()
|
|
2925
2925
|
.min(1)
|
|
2926
2926
|
.max(256)
|
|
2927
|
-
.describe(
|
|
2927
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2928
2928
|
description: z
|
|
2929
2929
|
.string()
|
|
2930
2930
|
.max(1024)
|
|
2931
2931
|
.optional()
|
|
2932
|
-
.describe(
|
|
2932
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2933
2933
|
labels: labels.optional(),
|
|
2934
2934
|
created_at: dateTime,
|
|
2935
2935
|
updated_at: dateTime,
|
|
@@ -2938,87 +2938,85 @@ export const feature = z
|
|
|
2938
2938
|
meter: featureMeterReference.optional(),
|
|
2939
2939
|
unit_cost: featureUnitCost.optional(),
|
|
2940
2940
|
})
|
|
2941
|
-
.describe(
|
|
2941
|
+
.describe('A capability or billable dimension offered by a provider.');
|
|
2942
2942
|
export const createFeatureRequest = z
|
|
2943
2943
|
.object({
|
|
2944
2944
|
name: z
|
|
2945
2945
|
.string()
|
|
2946
2946
|
.min(1)
|
|
2947
2947
|
.max(256)
|
|
2948
|
-
.describe(
|
|
2948
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
2949
2949
|
description: z
|
|
2950
2950
|
.string()
|
|
2951
2951
|
.max(1024)
|
|
2952
2952
|
.optional()
|
|
2953
|
-
.describe(
|
|
2953
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
2954
2954
|
labels: labels.optional(),
|
|
2955
2955
|
key: resourceKey,
|
|
2956
2956
|
meter: featureMeterReference.optional(),
|
|
2957
2957
|
unit_cost: featureUnitCost.optional(),
|
|
2958
2958
|
})
|
|
2959
|
-
.describe(
|
|
2959
|
+
.describe('Feature create request.');
|
|
2960
2960
|
export const updateFeatureRequest = z
|
|
2961
2961
|
.object({
|
|
2962
2962
|
unit_cost: z
|
|
2963
2963
|
.union([featureUnitCost, z.null()])
|
|
2964
2964
|
.optional()
|
|
2965
|
-
.describe(
|
|
2965
|
+
.describe('Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or "llm" to look up cost from the LLM cost database based on meter group-by properties. Set to `null` to clear the existing unit cost; omit to leave it unchanged.'),
|
|
2966
2966
|
})
|
|
2967
|
-
.describe(
|
|
2967
|
+
.describe('Request body for updating a feature. Currently only the unit_cost field can be updated.');
|
|
2968
2968
|
export const creditGrantPagePaginatedResponse = z
|
|
2969
2969
|
.object({
|
|
2970
2970
|
data: z.array(creditGrant),
|
|
2971
2971
|
meta: paginatedMeta,
|
|
2972
2972
|
})
|
|
2973
|
-
.describe(
|
|
2973
|
+
.describe('Page paginated response.');
|
|
2974
2974
|
export const badRequest = z
|
|
2975
2975
|
.intersection(baseError, z.object({
|
|
2976
2976
|
invalid_parameters: invalidParameters,
|
|
2977
2977
|
}))
|
|
2978
|
-
.describe(
|
|
2978
|
+
.describe('Bad Request.');
|
|
2979
2979
|
export const customerStripeCreateCheckoutSessionRequest = z
|
|
2980
2980
|
.object({
|
|
2981
2981
|
stripe_options: appStripeCreateCheckoutSessionRequestOptions,
|
|
2982
2982
|
})
|
|
2983
|
-
.describe(
|
|
2983
|
+
.describe('Request to create a Stripe Checkout Session for the customer. Checkout Sessions are used to collect payment method information from customers in a secure, Stripe-hosted interface. This integration uses setup mode to collect payment methods that can be charged later for subscription billing.');
|
|
2984
2984
|
export const workflowCollectionSettings = z
|
|
2985
2985
|
.object({
|
|
2986
|
-
alignment: workflowCollectionAlignment
|
|
2987
|
-
|
|
2988
|
-
.default({
|
|
2989
|
-
type: "subscription",
|
|
2986
|
+
alignment: workflowCollectionAlignment.optional().default({
|
|
2987
|
+
type: 'subscription',
|
|
2990
2988
|
}),
|
|
2991
2989
|
interval: z
|
|
2992
2990
|
.string()
|
|
2993
2991
|
.optional()
|
|
2994
|
-
.default(
|
|
2995
|
-
.describe(
|
|
2992
|
+
.default('PT1H')
|
|
2993
|
+
.describe('This grace period can be used to delay the collection of the pending line items specified in alignment. This is useful, in case of multiple subscriptions having slightly different billing periods.'),
|
|
2996
2994
|
})
|
|
2997
|
-
.describe(
|
|
2995
|
+
.describe('Workflow collection specifies how to collect the pending line items for an invoice.');
|
|
2998
2996
|
export const appPagePaginatedResponse = z
|
|
2999
2997
|
.object({
|
|
3000
2998
|
data: z.array(app),
|
|
3001
2999
|
meta: paginatedMeta,
|
|
3002
3000
|
})
|
|
3003
|
-
.describe(
|
|
3001
|
+
.describe('Page paginated response.');
|
|
3004
3002
|
export const profileApps = z
|
|
3005
3003
|
.object({
|
|
3006
3004
|
tax: app,
|
|
3007
3005
|
invoicing: app,
|
|
3008
3006
|
payment: app,
|
|
3009
3007
|
})
|
|
3010
|
-
.describe(
|
|
3008
|
+
.describe('Applications used by a billing profile.');
|
|
3011
3009
|
export const governanceQueryResponse = z
|
|
3012
3010
|
.object({
|
|
3013
3011
|
data: z
|
|
3014
3012
|
.array(governanceQueryResult)
|
|
3015
|
-
.describe(
|
|
3013
|
+
.describe('Access evaluation results, one entry per resolved customer.'),
|
|
3016
3014
|
errors: z
|
|
3017
3015
|
.array(governanceQueryError)
|
|
3018
|
-
.describe(
|
|
3016
|
+
.describe('Partial errors encountered while processing the request.'),
|
|
3019
3017
|
meta: cursorMeta,
|
|
3020
3018
|
})
|
|
3021
|
-
.describe(
|
|
3019
|
+
.describe('Response of the governance query.');
|
|
3022
3020
|
export const flatFeeCharge = z
|
|
3023
3021
|
.object({
|
|
3024
3022
|
id: ulid,
|
|
@@ -3026,17 +3024,17 @@ export const flatFeeCharge = z
|
|
|
3026
3024
|
.string()
|
|
3027
3025
|
.min(1)
|
|
3028
3026
|
.max(256)
|
|
3029
|
-
.describe(
|
|
3027
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3030
3028
|
description: z
|
|
3031
3029
|
.string()
|
|
3032
3030
|
.max(1024)
|
|
3033
3031
|
.optional()
|
|
3034
|
-
.describe(
|
|
3032
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3035
3033
|
labels: labels.optional(),
|
|
3036
3034
|
created_at: dateTime,
|
|
3037
3035
|
updated_at: dateTime,
|
|
3038
3036
|
deleted_at: dateTime.optional(),
|
|
3039
|
-
type: z.literal(
|
|
3037
|
+
type: z.literal('flat_fee').describe('The type of the charge.'),
|
|
3040
3038
|
customer: billingCustomerReference,
|
|
3041
3039
|
managed_by: resourceManagedBy,
|
|
3042
3040
|
subscription: subscriptionReference.optional(),
|
|
@@ -3051,7 +3049,7 @@ export const flatFeeCharge = z
|
|
|
3051
3049
|
unique_reference_id: z
|
|
3052
3050
|
.string()
|
|
3053
3051
|
.optional()
|
|
3054
|
-
.describe(
|
|
3052
|
+
.describe('Unique reference ID of the charge.'),
|
|
3055
3053
|
settlement_mode: settlementMode,
|
|
3056
3054
|
tax_config: taxConfig.optional(),
|
|
3057
3055
|
payment_term: pricePaymentTerm,
|
|
@@ -3059,11 +3057,11 @@ export const flatFeeCharge = z
|
|
|
3059
3057
|
feature_key: z
|
|
3060
3058
|
.string()
|
|
3061
3059
|
.optional()
|
|
3062
|
-
.describe(
|
|
3060
|
+
.describe('The feature associated with the charge, when applicable.'),
|
|
3063
3061
|
proration_configuration: rateCardProrationConfiguration,
|
|
3064
3062
|
amount_after_proration: currencyAmount,
|
|
3065
3063
|
})
|
|
3066
|
-
.describe(
|
|
3064
|
+
.describe('A flat fee charge for a customer.');
|
|
3067
3065
|
export const usageBasedCharge = z
|
|
3068
3066
|
.object({
|
|
3069
3067
|
id: ulid,
|
|
@@ -3071,17 +3069,17 @@ export const usageBasedCharge = z
|
|
|
3071
3069
|
.string()
|
|
3072
3070
|
.min(1)
|
|
3073
3071
|
.max(256)
|
|
3074
|
-
.describe(
|
|
3072
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3075
3073
|
description: z
|
|
3076
3074
|
.string()
|
|
3077
3075
|
.max(1024)
|
|
3078
3076
|
.optional()
|
|
3079
|
-
.describe(
|
|
3077
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3080
3078
|
labels: labels.optional(),
|
|
3081
3079
|
created_at: dateTime,
|
|
3082
3080
|
updated_at: dateTime,
|
|
3083
3081
|
deleted_at: dateTime.optional(),
|
|
3084
|
-
type: z.literal(
|
|
3082
|
+
type: z.literal('usage_based').describe('The type of the charge.'),
|
|
3085
3083
|
customer: billingCustomerReference,
|
|
3086
3084
|
managed_by: resourceManagedBy,
|
|
3087
3085
|
subscription: subscriptionReference.optional(),
|
|
@@ -3096,43 +3094,43 @@ export const usageBasedCharge = z
|
|
|
3096
3094
|
unique_reference_id: z
|
|
3097
3095
|
.string()
|
|
3098
3096
|
.optional()
|
|
3099
|
-
.describe(
|
|
3097
|
+
.describe('Unique reference ID of the charge.'),
|
|
3100
3098
|
settlement_mode: settlementMode,
|
|
3101
3099
|
tax_config: taxConfig.optional(),
|
|
3102
3100
|
discounts: rateCardDiscounts.optional(),
|
|
3103
|
-
feature_key: z.string().describe(
|
|
3101
|
+
feature_key: z.string().describe('The feature associated with the charge.'),
|
|
3104
3102
|
totals: chargeTotals,
|
|
3105
3103
|
})
|
|
3106
|
-
.describe(
|
|
3104
|
+
.describe('A usage-based charge for a customer.');
|
|
3107
3105
|
export const rateCard = z
|
|
3108
3106
|
.object({
|
|
3109
3107
|
name: z
|
|
3110
3108
|
.string()
|
|
3111
3109
|
.min(1)
|
|
3112
3110
|
.max(256)
|
|
3113
|
-
.describe(
|
|
3111
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3114
3112
|
description: z
|
|
3115
3113
|
.string()
|
|
3116
3114
|
.max(1024)
|
|
3117
3115
|
.optional()
|
|
3118
|
-
.describe(
|
|
3116
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3119
3117
|
labels: labels.optional(),
|
|
3120
3118
|
key: resourceKey,
|
|
3121
3119
|
feature: featureReference.optional(),
|
|
3122
3120
|
billing_cadence: iso8601Duration.optional(),
|
|
3123
3121
|
price: price,
|
|
3124
|
-
payment_term: pricePaymentTerm.optional().default(
|
|
3122
|
+
payment_term: pricePaymentTerm.optional().default('in_arrears'),
|
|
3125
3123
|
commitments: spendCommitments.optional(),
|
|
3126
3124
|
discounts: rateCardDiscounts.optional(),
|
|
3127
3125
|
tax_config: rateCardTaxConfig.optional(),
|
|
3128
3126
|
})
|
|
3129
|
-
.describe(
|
|
3127
|
+
.describe('A rate card defines the pricing and entitlement of a feature or service.');
|
|
3130
3128
|
export const featurePagePaginatedResponse = z
|
|
3131
3129
|
.object({
|
|
3132
3130
|
data: z.array(feature),
|
|
3133
3131
|
meta: paginatedMeta,
|
|
3134
3132
|
})
|
|
3135
|
-
.describe(
|
|
3133
|
+
.describe('Page paginated response.');
|
|
3136
3134
|
export const workflow = z
|
|
3137
3135
|
.object({
|
|
3138
3136
|
collection: workflowCollectionSettings.optional(),
|
|
@@ -3140,26 +3138,26 @@ export const workflow = z
|
|
|
3140
3138
|
payment: workflowPaymentSettings.optional(),
|
|
3141
3139
|
tax: workflowTaxSettings.optional(),
|
|
3142
3140
|
})
|
|
3143
|
-
.describe(
|
|
3141
|
+
.describe('Billing workflow settings.');
|
|
3144
3142
|
export const charge = z
|
|
3145
|
-
.discriminatedUnion(
|
|
3146
|
-
.describe(
|
|
3143
|
+
.discriminatedUnion('type', [flatFeeCharge, usageBasedCharge])
|
|
3144
|
+
.describe('Customer charge.');
|
|
3147
3145
|
export const planPhase = z
|
|
3148
3146
|
.object({
|
|
3149
3147
|
name: z
|
|
3150
3148
|
.string()
|
|
3151
3149
|
.min(1)
|
|
3152
3150
|
.max(256)
|
|
3153
|
-
.describe(
|
|
3151
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3154
3152
|
description: z
|
|
3155
3153
|
.string()
|
|
3156
3154
|
.max(1024)
|
|
3157
3155
|
.optional()
|
|
3158
|
-
.describe(
|
|
3156
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3159
3157
|
labels: labels.optional(),
|
|
3160
3158
|
key: resourceKey,
|
|
3161
3159
|
duration: iso8601Duration.optional(),
|
|
3162
|
-
rate_cards: z.array(rateCard).describe(
|
|
3160
|
+
rate_cards: z.array(rateCard).describe('The rate cards of the plan.'),
|
|
3163
3161
|
})
|
|
3164
3162
|
.describe("The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.");
|
|
3165
3163
|
export const addon = z
|
|
@@ -3169,12 +3167,12 @@ export const addon = z
|
|
|
3169
3167
|
.string()
|
|
3170
3168
|
.min(1)
|
|
3171
3169
|
.max(256)
|
|
3172
|
-
.describe(
|
|
3170
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3173
3171
|
description: z
|
|
3174
3172
|
.string()
|
|
3175
3173
|
.max(1024)
|
|
3176
3174
|
.optional()
|
|
3177
|
-
.describe(
|
|
3175
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3178
3176
|
labels: labels.optional(),
|
|
3179
3177
|
created_at: dateTime,
|
|
3180
3178
|
updated_at: dateTime,
|
|
@@ -3185,55 +3183,55 @@ export const addon = z
|
|
|
3185
3183
|
.int()
|
|
3186
3184
|
.gte(1)
|
|
3187
3185
|
.default(1)
|
|
3188
|
-
.describe(
|
|
3186
|
+
.describe('Version of the add-on. Incremented when the add-on is updated.'),
|
|
3189
3187
|
instance_type: addonInstanceType,
|
|
3190
3188
|
currency: billingCurrencyCode,
|
|
3191
3189
|
effective_from: dateTime.optional(),
|
|
3192
3190
|
effective_to: dateTime.optional(),
|
|
3193
3191
|
status: addonStatus,
|
|
3194
|
-
rate_cards: z.array(rateCard).describe(
|
|
3192
|
+
rate_cards: z.array(rateCard).describe('The rate cards of the add-on.'),
|
|
3195
3193
|
validation_errors: z
|
|
3196
3194
|
.array(productCatalogValidationError)
|
|
3197
3195
|
.optional()
|
|
3198
|
-
.describe(
|
|
3196
|
+
.describe('List of validation errors.'),
|
|
3199
3197
|
})
|
|
3200
|
-
.describe(
|
|
3198
|
+
.describe('Add-on allows extending subscriptions with compatible plans with additional ratecards.');
|
|
3201
3199
|
export const createAddonRequest = z
|
|
3202
3200
|
.object({
|
|
3203
3201
|
name: z
|
|
3204
3202
|
.string()
|
|
3205
3203
|
.min(1)
|
|
3206
3204
|
.max(256)
|
|
3207
|
-
.describe(
|
|
3205
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3208
3206
|
description: z
|
|
3209
3207
|
.string()
|
|
3210
3208
|
.max(1024)
|
|
3211
3209
|
.optional()
|
|
3212
|
-
.describe(
|
|
3210
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3213
3211
|
labels: labels.optional(),
|
|
3214
3212
|
key: resourceKey,
|
|
3215
3213
|
instance_type: addonInstanceType,
|
|
3216
3214
|
currency: billingCurrencyCode,
|
|
3217
|
-
rate_cards: z.array(rateCard).describe(
|
|
3215
|
+
rate_cards: z.array(rateCard).describe('The rate cards of the add-on.'),
|
|
3218
3216
|
})
|
|
3219
|
-
.describe(
|
|
3217
|
+
.describe('Addon create request.');
|
|
3220
3218
|
export const upsertAddonRequest = z
|
|
3221
3219
|
.object({
|
|
3222
3220
|
name: z
|
|
3223
3221
|
.string()
|
|
3224
3222
|
.min(1)
|
|
3225
3223
|
.max(256)
|
|
3226
|
-
.describe(
|
|
3224
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3227
3225
|
description: z
|
|
3228
3226
|
.string()
|
|
3229
3227
|
.max(1024)
|
|
3230
3228
|
.optional()
|
|
3231
|
-
.describe(
|
|
3229
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3232
3230
|
labels: labels.optional(),
|
|
3233
3231
|
instance_type: addonInstanceType,
|
|
3234
|
-
rate_cards: z.array(rateCard).describe(
|
|
3232
|
+
rate_cards: z.array(rateCard).describe('The rate cards of the add-on.'),
|
|
3235
3233
|
})
|
|
3236
|
-
.describe(
|
|
3234
|
+
.describe('Addon upsert request.');
|
|
3237
3235
|
export const profile = z
|
|
3238
3236
|
.object({
|
|
3239
3237
|
id: ulid,
|
|
@@ -3241,12 +3239,12 @@ export const profile = z
|
|
|
3241
3239
|
.string()
|
|
3242
3240
|
.min(1)
|
|
3243
3241
|
.max(256)
|
|
3244
|
-
.describe(
|
|
3242
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3245
3243
|
description: z
|
|
3246
3244
|
.string()
|
|
3247
3245
|
.max(1024)
|
|
3248
3246
|
.optional()
|
|
3249
|
-
.describe(
|
|
3247
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3250
3248
|
labels: labels.optional(),
|
|
3251
3249
|
created_at: dateTime,
|
|
3252
3250
|
updated_at: dateTime,
|
|
@@ -3254,52 +3252,52 @@ export const profile = z
|
|
|
3254
3252
|
supplier: party,
|
|
3255
3253
|
workflow: workflow,
|
|
3256
3254
|
apps: profileAppReferences,
|
|
3257
|
-
default: z.boolean().describe(
|
|
3255
|
+
default: z.boolean().describe('Whether this is the default profile.'),
|
|
3258
3256
|
})
|
|
3259
|
-
.describe(
|
|
3257
|
+
.describe('Billing profiles contain the settings for billing and controls invoice generation.');
|
|
3260
3258
|
export const createBillingProfileRequest = z
|
|
3261
3259
|
.object({
|
|
3262
3260
|
name: z
|
|
3263
3261
|
.string()
|
|
3264
3262
|
.min(1)
|
|
3265
3263
|
.max(256)
|
|
3266
|
-
.describe(
|
|
3264
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3267
3265
|
description: z
|
|
3268
3266
|
.string()
|
|
3269
3267
|
.max(1024)
|
|
3270
3268
|
.optional()
|
|
3271
|
-
.describe(
|
|
3269
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3272
3270
|
labels: labels.optional(),
|
|
3273
3271
|
supplier: party,
|
|
3274
3272
|
workflow: workflow,
|
|
3275
3273
|
apps: profileAppReferences,
|
|
3276
|
-
default: z.boolean().describe(
|
|
3274
|
+
default: z.boolean().describe('Whether this is the default profile.'),
|
|
3277
3275
|
})
|
|
3278
|
-
.describe(
|
|
3276
|
+
.describe('BillingProfile create request.');
|
|
3279
3277
|
export const upsertBillingProfileRequest = z
|
|
3280
3278
|
.object({
|
|
3281
3279
|
name: z
|
|
3282
3280
|
.string()
|
|
3283
3281
|
.min(1)
|
|
3284
3282
|
.max(256)
|
|
3285
|
-
.describe(
|
|
3283
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3286
3284
|
description: z
|
|
3287
3285
|
.string()
|
|
3288
3286
|
.max(1024)
|
|
3289
3287
|
.optional()
|
|
3290
|
-
.describe(
|
|
3288
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3291
3289
|
labels: labels.optional(),
|
|
3292
3290
|
supplier: party,
|
|
3293
3291
|
workflow: workflow,
|
|
3294
|
-
default: z.boolean().describe(
|
|
3292
|
+
default: z.boolean().describe('Whether this is the default profile.'),
|
|
3295
3293
|
})
|
|
3296
|
-
.describe(
|
|
3294
|
+
.describe('BillingProfile upsert request.');
|
|
3297
3295
|
export const chargePagePaginatedResponse = z
|
|
3298
3296
|
.object({
|
|
3299
3297
|
data: z.array(charge),
|
|
3300
3298
|
meta: paginatedMeta,
|
|
3301
3299
|
})
|
|
3302
|
-
.describe(
|
|
3300
|
+
.describe('Page paginated response.');
|
|
3303
3301
|
export const plan = z
|
|
3304
3302
|
.object({
|
|
3305
3303
|
id: ulid,
|
|
@@ -3307,12 +3305,12 @@ export const plan = z
|
|
|
3307
3305
|
.string()
|
|
3308
3306
|
.min(1)
|
|
3309
3307
|
.max(256)
|
|
3310
|
-
.describe(
|
|
3308
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3311
3309
|
description: z
|
|
3312
3310
|
.string()
|
|
3313
3311
|
.max(1024)
|
|
3314
3312
|
.optional()
|
|
3315
|
-
.describe(
|
|
3313
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3316
3314
|
labels: labels.optional(),
|
|
3317
3315
|
created_at: dateTime,
|
|
3318
3316
|
updated_at: dateTime,
|
|
@@ -3323,39 +3321,39 @@ export const plan = z
|
|
|
3323
3321
|
.int()
|
|
3324
3322
|
.gte(1)
|
|
3325
3323
|
.default(1)
|
|
3326
|
-
.describe(
|
|
3324
|
+
.describe('Plans are versioned to allow you to make changes without affecting running subscriptions.'),
|
|
3327
3325
|
currency: currencyCode,
|
|
3328
3326
|
billing_cadence: iso8601Duration,
|
|
3329
3327
|
pro_rating_enabled: z
|
|
3330
3328
|
.boolean()
|
|
3331
3329
|
.optional()
|
|
3332
3330
|
.default(true)
|
|
3333
|
-
.describe(
|
|
3331
|
+
.describe('Whether pro-rating is enabled for this plan.'),
|
|
3334
3332
|
effective_from: dateTime.optional(),
|
|
3335
3333
|
effective_to: dateTime.optional(),
|
|
3336
3334
|
status: planStatus,
|
|
3337
3335
|
phases: z
|
|
3338
3336
|
.array(planPhase)
|
|
3339
3337
|
.min(1)
|
|
3340
|
-
.describe(
|
|
3338
|
+
.describe('The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required.'),
|
|
3341
3339
|
validation_errors: z
|
|
3342
3340
|
.array(productCatalogValidationError)
|
|
3343
3341
|
.optional()
|
|
3344
|
-
.describe(
|
|
3342
|
+
.describe('List of validation errors in `draft` state that prevent the plan from being published.'),
|
|
3345
3343
|
})
|
|
3346
|
-
.describe(
|
|
3344
|
+
.describe('Plans provide a template for subscriptions.');
|
|
3347
3345
|
export const createPlanRequest = z
|
|
3348
3346
|
.object({
|
|
3349
3347
|
name: z
|
|
3350
3348
|
.string()
|
|
3351
3349
|
.min(1)
|
|
3352
3350
|
.max(256)
|
|
3353
|
-
.describe(
|
|
3351
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3354
3352
|
description: z
|
|
3355
3353
|
.string()
|
|
3356
3354
|
.max(1024)
|
|
3357
3355
|
.optional()
|
|
3358
|
-
.describe(
|
|
3356
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3359
3357
|
labels: labels.optional(),
|
|
3360
3358
|
key: resourceKey,
|
|
3361
3359
|
currency: currencyCode,
|
|
@@ -3364,56 +3362,55 @@ export const createPlanRequest = z
|
|
|
3364
3362
|
.boolean()
|
|
3365
3363
|
.optional()
|
|
3366
3364
|
.default(true)
|
|
3367
|
-
.describe(
|
|
3365
|
+
.describe('Whether pro-rating is enabled for this plan.'),
|
|
3368
3366
|
phases: z
|
|
3369
3367
|
.array(planPhase)
|
|
3370
3368
|
.min(1)
|
|
3371
|
-
.describe(
|
|
3369
|
+
.describe('The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required.'),
|
|
3372
3370
|
})
|
|
3373
|
-
.describe(
|
|
3371
|
+
.describe('Plan create request.');
|
|
3374
3372
|
export const upsertPlanRequest = z
|
|
3375
3373
|
.object({
|
|
3376
3374
|
name: z
|
|
3377
3375
|
.string()
|
|
3378
3376
|
.min(1)
|
|
3379
3377
|
.max(256)
|
|
3380
|
-
.describe(
|
|
3378
|
+
.describe('Display name of the resource. Between 1 and 256 characters.'),
|
|
3381
3379
|
description: z
|
|
3382
3380
|
.string()
|
|
3383
3381
|
.max(1024)
|
|
3384
3382
|
.optional()
|
|
3385
|
-
.describe(
|
|
3383
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
3386
3384
|
labels: labels.optional(),
|
|
3387
3385
|
pro_rating_enabled: z
|
|
3388
3386
|
.boolean()
|
|
3389
3387
|
.optional()
|
|
3390
3388
|
.default(true)
|
|
3391
|
-
.describe(
|
|
3389
|
+
.describe('Whether pro-rating is enabled for this plan.'),
|
|
3392
3390
|
phases: z
|
|
3393
3391
|
.array(planPhase)
|
|
3394
3392
|
.min(1)
|
|
3395
|
-
.describe(
|
|
3393
|
+
.describe('The plan phases define the pricing ramp for a subscription. A phase switch occurs only at the end of a billing period. At least one phase is required.'),
|
|
3396
3394
|
})
|
|
3397
|
-
.describe(
|
|
3395
|
+
.describe('Plan upsert request.');
|
|
3398
3396
|
export const addonPagePaginatedResponse = z
|
|
3399
3397
|
.object({
|
|
3400
3398
|
data: z.array(addon),
|
|
3401
3399
|
meta: paginatedMeta,
|
|
3402
3400
|
})
|
|
3403
|
-
.describe(
|
|
3401
|
+
.describe('Page paginated response.');
|
|
3404
3402
|
export const profilePagePaginatedResponse = z
|
|
3405
3403
|
.object({
|
|
3406
3404
|
data: z.array(profile),
|
|
3407
3405
|
meta: paginatedMeta,
|
|
3408
3406
|
})
|
|
3409
|
-
.describe(
|
|
3407
|
+
.describe('Page paginated response.');
|
|
3410
3408
|
export const planPagePaginatedResponse = z
|
|
3411
3409
|
.object({
|
|
3412
3410
|
data: z.array(plan),
|
|
3413
3411
|
meta: paginatedMeta,
|
|
3414
3412
|
})
|
|
3415
|
-
.describe(
|
|
3416
|
-
;
|
|
3413
|
+
.describe('Page paginated response.');
|
|
3417
3414
|
export const listMeteringEventsQueryParams = z.object({
|
|
3418
3415
|
page: cursorPaginationQueryPage.optional(),
|
|
3419
3416
|
filter: listEventsParamsFilter.optional(),
|
|
@@ -3437,11 +3434,11 @@ export const listMetersQueryParams = z.object({
|
|
|
3437
3434
|
.number()
|
|
3438
3435
|
.int()
|
|
3439
3436
|
.optional()
|
|
3440
|
-
.describe(
|
|
3441
|
-
number: z.coerce.number().int().optional().describe(
|
|
3437
|
+
.describe('The number of items to include per page.'),
|
|
3438
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3442
3439
|
})
|
|
3443
3440
|
.optional()
|
|
3444
|
-
.describe(
|
|
3441
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3445
3442
|
sort: sortQuery.optional(),
|
|
3446
3443
|
filter: listMetersParamsFilter.optional(),
|
|
3447
3444
|
});
|
|
@@ -3475,11 +3472,11 @@ export const listCustomersQueryParams = z.object({
|
|
|
3475
3472
|
.number()
|
|
3476
3473
|
.int()
|
|
3477
3474
|
.optional()
|
|
3478
|
-
.describe(
|
|
3479
|
-
number: z.coerce.number().int().optional().describe(
|
|
3475
|
+
.describe('The number of items to include per page.'),
|
|
3476
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3480
3477
|
})
|
|
3481
3478
|
.optional()
|
|
3482
|
-
.describe(
|
|
3479
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3483
3480
|
sort: sortQuery.optional(),
|
|
3484
3481
|
filter: listCustomersParamsFilter.optional(),
|
|
3485
3482
|
});
|
|
@@ -3543,11 +3540,11 @@ export const listCreditGrantsQueryParams = z.object({
|
|
|
3543
3540
|
.number()
|
|
3544
3541
|
.int()
|
|
3545
3542
|
.optional()
|
|
3546
|
-
.describe(
|
|
3547
|
-
number: z.coerce.number().int().optional().describe(
|
|
3543
|
+
.describe('The number of items to include per page.'),
|
|
3544
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3548
3545
|
})
|
|
3549
3546
|
.optional()
|
|
3550
|
-
.describe(
|
|
3547
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3551
3548
|
filter: listCreditGrantsParamsFilter.optional(),
|
|
3552
3549
|
});
|
|
3553
3550
|
export const listCreditGrantsResponse = z.object({
|
|
@@ -3594,11 +3591,11 @@ export const listCustomerChargesQueryParams = z.object({
|
|
|
3594
3591
|
.number()
|
|
3595
3592
|
.int()
|
|
3596
3593
|
.optional()
|
|
3597
|
-
.describe(
|
|
3598
|
-
number: z.coerce.number().int().optional().describe(
|
|
3594
|
+
.describe('The number of items to include per page.'),
|
|
3595
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3599
3596
|
})
|
|
3600
3597
|
.optional()
|
|
3601
|
-
.describe(
|
|
3598
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3602
3599
|
sort: sortQuery.optional(),
|
|
3603
3600
|
filter: listChargesParamsFilter.optional(),
|
|
3604
3601
|
expand: z
|
|
@@ -3619,11 +3616,11 @@ export const listSubscriptionsQueryParams = z.object({
|
|
|
3619
3616
|
.number()
|
|
3620
3617
|
.int()
|
|
3621
3618
|
.optional()
|
|
3622
|
-
.describe(
|
|
3623
|
-
number: z.coerce.number().int().optional().describe(
|
|
3619
|
+
.describe('The number of items to include per page.'),
|
|
3620
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3624
3621
|
})
|
|
3625
3622
|
.optional()
|
|
3626
|
-
.describe(
|
|
3623
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3627
3624
|
sort: sortQuery.optional(),
|
|
3628
3625
|
filter: listSubscriptionsParamsFilter.optional(),
|
|
3629
3626
|
});
|
|
@@ -3659,11 +3656,11 @@ export const listSubscriptionAddonsQueryParams = z.object({
|
|
|
3659
3656
|
.number()
|
|
3660
3657
|
.int()
|
|
3661
3658
|
.optional()
|
|
3662
|
-
.describe(
|
|
3663
|
-
number: z.coerce.number().int().optional().describe(
|
|
3659
|
+
.describe('The number of items to include per page.'),
|
|
3660
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3664
3661
|
})
|
|
3665
3662
|
.optional()
|
|
3666
|
-
.describe(
|
|
3663
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3667
3664
|
sort: sortQuery.optional(),
|
|
3668
3665
|
});
|
|
3669
3666
|
export const listSubscriptionAddonsResponse = z.object({
|
|
@@ -3682,11 +3679,11 @@ export const listAppsQueryParams = z.object({
|
|
|
3682
3679
|
.number()
|
|
3683
3680
|
.int()
|
|
3684
3681
|
.optional()
|
|
3685
|
-
.describe(
|
|
3686
|
-
number: z.coerce.number().int().optional().describe(
|
|
3682
|
+
.describe('The number of items to include per page.'),
|
|
3683
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3687
3684
|
})
|
|
3688
3685
|
.optional()
|
|
3689
|
-
.describe(
|
|
3686
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3690
3687
|
});
|
|
3691
3688
|
export const listAppsResponse = z.object({
|
|
3692
3689
|
data: z.array(app),
|
|
@@ -3703,11 +3700,11 @@ export const listBillingProfilesQueryParams = z.object({
|
|
|
3703
3700
|
.number()
|
|
3704
3701
|
.int()
|
|
3705
3702
|
.optional()
|
|
3706
|
-
.describe(
|
|
3707
|
-
number: z.coerce.number().int().optional().describe(
|
|
3703
|
+
.describe('The number of items to include per page.'),
|
|
3704
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3708
3705
|
})
|
|
3709
3706
|
.optional()
|
|
3710
|
-
.describe(
|
|
3707
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3711
3708
|
});
|
|
3712
3709
|
export const listBillingProfilesResponse = z.object({
|
|
3713
3710
|
data: z.array(profile),
|
|
@@ -3740,15 +3737,15 @@ export const listTaxCodesQueryParams = z.object({
|
|
|
3740
3737
|
.number()
|
|
3741
3738
|
.int()
|
|
3742
3739
|
.optional()
|
|
3743
|
-
.describe(
|
|
3744
|
-
number: z.coerce.number().int().optional().describe(
|
|
3740
|
+
.describe('The number of items to include per page.'),
|
|
3741
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3745
3742
|
})
|
|
3746
3743
|
.optional()
|
|
3747
|
-
.describe(
|
|
3744
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3748
3745
|
include_deleted: z.coerce
|
|
3749
3746
|
.boolean()
|
|
3750
3747
|
.optional()
|
|
3751
|
-
.describe(
|
|
3748
|
+
.describe('Include deleted tax codes in the response.'),
|
|
3752
3749
|
});
|
|
3753
3750
|
export const listTaxCodesResponse = z.object({
|
|
3754
3751
|
data: z.array(taxCode),
|
|
@@ -3769,11 +3766,11 @@ export const listCurrenciesQueryParams = z.object({
|
|
|
3769
3766
|
.number()
|
|
3770
3767
|
.int()
|
|
3771
3768
|
.optional()
|
|
3772
|
-
.describe(
|
|
3773
|
-
number: z.coerce.number().int().optional().describe(
|
|
3769
|
+
.describe('The number of items to include per page.'),
|
|
3770
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3774
3771
|
})
|
|
3775
3772
|
.optional()
|
|
3776
|
-
.describe(
|
|
3773
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3777
3774
|
sort: sortQuery.optional(),
|
|
3778
3775
|
filter: listCurrenciesParamsFilter.optional(),
|
|
3779
3776
|
});
|
|
@@ -3794,11 +3791,11 @@ export const listCostBasesQueryParams = z.object({
|
|
|
3794
3791
|
.number()
|
|
3795
3792
|
.int()
|
|
3796
3793
|
.optional()
|
|
3797
|
-
.describe(
|
|
3798
|
-
number: z.coerce.number().int().optional().describe(
|
|
3794
|
+
.describe('The number of items to include per page.'),
|
|
3795
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3799
3796
|
})
|
|
3800
3797
|
.optional()
|
|
3801
|
-
.describe(
|
|
3798
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3802
3799
|
});
|
|
3803
3800
|
export const listCostBasesResponse = z.object({
|
|
3804
3801
|
data: z.array(costBasis),
|
|
@@ -3816,11 +3813,11 @@ export const listFeaturesQueryParams = z.object({
|
|
|
3816
3813
|
.number()
|
|
3817
3814
|
.int()
|
|
3818
3815
|
.optional()
|
|
3819
|
-
.describe(
|
|
3820
|
-
number: z.coerce.number().int().optional().describe(
|
|
3816
|
+
.describe('The number of items to include per page.'),
|
|
3817
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3821
3818
|
})
|
|
3822
3819
|
.optional()
|
|
3823
|
-
.describe(
|
|
3820
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3824
3821
|
sort: sortQuery.optional(),
|
|
3825
3822
|
filter: listFeatureParamsFilter.optional(),
|
|
3826
3823
|
});
|
|
@@ -3856,11 +3853,11 @@ export const listLlmCostPricesQueryParams = z.object({
|
|
|
3856
3853
|
.number()
|
|
3857
3854
|
.int()
|
|
3858
3855
|
.optional()
|
|
3859
|
-
.describe(
|
|
3860
|
-
number: z.coerce.number().int().optional().describe(
|
|
3856
|
+
.describe('The number of items to include per page.'),
|
|
3857
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3861
3858
|
})
|
|
3862
3859
|
.optional()
|
|
3863
|
-
.describe(
|
|
3860
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3864
3861
|
});
|
|
3865
3862
|
export const listLlmCostPricesResponse = z.object({
|
|
3866
3863
|
data: z.array(llmCostPrice),
|
|
@@ -3878,11 +3875,11 @@ export const listLlmCostOverridesQueryParams = z.object({
|
|
|
3878
3875
|
.number()
|
|
3879
3876
|
.int()
|
|
3880
3877
|
.optional()
|
|
3881
|
-
.describe(
|
|
3882
|
-
number: z.coerce.number().int().optional().describe(
|
|
3878
|
+
.describe('The number of items to include per page.'),
|
|
3879
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3883
3880
|
})
|
|
3884
3881
|
.optional()
|
|
3885
|
-
.describe(
|
|
3882
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3886
3883
|
});
|
|
3887
3884
|
export const listLlmCostOverridesResponse = z.object({
|
|
3888
3885
|
data: z.array(llmCostPrice),
|
|
@@ -3900,11 +3897,11 @@ export const listPlansQueryParams = z.object({
|
|
|
3900
3897
|
.number()
|
|
3901
3898
|
.int()
|
|
3902
3899
|
.optional()
|
|
3903
|
-
.describe(
|
|
3904
|
-
number: z.coerce.number().int().optional().describe(
|
|
3900
|
+
.describe('The number of items to include per page.'),
|
|
3901
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3905
3902
|
})
|
|
3906
3903
|
.optional()
|
|
3907
|
-
.describe(
|
|
3904
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3908
3905
|
sort: sortQuery.optional(),
|
|
3909
3906
|
filter: listPlansParamsFilter.optional(),
|
|
3910
3907
|
});
|
|
@@ -3941,11 +3938,11 @@ export const listAddonsQueryParams = z.object({
|
|
|
3941
3938
|
.number()
|
|
3942
3939
|
.int()
|
|
3943
3940
|
.optional()
|
|
3944
|
-
.describe(
|
|
3945
|
-
number: z.coerce.number().int().optional().describe(
|
|
3941
|
+
.describe('The number of items to include per page.'),
|
|
3942
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3946
3943
|
})
|
|
3947
3944
|
.optional()
|
|
3948
|
-
.describe(
|
|
3945
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3949
3946
|
sort: sortQuery.optional(),
|
|
3950
3947
|
filter: listAddonsParamsFilter.optional(),
|
|
3951
3948
|
});
|
|
@@ -3985,11 +3982,11 @@ export const listPlanAddonsQueryParams = z.object({
|
|
|
3985
3982
|
.number()
|
|
3986
3983
|
.int()
|
|
3987
3984
|
.optional()
|
|
3988
|
-
.describe(
|
|
3989
|
-
number: z.coerce.number().int().optional().describe(
|
|
3985
|
+
.describe('The number of items to include per page.'),
|
|
3986
|
+
number: z.coerce.number().int().optional().describe('The page number.'),
|
|
3990
3987
|
})
|
|
3991
3988
|
.optional()
|
|
3992
|
-
.describe(
|
|
3989
|
+
.describe('Determines which page of the collection to retrieve.'),
|
|
3993
3990
|
});
|
|
3994
3991
|
export const listPlanAddonsResponse = z.object({
|
|
3995
3992
|
data: z.array(planAddon),
|