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

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 (137) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +347 -68
  3. package/dist/core.d.ts +0 -1
  4. package/dist/core.js +8 -1
  5. package/dist/funcs/addons.d.ts +49 -1
  6. package/dist/funcs/addons.js +50 -1
  7. package/dist/funcs/apps.d.ts +14 -1
  8. package/dist/funcs/apps.js +15 -1
  9. package/dist/funcs/billing.d.ts +46 -1
  10. package/dist/funcs/billing.js +47 -1
  11. package/dist/funcs/currencies.d.ts +30 -1
  12. package/dist/funcs/currencies.js +31 -1
  13. package/dist/funcs/customers.d.ts +165 -2
  14. package/dist/funcs/customers.js +192 -1
  15. package/dist/funcs/defaults.d.ts +10 -1
  16. package/dist/funcs/defaults.js +11 -1
  17. package/dist/funcs/entitlements.d.ts +5 -1
  18. package/dist/funcs/entitlements.js +6 -1
  19. package/dist/funcs/events.d.ts +14 -1
  20. package/dist/funcs/events.js +15 -1
  21. package/dist/funcs/features.d.ts +42 -1
  22. package/dist/funcs/features.js +43 -1
  23. package/dist/funcs/governance.d.ts +14 -1
  24. package/dist/funcs/governance.js +15 -1
  25. package/dist/funcs/index.d.ts +0 -1
  26. package/dist/funcs/index.js +1 -1
  27. package/dist/funcs/invoices.d.ts +44 -1
  28. package/dist/funcs/invoices.js +45 -1
  29. package/dist/funcs/llmCost.d.ts +36 -1
  30. package/dist/funcs/llmCost.js +37 -1
  31. package/dist/funcs/meters.d.ts +53 -1
  32. package/dist/funcs/meters.js +54 -1
  33. package/dist/funcs/planAddons.d.ts +35 -1
  34. package/dist/funcs/planAddons.js +36 -1
  35. package/dist/funcs/plans.d.ts +49 -1
  36. package/dist/funcs/plans.js +50 -1
  37. package/dist/funcs/subscriptions.d.ts +59 -1
  38. package/dist/funcs/subscriptions.js +60 -1
  39. package/dist/funcs/tax.d.ts +25 -1
  40. package/dist/funcs/tax.js +26 -1
  41. package/dist/index.d.ts +4 -6
  42. package/dist/index.js +4 -5
  43. package/dist/lib/config.d.ts +0 -1
  44. package/dist/lib/config.js +1 -1
  45. package/dist/lib/encodings.d.ts +0 -1
  46. package/dist/lib/encodings.js +1 -1
  47. package/dist/lib/paginate.d.ts +56 -0
  48. package/dist/lib/paginate.js +60 -0
  49. package/dist/lib/request.d.ts +0 -1
  50. package/dist/lib/request.js +1 -1
  51. package/dist/lib/to-error.d.ts +0 -1
  52. package/dist/lib/to-error.js +1 -1
  53. package/dist/lib/types.d.ts +0 -1
  54. package/dist/lib/types.js +1 -1
  55. package/dist/lib/version.d.ts +1 -0
  56. package/dist/lib/version.js +5 -0
  57. package/dist/lib/wire.d.ts +3 -1
  58. package/dist/lib/wire.js +93 -4
  59. package/dist/models/errors.d.ts +13 -2
  60. package/dist/models/errors.js +31 -4
  61. package/dist/models/operations/addons.d.ts +0 -1
  62. package/dist/models/operations/addons.js +1 -1
  63. package/dist/models/operations/apps.d.ts +2 -5
  64. package/dist/models/operations/apps.js +1 -1
  65. package/dist/models/operations/billing.d.ts +0 -1
  66. package/dist/models/operations/billing.js +1 -1
  67. package/dist/models/operations/currencies.d.ts +0 -1
  68. package/dist/models/operations/currencies.js +1 -1
  69. package/dist/models/operations/customers.d.ts +9 -6
  70. package/dist/models/operations/customers.js +1 -1
  71. package/dist/models/operations/defaults.d.ts +0 -1
  72. package/dist/models/operations/defaults.js +1 -1
  73. package/dist/models/operations/entitlements.d.ts +0 -1
  74. package/dist/models/operations/entitlements.js +1 -1
  75. package/dist/models/operations/events.d.ts +0 -1
  76. package/dist/models/operations/events.js +1 -1
  77. package/dist/models/operations/features.d.ts +0 -1
  78. package/dist/models/operations/features.js +1 -1
  79. package/dist/models/operations/governance.d.ts +0 -1
  80. package/dist/models/operations/governance.js +1 -1
  81. package/dist/models/operations/invoices.d.ts +4 -7
  82. package/dist/models/operations/invoices.js +1 -1
  83. package/dist/models/operations/llmCost.d.ts +0 -1
  84. package/dist/models/operations/llmCost.js +1 -1
  85. package/dist/models/operations/meters.d.ts +0 -1
  86. package/dist/models/operations/meters.js +1 -1
  87. package/dist/models/operations/planAddons.d.ts +0 -1
  88. package/dist/models/operations/planAddons.js +1 -1
  89. package/dist/models/operations/plans.d.ts +0 -1
  90. package/dist/models/operations/plans.js +1 -1
  91. package/dist/models/operations/subscriptions.d.ts +0 -1
  92. package/dist/models/operations/subscriptions.js +1 -1
  93. package/dist/models/operations/tax.d.ts +0 -1
  94. package/dist/models/operations/tax.js +1 -1
  95. package/dist/models/schemas.d.ts +162 -1
  96. package/dist/models/schemas.js +37 -5
  97. package/dist/models/types.d.ts +464 -577
  98. package/dist/models/types.js +1 -1
  99. package/dist/sdk/addons.d.ts +60 -1
  100. package/dist/sdk/addons.js +63 -1
  101. package/dist/sdk/apps.d.ts +25 -1
  102. package/dist/sdk/apps.js +28 -1
  103. package/dist/sdk/billing.d.ts +57 -1
  104. package/dist/sdk/billing.js +60 -1
  105. package/dist/sdk/customers.d.ts +211 -2
  106. package/dist/sdk/customers.js +222 -2
  107. package/dist/sdk/defaults.d.ts +10 -1
  108. package/dist/sdk/defaults.js +11 -1
  109. package/dist/sdk/entitlements.d.ts +5 -1
  110. package/dist/sdk/entitlements.js +6 -1
  111. package/dist/sdk/events.d.ts +25 -1
  112. package/dist/sdk/events.js +28 -1
  113. package/dist/sdk/features.d.ts +53 -1
  114. package/dist/sdk/features.js +56 -1
  115. package/dist/sdk/internal.d.ts +180 -0
  116. package/dist/sdk/internal.js +224 -0
  117. package/dist/sdk/llmCost.d.ts +57 -1
  118. package/dist/sdk/llmCost.js +62 -1
  119. package/dist/sdk/meters.d.ts +64 -1
  120. package/dist/sdk/meters.js +67 -1
  121. package/dist/sdk/planAddons.d.ts +46 -1
  122. package/dist/sdk/planAddons.js +49 -1
  123. package/dist/sdk/plans.d.ts +60 -1
  124. package/dist/sdk/plans.js +63 -1
  125. package/dist/sdk/sdk.d.ts +9 -10
  126. package/dist/sdk/sdk.js +11 -15
  127. package/dist/sdk/subscriptions.d.ts +72 -3
  128. package/dist/sdk/subscriptions.js +77 -5
  129. package/dist/sdk/tax.d.ts +34 -1
  130. package/dist/sdk/tax.js +37 -1
  131. package/package.json +28 -4
  132. package/dist/sdk/currencies.d.ts +0 -12
  133. package/dist/sdk/currencies.js +0 -21
  134. package/dist/sdk/governance.d.ts +0 -9
  135. package/dist/sdk/governance.js +0 -12
  136. package/dist/sdk/invoices.d.ts +0 -12
  137. package/dist/sdk/invoices.js +0 -21
@@ -1,2 +1 @@
1
1
  export declare function toError(e: unknown): Promise<Error>;
2
- //# sourceMappingURL=to-error.d.ts.map
@@ -1,3 +1,4 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  import { HTTPError as KyHTTPError } from 'ky';
2
3
  import * as schemas from '../models/schemas.js';
3
4
  import { HTTPError } from '../models/errors.js';
@@ -13,4 +14,3 @@ export async function toError(e) {
13
14
  }
14
15
  return new Error(String(e));
15
16
  }
16
- //# sourceMappingURL=to-error.js.map
@@ -12,4 +12,3 @@ export type Result<T, E = Error> = {
12
12
  export declare function ok<T>(value: T): Result<T, never>;
13
13
  export declare function err<E>(error: E): Result<never, E>;
14
14
  export declare function unwrap<T, E>(result: Result<T, E>): T;
15
- //# sourceMappingURL=types.d.ts.map
package/dist/lib/types.js CHANGED
@@ -1,3 +1,4 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export function ok(value) {
2
3
  return { ok: true, value };
3
4
  }
@@ -10,4 +11,3 @@ export function unwrap(result) {
10
11
  }
11
12
  throw result.error;
12
13
  }
13
- //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "v1.0.0-beta.231";
@@ -0,0 +1,5 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ // The committed value is a dev placeholder. The publish flow
3
+ // (`make -C api/spec publish-aip-sdk`) stamps the real release version here
4
+ // before `pnpm publish`, after `pnpm version` updates package.json.
5
+ export const SDK_VERSION = 'v1.0.0-beta.231';
@@ -1,6 +1,9 @@
1
1
  import type { output, ZodType } from 'zod';
2
2
  export declare function toCamelCase(name: string): string;
3
3
  export declare function toSnakeCase(name: string): string;
4
+ export declare class UnsafeIntegerError extends Error {
5
+ constructor(value: bigint);
6
+ }
4
7
  export type DateString = string & Record<never, never>;
5
8
  export type AcceptDateStrings<T> = T extends Date ? Date | DateString : T extends (infer E)[] ? AcceptDateStrings<E>[] : T extends object ? {
6
9
  [K in keyof T]: AcceptDateStrings<T[K]>;
@@ -15,4 +18,3 @@ export declare class ValidationError extends Error {
15
18
  constructor(message: string, issues: unknown);
16
19
  }
17
20
  export declare function assertValid(schema: ZodType, data: unknown): void;
18
- //# sourceMappingURL=wire.d.ts.map
package/dist/lib/wire.js CHANGED
@@ -1,3 +1,4 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export function toCamelCase(name) {
2
3
  return name.replace(/_([a-z0-9])/g, (_m, c) => c.toUpperCase());
3
4
  }
@@ -27,6 +28,38 @@ function unwrap(schema) {
27
28
  /* v8 ignore next -- loop returns inside; reached only past the cycle guard */
28
29
  return current;
29
30
  }
31
+ // The default to write for a field the caller omitted, present only when the
32
+ // field is required-with-default in the spec — emitted as `.default(x)` with no
33
+ // `.optional()` in the wrapper chain (TypeSpec `field: T = x`, not
34
+ // `field?: T = x`). Such fields must be present on the wire (e.g. a CloudEvents
35
+ // envelope's `specversion`, which the server's parser rejects when absent), yet
36
+ // the generated request type allows omitting them so callers get the documented
37
+ // default for free — toWire is the layer that has to reconcile the two.
38
+ // Spec-optional fields (`.optional().default(x)`) return undefined and stay off
39
+ // the wire: their default is the server's to apply, and materializing them
40
+ // client-side would silently overwrite server state on update requests.
41
+ function requiredDefault(schema) {
42
+ let current = schema;
43
+ let found;
44
+ for (let i = 0; i < 100 && current; i++) {
45
+ const d = def(current);
46
+ /* v8 ignore next 3 -- every zod schema carries a def; guards the type only */
47
+ if (!d) {
48
+ break;
49
+ }
50
+ if (d.type === 'optional') {
51
+ return undefined;
52
+ }
53
+ if (d.type === 'default') {
54
+ found ??= { value: d.defaultValue };
55
+ }
56
+ else if (d.type !== 'nullable') {
57
+ break;
58
+ }
59
+ current = d.innerType;
60
+ }
61
+ return found;
62
+ }
30
63
  function shapeOf(schema) {
31
64
  return schema?.shape;
32
65
  }
@@ -60,7 +93,10 @@ function needsWalk(schema) {
60
93
  if (!d) {
61
94
  return false;
62
95
  }
63
- if (d.type === 'object' || d.type === 'record' || d.type === 'date') {
96
+ if (d.type === 'object' ||
97
+ d.type === 'record' ||
98
+ d.type === 'date' ||
99
+ d.type === 'bigint') {
64
100
  return true;
65
101
  }
66
102
  if (d.type === 'array') {
@@ -71,6 +107,18 @@ function needsWalk(schema) {
71
107
  }
72
108
  return false;
73
109
  }
110
+ // Thrown by toWire when a bigint value (an int64/uint64 field) is outside
111
+ // JSON's exactly-representable integer range. The wire carries int64 as a JSON
112
+ // number (the server decodes it into a Go int64), so a value beyond 2^53-1
113
+ // cannot be sent without silent precision corruption — a typed, immediate
114
+ // failure is the only honest option. request() catches it like any Error and
115
+ // surfaces it as Result.error.
116
+ export class UnsafeIntegerError extends Error {
117
+ constructor(value) {
118
+ super(`bigint value ${value} exceeds JSON's safe integer range and cannot be sent without precision loss`);
119
+ this.name = 'UnsafeIntegerError';
120
+ }
121
+ }
74
122
  const _literalsSurviveWidening = true;
75
123
  void _literalsSurviveWidening;
76
124
  // A handful of schemas are genuinely self-referential (e.g. the `and`/`or`
@@ -95,10 +143,15 @@ function walk(data, schema, dir, depth = 0) {
95
143
  // A Date can only ever mean its wire serialization, wherever it sits — a
96
144
  // typed date field, a record value, or an unknown-schema position. Wire→
97
145
  // public data never contains Date instances (it comes from JSON.parse), so
98
- // this only rewrites public→wire.
146
+ // this only rewrites public→wire. The same holds for bigint: JSON.parse
147
+ // never produces one, and public→wire it must become a JSON number wherever
148
+ // it sits.
99
149
  if (data instanceof Date) {
100
150
  return dir.mapDate(data);
101
151
  }
152
+ if (typeof data === 'bigint') {
153
+ return dir.mapBigInt(data);
154
+ }
102
155
  if (depth > MAX_WALK_DEPTH) {
103
156
  throw new DepthLimitExceededError();
104
157
  }
@@ -110,6 +163,12 @@ function walk(data, schema, dir, depth = 0) {
110
163
  if (d?.type === 'date') {
111
164
  return dir.mapDate(data);
112
165
  }
166
+ // A bigint-typed node revives the wire's JSON number into the public
167
+ // `bigint` (public→wire bigints were already mapped by the value check
168
+ // above, so only fromWire reaches a number here).
169
+ if (d?.type === 'bigint') {
170
+ return dir.mapBigInt(data);
171
+ }
113
172
  if (Array.isArray(data)) {
114
173
  // The schema may be the array itself or a union with an array variant
115
174
  // (e.g. a single-or-batch body `T | T[]`); resolve the element schema from
@@ -172,6 +231,20 @@ function walk(data, schema, dir, depth = 0) {
172
231
  }
173
232
  out[dir.rename(key)] = walk(value, fieldSchema, dir, depth + 1);
174
233
  }
234
+ if (dir.applyDefaults) {
235
+ // Shape keys are generated camelCase identifiers (never data-controlled),
236
+ // so direct indexing into `record` is safe here. Runs after the data loop
237
+ // so an explicit `key: undefined` entry is also replaced by the default.
238
+ for (const [key, fieldSchema] of Object.entries(shape)) {
239
+ if (record[key] !== undefined) {
240
+ continue;
241
+ }
242
+ const dflt = requiredDefault(fieldSchema);
243
+ if (dflt !== undefined) {
244
+ out[dir.rename(key)] = walk(dflt.value, fieldSchema, dir, depth + 1);
245
+ }
246
+ }
247
+ }
175
248
  Object.setPrototypeOf(out, Object.prototype);
176
249
  return out;
177
250
  }
@@ -262,15 +335,32 @@ const toWireDirection = {
262
335
  rename: toSnakeCase,
263
336
  discriminatorKey: (camelKey) => camelKey,
264
337
  mapDate: (value) => (value instanceof Date ? value.toISOString() : value),
338
+ mapBigInt: (value) => {
339
+ if (typeof value !== 'bigint') {
340
+ return value;
341
+ }
342
+ if (value > BigInt(Number.MAX_SAFE_INTEGER) ||
343
+ value < -BigInt(Number.MAX_SAFE_INTEGER)) {
344
+ throw new UnsafeIntegerError(value);
345
+ }
346
+ return Number(value);
347
+ },
348
+ applyDefaults: true,
265
349
  };
266
350
  const fromWireDirection = {
267
351
  rename: toCamelCase,
268
352
  discriminatorKey: (camelKey) => toSnakeCase(camelKey),
269
353
  mapDate: (value) => (typeof value === 'string' ? new Date(value) : value),
354
+ mapBigInt: (value) => typeof value === 'number' && Number.isInteger(value)
355
+ ? BigInt(value)
356
+ : value,
357
+ applyDefaults: false,
270
358
  };
271
359
  // Rewrite a request body or query object from the camelCase public shape to the
272
360
  // snake_case wire shape, driven by its schema. Record keys (label/dimension names)
273
- // are preserved; `Date` values serialize to RFC 3339 strings. The return is typed
361
+ // are preserved; `Date` values serialize to RFC 3339 strings; `bigint` values
362
+ // (int64 fields) become JSON numbers; omitted required-with-default fields are
363
+ // filled with their declared default (see requiredDefault). The return is typed
274
364
  // as the input `T` so call sites stay cast-free (the runtime object has snake keys
275
365
  // and wire-encoded dates, but the value is write-only — it flows straight into
276
366
  // `json:`/`toURLSearchParams`, both of which accept any object).
@@ -309,4 +399,3 @@ export function assertValid(schema, data) {
309
399
  throw new ValidationError('schema validation failed', result.error.issues);
310
400
  }
311
401
  }
312
- //# sourceMappingURL=wire.js.map
@@ -5,12 +5,23 @@ export declare class HTTPError extends Error {
5
5
  title: string;
6
6
  status: number;
7
7
  url: string;
8
+ retryAfter: number | undefined;
8
9
  protected __raw?: Record<string, unknown> | undefined;
9
- constructor(message: string, type: string, title: string, status: number, url: string, __raw?: Record<string, unknown> | undefined);
10
+ constructor(message: string, type: string, title: string, status: number, url: string, retryAfter: number | undefined, __raw?: Record<string, unknown> | undefined);
10
11
  static fromResponse(resp: {
11
12
  response: Response;
12
13
  error?: z.infer<typeof schemas.baseError>;
13
14
  }): HTTPError;
15
+ /**
16
+ * The `invalid_parameters` problem-detail extension member, present on Bad
17
+ * Request (400) responses. Typed from the schema, not runtime-validated
18
+ * (like the rest of the SDK, this trusts the server rather than rejecting
19
+ * additive fields) — `undefined` when the response didn't carry one.
20
+ */
21
+ get invalidParameters(): z.infer<typeof schemas.invalidParameters> | undefined;
22
+ /**
23
+ * Escape hatch for problem-detail extension members without a typed
24
+ * accessor above.
25
+ */
14
26
  getField(key: string): unknown;
15
27
  }
16
- //# sourceMappingURL=errors.d.ts.map
@@ -1,28 +1,55 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
2
+ // Retry-After is either delta-seconds (an integer) or an HTTP-date. Only the
3
+ // delta-seconds form is parsed; HTTP-date values yield undefined rather than
4
+ // a parsed Date, keeping the public type a plain number.
5
+ function parseRetryAfter(header) {
6
+ if (header === null) {
7
+ return undefined;
8
+ }
9
+ const trimmed = header.trim();
10
+ return /^\d+$/.test(trimmed) ? Number(trimmed) : undefined;
11
+ }
1
12
  export class HTTPError extends Error {
2
13
  type;
3
14
  title;
4
15
  status;
5
16
  url;
17
+ retryAfter;
6
18
  __raw;
7
- constructor(message, type, title, status, url, __raw) {
19
+ constructor(message, type, title, status, url, retryAfter, __raw) {
8
20
  super(message);
9
21
  this.type = type;
10
22
  this.title = title;
11
23
  this.status = status;
12
24
  this.url = url;
25
+ this.retryAfter = retryAfter;
13
26
  this.__raw = __raw;
27
+ this.name = 'HTTPError';
14
28
  }
15
29
  static fromResponse(resp) {
30
+ const retryAfter = parseRetryAfter(resp.response.headers.get('Retry-After'));
16
31
  if (resp.response.headers
17
32
  .get('Content-Type')
18
33
  ?.includes('application/problem+json') &&
19
34
  resp.error) {
20
- return new HTTPError(resp.error.detail, resp.error.type ?? resp.error.title, resp.error.title, resp.error.status ?? resp.response.status, resp.response.url, resp.error);
35
+ return new HTTPError(resp.error.detail, resp.error.type ?? resp.error.title, resp.error.title, resp.error.status ?? resp.response.status, resp.response.url, retryAfter, resp.error);
21
36
  }
22
- return new HTTPError(`Request failed: ${resp.response.statusText}`, resp.response.statusText, resp.response.statusText, resp.response.status, resp.response.url);
37
+ return new HTTPError(`Request failed: ${resp.response.statusText}`, resp.response.statusText, resp.response.statusText, resp.response.status, resp.response.url, retryAfter);
38
+ }
39
+ /**
40
+ * The `invalid_parameters` problem-detail extension member, present on Bad
41
+ * Request (400) responses. Typed from the schema, not runtime-validated
42
+ * (like the rest of the SDK, this trusts the server rather than rejecting
43
+ * additive fields) — `undefined` when the response didn't carry one.
44
+ */
45
+ get invalidParameters() {
46
+ return this.__raw?.invalid_parameters;
23
47
  }
48
+ /**
49
+ * Escape hatch for problem-detail extension members without a typed
50
+ * accessor above.
51
+ */
24
52
  getField(key) {
25
53
  return this.__raw?.[key];
26
54
  }
27
55
  }
28
- //# sourceMappingURL=errors.js.map
@@ -47,4 +47,3 @@ export type PublishAddonRequest = {
47
47
  addonId: string;
48
48
  };
49
49
  export type PublishAddonResponse = Addon;
50
- //# sourceMappingURL=addons.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=addons.js.map
@@ -1,7 +1,5 @@
1
- import { z } from 'zod';
2
- import * as schemas from '../schemas.js';
3
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
4
- import type { AppPagePaginatedResponse } from '../types.js';
2
+ import type { App, AppPagePaginatedResponse } from '../types.js';
5
3
  export interface ListAppsQuery {
6
4
  /** Determines which page of the collection to retrieve. */
7
5
  page?: {
@@ -14,5 +12,4 @@ export type ListAppsResponse = AppPagePaginatedResponse;
14
12
  export type GetAppRequest = {
15
13
  appId: string;
16
14
  };
17
- export type GetAppResponse = z.output<typeof schemas.getAppResponse>;
18
- //# sourceMappingURL=apps.d.ts.map
15
+ export type GetAppResponse = App;
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=apps.js.map
@@ -24,4 +24,3 @@ export type DeleteBillingProfileRequest = {
24
24
  id: string;
25
25
  };
26
26
  export type DeleteBillingProfileResponse = void;
27
- //# sourceMappingURL=billing.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=billing.js.map
@@ -50,4 +50,3 @@ export type CreateCostBasisRequest = AcceptDateStrings<{
50
50
  body: CreateCostBasisRequestBody;
51
51
  }>;
52
52
  export type CreateCostBasisResponse = CostBasis;
53
- //# sourceMappingURL=currencies.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=currencies.js.map
@@ -1,7 +1,5 @@
1
- import { z } from 'zod';
2
- import * as schemas from '../schemas.js';
3
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
4
- import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateChargeFlatFeeRequest, CreateChargeUsageBasedRequest, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody } from '../types.js';
2
+ import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, Charge, ChargePagePaginatedResponse, CreateChargeRequest, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody, VoidCreditGrantRequestInput } from '../types.js';
5
3
  export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
6
4
  export type CreateCustomerResponse = Customer;
7
5
  export type GetCustomerRequest = {
@@ -108,6 +106,12 @@ export type CreateCreditAdjustmentRequest = AcceptDateStrings<{
108
106
  body: CreateCreditAdjustmentRequestBody;
109
107
  }>;
110
108
  export type CreateCreditAdjustmentResponse = CreditAdjustment;
109
+ export type VoidCreditGrantRequest = AcceptDateStrings<{
110
+ customerId: string;
111
+ creditGrantId: string;
112
+ body: VoidCreditGrantRequestInput;
113
+ }>;
114
+ export type VoidCreditGrantResponse = CreditGrant;
111
115
  export type UpdateCreditGrantExternalSettlementRequest = AcceptDateStrings<{
112
116
  customerId: string;
113
117
  creditGrantId: string;
@@ -162,7 +166,6 @@ export type ListCustomerChargesRequest = AcceptDateStrings<ListCustomerChargesQu
162
166
  export type ListCustomerChargesResponse = ChargePagePaginatedResponse;
163
167
  export type CreateCustomerChargesRequest = AcceptDateStrings<{
164
168
  customerId: string;
165
- body: CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest;
169
+ body: CreateChargeRequest;
166
170
  }>;
167
- export type CreateCustomerChargesResponse = z.output<typeof schemas.createCustomerChargesResponse>;
168
- //# sourceMappingURL=customers.d.ts.map
171
+ export type CreateCustomerChargesResponse = Charge;
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=customers.js.map
@@ -4,4 +4,3 @@ export type GetOrganizationDefaultTaxCodesRequest = Record<string, never>;
4
4
  export type GetOrganizationDefaultTaxCodesResponse = OrganizationDefaultTaxCodes;
5
5
  export type UpdateOrganizationDefaultTaxCodesRequest = AcceptDateStrings<UpdateOrganizationDefaultTaxCodesRequestBody>;
6
6
  export type UpdateOrganizationDefaultTaxCodesResponse = OrganizationDefaultTaxCodes;
7
- //# sourceMappingURL=defaults.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=defaults.js.map
@@ -3,4 +3,3 @@ export type ListCustomerEntitlementAccessRequest = {
3
3
  customerId: string;
4
4
  };
5
5
  export type ListCustomerEntitlementAccessResponse = ListCustomerEntitlementAccessResponseData;
6
- //# sourceMappingURL=entitlements.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=entitlements.js.map
@@ -26,4 +26,3 @@ export type ListMeteringEventsRequest = AcceptDateStrings<ListMeteringEventsQuer
26
26
  export type ListMeteringEventsResponse = IngestedEventPaginatedResponse;
27
27
  export type IngestMeteringEventsRequest = AcceptDateStrings<EventInput | EventInput[]>;
28
28
  export type IngestMeteringEventsResponse = void;
29
- //# sourceMappingURL=events.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=events.js.map
@@ -48,4 +48,3 @@ export type QueryFeatureCostRequest = AcceptDateStrings<{
48
48
  body: MeterQueryRequestInput;
49
49
  }>;
50
50
  export type QueryFeatureCostResponse = FeatureCostQueryResult;
51
- //# sourceMappingURL=features.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=features.js.map
@@ -7,4 +7,3 @@ export type QueryGovernanceAccessRequest = AcceptDateStrings<{
7
7
  body: GovernanceQueryRequestInput;
8
8
  } & QueryGovernanceAccessQuery>;
9
9
  export type QueryGovernanceAccessResponse = GovernanceQueryResponse;
10
- //# sourceMappingURL=governance.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=governance.js.map
@@ -1,7 +1,5 @@
1
- import { z } from 'zod';
2
- import * as schemas from '../schemas.js';
3
1
  import type { AcceptDateStrings } from '../../lib/wire.js';
4
- import type { InvoicePagePaginatedResponse, ListInvoicesParamsFilter, SortQueryInput, UpdateInvoiceStandardRequestInput } from '../types.js';
2
+ import type { Invoice, InvoicePagePaginatedResponse, ListInvoicesParamsFilter, SortQueryInput, UpdateInvoiceRequestInput } from '../types.js';
5
3
  export interface ListInvoicesQuery {
6
4
  /** Determines which page of the collection to retrieve. */
7
5
  page?: {
@@ -35,14 +33,13 @@ export type ListInvoicesResponse = InvoicePagePaginatedResponse;
35
33
  export type GetInvoiceRequest = {
36
34
  invoiceId: string;
37
35
  };
38
- export type GetInvoiceResponse = z.output<typeof schemas.getInvoiceResponse>;
36
+ export type GetInvoiceResponse = Invoice;
39
37
  export type UpdateInvoiceRequest = AcceptDateStrings<{
40
38
  invoiceId: string;
41
- body: UpdateInvoiceStandardRequestInput;
39
+ body: UpdateInvoiceRequestInput;
42
40
  }>;
43
- export type UpdateInvoiceResponse = z.output<typeof schemas.updateInvoiceResponse>;
41
+ export type UpdateInvoiceResponse = Invoice;
44
42
  export type DeleteInvoiceRequest = {
45
43
  invoiceId: string;
46
44
  };
47
45
  export type DeleteInvoiceResponse = void;
48
- //# sourceMappingURL=invoices.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=invoices.js.map
@@ -44,4 +44,3 @@ export type DeleteLlmCostOverrideRequest = {
44
44
  priceId: string;
45
45
  };
46
46
  export type DeleteLlmCostOverrideResponse = void;
47
- //# sourceMappingURL=llmCost.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=llmCost.js.map
@@ -53,4 +53,3 @@ export type QueryMeterCsvRequest = AcceptDateStrings<{
53
53
  body: MeterQueryRequestInput;
54
54
  }>;
55
55
  export type QueryMeterCsvResponse = string;
56
- //# sourceMappingURL=meters.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=meters.js.map
@@ -32,4 +32,3 @@ export type DeletePlanAddonRequest = {
32
32
  planAddonId: string;
33
33
  };
34
34
  export type DeletePlanAddonResponse = void;
35
- //# sourceMappingURL=planAddons.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=planAddons.js.map
@@ -44,4 +44,3 @@ export type PublishPlanRequest = {
44
44
  planId: string;
45
45
  };
46
46
  export type PublishPlanResponse = Plan;
47
- //# sourceMappingURL=plans.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=plans.js.map
@@ -75,4 +75,3 @@ export type GetSubscriptionAddonRequest = {
75
75
  subscriptionAddonId: string;
76
76
  };
77
77
  export type GetSubscriptionAddonResponse = SubscriptionAddon;
78
- //# sourceMappingURL=subscriptions.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=subscriptions.js.map
@@ -26,4 +26,3 @@ export type DeleteTaxCodeRequest = {
26
26
  taxCodeId: string;
27
27
  };
28
28
  export type DeleteTaxCodeResponse = void;
29
- //# sourceMappingURL=tax.d.ts.map
@@ -1,2 +1,2 @@
1
+ // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
1
2
  export {};
2
- //# sourceMappingURL=tax.js.map