@orq-ai/node 3.3.10 → 3.3.13
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 +39 -39
- package/bin/mcp-server.js.map +21 -21
- 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/bulkcreatedatapoints.js +2 -2
- 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/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.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/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.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/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +2 -4
- package/packages/orq-rc/README.md +68 -17
- package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -83
- package/packages/orq-rc/docs/sdks/memorystores/README.md +1211 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +74 -0
- package/packages/orq-rc/docs/sdks/sessions/README.md +385 -0
- package/packages/orq-rc/docs/sdks/tools/README.md +425 -0
- 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/memoryStoresCreate.ts +165 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +169 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +164 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +162 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +172 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +175 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +171 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +172 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +167 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +162 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +168 -0
- package/packages/orq-rc/src/funcs/postV2TracesSessionsCount.ts +155 -0
- package/packages/orq-rc/src/funcs/sessionsCreate.ts +159 -0
- package/packages/orq-rc/src/funcs/sessionsDelete.ts +170 -0
- package/packages/orq-rc/src/funcs/sessionsGet.ts +169 -0
- package/packages/orq-rc/src/funcs/sessionsList.ts +157 -0
- package/packages/orq-rc/src/funcs/sessionsUpdate.ts +170 -0
- package/packages/orq-rc/src/funcs/toolsCreate.ts +157 -0
- package/packages/orq-rc/src/funcs/toolsDelete.ts +161 -0
- package/packages/orq-rc/src/funcs/toolsList.ts +170 -0
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +160 -0
- package/packages/orq-rc/src/funcs/{knowledgeSearch.ts → toolsUpdate.ts} +18 -15
- 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/prompts.ts +8 -1
- package/packages/orq-rc/src/mcp-server/resources.ts +16 -2
- package/packages/orq-rc/src/mcp-server/server.ts +55 -5
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/postV2TracesSessionsCount.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/{knowledgeSearch.ts → sessionsGet.ts} +8 -6
- package/packages/orq-rc/src/mcp-server/tools/sessionsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools.ts +6 -3
- package/packages/orq-rc/src/models/components/deployments.ts +124 -29
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchunk.ts +99 -41
- 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 +10 -10
- package/packages/orq-rc/src/models/operations/createknowledge.ts +175 -14
- package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +1619 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +6 -6
- package/packages/orq-rc/src/models/operations/createsession.ts +632 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +2297 -0
- package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
- package/packages/orq-rc/src/models/operations/deletesession.ts +78 -0
- package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +57 -35
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +124 -29
- package/packages/orq-rc/src/models/operations/deployments.ts +3 -3
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +135 -30
- 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/getallmemories.ts +315 -0
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1061 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -3
- package/packages/orq-rc/src/models/operations/getalltools.ts +1382 -0
- package/packages/orq-rc/src/models/operations/getonechunk.ts +8 -8
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +92 -8
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -3
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -3
- package/packages/orq-rc/src/models/operations/getsession.ts +400 -0
- package/packages/orq-rc/src/models/operations/index.ts +26 -1
- package/packages/orq-rc/src/models/operations/listchunks.ts +8 -8
- 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 +10 -10
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +94 -8
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -3
- package/packages/orq-rc/src/models/operations/listsessions.ts +6732 -0
- package/packages/orq-rc/src/models/operations/postv2tracessessionscount.ts +7043 -0
- 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 +10 -10
- package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +944 -0
- package/packages/orq-rc/src/models/operations/retrievetool.ts +1350 -0
- package/packages/orq-rc/src/models/operations/updatechunk.ts +10 -10
- 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 +10 -10
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +201 -20
- package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +1148 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatesession.ts +731 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +2464 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +0 -15
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/sdk.ts +36 -1
- package/packages/orq-rc/src/sdk/sessions.ts +99 -0
- package/packages/orq-rc/src/sdk/tools.ts +99 -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/bulkcreatedatapoints.ts +2 -2
- 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/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.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/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.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/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
|
@@ -0,0 +1,2297 @@
|
|
|
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
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
export const CreateToolRequestBodyStatus = {
|
|
16
|
+
Live: "live",
|
|
17
|
+
Draft: "draft",
|
|
18
|
+
Pending: "pending",
|
|
19
|
+
Published: "published",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
export type CreateToolRequestBodyStatus = ClosedEnum<
|
|
25
|
+
typeof CreateToolRequestBodyStatus
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
export const CreateToolRequestBodyToolsType = {
|
|
29
|
+
OrqHttp: "orq_http",
|
|
30
|
+
} as const;
|
|
31
|
+
export type CreateToolRequestBodyToolsType = ClosedEnum<
|
|
32
|
+
typeof CreateToolRequestBodyToolsType
|
|
33
|
+
>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The HTTP method to use.
|
|
37
|
+
*/
|
|
38
|
+
export const Method = {
|
|
39
|
+
Get: "GET",
|
|
40
|
+
Post: "POST",
|
|
41
|
+
Put: "PUT",
|
|
42
|
+
Delete: "DELETE",
|
|
43
|
+
} as const;
|
|
44
|
+
/**
|
|
45
|
+
* The HTTP method to use.
|
|
46
|
+
*/
|
|
47
|
+
export type Method = ClosedEnum<typeof Method>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
51
|
+
*/
|
|
52
|
+
export type Blueprint = {
|
|
53
|
+
/**
|
|
54
|
+
* The URL to send the request to.
|
|
55
|
+
*/
|
|
56
|
+
url: string;
|
|
57
|
+
/**
|
|
58
|
+
* The HTTP method to use.
|
|
59
|
+
*/
|
|
60
|
+
method: Method;
|
|
61
|
+
/**
|
|
62
|
+
* The headers to send with the request.
|
|
63
|
+
*/
|
|
64
|
+
headers?: { [k: string]: string } | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* The body to send with the request.
|
|
67
|
+
*/
|
|
68
|
+
body?: { [k: string]: any } | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The type of the argument.
|
|
73
|
+
*/
|
|
74
|
+
export const CreateToolRequestBodyToolsRequestType = {
|
|
75
|
+
String: "string",
|
|
76
|
+
Number: "number",
|
|
77
|
+
Boolean: "boolean",
|
|
78
|
+
} as const;
|
|
79
|
+
/**
|
|
80
|
+
* The type of the argument.
|
|
81
|
+
*/
|
|
82
|
+
export type CreateToolRequestBodyToolsRequestType = ClosedEnum<
|
|
83
|
+
typeof CreateToolRequestBodyToolsRequestType
|
|
84
|
+
>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The default value of the argument.
|
|
88
|
+
*/
|
|
89
|
+
export type DefaultValue = string | number | boolean;
|
|
90
|
+
|
|
91
|
+
export type Arguments = {
|
|
92
|
+
/**
|
|
93
|
+
* The type of the argument.
|
|
94
|
+
*/
|
|
95
|
+
type: CreateToolRequestBodyToolsRequestType;
|
|
96
|
+
/**
|
|
97
|
+
* A description of the argument.
|
|
98
|
+
*/
|
|
99
|
+
description: string;
|
|
100
|
+
/**
|
|
101
|
+
* Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
|
|
102
|
+
*/
|
|
103
|
+
sendToModel?: boolean | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* The default value of the argument.
|
|
106
|
+
*/
|
|
107
|
+
defaultValue?: string | number | boolean | undefined;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export type Http = {
|
|
111
|
+
/**
|
|
112
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
113
|
+
*/
|
|
114
|
+
blueprint: Blueprint;
|
|
115
|
+
/**
|
|
116
|
+
* The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
|
|
117
|
+
*/
|
|
118
|
+
arguments?: { [k: string]: Arguments } | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export type RequestBody3 = {
|
|
122
|
+
/**
|
|
123
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
124
|
+
*/
|
|
125
|
+
path: string;
|
|
126
|
+
/**
|
|
127
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
128
|
+
*/
|
|
129
|
+
key: string;
|
|
130
|
+
/**
|
|
131
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
132
|
+
*/
|
|
133
|
+
description: string;
|
|
134
|
+
/**
|
|
135
|
+
* 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.
|
|
136
|
+
*/
|
|
137
|
+
status: CreateToolRequestBodyStatus;
|
|
138
|
+
versionHash: string;
|
|
139
|
+
type: CreateToolRequestBodyToolsType;
|
|
140
|
+
http: Http;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* 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.
|
|
145
|
+
*/
|
|
146
|
+
export const RequestBodyStatus = {
|
|
147
|
+
Live: "live",
|
|
148
|
+
Draft: "draft",
|
|
149
|
+
Pending: "pending",
|
|
150
|
+
Published: "published",
|
|
151
|
+
} as const;
|
|
152
|
+
/**
|
|
153
|
+
* 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.
|
|
154
|
+
*/
|
|
155
|
+
export type RequestBodyStatus = ClosedEnum<typeof RequestBodyStatus>;
|
|
156
|
+
|
|
157
|
+
export const CreateToolRequestBodyType = {
|
|
158
|
+
JsonSchema: "json_schema",
|
|
159
|
+
} as const;
|
|
160
|
+
export type CreateToolRequestBodyType = ClosedEnum<
|
|
161
|
+
typeof CreateToolRequestBodyType
|
|
162
|
+
>;
|
|
163
|
+
|
|
164
|
+
export type RequestBodyJsonSchema = {
|
|
165
|
+
/**
|
|
166
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
167
|
+
*/
|
|
168
|
+
name: string;
|
|
169
|
+
/**
|
|
170
|
+
* A description of what the response format is for. This will be shown to the user.
|
|
171
|
+
*/
|
|
172
|
+
description?: string | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
175
|
+
*/
|
|
176
|
+
schema: { [k: string]: any };
|
|
177
|
+
/**
|
|
178
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
|
|
179
|
+
*/
|
|
180
|
+
strict?: boolean | null | undefined;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export type RequestBody2 = {
|
|
184
|
+
/**
|
|
185
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
186
|
+
*/
|
|
187
|
+
path: string;
|
|
188
|
+
/**
|
|
189
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
190
|
+
*/
|
|
191
|
+
key: string;
|
|
192
|
+
/**
|
|
193
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
194
|
+
*/
|
|
195
|
+
description: string;
|
|
196
|
+
/**
|
|
197
|
+
* 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.
|
|
198
|
+
*/
|
|
199
|
+
status: RequestBodyStatus;
|
|
200
|
+
versionHash: string;
|
|
201
|
+
type: CreateToolRequestBodyType;
|
|
202
|
+
jsonSchema: RequestBodyJsonSchema;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 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.
|
|
207
|
+
*/
|
|
208
|
+
export const CreateToolRequestBodyToolsStatus = {
|
|
209
|
+
Live: "live",
|
|
210
|
+
Draft: "draft",
|
|
211
|
+
Pending: "pending",
|
|
212
|
+
Published: "published",
|
|
213
|
+
} as const;
|
|
214
|
+
/**
|
|
215
|
+
* 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.
|
|
216
|
+
*/
|
|
217
|
+
export type CreateToolRequestBodyToolsStatus = ClosedEnum<
|
|
218
|
+
typeof CreateToolRequestBodyToolsStatus
|
|
219
|
+
>;
|
|
220
|
+
|
|
221
|
+
export const RequestBodyType = {
|
|
222
|
+
Function: "function",
|
|
223
|
+
} as const;
|
|
224
|
+
export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
|
|
225
|
+
|
|
226
|
+
export type RequestBodyFunction = {
|
|
227
|
+
/**
|
|
228
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
229
|
+
*/
|
|
230
|
+
name: string;
|
|
231
|
+
/**
|
|
232
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
233
|
+
*/
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
|
|
237
|
+
*/
|
|
238
|
+
strict?: boolean | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
241
|
+
*/
|
|
242
|
+
parameters?: { [k: string]: any } | undefined;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export type RequestBody1 = {
|
|
246
|
+
/**
|
|
247
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
248
|
+
*/
|
|
249
|
+
path: string;
|
|
250
|
+
/**
|
|
251
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
252
|
+
*/
|
|
253
|
+
key: string;
|
|
254
|
+
/**
|
|
255
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
256
|
+
*/
|
|
257
|
+
description: string;
|
|
258
|
+
/**
|
|
259
|
+
* 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.
|
|
260
|
+
*/
|
|
261
|
+
status: CreateToolRequestBodyToolsStatus;
|
|
262
|
+
versionHash: string;
|
|
263
|
+
type: RequestBodyType;
|
|
264
|
+
function: RequestBodyFunction;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The tool to create
|
|
269
|
+
*/
|
|
270
|
+
export type CreateToolRequestBody = RequestBody1 | RequestBody2 | RequestBody3;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* 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.
|
|
274
|
+
*/
|
|
275
|
+
export const CreateToolResponseBodyToolsStatus = {
|
|
276
|
+
Live: "live",
|
|
277
|
+
Draft: "draft",
|
|
278
|
+
Pending: "pending",
|
|
279
|
+
Published: "published",
|
|
280
|
+
} as const;
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
*/
|
|
284
|
+
export type CreateToolResponseBodyToolsStatus = ClosedEnum<
|
|
285
|
+
typeof CreateToolResponseBodyToolsStatus
|
|
286
|
+
>;
|
|
287
|
+
|
|
288
|
+
export const CreateToolResponseBodyToolsType = {
|
|
289
|
+
OrqHttp: "orq_http",
|
|
290
|
+
} as const;
|
|
291
|
+
export type CreateToolResponseBodyToolsType = ClosedEnum<
|
|
292
|
+
typeof CreateToolResponseBodyToolsType
|
|
293
|
+
>;
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* The HTTP method to use.
|
|
297
|
+
*/
|
|
298
|
+
export const ResponseBodyMethod = {
|
|
299
|
+
Get: "GET",
|
|
300
|
+
Post: "POST",
|
|
301
|
+
Put: "PUT",
|
|
302
|
+
Delete: "DELETE",
|
|
303
|
+
} as const;
|
|
304
|
+
/**
|
|
305
|
+
* The HTTP method to use.
|
|
306
|
+
*/
|
|
307
|
+
export type ResponseBodyMethod = ClosedEnum<typeof ResponseBodyMethod>;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
311
|
+
*/
|
|
312
|
+
export type ResponseBodyBlueprint = {
|
|
313
|
+
/**
|
|
314
|
+
* The URL to send the request to.
|
|
315
|
+
*/
|
|
316
|
+
url: string;
|
|
317
|
+
/**
|
|
318
|
+
* The HTTP method to use.
|
|
319
|
+
*/
|
|
320
|
+
method: ResponseBodyMethod;
|
|
321
|
+
/**
|
|
322
|
+
* The headers to send with the request.
|
|
323
|
+
*/
|
|
324
|
+
headers?: { [k: string]: string } | undefined;
|
|
325
|
+
/**
|
|
326
|
+
* The body to send with the request.
|
|
327
|
+
*/
|
|
328
|
+
body?: { [k: string]: any } | undefined;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* The type of the argument.
|
|
333
|
+
*/
|
|
334
|
+
export const CreateToolResponseBodyToolsResponseType = {
|
|
335
|
+
String: "string",
|
|
336
|
+
Number: "number",
|
|
337
|
+
Boolean: "boolean",
|
|
338
|
+
} as const;
|
|
339
|
+
/**
|
|
340
|
+
* The type of the argument.
|
|
341
|
+
*/
|
|
342
|
+
export type CreateToolResponseBodyToolsResponseType = ClosedEnum<
|
|
343
|
+
typeof CreateToolResponseBodyToolsResponseType
|
|
344
|
+
>;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* The default value of the argument.
|
|
348
|
+
*/
|
|
349
|
+
export type ResponseBodyDefaultValue = string | number | boolean;
|
|
350
|
+
|
|
351
|
+
export type ResponseBodyArguments = {
|
|
352
|
+
/**
|
|
353
|
+
* The type of the argument.
|
|
354
|
+
*/
|
|
355
|
+
type: CreateToolResponseBodyToolsResponseType;
|
|
356
|
+
/**
|
|
357
|
+
* A description of the argument.
|
|
358
|
+
*/
|
|
359
|
+
description: string;
|
|
360
|
+
/**
|
|
361
|
+
* Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
|
|
362
|
+
*/
|
|
363
|
+
sendToModel?: boolean | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* The default value of the argument.
|
|
366
|
+
*/
|
|
367
|
+
defaultValue?: string | number | boolean | undefined;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
export type ResponseBodyHttp = {
|
|
371
|
+
/**
|
|
372
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
373
|
+
*/
|
|
374
|
+
blueprint: ResponseBodyBlueprint;
|
|
375
|
+
/**
|
|
376
|
+
* The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
|
|
377
|
+
*/
|
|
378
|
+
arguments?: { [k: string]: ResponseBodyArguments } | undefined;
|
|
379
|
+
};
|
|
380
|
+
|
|
381
|
+
export type ResponseBody3 = {
|
|
382
|
+
id?: string | undefined;
|
|
383
|
+
/**
|
|
384
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
385
|
+
*/
|
|
386
|
+
path: string;
|
|
387
|
+
/**
|
|
388
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
389
|
+
*/
|
|
390
|
+
key: string;
|
|
391
|
+
/**
|
|
392
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
393
|
+
*/
|
|
394
|
+
description: string;
|
|
395
|
+
/**
|
|
396
|
+
* The id of the user that created the tool
|
|
397
|
+
*/
|
|
398
|
+
createdById?: string | undefined;
|
|
399
|
+
/**
|
|
400
|
+
* The id of the user that last updated the tool
|
|
401
|
+
*/
|
|
402
|
+
updatedById?: string | undefined;
|
|
403
|
+
projectId: string;
|
|
404
|
+
workspaceId: string;
|
|
405
|
+
created: string;
|
|
406
|
+
updated: string;
|
|
407
|
+
/**
|
|
408
|
+
* 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.
|
|
409
|
+
*/
|
|
410
|
+
status: CreateToolResponseBodyToolsStatus;
|
|
411
|
+
versionHash: string;
|
|
412
|
+
type: CreateToolResponseBodyToolsType;
|
|
413
|
+
http: ResponseBodyHttp;
|
|
414
|
+
};
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* 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
|
+
*/
|
|
419
|
+
export const CreateToolResponseBodyStatus = {
|
|
420
|
+
Live: "live",
|
|
421
|
+
Draft: "draft",
|
|
422
|
+
Pending: "pending",
|
|
423
|
+
Published: "published",
|
|
424
|
+
} as const;
|
|
425
|
+
/**
|
|
426
|
+
* 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.
|
|
427
|
+
*/
|
|
428
|
+
export type CreateToolResponseBodyStatus = ClosedEnum<
|
|
429
|
+
typeof CreateToolResponseBodyStatus
|
|
430
|
+
>;
|
|
431
|
+
|
|
432
|
+
export const CreateToolResponseBodyType = {
|
|
433
|
+
JsonSchema: "json_schema",
|
|
434
|
+
} as const;
|
|
435
|
+
export type CreateToolResponseBodyType = ClosedEnum<
|
|
436
|
+
typeof CreateToolResponseBodyType
|
|
437
|
+
>;
|
|
438
|
+
|
|
439
|
+
export type ResponseBodyJsonSchema = {
|
|
440
|
+
/**
|
|
441
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
442
|
+
*/
|
|
443
|
+
name: string;
|
|
444
|
+
/**
|
|
445
|
+
* A description of what the response format is for. This will be shown to the user.
|
|
446
|
+
*/
|
|
447
|
+
description?: string | undefined;
|
|
448
|
+
/**
|
|
449
|
+
* The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
450
|
+
*/
|
|
451
|
+
schema: { [k: string]: any };
|
|
452
|
+
/**
|
|
453
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
|
|
454
|
+
*/
|
|
455
|
+
strict?: boolean | null | undefined;
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
export type ResponseBody2 = {
|
|
459
|
+
id?: string | undefined;
|
|
460
|
+
/**
|
|
461
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
462
|
+
*/
|
|
463
|
+
path: string;
|
|
464
|
+
/**
|
|
465
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
466
|
+
*/
|
|
467
|
+
key: string;
|
|
468
|
+
/**
|
|
469
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
470
|
+
*/
|
|
471
|
+
description: string;
|
|
472
|
+
/**
|
|
473
|
+
* The id of the user that created the tool
|
|
474
|
+
*/
|
|
475
|
+
createdById?: string | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* The id of the user that last updated the tool
|
|
478
|
+
*/
|
|
479
|
+
updatedById?: string | undefined;
|
|
480
|
+
projectId: string;
|
|
481
|
+
workspaceId: string;
|
|
482
|
+
created: string;
|
|
483
|
+
updated: string;
|
|
484
|
+
/**
|
|
485
|
+
* 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.
|
|
486
|
+
*/
|
|
487
|
+
status: CreateToolResponseBodyStatus;
|
|
488
|
+
versionHash: string;
|
|
489
|
+
type: CreateToolResponseBodyType;
|
|
490
|
+
jsonSchema: ResponseBodyJsonSchema;
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* 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.
|
|
495
|
+
*/
|
|
496
|
+
export const ResponseBodyStatus = {
|
|
497
|
+
Live: "live",
|
|
498
|
+
Draft: "draft",
|
|
499
|
+
Pending: "pending",
|
|
500
|
+
Published: "published",
|
|
501
|
+
} as const;
|
|
502
|
+
/**
|
|
503
|
+
* 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.
|
|
504
|
+
*/
|
|
505
|
+
export type ResponseBodyStatus = ClosedEnum<typeof ResponseBodyStatus>;
|
|
506
|
+
|
|
507
|
+
export const ResponseBodyType = {
|
|
508
|
+
Function: "function",
|
|
509
|
+
} as const;
|
|
510
|
+
export type ResponseBodyType = ClosedEnum<typeof ResponseBodyType>;
|
|
511
|
+
|
|
512
|
+
export type ResponseBodyFunction = {
|
|
513
|
+
/**
|
|
514
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
515
|
+
*/
|
|
516
|
+
name: string;
|
|
517
|
+
/**
|
|
518
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
519
|
+
*/
|
|
520
|
+
description?: string | undefined;
|
|
521
|
+
/**
|
|
522
|
+
* Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Currently only compatible with `OpenAI` models.
|
|
523
|
+
*/
|
|
524
|
+
strict?: boolean | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
527
|
+
*/
|
|
528
|
+
parameters?: { [k: string]: any } | undefined;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
export type ResponseBody1 = {
|
|
532
|
+
id?: string | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
535
|
+
*/
|
|
536
|
+
path: string;
|
|
537
|
+
/**
|
|
538
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
539
|
+
*/
|
|
540
|
+
key: string;
|
|
541
|
+
/**
|
|
542
|
+
* A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
|
|
543
|
+
*/
|
|
544
|
+
description: string;
|
|
545
|
+
/**
|
|
546
|
+
* The id of the user that created the tool
|
|
547
|
+
*/
|
|
548
|
+
createdById?: string | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* The id of the user that last updated the tool
|
|
551
|
+
*/
|
|
552
|
+
updatedById?: string | undefined;
|
|
553
|
+
projectId: string;
|
|
554
|
+
workspaceId: string;
|
|
555
|
+
created: string;
|
|
556
|
+
updated: string;
|
|
557
|
+
/**
|
|
558
|
+
* 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.
|
|
559
|
+
*/
|
|
560
|
+
status: ResponseBodyStatus;
|
|
561
|
+
versionHash: string;
|
|
562
|
+
type: ResponseBodyType;
|
|
563
|
+
function: ResponseBodyFunction;
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Successfully created the tool.
|
|
568
|
+
*/
|
|
569
|
+
export type CreateToolResponseBody =
|
|
570
|
+
| ResponseBody1
|
|
571
|
+
| ResponseBody2
|
|
572
|
+
| ResponseBody3;
|
|
573
|
+
|
|
574
|
+
/** @internal */
|
|
575
|
+
export const CreateToolRequestBodyStatus$inboundSchema: z.ZodNativeEnum<
|
|
576
|
+
typeof CreateToolRequestBodyStatus
|
|
577
|
+
> = z.nativeEnum(CreateToolRequestBodyStatus);
|
|
578
|
+
|
|
579
|
+
/** @internal */
|
|
580
|
+
export const CreateToolRequestBodyStatus$outboundSchema: z.ZodNativeEnum<
|
|
581
|
+
typeof CreateToolRequestBodyStatus
|
|
582
|
+
> = CreateToolRequestBodyStatus$inboundSchema;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* @internal
|
|
586
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
587
|
+
*/
|
|
588
|
+
export namespace CreateToolRequestBodyStatus$ {
|
|
589
|
+
/** @deprecated use `CreateToolRequestBodyStatus$inboundSchema` instead. */
|
|
590
|
+
export const inboundSchema = CreateToolRequestBodyStatus$inboundSchema;
|
|
591
|
+
/** @deprecated use `CreateToolRequestBodyStatus$outboundSchema` instead. */
|
|
592
|
+
export const outboundSchema = CreateToolRequestBodyStatus$outboundSchema;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/** @internal */
|
|
596
|
+
export const CreateToolRequestBodyToolsType$inboundSchema: z.ZodNativeEnum<
|
|
597
|
+
typeof CreateToolRequestBodyToolsType
|
|
598
|
+
> = z.nativeEnum(CreateToolRequestBodyToolsType);
|
|
599
|
+
|
|
600
|
+
/** @internal */
|
|
601
|
+
export const CreateToolRequestBodyToolsType$outboundSchema: z.ZodNativeEnum<
|
|
602
|
+
typeof CreateToolRequestBodyToolsType
|
|
603
|
+
> = CreateToolRequestBodyToolsType$inboundSchema;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* @internal
|
|
607
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
608
|
+
*/
|
|
609
|
+
export namespace CreateToolRequestBodyToolsType$ {
|
|
610
|
+
/** @deprecated use `CreateToolRequestBodyToolsType$inboundSchema` instead. */
|
|
611
|
+
export const inboundSchema = CreateToolRequestBodyToolsType$inboundSchema;
|
|
612
|
+
/** @deprecated use `CreateToolRequestBodyToolsType$outboundSchema` instead. */
|
|
613
|
+
export const outboundSchema = CreateToolRequestBodyToolsType$outboundSchema;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/** @internal */
|
|
617
|
+
export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
|
|
618
|
+
.nativeEnum(Method);
|
|
619
|
+
|
|
620
|
+
/** @internal */
|
|
621
|
+
export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
|
|
622
|
+
Method$inboundSchema;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* @internal
|
|
626
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
627
|
+
*/
|
|
628
|
+
export namespace Method$ {
|
|
629
|
+
/** @deprecated use `Method$inboundSchema` instead. */
|
|
630
|
+
export const inboundSchema = Method$inboundSchema;
|
|
631
|
+
/** @deprecated use `Method$outboundSchema` instead. */
|
|
632
|
+
export const outboundSchema = Method$outboundSchema;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/** @internal */
|
|
636
|
+
export const Blueprint$inboundSchema: z.ZodType<
|
|
637
|
+
Blueprint,
|
|
638
|
+
z.ZodTypeDef,
|
|
639
|
+
unknown
|
|
640
|
+
> = z.object({
|
|
641
|
+
url: z.string(),
|
|
642
|
+
method: Method$inboundSchema,
|
|
643
|
+
headers: z.record(z.string()).optional(),
|
|
644
|
+
body: z.record(z.any()).optional(),
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
/** @internal */
|
|
648
|
+
export type Blueprint$Outbound = {
|
|
649
|
+
url: string;
|
|
650
|
+
method: string;
|
|
651
|
+
headers?: { [k: string]: string } | undefined;
|
|
652
|
+
body?: { [k: string]: any } | undefined;
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
/** @internal */
|
|
656
|
+
export const Blueprint$outboundSchema: z.ZodType<
|
|
657
|
+
Blueprint$Outbound,
|
|
658
|
+
z.ZodTypeDef,
|
|
659
|
+
Blueprint
|
|
660
|
+
> = z.object({
|
|
661
|
+
url: z.string(),
|
|
662
|
+
method: Method$outboundSchema,
|
|
663
|
+
headers: z.record(z.string()).optional(),
|
|
664
|
+
body: z.record(z.any()).optional(),
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* @internal
|
|
669
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
670
|
+
*/
|
|
671
|
+
export namespace Blueprint$ {
|
|
672
|
+
/** @deprecated use `Blueprint$inboundSchema` instead. */
|
|
673
|
+
export const inboundSchema = Blueprint$inboundSchema;
|
|
674
|
+
/** @deprecated use `Blueprint$outboundSchema` instead. */
|
|
675
|
+
export const outboundSchema = Blueprint$outboundSchema;
|
|
676
|
+
/** @deprecated use `Blueprint$Outbound` instead. */
|
|
677
|
+
export type Outbound = Blueprint$Outbound;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export function blueprintToJSON(blueprint: Blueprint): string {
|
|
681
|
+
return JSON.stringify(Blueprint$outboundSchema.parse(blueprint));
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
export function blueprintFromJSON(
|
|
685
|
+
jsonString: string,
|
|
686
|
+
): SafeParseResult<Blueprint, SDKValidationError> {
|
|
687
|
+
return safeParse(
|
|
688
|
+
jsonString,
|
|
689
|
+
(x) => Blueprint$inboundSchema.parse(JSON.parse(x)),
|
|
690
|
+
`Failed to parse 'Blueprint' from JSON`,
|
|
691
|
+
);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/** @internal */
|
|
695
|
+
export const CreateToolRequestBodyToolsRequestType$inboundSchema:
|
|
696
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequestType> = z.nativeEnum(
|
|
697
|
+
CreateToolRequestBodyToolsRequestType,
|
|
698
|
+
);
|
|
699
|
+
|
|
700
|
+
/** @internal */
|
|
701
|
+
export const CreateToolRequestBodyToolsRequestType$outboundSchema:
|
|
702
|
+
z.ZodNativeEnum<typeof CreateToolRequestBodyToolsRequestType> =
|
|
703
|
+
CreateToolRequestBodyToolsRequestType$inboundSchema;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* @internal
|
|
707
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
708
|
+
*/
|
|
709
|
+
export namespace CreateToolRequestBodyToolsRequestType$ {
|
|
710
|
+
/** @deprecated use `CreateToolRequestBodyToolsRequestType$inboundSchema` instead. */
|
|
711
|
+
export const inboundSchema =
|
|
712
|
+
CreateToolRequestBodyToolsRequestType$inboundSchema;
|
|
713
|
+
/** @deprecated use `CreateToolRequestBodyToolsRequestType$outboundSchema` instead. */
|
|
714
|
+
export const outboundSchema =
|
|
715
|
+
CreateToolRequestBodyToolsRequestType$outboundSchema;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/** @internal */
|
|
719
|
+
export const DefaultValue$inboundSchema: z.ZodType<
|
|
720
|
+
DefaultValue,
|
|
721
|
+
z.ZodTypeDef,
|
|
722
|
+
unknown
|
|
723
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
724
|
+
|
|
725
|
+
/** @internal */
|
|
726
|
+
export type DefaultValue$Outbound = string | number | boolean;
|
|
727
|
+
|
|
728
|
+
/** @internal */
|
|
729
|
+
export const DefaultValue$outboundSchema: z.ZodType<
|
|
730
|
+
DefaultValue$Outbound,
|
|
731
|
+
z.ZodTypeDef,
|
|
732
|
+
DefaultValue
|
|
733
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @internal
|
|
737
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
738
|
+
*/
|
|
739
|
+
export namespace DefaultValue$ {
|
|
740
|
+
/** @deprecated use `DefaultValue$inboundSchema` instead. */
|
|
741
|
+
export const inboundSchema = DefaultValue$inboundSchema;
|
|
742
|
+
/** @deprecated use `DefaultValue$outboundSchema` instead. */
|
|
743
|
+
export const outboundSchema = DefaultValue$outboundSchema;
|
|
744
|
+
/** @deprecated use `DefaultValue$Outbound` instead. */
|
|
745
|
+
export type Outbound = DefaultValue$Outbound;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export function defaultValueToJSON(defaultValue: DefaultValue): string {
|
|
749
|
+
return JSON.stringify(DefaultValue$outboundSchema.parse(defaultValue));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
export function defaultValueFromJSON(
|
|
753
|
+
jsonString: string,
|
|
754
|
+
): SafeParseResult<DefaultValue, SDKValidationError> {
|
|
755
|
+
return safeParse(
|
|
756
|
+
jsonString,
|
|
757
|
+
(x) => DefaultValue$inboundSchema.parse(JSON.parse(x)),
|
|
758
|
+
`Failed to parse 'DefaultValue' from JSON`,
|
|
759
|
+
);
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/** @internal */
|
|
763
|
+
export const Arguments$inboundSchema: z.ZodType<
|
|
764
|
+
Arguments,
|
|
765
|
+
z.ZodTypeDef,
|
|
766
|
+
unknown
|
|
767
|
+
> = z.object({
|
|
768
|
+
type: CreateToolRequestBodyToolsRequestType$inboundSchema,
|
|
769
|
+
description: z.string(),
|
|
770
|
+
send_to_model: z.boolean().default(true),
|
|
771
|
+
default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
772
|
+
}).transform((v) => {
|
|
773
|
+
return remap$(v, {
|
|
774
|
+
"send_to_model": "sendToModel",
|
|
775
|
+
"default_value": "defaultValue",
|
|
776
|
+
});
|
|
777
|
+
});
|
|
778
|
+
|
|
779
|
+
/** @internal */
|
|
780
|
+
export type Arguments$Outbound = {
|
|
781
|
+
type: string;
|
|
782
|
+
description: string;
|
|
783
|
+
send_to_model: boolean;
|
|
784
|
+
default_value?: string | number | boolean | undefined;
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
/** @internal */
|
|
788
|
+
export const Arguments$outboundSchema: z.ZodType<
|
|
789
|
+
Arguments$Outbound,
|
|
790
|
+
z.ZodTypeDef,
|
|
791
|
+
Arguments
|
|
792
|
+
> = z.object({
|
|
793
|
+
type: CreateToolRequestBodyToolsRequestType$outboundSchema,
|
|
794
|
+
description: z.string(),
|
|
795
|
+
sendToModel: z.boolean().default(true),
|
|
796
|
+
defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
797
|
+
}).transform((v) => {
|
|
798
|
+
return remap$(v, {
|
|
799
|
+
sendToModel: "send_to_model",
|
|
800
|
+
defaultValue: "default_value",
|
|
801
|
+
});
|
|
802
|
+
});
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* @internal
|
|
806
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
807
|
+
*/
|
|
808
|
+
export namespace Arguments$ {
|
|
809
|
+
/** @deprecated use `Arguments$inboundSchema` instead. */
|
|
810
|
+
export const inboundSchema = Arguments$inboundSchema;
|
|
811
|
+
/** @deprecated use `Arguments$outboundSchema` instead. */
|
|
812
|
+
export const outboundSchema = Arguments$outboundSchema;
|
|
813
|
+
/** @deprecated use `Arguments$Outbound` instead. */
|
|
814
|
+
export type Outbound = Arguments$Outbound;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export function argumentsToJSON(value: Arguments): string {
|
|
818
|
+
return JSON.stringify(Arguments$outboundSchema.parse(value));
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export function argumentsFromJSON(
|
|
822
|
+
jsonString: string,
|
|
823
|
+
): SafeParseResult<Arguments, SDKValidationError> {
|
|
824
|
+
return safeParse(
|
|
825
|
+
jsonString,
|
|
826
|
+
(x) => Arguments$inboundSchema.parse(JSON.parse(x)),
|
|
827
|
+
`Failed to parse 'Arguments' from JSON`,
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
/** @internal */
|
|
832
|
+
export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
|
|
833
|
+
.object({
|
|
834
|
+
blueprint: z.lazy(() => Blueprint$inboundSchema),
|
|
835
|
+
arguments: z.record(z.lazy(() => Arguments$inboundSchema)).optional(),
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
/** @internal */
|
|
839
|
+
export type Http$Outbound = {
|
|
840
|
+
blueprint: Blueprint$Outbound;
|
|
841
|
+
arguments?: { [k: string]: Arguments$Outbound } | undefined;
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
/** @internal */
|
|
845
|
+
export const Http$outboundSchema: z.ZodType<Http$Outbound, z.ZodTypeDef, Http> =
|
|
846
|
+
z.object({
|
|
847
|
+
blueprint: z.lazy(() => Blueprint$outboundSchema),
|
|
848
|
+
arguments: z.record(z.lazy(() => Arguments$outboundSchema)).optional(),
|
|
849
|
+
});
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* @internal
|
|
853
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
854
|
+
*/
|
|
855
|
+
export namespace Http$ {
|
|
856
|
+
/** @deprecated use `Http$inboundSchema` instead. */
|
|
857
|
+
export const inboundSchema = Http$inboundSchema;
|
|
858
|
+
/** @deprecated use `Http$outboundSchema` instead. */
|
|
859
|
+
export const outboundSchema = Http$outboundSchema;
|
|
860
|
+
/** @deprecated use `Http$Outbound` instead. */
|
|
861
|
+
export type Outbound = Http$Outbound;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export function httpToJSON(http: Http): string {
|
|
865
|
+
return JSON.stringify(Http$outboundSchema.parse(http));
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
export function httpFromJSON(
|
|
869
|
+
jsonString: string,
|
|
870
|
+
): SafeParseResult<Http, SDKValidationError> {
|
|
871
|
+
return safeParse(
|
|
872
|
+
jsonString,
|
|
873
|
+
(x) => Http$inboundSchema.parse(JSON.parse(x)),
|
|
874
|
+
`Failed to parse 'Http' from JSON`,
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/** @internal */
|
|
879
|
+
export const RequestBody3$inboundSchema: z.ZodType<
|
|
880
|
+
RequestBody3,
|
|
881
|
+
z.ZodTypeDef,
|
|
882
|
+
unknown
|
|
883
|
+
> = z.object({
|
|
884
|
+
path: z.string(),
|
|
885
|
+
key: z.string(),
|
|
886
|
+
description: z.string(),
|
|
887
|
+
status: CreateToolRequestBodyStatus$inboundSchema,
|
|
888
|
+
version_hash: z.string(),
|
|
889
|
+
type: CreateToolRequestBodyToolsType$inboundSchema,
|
|
890
|
+
http: z.lazy(() => Http$inboundSchema),
|
|
891
|
+
}).transform((v) => {
|
|
892
|
+
return remap$(v, {
|
|
893
|
+
"version_hash": "versionHash",
|
|
894
|
+
});
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
/** @internal */
|
|
898
|
+
export type RequestBody3$Outbound = {
|
|
899
|
+
path: string;
|
|
900
|
+
key: string;
|
|
901
|
+
description: string;
|
|
902
|
+
status: string;
|
|
903
|
+
version_hash: string;
|
|
904
|
+
type: string;
|
|
905
|
+
http: Http$Outbound;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
/** @internal */
|
|
909
|
+
export const RequestBody3$outboundSchema: z.ZodType<
|
|
910
|
+
RequestBody3$Outbound,
|
|
911
|
+
z.ZodTypeDef,
|
|
912
|
+
RequestBody3
|
|
913
|
+
> = z.object({
|
|
914
|
+
path: z.string(),
|
|
915
|
+
key: z.string(),
|
|
916
|
+
description: z.string(),
|
|
917
|
+
status: CreateToolRequestBodyStatus$outboundSchema,
|
|
918
|
+
versionHash: z.string(),
|
|
919
|
+
type: CreateToolRequestBodyToolsType$outboundSchema,
|
|
920
|
+
http: z.lazy(() => Http$outboundSchema),
|
|
921
|
+
}).transform((v) => {
|
|
922
|
+
return remap$(v, {
|
|
923
|
+
versionHash: "version_hash",
|
|
924
|
+
});
|
|
925
|
+
});
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* @internal
|
|
929
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
930
|
+
*/
|
|
931
|
+
export namespace RequestBody3$ {
|
|
932
|
+
/** @deprecated use `RequestBody3$inboundSchema` instead. */
|
|
933
|
+
export const inboundSchema = RequestBody3$inboundSchema;
|
|
934
|
+
/** @deprecated use `RequestBody3$outboundSchema` instead. */
|
|
935
|
+
export const outboundSchema = RequestBody3$outboundSchema;
|
|
936
|
+
/** @deprecated use `RequestBody3$Outbound` instead. */
|
|
937
|
+
export type Outbound = RequestBody3$Outbound;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
export function requestBody3ToJSON(requestBody3: RequestBody3): string {
|
|
941
|
+
return JSON.stringify(RequestBody3$outboundSchema.parse(requestBody3));
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export function requestBody3FromJSON(
|
|
945
|
+
jsonString: string,
|
|
946
|
+
): SafeParseResult<RequestBody3, SDKValidationError> {
|
|
947
|
+
return safeParse(
|
|
948
|
+
jsonString,
|
|
949
|
+
(x) => RequestBody3$inboundSchema.parse(JSON.parse(x)),
|
|
950
|
+
`Failed to parse 'RequestBody3' from JSON`,
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/** @internal */
|
|
955
|
+
export const RequestBodyStatus$inboundSchema: z.ZodNativeEnum<
|
|
956
|
+
typeof RequestBodyStatus
|
|
957
|
+
> = z.nativeEnum(RequestBodyStatus);
|
|
958
|
+
|
|
959
|
+
/** @internal */
|
|
960
|
+
export const RequestBodyStatus$outboundSchema: z.ZodNativeEnum<
|
|
961
|
+
typeof RequestBodyStatus
|
|
962
|
+
> = RequestBodyStatus$inboundSchema;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* @internal
|
|
966
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
967
|
+
*/
|
|
968
|
+
export namespace RequestBodyStatus$ {
|
|
969
|
+
/** @deprecated use `RequestBodyStatus$inboundSchema` instead. */
|
|
970
|
+
export const inboundSchema = RequestBodyStatus$inboundSchema;
|
|
971
|
+
/** @deprecated use `RequestBodyStatus$outboundSchema` instead. */
|
|
972
|
+
export const outboundSchema = RequestBodyStatus$outboundSchema;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
/** @internal */
|
|
976
|
+
export const CreateToolRequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
977
|
+
typeof CreateToolRequestBodyType
|
|
978
|
+
> = z.nativeEnum(CreateToolRequestBodyType);
|
|
979
|
+
|
|
980
|
+
/** @internal */
|
|
981
|
+
export const CreateToolRequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
982
|
+
typeof CreateToolRequestBodyType
|
|
983
|
+
> = CreateToolRequestBodyType$inboundSchema;
|
|
984
|
+
|
|
985
|
+
/**
|
|
986
|
+
* @internal
|
|
987
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
988
|
+
*/
|
|
989
|
+
export namespace CreateToolRequestBodyType$ {
|
|
990
|
+
/** @deprecated use `CreateToolRequestBodyType$inboundSchema` instead. */
|
|
991
|
+
export const inboundSchema = CreateToolRequestBodyType$inboundSchema;
|
|
992
|
+
/** @deprecated use `CreateToolRequestBodyType$outboundSchema` instead. */
|
|
993
|
+
export const outboundSchema = CreateToolRequestBodyType$outboundSchema;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/** @internal */
|
|
997
|
+
export const RequestBodyJsonSchema$inboundSchema: z.ZodType<
|
|
998
|
+
RequestBodyJsonSchema,
|
|
999
|
+
z.ZodTypeDef,
|
|
1000
|
+
unknown
|
|
1001
|
+
> = z.object({
|
|
1002
|
+
name: z.string(),
|
|
1003
|
+
description: z.string().optional(),
|
|
1004
|
+
schema: z.record(z.any()),
|
|
1005
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
1006
|
+
});
|
|
1007
|
+
|
|
1008
|
+
/** @internal */
|
|
1009
|
+
export type RequestBodyJsonSchema$Outbound = {
|
|
1010
|
+
name: string;
|
|
1011
|
+
description?: string | undefined;
|
|
1012
|
+
schema: { [k: string]: any };
|
|
1013
|
+
strict: boolean | null;
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
/** @internal */
|
|
1017
|
+
export const RequestBodyJsonSchema$outboundSchema: z.ZodType<
|
|
1018
|
+
RequestBodyJsonSchema$Outbound,
|
|
1019
|
+
z.ZodTypeDef,
|
|
1020
|
+
RequestBodyJsonSchema
|
|
1021
|
+
> = z.object({
|
|
1022
|
+
name: z.string(),
|
|
1023
|
+
description: z.string().optional(),
|
|
1024
|
+
schema: z.record(z.any()),
|
|
1025
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
1026
|
+
});
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* @internal
|
|
1030
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1031
|
+
*/
|
|
1032
|
+
export namespace RequestBodyJsonSchema$ {
|
|
1033
|
+
/** @deprecated use `RequestBodyJsonSchema$inboundSchema` instead. */
|
|
1034
|
+
export const inboundSchema = RequestBodyJsonSchema$inboundSchema;
|
|
1035
|
+
/** @deprecated use `RequestBodyJsonSchema$outboundSchema` instead. */
|
|
1036
|
+
export const outboundSchema = RequestBodyJsonSchema$outboundSchema;
|
|
1037
|
+
/** @deprecated use `RequestBodyJsonSchema$Outbound` instead. */
|
|
1038
|
+
export type Outbound = RequestBodyJsonSchema$Outbound;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
export function requestBodyJsonSchemaToJSON(
|
|
1042
|
+
requestBodyJsonSchema: RequestBodyJsonSchema,
|
|
1043
|
+
): string {
|
|
1044
|
+
return JSON.stringify(
|
|
1045
|
+
RequestBodyJsonSchema$outboundSchema.parse(requestBodyJsonSchema),
|
|
1046
|
+
);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
export function requestBodyJsonSchemaFromJSON(
|
|
1050
|
+
jsonString: string,
|
|
1051
|
+
): SafeParseResult<RequestBodyJsonSchema, SDKValidationError> {
|
|
1052
|
+
return safeParse(
|
|
1053
|
+
jsonString,
|
|
1054
|
+
(x) => RequestBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1055
|
+
`Failed to parse 'RequestBodyJsonSchema' from JSON`,
|
|
1056
|
+
);
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/** @internal */
|
|
1060
|
+
export const RequestBody2$inboundSchema: z.ZodType<
|
|
1061
|
+
RequestBody2,
|
|
1062
|
+
z.ZodTypeDef,
|
|
1063
|
+
unknown
|
|
1064
|
+
> = z.object({
|
|
1065
|
+
path: z.string(),
|
|
1066
|
+
key: z.string(),
|
|
1067
|
+
description: z.string(),
|
|
1068
|
+
status: RequestBodyStatus$inboundSchema,
|
|
1069
|
+
version_hash: z.string(),
|
|
1070
|
+
type: CreateToolRequestBodyType$inboundSchema,
|
|
1071
|
+
json_schema: z.lazy(() => RequestBodyJsonSchema$inboundSchema),
|
|
1072
|
+
}).transform((v) => {
|
|
1073
|
+
return remap$(v, {
|
|
1074
|
+
"version_hash": "versionHash",
|
|
1075
|
+
"json_schema": "jsonSchema",
|
|
1076
|
+
});
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
/** @internal */
|
|
1080
|
+
export type RequestBody2$Outbound = {
|
|
1081
|
+
path: string;
|
|
1082
|
+
key: string;
|
|
1083
|
+
description: string;
|
|
1084
|
+
status: string;
|
|
1085
|
+
version_hash: string;
|
|
1086
|
+
type: string;
|
|
1087
|
+
json_schema: RequestBodyJsonSchema$Outbound;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
/** @internal */
|
|
1091
|
+
export const RequestBody2$outboundSchema: z.ZodType<
|
|
1092
|
+
RequestBody2$Outbound,
|
|
1093
|
+
z.ZodTypeDef,
|
|
1094
|
+
RequestBody2
|
|
1095
|
+
> = z.object({
|
|
1096
|
+
path: z.string(),
|
|
1097
|
+
key: z.string(),
|
|
1098
|
+
description: z.string(),
|
|
1099
|
+
status: RequestBodyStatus$outboundSchema,
|
|
1100
|
+
versionHash: z.string(),
|
|
1101
|
+
type: CreateToolRequestBodyType$outboundSchema,
|
|
1102
|
+
jsonSchema: z.lazy(() => RequestBodyJsonSchema$outboundSchema),
|
|
1103
|
+
}).transform((v) => {
|
|
1104
|
+
return remap$(v, {
|
|
1105
|
+
versionHash: "version_hash",
|
|
1106
|
+
jsonSchema: "json_schema",
|
|
1107
|
+
});
|
|
1108
|
+
});
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* @internal
|
|
1112
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1113
|
+
*/
|
|
1114
|
+
export namespace RequestBody2$ {
|
|
1115
|
+
/** @deprecated use `RequestBody2$inboundSchema` instead. */
|
|
1116
|
+
export const inboundSchema = RequestBody2$inboundSchema;
|
|
1117
|
+
/** @deprecated use `RequestBody2$outboundSchema` instead. */
|
|
1118
|
+
export const outboundSchema = RequestBody2$outboundSchema;
|
|
1119
|
+
/** @deprecated use `RequestBody2$Outbound` instead. */
|
|
1120
|
+
export type Outbound = RequestBody2$Outbound;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
export function requestBody2ToJSON(requestBody2: RequestBody2): string {
|
|
1124
|
+
return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
export function requestBody2FromJSON(
|
|
1128
|
+
jsonString: string,
|
|
1129
|
+
): SafeParseResult<RequestBody2, SDKValidationError> {
|
|
1130
|
+
return safeParse(
|
|
1131
|
+
jsonString,
|
|
1132
|
+
(x) => RequestBody2$inboundSchema.parse(JSON.parse(x)),
|
|
1133
|
+
`Failed to parse 'RequestBody2' from JSON`,
|
|
1134
|
+
);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
/** @internal */
|
|
1138
|
+
export const CreateToolRequestBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
|
|
1139
|
+
typeof CreateToolRequestBodyToolsStatus
|
|
1140
|
+
> = z.nativeEnum(CreateToolRequestBodyToolsStatus);
|
|
1141
|
+
|
|
1142
|
+
/** @internal */
|
|
1143
|
+
export const CreateToolRequestBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
|
|
1144
|
+
typeof CreateToolRequestBodyToolsStatus
|
|
1145
|
+
> = CreateToolRequestBodyToolsStatus$inboundSchema;
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* @internal
|
|
1149
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1150
|
+
*/
|
|
1151
|
+
export namespace CreateToolRequestBodyToolsStatus$ {
|
|
1152
|
+
/** @deprecated use `CreateToolRequestBodyToolsStatus$inboundSchema` instead. */
|
|
1153
|
+
export const inboundSchema = CreateToolRequestBodyToolsStatus$inboundSchema;
|
|
1154
|
+
/** @deprecated use `CreateToolRequestBodyToolsStatus$outboundSchema` instead. */
|
|
1155
|
+
export const outboundSchema = CreateToolRequestBodyToolsStatus$outboundSchema;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/** @internal */
|
|
1159
|
+
export const RequestBodyType$inboundSchema: z.ZodNativeEnum<
|
|
1160
|
+
typeof RequestBodyType
|
|
1161
|
+
> = z.nativeEnum(RequestBodyType);
|
|
1162
|
+
|
|
1163
|
+
/** @internal */
|
|
1164
|
+
export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1165
|
+
typeof RequestBodyType
|
|
1166
|
+
> = RequestBodyType$inboundSchema;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* @internal
|
|
1170
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1171
|
+
*/
|
|
1172
|
+
export namespace RequestBodyType$ {
|
|
1173
|
+
/** @deprecated use `RequestBodyType$inboundSchema` instead. */
|
|
1174
|
+
export const inboundSchema = RequestBodyType$inboundSchema;
|
|
1175
|
+
/** @deprecated use `RequestBodyType$outboundSchema` instead. */
|
|
1176
|
+
export const outboundSchema = RequestBodyType$outboundSchema;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/** @internal */
|
|
1180
|
+
export const RequestBodyFunction$inboundSchema: z.ZodType<
|
|
1181
|
+
RequestBodyFunction,
|
|
1182
|
+
z.ZodTypeDef,
|
|
1183
|
+
unknown
|
|
1184
|
+
> = z.object({
|
|
1185
|
+
name: z.string(),
|
|
1186
|
+
description: z.string().optional(),
|
|
1187
|
+
strict: z.boolean().optional(),
|
|
1188
|
+
parameters: z.record(z.any()).optional(),
|
|
1189
|
+
});
|
|
1190
|
+
|
|
1191
|
+
/** @internal */
|
|
1192
|
+
export type RequestBodyFunction$Outbound = {
|
|
1193
|
+
name: string;
|
|
1194
|
+
description?: string | undefined;
|
|
1195
|
+
strict?: boolean | undefined;
|
|
1196
|
+
parameters?: { [k: string]: any } | undefined;
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
/** @internal */
|
|
1200
|
+
export const RequestBodyFunction$outboundSchema: z.ZodType<
|
|
1201
|
+
RequestBodyFunction$Outbound,
|
|
1202
|
+
z.ZodTypeDef,
|
|
1203
|
+
RequestBodyFunction
|
|
1204
|
+
> = z.object({
|
|
1205
|
+
name: z.string(),
|
|
1206
|
+
description: z.string().optional(),
|
|
1207
|
+
strict: z.boolean().optional(),
|
|
1208
|
+
parameters: z.record(z.any()).optional(),
|
|
1209
|
+
});
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* @internal
|
|
1213
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1214
|
+
*/
|
|
1215
|
+
export namespace RequestBodyFunction$ {
|
|
1216
|
+
/** @deprecated use `RequestBodyFunction$inboundSchema` instead. */
|
|
1217
|
+
export const inboundSchema = RequestBodyFunction$inboundSchema;
|
|
1218
|
+
/** @deprecated use `RequestBodyFunction$outboundSchema` instead. */
|
|
1219
|
+
export const outboundSchema = RequestBodyFunction$outboundSchema;
|
|
1220
|
+
/** @deprecated use `RequestBodyFunction$Outbound` instead. */
|
|
1221
|
+
export type Outbound = RequestBodyFunction$Outbound;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
export function requestBodyFunctionToJSON(
|
|
1225
|
+
requestBodyFunction: RequestBodyFunction,
|
|
1226
|
+
): string {
|
|
1227
|
+
return JSON.stringify(
|
|
1228
|
+
RequestBodyFunction$outboundSchema.parse(requestBodyFunction),
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
export function requestBodyFunctionFromJSON(
|
|
1233
|
+
jsonString: string,
|
|
1234
|
+
): SafeParseResult<RequestBodyFunction, SDKValidationError> {
|
|
1235
|
+
return safeParse(
|
|
1236
|
+
jsonString,
|
|
1237
|
+
(x) => RequestBodyFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1238
|
+
`Failed to parse 'RequestBodyFunction' from JSON`,
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/** @internal */
|
|
1243
|
+
export const RequestBody1$inboundSchema: z.ZodType<
|
|
1244
|
+
RequestBody1,
|
|
1245
|
+
z.ZodTypeDef,
|
|
1246
|
+
unknown
|
|
1247
|
+
> = z.object({
|
|
1248
|
+
path: z.string(),
|
|
1249
|
+
key: z.string(),
|
|
1250
|
+
description: z.string(),
|
|
1251
|
+
status: CreateToolRequestBodyToolsStatus$inboundSchema,
|
|
1252
|
+
version_hash: z.string(),
|
|
1253
|
+
type: RequestBodyType$inboundSchema,
|
|
1254
|
+
function: z.lazy(() => RequestBodyFunction$inboundSchema),
|
|
1255
|
+
}).transform((v) => {
|
|
1256
|
+
return remap$(v, {
|
|
1257
|
+
"version_hash": "versionHash",
|
|
1258
|
+
});
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
/** @internal */
|
|
1262
|
+
export type RequestBody1$Outbound = {
|
|
1263
|
+
path: string;
|
|
1264
|
+
key: string;
|
|
1265
|
+
description: string;
|
|
1266
|
+
status: string;
|
|
1267
|
+
version_hash: string;
|
|
1268
|
+
type: string;
|
|
1269
|
+
function: RequestBodyFunction$Outbound;
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
/** @internal */
|
|
1273
|
+
export const RequestBody1$outboundSchema: z.ZodType<
|
|
1274
|
+
RequestBody1$Outbound,
|
|
1275
|
+
z.ZodTypeDef,
|
|
1276
|
+
RequestBody1
|
|
1277
|
+
> = z.object({
|
|
1278
|
+
path: z.string(),
|
|
1279
|
+
key: z.string(),
|
|
1280
|
+
description: z.string(),
|
|
1281
|
+
status: CreateToolRequestBodyToolsStatus$outboundSchema,
|
|
1282
|
+
versionHash: z.string(),
|
|
1283
|
+
type: RequestBodyType$outboundSchema,
|
|
1284
|
+
function: z.lazy(() => RequestBodyFunction$outboundSchema),
|
|
1285
|
+
}).transform((v) => {
|
|
1286
|
+
return remap$(v, {
|
|
1287
|
+
versionHash: "version_hash",
|
|
1288
|
+
});
|
|
1289
|
+
});
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* @internal
|
|
1293
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1294
|
+
*/
|
|
1295
|
+
export namespace RequestBody1$ {
|
|
1296
|
+
/** @deprecated use `RequestBody1$inboundSchema` instead. */
|
|
1297
|
+
export const inboundSchema = RequestBody1$inboundSchema;
|
|
1298
|
+
/** @deprecated use `RequestBody1$outboundSchema` instead. */
|
|
1299
|
+
export const outboundSchema = RequestBody1$outboundSchema;
|
|
1300
|
+
/** @deprecated use `RequestBody1$Outbound` instead. */
|
|
1301
|
+
export type Outbound = RequestBody1$Outbound;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
export function requestBody1ToJSON(requestBody1: RequestBody1): string {
|
|
1305
|
+
return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
export function requestBody1FromJSON(
|
|
1309
|
+
jsonString: string,
|
|
1310
|
+
): SafeParseResult<RequestBody1, SDKValidationError> {
|
|
1311
|
+
return safeParse(
|
|
1312
|
+
jsonString,
|
|
1313
|
+
(x) => RequestBody1$inboundSchema.parse(JSON.parse(x)),
|
|
1314
|
+
`Failed to parse 'RequestBody1' from JSON`,
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/** @internal */
|
|
1319
|
+
export const CreateToolRequestBody$inboundSchema: z.ZodType<
|
|
1320
|
+
CreateToolRequestBody,
|
|
1321
|
+
z.ZodTypeDef,
|
|
1322
|
+
unknown
|
|
1323
|
+
> = z.union([
|
|
1324
|
+
z.lazy(() => RequestBody1$inboundSchema),
|
|
1325
|
+
z.lazy(() => RequestBody2$inboundSchema),
|
|
1326
|
+
z.lazy(() => RequestBody3$inboundSchema),
|
|
1327
|
+
]);
|
|
1328
|
+
|
|
1329
|
+
/** @internal */
|
|
1330
|
+
export type CreateToolRequestBody$Outbound =
|
|
1331
|
+
| RequestBody1$Outbound
|
|
1332
|
+
| RequestBody2$Outbound
|
|
1333
|
+
| RequestBody3$Outbound;
|
|
1334
|
+
|
|
1335
|
+
/** @internal */
|
|
1336
|
+
export const CreateToolRequestBody$outboundSchema: z.ZodType<
|
|
1337
|
+
CreateToolRequestBody$Outbound,
|
|
1338
|
+
z.ZodTypeDef,
|
|
1339
|
+
CreateToolRequestBody
|
|
1340
|
+
> = z.union([
|
|
1341
|
+
z.lazy(() => RequestBody1$outboundSchema),
|
|
1342
|
+
z.lazy(() => RequestBody2$outboundSchema),
|
|
1343
|
+
z.lazy(() => RequestBody3$outboundSchema),
|
|
1344
|
+
]);
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* @internal
|
|
1348
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1349
|
+
*/
|
|
1350
|
+
export namespace CreateToolRequestBody$ {
|
|
1351
|
+
/** @deprecated use `CreateToolRequestBody$inboundSchema` instead. */
|
|
1352
|
+
export const inboundSchema = CreateToolRequestBody$inboundSchema;
|
|
1353
|
+
/** @deprecated use `CreateToolRequestBody$outboundSchema` instead. */
|
|
1354
|
+
export const outboundSchema = CreateToolRequestBody$outboundSchema;
|
|
1355
|
+
/** @deprecated use `CreateToolRequestBody$Outbound` instead. */
|
|
1356
|
+
export type Outbound = CreateToolRequestBody$Outbound;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
export function createToolRequestBodyToJSON(
|
|
1360
|
+
createToolRequestBody: CreateToolRequestBody,
|
|
1361
|
+
): string {
|
|
1362
|
+
return JSON.stringify(
|
|
1363
|
+
CreateToolRequestBody$outboundSchema.parse(createToolRequestBody),
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
export function createToolRequestBodyFromJSON(
|
|
1368
|
+
jsonString: string,
|
|
1369
|
+
): SafeParseResult<CreateToolRequestBody, SDKValidationError> {
|
|
1370
|
+
return safeParse(
|
|
1371
|
+
jsonString,
|
|
1372
|
+
(x) => CreateToolRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
1373
|
+
`Failed to parse 'CreateToolRequestBody' from JSON`,
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/** @internal */
|
|
1378
|
+
export const CreateToolResponseBodyToolsStatus$inboundSchema: z.ZodNativeEnum<
|
|
1379
|
+
typeof CreateToolResponseBodyToolsStatus
|
|
1380
|
+
> = z.nativeEnum(CreateToolResponseBodyToolsStatus);
|
|
1381
|
+
|
|
1382
|
+
/** @internal */
|
|
1383
|
+
export const CreateToolResponseBodyToolsStatus$outboundSchema: z.ZodNativeEnum<
|
|
1384
|
+
typeof CreateToolResponseBodyToolsStatus
|
|
1385
|
+
> = CreateToolResponseBodyToolsStatus$inboundSchema;
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* @internal
|
|
1389
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1390
|
+
*/
|
|
1391
|
+
export namespace CreateToolResponseBodyToolsStatus$ {
|
|
1392
|
+
/** @deprecated use `CreateToolResponseBodyToolsStatus$inboundSchema` instead. */
|
|
1393
|
+
export const inboundSchema = CreateToolResponseBodyToolsStatus$inboundSchema;
|
|
1394
|
+
/** @deprecated use `CreateToolResponseBodyToolsStatus$outboundSchema` instead. */
|
|
1395
|
+
export const outboundSchema =
|
|
1396
|
+
CreateToolResponseBodyToolsStatus$outboundSchema;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/** @internal */
|
|
1400
|
+
export const CreateToolResponseBodyToolsType$inboundSchema: z.ZodNativeEnum<
|
|
1401
|
+
typeof CreateToolResponseBodyToolsType
|
|
1402
|
+
> = z.nativeEnum(CreateToolResponseBodyToolsType);
|
|
1403
|
+
|
|
1404
|
+
/** @internal */
|
|
1405
|
+
export const CreateToolResponseBodyToolsType$outboundSchema: z.ZodNativeEnum<
|
|
1406
|
+
typeof CreateToolResponseBodyToolsType
|
|
1407
|
+
> = CreateToolResponseBodyToolsType$inboundSchema;
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @internal
|
|
1411
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1412
|
+
*/
|
|
1413
|
+
export namespace CreateToolResponseBodyToolsType$ {
|
|
1414
|
+
/** @deprecated use `CreateToolResponseBodyToolsType$inboundSchema` instead. */
|
|
1415
|
+
export const inboundSchema = CreateToolResponseBodyToolsType$inboundSchema;
|
|
1416
|
+
/** @deprecated use `CreateToolResponseBodyToolsType$outboundSchema` instead. */
|
|
1417
|
+
export const outboundSchema = CreateToolResponseBodyToolsType$outboundSchema;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/** @internal */
|
|
1421
|
+
export const ResponseBodyMethod$inboundSchema: z.ZodNativeEnum<
|
|
1422
|
+
typeof ResponseBodyMethod
|
|
1423
|
+
> = z.nativeEnum(ResponseBodyMethod);
|
|
1424
|
+
|
|
1425
|
+
/** @internal */
|
|
1426
|
+
export const ResponseBodyMethod$outboundSchema: z.ZodNativeEnum<
|
|
1427
|
+
typeof ResponseBodyMethod
|
|
1428
|
+
> = ResponseBodyMethod$inboundSchema;
|
|
1429
|
+
|
|
1430
|
+
/**
|
|
1431
|
+
* @internal
|
|
1432
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1433
|
+
*/
|
|
1434
|
+
export namespace ResponseBodyMethod$ {
|
|
1435
|
+
/** @deprecated use `ResponseBodyMethod$inboundSchema` instead. */
|
|
1436
|
+
export const inboundSchema = ResponseBodyMethod$inboundSchema;
|
|
1437
|
+
/** @deprecated use `ResponseBodyMethod$outboundSchema` instead. */
|
|
1438
|
+
export const outboundSchema = ResponseBodyMethod$outboundSchema;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/** @internal */
|
|
1442
|
+
export const ResponseBodyBlueprint$inboundSchema: z.ZodType<
|
|
1443
|
+
ResponseBodyBlueprint,
|
|
1444
|
+
z.ZodTypeDef,
|
|
1445
|
+
unknown
|
|
1446
|
+
> = z.object({
|
|
1447
|
+
url: z.string(),
|
|
1448
|
+
method: ResponseBodyMethod$inboundSchema,
|
|
1449
|
+
headers: z.record(z.string()).optional(),
|
|
1450
|
+
body: z.record(z.any()).optional(),
|
|
1451
|
+
});
|
|
1452
|
+
|
|
1453
|
+
/** @internal */
|
|
1454
|
+
export type ResponseBodyBlueprint$Outbound = {
|
|
1455
|
+
url: string;
|
|
1456
|
+
method: string;
|
|
1457
|
+
headers?: { [k: string]: string } | undefined;
|
|
1458
|
+
body?: { [k: string]: any } | undefined;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
/** @internal */
|
|
1462
|
+
export const ResponseBodyBlueprint$outboundSchema: z.ZodType<
|
|
1463
|
+
ResponseBodyBlueprint$Outbound,
|
|
1464
|
+
z.ZodTypeDef,
|
|
1465
|
+
ResponseBodyBlueprint
|
|
1466
|
+
> = z.object({
|
|
1467
|
+
url: z.string(),
|
|
1468
|
+
method: ResponseBodyMethod$outboundSchema,
|
|
1469
|
+
headers: z.record(z.string()).optional(),
|
|
1470
|
+
body: z.record(z.any()).optional(),
|
|
1471
|
+
});
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* @internal
|
|
1475
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1476
|
+
*/
|
|
1477
|
+
export namespace ResponseBodyBlueprint$ {
|
|
1478
|
+
/** @deprecated use `ResponseBodyBlueprint$inboundSchema` instead. */
|
|
1479
|
+
export const inboundSchema = ResponseBodyBlueprint$inboundSchema;
|
|
1480
|
+
/** @deprecated use `ResponseBodyBlueprint$outboundSchema` instead. */
|
|
1481
|
+
export const outboundSchema = ResponseBodyBlueprint$outboundSchema;
|
|
1482
|
+
/** @deprecated use `ResponseBodyBlueprint$Outbound` instead. */
|
|
1483
|
+
export type Outbound = ResponseBodyBlueprint$Outbound;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
export function responseBodyBlueprintToJSON(
|
|
1487
|
+
responseBodyBlueprint: ResponseBodyBlueprint,
|
|
1488
|
+
): string {
|
|
1489
|
+
return JSON.stringify(
|
|
1490
|
+
ResponseBodyBlueprint$outboundSchema.parse(responseBodyBlueprint),
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
export function responseBodyBlueprintFromJSON(
|
|
1495
|
+
jsonString: string,
|
|
1496
|
+
): SafeParseResult<ResponseBodyBlueprint, SDKValidationError> {
|
|
1497
|
+
return safeParse(
|
|
1498
|
+
jsonString,
|
|
1499
|
+
(x) => ResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)),
|
|
1500
|
+
`Failed to parse 'ResponseBodyBlueprint' from JSON`,
|
|
1501
|
+
);
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
/** @internal */
|
|
1505
|
+
export const CreateToolResponseBodyToolsResponseType$inboundSchema:
|
|
1506
|
+
z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponseType> = z
|
|
1507
|
+
.nativeEnum(CreateToolResponseBodyToolsResponseType);
|
|
1508
|
+
|
|
1509
|
+
/** @internal */
|
|
1510
|
+
export const CreateToolResponseBodyToolsResponseType$outboundSchema:
|
|
1511
|
+
z.ZodNativeEnum<typeof CreateToolResponseBodyToolsResponseType> =
|
|
1512
|
+
CreateToolResponseBodyToolsResponseType$inboundSchema;
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* @internal
|
|
1516
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1517
|
+
*/
|
|
1518
|
+
export namespace CreateToolResponseBodyToolsResponseType$ {
|
|
1519
|
+
/** @deprecated use `CreateToolResponseBodyToolsResponseType$inboundSchema` instead. */
|
|
1520
|
+
export const inboundSchema =
|
|
1521
|
+
CreateToolResponseBodyToolsResponseType$inboundSchema;
|
|
1522
|
+
/** @deprecated use `CreateToolResponseBodyToolsResponseType$outboundSchema` instead. */
|
|
1523
|
+
export const outboundSchema =
|
|
1524
|
+
CreateToolResponseBodyToolsResponseType$outboundSchema;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
/** @internal */
|
|
1528
|
+
export const ResponseBodyDefaultValue$inboundSchema: z.ZodType<
|
|
1529
|
+
ResponseBodyDefaultValue,
|
|
1530
|
+
z.ZodTypeDef,
|
|
1531
|
+
unknown
|
|
1532
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
1533
|
+
|
|
1534
|
+
/** @internal */
|
|
1535
|
+
export type ResponseBodyDefaultValue$Outbound = string | number | boolean;
|
|
1536
|
+
|
|
1537
|
+
/** @internal */
|
|
1538
|
+
export const ResponseBodyDefaultValue$outboundSchema: z.ZodType<
|
|
1539
|
+
ResponseBodyDefaultValue$Outbound,
|
|
1540
|
+
z.ZodTypeDef,
|
|
1541
|
+
ResponseBodyDefaultValue
|
|
1542
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* @internal
|
|
1546
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1547
|
+
*/
|
|
1548
|
+
export namespace ResponseBodyDefaultValue$ {
|
|
1549
|
+
/** @deprecated use `ResponseBodyDefaultValue$inboundSchema` instead. */
|
|
1550
|
+
export const inboundSchema = ResponseBodyDefaultValue$inboundSchema;
|
|
1551
|
+
/** @deprecated use `ResponseBodyDefaultValue$outboundSchema` instead. */
|
|
1552
|
+
export const outboundSchema = ResponseBodyDefaultValue$outboundSchema;
|
|
1553
|
+
/** @deprecated use `ResponseBodyDefaultValue$Outbound` instead. */
|
|
1554
|
+
export type Outbound = ResponseBodyDefaultValue$Outbound;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
export function responseBodyDefaultValueToJSON(
|
|
1558
|
+
responseBodyDefaultValue: ResponseBodyDefaultValue,
|
|
1559
|
+
): string {
|
|
1560
|
+
return JSON.stringify(
|
|
1561
|
+
ResponseBodyDefaultValue$outboundSchema.parse(responseBodyDefaultValue),
|
|
1562
|
+
);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export function responseBodyDefaultValueFromJSON(
|
|
1566
|
+
jsonString: string,
|
|
1567
|
+
): SafeParseResult<ResponseBodyDefaultValue, SDKValidationError> {
|
|
1568
|
+
return safeParse(
|
|
1569
|
+
jsonString,
|
|
1570
|
+
(x) => ResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)),
|
|
1571
|
+
`Failed to parse 'ResponseBodyDefaultValue' from JSON`,
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
/** @internal */
|
|
1576
|
+
export const ResponseBodyArguments$inboundSchema: z.ZodType<
|
|
1577
|
+
ResponseBodyArguments,
|
|
1578
|
+
z.ZodTypeDef,
|
|
1579
|
+
unknown
|
|
1580
|
+
> = z.object({
|
|
1581
|
+
type: CreateToolResponseBodyToolsResponseType$inboundSchema,
|
|
1582
|
+
description: z.string(),
|
|
1583
|
+
send_to_model: z.boolean().default(true),
|
|
1584
|
+
default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
1585
|
+
}).transform((v) => {
|
|
1586
|
+
return remap$(v, {
|
|
1587
|
+
"send_to_model": "sendToModel",
|
|
1588
|
+
"default_value": "defaultValue",
|
|
1589
|
+
});
|
|
1590
|
+
});
|
|
1591
|
+
|
|
1592
|
+
/** @internal */
|
|
1593
|
+
export type ResponseBodyArguments$Outbound = {
|
|
1594
|
+
type: string;
|
|
1595
|
+
description: string;
|
|
1596
|
+
send_to_model: boolean;
|
|
1597
|
+
default_value?: string | number | boolean | undefined;
|
|
1598
|
+
};
|
|
1599
|
+
|
|
1600
|
+
/** @internal */
|
|
1601
|
+
export const ResponseBodyArguments$outboundSchema: z.ZodType<
|
|
1602
|
+
ResponseBodyArguments$Outbound,
|
|
1603
|
+
z.ZodTypeDef,
|
|
1604
|
+
ResponseBodyArguments
|
|
1605
|
+
> = z.object({
|
|
1606
|
+
type: CreateToolResponseBodyToolsResponseType$outboundSchema,
|
|
1607
|
+
description: z.string(),
|
|
1608
|
+
sendToModel: z.boolean().default(true),
|
|
1609
|
+
defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
1610
|
+
}).transform((v) => {
|
|
1611
|
+
return remap$(v, {
|
|
1612
|
+
sendToModel: "send_to_model",
|
|
1613
|
+
defaultValue: "default_value",
|
|
1614
|
+
});
|
|
1615
|
+
});
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* @internal
|
|
1619
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1620
|
+
*/
|
|
1621
|
+
export namespace ResponseBodyArguments$ {
|
|
1622
|
+
/** @deprecated use `ResponseBodyArguments$inboundSchema` instead. */
|
|
1623
|
+
export const inboundSchema = ResponseBodyArguments$inboundSchema;
|
|
1624
|
+
/** @deprecated use `ResponseBodyArguments$outboundSchema` instead. */
|
|
1625
|
+
export const outboundSchema = ResponseBodyArguments$outboundSchema;
|
|
1626
|
+
/** @deprecated use `ResponseBodyArguments$Outbound` instead. */
|
|
1627
|
+
export type Outbound = ResponseBodyArguments$Outbound;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
export function responseBodyArgumentsToJSON(
|
|
1631
|
+
responseBodyArguments: ResponseBodyArguments,
|
|
1632
|
+
): string {
|
|
1633
|
+
return JSON.stringify(
|
|
1634
|
+
ResponseBodyArguments$outboundSchema.parse(responseBodyArguments),
|
|
1635
|
+
);
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
export function responseBodyArgumentsFromJSON(
|
|
1639
|
+
jsonString: string,
|
|
1640
|
+
): SafeParseResult<ResponseBodyArguments, SDKValidationError> {
|
|
1641
|
+
return safeParse(
|
|
1642
|
+
jsonString,
|
|
1643
|
+
(x) => ResponseBodyArguments$inboundSchema.parse(JSON.parse(x)),
|
|
1644
|
+
`Failed to parse 'ResponseBodyArguments' from JSON`,
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
/** @internal */
|
|
1649
|
+
export const ResponseBodyHttp$inboundSchema: z.ZodType<
|
|
1650
|
+
ResponseBodyHttp,
|
|
1651
|
+
z.ZodTypeDef,
|
|
1652
|
+
unknown
|
|
1653
|
+
> = z.object({
|
|
1654
|
+
blueprint: z.lazy(() => ResponseBodyBlueprint$inboundSchema),
|
|
1655
|
+
arguments: z.record(z.lazy(() => ResponseBodyArguments$inboundSchema))
|
|
1656
|
+
.optional(),
|
|
1657
|
+
});
|
|
1658
|
+
|
|
1659
|
+
/** @internal */
|
|
1660
|
+
export type ResponseBodyHttp$Outbound = {
|
|
1661
|
+
blueprint: ResponseBodyBlueprint$Outbound;
|
|
1662
|
+
arguments?: { [k: string]: ResponseBodyArguments$Outbound } | undefined;
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
/** @internal */
|
|
1666
|
+
export const ResponseBodyHttp$outboundSchema: z.ZodType<
|
|
1667
|
+
ResponseBodyHttp$Outbound,
|
|
1668
|
+
z.ZodTypeDef,
|
|
1669
|
+
ResponseBodyHttp
|
|
1670
|
+
> = z.object({
|
|
1671
|
+
blueprint: z.lazy(() => ResponseBodyBlueprint$outboundSchema),
|
|
1672
|
+
arguments: z.record(z.lazy(() => ResponseBodyArguments$outboundSchema))
|
|
1673
|
+
.optional(),
|
|
1674
|
+
});
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* @internal
|
|
1678
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1679
|
+
*/
|
|
1680
|
+
export namespace ResponseBodyHttp$ {
|
|
1681
|
+
/** @deprecated use `ResponseBodyHttp$inboundSchema` instead. */
|
|
1682
|
+
export const inboundSchema = ResponseBodyHttp$inboundSchema;
|
|
1683
|
+
/** @deprecated use `ResponseBodyHttp$outboundSchema` instead. */
|
|
1684
|
+
export const outboundSchema = ResponseBodyHttp$outboundSchema;
|
|
1685
|
+
/** @deprecated use `ResponseBodyHttp$Outbound` instead. */
|
|
1686
|
+
export type Outbound = ResponseBodyHttp$Outbound;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
export function responseBodyHttpToJSON(
|
|
1690
|
+
responseBodyHttp: ResponseBodyHttp,
|
|
1691
|
+
): string {
|
|
1692
|
+
return JSON.stringify(
|
|
1693
|
+
ResponseBodyHttp$outboundSchema.parse(responseBodyHttp),
|
|
1694
|
+
);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
export function responseBodyHttpFromJSON(
|
|
1698
|
+
jsonString: string,
|
|
1699
|
+
): SafeParseResult<ResponseBodyHttp, SDKValidationError> {
|
|
1700
|
+
return safeParse(
|
|
1701
|
+
jsonString,
|
|
1702
|
+
(x) => ResponseBodyHttp$inboundSchema.parse(JSON.parse(x)),
|
|
1703
|
+
`Failed to parse 'ResponseBodyHttp' from JSON`,
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
/** @internal */
|
|
1708
|
+
export const ResponseBody3$inboundSchema: z.ZodType<
|
|
1709
|
+
ResponseBody3,
|
|
1710
|
+
z.ZodTypeDef,
|
|
1711
|
+
unknown
|
|
1712
|
+
> = z.object({
|
|
1713
|
+
_id: z.string().default("tool_01JRT05N2Q6FQPDR4AZNFN5H68"),
|
|
1714
|
+
path: z.string(),
|
|
1715
|
+
key: z.string(),
|
|
1716
|
+
description: z.string(),
|
|
1717
|
+
created_by_id: z.string().optional(),
|
|
1718
|
+
updated_by_id: z.string().optional(),
|
|
1719
|
+
project_id: z.string(),
|
|
1720
|
+
workspace_id: z.string(),
|
|
1721
|
+
created: z.string(),
|
|
1722
|
+
updated: z.string(),
|
|
1723
|
+
status: CreateToolResponseBodyToolsStatus$inboundSchema,
|
|
1724
|
+
version_hash: z.string(),
|
|
1725
|
+
type: CreateToolResponseBodyToolsType$inboundSchema,
|
|
1726
|
+
http: z.lazy(() => ResponseBodyHttp$inboundSchema),
|
|
1727
|
+
}).transform((v) => {
|
|
1728
|
+
return remap$(v, {
|
|
1729
|
+
"_id": "id",
|
|
1730
|
+
"created_by_id": "createdById",
|
|
1731
|
+
"updated_by_id": "updatedById",
|
|
1732
|
+
"project_id": "projectId",
|
|
1733
|
+
"workspace_id": "workspaceId",
|
|
1734
|
+
"version_hash": "versionHash",
|
|
1735
|
+
});
|
|
1736
|
+
});
|
|
1737
|
+
|
|
1738
|
+
/** @internal */
|
|
1739
|
+
export type ResponseBody3$Outbound = {
|
|
1740
|
+
_id: string;
|
|
1741
|
+
path: string;
|
|
1742
|
+
key: string;
|
|
1743
|
+
description: string;
|
|
1744
|
+
created_by_id?: string | undefined;
|
|
1745
|
+
updated_by_id?: string | undefined;
|
|
1746
|
+
project_id: string;
|
|
1747
|
+
workspace_id: string;
|
|
1748
|
+
created: string;
|
|
1749
|
+
updated: string;
|
|
1750
|
+
status: string;
|
|
1751
|
+
version_hash: string;
|
|
1752
|
+
type: string;
|
|
1753
|
+
http: ResponseBodyHttp$Outbound;
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
/** @internal */
|
|
1757
|
+
export const ResponseBody3$outboundSchema: z.ZodType<
|
|
1758
|
+
ResponseBody3$Outbound,
|
|
1759
|
+
z.ZodTypeDef,
|
|
1760
|
+
ResponseBody3
|
|
1761
|
+
> = z.object({
|
|
1762
|
+
id: z.string().default("tool_01JRT05N2Q6FQPDR4AZNFN5H68"),
|
|
1763
|
+
path: z.string(),
|
|
1764
|
+
key: z.string(),
|
|
1765
|
+
description: z.string(),
|
|
1766
|
+
createdById: z.string().optional(),
|
|
1767
|
+
updatedById: z.string().optional(),
|
|
1768
|
+
projectId: z.string(),
|
|
1769
|
+
workspaceId: z.string(),
|
|
1770
|
+
created: z.string(),
|
|
1771
|
+
updated: z.string(),
|
|
1772
|
+
status: CreateToolResponseBodyToolsStatus$outboundSchema,
|
|
1773
|
+
versionHash: z.string(),
|
|
1774
|
+
type: CreateToolResponseBodyToolsType$outboundSchema,
|
|
1775
|
+
http: z.lazy(() => ResponseBodyHttp$outboundSchema),
|
|
1776
|
+
}).transform((v) => {
|
|
1777
|
+
return remap$(v, {
|
|
1778
|
+
id: "_id",
|
|
1779
|
+
createdById: "created_by_id",
|
|
1780
|
+
updatedById: "updated_by_id",
|
|
1781
|
+
projectId: "project_id",
|
|
1782
|
+
workspaceId: "workspace_id",
|
|
1783
|
+
versionHash: "version_hash",
|
|
1784
|
+
});
|
|
1785
|
+
});
|
|
1786
|
+
|
|
1787
|
+
/**
|
|
1788
|
+
* @internal
|
|
1789
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1790
|
+
*/
|
|
1791
|
+
export namespace ResponseBody3$ {
|
|
1792
|
+
/** @deprecated use `ResponseBody3$inboundSchema` instead. */
|
|
1793
|
+
export const inboundSchema = ResponseBody3$inboundSchema;
|
|
1794
|
+
/** @deprecated use `ResponseBody3$outboundSchema` instead. */
|
|
1795
|
+
export const outboundSchema = ResponseBody3$outboundSchema;
|
|
1796
|
+
/** @deprecated use `ResponseBody3$Outbound` instead. */
|
|
1797
|
+
export type Outbound = ResponseBody3$Outbound;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
export function responseBody3ToJSON(responseBody3: ResponseBody3): string {
|
|
1801
|
+
return JSON.stringify(ResponseBody3$outboundSchema.parse(responseBody3));
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
export function responseBody3FromJSON(
|
|
1805
|
+
jsonString: string,
|
|
1806
|
+
): SafeParseResult<ResponseBody3, SDKValidationError> {
|
|
1807
|
+
return safeParse(
|
|
1808
|
+
jsonString,
|
|
1809
|
+
(x) => ResponseBody3$inboundSchema.parse(JSON.parse(x)),
|
|
1810
|
+
`Failed to parse 'ResponseBody3' from JSON`,
|
|
1811
|
+
);
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
/** @internal */
|
|
1815
|
+
export const CreateToolResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
|
|
1816
|
+
typeof CreateToolResponseBodyStatus
|
|
1817
|
+
> = z.nativeEnum(CreateToolResponseBodyStatus);
|
|
1818
|
+
|
|
1819
|
+
/** @internal */
|
|
1820
|
+
export const CreateToolResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
|
|
1821
|
+
typeof CreateToolResponseBodyStatus
|
|
1822
|
+
> = CreateToolResponseBodyStatus$inboundSchema;
|
|
1823
|
+
|
|
1824
|
+
/**
|
|
1825
|
+
* @internal
|
|
1826
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1827
|
+
*/
|
|
1828
|
+
export namespace CreateToolResponseBodyStatus$ {
|
|
1829
|
+
/** @deprecated use `CreateToolResponseBodyStatus$inboundSchema` instead. */
|
|
1830
|
+
export const inboundSchema = CreateToolResponseBodyStatus$inboundSchema;
|
|
1831
|
+
/** @deprecated use `CreateToolResponseBodyStatus$outboundSchema` instead. */
|
|
1832
|
+
export const outboundSchema = CreateToolResponseBodyStatus$outboundSchema;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/** @internal */
|
|
1836
|
+
export const CreateToolResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
1837
|
+
typeof CreateToolResponseBodyType
|
|
1838
|
+
> = z.nativeEnum(CreateToolResponseBodyType);
|
|
1839
|
+
|
|
1840
|
+
/** @internal */
|
|
1841
|
+
export const CreateToolResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
1842
|
+
typeof CreateToolResponseBodyType
|
|
1843
|
+
> = CreateToolResponseBodyType$inboundSchema;
|
|
1844
|
+
|
|
1845
|
+
/**
|
|
1846
|
+
* @internal
|
|
1847
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1848
|
+
*/
|
|
1849
|
+
export namespace CreateToolResponseBodyType$ {
|
|
1850
|
+
/** @deprecated use `CreateToolResponseBodyType$inboundSchema` instead. */
|
|
1851
|
+
export const inboundSchema = CreateToolResponseBodyType$inboundSchema;
|
|
1852
|
+
/** @deprecated use `CreateToolResponseBodyType$outboundSchema` instead. */
|
|
1853
|
+
export const outboundSchema = CreateToolResponseBodyType$outboundSchema;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
/** @internal */
|
|
1857
|
+
export const ResponseBodyJsonSchema$inboundSchema: z.ZodType<
|
|
1858
|
+
ResponseBodyJsonSchema,
|
|
1859
|
+
z.ZodTypeDef,
|
|
1860
|
+
unknown
|
|
1861
|
+
> = z.object({
|
|
1862
|
+
name: z.string(),
|
|
1863
|
+
description: z.string().optional(),
|
|
1864
|
+
schema: z.record(z.any()),
|
|
1865
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
1866
|
+
});
|
|
1867
|
+
|
|
1868
|
+
/** @internal */
|
|
1869
|
+
export type ResponseBodyJsonSchema$Outbound = {
|
|
1870
|
+
name: string;
|
|
1871
|
+
description?: string | undefined;
|
|
1872
|
+
schema: { [k: string]: any };
|
|
1873
|
+
strict: boolean | null;
|
|
1874
|
+
};
|
|
1875
|
+
|
|
1876
|
+
/** @internal */
|
|
1877
|
+
export const ResponseBodyJsonSchema$outboundSchema: z.ZodType<
|
|
1878
|
+
ResponseBodyJsonSchema$Outbound,
|
|
1879
|
+
z.ZodTypeDef,
|
|
1880
|
+
ResponseBodyJsonSchema
|
|
1881
|
+
> = z.object({
|
|
1882
|
+
name: z.string(),
|
|
1883
|
+
description: z.string().optional(),
|
|
1884
|
+
schema: z.record(z.any()),
|
|
1885
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
1886
|
+
});
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* @internal
|
|
1890
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1891
|
+
*/
|
|
1892
|
+
export namespace ResponseBodyJsonSchema$ {
|
|
1893
|
+
/** @deprecated use `ResponseBodyJsonSchema$inboundSchema` instead. */
|
|
1894
|
+
export const inboundSchema = ResponseBodyJsonSchema$inboundSchema;
|
|
1895
|
+
/** @deprecated use `ResponseBodyJsonSchema$outboundSchema` instead. */
|
|
1896
|
+
export const outboundSchema = ResponseBodyJsonSchema$outboundSchema;
|
|
1897
|
+
/** @deprecated use `ResponseBodyJsonSchema$Outbound` instead. */
|
|
1898
|
+
export type Outbound = ResponseBodyJsonSchema$Outbound;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
export function responseBodyJsonSchemaToJSON(
|
|
1902
|
+
responseBodyJsonSchema: ResponseBodyJsonSchema,
|
|
1903
|
+
): string {
|
|
1904
|
+
return JSON.stringify(
|
|
1905
|
+
ResponseBodyJsonSchema$outboundSchema.parse(responseBodyJsonSchema),
|
|
1906
|
+
);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
export function responseBodyJsonSchemaFromJSON(
|
|
1910
|
+
jsonString: string,
|
|
1911
|
+
): SafeParseResult<ResponseBodyJsonSchema, SDKValidationError> {
|
|
1912
|
+
return safeParse(
|
|
1913
|
+
jsonString,
|
|
1914
|
+
(x) => ResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
1915
|
+
`Failed to parse 'ResponseBodyJsonSchema' from JSON`,
|
|
1916
|
+
);
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
/** @internal */
|
|
1920
|
+
export const ResponseBody2$inboundSchema: z.ZodType<
|
|
1921
|
+
ResponseBody2,
|
|
1922
|
+
z.ZodTypeDef,
|
|
1923
|
+
unknown
|
|
1924
|
+
> = z.object({
|
|
1925
|
+
_id: z.string().default("tool_01JRT05N2PG6D7AFJE7GAXWZ27"),
|
|
1926
|
+
path: z.string(),
|
|
1927
|
+
key: z.string(),
|
|
1928
|
+
description: z.string(),
|
|
1929
|
+
created_by_id: z.string().optional(),
|
|
1930
|
+
updated_by_id: z.string().optional(),
|
|
1931
|
+
project_id: z.string(),
|
|
1932
|
+
workspace_id: z.string(),
|
|
1933
|
+
created: z.string(),
|
|
1934
|
+
updated: z.string(),
|
|
1935
|
+
status: CreateToolResponseBodyStatus$inboundSchema,
|
|
1936
|
+
version_hash: z.string(),
|
|
1937
|
+
type: CreateToolResponseBodyType$inboundSchema,
|
|
1938
|
+
json_schema: z.lazy(() => ResponseBodyJsonSchema$inboundSchema),
|
|
1939
|
+
}).transform((v) => {
|
|
1940
|
+
return remap$(v, {
|
|
1941
|
+
"_id": "id",
|
|
1942
|
+
"created_by_id": "createdById",
|
|
1943
|
+
"updated_by_id": "updatedById",
|
|
1944
|
+
"project_id": "projectId",
|
|
1945
|
+
"workspace_id": "workspaceId",
|
|
1946
|
+
"version_hash": "versionHash",
|
|
1947
|
+
"json_schema": "jsonSchema",
|
|
1948
|
+
});
|
|
1949
|
+
});
|
|
1950
|
+
|
|
1951
|
+
/** @internal */
|
|
1952
|
+
export type ResponseBody2$Outbound = {
|
|
1953
|
+
_id: string;
|
|
1954
|
+
path: string;
|
|
1955
|
+
key: string;
|
|
1956
|
+
description: string;
|
|
1957
|
+
created_by_id?: string | undefined;
|
|
1958
|
+
updated_by_id?: string | undefined;
|
|
1959
|
+
project_id: string;
|
|
1960
|
+
workspace_id: string;
|
|
1961
|
+
created: string;
|
|
1962
|
+
updated: string;
|
|
1963
|
+
status: string;
|
|
1964
|
+
version_hash: string;
|
|
1965
|
+
type: string;
|
|
1966
|
+
json_schema: ResponseBodyJsonSchema$Outbound;
|
|
1967
|
+
};
|
|
1968
|
+
|
|
1969
|
+
/** @internal */
|
|
1970
|
+
export const ResponseBody2$outboundSchema: z.ZodType<
|
|
1971
|
+
ResponseBody2$Outbound,
|
|
1972
|
+
z.ZodTypeDef,
|
|
1973
|
+
ResponseBody2
|
|
1974
|
+
> = z.object({
|
|
1975
|
+
id: z.string().default("tool_01JRT05N2PG6D7AFJE7GAXWZ27"),
|
|
1976
|
+
path: z.string(),
|
|
1977
|
+
key: z.string(),
|
|
1978
|
+
description: z.string(),
|
|
1979
|
+
createdById: z.string().optional(),
|
|
1980
|
+
updatedById: z.string().optional(),
|
|
1981
|
+
projectId: z.string(),
|
|
1982
|
+
workspaceId: z.string(),
|
|
1983
|
+
created: z.string(),
|
|
1984
|
+
updated: z.string(),
|
|
1985
|
+
status: CreateToolResponseBodyStatus$outboundSchema,
|
|
1986
|
+
versionHash: z.string(),
|
|
1987
|
+
type: CreateToolResponseBodyType$outboundSchema,
|
|
1988
|
+
jsonSchema: z.lazy(() => ResponseBodyJsonSchema$outboundSchema),
|
|
1989
|
+
}).transform((v) => {
|
|
1990
|
+
return remap$(v, {
|
|
1991
|
+
id: "_id",
|
|
1992
|
+
createdById: "created_by_id",
|
|
1993
|
+
updatedById: "updated_by_id",
|
|
1994
|
+
projectId: "project_id",
|
|
1995
|
+
workspaceId: "workspace_id",
|
|
1996
|
+
versionHash: "version_hash",
|
|
1997
|
+
jsonSchema: "json_schema",
|
|
1998
|
+
});
|
|
1999
|
+
});
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* @internal
|
|
2003
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2004
|
+
*/
|
|
2005
|
+
export namespace ResponseBody2$ {
|
|
2006
|
+
/** @deprecated use `ResponseBody2$inboundSchema` instead. */
|
|
2007
|
+
export const inboundSchema = ResponseBody2$inboundSchema;
|
|
2008
|
+
/** @deprecated use `ResponseBody2$outboundSchema` instead. */
|
|
2009
|
+
export const outboundSchema = ResponseBody2$outboundSchema;
|
|
2010
|
+
/** @deprecated use `ResponseBody2$Outbound` instead. */
|
|
2011
|
+
export type Outbound = ResponseBody2$Outbound;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
export function responseBody2ToJSON(responseBody2: ResponseBody2): string {
|
|
2015
|
+
return JSON.stringify(ResponseBody2$outboundSchema.parse(responseBody2));
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
export function responseBody2FromJSON(
|
|
2019
|
+
jsonString: string,
|
|
2020
|
+
): SafeParseResult<ResponseBody2, SDKValidationError> {
|
|
2021
|
+
return safeParse(
|
|
2022
|
+
jsonString,
|
|
2023
|
+
(x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)),
|
|
2024
|
+
`Failed to parse 'ResponseBody2' from JSON`,
|
|
2025
|
+
);
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
/** @internal */
|
|
2029
|
+
export const ResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
|
|
2030
|
+
typeof ResponseBodyStatus
|
|
2031
|
+
> = z.nativeEnum(ResponseBodyStatus);
|
|
2032
|
+
|
|
2033
|
+
/** @internal */
|
|
2034
|
+
export const ResponseBodyStatus$outboundSchema: z.ZodNativeEnum<
|
|
2035
|
+
typeof ResponseBodyStatus
|
|
2036
|
+
> = ResponseBodyStatus$inboundSchema;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* @internal
|
|
2040
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2041
|
+
*/
|
|
2042
|
+
export namespace ResponseBodyStatus$ {
|
|
2043
|
+
/** @deprecated use `ResponseBodyStatus$inboundSchema` instead. */
|
|
2044
|
+
export const inboundSchema = ResponseBodyStatus$inboundSchema;
|
|
2045
|
+
/** @deprecated use `ResponseBodyStatus$outboundSchema` instead. */
|
|
2046
|
+
export const outboundSchema = ResponseBodyStatus$outboundSchema;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
/** @internal */
|
|
2050
|
+
export const ResponseBodyType$inboundSchema: z.ZodNativeEnum<
|
|
2051
|
+
typeof ResponseBodyType
|
|
2052
|
+
> = z.nativeEnum(ResponseBodyType);
|
|
2053
|
+
|
|
2054
|
+
/** @internal */
|
|
2055
|
+
export const ResponseBodyType$outboundSchema: z.ZodNativeEnum<
|
|
2056
|
+
typeof ResponseBodyType
|
|
2057
|
+
> = ResponseBodyType$inboundSchema;
|
|
2058
|
+
|
|
2059
|
+
/**
|
|
2060
|
+
* @internal
|
|
2061
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2062
|
+
*/
|
|
2063
|
+
export namespace ResponseBodyType$ {
|
|
2064
|
+
/** @deprecated use `ResponseBodyType$inboundSchema` instead. */
|
|
2065
|
+
export const inboundSchema = ResponseBodyType$inboundSchema;
|
|
2066
|
+
/** @deprecated use `ResponseBodyType$outboundSchema` instead. */
|
|
2067
|
+
export const outboundSchema = ResponseBodyType$outboundSchema;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/** @internal */
|
|
2071
|
+
export const ResponseBodyFunction$inboundSchema: z.ZodType<
|
|
2072
|
+
ResponseBodyFunction,
|
|
2073
|
+
z.ZodTypeDef,
|
|
2074
|
+
unknown
|
|
2075
|
+
> = z.object({
|
|
2076
|
+
name: z.string(),
|
|
2077
|
+
description: z.string().optional(),
|
|
2078
|
+
strict: z.boolean().optional(),
|
|
2079
|
+
parameters: z.record(z.any()).optional(),
|
|
2080
|
+
});
|
|
2081
|
+
|
|
2082
|
+
/** @internal */
|
|
2083
|
+
export type ResponseBodyFunction$Outbound = {
|
|
2084
|
+
name: string;
|
|
2085
|
+
description?: string | undefined;
|
|
2086
|
+
strict?: boolean | undefined;
|
|
2087
|
+
parameters?: { [k: string]: any } | undefined;
|
|
2088
|
+
};
|
|
2089
|
+
|
|
2090
|
+
/** @internal */
|
|
2091
|
+
export const ResponseBodyFunction$outboundSchema: z.ZodType<
|
|
2092
|
+
ResponseBodyFunction$Outbound,
|
|
2093
|
+
z.ZodTypeDef,
|
|
2094
|
+
ResponseBodyFunction
|
|
2095
|
+
> = z.object({
|
|
2096
|
+
name: z.string(),
|
|
2097
|
+
description: z.string().optional(),
|
|
2098
|
+
strict: z.boolean().optional(),
|
|
2099
|
+
parameters: z.record(z.any()).optional(),
|
|
2100
|
+
});
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* @internal
|
|
2104
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2105
|
+
*/
|
|
2106
|
+
export namespace ResponseBodyFunction$ {
|
|
2107
|
+
/** @deprecated use `ResponseBodyFunction$inboundSchema` instead. */
|
|
2108
|
+
export const inboundSchema = ResponseBodyFunction$inboundSchema;
|
|
2109
|
+
/** @deprecated use `ResponseBodyFunction$outboundSchema` instead. */
|
|
2110
|
+
export const outboundSchema = ResponseBodyFunction$outboundSchema;
|
|
2111
|
+
/** @deprecated use `ResponseBodyFunction$Outbound` instead. */
|
|
2112
|
+
export type Outbound = ResponseBodyFunction$Outbound;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
export function responseBodyFunctionToJSON(
|
|
2116
|
+
responseBodyFunction: ResponseBodyFunction,
|
|
2117
|
+
): string {
|
|
2118
|
+
return JSON.stringify(
|
|
2119
|
+
ResponseBodyFunction$outboundSchema.parse(responseBodyFunction),
|
|
2120
|
+
);
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
export function responseBodyFunctionFromJSON(
|
|
2124
|
+
jsonString: string,
|
|
2125
|
+
): SafeParseResult<ResponseBodyFunction, SDKValidationError> {
|
|
2126
|
+
return safeParse(
|
|
2127
|
+
jsonString,
|
|
2128
|
+
(x) => ResponseBodyFunction$inboundSchema.parse(JSON.parse(x)),
|
|
2129
|
+
`Failed to parse 'ResponseBodyFunction' from JSON`,
|
|
2130
|
+
);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
/** @internal */
|
|
2134
|
+
export const ResponseBody1$inboundSchema: z.ZodType<
|
|
2135
|
+
ResponseBody1,
|
|
2136
|
+
z.ZodTypeDef,
|
|
2137
|
+
unknown
|
|
2138
|
+
> = z.object({
|
|
2139
|
+
_id: z.string().default("tool_01JRT05N2N0YN3RZYVERE05GWC"),
|
|
2140
|
+
path: z.string(),
|
|
2141
|
+
key: z.string(),
|
|
2142
|
+
description: z.string(),
|
|
2143
|
+
created_by_id: z.string().optional(),
|
|
2144
|
+
updated_by_id: z.string().optional(),
|
|
2145
|
+
project_id: z.string(),
|
|
2146
|
+
workspace_id: z.string(),
|
|
2147
|
+
created: z.string(),
|
|
2148
|
+
updated: z.string(),
|
|
2149
|
+
status: ResponseBodyStatus$inboundSchema,
|
|
2150
|
+
version_hash: z.string(),
|
|
2151
|
+
type: ResponseBodyType$inboundSchema,
|
|
2152
|
+
function: z.lazy(() => ResponseBodyFunction$inboundSchema),
|
|
2153
|
+
}).transform((v) => {
|
|
2154
|
+
return remap$(v, {
|
|
2155
|
+
"_id": "id",
|
|
2156
|
+
"created_by_id": "createdById",
|
|
2157
|
+
"updated_by_id": "updatedById",
|
|
2158
|
+
"project_id": "projectId",
|
|
2159
|
+
"workspace_id": "workspaceId",
|
|
2160
|
+
"version_hash": "versionHash",
|
|
2161
|
+
});
|
|
2162
|
+
});
|
|
2163
|
+
|
|
2164
|
+
/** @internal */
|
|
2165
|
+
export type ResponseBody1$Outbound = {
|
|
2166
|
+
_id: string;
|
|
2167
|
+
path: string;
|
|
2168
|
+
key: string;
|
|
2169
|
+
description: string;
|
|
2170
|
+
created_by_id?: string | undefined;
|
|
2171
|
+
updated_by_id?: string | undefined;
|
|
2172
|
+
project_id: string;
|
|
2173
|
+
workspace_id: string;
|
|
2174
|
+
created: string;
|
|
2175
|
+
updated: string;
|
|
2176
|
+
status: string;
|
|
2177
|
+
version_hash: string;
|
|
2178
|
+
type: string;
|
|
2179
|
+
function: ResponseBodyFunction$Outbound;
|
|
2180
|
+
};
|
|
2181
|
+
|
|
2182
|
+
/** @internal */
|
|
2183
|
+
export const ResponseBody1$outboundSchema: z.ZodType<
|
|
2184
|
+
ResponseBody1$Outbound,
|
|
2185
|
+
z.ZodTypeDef,
|
|
2186
|
+
ResponseBody1
|
|
2187
|
+
> = z.object({
|
|
2188
|
+
id: z.string().default("tool_01JRT05N2N0YN3RZYVERE05GWC"),
|
|
2189
|
+
path: z.string(),
|
|
2190
|
+
key: z.string(),
|
|
2191
|
+
description: z.string(),
|
|
2192
|
+
createdById: z.string().optional(),
|
|
2193
|
+
updatedById: z.string().optional(),
|
|
2194
|
+
projectId: z.string(),
|
|
2195
|
+
workspaceId: z.string(),
|
|
2196
|
+
created: z.string(),
|
|
2197
|
+
updated: z.string(),
|
|
2198
|
+
status: ResponseBodyStatus$outboundSchema,
|
|
2199
|
+
versionHash: z.string(),
|
|
2200
|
+
type: ResponseBodyType$outboundSchema,
|
|
2201
|
+
function: z.lazy(() => ResponseBodyFunction$outboundSchema),
|
|
2202
|
+
}).transform((v) => {
|
|
2203
|
+
return remap$(v, {
|
|
2204
|
+
id: "_id",
|
|
2205
|
+
createdById: "created_by_id",
|
|
2206
|
+
updatedById: "updated_by_id",
|
|
2207
|
+
projectId: "project_id",
|
|
2208
|
+
workspaceId: "workspace_id",
|
|
2209
|
+
versionHash: "version_hash",
|
|
2210
|
+
});
|
|
2211
|
+
});
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* @internal
|
|
2215
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2216
|
+
*/
|
|
2217
|
+
export namespace ResponseBody1$ {
|
|
2218
|
+
/** @deprecated use `ResponseBody1$inboundSchema` instead. */
|
|
2219
|
+
export const inboundSchema = ResponseBody1$inboundSchema;
|
|
2220
|
+
/** @deprecated use `ResponseBody1$outboundSchema` instead. */
|
|
2221
|
+
export const outboundSchema = ResponseBody1$outboundSchema;
|
|
2222
|
+
/** @deprecated use `ResponseBody1$Outbound` instead. */
|
|
2223
|
+
export type Outbound = ResponseBody1$Outbound;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
export function responseBody1ToJSON(responseBody1: ResponseBody1): string {
|
|
2227
|
+
return JSON.stringify(ResponseBody1$outboundSchema.parse(responseBody1));
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
export function responseBody1FromJSON(
|
|
2231
|
+
jsonString: string,
|
|
2232
|
+
): SafeParseResult<ResponseBody1, SDKValidationError> {
|
|
2233
|
+
return safeParse(
|
|
2234
|
+
jsonString,
|
|
2235
|
+
(x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)),
|
|
2236
|
+
`Failed to parse 'ResponseBody1' from JSON`,
|
|
2237
|
+
);
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
/** @internal */
|
|
2241
|
+
export const CreateToolResponseBody$inboundSchema: z.ZodType<
|
|
2242
|
+
CreateToolResponseBody,
|
|
2243
|
+
z.ZodTypeDef,
|
|
2244
|
+
unknown
|
|
2245
|
+
> = z.union([
|
|
2246
|
+
z.lazy(() => ResponseBody1$inboundSchema),
|
|
2247
|
+
z.lazy(() => ResponseBody2$inboundSchema),
|
|
2248
|
+
z.lazy(() => ResponseBody3$inboundSchema),
|
|
2249
|
+
]);
|
|
2250
|
+
|
|
2251
|
+
/** @internal */
|
|
2252
|
+
export type CreateToolResponseBody$Outbound =
|
|
2253
|
+
| ResponseBody1$Outbound
|
|
2254
|
+
| ResponseBody2$Outbound
|
|
2255
|
+
| ResponseBody3$Outbound;
|
|
2256
|
+
|
|
2257
|
+
/** @internal */
|
|
2258
|
+
export const CreateToolResponseBody$outboundSchema: z.ZodType<
|
|
2259
|
+
CreateToolResponseBody$Outbound,
|
|
2260
|
+
z.ZodTypeDef,
|
|
2261
|
+
CreateToolResponseBody
|
|
2262
|
+
> = z.union([
|
|
2263
|
+
z.lazy(() => ResponseBody1$outboundSchema),
|
|
2264
|
+
z.lazy(() => ResponseBody2$outboundSchema),
|
|
2265
|
+
z.lazy(() => ResponseBody3$outboundSchema),
|
|
2266
|
+
]);
|
|
2267
|
+
|
|
2268
|
+
/**
|
|
2269
|
+
* @internal
|
|
2270
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2271
|
+
*/
|
|
2272
|
+
export namespace CreateToolResponseBody$ {
|
|
2273
|
+
/** @deprecated use `CreateToolResponseBody$inboundSchema` instead. */
|
|
2274
|
+
export const inboundSchema = CreateToolResponseBody$inboundSchema;
|
|
2275
|
+
/** @deprecated use `CreateToolResponseBody$outboundSchema` instead. */
|
|
2276
|
+
export const outboundSchema = CreateToolResponseBody$outboundSchema;
|
|
2277
|
+
/** @deprecated use `CreateToolResponseBody$Outbound` instead. */
|
|
2278
|
+
export type Outbound = CreateToolResponseBody$Outbound;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
export function createToolResponseBodyToJSON(
|
|
2282
|
+
createToolResponseBody: CreateToolResponseBody,
|
|
2283
|
+
): string {
|
|
2284
|
+
return JSON.stringify(
|
|
2285
|
+
CreateToolResponseBody$outboundSchema.parse(createToolResponseBody),
|
|
2286
|
+
);
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
export function createToolResponseBodyFromJSON(
|
|
2290
|
+
jsonString: string,
|
|
2291
|
+
): SafeParseResult<CreateToolResponseBody, SDKValidationError> {
|
|
2292
|
+
return safeParse(
|
|
2293
|
+
jsonString,
|
|
2294
|
+
(x) => CreateToolResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
2295
|
+
`Failed to parse 'CreateToolResponseBody' from JSON`,
|
|
2296
|
+
);
|
|
2297
|
+
}
|