@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.
- package/bin/mcp-server.js +103 -103
- package/bin/mcp-server.js.map +26 -26
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/README.md +99 -86
- package/packages/orq-rc/docs/sdks/budgets/README.md +401 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/budgetsDelete.ts +167 -0
- package/packages/orq-rc/src/funcs/budgetsGet.ts +166 -0
- package/packages/orq-rc/src/funcs/budgetsList.ts +170 -0
- package/packages/orq-rc/src/funcs/budgetsUpdate.ts +167 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +11 -1
- package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsUpdate.ts +37 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +534 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/deletebudget.ts +66 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getbudget.ts +437 -0
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +5 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +617 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatebudget.ts +628 -0
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/sdk/budgets.ts +99 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
|
@@ -0,0 +1,534 @@
|
|
|
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 entity type - only contact budgets supported
|
|
14
|
+
*/
|
|
15
|
+
export const CreateBudgetType = {
|
|
16
|
+
Contact: "contact",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* Budget entity type - only contact budgets supported
|
|
20
|
+
*/
|
|
21
|
+
export type CreateBudgetType = ClosedEnum<typeof CreateBudgetType>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Budget period type
|
|
25
|
+
*/
|
|
26
|
+
export const Period = {
|
|
27
|
+
Daily: "daily",
|
|
28
|
+
Weekly: "weekly",
|
|
29
|
+
Monthly: "monthly",
|
|
30
|
+
Yearly: "yearly",
|
|
31
|
+
} as const;
|
|
32
|
+
/**
|
|
33
|
+
* Budget period type
|
|
34
|
+
*/
|
|
35
|
+
export type Period = ClosedEnum<typeof Period>;
|
|
36
|
+
|
|
37
|
+
export type CreateBudgetRequestBody = {
|
|
38
|
+
/**
|
|
39
|
+
* Budget entity type - only contact budgets supported
|
|
40
|
+
*/
|
|
41
|
+
type: CreateBudgetType;
|
|
42
|
+
/**
|
|
43
|
+
* Contact external ID
|
|
44
|
+
*/
|
|
45
|
+
entityId: string;
|
|
46
|
+
/**
|
|
47
|
+
* Budget period type
|
|
48
|
+
*/
|
|
49
|
+
period: Period;
|
|
50
|
+
/**
|
|
51
|
+
* Budget amount in USD for the specified period
|
|
52
|
+
*/
|
|
53
|
+
amount: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Budget entity type
|
|
58
|
+
*/
|
|
59
|
+
export const CreateBudgetBudgetsType = {
|
|
60
|
+
ApiKey: "api_key",
|
|
61
|
+
Contact: "contact",
|
|
62
|
+
Workspace: "workspace",
|
|
63
|
+
} as const;
|
|
64
|
+
/**
|
|
65
|
+
* Budget entity type
|
|
66
|
+
*/
|
|
67
|
+
export type CreateBudgetBudgetsType = ClosedEnum<
|
|
68
|
+
typeof CreateBudgetBudgetsType
|
|
69
|
+
>;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Budget period type
|
|
73
|
+
*/
|
|
74
|
+
export const CreateBudgetPeriod = {
|
|
75
|
+
Daily: "daily",
|
|
76
|
+
Weekly: "weekly",
|
|
77
|
+
Monthly: "monthly",
|
|
78
|
+
Yearly: "yearly",
|
|
79
|
+
} as const;
|
|
80
|
+
/**
|
|
81
|
+
* Budget period type
|
|
82
|
+
*/
|
|
83
|
+
export type CreateBudgetPeriod = ClosedEnum<typeof CreateBudgetPeriod>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Budget configuration
|
|
87
|
+
*/
|
|
88
|
+
export type CreateBudgetBudget = {
|
|
89
|
+
/**
|
|
90
|
+
* Budget period type
|
|
91
|
+
*/
|
|
92
|
+
period: CreateBudgetPeriod;
|
|
93
|
+
/**
|
|
94
|
+
* Budget amount in USD for the specified period
|
|
95
|
+
*/
|
|
96
|
+
amount: number;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type Consumption = {
|
|
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 CreateBudgetResponseBody = {
|
|
122
|
+
/**
|
|
123
|
+
* Unique ULID for the budget configuration
|
|
124
|
+
*/
|
|
125
|
+
id: string;
|
|
126
|
+
/**
|
|
127
|
+
* Budget entity type
|
|
128
|
+
*/
|
|
129
|
+
type: CreateBudgetBudgetsType;
|
|
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: CreateBudgetBudget;
|
|
142
|
+
/**
|
|
143
|
+
* Whether this budget configuration is currently active
|
|
144
|
+
*/
|
|
145
|
+
isActive: boolean;
|
|
146
|
+
consumption?: Consumption | 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 CreateBudgetType$inboundSchema: z.ZodNativeEnum<
|
|
159
|
+
typeof CreateBudgetType
|
|
160
|
+
> = z.nativeEnum(CreateBudgetType);
|
|
161
|
+
|
|
162
|
+
/** @internal */
|
|
163
|
+
export const CreateBudgetType$outboundSchema: z.ZodNativeEnum<
|
|
164
|
+
typeof CreateBudgetType
|
|
165
|
+
> = CreateBudgetType$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 CreateBudgetType$ {
|
|
172
|
+
/** @deprecated use `CreateBudgetType$inboundSchema` instead. */
|
|
173
|
+
export const inboundSchema = CreateBudgetType$inboundSchema;
|
|
174
|
+
/** @deprecated use `CreateBudgetType$outboundSchema` instead. */
|
|
175
|
+
export const outboundSchema = CreateBudgetType$outboundSchema;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const Period$inboundSchema: z.ZodNativeEnum<typeof Period> = z
|
|
180
|
+
.nativeEnum(Period);
|
|
181
|
+
|
|
182
|
+
/** @internal */
|
|
183
|
+
export const Period$outboundSchema: z.ZodNativeEnum<typeof Period> =
|
|
184
|
+
Period$inboundSchema;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @internal
|
|
188
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
189
|
+
*/
|
|
190
|
+
export namespace Period$ {
|
|
191
|
+
/** @deprecated use `Period$inboundSchema` instead. */
|
|
192
|
+
export const inboundSchema = Period$inboundSchema;
|
|
193
|
+
/** @deprecated use `Period$outboundSchema` instead. */
|
|
194
|
+
export const outboundSchema = Period$outboundSchema;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** @internal */
|
|
198
|
+
export const CreateBudgetRequestBody$inboundSchema: z.ZodType<
|
|
199
|
+
CreateBudgetRequestBody,
|
|
200
|
+
z.ZodTypeDef,
|
|
201
|
+
unknown
|
|
202
|
+
> = z.object({
|
|
203
|
+
type: CreateBudgetType$inboundSchema,
|
|
204
|
+
entity_id: z.string(),
|
|
205
|
+
period: Period$inboundSchema,
|
|
206
|
+
amount: z.number(),
|
|
207
|
+
}).transform((v) => {
|
|
208
|
+
return remap$(v, {
|
|
209
|
+
"entity_id": "entityId",
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
/** @internal */
|
|
214
|
+
export type CreateBudgetRequestBody$Outbound = {
|
|
215
|
+
type: string;
|
|
216
|
+
entity_id: string;
|
|
217
|
+
period: string;
|
|
218
|
+
amount: number;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/** @internal */
|
|
222
|
+
export const CreateBudgetRequestBody$outboundSchema: z.ZodType<
|
|
223
|
+
CreateBudgetRequestBody$Outbound,
|
|
224
|
+
z.ZodTypeDef,
|
|
225
|
+
CreateBudgetRequestBody
|
|
226
|
+
> = z.object({
|
|
227
|
+
type: CreateBudgetType$outboundSchema,
|
|
228
|
+
entityId: z.string(),
|
|
229
|
+
period: Period$outboundSchema,
|
|
230
|
+
amount: z.number(),
|
|
231
|
+
}).transform((v) => {
|
|
232
|
+
return remap$(v, {
|
|
233
|
+
entityId: "entity_id",
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
240
|
+
*/
|
|
241
|
+
export namespace CreateBudgetRequestBody$ {
|
|
242
|
+
/** @deprecated use `CreateBudgetRequestBody$inboundSchema` instead. */
|
|
243
|
+
export const inboundSchema = CreateBudgetRequestBody$inboundSchema;
|
|
244
|
+
/** @deprecated use `CreateBudgetRequestBody$outboundSchema` instead. */
|
|
245
|
+
export const outboundSchema = CreateBudgetRequestBody$outboundSchema;
|
|
246
|
+
/** @deprecated use `CreateBudgetRequestBody$Outbound` instead. */
|
|
247
|
+
export type Outbound = CreateBudgetRequestBody$Outbound;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function createBudgetRequestBodyToJSON(
|
|
251
|
+
createBudgetRequestBody: CreateBudgetRequestBody,
|
|
252
|
+
): string {
|
|
253
|
+
return JSON.stringify(
|
|
254
|
+
CreateBudgetRequestBody$outboundSchema.parse(createBudgetRequestBody),
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function createBudgetRequestBodyFromJSON(
|
|
259
|
+
jsonString: string,
|
|
260
|
+
): SafeParseResult<CreateBudgetRequestBody, SDKValidationError> {
|
|
261
|
+
return safeParse(
|
|
262
|
+
jsonString,
|
|
263
|
+
(x) => CreateBudgetRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
264
|
+
`Failed to parse 'CreateBudgetRequestBody' from JSON`,
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const CreateBudgetBudgetsType$inboundSchema: z.ZodNativeEnum<
|
|
270
|
+
typeof CreateBudgetBudgetsType
|
|
271
|
+
> = z.nativeEnum(CreateBudgetBudgetsType);
|
|
272
|
+
|
|
273
|
+
/** @internal */
|
|
274
|
+
export const CreateBudgetBudgetsType$outboundSchema: z.ZodNativeEnum<
|
|
275
|
+
typeof CreateBudgetBudgetsType
|
|
276
|
+
> = CreateBudgetBudgetsType$inboundSchema;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @internal
|
|
280
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
281
|
+
*/
|
|
282
|
+
export namespace CreateBudgetBudgetsType$ {
|
|
283
|
+
/** @deprecated use `CreateBudgetBudgetsType$inboundSchema` instead. */
|
|
284
|
+
export const inboundSchema = CreateBudgetBudgetsType$inboundSchema;
|
|
285
|
+
/** @deprecated use `CreateBudgetBudgetsType$outboundSchema` instead. */
|
|
286
|
+
export const outboundSchema = CreateBudgetBudgetsType$outboundSchema;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** @internal */
|
|
290
|
+
export const CreateBudgetPeriod$inboundSchema: z.ZodNativeEnum<
|
|
291
|
+
typeof CreateBudgetPeriod
|
|
292
|
+
> = z.nativeEnum(CreateBudgetPeriod);
|
|
293
|
+
|
|
294
|
+
/** @internal */
|
|
295
|
+
export const CreateBudgetPeriod$outboundSchema: z.ZodNativeEnum<
|
|
296
|
+
typeof CreateBudgetPeriod
|
|
297
|
+
> = CreateBudgetPeriod$inboundSchema;
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
302
|
+
*/
|
|
303
|
+
export namespace CreateBudgetPeriod$ {
|
|
304
|
+
/** @deprecated use `CreateBudgetPeriod$inboundSchema` instead. */
|
|
305
|
+
export const inboundSchema = CreateBudgetPeriod$inboundSchema;
|
|
306
|
+
/** @deprecated use `CreateBudgetPeriod$outboundSchema` instead. */
|
|
307
|
+
export const outboundSchema = CreateBudgetPeriod$outboundSchema;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/** @internal */
|
|
311
|
+
export const CreateBudgetBudget$inboundSchema: z.ZodType<
|
|
312
|
+
CreateBudgetBudget,
|
|
313
|
+
z.ZodTypeDef,
|
|
314
|
+
unknown
|
|
315
|
+
> = z.object({
|
|
316
|
+
period: CreateBudgetPeriod$inboundSchema,
|
|
317
|
+
amount: z.number(),
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
/** @internal */
|
|
321
|
+
export type CreateBudgetBudget$Outbound = {
|
|
322
|
+
period: string;
|
|
323
|
+
amount: number;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/** @internal */
|
|
327
|
+
export const CreateBudgetBudget$outboundSchema: z.ZodType<
|
|
328
|
+
CreateBudgetBudget$Outbound,
|
|
329
|
+
z.ZodTypeDef,
|
|
330
|
+
CreateBudgetBudget
|
|
331
|
+
> = z.object({
|
|
332
|
+
period: CreateBudgetPeriod$outboundSchema,
|
|
333
|
+
amount: z.number(),
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @internal
|
|
338
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
339
|
+
*/
|
|
340
|
+
export namespace CreateBudgetBudget$ {
|
|
341
|
+
/** @deprecated use `CreateBudgetBudget$inboundSchema` instead. */
|
|
342
|
+
export const inboundSchema = CreateBudgetBudget$inboundSchema;
|
|
343
|
+
/** @deprecated use `CreateBudgetBudget$outboundSchema` instead. */
|
|
344
|
+
export const outboundSchema = CreateBudgetBudget$outboundSchema;
|
|
345
|
+
/** @deprecated use `CreateBudgetBudget$Outbound` instead. */
|
|
346
|
+
export type Outbound = CreateBudgetBudget$Outbound;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export function createBudgetBudgetToJSON(
|
|
350
|
+
createBudgetBudget: CreateBudgetBudget,
|
|
351
|
+
): string {
|
|
352
|
+
return JSON.stringify(
|
|
353
|
+
CreateBudgetBudget$outboundSchema.parse(createBudgetBudget),
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export function createBudgetBudgetFromJSON(
|
|
358
|
+
jsonString: string,
|
|
359
|
+
): SafeParseResult<CreateBudgetBudget, SDKValidationError> {
|
|
360
|
+
return safeParse(
|
|
361
|
+
jsonString,
|
|
362
|
+
(x) => CreateBudgetBudget$inboundSchema.parse(JSON.parse(x)),
|
|
363
|
+
`Failed to parse 'CreateBudgetBudget' from JSON`,
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** @internal */
|
|
368
|
+
export const Consumption$inboundSchema: z.ZodType<
|
|
369
|
+
Consumption,
|
|
370
|
+
z.ZodTypeDef,
|
|
371
|
+
unknown
|
|
372
|
+
> = z.object({
|
|
373
|
+
current_amount: z.number(),
|
|
374
|
+
remaining_amount: z.number(),
|
|
375
|
+
period_start: z.nullable(z.string()),
|
|
376
|
+
period_end: z.nullable(z.string()),
|
|
377
|
+
}).transform((v) => {
|
|
378
|
+
return remap$(v, {
|
|
379
|
+
"current_amount": "currentAmount",
|
|
380
|
+
"remaining_amount": "remainingAmount",
|
|
381
|
+
"period_start": "periodStart",
|
|
382
|
+
"period_end": "periodEnd",
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
/** @internal */
|
|
387
|
+
export type Consumption$Outbound = {
|
|
388
|
+
current_amount: number;
|
|
389
|
+
remaining_amount: number;
|
|
390
|
+
period_start: string | null;
|
|
391
|
+
period_end: string | null;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
/** @internal */
|
|
395
|
+
export const Consumption$outboundSchema: z.ZodType<
|
|
396
|
+
Consumption$Outbound,
|
|
397
|
+
z.ZodTypeDef,
|
|
398
|
+
Consumption
|
|
399
|
+
> = z.object({
|
|
400
|
+
currentAmount: z.number(),
|
|
401
|
+
remainingAmount: z.number(),
|
|
402
|
+
periodStart: z.nullable(z.string()),
|
|
403
|
+
periodEnd: z.nullable(z.string()),
|
|
404
|
+
}).transform((v) => {
|
|
405
|
+
return remap$(v, {
|
|
406
|
+
currentAmount: "current_amount",
|
|
407
|
+
remainingAmount: "remaining_amount",
|
|
408
|
+
periodStart: "period_start",
|
|
409
|
+
periodEnd: "period_end",
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @internal
|
|
415
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
416
|
+
*/
|
|
417
|
+
export namespace Consumption$ {
|
|
418
|
+
/** @deprecated use `Consumption$inboundSchema` instead. */
|
|
419
|
+
export const inboundSchema = Consumption$inboundSchema;
|
|
420
|
+
/** @deprecated use `Consumption$outboundSchema` instead. */
|
|
421
|
+
export const outboundSchema = Consumption$outboundSchema;
|
|
422
|
+
/** @deprecated use `Consumption$Outbound` instead. */
|
|
423
|
+
export type Outbound = Consumption$Outbound;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export function consumptionToJSON(consumption: Consumption): string {
|
|
427
|
+
return JSON.stringify(Consumption$outboundSchema.parse(consumption));
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export function consumptionFromJSON(
|
|
431
|
+
jsonString: string,
|
|
432
|
+
): SafeParseResult<Consumption, SDKValidationError> {
|
|
433
|
+
return safeParse(
|
|
434
|
+
jsonString,
|
|
435
|
+
(x) => Consumption$inboundSchema.parse(JSON.parse(x)),
|
|
436
|
+
`Failed to parse 'Consumption' from JSON`,
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** @internal */
|
|
441
|
+
export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
|
|
442
|
+
CreateBudgetResponseBody,
|
|
443
|
+
z.ZodTypeDef,
|
|
444
|
+
unknown
|
|
445
|
+
> = z.object({
|
|
446
|
+
_id: z.string(),
|
|
447
|
+
type: CreateBudgetBudgetsType$inboundSchema,
|
|
448
|
+
contact_id: z.string().optional(),
|
|
449
|
+
api_key_id: z.string().optional(),
|
|
450
|
+
budget: z.lazy(() => CreateBudgetBudget$inboundSchema),
|
|
451
|
+
is_active: z.boolean(),
|
|
452
|
+
consumption: z.lazy(() => Consumption$inboundSchema).optional(),
|
|
453
|
+
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
454
|
+
.optional(),
|
|
455
|
+
updated: z.string().datetime({ offset: true }).default(
|
|
456
|
+
"2025-08-20T07:45:57.493Z",
|
|
457
|
+
).transform(v => new Date(v)),
|
|
458
|
+
}).transform((v) => {
|
|
459
|
+
return remap$(v, {
|
|
460
|
+
"_id": "id",
|
|
461
|
+
"contact_id": "contactId",
|
|
462
|
+
"api_key_id": "apiKeyId",
|
|
463
|
+
"is_active": "isActive",
|
|
464
|
+
});
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
/** @internal */
|
|
468
|
+
export type CreateBudgetResponseBody$Outbound = {
|
|
469
|
+
_id: string;
|
|
470
|
+
type: string;
|
|
471
|
+
contact_id?: string | undefined;
|
|
472
|
+
api_key_id?: string | undefined;
|
|
473
|
+
budget: CreateBudgetBudget$Outbound;
|
|
474
|
+
is_active: boolean;
|
|
475
|
+
consumption?: Consumption$Outbound | undefined;
|
|
476
|
+
created?: string | undefined;
|
|
477
|
+
updated: string;
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
/** @internal */
|
|
481
|
+
export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
|
|
482
|
+
CreateBudgetResponseBody$Outbound,
|
|
483
|
+
z.ZodTypeDef,
|
|
484
|
+
CreateBudgetResponseBody
|
|
485
|
+
> = z.object({
|
|
486
|
+
id: z.string(),
|
|
487
|
+
type: CreateBudgetBudgetsType$outboundSchema,
|
|
488
|
+
contactId: z.string().optional(),
|
|
489
|
+
apiKeyId: z.string().optional(),
|
|
490
|
+
budget: z.lazy(() => CreateBudgetBudget$outboundSchema),
|
|
491
|
+
isActive: z.boolean(),
|
|
492
|
+
consumption: z.lazy(() => Consumption$outboundSchema).optional(),
|
|
493
|
+
created: z.date().transform(v => v.toISOString()).optional(),
|
|
494
|
+
updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
|
|
495
|
+
.transform(v => v.toISOString()),
|
|
496
|
+
}).transform((v) => {
|
|
497
|
+
return remap$(v, {
|
|
498
|
+
id: "_id",
|
|
499
|
+
contactId: "contact_id",
|
|
500
|
+
apiKeyId: "api_key_id",
|
|
501
|
+
isActive: "is_active",
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* @internal
|
|
507
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
508
|
+
*/
|
|
509
|
+
export namespace CreateBudgetResponseBody$ {
|
|
510
|
+
/** @deprecated use `CreateBudgetResponseBody$inboundSchema` instead. */
|
|
511
|
+
export const inboundSchema = CreateBudgetResponseBody$inboundSchema;
|
|
512
|
+
/** @deprecated use `CreateBudgetResponseBody$outboundSchema` instead. */
|
|
513
|
+
export const outboundSchema = CreateBudgetResponseBody$outboundSchema;
|
|
514
|
+
/** @deprecated use `CreateBudgetResponseBody$Outbound` instead. */
|
|
515
|
+
export type Outbound = CreateBudgetResponseBody$Outbound;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export function createBudgetResponseBodyToJSON(
|
|
519
|
+
createBudgetResponseBody: CreateBudgetResponseBody,
|
|
520
|
+
): string {
|
|
521
|
+
return JSON.stringify(
|
|
522
|
+
CreateBudgetResponseBody$outboundSchema.parse(createBudgetResponseBody),
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
export function createBudgetResponseBodyFromJSON(
|
|
527
|
+
jsonString: string,
|
|
528
|
+
): SafeParseResult<CreateBudgetResponseBody, SDKValidationError> {
|
|
529
|
+
return safeParse(
|
|
530
|
+
jsonString,
|
|
531
|
+
(x) => CreateBudgetResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
532
|
+
`Failed to parse 'CreateBudgetResponseBody' from JSON`,
|
|
533
|
+
);
|
|
534
|
+
}
|
|
@@ -182,7 +182,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
182
182
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
183
183
|
.optional(),
|
|
184
184
|
updated: z.string().datetime({ offset: true }).default(
|
|
185
|
-
"2025-08-
|
|
185
|
+
"2025-08-20T07:45:57.493Z",
|
|
186
186
|
).transform(v => new Date(v)),
|
|
187
187
|
}).transform((v) => {
|
|
188
188
|
return remap$(v, {
|
|
@@ -223,7 +223,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
223
223
|
tags: z.array(z.string()).optional(),
|
|
224
224
|
metadata: z.record(z.any()).optional(),
|
|
225
225
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
226
|
-
updated: z.date().default(() => new Date("2025-08-
|
|
226
|
+
updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
|
|
227
227
|
.transform(v => v.toISOString()),
|
|
228
228
|
}).transform((v) => {
|
|
229
229
|
return remap$(v, {
|
|
@@ -211,7 +211,7 @@ export const CreateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
211
211
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
212
212
|
.optional(),
|
|
213
213
|
updated: z.string().datetime({ offset: true }).default(
|
|
214
|
-
"2025-08-
|
|
214
|
+
"2025-08-20T07:45:57.493Z",
|
|
215
215
|
).transform(v => new Date(v)),
|
|
216
216
|
}).transform((v) => {
|
|
217
217
|
return remap$(v, {
|
|
@@ -251,7 +251,7 @@ export const CreateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
251
251
|
updatedById: z.string().optional(),
|
|
252
252
|
metadata: z.lazy(() => CreateDatasetMetadata$outboundSchema),
|
|
253
253
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
254
|
-
updated: z.date().default(() => new Date("2025-08-
|
|
254
|
+
updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
|
|
255
255
|
.transform(v => v.toISOString()),
|
|
256
256
|
}).transform((v) => {
|
|
257
257
|
return remap$(v, {
|
|
@@ -5100,7 +5100,7 @@ export const ResponseBody$inboundSchema: z.ZodType<
|
|
|
5100
5100
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
5101
5101
|
.optional(),
|
|
5102
5102
|
updated: z.string().datetime({ offset: true }).default(
|
|
5103
|
-
"2025-08-
|
|
5103
|
+
"2025-08-20T07:45:57.493Z",
|
|
5104
5104
|
).transform(v => new Date(v)),
|
|
5105
5105
|
}).transform((v) => {
|
|
5106
5106
|
return remap$(v, {
|
|
@@ -5164,7 +5164,7 @@ export const ResponseBody$outboundSchema: z.ZodType<
|
|
|
5164
5164
|
createdById: z.string().optional(),
|
|
5165
5165
|
updatedById: z.string().optional(),
|
|
5166
5166
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
5167
|
-
updated: z.date().default(() => new Date("2025-08-
|
|
5167
|
+
updated: z.date().default(() => new Date("2025-08-20T07:45:57.493Z"))
|
|
5168
5168
|
.transform(v => v.toISOString()),
|
|
5169
5169
|
}).transform((v) => {
|
|
5170
5170
|
return remap$(v, {
|
|
@@ -751,7 +751,7 @@ export const CreateDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
751
751
|
z.ZodTypeDef,
|
|
752
752
|
unknown
|
|
753
753
|
> = z.object({
|
|
754
|
-
_id: z.string().default("
|
|
754
|
+
_id: z.string().default("01K3372EJTYXJT0XSAJAH62DDF"),
|
|
755
755
|
display_name: z.string(),
|
|
756
756
|
description: z.string().optional(),
|
|
757
757
|
status: CreateDatasourceStatus$inboundSchema,
|
|
@@ -795,7 +795,7 @@ export const CreateDatasourceResponseBody$outboundSchema: z.ZodType<
|
|
|
795
795
|
z.ZodTypeDef,
|
|
796
796
|
CreateDatasourceResponseBody
|
|
797
797
|
> = z.object({
|
|
798
|
-
id: z.string().default("
|
|
798
|
+
id: z.string().default("01K3372EJTYXJT0XSAJAH62DDF"),
|
|
799
799
|
displayName: z.string(),
|
|
800
800
|
description: z.string().optional(),
|
|
801
801
|
status: CreateDatasourceStatus$outboundSchema,
|
|
@@ -2399,8 +2399,8 @@ export const ResponseBodyPython$inboundSchema: z.ZodType<
|
|
|
2399
2399
|
> = z.object({
|
|
2400
2400
|
_id: z.string(),
|
|
2401
2401
|
description: z.string(),
|
|
2402
|
-
created: z.string().default("2025-08-
|
|
2403
|
-
updated: z.string().default("2025-08-
|
|
2402
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2403
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2404
2404
|
guardrail_config: z.union([
|
|
2405
2405
|
z.lazy(() =>
|
|
2406
2406
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$inboundSchema
|
|
@@ -2442,8 +2442,8 @@ export const ResponseBodyPython$outboundSchema: z.ZodType<
|
|
|
2442
2442
|
> = z.object({
|
|
2443
2443
|
id: z.string(),
|
|
2444
2444
|
description: z.string(),
|
|
2445
|
-
created: z.string().default("2025-08-
|
|
2446
|
-
updated: z.string().default("2025-08-
|
|
2445
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2446
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2447
2447
|
guardrailConfig: z.union([
|
|
2448
2448
|
z.lazy(() =>
|
|
2449
2449
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONResponseBodyNumber$outboundSchema
|
|
@@ -2856,8 +2856,8 @@ export const ResponseBodyHTTP$inboundSchema: z.ZodType<
|
|
|
2856
2856
|
> = z.object({
|
|
2857
2857
|
_id: z.string(),
|
|
2858
2858
|
description: z.string(),
|
|
2859
|
-
created: z.string().default("2025-08-
|
|
2860
|
-
updated: z.string().default("2025-08-
|
|
2859
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2860
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2861
2861
|
guardrail_config: z.union([
|
|
2862
2862
|
z.lazy(() =>
|
|
2863
2863
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$inboundSchema
|
|
@@ -2905,8 +2905,8 @@ export const ResponseBodyHTTP$outboundSchema: z.ZodType<
|
|
|
2905
2905
|
> = z.object({
|
|
2906
2906
|
id: z.string(),
|
|
2907
2907
|
description: z.string(),
|
|
2908
|
-
created: z.string().default("2025-08-
|
|
2909
|
-
updated: z.string().default("2025-08-
|
|
2908
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2909
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
2910
2910
|
guardrailConfig: z.union([
|
|
2911
2911
|
z.lazy(() =>
|
|
2912
2912
|
CreateEvalGuardrailConfigEvalsResponse200ApplicationJSONNumber$outboundSchema
|
|
@@ -3283,8 +3283,8 @@ export const ResponseBodyJSON$inboundSchema: z.ZodType<
|
|
|
3283
3283
|
> = z.object({
|
|
3284
3284
|
_id: z.string(),
|
|
3285
3285
|
description: z.string(),
|
|
3286
|
-
created: z.string().default("2025-08-
|
|
3287
|
-
updated: z.string().default("2025-08-
|
|
3286
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3287
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3288
3288
|
guardrail_config: z.union([
|
|
3289
3289
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponse200Number$inboundSchema),
|
|
3290
3290
|
z.lazy(() =>
|
|
@@ -3324,8 +3324,8 @@ export const ResponseBodyJSON$outboundSchema: z.ZodType<
|
|
|
3324
3324
|
> = z.object({
|
|
3325
3325
|
id: z.string(),
|
|
3326
3326
|
description: z.string(),
|
|
3327
|
-
created: z.string().default("2025-08-
|
|
3328
|
-
updated: z.string().default("2025-08-
|
|
3327
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3328
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3329
3329
|
guardrailConfig: z.union([
|
|
3330
3330
|
z.lazy(() =>
|
|
3331
3331
|
CreateEvalGuardrailConfigEvalsResponse200Number$outboundSchema
|
|
@@ -3680,8 +3680,8 @@ export const ResponseBodyLLM$inboundSchema: z.ZodType<
|
|
|
3680
3680
|
> = z.object({
|
|
3681
3681
|
_id: z.string(),
|
|
3682
3682
|
description: z.string(),
|
|
3683
|
-
created: z.string().default("2025-08-
|
|
3684
|
-
updated: z.string().default("2025-08-
|
|
3683
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3684
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3685
3685
|
guardrail_config: z.union([
|
|
3686
3686
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$inboundSchema),
|
|
3687
3687
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$inboundSchema),
|
|
@@ -3721,8 +3721,8 @@ export const ResponseBodyLLM$outboundSchema: z.ZodType<
|
|
|
3721
3721
|
> = z.object({
|
|
3722
3722
|
id: z.string(),
|
|
3723
3723
|
description: z.string(),
|
|
3724
|
-
created: z.string().default("2025-08-
|
|
3725
|
-
updated: z.string().default("2025-08-
|
|
3724
|
+
created: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3725
|
+
updated: z.string().default("2025-08-20T07:45:59.790Z"),
|
|
3726
3726
|
guardrailConfig: z.union([
|
|
3727
3727
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseNumber$outboundSchema),
|
|
3728
3728
|
z.lazy(() => CreateEvalGuardrailConfigEvalsResponseBoolean$outboundSchema),
|