@orq-ai/node 3.11.2 → 3.11.4

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 (105) hide show
  1. package/bin/mcp-server.js +103 -103
  2. package/bin/mcp-server.js.map +26 -26
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createcontact.js +2 -2
  10. package/models/operations/createdataset.js +2 -2
  11. package/models/operations/createdatasetitem.js +2 -2
  12. package/models/operations/createdatasource.js +2 -2
  13. package/models/operations/createeval.js +16 -16
  14. package/models/operations/fileget.js +2 -2
  15. package/models/operations/filelist.js +2 -2
  16. package/models/operations/fileupload.js +2 -2
  17. package/models/operations/getevals.js +28 -28
  18. package/models/operations/listcontacts.js +2 -2
  19. package/models/operations/listdatasetdatapoints.js +2 -2
  20. package/models/operations/listdatasets.js +2 -2
  21. package/models/operations/listdatasources.js +2 -2
  22. package/models/operations/retrievecontact.js +2 -2
  23. package/models/operations/retrievedatapoint.js +2 -2
  24. package/models/operations/retrievedataset.js +2 -2
  25. package/models/operations/retrievedatasource.js +2 -2
  26. package/models/operations/updatecontact.js +2 -2
  27. package/models/operations/updatedatapoint.js +2 -2
  28. package/models/operations/updatedataset.js +2 -2
  29. package/models/operations/updatedatasource.js +2 -2
  30. package/models/operations/updateeval.js +16 -16
  31. package/package.json +1 -1
  32. package/packages/orq-rc/README.md +99 -86
  33. package/packages/orq-rc/docs/sdks/budgets/README.md +401 -0
  34. package/packages/orq-rc/examples/package-lock.json +1 -1
  35. package/packages/orq-rc/jsr.json +1 -1
  36. package/packages/orq-rc/package-lock.json +2 -2
  37. package/packages/orq-rc/package.json +1 -1
  38. package/packages/orq-rc/src/funcs/budgetsCreate.ts +160 -0
  39. package/packages/orq-rc/src/funcs/budgetsDelete.ts +167 -0
  40. package/packages/orq-rc/src/funcs/budgetsGet.ts +166 -0
  41. package/packages/orq-rc/src/funcs/budgetsList.ts +170 -0
  42. package/packages/orq-rc/src/funcs/budgetsUpdate.ts +167 -0
  43. package/packages/orq-rc/src/lib/config.ts +3 -3
  44. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  45. package/packages/orq-rc/src/mcp-server/server.ts +11 -1
  46. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +37 -0
  47. package/packages/orq-rc/src/mcp-server/tools/budgetsDelete.ts +35 -0
  48. package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +37 -0
  49. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +37 -0
  50. package/packages/orq-rc/src/mcp-server/tools/budgetsUpdate.ts +37 -0
  51. package/packages/orq-rc/src/models/operations/createbudget.ts +534 -0
  52. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  53. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  54. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  55. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  56. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  57. package/packages/orq-rc/src/models/operations/deletebudget.ts +66 -0
  58. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  61. package/packages/orq-rc/src/models/operations/getbudget.ts +437 -0
  62. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  63. package/packages/orq-rc/src/models/operations/index.ts +5 -0
  64. package/packages/orq-rc/src/models/operations/listbudgets.ts +617 -0
  65. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  67. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/updatebudget.ts +628 -0
  74. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  79. package/packages/orq-rc/src/sdk/budgets.ts +99 -0
  80. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  81. package/src/lib/config.ts +2 -2
  82. package/src/mcp-server/mcp-server.ts +1 -1
  83. package/src/mcp-server/server.ts +1 -1
  84. package/src/models/operations/createcontact.ts +2 -2
  85. package/src/models/operations/createdataset.ts +2 -2
  86. package/src/models/operations/createdatasetitem.ts +2 -2
  87. package/src/models/operations/createdatasource.ts +2 -2
  88. package/src/models/operations/createeval.ts +16 -16
  89. package/src/models/operations/fileget.ts +2 -2
  90. package/src/models/operations/filelist.ts +2 -2
  91. package/src/models/operations/fileupload.ts +2 -2
  92. package/src/models/operations/getevals.ts +28 -28
  93. package/src/models/operations/listcontacts.ts +2 -2
  94. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  95. package/src/models/operations/listdatasets.ts +2 -2
  96. package/src/models/operations/listdatasources.ts +2 -2
  97. package/src/models/operations/retrievecontact.ts +2 -2
  98. package/src/models/operations/retrievedatapoint.ts +2 -2
  99. package/src/models/operations/retrievedataset.ts +2 -2
  100. package/src/models/operations/retrievedatasource.ts +2 -2
  101. package/src/models/operations/updatecontact.ts +2 -2
  102. package/src/models/operations/updatedatapoint.ts +2 -2
  103. package/src/models/operations/updatedataset.ts +2 -2
  104. package/src/models/operations/updatedatasource.ts +2 -2
  105. package/src/models/operations/updateeval.ts +16 -16
@@ -2481,7 +2481,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
2481
2481
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
2482
2482
  .optional(),
2483
2483
  updated: z.string().datetime({ offset: true }).default(
2484
- "2025-08-18T10:59:53.795Z",
2484
+ "2025-08-20T07:45:57.493Z",
2485
2485
  ).transform(v => new Date(v)),
2486
2486
  }).transform((v) => {
2487
2487
  return remap$(v, {
@@ -2539,7 +2539,7 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
2539
2539
  createdById: z.string().optional(),
2540
2540
  updatedById: z.string().optional(),
2541
2541
  created: z.date().transform(v => v.toISOString()).optional(),
2542
- updated: z.date().default(() => new Date("2025-08-18T10:59:53.795Z"))
2542
+ updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
2543
2543
  .transform(v => v.toISOString()),
2544
2544
  }).transform((v) => {
2545
2545
  return remap$(v, {
@@ -201,7 +201,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
201
201
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
202
202
  .optional(),
203
203
  updated: z.string().datetime({ offset: true }).default(
204
- "2025-08-18T10:59:53.795Z",
204
+ "2025-08-20T07:45:57.493Z",
205
205
  ).transform(v => new Date(v)),
206
206
  }).transform((v) => {
207
207
  return remap$(v, {
@@ -241,7 +241,7 @@ export const RetrieveDatasetResponseBody$outboundSchema: z.ZodType<
241
241
  updatedById: z.string().optional(),
242
242
  metadata: z.lazy(() => RetrieveDatasetMetadata$outboundSchema),
243
243
  created: z.date().transform(v => v.toISOString()).optional(),
244
- updated: z.date().default(() => new Date("2025-08-18T10:59:53.795Z"))
244
+ updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
245
245
  .transform(v => v.toISOString()),
246
246
  }).transform((v) => {
247
247
  return remap$(v, {
@@ -172,7 +172,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
172
172
  z.ZodTypeDef,
173
173
  unknown
174
174
  > = z.object({
175
- _id: z.string().default("01K2YDC470P4KK1SDWMGXJRCDW"),
175
+ _id: z.string().default("01K3372EJTAZCESQ1AVWGXSD6T"),
176
176
  display_name: z.string(),
177
177
  description: z.string().optional(),
178
178
  status: RetrieveDatasourceStatus$inboundSchema,
@@ -216,7 +216,7 @@ export const RetrieveDatasourceResponseBody$outboundSchema: z.ZodType<
216
216
  z.ZodTypeDef,
217
217
  RetrieveDatasourceResponseBody
218
218
  > = z.object({
219
- id: z.string().default("01K2YDC470P4KK1SDWMGXJRCDW"),
219
+ id: z.string().default("01K3372EJTAZCESQ1AVWGXSD6T"),
220
220
  displayName: z.string(),
221
221
  description: z.string().optional(),
222
222
  status: RetrieveDatasourceStatus$outboundSchema,
@@ -0,0 +1,628 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Budget period type
14
+ */
15
+ export const UpdateBudgetPeriod = {
16
+ Daily: "daily",
17
+ Weekly: "weekly",
18
+ Monthly: "monthly",
19
+ Yearly: "yearly",
20
+ } as const;
21
+ /**
22
+ * Budget period type
23
+ */
24
+ export type UpdateBudgetPeriod = ClosedEnum<typeof UpdateBudgetPeriod>;
25
+
26
+ /**
27
+ * Budget configuration to update
28
+ */
29
+ export type Budget = {
30
+ /**
31
+ * Budget period type
32
+ */
33
+ period?: UpdateBudgetPeriod | undefined;
34
+ /**
35
+ * Budget amount in USD for the specified period
36
+ */
37
+ amount?: number | undefined;
38
+ };
39
+
40
+ export type UpdateBudgetRequestBody = {
41
+ /**
42
+ * Budget configuration to update
43
+ */
44
+ budget?: Budget | undefined;
45
+ /**
46
+ * Whether this budget configuration is currently active
47
+ */
48
+ isActive?: boolean | undefined;
49
+ };
50
+
51
+ export type UpdateBudgetRequest = {
52
+ id: string;
53
+ requestBody: UpdateBudgetRequestBody;
54
+ };
55
+
56
+ /**
57
+ * Budget entity type
58
+ */
59
+ export const UpdateBudgetType = {
60
+ ApiKey: "api_key",
61
+ Contact: "contact",
62
+ Workspace: "workspace",
63
+ } as const;
64
+ /**
65
+ * Budget entity type
66
+ */
67
+ export type UpdateBudgetType = ClosedEnum<typeof UpdateBudgetType>;
68
+
69
+ /**
70
+ * Budget period type
71
+ */
72
+ export const UpdateBudgetBudgetsPeriod = {
73
+ Daily: "daily",
74
+ Weekly: "weekly",
75
+ Monthly: "monthly",
76
+ Yearly: "yearly",
77
+ } as const;
78
+ /**
79
+ * Budget period type
80
+ */
81
+ export type UpdateBudgetBudgetsPeriod = ClosedEnum<
82
+ typeof UpdateBudgetBudgetsPeriod
83
+ >;
84
+
85
+ /**
86
+ * Budget configuration
87
+ */
88
+ export type UpdateBudgetBudget = {
89
+ /**
90
+ * Budget period type
91
+ */
92
+ period: UpdateBudgetBudgetsPeriod;
93
+ /**
94
+ * Budget amount in USD for the specified period
95
+ */
96
+ amount: number;
97
+ };
98
+
99
+ export type UpdateBudgetConsumption = {
100
+ /**
101
+ * Current period consumption in USD
102
+ */
103
+ currentAmount: number;
104
+ /**
105
+ * Remaining budget (amount - current_amount)
106
+ */
107
+ remainingAmount: number;
108
+ /**
109
+ * When the current period started
110
+ */
111
+ periodStart: string | null;
112
+ /**
113
+ * When the current period will reset
114
+ */
115
+ periodEnd: string | null;
116
+ };
117
+
118
+ /**
119
+ * Budget configuration details
120
+ */
121
+ export type UpdateBudgetResponseBody = {
122
+ /**
123
+ * Unique ULID for the budget configuration
124
+ */
125
+ id: string;
126
+ /**
127
+ * Budget entity type
128
+ */
129
+ type: UpdateBudgetType;
130
+ /**
131
+ * Contact external identifier (present when type is "contact")
132
+ */
133
+ contactId?: string | undefined;
134
+ /**
135
+ * API Key identifier (present when type is "api_key")
136
+ */
137
+ apiKeyId?: string | undefined;
138
+ /**
139
+ * Budget configuration
140
+ */
141
+ budget: UpdateBudgetBudget;
142
+ /**
143
+ * Whether this budget configuration is currently active
144
+ */
145
+ isActive: boolean;
146
+ consumption?: UpdateBudgetConsumption | undefined;
147
+ /**
148
+ * The date and time the resource was created
149
+ */
150
+ created?: Date | undefined;
151
+ /**
152
+ * The date and time the resource was last updated
153
+ */
154
+ updated?: Date | undefined;
155
+ };
156
+
157
+ /** @internal */
158
+ export const UpdateBudgetPeriod$inboundSchema: z.ZodNativeEnum<
159
+ typeof UpdateBudgetPeriod
160
+ > = z.nativeEnum(UpdateBudgetPeriod);
161
+
162
+ /** @internal */
163
+ export const UpdateBudgetPeriod$outboundSchema: z.ZodNativeEnum<
164
+ typeof UpdateBudgetPeriod
165
+ > = UpdateBudgetPeriod$inboundSchema;
166
+
167
+ /**
168
+ * @internal
169
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
170
+ */
171
+ export namespace UpdateBudgetPeriod$ {
172
+ /** @deprecated use `UpdateBudgetPeriod$inboundSchema` instead. */
173
+ export const inboundSchema = UpdateBudgetPeriod$inboundSchema;
174
+ /** @deprecated use `UpdateBudgetPeriod$outboundSchema` instead. */
175
+ export const outboundSchema = UpdateBudgetPeriod$outboundSchema;
176
+ }
177
+
178
+ /** @internal */
179
+ export const Budget$inboundSchema: z.ZodType<Budget, z.ZodTypeDef, unknown> = z
180
+ .object({
181
+ period: UpdateBudgetPeriod$inboundSchema.optional(),
182
+ amount: z.number().optional(),
183
+ });
184
+
185
+ /** @internal */
186
+ export type Budget$Outbound = {
187
+ period?: string | undefined;
188
+ amount?: number | undefined;
189
+ };
190
+
191
+ /** @internal */
192
+ export const Budget$outboundSchema: z.ZodType<
193
+ Budget$Outbound,
194
+ z.ZodTypeDef,
195
+ Budget
196
+ > = z.object({
197
+ period: UpdateBudgetPeriod$outboundSchema.optional(),
198
+ amount: z.number().optional(),
199
+ });
200
+
201
+ /**
202
+ * @internal
203
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
204
+ */
205
+ export namespace Budget$ {
206
+ /** @deprecated use `Budget$inboundSchema` instead. */
207
+ export const inboundSchema = Budget$inboundSchema;
208
+ /** @deprecated use `Budget$outboundSchema` instead. */
209
+ export const outboundSchema = Budget$outboundSchema;
210
+ /** @deprecated use `Budget$Outbound` instead. */
211
+ export type Outbound = Budget$Outbound;
212
+ }
213
+
214
+ export function budgetToJSON(budget: Budget): string {
215
+ return JSON.stringify(Budget$outboundSchema.parse(budget));
216
+ }
217
+
218
+ export function budgetFromJSON(
219
+ jsonString: string,
220
+ ): SafeParseResult<Budget, SDKValidationError> {
221
+ return safeParse(
222
+ jsonString,
223
+ (x) => Budget$inboundSchema.parse(JSON.parse(x)),
224
+ `Failed to parse 'Budget' from JSON`,
225
+ );
226
+ }
227
+
228
+ /** @internal */
229
+ export const UpdateBudgetRequestBody$inboundSchema: z.ZodType<
230
+ UpdateBudgetRequestBody,
231
+ z.ZodTypeDef,
232
+ unknown
233
+ > = z.object({
234
+ budget: z.lazy(() => Budget$inboundSchema).optional(),
235
+ is_active: z.boolean().optional(),
236
+ }).transform((v) => {
237
+ return remap$(v, {
238
+ "is_active": "isActive",
239
+ });
240
+ });
241
+
242
+ /** @internal */
243
+ export type UpdateBudgetRequestBody$Outbound = {
244
+ budget?: Budget$Outbound | undefined;
245
+ is_active?: boolean | undefined;
246
+ };
247
+
248
+ /** @internal */
249
+ export const UpdateBudgetRequestBody$outboundSchema: z.ZodType<
250
+ UpdateBudgetRequestBody$Outbound,
251
+ z.ZodTypeDef,
252
+ UpdateBudgetRequestBody
253
+ > = z.object({
254
+ budget: z.lazy(() => Budget$outboundSchema).optional(),
255
+ isActive: z.boolean().optional(),
256
+ }).transform((v) => {
257
+ return remap$(v, {
258
+ isActive: "is_active",
259
+ });
260
+ });
261
+
262
+ /**
263
+ * @internal
264
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
265
+ */
266
+ export namespace UpdateBudgetRequestBody$ {
267
+ /** @deprecated use `UpdateBudgetRequestBody$inboundSchema` instead. */
268
+ export const inboundSchema = UpdateBudgetRequestBody$inboundSchema;
269
+ /** @deprecated use `UpdateBudgetRequestBody$outboundSchema` instead. */
270
+ export const outboundSchema = UpdateBudgetRequestBody$outboundSchema;
271
+ /** @deprecated use `UpdateBudgetRequestBody$Outbound` instead. */
272
+ export type Outbound = UpdateBudgetRequestBody$Outbound;
273
+ }
274
+
275
+ export function updateBudgetRequestBodyToJSON(
276
+ updateBudgetRequestBody: UpdateBudgetRequestBody,
277
+ ): string {
278
+ return JSON.stringify(
279
+ UpdateBudgetRequestBody$outboundSchema.parse(updateBudgetRequestBody),
280
+ );
281
+ }
282
+
283
+ export function updateBudgetRequestBodyFromJSON(
284
+ jsonString: string,
285
+ ): SafeParseResult<UpdateBudgetRequestBody, SDKValidationError> {
286
+ return safeParse(
287
+ jsonString,
288
+ (x) => UpdateBudgetRequestBody$inboundSchema.parse(JSON.parse(x)),
289
+ `Failed to parse 'UpdateBudgetRequestBody' from JSON`,
290
+ );
291
+ }
292
+
293
+ /** @internal */
294
+ export const UpdateBudgetRequest$inboundSchema: z.ZodType<
295
+ UpdateBudgetRequest,
296
+ z.ZodTypeDef,
297
+ unknown
298
+ > = z.object({
299
+ id: z.string(),
300
+ RequestBody: z.lazy(() => UpdateBudgetRequestBody$inboundSchema),
301
+ }).transform((v) => {
302
+ return remap$(v, {
303
+ "RequestBody": "requestBody",
304
+ });
305
+ });
306
+
307
+ /** @internal */
308
+ export type UpdateBudgetRequest$Outbound = {
309
+ id: string;
310
+ RequestBody: UpdateBudgetRequestBody$Outbound;
311
+ };
312
+
313
+ /** @internal */
314
+ export const UpdateBudgetRequest$outboundSchema: z.ZodType<
315
+ UpdateBudgetRequest$Outbound,
316
+ z.ZodTypeDef,
317
+ UpdateBudgetRequest
318
+ > = z.object({
319
+ id: z.string(),
320
+ requestBody: z.lazy(() => UpdateBudgetRequestBody$outboundSchema),
321
+ }).transform((v) => {
322
+ return remap$(v, {
323
+ requestBody: "RequestBody",
324
+ });
325
+ });
326
+
327
+ /**
328
+ * @internal
329
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
330
+ */
331
+ export namespace UpdateBudgetRequest$ {
332
+ /** @deprecated use `UpdateBudgetRequest$inboundSchema` instead. */
333
+ export const inboundSchema = UpdateBudgetRequest$inboundSchema;
334
+ /** @deprecated use `UpdateBudgetRequest$outboundSchema` instead. */
335
+ export const outboundSchema = UpdateBudgetRequest$outboundSchema;
336
+ /** @deprecated use `UpdateBudgetRequest$Outbound` instead. */
337
+ export type Outbound = UpdateBudgetRequest$Outbound;
338
+ }
339
+
340
+ export function updateBudgetRequestToJSON(
341
+ updateBudgetRequest: UpdateBudgetRequest,
342
+ ): string {
343
+ return JSON.stringify(
344
+ UpdateBudgetRequest$outboundSchema.parse(updateBudgetRequest),
345
+ );
346
+ }
347
+
348
+ export function updateBudgetRequestFromJSON(
349
+ jsonString: string,
350
+ ): SafeParseResult<UpdateBudgetRequest, SDKValidationError> {
351
+ return safeParse(
352
+ jsonString,
353
+ (x) => UpdateBudgetRequest$inboundSchema.parse(JSON.parse(x)),
354
+ `Failed to parse 'UpdateBudgetRequest' from JSON`,
355
+ );
356
+ }
357
+
358
+ /** @internal */
359
+ export const UpdateBudgetType$inboundSchema: z.ZodNativeEnum<
360
+ typeof UpdateBudgetType
361
+ > = z.nativeEnum(UpdateBudgetType);
362
+
363
+ /** @internal */
364
+ export const UpdateBudgetType$outboundSchema: z.ZodNativeEnum<
365
+ typeof UpdateBudgetType
366
+ > = UpdateBudgetType$inboundSchema;
367
+
368
+ /**
369
+ * @internal
370
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
371
+ */
372
+ export namespace UpdateBudgetType$ {
373
+ /** @deprecated use `UpdateBudgetType$inboundSchema` instead. */
374
+ export const inboundSchema = UpdateBudgetType$inboundSchema;
375
+ /** @deprecated use `UpdateBudgetType$outboundSchema` instead. */
376
+ export const outboundSchema = UpdateBudgetType$outboundSchema;
377
+ }
378
+
379
+ /** @internal */
380
+ export const UpdateBudgetBudgetsPeriod$inboundSchema: z.ZodNativeEnum<
381
+ typeof UpdateBudgetBudgetsPeriod
382
+ > = z.nativeEnum(UpdateBudgetBudgetsPeriod);
383
+
384
+ /** @internal */
385
+ export const UpdateBudgetBudgetsPeriod$outboundSchema: z.ZodNativeEnum<
386
+ typeof UpdateBudgetBudgetsPeriod
387
+ > = UpdateBudgetBudgetsPeriod$inboundSchema;
388
+
389
+ /**
390
+ * @internal
391
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
392
+ */
393
+ export namespace UpdateBudgetBudgetsPeriod$ {
394
+ /** @deprecated use `UpdateBudgetBudgetsPeriod$inboundSchema` instead. */
395
+ export const inboundSchema = UpdateBudgetBudgetsPeriod$inboundSchema;
396
+ /** @deprecated use `UpdateBudgetBudgetsPeriod$outboundSchema` instead. */
397
+ export const outboundSchema = UpdateBudgetBudgetsPeriod$outboundSchema;
398
+ }
399
+
400
+ /** @internal */
401
+ export const UpdateBudgetBudget$inboundSchema: z.ZodType<
402
+ UpdateBudgetBudget,
403
+ z.ZodTypeDef,
404
+ unknown
405
+ > = z.object({
406
+ period: UpdateBudgetBudgetsPeriod$inboundSchema,
407
+ amount: z.number(),
408
+ });
409
+
410
+ /** @internal */
411
+ export type UpdateBudgetBudget$Outbound = {
412
+ period: string;
413
+ amount: number;
414
+ };
415
+
416
+ /** @internal */
417
+ export const UpdateBudgetBudget$outboundSchema: z.ZodType<
418
+ UpdateBudgetBudget$Outbound,
419
+ z.ZodTypeDef,
420
+ UpdateBudgetBudget
421
+ > = z.object({
422
+ period: UpdateBudgetBudgetsPeriod$outboundSchema,
423
+ amount: z.number(),
424
+ });
425
+
426
+ /**
427
+ * @internal
428
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
429
+ */
430
+ export namespace UpdateBudgetBudget$ {
431
+ /** @deprecated use `UpdateBudgetBudget$inboundSchema` instead. */
432
+ export const inboundSchema = UpdateBudgetBudget$inboundSchema;
433
+ /** @deprecated use `UpdateBudgetBudget$outboundSchema` instead. */
434
+ export const outboundSchema = UpdateBudgetBudget$outboundSchema;
435
+ /** @deprecated use `UpdateBudgetBudget$Outbound` instead. */
436
+ export type Outbound = UpdateBudgetBudget$Outbound;
437
+ }
438
+
439
+ export function updateBudgetBudgetToJSON(
440
+ updateBudgetBudget: UpdateBudgetBudget,
441
+ ): string {
442
+ return JSON.stringify(
443
+ UpdateBudgetBudget$outboundSchema.parse(updateBudgetBudget),
444
+ );
445
+ }
446
+
447
+ export function updateBudgetBudgetFromJSON(
448
+ jsonString: string,
449
+ ): SafeParseResult<UpdateBudgetBudget, SDKValidationError> {
450
+ return safeParse(
451
+ jsonString,
452
+ (x) => UpdateBudgetBudget$inboundSchema.parse(JSON.parse(x)),
453
+ `Failed to parse 'UpdateBudgetBudget' from JSON`,
454
+ );
455
+ }
456
+
457
+ /** @internal */
458
+ export const UpdateBudgetConsumption$inboundSchema: z.ZodType<
459
+ UpdateBudgetConsumption,
460
+ z.ZodTypeDef,
461
+ unknown
462
+ > = z.object({
463
+ current_amount: z.number(),
464
+ remaining_amount: z.number(),
465
+ period_start: z.nullable(z.string()),
466
+ period_end: z.nullable(z.string()),
467
+ }).transform((v) => {
468
+ return remap$(v, {
469
+ "current_amount": "currentAmount",
470
+ "remaining_amount": "remainingAmount",
471
+ "period_start": "periodStart",
472
+ "period_end": "periodEnd",
473
+ });
474
+ });
475
+
476
+ /** @internal */
477
+ export type UpdateBudgetConsumption$Outbound = {
478
+ current_amount: number;
479
+ remaining_amount: number;
480
+ period_start: string | null;
481
+ period_end: string | null;
482
+ };
483
+
484
+ /** @internal */
485
+ export const UpdateBudgetConsumption$outboundSchema: z.ZodType<
486
+ UpdateBudgetConsumption$Outbound,
487
+ z.ZodTypeDef,
488
+ UpdateBudgetConsumption
489
+ > = z.object({
490
+ currentAmount: z.number(),
491
+ remainingAmount: z.number(),
492
+ periodStart: z.nullable(z.string()),
493
+ periodEnd: z.nullable(z.string()),
494
+ }).transform((v) => {
495
+ return remap$(v, {
496
+ currentAmount: "current_amount",
497
+ remainingAmount: "remaining_amount",
498
+ periodStart: "period_start",
499
+ periodEnd: "period_end",
500
+ });
501
+ });
502
+
503
+ /**
504
+ * @internal
505
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
506
+ */
507
+ export namespace UpdateBudgetConsumption$ {
508
+ /** @deprecated use `UpdateBudgetConsumption$inboundSchema` instead. */
509
+ export const inboundSchema = UpdateBudgetConsumption$inboundSchema;
510
+ /** @deprecated use `UpdateBudgetConsumption$outboundSchema` instead. */
511
+ export const outboundSchema = UpdateBudgetConsumption$outboundSchema;
512
+ /** @deprecated use `UpdateBudgetConsumption$Outbound` instead. */
513
+ export type Outbound = UpdateBudgetConsumption$Outbound;
514
+ }
515
+
516
+ export function updateBudgetConsumptionToJSON(
517
+ updateBudgetConsumption: UpdateBudgetConsumption,
518
+ ): string {
519
+ return JSON.stringify(
520
+ UpdateBudgetConsumption$outboundSchema.parse(updateBudgetConsumption),
521
+ );
522
+ }
523
+
524
+ export function updateBudgetConsumptionFromJSON(
525
+ jsonString: string,
526
+ ): SafeParseResult<UpdateBudgetConsumption, SDKValidationError> {
527
+ return safeParse(
528
+ jsonString,
529
+ (x) => UpdateBudgetConsumption$inboundSchema.parse(JSON.parse(x)),
530
+ `Failed to parse 'UpdateBudgetConsumption' from JSON`,
531
+ );
532
+ }
533
+
534
+ /** @internal */
535
+ export const UpdateBudgetResponseBody$inboundSchema: z.ZodType<
536
+ UpdateBudgetResponseBody,
537
+ z.ZodTypeDef,
538
+ unknown
539
+ > = z.object({
540
+ _id: z.string(),
541
+ type: UpdateBudgetType$inboundSchema,
542
+ contact_id: z.string().optional(),
543
+ api_key_id: z.string().optional(),
544
+ budget: z.lazy(() => UpdateBudgetBudget$inboundSchema),
545
+ is_active: z.boolean(),
546
+ consumption: z.lazy(() => UpdateBudgetConsumption$inboundSchema).optional(),
547
+ created: z.string().datetime({ offset: true }).transform(v => new Date(v))
548
+ .optional(),
549
+ updated: z.string().datetime({ offset: true }).default(
550
+ "2025-08-20T07:45:57.493Z",
551
+ ).transform(v => new Date(v)),
552
+ }).transform((v) => {
553
+ return remap$(v, {
554
+ "_id": "id",
555
+ "contact_id": "contactId",
556
+ "api_key_id": "apiKeyId",
557
+ "is_active": "isActive",
558
+ });
559
+ });
560
+
561
+ /** @internal */
562
+ export type UpdateBudgetResponseBody$Outbound = {
563
+ _id: string;
564
+ type: string;
565
+ contact_id?: string | undefined;
566
+ api_key_id?: string | undefined;
567
+ budget: UpdateBudgetBudget$Outbound;
568
+ is_active: boolean;
569
+ consumption?: UpdateBudgetConsumption$Outbound | undefined;
570
+ created?: string | undefined;
571
+ updated: string;
572
+ };
573
+
574
+ /** @internal */
575
+ export const UpdateBudgetResponseBody$outboundSchema: z.ZodType<
576
+ UpdateBudgetResponseBody$Outbound,
577
+ z.ZodTypeDef,
578
+ UpdateBudgetResponseBody
579
+ > = z.object({
580
+ id: z.string(),
581
+ type: UpdateBudgetType$outboundSchema,
582
+ contactId: z.string().optional(),
583
+ apiKeyId: z.string().optional(),
584
+ budget: z.lazy(() => UpdateBudgetBudget$outboundSchema),
585
+ isActive: z.boolean(),
586
+ consumption: z.lazy(() => UpdateBudgetConsumption$outboundSchema).optional(),
587
+ created: z.date().transform(v => v.toISOString()).optional(),
588
+ updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
589
+ .transform(v => v.toISOString()),
590
+ }).transform((v) => {
591
+ return remap$(v, {
592
+ id: "_id",
593
+ contactId: "contact_id",
594
+ apiKeyId: "api_key_id",
595
+ isActive: "is_active",
596
+ });
597
+ });
598
+
599
+ /**
600
+ * @internal
601
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
602
+ */
603
+ export namespace UpdateBudgetResponseBody$ {
604
+ /** @deprecated use `UpdateBudgetResponseBody$inboundSchema` instead. */
605
+ export const inboundSchema = UpdateBudgetResponseBody$inboundSchema;
606
+ /** @deprecated use `UpdateBudgetResponseBody$outboundSchema` instead. */
607
+ export const outboundSchema = UpdateBudgetResponseBody$outboundSchema;
608
+ /** @deprecated use `UpdateBudgetResponseBody$Outbound` instead. */
609
+ export type Outbound = UpdateBudgetResponseBody$Outbound;
610
+ }
611
+
612
+ export function updateBudgetResponseBodyToJSON(
613
+ updateBudgetResponseBody: UpdateBudgetResponseBody,
614
+ ): string {
615
+ return JSON.stringify(
616
+ UpdateBudgetResponseBody$outboundSchema.parse(updateBudgetResponseBody),
617
+ );
618
+ }
619
+
620
+ export function updateBudgetResponseBodyFromJSON(
621
+ jsonString: string,
622
+ ): SafeParseResult<UpdateBudgetResponseBody, SDKValidationError> {
623
+ return safeParse(
624
+ jsonString,
625
+ (x) => UpdateBudgetResponseBody$inboundSchema.parse(JSON.parse(x)),
626
+ `Failed to parse 'UpdateBudgetResponseBody' from JSON`,
627
+ );
628
+ }
@@ -244,7 +244,7 @@ export const UpdateContactResponseBody$inboundSchema: z.ZodType<
244
244
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
245
245
  .optional(),
246
246
  updated: z.string().datetime({ offset: true }).default(
247
- "2025-08-18T10:59:53.795Z",
247
+ "2025-08-20T07:45:57.493Z",
248
248
  ).transform(v => new Date(v)),
249
249
  }).transform((v) => {
250
250
  return remap$(v, {
@@ -282,7 +282,7 @@ export const UpdateContactResponseBody$outboundSchema: z.ZodType<
282
282
  tags: z.array(z.string()).optional(),
283
283
  metadata: z.record(z.any()).optional(),
284
284
  created: z.date().transform(v => v.toISOString()).optional(),
285
- updated: z.date().default(() => new Date("2025-08-18T10:59:53.795Z"))
285
+ updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
286
286
  .transform(v => v.toISOString()),
287
287
  }).transform((v) => {
288
288
  return remap$(v, {