@openmeter/client 1.0.0-beta.231 → 1.0.0-beta.233
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 +95 -54
- package/dist/core.js +7 -4
- package/dist/funcs/addons.js +59 -11
- package/dist/funcs/apps.d.ts +41 -1
- package/dist/funcs/apps.js +170 -4
- package/dist/funcs/billing.js +40 -8
- package/dist/funcs/charges.d.ts +14 -0
- package/dist/funcs/charges.js +42 -0
- package/dist/funcs/currencies.d.ts +9 -1
- package/dist/funcs/currencies.js +62 -5
- package/dist/funcs/customers.js +214 -43
- package/dist/funcs/{governance.d.ts → entitlementAccess.d.ts} +4 -4
- package/dist/funcs/{governance.js → entitlementAccess.js} +10 -10
- package/dist/funcs/entitlements.d.ts +9 -1
- package/dist/funcs/entitlements.js +61 -3
- package/dist/funcs/events.js +3 -0
- package/dist/funcs/features.js +48 -9
- package/dist/funcs/index.d.ts +2 -1
- package/dist/funcs/index.js +2 -1
- package/dist/funcs/invoices.d.ts +58 -1
- package/dist/funcs/invoices.js +202 -7
- package/dist/funcs/llmCost.js +26 -5
- package/dist/funcs/meters.js +59 -11
- package/dist/funcs/planAddons.js +71 -18
- package/dist/funcs/plans.js +59 -11
- package/dist/funcs/subscriptions.d.ts +60 -1
- package/dist/funcs/subscriptions.js +291 -17
- package/dist/funcs/tax.js +34 -7
- package/dist/index.d.ts +3 -2
- package/dist/lib/config.d.ts +2 -2
- package/dist/lib/paginate.d.ts +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/wire.d.ts +1 -0
- package/dist/lib/wire.js +88 -10
- package/dist/models/operations/apps.d.ts +41 -1
- package/dist/models/operations/billing.d.ts +19 -1
- package/dist/models/operations/charges.d.ts +54 -0
- package/dist/models/operations/currencies.d.ts +10 -0
- package/dist/models/operations/customers.d.ts +21 -6
- package/dist/models/operations/entitlementAccess.d.ts +9 -0
- package/dist/models/operations/entitlementAccess.js +2 -0
- package/dist/models/operations/entitlements.d.ts +18 -1
- package/dist/models/operations/invoices.d.ts +16 -0
- package/dist/models/operations/planAddons.d.ts +14 -1
- package/dist/models/operations/subscriptions.d.ts +27 -3
- package/dist/models/schemas.d.ts +52291 -22631
- package/dist/models/schemas.js +3981 -1823
- package/dist/models/types.d.ts +4481 -2018
- package/dist/sdk/apps.d.ts +1 -20
- package/dist/sdk/apps.js +1 -24
- package/dist/sdk/customers.d.ts +2 -56
- package/dist/sdk/customers.js +1 -67
- package/dist/sdk/entitlements.d.ts +9 -1
- package/dist/sdk/entitlements.js +11 -1
- package/dist/sdk/internal.d.ts +324 -15
- package/dist/sdk/internal.js +402 -17
- package/dist/sdk/invoices.d.ts +127 -0
- package/dist/sdk/invoices.js +147 -0
- package/dist/sdk/planAddons.d.ts +1 -20
- package/dist/sdk/planAddons.js +1 -24
- package/dist/sdk/subscriptions.d.ts +20 -1
- package/dist/sdk/subscriptions.js +24 -1
- package/package.json +3 -3
- package/dist/models/operations/governance.d.ts +0 -9
- /package/dist/models/operations/{governance.js → charges.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { http } from '../core.js';
|
|
3
3
|
import { request } from '../lib/request.js';
|
|
4
4
|
import { toURLSearchParams, encodeSort } from '../lib/encodings.js';
|
|
5
|
-
import { toWire, fromWire, assertValid, toSnakeCase } from '../lib/wire.js';
|
|
5
|
+
import { toWire, toPathWire, fromWire, assertValid, toSnakeCase, } from '../lib/wire.js';
|
|
6
6
|
import * as schemas from '../models/schemas.js';
|
|
7
7
|
/**
|
|
8
8
|
* Create subscription
|
|
@@ -33,6 +33,9 @@ export function createSubscription(client, req, options) {
|
|
|
33
33
|
*/
|
|
34
34
|
export function listSubscriptions(client, req = {}, options) {
|
|
35
35
|
return request(() => {
|
|
36
|
+
if (client._options.validate && req.sort !== undefined) {
|
|
37
|
+
assertValid(schemas.listSubscriptionsQueryParams.shape.sort, req.sort);
|
|
38
|
+
}
|
|
36
39
|
const query = toWire({
|
|
37
40
|
page: req.page,
|
|
38
41
|
sort: encodeSort(req.sort, toSnakeCase),
|
|
@@ -60,11 +63,20 @@ export function listSubscriptions(client, req = {}, options) {
|
|
|
60
63
|
*/
|
|
61
64
|
export function getSubscription(client, req, options) {
|
|
62
65
|
return request(() => {
|
|
66
|
+
const pathParamsInput = {
|
|
67
|
+
subscriptionId: req.subscriptionId,
|
|
68
|
+
};
|
|
69
|
+
const pathParams = client._options.validate
|
|
70
|
+
? toPathWire(pathParamsInput, schemas.getSubscriptionPathParams)
|
|
71
|
+
: pathParamsInput;
|
|
72
|
+
if (client._options.validate) {
|
|
73
|
+
assertValid(schemas.getSubscriptionPathParamsWire, pathParams);
|
|
74
|
+
}
|
|
63
75
|
const path = `openmeter/subscriptions/${(() => {
|
|
64
|
-
if (
|
|
76
|
+
if (pathParams.subscriptionId === undefined) {
|
|
65
77
|
throw new Error('missing path parameter: subscriptionId');
|
|
66
78
|
}
|
|
67
|
-
return encodeURIComponent(String(
|
|
79
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
68
80
|
})()}`;
|
|
69
81
|
return http(client)
|
|
70
82
|
.get(path, options)
|
|
@@ -87,11 +99,20 @@ export function getSubscription(client, req, options) {
|
|
|
87
99
|
*/
|
|
88
100
|
export function cancelSubscription(client, req, options) {
|
|
89
101
|
return request(() => {
|
|
102
|
+
const pathParamsInput = {
|
|
103
|
+
subscriptionId: req.subscriptionId,
|
|
104
|
+
};
|
|
105
|
+
const pathParams = client._options.validate
|
|
106
|
+
? toPathWire(pathParamsInput, schemas.cancelSubscriptionPathParams)
|
|
107
|
+
: pathParamsInput;
|
|
108
|
+
if (client._options.validate) {
|
|
109
|
+
assertValid(schemas.cancelSubscriptionPathParamsWire, pathParams);
|
|
110
|
+
}
|
|
90
111
|
const path = `openmeter/subscriptions/${(() => {
|
|
91
|
-
if (
|
|
112
|
+
if (pathParams.subscriptionId === undefined) {
|
|
92
113
|
throw new Error('missing path parameter: subscriptionId');
|
|
93
114
|
}
|
|
94
|
-
return encodeURIComponent(String(
|
|
115
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
95
116
|
})()}/cancel`;
|
|
96
117
|
const body = toWire(req.body, schemas.cancelSubscriptionBody);
|
|
97
118
|
if (client._options.validate) {
|
|
@@ -117,11 +138,20 @@ export function cancelSubscription(client, req, options) {
|
|
|
117
138
|
*/
|
|
118
139
|
export function unscheduleCancelation(client, req, options) {
|
|
119
140
|
return request(() => {
|
|
141
|
+
const pathParamsInput = {
|
|
142
|
+
subscriptionId: req.subscriptionId,
|
|
143
|
+
};
|
|
144
|
+
const pathParams = client._options.validate
|
|
145
|
+
? toPathWire(pathParamsInput, schemas.unscheduleCancelationPathParams)
|
|
146
|
+
: pathParamsInput;
|
|
147
|
+
if (client._options.validate) {
|
|
148
|
+
assertValid(schemas.unscheduleCancelationPathParamsWire, pathParams);
|
|
149
|
+
}
|
|
120
150
|
const path = `openmeter/subscriptions/${(() => {
|
|
121
|
-
if (
|
|
151
|
+
if (pathParams.subscriptionId === undefined) {
|
|
122
152
|
throw new Error('missing path parameter: subscriptionId');
|
|
123
153
|
}
|
|
124
|
-
return encodeURIComponent(String(
|
|
154
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
125
155
|
})()}/unschedule-cancelation`;
|
|
126
156
|
return http(client)
|
|
127
157
|
.post(path, options)
|
|
@@ -134,6 +164,75 @@ export function unscheduleCancelation(client, req, options) {
|
|
|
134
164
|
});
|
|
135
165
|
});
|
|
136
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Unschedule subscription
|
|
169
|
+
*
|
|
170
|
+
* Deletes a scheduled subscription that has not yet become active, removing it and
|
|
171
|
+
* resolving any scheduling conflict it was holding. This is distinct from
|
|
172
|
+
* canceling: cancel ends a running subscription, whereas unscheduling removes a
|
|
173
|
+
* not-yet-active one. Only scheduled subscriptions can be unscheduled;
|
|
174
|
+
* unscheduling an active or already-started subscription is rejected.
|
|
175
|
+
*
|
|
176
|
+
* POST /openmeter/subscriptions/{subscriptionId}/unschedule
|
|
177
|
+
*/
|
|
178
|
+
export function unscheduleSubscription(client, req, options) {
|
|
179
|
+
return request(async () => {
|
|
180
|
+
const pathParamsInput = {
|
|
181
|
+
subscriptionId: req.subscriptionId,
|
|
182
|
+
};
|
|
183
|
+
const pathParams = client._options.validate
|
|
184
|
+
? toPathWire(pathParamsInput, schemas.unscheduleSubscriptionPathParams)
|
|
185
|
+
: pathParamsInput;
|
|
186
|
+
if (client._options.validate) {
|
|
187
|
+
assertValid(schemas.unscheduleSubscriptionPathParamsWire, pathParams);
|
|
188
|
+
}
|
|
189
|
+
const path = `openmeter/subscriptions/${(() => {
|
|
190
|
+
if (pathParams.subscriptionId === undefined) {
|
|
191
|
+
throw new Error('missing path parameter: subscriptionId');
|
|
192
|
+
}
|
|
193
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
194
|
+
})()}/unschedule`;
|
|
195
|
+
await http(client).post(path, options);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Restore subscription
|
|
200
|
+
*
|
|
201
|
+
* Restores the subscription by deleting any later-scheduled successor
|
|
202
|
+
* subscriptions and continuing this one indefinitely. This is the inverse of a
|
|
203
|
+
* future-dated change, which schedules a successor. Restore is not available when
|
|
204
|
+
* multi-subscription is enabled.
|
|
205
|
+
*
|
|
206
|
+
* POST /openmeter/subscriptions/{subscriptionId}/restore
|
|
207
|
+
*/
|
|
208
|
+
export function restoreSubscription(client, req, options) {
|
|
209
|
+
return request(() => {
|
|
210
|
+
const pathParamsInput = {
|
|
211
|
+
subscriptionId: req.subscriptionId,
|
|
212
|
+
};
|
|
213
|
+
const pathParams = client._options.validate
|
|
214
|
+
? toPathWire(pathParamsInput, schemas.restoreSubscriptionPathParams)
|
|
215
|
+
: pathParamsInput;
|
|
216
|
+
if (client._options.validate) {
|
|
217
|
+
assertValid(schemas.restoreSubscriptionPathParamsWire, pathParams);
|
|
218
|
+
}
|
|
219
|
+
const path = `openmeter/subscriptions/${(() => {
|
|
220
|
+
if (pathParams.subscriptionId === undefined) {
|
|
221
|
+
throw new Error('missing path parameter: subscriptionId');
|
|
222
|
+
}
|
|
223
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
224
|
+
})()}/restore`;
|
|
225
|
+
return http(client)
|
|
226
|
+
.post(path, options)
|
|
227
|
+
.json()
|
|
228
|
+
.then((data) => {
|
|
229
|
+
if (client._options.validate) {
|
|
230
|
+
assertValid(schemas.restoreSubscriptionResponseWire, data);
|
|
231
|
+
}
|
|
232
|
+
return fromWire(data, schemas.restoreSubscriptionResponse);
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
137
236
|
/**
|
|
138
237
|
* Change subscription
|
|
139
238
|
*
|
|
@@ -144,11 +243,20 @@ export function unscheduleCancelation(client, req, options) {
|
|
|
144
243
|
*/
|
|
145
244
|
export function changeSubscription(client, req, options) {
|
|
146
245
|
return request(() => {
|
|
246
|
+
const pathParamsInput = {
|
|
247
|
+
subscriptionId: req.subscriptionId,
|
|
248
|
+
};
|
|
249
|
+
const pathParams = client._options.validate
|
|
250
|
+
? toPathWire(pathParamsInput, schemas.changeSubscriptionPathParams)
|
|
251
|
+
: pathParamsInput;
|
|
252
|
+
if (client._options.validate) {
|
|
253
|
+
assertValid(schemas.changeSubscriptionPathParamsWire, pathParams);
|
|
254
|
+
}
|
|
147
255
|
const path = `openmeter/subscriptions/${(() => {
|
|
148
|
-
if (
|
|
256
|
+
if (pathParams.subscriptionId === undefined) {
|
|
149
257
|
throw new Error('missing path parameter: subscriptionId');
|
|
150
258
|
}
|
|
151
|
-
return encodeURIComponent(String(
|
|
259
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
152
260
|
})()}/change`;
|
|
153
261
|
const body = toWire(req.body, schemas.changeSubscriptionBody);
|
|
154
262
|
if (client._options.validate) {
|
|
@@ -165,6 +273,94 @@ export function changeSubscription(client, req, options) {
|
|
|
165
273
|
});
|
|
166
274
|
});
|
|
167
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Migrate subscription
|
|
278
|
+
*
|
|
279
|
+
* Migrates to a later version of the current plan. With starting_phase omitted and
|
|
280
|
+
* billing_anchor omitted or unchanged, migration amends the subscription in place:
|
|
281
|
+
* unchanged items retain their service periods and both response entries have the
|
|
282
|
+
* same ID. Existing addons must remain compatible with the target plan.
|
|
283
|
+
* Incompatible phase timelines or billing settings return an error. Providing
|
|
284
|
+
* starting_phase or a different billing_anchor explicitly requests replacement,
|
|
285
|
+
* which resets the phase timeline, may produce billing adjustments, and does not
|
|
286
|
+
* transfer addons. Custom subscriptions cannot be migrated.
|
|
287
|
+
*
|
|
288
|
+
* POST /openmeter/subscriptions/{subscriptionId}/migrate
|
|
289
|
+
*/
|
|
290
|
+
export function migrateSubscription(client, req, options) {
|
|
291
|
+
return request(() => {
|
|
292
|
+
const pathParamsInput = {
|
|
293
|
+
subscriptionId: req.subscriptionId,
|
|
294
|
+
};
|
|
295
|
+
const pathParams = client._options.validate
|
|
296
|
+
? toPathWire(pathParamsInput, schemas.migrateSubscriptionPathParams)
|
|
297
|
+
: pathParamsInput;
|
|
298
|
+
if (client._options.validate) {
|
|
299
|
+
assertValid(schemas.migrateSubscriptionPathParamsWire, pathParams);
|
|
300
|
+
}
|
|
301
|
+
const path = `openmeter/subscriptions/${(() => {
|
|
302
|
+
if (pathParams.subscriptionId === undefined) {
|
|
303
|
+
throw new Error('missing path parameter: subscriptionId');
|
|
304
|
+
}
|
|
305
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
306
|
+
})()}/migrate`;
|
|
307
|
+
const body = toWire(req.body, schemas.migrateSubscriptionBody);
|
|
308
|
+
if (client._options.validate) {
|
|
309
|
+
assertValid(schemas.migrateSubscriptionBodyWire, body);
|
|
310
|
+
}
|
|
311
|
+
return http(client)
|
|
312
|
+
.post(path, { ...options, json: body })
|
|
313
|
+
.json()
|
|
314
|
+
.then((data) => {
|
|
315
|
+
if (client._options.validate) {
|
|
316
|
+
assertValid(schemas.migrateSubscriptionResponseWire, data);
|
|
317
|
+
}
|
|
318
|
+
return fromWire(data, schemas.migrateSubscriptionResponse);
|
|
319
|
+
});
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Edit subscription
|
|
324
|
+
*
|
|
325
|
+
* Edits a running subscription by applying an ordered batch of customizations
|
|
326
|
+
* (adding or removing items, adding, removing, or stretching phases, or
|
|
327
|
+
* unscheduling a pending edit). The changes may take effect immediately or at the
|
|
328
|
+
* next billing cycle. Subscriptions that have add-ons cannot be edited.
|
|
329
|
+
*
|
|
330
|
+
* POST /openmeter/subscriptions/{subscriptionId}/edit
|
|
331
|
+
*/
|
|
332
|
+
export function editSubscription(client, req, options) {
|
|
333
|
+
return request(() => {
|
|
334
|
+
const pathParamsInput = {
|
|
335
|
+
subscriptionId: req.subscriptionId,
|
|
336
|
+
};
|
|
337
|
+
const pathParams = client._options.validate
|
|
338
|
+
? toPathWire(pathParamsInput, schemas.editSubscriptionPathParams)
|
|
339
|
+
: pathParamsInput;
|
|
340
|
+
if (client._options.validate) {
|
|
341
|
+
assertValid(schemas.editSubscriptionPathParamsWire, pathParams);
|
|
342
|
+
}
|
|
343
|
+
const path = `openmeter/subscriptions/${(() => {
|
|
344
|
+
if (pathParams.subscriptionId === undefined) {
|
|
345
|
+
throw new Error('missing path parameter: subscriptionId');
|
|
346
|
+
}
|
|
347
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
348
|
+
})()}/edit`;
|
|
349
|
+
const body = toWire(req.body, schemas.editSubscriptionBody);
|
|
350
|
+
if (client._options.validate) {
|
|
351
|
+
assertValid(schemas.editSubscriptionBodyWire, body);
|
|
352
|
+
}
|
|
353
|
+
return http(client)
|
|
354
|
+
.post(path, { ...options, json: body })
|
|
355
|
+
.json()
|
|
356
|
+
.then((data) => {
|
|
357
|
+
if (client._options.validate) {
|
|
358
|
+
assertValid(schemas.editSubscriptionResponseWire, data);
|
|
359
|
+
}
|
|
360
|
+
return fromWire(data, schemas.editSubscriptionResponse);
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
}
|
|
168
364
|
/**
|
|
169
365
|
* Create a new subscription add-on
|
|
170
366
|
*
|
|
@@ -174,11 +370,20 @@ export function changeSubscription(client, req, options) {
|
|
|
174
370
|
*/
|
|
175
371
|
export function createSubscriptionAddon(client, req, options) {
|
|
176
372
|
return request(() => {
|
|
373
|
+
const pathParamsInput = {
|
|
374
|
+
subscriptionId: req.subscriptionId,
|
|
375
|
+
};
|
|
376
|
+
const pathParams = client._options.validate
|
|
377
|
+
? toPathWire(pathParamsInput, schemas.createSubscriptionAddonPathParams)
|
|
378
|
+
: pathParamsInput;
|
|
379
|
+
if (client._options.validate) {
|
|
380
|
+
assertValid(schemas.createSubscriptionAddonPathParamsWire, pathParams);
|
|
381
|
+
}
|
|
177
382
|
const path = `openmeter/subscriptions/${(() => {
|
|
178
|
-
if (
|
|
383
|
+
if (pathParams.subscriptionId === undefined) {
|
|
179
384
|
throw new Error('missing path parameter: subscriptionId');
|
|
180
385
|
}
|
|
181
|
-
return encodeURIComponent(String(
|
|
386
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
182
387
|
})()}/addons`;
|
|
183
388
|
const body = toWire(req.body, schemas.createSubscriptionAddonBody);
|
|
184
389
|
if (client._options.validate) {
|
|
@@ -204,12 +409,24 @@ export function createSubscriptionAddon(client, req, options) {
|
|
|
204
409
|
*/
|
|
205
410
|
export function listSubscriptionAddons(client, req, options) {
|
|
206
411
|
return request(() => {
|
|
412
|
+
const pathParamsInput = {
|
|
413
|
+
subscriptionId: req.subscriptionId,
|
|
414
|
+
};
|
|
415
|
+
const pathParams = client._options.validate
|
|
416
|
+
? toPathWire(pathParamsInput, schemas.listSubscriptionAddonsPathParams)
|
|
417
|
+
: pathParamsInput;
|
|
418
|
+
if (client._options.validate) {
|
|
419
|
+
assertValid(schemas.listSubscriptionAddonsPathParamsWire, pathParams);
|
|
420
|
+
}
|
|
207
421
|
const path = `openmeter/subscriptions/${(() => {
|
|
208
|
-
if (
|
|
422
|
+
if (pathParams.subscriptionId === undefined) {
|
|
209
423
|
throw new Error('missing path parameter: subscriptionId');
|
|
210
424
|
}
|
|
211
|
-
return encodeURIComponent(String(
|
|
425
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
212
426
|
})()}/addons`;
|
|
427
|
+
if (client._options.validate && req.sort !== undefined) {
|
|
428
|
+
assertValid(schemas.listSubscriptionAddonsQueryParams.shape.sort, req.sort);
|
|
429
|
+
}
|
|
213
430
|
const query = toWire({
|
|
214
431
|
page: req.page,
|
|
215
432
|
sort: encodeSort(req.sort, toSnakeCase),
|
|
@@ -238,16 +455,26 @@ export function listSubscriptionAddons(client, req, options) {
|
|
|
238
455
|
*/
|
|
239
456
|
export function getSubscriptionAddon(client, req, options) {
|
|
240
457
|
return request(() => {
|
|
458
|
+
const pathParamsInput = {
|
|
459
|
+
subscriptionId: req.subscriptionId,
|
|
460
|
+
subscriptionAddonId: req.subscriptionAddonId,
|
|
461
|
+
};
|
|
462
|
+
const pathParams = client._options.validate
|
|
463
|
+
? toPathWire(pathParamsInput, schemas.getSubscriptionAddonPathParams)
|
|
464
|
+
: pathParamsInput;
|
|
465
|
+
if (client._options.validate) {
|
|
466
|
+
assertValid(schemas.getSubscriptionAddonPathParamsWire, pathParams);
|
|
467
|
+
}
|
|
241
468
|
const path = `openmeter/subscriptions/${(() => {
|
|
242
|
-
if (
|
|
469
|
+
if (pathParams.subscriptionId === undefined) {
|
|
243
470
|
throw new Error('missing path parameter: subscriptionId');
|
|
244
471
|
}
|
|
245
|
-
return encodeURIComponent(String(
|
|
472
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
246
473
|
})()}/addons/${(() => {
|
|
247
|
-
if (
|
|
474
|
+
if (pathParams.subscriptionAddonId === undefined) {
|
|
248
475
|
throw new Error('missing path parameter: subscriptionAddonId');
|
|
249
476
|
}
|
|
250
|
-
return encodeURIComponent(String(
|
|
477
|
+
return encodeURIComponent(String(pathParams.subscriptionAddonId));
|
|
251
478
|
})()}`;
|
|
252
479
|
return http(client)
|
|
253
480
|
.get(path, options)
|
|
@@ -260,3 +487,50 @@ export function getSubscriptionAddon(client, req, options) {
|
|
|
260
487
|
});
|
|
261
488
|
});
|
|
262
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* Update subscription addon
|
|
492
|
+
*
|
|
493
|
+
* Update a subscription add-on. Only the quantity is mutable; the timing controls
|
|
494
|
+
* when the new quantity takes effect. A new entry is appended to the add-on's
|
|
495
|
+
* timeline.
|
|
496
|
+
*
|
|
497
|
+
* PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId}
|
|
498
|
+
*/
|
|
499
|
+
export function updateSubscriptionAddon(client, req, options) {
|
|
500
|
+
return request(() => {
|
|
501
|
+
const pathParamsInput = {
|
|
502
|
+
subscriptionId: req.subscriptionId,
|
|
503
|
+
subscriptionAddonId: req.subscriptionAddonId,
|
|
504
|
+
};
|
|
505
|
+
const pathParams = client._options.validate
|
|
506
|
+
? toPathWire(pathParamsInput, schemas.updateSubscriptionAddonPathParams)
|
|
507
|
+
: pathParamsInput;
|
|
508
|
+
if (client._options.validate) {
|
|
509
|
+
assertValid(schemas.updateSubscriptionAddonPathParamsWire, pathParams);
|
|
510
|
+
}
|
|
511
|
+
const path = `openmeter/subscriptions/${(() => {
|
|
512
|
+
if (pathParams.subscriptionId === undefined) {
|
|
513
|
+
throw new Error('missing path parameter: subscriptionId');
|
|
514
|
+
}
|
|
515
|
+
return encodeURIComponent(String(pathParams.subscriptionId));
|
|
516
|
+
})()}/addons/${(() => {
|
|
517
|
+
if (pathParams.subscriptionAddonId === undefined) {
|
|
518
|
+
throw new Error('missing path parameter: subscriptionAddonId');
|
|
519
|
+
}
|
|
520
|
+
return encodeURIComponent(String(pathParams.subscriptionAddonId));
|
|
521
|
+
})()}`;
|
|
522
|
+
const body = toWire(req.body, schemas.updateSubscriptionAddonBody);
|
|
523
|
+
if (client._options.validate) {
|
|
524
|
+
assertValid(schemas.updateSubscriptionAddonBodyWire, body);
|
|
525
|
+
}
|
|
526
|
+
return http(client)
|
|
527
|
+
.patch(path, { ...options, json: body })
|
|
528
|
+
.json()
|
|
529
|
+
.then((data) => {
|
|
530
|
+
if (client._options.validate) {
|
|
531
|
+
assertValid(schemas.updateSubscriptionAddonResponseWire, data);
|
|
532
|
+
}
|
|
533
|
+
return fromWire(data, schemas.updateSubscriptionAddonResponse);
|
|
534
|
+
});
|
|
535
|
+
});
|
|
536
|
+
}
|
package/dist/funcs/tax.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { http } from '../core.js';
|
|
3
3
|
import { request } from '../lib/request.js';
|
|
4
4
|
import { toURLSearchParams } from '../lib/encodings.js';
|
|
5
|
-
import { toWire, fromWire, assertValid } from '../lib/wire.js';
|
|
5
|
+
import { toWire, toPathWire, fromWire, assertValid } from '../lib/wire.js';
|
|
6
6
|
import * as schemas from '../models/schemas.js';
|
|
7
7
|
/**
|
|
8
8
|
* Create tax code
|
|
@@ -33,11 +33,20 @@ export function createTaxCode(client, req, options) {
|
|
|
33
33
|
*/
|
|
34
34
|
export function getTaxCode(client, req, options) {
|
|
35
35
|
return request(() => {
|
|
36
|
+
const pathParamsInput = {
|
|
37
|
+
taxCodeId: req.taxCodeId,
|
|
38
|
+
};
|
|
39
|
+
const pathParams = client._options.validate
|
|
40
|
+
? toPathWire(pathParamsInput, schemas.getTaxCodePathParams)
|
|
41
|
+
: pathParamsInput;
|
|
42
|
+
if (client._options.validate) {
|
|
43
|
+
assertValid(schemas.getTaxCodePathParamsWire, pathParams);
|
|
44
|
+
}
|
|
36
45
|
const path = `openmeter/tax-codes/${(() => {
|
|
37
|
-
if (
|
|
46
|
+
if (pathParams.taxCodeId === undefined) {
|
|
38
47
|
throw new Error('missing path parameter: taxCodeId');
|
|
39
48
|
}
|
|
40
|
-
return encodeURIComponent(String(
|
|
49
|
+
return encodeURIComponent(String(pathParams.taxCodeId));
|
|
41
50
|
})()}`;
|
|
42
51
|
return http(client)
|
|
43
52
|
.get(path, options)
|
|
@@ -83,11 +92,20 @@ export function listTaxCodes(client, req = {}, options) {
|
|
|
83
92
|
*/
|
|
84
93
|
export function upsertTaxCode(client, req, options) {
|
|
85
94
|
return request(() => {
|
|
95
|
+
const pathParamsInput = {
|
|
96
|
+
taxCodeId: req.taxCodeId,
|
|
97
|
+
};
|
|
98
|
+
const pathParams = client._options.validate
|
|
99
|
+
? toPathWire(pathParamsInput, schemas.upsertTaxCodePathParams)
|
|
100
|
+
: pathParamsInput;
|
|
101
|
+
if (client._options.validate) {
|
|
102
|
+
assertValid(schemas.upsertTaxCodePathParamsWire, pathParams);
|
|
103
|
+
}
|
|
86
104
|
const path = `openmeter/tax-codes/${(() => {
|
|
87
|
-
if (
|
|
105
|
+
if (pathParams.taxCodeId === undefined) {
|
|
88
106
|
throw new Error('missing path parameter: taxCodeId');
|
|
89
107
|
}
|
|
90
|
-
return encodeURIComponent(String(
|
|
108
|
+
return encodeURIComponent(String(pathParams.taxCodeId));
|
|
91
109
|
})()}`;
|
|
92
110
|
const body = toWire(req.body, schemas.upsertTaxCodeBody);
|
|
93
111
|
if (client._options.validate) {
|
|
@@ -111,11 +129,20 @@ export function upsertTaxCode(client, req, options) {
|
|
|
111
129
|
*/
|
|
112
130
|
export function deleteTaxCode(client, req, options) {
|
|
113
131
|
return request(async () => {
|
|
132
|
+
const pathParamsInput = {
|
|
133
|
+
taxCodeId: req.taxCodeId,
|
|
134
|
+
};
|
|
135
|
+
const pathParams = client._options.validate
|
|
136
|
+
? toPathWire(pathParamsInput, schemas.deleteTaxCodePathParams)
|
|
137
|
+
: pathParamsInput;
|
|
138
|
+
if (client._options.validate) {
|
|
139
|
+
assertValid(schemas.deleteTaxCodePathParamsWire, pathParams);
|
|
140
|
+
}
|
|
114
141
|
const path = `openmeter/tax-codes/${(() => {
|
|
115
|
-
if (
|
|
142
|
+
if (pathParams.taxCodeId === undefined) {
|
|
116
143
|
throw new Error('missing path parameter: taxCodeId');
|
|
117
144
|
}
|
|
118
|
-
return encodeURIComponent(String(
|
|
145
|
+
return encodeURIComponent(String(pathParams.taxCodeId));
|
|
119
146
|
})()}`;
|
|
120
147
|
await http(client).delete(path, options);
|
|
121
148
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export type * from './models/operations/subscriptions.js';
|
|
|
32
32
|
export type * from './models/operations/apps.js';
|
|
33
33
|
export type * from './models/operations/billing.js';
|
|
34
34
|
export type * from './models/operations/invoices.js';
|
|
35
|
+
export type * from './models/operations/charges.js';
|
|
35
36
|
export type * from './models/operations/tax.js';
|
|
36
37
|
export type * from './models/operations/currencies.js';
|
|
37
38
|
export type * from './models/operations/features.js';
|
|
@@ -40,5 +41,5 @@ export type * from './models/operations/plans.js';
|
|
|
40
41
|
export type * from './models/operations/addons.js';
|
|
41
42
|
export type * from './models/operations/planAddons.js';
|
|
42
43
|
export type * from './models/operations/defaults.js';
|
|
43
|
-
export type * from './models/operations/
|
|
44
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing, ChargeFlatFeeDiscounts, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, WorkflowCollectionAlignmentSubscription, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, InvoiceLineExternalReferences, UpdateLabels, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CurrencyFiat, ListCostBasesParamsFilter, CurrencyAmount, PriceFlat, PriceUnit, RateCardDiscounts, Totals, SpendCommitments, InvoiceLineCreditsApplied, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, FeatureManualUnitCost, FeatureLlmUnitCostPricing, LlmCostModelPricing, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateResourceReference, TaxCodeReference, CreditGrantInvoiceReference, BillingCustomerReference, SubscriptionReference, AddonReference, FeatureReference, AppReference, ChargeReference, UpdateResourceReference, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, EntitlementAccessResult, CreateCreditGrantPurchase, RateCardMeteredEntitlement, RecurringPeriod, CreditGrantPurchase, ListCreditGrantsParamsFilter, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListPlansParamsFilter, SubscriptionCreate, RateCardProrationConfiguration, Subscription, UnitConfig, AppCatalogItem, TaxCodeAppMapping, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, WorkflowInvoicingSettings, InvoiceValidationIssue, InvoiceAvailableActions, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, CurrencyCustom, CreateCurrencyCustomRequest, GovernanceQueryRequest, GovernanceFeatureAccessReason, GovernanceQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, PriceTier, ChargeTotals, UpdatePriceTier, FeatureLlmUnitCost, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, TaxConfig, RateCardTaxConfig, OrganizationDefaultTaxCodes, PlanAddon, ProfileAppReferences, InvoiceWorkflowAppsReferences, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListInvoicesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, ChargeFlatFeeSystemIntent, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, InvoiceUsageQuantityDetail, AppStripe, AppSandbox, AppExternalInvoicing, TaxCode, InvoiceWorkflow, InvoiceStatusDetails, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, GovernanceFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreditGrant, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Party, Supplier, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, TaxCodePagePaginatedResponse, InvoiceWorkflowSettings, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, CurrencyPagePaginatedResponse, GovernanceQueryResult, Feature, CreditGrantPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, AppPagePaginatedResponse, ProfileApps, GovernanceQueryResponse, ChargeFlatFee, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, RateCard, InvoiceLineRateCard, UpdateInvoiceLineRateCard, FeaturePagePaginatedResponse, Workflow, ChargeUsageBased, SubscriptionAddonRateCard, PlanPhase, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, SubscriptionAddon, Plan, UpsertPlanRequest, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, ChargePagePaginatedResponse, SubscriptionAddonPagePaginatedResponse, PlanPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, InvoicePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, SubscriptionEditTiming, WorkflowPaymentSettings, UpdateBillingWorkflowPaymentSettings, InvalidParameter, RateCardEntitlement, Currency, FeatureUnitCost, WorkflowCollectionAlignment, App, Price, UpdatePrice, CreateChargeRequest, Charge, InvoiceLine, UpdateInvoiceLine, Invoice, SortQueryInput, BaseErrorInput, WorkflowPaymentSendInvoiceSettingsInput, InvoiceWorkflowInvoicingSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, CreateCreditGrantPurchaseInput, RateCardMeteredEntitlementInput, CreditGrantPurchaseInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, GovernanceQueryRequestInput, IngestedEventInput, SubscriptionCancelInput, InvoiceUsageQuantityDetailInput, InvoiceWorkflowInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantRequestInput, CreditGrantInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreditGrantPagePaginatedResponseInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, RateCardInput, WorkflowInput, SubscriptionAddonRateCardInput, PlanPhaseInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, SubscriptionAddonInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionAddonPagePaginatedResponseInput, PlanPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, InvoicePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, InvoiceLineInput, InvoiceInput, UpdateInvoiceRequestInput, } from './models/types.js';
|
|
44
|
+
export type * from './models/operations/entitlementAccess.js';
|
|
45
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, SubscriptionCostBasisPin, FeatureReference, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ChargeResolvedCostBasis, ClosedPeriod, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, RecurringPeriod, ListCreditGrantsParamsFilter, ValidationIssue, GetCreditBalanceParamsFilter, ListPlansParamsFilter, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, CreditBalance, ListCreditTransactionsParamsFilter, CreditTransaction, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateCreditGrantTaxConfig, CreditGrantTaxConfig, RateCardTaxConfig, TaxConfig, OrganizationDefaultTaxCodes, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateRateCardTaxConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, SubscriptionEditAddPhase, WorkflowCollectionAlignmentAnchored, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, CreditBalances, CreditTransactionPaginatedResponse, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EventInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Options } from 'ky';
|
|
2
|
-
export declare const ServerList: readonly [
|
|
3
|
-
export declare const Regions: readonly [
|
|
2
|
+
export declare const ServerList: readonly ['https://{region}.api.konghq.com/v3', 'http://localhost:{port}/api/v3', 'https://openmeter.cloud/api/v3'];
|
|
3
|
+
export declare const Regions: readonly ['in', 'me', 'au', 'eu', 'us'];
|
|
4
4
|
export type Region = (typeof Regions)[number];
|
|
5
5
|
export type ServerVariables = {
|
|
6
6
|
region?: Region;
|
package/dist/lib/paginate.d.ts
CHANGED
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v1.0.0-beta.
|
|
1
|
+
export declare const SDK_VERSION = "v1.0.0-beta.233";
|
package/dist/lib/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// The committed value is a dev placeholder. The publish flow
|
|
3
3
|
// (`make -C api/spec publish-aip-sdk`) stamps the real release version here
|
|
4
4
|
// before `pnpm publish`, after `pnpm version` updates package.json.
|
|
5
|
-
export const SDK_VERSION = 'v1.0.0-beta.
|
|
5
|
+
export const SDK_VERSION = 'v1.0.0-beta.233';
|
package/dist/lib/wire.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class DepthLimitExceededError extends Error {
|
|
|
12
12
|
constructor();
|
|
13
13
|
}
|
|
14
14
|
export declare function toWire<T>(data: T, schema: ZodType): T;
|
|
15
|
+
export declare function toPathWire<T>(data: T, schema: ZodType): T;
|
|
15
16
|
export declare function fromWire<S extends ZodType>(data: unknown, schema: S): output<S>;
|
|
16
17
|
export declare class ValidationError extends Error {
|
|
17
18
|
readonly issues: unknown;
|