@orq-ai/node 4.7.5 → 4.7.7
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/funcs/filesCreate.js +3 -2
- package/funcs/filesCreate.js.map +1 -1
- package/funcs/routerAudioTranscriptionsCreate.js +3 -2
- package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
- package/funcs/routerAudioTranslationsCreate.js +3 -2
- package/funcs/routerAudioTranslationsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +7 -0
- package/lib/encodings.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevals.js +6 -6
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/getv2humanevalsid.js +6 -6
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/patchv2humanevalsid.js +12 -12
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevals.js +12 -12
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/packages/orq-rc/examples/{postV2Feedback.example.ts → postV2FeedbackEvaluationRemove.example.ts} +2 -4
- package/packages/orq-rc/src/funcs/agentsCreate.ts +2 -2
- package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersions.ts → evalsGetV2EvaluatorsIdVersions.ts} +1 -1
- package/packages/orq-rc/src/funcs/{postV2Feedback.ts → feedbackPostV2Feedback.ts} +5 -5
- package/packages/orq-rc/src/funcs/{postV2FeedbackRemove.ts → feedbackPostV2FeedbackRemove.ts} +1 -1
- package/packages/orq-rc/src/funcs/filesCreate.ts +4 -3
- package/packages/orq-rc/src/funcs/{postV2HumanEvals.ts → guardrailRulesCreate.ts} +20 -27
- package/packages/orq-rc/src/funcs/guardrailRulesDelete.ts +170 -0
- package/packages/orq-rc/src/funcs/guardrailRulesList.ts +170 -0
- package/packages/orq-rc/src/funcs/guardrailRulesRetrieve.ts +168 -0
- package/packages/orq-rc/src/funcs/guardrailRulesUpdate.ts +170 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +4 -4
- package/packages/orq-rc/src/funcs/policiesCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/policiesDelete.ts +166 -0
- package/packages/orq-rc/src/funcs/{modelsList.ts → policiesList.ts} +17 -14
- package/packages/orq-rc/src/funcs/{getV2HumanEvalsId.ts → policiesRetrieve.ts} +19 -22
- package/packages/orq-rc/src/funcs/{patchV2HumanEvalsId.ts → policiesUpdate.ts} +20 -24
- package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +4 -3
- package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +4 -3
- package/packages/orq-rc/src/funcs/routingRulesCreate.ts +161 -0
- package/packages/orq-rc/src/funcs/routingRulesDelete.ts +166 -0
- package/packages/orq-rc/src/funcs/{getV2HumanEvals.ts → routingRulesList.ts} +22 -23
- package/packages/orq-rc/src/funcs/{deleteV2HumanEvalsId.ts → routingRulesRetrieve.ts} +20 -24
- package/packages/orq-rc/src/funcs/routingRulesUpdate.ts +166 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/encodings.ts +9 -0
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +9 -6
- package/packages/orq-rc/src/models/components/budgetlimit.ts +83 -0
- package/packages/orq-rc/src/models/components/evaluatorref.ts +89 -0
- package/packages/orq-rc/src/models/components/expression.ts +51 -0
- package/packages/orq-rc/src/models/components/guardrailref.ts +75 -0
- package/packages/orq-rc/src/models/components/guardrailruledocument.ts +66 -0
- package/packages/orq-rc/src/models/components/index.ts +13 -0
- package/packages/orq-rc/src/models/components/limits.ts +70 -0
- package/packages/orq-rc/src/models/components/modelref.ts +64 -0
- package/packages/orq-rc/src/models/components/modelsconfig.ts +73 -0
- package/packages/orq-rc/src/models/components/policydocument.ts +76 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/requestlimit.ts +69 -0
- package/packages/orq-rc/src/models/components/retryconfig.ts +60 -0
- package/packages/orq-rc/src/models/components/routingruledocument.ts +67 -0
- package/packages/orq-rc/src/models/components/tokenlimit.ts +69 -0
- package/packages/orq-rc/src/models/errors/index.ts +0 -5
- package/packages/orq-rc/src/models/errors/postv2feedback.ts +8 -8
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -3
- package/packages/orq-rc/src/models/operations/createchunk.ts +7 -7
- package/packages/orq-rc/src/models/operations/createcontact.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createeval.ts +970 -150
- package/packages/orq-rc/src/models/operations/createidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/createknowledge.ts +17 -19
- package/packages/orq-rc/src/models/operations/createprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/createresponse.ts +11 -11
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -21
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +1 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -21
- package/packages/orq-rc/src/models/operations/getevals.ts +447 -16
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/guardrailrulecreate.ts +124 -0
- package/packages/orq-rc/src/models/operations/guardrailruledelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/guardrailruleget.ts +102 -0
- package/packages/orq-rc/src/models/operations/guardrailrulelist.ts +94 -0
- package/packages/orq-rc/src/models/operations/guardrailruleupdate.ts +153 -0
- package/packages/orq-rc/src/models/operations/index.ts +15 -6
- package/packages/orq-rc/src/models/operations/listagents.ts +0 -3
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/policycreate.ts +138 -0
- package/packages/orq-rc/src/models/operations/policydelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/policyget.ts +110 -0
- package/packages/orq-rc/src/models/operations/policylist.ts +94 -0
- package/packages/orq-rc/src/models/operations/policyupdate.ts +167 -0
- package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +0 -3
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +8 -8
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrieveidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -21
- package/packages/orq-rc/src/models/operations/routingrulecreate.ts +124 -0
- package/packages/orq-rc/src/models/operations/routingruledelete.ts +39 -0
- package/packages/orq-rc/src/models/operations/routingruleget.ts +102 -0
- package/packages/orq-rc/src/models/operations/routingrulelist.ts +94 -0
- package/packages/orq-rc/src/models/operations/routingruleupdate.ts +154 -0
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateagent.ts +0 -3
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +646 -16
- package/packages/orq-rc/src/models/operations/updateidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -22
- package/packages/orq-rc/src/sdk/evals.ts +18 -0
- package/packages/orq-rc/src/sdk/feedback.ts +33 -0
- package/packages/orq-rc/src/sdk/guardrailrules.ts +99 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
- package/packages/orq-rc/src/sdk/policies.ts +99 -0
- package/packages/orq-rc/src/sdk/routingrules.ts +99 -0
- package/packages/orq-rc/src/sdk/sdk.ts +22 -94
- package/src/funcs/filesCreate.ts +4 -3
- package/src/funcs/routerAudioTranscriptionsCreate.ts +4 -3
- package/src/funcs/routerAudioTranslationsCreate.ts +4 -3
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +9 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevals.ts +6 -6
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/getv2humanevalsid.ts +6 -6
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/patchv2humanevalsid.ts +12 -12
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevals.ts +12 -12
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2humanevals.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/postv2humanevals.ts +0 -51
- package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +0 -67
- package/packages/orq-rc/src/models/operations/getv2humanevals.ts +0 -696
- package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +0 -707
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -169
- package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +0 -1362
- package/packages/orq-rc/src/models/operations/postv2humanevals.ts +0 -1193
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
- package/packages/orq-rc/src/sdk/models.ts +0 -27
|
@@ -38,7 +38,7 @@ export type PostV2FeedbackRemoveRequestBody = {
|
|
|
38
38
|
product: PostV2FeedbackRemoveProduct;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
export const
|
|
41
|
+
export const PostV2FeedbackRemoveFeedbackProduct = {
|
|
42
42
|
Remoteconfigs: "remoteconfigs",
|
|
43
43
|
Deployments: "deployments",
|
|
44
44
|
Experiments: "experiments",
|
|
@@ -57,8 +57,8 @@ export const PostV2FeedbackRemoveResponseProduct = {
|
|
|
57
57
|
Otel: "otel",
|
|
58
58
|
AiChat: "ai-chat",
|
|
59
59
|
} as const;
|
|
60
|
-
export type
|
|
61
|
-
typeof
|
|
60
|
+
export type PostV2FeedbackRemoveFeedbackProduct = ClosedEnum<
|
|
61
|
+
typeof PostV2FeedbackRemoveFeedbackProduct
|
|
62
62
|
>;
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -67,7 +67,7 @@ export type PostV2FeedbackRemoveResponseProduct = ClosedEnum<
|
|
|
67
67
|
export type PostV2FeedbackRemoveResponseBody = {
|
|
68
68
|
id: string;
|
|
69
69
|
traceId: string;
|
|
70
|
-
product:
|
|
70
|
+
product: PostV2FeedbackRemoveFeedbackProduct;
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
@@ -108,9 +108,9 @@ export function postV2FeedbackRemoveRequestBodyToJSON(
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
/** @internal */
|
|
111
|
-
export const
|
|
112
|
-
typeof
|
|
113
|
-
> = z.nativeEnum(
|
|
111
|
+
export const PostV2FeedbackRemoveFeedbackProduct$inboundSchema: z.ZodNativeEnum<
|
|
112
|
+
typeof PostV2FeedbackRemoveFeedbackProduct
|
|
113
|
+
> = z.nativeEnum(PostV2FeedbackRemoveFeedbackProduct);
|
|
114
114
|
|
|
115
115
|
/** @internal */
|
|
116
116
|
export const PostV2FeedbackRemoveResponseBody$inboundSchema: z.ZodType<
|
|
@@ -120,7 +120,7 @@ export const PostV2FeedbackRemoveResponseBody$inboundSchema: z.ZodType<
|
|
|
120
120
|
> = z.object({
|
|
121
121
|
id: z.string(),
|
|
122
122
|
trace_id: z.string(),
|
|
123
|
-
product:
|
|
123
|
+
product: PostV2FeedbackRemoveFeedbackProduct$inboundSchema,
|
|
124
124
|
}).transform((v) => {
|
|
125
125
|
return remap$(v, {
|
|
126
126
|
"trace_id": "traceId",
|
|
@@ -271,7 +271,7 @@ export const PostV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
|
|
|
271
271
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
272
272
|
.optional(),
|
|
273
273
|
updated: z.string().datetime({ offset: true }).default(
|
|
274
|
-
"2026-04-
|
|
274
|
+
"2026-04-15T12:53:36.045Z",
|
|
275
275
|
).transform(v => new Date(v)),
|
|
276
276
|
filter_type: z.literal("name"),
|
|
277
277
|
filter_value: z.string(),
|
|
@@ -316,7 +316,7 @@ export const PostV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
|
|
|
316
316
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
317
317
|
.optional(),
|
|
318
318
|
updated: z.string().datetime({ offset: true }).default(
|
|
319
|
-
"2026-04-
|
|
319
|
+
"2026-04-15T12:53:36.045Z",
|
|
320
320
|
).transform(v => new Date(v)),
|
|
321
321
|
filter_type: z.literal("span_type"),
|
|
322
322
|
filter_values: z.array(z.string()),
|
|
@@ -1118,7 +1118,6 @@ export type RetrieveAgentRequestResponseBody = {
|
|
|
1118
1118
|
* Current semantic version of the agent manifest.
|
|
1119
1119
|
*/
|
|
1120
1120
|
version?: string | undefined;
|
|
1121
|
-
versionHash?: string | undefined;
|
|
1122
1121
|
/**
|
|
1123
1122
|
* Entity storage path in the format: `project/folder/subfolder/...`
|
|
1124
1123
|
*
|
|
@@ -2795,7 +2794,6 @@ export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
|
|
|
2795
2794
|
updated: z.string().optional(),
|
|
2796
2795
|
status: RetrieveAgentRequestStatus$inboundSchema,
|
|
2797
2796
|
version: z.string().optional(),
|
|
2798
|
-
version_hash: z.string().optional(),
|
|
2799
2797
|
path: z.string(),
|
|
2800
2798
|
memory_stores: z.array(z.string()).optional(),
|
|
2801
2799
|
team_of_agents: z.array(
|
|
@@ -2824,7 +2822,6 @@ export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
|
|
|
2824
2822
|
"project_id": "projectId",
|
|
2825
2823
|
"created_by_id": "createdById",
|
|
2826
2824
|
"updated_by_id": "updatedById",
|
|
2827
|
-
"version_hash": "versionHash",
|
|
2828
2825
|
"memory_stores": "memoryStores",
|
|
2829
2826
|
"team_of_agents": "teamOfAgents",
|
|
2830
2827
|
"knowledge_bases": "knowledgeBases",
|
|
@@ -1207,7 +1207,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
|
|
|
1207
1207
|
.default("orq"),
|
|
1208
1208
|
reviewed_by_id: z.string(),
|
|
1209
1209
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1210
|
-
"2026-04-
|
|
1210
|
+
"2026-04-15T12:53:52.961Z",
|
|
1211
1211
|
).transform(v => new Date(v)),
|
|
1212
1212
|
type: z.literal("string_array"),
|
|
1213
1213
|
values: z.array(z.string()),
|
|
@@ -1255,7 +1255,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
|
|
|
1255
1255
|
),
|
|
1256
1256
|
reviewed_by_id: z.string(),
|
|
1257
1257
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1258
|
-
"2026-04-
|
|
1258
|
+
"2026-04-15T12:53:52.960Z",
|
|
1259
1259
|
).transform(v => new Date(v)),
|
|
1260
1260
|
type: z.literal("number"),
|
|
1261
1261
|
value: z.number(),
|
|
@@ -1300,7 +1300,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
|
|
|
1300
1300
|
source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
|
|
1301
1301
|
reviewed_by_id: z.string(),
|
|
1302
1302
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1303
|
-
"2026-04-
|
|
1303
|
+
"2026-04-15T12:53:52.960Z",
|
|
1304
1304
|
).transform(v => new Date(v)),
|
|
1305
1305
|
type: z.literal("string"),
|
|
1306
1306
|
value: z.string(),
|
|
@@ -1377,7 +1377,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
1377
1377
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
1378
1378
|
.optional(),
|
|
1379
1379
|
updated: z.string().datetime({ offset: true }).default(
|
|
1380
|
-
"2026-04-
|
|
1380
|
+
"2026-04-15T12:53:36.045Z",
|
|
1381
1381
|
).transform(v => new Date(v)),
|
|
1382
1382
|
}).transform((v) => {
|
|
1383
1383
|
return remap$(v, {
|
|
@@ -126,7 +126,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
126
126
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
127
127
|
.optional(),
|
|
128
128
|
updated: z.string().datetime({ offset: true }).default(
|
|
129
|
-
"2026-04-
|
|
129
|
+
"2026-04-15T12:53:36.045Z",
|
|
130
130
|
).transform(v => new Date(v)),
|
|
131
131
|
}).transform((v) => {
|
|
132
132
|
return remap$(v, {
|
|
@@ -118,7 +118,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
118
118
|
z.ZodTypeDef,
|
|
119
119
|
unknown
|
|
120
120
|
> = z.object({
|
|
121
|
-
_id: z.string().default("
|
|
121
|
+
_id: z.string().default("01KP8K92M5XA3K72RA48PMGPJW"),
|
|
122
122
|
display_name: z.string(),
|
|
123
123
|
description: z.string().optional(),
|
|
124
124
|
status: RetrieveDatasourceStatus$inboundSchema,
|
|
@@ -151,7 +151,7 @@ export const RetrieveIdentityResponseBody$inboundSchema: z.ZodType<
|
|
|
151
151
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
152
152
|
.optional(),
|
|
153
153
|
updated: z.string().datetime({ offset: true }).default(
|
|
154
|
-
"2026-04-
|
|
154
|
+
"2026-04-15T12:53:36.045Z",
|
|
155
155
|
).transform(v => new Date(v)),
|
|
156
156
|
metrics: z.nullable(z.lazy(() => Metrics$inboundSchema)).optional(),
|
|
157
157
|
}).transform((v) => {
|
|
@@ -128,7 +128,6 @@ export type RetrieveToolResponseBodyCodeExecutionTool = {
|
|
|
128
128
|
* The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
129
129
|
*/
|
|
130
130
|
status: RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus;
|
|
131
|
-
versionHash?: string | undefined;
|
|
132
131
|
type: "code";
|
|
133
132
|
codeTool: RetrieveToolResponseBodyCodeTool;
|
|
134
133
|
};
|
|
@@ -255,7 +254,6 @@ export type RetrieveToolResponseBodyMCPTool = {
|
|
|
255
254
|
* The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
256
255
|
*/
|
|
257
256
|
status: RetrieveToolResponseBodyToolsResponse200Status;
|
|
258
|
-
versionHash?: string | undefined;
|
|
259
257
|
type: "mcp";
|
|
260
258
|
mcp: RetrieveToolResponseBodyMcp;
|
|
261
259
|
};
|
|
@@ -417,7 +415,6 @@ export type RetrieveToolResponseBodyHTTPTool = {
|
|
|
417
415
|
* The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
418
416
|
*/
|
|
419
417
|
status: RetrieveToolResponseBodyToolsResponseStatus;
|
|
420
|
-
versionHash?: string | undefined;
|
|
421
418
|
type: "http";
|
|
422
419
|
http: RetrieveToolResponseBodyHttp;
|
|
423
420
|
};
|
|
@@ -519,7 +516,6 @@ export type RetrieveToolResponseBodyJSONSchemaTool = {
|
|
|
519
516
|
* The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
520
517
|
*/
|
|
521
518
|
status: RetrieveToolResponseBodyToolsStatus;
|
|
522
|
-
versionHash?: string | undefined;
|
|
523
519
|
type: "json_schema";
|
|
524
520
|
jsonSchema: RetrieveToolResponseBodyJsonSchema;
|
|
525
521
|
};
|
|
@@ -635,7 +631,6 @@ export type RetrieveToolResponseBodyFunctionTool = {
|
|
|
635
631
|
* The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
636
632
|
*/
|
|
637
633
|
status: RetrieveToolResponseBodyStatus;
|
|
638
|
-
versionHash?: string | undefined;
|
|
639
634
|
type: "function";
|
|
640
635
|
function: RetrieveToolResponseBodyFunction;
|
|
641
636
|
};
|
|
@@ -758,7 +753,7 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
758
753
|
z.ZodTypeDef,
|
|
759
754
|
unknown
|
|
760
755
|
> = z.object({
|
|
761
|
-
_id: z.string().default("
|
|
756
|
+
_id: z.string().default("tool_01KP8K92HGRN8VT2B3FNBE0DMG"),
|
|
762
757
|
path: z.string(),
|
|
763
758
|
key: z.string(),
|
|
764
759
|
display_name: z.string().optional(),
|
|
@@ -772,7 +767,6 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
772
767
|
status:
|
|
773
768
|
RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
|
|
774
769
|
.default("live"),
|
|
775
|
-
version_hash: z.string().optional(),
|
|
776
770
|
type: z.literal("code"),
|
|
777
771
|
code_tool: z.lazy(() => RetrieveToolResponseBodyCodeTool$inboundSchema),
|
|
778
772
|
}).transform((v) => {
|
|
@@ -783,7 +777,6 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
|
|
|
783
777
|
"updated_by_id": "updatedById",
|
|
784
778
|
"project_id": "projectId",
|
|
785
779
|
"workspace_id": "workspaceId",
|
|
786
|
-
"version_hash": "versionHash",
|
|
787
780
|
"code_tool": "codeTool",
|
|
788
781
|
});
|
|
789
782
|
});
|
|
@@ -866,7 +859,7 @@ export const RetrieveToolResponseBodyTools$inboundSchema: z.ZodType<
|
|
|
866
859
|
z.ZodTypeDef,
|
|
867
860
|
unknown
|
|
868
861
|
> = z.object({
|
|
869
|
-
id: z.string().default("
|
|
862
|
+
id: z.string().default("01KP8K92HGDFSZA4DTRCJ1N0T6"),
|
|
870
863
|
name: z.string(),
|
|
871
864
|
description: z.string().optional(),
|
|
872
865
|
schema: z.lazy(() => RetrieveToolResponseBodyToolsSchema$inboundSchema),
|
|
@@ -924,7 +917,7 @@ export const RetrieveToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
924
917
|
z.ZodTypeDef,
|
|
925
918
|
unknown
|
|
926
919
|
> = z.object({
|
|
927
|
-
_id: z.string().default("
|
|
920
|
+
_id: z.string().default("tool_01KP8K92HF3R4BA7RQVN5457X9"),
|
|
928
921
|
path: z.string(),
|
|
929
922
|
key: z.string(),
|
|
930
923
|
display_name: z.string().optional(),
|
|
@@ -938,7 +931,6 @@ export const RetrieveToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
938
931
|
status: RetrieveToolResponseBodyToolsResponse200Status$inboundSchema.default(
|
|
939
932
|
"live",
|
|
940
933
|
),
|
|
941
|
-
version_hash: z.string().optional(),
|
|
942
934
|
type: z.literal("mcp"),
|
|
943
935
|
mcp: z.lazy(() => RetrieveToolResponseBodyMcp$inboundSchema),
|
|
944
936
|
}).transform((v) => {
|
|
@@ -949,7 +941,6 @@ export const RetrieveToolResponseBodyMCPTool$inboundSchema: z.ZodType<
|
|
|
949
941
|
"updated_by_id": "updatedById",
|
|
950
942
|
"project_id": "projectId",
|
|
951
943
|
"workspace_id": "workspaceId",
|
|
952
|
-
"version_hash": "versionHash",
|
|
953
944
|
});
|
|
954
945
|
});
|
|
955
946
|
|
|
@@ -1117,7 +1108,7 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1117
1108
|
z.ZodTypeDef,
|
|
1118
1109
|
unknown
|
|
1119
1110
|
> = z.object({
|
|
1120
|
-
_id: z.string().default("
|
|
1111
|
+
_id: z.string().default("tool_01KP8K92HDMK5JVEW5TM4SEPZC"),
|
|
1121
1112
|
path: z.string(),
|
|
1122
1113
|
key: z.string(),
|
|
1123
1114
|
display_name: z.string().optional(),
|
|
@@ -1131,7 +1122,6 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1131
1122
|
status: RetrieveToolResponseBodyToolsResponseStatus$inboundSchema.default(
|
|
1132
1123
|
"live",
|
|
1133
1124
|
),
|
|
1134
|
-
version_hash: z.string().optional(),
|
|
1135
1125
|
type: z.literal("http"),
|
|
1136
1126
|
http: z.lazy(() => RetrieveToolResponseBodyHttp$inboundSchema),
|
|
1137
1127
|
}).transform((v) => {
|
|
@@ -1142,7 +1132,6 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
|
|
|
1142
1132
|
"updated_by_id": "updatedById",
|
|
1143
1133
|
"project_id": "projectId",
|
|
1144
1134
|
"workspace_id": "workspaceId",
|
|
1145
|
-
"version_hash": "versionHash",
|
|
1146
1135
|
});
|
|
1147
1136
|
});
|
|
1148
1137
|
|
|
@@ -1215,7 +1204,7 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
1215
1204
|
z.ZodTypeDef,
|
|
1216
1205
|
unknown
|
|
1217
1206
|
> = z.object({
|
|
1218
|
-
_id: z.string().default("
|
|
1207
|
+
_id: z.string().default("tool_01KP8K92HCWHTTHGZZ1XRDP3EP"),
|
|
1219
1208
|
path: z.string(),
|
|
1220
1209
|
key: z.string(),
|
|
1221
1210
|
display_name: z.string().optional(),
|
|
@@ -1227,7 +1216,6 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
1227
1216
|
created: z.string(),
|
|
1228
1217
|
updated: z.string(),
|
|
1229
1218
|
status: RetrieveToolResponseBodyToolsStatus$inboundSchema.default("live"),
|
|
1230
|
-
version_hash: z.string().optional(),
|
|
1231
1219
|
type: z.literal("json_schema"),
|
|
1232
1220
|
json_schema: z.lazy(() => RetrieveToolResponseBodyJsonSchema$inboundSchema),
|
|
1233
1221
|
}).transform((v) => {
|
|
@@ -1238,7 +1226,6 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
|
|
|
1238
1226
|
"updated_by_id": "updatedById",
|
|
1239
1227
|
"project_id": "projectId",
|
|
1240
1228
|
"workspace_id": "workspaceId",
|
|
1241
|
-
"version_hash": "versionHash",
|
|
1242
1229
|
"json_schema": "jsonSchema",
|
|
1243
1230
|
});
|
|
1244
1231
|
});
|
|
@@ -1323,7 +1310,7 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
1323
1310
|
z.ZodTypeDef,
|
|
1324
1311
|
unknown
|
|
1325
1312
|
> = z.object({
|
|
1326
|
-
_id: z.string().default("
|
|
1313
|
+
_id: z.string().default("tool_01KP8K92HBA1BP14MWGWQ55ZG6"),
|
|
1327
1314
|
path: z.string(),
|
|
1328
1315
|
key: z.string(),
|
|
1329
1316
|
display_name: z.string().optional(),
|
|
@@ -1335,7 +1322,6 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
1335
1322
|
created: z.string(),
|
|
1336
1323
|
updated: z.string(),
|
|
1337
1324
|
status: RetrieveToolResponseBodyStatus$inboundSchema.default("live"),
|
|
1338
|
-
version_hash: z.string().optional(),
|
|
1339
1325
|
type: z.literal("function"),
|
|
1340
1326
|
function: z.lazy(() => RetrieveToolResponseBodyFunction$inboundSchema),
|
|
1341
1327
|
}).transform((v) => {
|
|
@@ -1346,7 +1332,6 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
|
|
|
1346
1332
|
"updated_by_id": "updatedById",
|
|
1347
1333
|
"project_id": "projectId",
|
|
1348
1334
|
"workspace_id": "workspaceId",
|
|
1349
|
-
"version_hash": "versionHash",
|
|
1350
1335
|
});
|
|
1351
1336
|
});
|
|
1352
1337
|
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type RoutingRuleCreateRequestBody = {
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
displayName: string;
|
|
15
|
+
enabled?: boolean | undefined;
|
|
16
|
+
expression?: components.Expression | undefined;
|
|
17
|
+
modelsConfig?: components.ModelsConfig | undefined;
|
|
18
|
+
priority?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Optional project ID. If null/omitted, the entity is global (workspace-wide).
|
|
21
|
+
*/
|
|
22
|
+
projectId?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Routing rule created successfully
|
|
27
|
+
*/
|
|
28
|
+
export type RoutingRuleCreateResponseBody = {
|
|
29
|
+
id: string;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
createdById: string;
|
|
32
|
+
description?: string | undefined;
|
|
33
|
+
displayName: string;
|
|
34
|
+
enabled: boolean;
|
|
35
|
+
expression?: components.Expression | undefined;
|
|
36
|
+
modelsConfig?: components.ModelsConfig | undefined;
|
|
37
|
+
priority: number;
|
|
38
|
+
projectId: string;
|
|
39
|
+
updatedAt: Date;
|
|
40
|
+
updatedById: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type RoutingRuleCreateRequestBody$Outbound = {
|
|
45
|
+
description?: string | undefined;
|
|
46
|
+
display_name: string;
|
|
47
|
+
enabled?: boolean | undefined;
|
|
48
|
+
expression?: components.Expression$Outbound | undefined;
|
|
49
|
+
models_config?: components.ModelsConfig$Outbound | undefined;
|
|
50
|
+
priority?: number | undefined;
|
|
51
|
+
project_id?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const RoutingRuleCreateRequestBody$outboundSchema: z.ZodType<
|
|
56
|
+
RoutingRuleCreateRequestBody$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
RoutingRuleCreateRequestBody
|
|
59
|
+
> = z.object({
|
|
60
|
+
description: z.string().optional(),
|
|
61
|
+
displayName: z.string(),
|
|
62
|
+
enabled: z.boolean().optional(),
|
|
63
|
+
expression: components.Expression$outboundSchema.optional(),
|
|
64
|
+
modelsConfig: components.ModelsConfig$outboundSchema.optional(),
|
|
65
|
+
priority: z.number().int().optional(),
|
|
66
|
+
projectId: z.string().optional(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
displayName: "display_name",
|
|
70
|
+
modelsConfig: "models_config",
|
|
71
|
+
projectId: "project_id",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function routingRuleCreateRequestBodyToJSON(
|
|
76
|
+
routingRuleCreateRequestBody: RoutingRuleCreateRequestBody,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
RoutingRuleCreateRequestBody$outboundSchema.parse(
|
|
80
|
+
routingRuleCreateRequestBody,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const RoutingRuleCreateResponseBody$inboundSchema: z.ZodType<
|
|
87
|
+
RoutingRuleCreateResponseBody,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
unknown
|
|
90
|
+
> = z.object({
|
|
91
|
+
_id: z.string(),
|
|
92
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
93
|
+
created_by_id: z.string(),
|
|
94
|
+
description: z.string().optional(),
|
|
95
|
+
display_name: z.string(),
|
|
96
|
+
enabled: z.boolean(),
|
|
97
|
+
expression: components.Expression$inboundSchema.optional(),
|
|
98
|
+
models_config: components.ModelsConfig$inboundSchema.optional(),
|
|
99
|
+
priority: z.number().int(),
|
|
100
|
+
project_id: z.string(),
|
|
101
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
102
|
+
updated_by_id: z.string(),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
"_id": "id",
|
|
106
|
+
"created_at": "createdAt",
|
|
107
|
+
"created_by_id": "createdById",
|
|
108
|
+
"display_name": "displayName",
|
|
109
|
+
"models_config": "modelsConfig",
|
|
110
|
+
"project_id": "projectId",
|
|
111
|
+
"updated_at": "updatedAt",
|
|
112
|
+
"updated_by_id": "updatedById",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export function routingRuleCreateResponseBodyFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<RoutingRuleCreateResponseBody, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => RoutingRuleCreateResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'RoutingRuleCreateResponseBody' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type RoutingRuleDeleteRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the routing rule
|
|
11
|
+
*/
|
|
12
|
+
routingRuleId: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type RoutingRuleDeleteRequest$Outbound = {
|
|
17
|
+
routing_rule_id: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const RoutingRuleDeleteRequest$outboundSchema: z.ZodType<
|
|
22
|
+
RoutingRuleDeleteRequest$Outbound,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
RoutingRuleDeleteRequest
|
|
25
|
+
> = z.object({
|
|
26
|
+
routingRuleId: z.string(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
routingRuleId: "routing_rule_id",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function routingRuleDeleteRequestToJSON(
|
|
34
|
+
routingRuleDeleteRequest: RoutingRuleDeleteRequest,
|
|
35
|
+
): string {
|
|
36
|
+
return JSON.stringify(
|
|
37
|
+
RoutingRuleDeleteRequest$outboundSchema.parse(routingRuleDeleteRequest),
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type RoutingRuleGetRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The ID of the routing rule
|
|
15
|
+
*/
|
|
16
|
+
routingRuleId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Routing rule retrieved successfully
|
|
21
|
+
*/
|
|
22
|
+
export type RoutingRuleGetResponseBody = {
|
|
23
|
+
id: string;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
createdById: string;
|
|
26
|
+
description?: string | undefined;
|
|
27
|
+
displayName: string;
|
|
28
|
+
enabled: boolean;
|
|
29
|
+
expression?: components.Expression | undefined;
|
|
30
|
+
modelsConfig?: components.ModelsConfig | undefined;
|
|
31
|
+
priority: number;
|
|
32
|
+
projectId: string;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
updatedById: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type RoutingRuleGetRequest$Outbound = {
|
|
39
|
+
routing_rule_id: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const RoutingRuleGetRequest$outboundSchema: z.ZodType<
|
|
44
|
+
RoutingRuleGetRequest$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
RoutingRuleGetRequest
|
|
47
|
+
> = z.object({
|
|
48
|
+
routingRuleId: z.string(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
routingRuleId: "routing_rule_id",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function routingRuleGetRequestToJSON(
|
|
56
|
+
routingRuleGetRequest: RoutingRuleGetRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
RoutingRuleGetRequest$outboundSchema.parse(routingRuleGetRequest),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const RoutingRuleGetResponseBody$inboundSchema: z.ZodType<
|
|
65
|
+
RoutingRuleGetResponseBody,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
unknown
|
|
68
|
+
> = z.object({
|
|
69
|
+
_id: z.string(),
|
|
70
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
71
|
+
created_by_id: z.string(),
|
|
72
|
+
description: z.string().optional(),
|
|
73
|
+
display_name: z.string(),
|
|
74
|
+
enabled: z.boolean(),
|
|
75
|
+
expression: components.Expression$inboundSchema.optional(),
|
|
76
|
+
models_config: components.ModelsConfig$inboundSchema.optional(),
|
|
77
|
+
priority: z.number().int(),
|
|
78
|
+
project_id: z.string(),
|
|
79
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
80
|
+
updated_by_id: z.string(),
|
|
81
|
+
}).transform((v) => {
|
|
82
|
+
return remap$(v, {
|
|
83
|
+
"_id": "id",
|
|
84
|
+
"created_at": "createdAt",
|
|
85
|
+
"created_by_id": "createdById",
|
|
86
|
+
"display_name": "displayName",
|
|
87
|
+
"models_config": "modelsConfig",
|
|
88
|
+
"project_id": "projectId",
|
|
89
|
+
"updated_at": "updatedAt",
|
|
90
|
+
"updated_by_id": "updatedById",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export function routingRuleGetResponseBodyFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<RoutingRuleGetResponseBody, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => RoutingRuleGetResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'RoutingRuleGetResponseBody' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type RoutingRuleListRequest = {
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* A cursor for use in pagination.
|
|
16
|
+
*/
|
|
17
|
+
startingAfter?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* A cursor for use in pagination.
|
|
20
|
+
*/
|
|
21
|
+
endingBefore?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Optional filter by project ID.
|
|
24
|
+
*/
|
|
25
|
+
projectId?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Routing rules retrieved successfully
|
|
30
|
+
*/
|
|
31
|
+
export type RoutingRuleListResponseBody = {
|
|
32
|
+
data: Array<components.RoutingRuleDocument> | null;
|
|
33
|
+
hasMore: boolean;
|
|
34
|
+
object: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export type RoutingRuleListRequest$Outbound = {
|
|
39
|
+
limit: number;
|
|
40
|
+
starting_after?: string | undefined;
|
|
41
|
+
ending_before?: string | undefined;
|
|
42
|
+
project_id?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const RoutingRuleListRequest$outboundSchema: z.ZodType<
|
|
47
|
+
RoutingRuleListRequest$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
RoutingRuleListRequest
|
|
50
|
+
> = z.object({
|
|
51
|
+
limit: z.number().int().default(10),
|
|
52
|
+
startingAfter: z.string().optional(),
|
|
53
|
+
endingBefore: z.string().optional(),
|
|
54
|
+
projectId: z.string().optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
startingAfter: "starting_after",
|
|
58
|
+
endingBefore: "ending_before",
|
|
59
|
+
projectId: "project_id",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function routingRuleListRequestToJSON(
|
|
64
|
+
routingRuleListRequest: RoutingRuleListRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
RoutingRuleListRequest$outboundSchema.parse(routingRuleListRequest),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const RoutingRuleListResponseBody$inboundSchema: z.ZodType<
|
|
73
|
+
RoutingRuleListResponseBody,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
unknown
|
|
76
|
+
> = z.object({
|
|
77
|
+
data: z.nullable(z.array(components.RoutingRuleDocument$inboundSchema)),
|
|
78
|
+
has_more: z.boolean(),
|
|
79
|
+
object: z.string(),
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
"has_more": "hasMore",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export function routingRuleListResponseBodyFromJSON(
|
|
87
|
+
jsonString: string,
|
|
88
|
+
): SafeParseResult<RoutingRuleListResponseBody, SDKValidationError> {
|
|
89
|
+
return safeParse(
|
|
90
|
+
jsonString,
|
|
91
|
+
(x) => RoutingRuleListResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'RoutingRuleListResponseBody' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|