@openmeter/client 1.0.0-beta.231 → 1.0.0-beta.232

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.
Files changed (44) hide show
  1. package/README.md +24 -14
  2. package/dist/core.js +7 -4
  3. package/dist/funcs/addons.js +59 -11
  4. package/dist/funcs/apps.d.ts +41 -1
  5. package/dist/funcs/apps.js +164 -3
  6. package/dist/funcs/billing.js +34 -7
  7. package/dist/funcs/currencies.d.ts +9 -1
  8. package/dist/funcs/currencies.js +62 -5
  9. package/dist/funcs/customers.js +214 -43
  10. package/dist/funcs/entitlements.js +12 -3
  11. package/dist/funcs/events.js +3 -0
  12. package/dist/funcs/features.js +48 -9
  13. package/dist/funcs/invoices.d.ts +58 -1
  14. package/dist/funcs/invoices.js +202 -7
  15. package/dist/funcs/llmCost.js +26 -5
  16. package/dist/funcs/meters.js +59 -11
  17. package/dist/funcs/planAddons.js +65 -17
  18. package/dist/funcs/plans.js +59 -11
  19. package/dist/funcs/subscriptions.js +87 -17
  20. package/dist/funcs/tax.js +34 -7
  21. package/dist/index.d.ts +1 -2
  22. package/dist/index.js +0 -1
  23. package/dist/lib/config.d.ts +2 -2
  24. package/dist/lib/paginate.d.ts +1 -1
  25. package/dist/lib/version.d.ts +1 -1
  26. package/dist/lib/version.js +1 -1
  27. package/dist/lib/wire.d.ts +1 -0
  28. package/dist/lib/wire.js +26 -4
  29. package/dist/models/operations/apps.d.ts +25 -1
  30. package/dist/models/operations/currencies.d.ts +10 -0
  31. package/dist/models/operations/customers.d.ts +2 -1
  32. package/dist/models/operations/invoices.d.ts +16 -0
  33. package/dist/models/schemas.d.ts +15256 -9856
  34. package/dist/models/schemas.js +938 -447
  35. package/dist/models/types.d.ts +503 -259
  36. package/dist/sdk/apps.d.ts +44 -2
  37. package/dist/sdk/apps.js +53 -1
  38. package/dist/sdk/internal.d.ts +151 -3
  39. package/dist/sdk/internal.js +182 -2
  40. package/dist/sdk/invoices.d.ts +15 -0
  41. package/dist/sdk/invoices.js +32 -0
  42. package/dist/sdk/sdk.d.ts +0 -3
  43. package/dist/sdk/sdk.js +0 -5
  44. package/package.json +3 -3
@@ -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
  * List add-ons for plan
@@ -13,11 +13,20 @@ import * as schemas from '../models/schemas.js';
13
13
  */
14
14
  export function listPlanAddons(client, req, options) {
15
15
  return request(() => {
16
+ const pathParamsInput = {
17
+ planId: req.planId,
18
+ };
19
+ const pathParams = client._options.validate
20
+ ? toPathWire(pathParamsInput, schemas.listPlanAddonsPathParams)
21
+ : pathParamsInput;
22
+ if (client._options.validate) {
23
+ assertValid(schemas.listPlanAddonsPathParamsWire, pathParams);
24
+ }
16
25
  const path = `openmeter/plans/${(() => {
17
- if (req.planId === undefined) {
26
+ if (pathParams.planId === undefined) {
18
27
  throw new Error('missing path parameter: planId');
19
28
  }
20
- return encodeURIComponent(String(req.planId));
29
+ return encodeURIComponent(String(pathParams.planId));
21
30
  })()}/addons`;
22
31
  const query = toWire({
23
32
  page: req.page,
@@ -46,11 +55,20 @@ export function listPlanAddons(client, req, options) {
46
55
  */
47
56
  export function createPlanAddon(client, req, options) {
48
57
  return request(() => {
58
+ const pathParamsInput = {
59
+ planId: req.planId,
60
+ };
61
+ const pathParams = client._options.validate
62
+ ? toPathWire(pathParamsInput, schemas.createPlanAddonPathParams)
63
+ : pathParamsInput;
64
+ if (client._options.validate) {
65
+ assertValid(schemas.createPlanAddonPathParamsWire, pathParams);
66
+ }
49
67
  const path = `openmeter/plans/${(() => {
50
- if (req.planId === undefined) {
68
+ if (pathParams.planId === undefined) {
51
69
  throw new Error('missing path parameter: planId');
52
70
  }
53
- return encodeURIComponent(String(req.planId));
71
+ return encodeURIComponent(String(pathParams.planId));
54
72
  })()}/addons`;
55
73
  const body = toWire(req.body, schemas.createPlanAddonBody);
56
74
  if (client._options.validate) {
@@ -76,16 +94,26 @@ export function createPlanAddon(client, req, options) {
76
94
  */
77
95
  export function getPlanAddon(client, req, options) {
78
96
  return request(() => {
97
+ const pathParamsInput = {
98
+ planId: req.planId,
99
+ planAddonId: req.planAddonId,
100
+ };
101
+ const pathParams = client._options.validate
102
+ ? toPathWire(pathParamsInput, schemas.getPlanAddonPathParams)
103
+ : pathParamsInput;
104
+ if (client._options.validate) {
105
+ assertValid(schemas.getPlanAddonPathParamsWire, pathParams);
106
+ }
79
107
  const path = `openmeter/plans/${(() => {
80
- if (req.planId === undefined) {
108
+ if (pathParams.planId === undefined) {
81
109
  throw new Error('missing path parameter: planId');
82
110
  }
83
- return encodeURIComponent(String(req.planId));
111
+ return encodeURIComponent(String(pathParams.planId));
84
112
  })()}/addons/${(() => {
85
- if (req.planAddonId === undefined) {
113
+ if (pathParams.planAddonId === undefined) {
86
114
  throw new Error('missing path parameter: planAddonId');
87
115
  }
88
- return encodeURIComponent(String(req.planAddonId));
116
+ return encodeURIComponent(String(pathParams.planAddonId));
89
117
  })()}`;
90
118
  return http(client)
91
119
  .get(path, options)
@@ -107,16 +135,26 @@ export function getPlanAddon(client, req, options) {
107
135
  */
108
136
  export function updatePlanAddon(client, req, options) {
109
137
  return request(() => {
138
+ const pathParamsInput = {
139
+ planId: req.planId,
140
+ planAddonId: req.planAddonId,
141
+ };
142
+ const pathParams = client._options.validate
143
+ ? toPathWire(pathParamsInput, schemas.updatePlanAddonPathParams)
144
+ : pathParamsInput;
145
+ if (client._options.validate) {
146
+ assertValid(schemas.updatePlanAddonPathParamsWire, pathParams);
147
+ }
110
148
  const path = `openmeter/plans/${(() => {
111
- if (req.planId === undefined) {
149
+ if (pathParams.planId === undefined) {
112
150
  throw new Error('missing path parameter: planId');
113
151
  }
114
- return encodeURIComponent(String(req.planId));
152
+ return encodeURIComponent(String(pathParams.planId));
115
153
  })()}/addons/${(() => {
116
- if (req.planAddonId === undefined) {
154
+ if (pathParams.planAddonId === undefined) {
117
155
  throw new Error('missing path parameter: planAddonId');
118
156
  }
119
- return encodeURIComponent(String(req.planAddonId));
157
+ return encodeURIComponent(String(pathParams.planAddonId));
120
158
  })()}`;
121
159
  const body = toWire(req.body, schemas.updatePlanAddonBody);
122
160
  if (client._options.validate) {
@@ -142,16 +180,26 @@ export function updatePlanAddon(client, req, options) {
142
180
  */
143
181
  export function deletePlanAddon(client, req, options) {
144
182
  return request(async () => {
183
+ const pathParamsInput = {
184
+ planId: req.planId,
185
+ planAddonId: req.planAddonId,
186
+ };
187
+ const pathParams = client._options.validate
188
+ ? toPathWire(pathParamsInput, schemas.deletePlanAddonPathParams)
189
+ : pathParamsInput;
190
+ if (client._options.validate) {
191
+ assertValid(schemas.deletePlanAddonPathParamsWire, pathParams);
192
+ }
145
193
  const path = `openmeter/plans/${(() => {
146
- if (req.planId === undefined) {
194
+ if (pathParams.planId === undefined) {
147
195
  throw new Error('missing path parameter: planId');
148
196
  }
149
- return encodeURIComponent(String(req.planId));
197
+ return encodeURIComponent(String(pathParams.planId));
150
198
  })()}/addons/${(() => {
151
- if (req.planAddonId === undefined) {
199
+ if (pathParams.planAddonId === undefined) {
152
200
  throw new Error('missing path parameter: planAddonId');
153
201
  }
154
- return encodeURIComponent(String(req.planAddonId));
202
+ return encodeURIComponent(String(pathParams.planAddonId));
155
203
  })()}`;
156
204
  await http(client).delete(path, options);
157
205
  });
@@ -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
  * List plans
@@ -13,6 +13,9 @@ import * as schemas from '../models/schemas.js';
13
13
  */
14
14
  export function listPlans(client, req = {}, options) {
15
15
  return request(() => {
16
+ if (client._options.validate && req.sort !== undefined) {
17
+ assertValid(schemas.listPlansQueryParams.shape.sort, req.sort);
18
+ }
16
19
  const query = toWire({
17
20
  page: req.page,
18
21
  sort: encodeSort(req.sort, toSnakeCase),
@@ -66,11 +69,20 @@ export function createPlan(client, req, options) {
66
69
  */
67
70
  export function updatePlan(client, req, options) {
68
71
  return request(() => {
72
+ const pathParamsInput = {
73
+ planId: req.planId,
74
+ };
75
+ const pathParams = client._options.validate
76
+ ? toPathWire(pathParamsInput, schemas.updatePlanPathParams)
77
+ : pathParamsInput;
78
+ if (client._options.validate) {
79
+ assertValid(schemas.updatePlanPathParamsWire, pathParams);
80
+ }
69
81
  const path = `openmeter/plans/${(() => {
70
- if (req.planId === undefined) {
82
+ if (pathParams.planId === undefined) {
71
83
  throw new Error('missing path parameter: planId');
72
84
  }
73
- return encodeURIComponent(String(req.planId));
85
+ return encodeURIComponent(String(pathParams.planId));
74
86
  })()}`;
75
87
  const body = toWire(req.body, schemas.updatePlanBody);
76
88
  if (client._options.validate) {
@@ -96,11 +108,20 @@ export function updatePlan(client, req, options) {
96
108
  */
97
109
  export function getPlan(client, req, options) {
98
110
  return request(() => {
111
+ const pathParamsInput = {
112
+ planId: req.planId,
113
+ };
114
+ const pathParams = client._options.validate
115
+ ? toPathWire(pathParamsInput, schemas.getPlanPathParams)
116
+ : pathParamsInput;
117
+ if (client._options.validate) {
118
+ assertValid(schemas.getPlanPathParamsWire, pathParams);
119
+ }
99
120
  const path = `openmeter/plans/${(() => {
100
- if (req.planId === undefined) {
121
+ if (pathParams.planId === undefined) {
101
122
  throw new Error('missing path parameter: planId');
102
123
  }
103
- return encodeURIComponent(String(req.planId));
124
+ return encodeURIComponent(String(pathParams.planId));
104
125
  })()}`;
105
126
  return http(client)
106
127
  .get(path, options)
@@ -122,11 +143,20 @@ export function getPlan(client, req, options) {
122
143
  */
123
144
  export function deletePlan(client, req, options) {
124
145
  return request(async () => {
146
+ const pathParamsInput = {
147
+ planId: req.planId,
148
+ };
149
+ const pathParams = client._options.validate
150
+ ? toPathWire(pathParamsInput, schemas.deletePlanPathParams)
151
+ : pathParamsInput;
152
+ if (client._options.validate) {
153
+ assertValid(schemas.deletePlanPathParamsWire, pathParams);
154
+ }
125
155
  const path = `openmeter/plans/${(() => {
126
- if (req.planId === undefined) {
156
+ if (pathParams.planId === undefined) {
127
157
  throw new Error('missing path parameter: planId');
128
158
  }
129
- return encodeURIComponent(String(req.planId));
159
+ return encodeURIComponent(String(pathParams.planId));
130
160
  })()}`;
131
161
  await http(client).delete(path, options);
132
162
  });
@@ -140,11 +170,20 @@ export function deletePlan(client, req, options) {
140
170
  */
141
171
  export function archivePlan(client, req, options) {
142
172
  return request(() => {
173
+ const pathParamsInput = {
174
+ planId: req.planId,
175
+ };
176
+ const pathParams = client._options.validate
177
+ ? toPathWire(pathParamsInput, schemas.archivePlanPathParams)
178
+ : pathParamsInput;
179
+ if (client._options.validate) {
180
+ assertValid(schemas.archivePlanPathParamsWire, pathParams);
181
+ }
143
182
  const path = `openmeter/plans/${(() => {
144
- if (req.planId === undefined) {
183
+ if (pathParams.planId === undefined) {
145
184
  throw new Error('missing path parameter: planId');
146
185
  }
147
- return encodeURIComponent(String(req.planId));
186
+ return encodeURIComponent(String(pathParams.planId));
148
187
  })()}/archive`;
149
188
  return http(client)
150
189
  .post(path, options)
@@ -166,11 +205,20 @@ export function archivePlan(client, req, options) {
166
205
  */
167
206
  export function publishPlan(client, req, options) {
168
207
  return request(() => {
208
+ const pathParamsInput = {
209
+ planId: req.planId,
210
+ };
211
+ const pathParams = client._options.validate
212
+ ? toPathWire(pathParamsInput, schemas.publishPlanPathParams)
213
+ : pathParamsInput;
214
+ if (client._options.validate) {
215
+ assertValid(schemas.publishPlanPathParamsWire, pathParams);
216
+ }
169
217
  const path = `openmeter/plans/${(() => {
170
- if (req.planId === undefined) {
218
+ if (pathParams.planId === undefined) {
171
219
  throw new Error('missing path parameter: planId');
172
220
  }
173
- return encodeURIComponent(String(req.planId));
221
+ return encodeURIComponent(String(pathParams.planId));
174
222
  })()}/publish`;
175
223
  return http(client)
176
224
  .post(path, options)
@@ -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 (req.subscriptionId === undefined) {
76
+ if (pathParams.subscriptionId === undefined) {
65
77
  throw new Error('missing path parameter: subscriptionId');
66
78
  }
67
- return encodeURIComponent(String(req.subscriptionId));
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 (req.subscriptionId === undefined) {
112
+ if (pathParams.subscriptionId === undefined) {
92
113
  throw new Error('missing path parameter: subscriptionId');
93
114
  }
94
- return encodeURIComponent(String(req.subscriptionId));
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 (req.subscriptionId === undefined) {
151
+ if (pathParams.subscriptionId === undefined) {
122
152
  throw new Error('missing path parameter: subscriptionId');
123
153
  }
124
- return encodeURIComponent(String(req.subscriptionId));
154
+ return encodeURIComponent(String(pathParams.subscriptionId));
125
155
  })()}/unschedule-cancelation`;
126
156
  return http(client)
127
157
  .post(path, options)
@@ -144,11 +174,20 @@ export function unscheduleCancelation(client, req, options) {
144
174
  */
145
175
  export function changeSubscription(client, req, options) {
146
176
  return request(() => {
177
+ const pathParamsInput = {
178
+ subscriptionId: req.subscriptionId,
179
+ };
180
+ const pathParams = client._options.validate
181
+ ? toPathWire(pathParamsInput, schemas.changeSubscriptionPathParams)
182
+ : pathParamsInput;
183
+ if (client._options.validate) {
184
+ assertValid(schemas.changeSubscriptionPathParamsWire, pathParams);
185
+ }
147
186
  const path = `openmeter/subscriptions/${(() => {
148
- if (req.subscriptionId === undefined) {
187
+ if (pathParams.subscriptionId === undefined) {
149
188
  throw new Error('missing path parameter: subscriptionId');
150
189
  }
151
- return encodeURIComponent(String(req.subscriptionId));
190
+ return encodeURIComponent(String(pathParams.subscriptionId));
152
191
  })()}/change`;
153
192
  const body = toWire(req.body, schemas.changeSubscriptionBody);
154
193
  if (client._options.validate) {
@@ -174,11 +213,20 @@ export function changeSubscription(client, req, options) {
174
213
  */
175
214
  export function createSubscriptionAddon(client, req, options) {
176
215
  return request(() => {
216
+ const pathParamsInput = {
217
+ subscriptionId: req.subscriptionId,
218
+ };
219
+ const pathParams = client._options.validate
220
+ ? toPathWire(pathParamsInput, schemas.createSubscriptionAddonPathParams)
221
+ : pathParamsInput;
222
+ if (client._options.validate) {
223
+ assertValid(schemas.createSubscriptionAddonPathParamsWire, pathParams);
224
+ }
177
225
  const path = `openmeter/subscriptions/${(() => {
178
- if (req.subscriptionId === undefined) {
226
+ if (pathParams.subscriptionId === undefined) {
179
227
  throw new Error('missing path parameter: subscriptionId');
180
228
  }
181
- return encodeURIComponent(String(req.subscriptionId));
229
+ return encodeURIComponent(String(pathParams.subscriptionId));
182
230
  })()}/addons`;
183
231
  const body = toWire(req.body, schemas.createSubscriptionAddonBody);
184
232
  if (client._options.validate) {
@@ -204,12 +252,24 @@ export function createSubscriptionAddon(client, req, options) {
204
252
  */
205
253
  export function listSubscriptionAddons(client, req, options) {
206
254
  return request(() => {
255
+ const pathParamsInput = {
256
+ subscriptionId: req.subscriptionId,
257
+ };
258
+ const pathParams = client._options.validate
259
+ ? toPathWire(pathParamsInput, schemas.listSubscriptionAddonsPathParams)
260
+ : pathParamsInput;
261
+ if (client._options.validate) {
262
+ assertValid(schemas.listSubscriptionAddonsPathParamsWire, pathParams);
263
+ }
207
264
  const path = `openmeter/subscriptions/${(() => {
208
- if (req.subscriptionId === undefined) {
265
+ if (pathParams.subscriptionId === undefined) {
209
266
  throw new Error('missing path parameter: subscriptionId');
210
267
  }
211
- return encodeURIComponent(String(req.subscriptionId));
268
+ return encodeURIComponent(String(pathParams.subscriptionId));
212
269
  })()}/addons`;
270
+ if (client._options.validate && req.sort !== undefined) {
271
+ assertValid(schemas.listSubscriptionAddonsQueryParams.shape.sort, req.sort);
272
+ }
213
273
  const query = toWire({
214
274
  page: req.page,
215
275
  sort: encodeSort(req.sort, toSnakeCase),
@@ -238,16 +298,26 @@ export function listSubscriptionAddons(client, req, options) {
238
298
  */
239
299
  export function getSubscriptionAddon(client, req, options) {
240
300
  return request(() => {
301
+ const pathParamsInput = {
302
+ subscriptionId: req.subscriptionId,
303
+ subscriptionAddonId: req.subscriptionAddonId,
304
+ };
305
+ const pathParams = client._options.validate
306
+ ? toPathWire(pathParamsInput, schemas.getSubscriptionAddonPathParams)
307
+ : pathParamsInput;
308
+ if (client._options.validate) {
309
+ assertValid(schemas.getSubscriptionAddonPathParamsWire, pathParams);
310
+ }
241
311
  const path = `openmeter/subscriptions/${(() => {
242
- if (req.subscriptionId === undefined) {
312
+ if (pathParams.subscriptionId === undefined) {
243
313
  throw new Error('missing path parameter: subscriptionId');
244
314
  }
245
- return encodeURIComponent(String(req.subscriptionId));
315
+ return encodeURIComponent(String(pathParams.subscriptionId));
246
316
  })()}/addons/${(() => {
247
- if (req.subscriptionAddonId === undefined) {
317
+ if (pathParams.subscriptionAddonId === undefined) {
248
318
  throw new Error('missing path parameter: subscriptionAddonId');
249
319
  }
250
- return encodeURIComponent(String(req.subscriptionAddonId));
320
+ return encodeURIComponent(String(pathParams.subscriptionAddonId));
251
321
  })()}`;
252
322
  return http(client)
253
323
  .get(path, options)
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 (req.taxCodeId === undefined) {
46
+ if (pathParams.taxCodeId === undefined) {
38
47
  throw new Error('missing path parameter: taxCodeId');
39
48
  }
40
- return encodeURIComponent(String(req.taxCodeId));
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 (req.taxCodeId === undefined) {
105
+ if (pathParams.taxCodeId === undefined) {
88
106
  throw new Error('missing path parameter: taxCodeId');
89
107
  }
90
- return encodeURIComponent(String(req.taxCodeId));
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 (req.taxCodeId === undefined) {
142
+ if (pathParams.taxCodeId === undefined) {
116
143
  throw new Error('missing path parameter: taxCodeId');
117
144
  }
118
- return encodeURIComponent(String(req.taxCodeId));
145
+ return encodeURIComponent(String(pathParams.taxCodeId));
119
146
  })()}`;
120
147
  await http(client).delete(path, options);
121
148
  });
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export { Meters } from './sdk/meters.js';
4
4
  export { Customers } from './sdk/customers.js';
5
5
  export { Entitlements } from './sdk/entitlements.js';
6
6
  export { Subscriptions } from './sdk/subscriptions.js';
7
- export { Apps } from './sdk/apps.js';
8
7
  export { Billing } from './sdk/billing.js';
9
8
  export { Tax } from './sdk/tax.js';
10
9
  export { Features } from './sdk/features.js';
@@ -41,4 +40,4 @@ export type * from './models/operations/addons.js';
41
40
  export type * from './models/operations/planAddons.js';
42
41
  export type * from './models/operations/defaults.js';
43
42
  export type * from './models/operations/governance.js';
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';
43
+ export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, TaxConfigStripe, TaxConfigExternalInvoicing, ChargeFlatFeeDiscounts, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, GovernanceQueryRequestCustomers, GovernanceQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, 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, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, WorkflowInvoicingSettings, InvoiceValidationIssue, InvoiceAvailableActions, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, 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, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, ListCustomerEntitlementAccessResponseData, WorkflowCollectionAlignmentAnchored, ChargeFlatFeeSystemIntent, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionCancel, SubscriptionChange, InvoiceUsageQuantityDetail, TaxCode, AppCatalogItem, 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, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InvoiceWorkflowSettings, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, GovernanceQueryResult, Feature, CreditGrantPagePaginatedResponse, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, WorkflowCollectionSettings, GovernanceQueryResponse, ChargeFlatFee, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, RateCard, InvoiceLineRateCard, UpdateInvoiceLineRateCard, FeaturePagePaginatedResponse, Workflow, AppPagePaginatedResponse, BillingInstallAppResponse, ProfileApps, 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, FeatureUnitCost, Currency, WorkflowCollectionAlignment, Price, UpdatePrice, App, 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, InvoiceLineRateCardInput, 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';
package/dist/index.js CHANGED
@@ -5,7 +5,6 @@ export { Meters } from './sdk/meters.js';
5
5
  export { Customers } from './sdk/customers.js';
6
6
  export { Entitlements } from './sdk/entitlements.js';
7
7
  export { Subscriptions } from './sdk/subscriptions.js';
8
- export { Apps } from './sdk/apps.js';
9
8
  export { Billing } from './sdk/billing.js';
10
9
  export { Tax } from './sdk/tax.js';
11
10
  export { Features } from './sdk/features.js';
@@ -1,6 +1,6 @@
1
1
  import { type Options } from 'ky';
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"];
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;
@@ -33,7 +33,7 @@ interface CursorEnvelope<TItem> {
33
33
  data: TItem[];
34
34
  meta: {
35
35
  page: {
36
- next?: string;
36
+ next: string | null;
37
37
  };
38
38
  };
39
39
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v1.0.0-beta.231";
1
+ export declare const SDK_VERSION = "v1.0.0-beta.232";
@@ -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.231';
5
+ export const SDK_VERSION = 'v1.0.0-beta.232';
@@ -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;