@orq-ai/node 3.3.12 → 3.3.14
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,1382 @@
|
|
|
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
|
+
export type GetAllToolsRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
|
|
15
|
+
*/
|
|
16
|
+
limit?: number | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
|
|
19
|
+
*/
|
|
20
|
+
startingAfter?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
|
|
23
|
+
*/
|
|
24
|
+
endingBefore?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const GetAllToolsObject = {
|
|
28
|
+
List: "list",
|
|
29
|
+
} as const;
|
|
30
|
+
export type GetAllToolsObject = ClosedEnum<typeof GetAllToolsObject>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 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.
|
|
34
|
+
*/
|
|
35
|
+
export const GetAllToolsDataStatus = {
|
|
36
|
+
Live: "live",
|
|
37
|
+
Draft: "draft",
|
|
38
|
+
Pending: "pending",
|
|
39
|
+
Published: "published",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* 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.
|
|
43
|
+
*/
|
|
44
|
+
export type GetAllToolsDataStatus = ClosedEnum<typeof GetAllToolsDataStatus>;
|
|
45
|
+
|
|
46
|
+
export const GetAllToolsDataToolsType = {
|
|
47
|
+
OrqHttp: "orq_http",
|
|
48
|
+
} as const;
|
|
49
|
+
export type GetAllToolsDataToolsType = ClosedEnum<
|
|
50
|
+
typeof GetAllToolsDataToolsType
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The HTTP method to use.
|
|
55
|
+
*/
|
|
56
|
+
export const DataMethod = {
|
|
57
|
+
Get: "GET",
|
|
58
|
+
Post: "POST",
|
|
59
|
+
Put: "PUT",
|
|
60
|
+
Delete: "DELETE",
|
|
61
|
+
} as const;
|
|
62
|
+
/**
|
|
63
|
+
* The HTTP method to use.
|
|
64
|
+
*/
|
|
65
|
+
export type DataMethod = ClosedEnum<typeof DataMethod>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
69
|
+
*/
|
|
70
|
+
export type DataBlueprint = {
|
|
71
|
+
/**
|
|
72
|
+
* The URL to send the request to.
|
|
73
|
+
*/
|
|
74
|
+
url: string;
|
|
75
|
+
/**
|
|
76
|
+
* The HTTP method to use.
|
|
77
|
+
*/
|
|
78
|
+
method: DataMethod;
|
|
79
|
+
/**
|
|
80
|
+
* The headers to send with the request.
|
|
81
|
+
*/
|
|
82
|
+
headers?: { [k: string]: string } | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The body to send with the request.
|
|
85
|
+
*/
|
|
86
|
+
body?: { [k: string]: any } | undefined;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The type of the argument.
|
|
91
|
+
*/
|
|
92
|
+
export const GetAllToolsDataToolsResponseType = {
|
|
93
|
+
String: "string",
|
|
94
|
+
Number: "number",
|
|
95
|
+
Boolean: "boolean",
|
|
96
|
+
} as const;
|
|
97
|
+
/**
|
|
98
|
+
* The type of the argument.
|
|
99
|
+
*/
|
|
100
|
+
export type GetAllToolsDataToolsResponseType = ClosedEnum<
|
|
101
|
+
typeof GetAllToolsDataToolsResponseType
|
|
102
|
+
>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The default value of the argument.
|
|
106
|
+
*/
|
|
107
|
+
export type DataDefaultValue = string | number | boolean;
|
|
108
|
+
|
|
109
|
+
export type DataArguments = {
|
|
110
|
+
/**
|
|
111
|
+
* The type of the argument.
|
|
112
|
+
*/
|
|
113
|
+
type: GetAllToolsDataToolsResponseType;
|
|
114
|
+
/**
|
|
115
|
+
* A description of the argument.
|
|
116
|
+
*/
|
|
117
|
+
description: string;
|
|
118
|
+
/**
|
|
119
|
+
* 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.
|
|
120
|
+
*/
|
|
121
|
+
sendToModel?: boolean | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The default value of the argument.
|
|
124
|
+
*/
|
|
125
|
+
defaultValue?: string | number | boolean | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type DataHttp = {
|
|
129
|
+
/**
|
|
130
|
+
* The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
|
|
131
|
+
*/
|
|
132
|
+
blueprint: DataBlueprint;
|
|
133
|
+
/**
|
|
134
|
+
* The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
|
|
135
|
+
*/
|
|
136
|
+
arguments?: { [k: string]: DataArguments } | undefined;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export type Data3 = {
|
|
140
|
+
id?: string | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* 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.
|
|
143
|
+
*/
|
|
144
|
+
path: string;
|
|
145
|
+
/**
|
|
146
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
147
|
+
*/
|
|
148
|
+
key: string;
|
|
149
|
+
/**
|
|
150
|
+
* 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.
|
|
151
|
+
*/
|
|
152
|
+
description: string;
|
|
153
|
+
/**
|
|
154
|
+
* The id of the user that created the tool
|
|
155
|
+
*/
|
|
156
|
+
createdById?: string | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* The id of the user that last updated the tool
|
|
159
|
+
*/
|
|
160
|
+
updatedById?: string | undefined;
|
|
161
|
+
projectId: string;
|
|
162
|
+
workspaceId: string;
|
|
163
|
+
created: string;
|
|
164
|
+
updated: string;
|
|
165
|
+
/**
|
|
166
|
+
* 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.
|
|
167
|
+
*/
|
|
168
|
+
status: GetAllToolsDataStatus;
|
|
169
|
+
versionHash: string;
|
|
170
|
+
type: GetAllToolsDataToolsType;
|
|
171
|
+
http: DataHttp;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* 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.
|
|
176
|
+
*/
|
|
177
|
+
export const DataStatus = {
|
|
178
|
+
Live: "live",
|
|
179
|
+
Draft: "draft",
|
|
180
|
+
Pending: "pending",
|
|
181
|
+
Published: "published",
|
|
182
|
+
} as const;
|
|
183
|
+
/**
|
|
184
|
+
* 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.
|
|
185
|
+
*/
|
|
186
|
+
export type DataStatus = ClosedEnum<typeof DataStatus>;
|
|
187
|
+
|
|
188
|
+
export const GetAllToolsDataType = {
|
|
189
|
+
JsonSchema: "json_schema",
|
|
190
|
+
} as const;
|
|
191
|
+
export type GetAllToolsDataType = ClosedEnum<typeof GetAllToolsDataType>;
|
|
192
|
+
|
|
193
|
+
export type DataJsonSchema = {
|
|
194
|
+
/**
|
|
195
|
+
* 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.
|
|
196
|
+
*/
|
|
197
|
+
name: string;
|
|
198
|
+
/**
|
|
199
|
+
* A description of what the response format is for. This will be shown to the user.
|
|
200
|
+
*/
|
|
201
|
+
description?: string | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* 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.
|
|
204
|
+
*/
|
|
205
|
+
schema: { [k: string]: any };
|
|
206
|
+
/**
|
|
207
|
+
* 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.
|
|
208
|
+
*/
|
|
209
|
+
strict?: boolean | null | undefined;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export type Data2 = {
|
|
213
|
+
id?: string | undefined;
|
|
214
|
+
/**
|
|
215
|
+
* 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.
|
|
216
|
+
*/
|
|
217
|
+
path: string;
|
|
218
|
+
/**
|
|
219
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
220
|
+
*/
|
|
221
|
+
key: string;
|
|
222
|
+
/**
|
|
223
|
+
* 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.
|
|
224
|
+
*/
|
|
225
|
+
description: string;
|
|
226
|
+
/**
|
|
227
|
+
* The id of the user that created the tool
|
|
228
|
+
*/
|
|
229
|
+
createdById?: string | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* The id of the user that last updated the tool
|
|
232
|
+
*/
|
|
233
|
+
updatedById?: string | undefined;
|
|
234
|
+
projectId: string;
|
|
235
|
+
workspaceId: string;
|
|
236
|
+
created: string;
|
|
237
|
+
updated: string;
|
|
238
|
+
/**
|
|
239
|
+
* 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.
|
|
240
|
+
*/
|
|
241
|
+
status: DataStatus;
|
|
242
|
+
versionHash: string;
|
|
243
|
+
type: GetAllToolsDataType;
|
|
244
|
+
jsonSchema: DataJsonSchema;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* 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.
|
|
249
|
+
*/
|
|
250
|
+
export const GetAllToolsDataToolsStatus = {
|
|
251
|
+
Live: "live",
|
|
252
|
+
Draft: "draft",
|
|
253
|
+
Pending: "pending",
|
|
254
|
+
Published: "published",
|
|
255
|
+
} as const;
|
|
256
|
+
/**
|
|
257
|
+
* 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.
|
|
258
|
+
*/
|
|
259
|
+
export type GetAllToolsDataToolsStatus = ClosedEnum<
|
|
260
|
+
typeof GetAllToolsDataToolsStatus
|
|
261
|
+
>;
|
|
262
|
+
|
|
263
|
+
export const DataType = {
|
|
264
|
+
Function: "function",
|
|
265
|
+
} as const;
|
|
266
|
+
export type DataType = ClosedEnum<typeof DataType>;
|
|
267
|
+
|
|
268
|
+
export type DataFunction = {
|
|
269
|
+
/**
|
|
270
|
+
* 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.
|
|
271
|
+
*/
|
|
272
|
+
name: string;
|
|
273
|
+
/**
|
|
274
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
275
|
+
*/
|
|
276
|
+
description?: string | undefined;
|
|
277
|
+
/**
|
|
278
|
+
* 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.
|
|
279
|
+
*/
|
|
280
|
+
strict?: boolean | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* 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.
|
|
283
|
+
*/
|
|
284
|
+
parameters?: { [k: string]: any } | undefined;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export type Data1 = {
|
|
288
|
+
id?: string | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* 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.
|
|
291
|
+
*/
|
|
292
|
+
path: string;
|
|
293
|
+
/**
|
|
294
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
295
|
+
*/
|
|
296
|
+
key: string;
|
|
297
|
+
/**
|
|
298
|
+
* 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.
|
|
299
|
+
*/
|
|
300
|
+
description: string;
|
|
301
|
+
/**
|
|
302
|
+
* The id of the user that created the tool
|
|
303
|
+
*/
|
|
304
|
+
createdById?: string | undefined;
|
|
305
|
+
/**
|
|
306
|
+
* The id of the user that last updated the tool
|
|
307
|
+
*/
|
|
308
|
+
updatedById?: string | undefined;
|
|
309
|
+
projectId: string;
|
|
310
|
+
workspaceId: string;
|
|
311
|
+
created: string;
|
|
312
|
+
updated: string;
|
|
313
|
+
/**
|
|
314
|
+
* 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.
|
|
315
|
+
*/
|
|
316
|
+
status: GetAllToolsDataToolsStatus;
|
|
317
|
+
versionHash: string;
|
|
318
|
+
type: DataType;
|
|
319
|
+
function: DataFunction;
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export type GetAllToolsData = Data1 | Data2 | Data3;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Successfully retrieved the list of tools.
|
|
326
|
+
*/
|
|
327
|
+
export type GetAllToolsResponseBody = {
|
|
328
|
+
object: GetAllToolsObject;
|
|
329
|
+
data: Array<Data1 | Data2 | Data3>;
|
|
330
|
+
hasMore: boolean;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
/** @internal */
|
|
334
|
+
export const GetAllToolsRequest$inboundSchema: z.ZodType<
|
|
335
|
+
GetAllToolsRequest,
|
|
336
|
+
z.ZodTypeDef,
|
|
337
|
+
unknown
|
|
338
|
+
> = z.object({
|
|
339
|
+
limit: z.number().default(10),
|
|
340
|
+
starting_after: z.string().optional(),
|
|
341
|
+
ending_before: z.string().optional(),
|
|
342
|
+
}).transform((v) => {
|
|
343
|
+
return remap$(v, {
|
|
344
|
+
"starting_after": "startingAfter",
|
|
345
|
+
"ending_before": "endingBefore",
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
/** @internal */
|
|
350
|
+
export type GetAllToolsRequest$Outbound = {
|
|
351
|
+
limit: number;
|
|
352
|
+
starting_after?: string | undefined;
|
|
353
|
+
ending_before?: string | undefined;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/** @internal */
|
|
357
|
+
export const GetAllToolsRequest$outboundSchema: z.ZodType<
|
|
358
|
+
GetAllToolsRequest$Outbound,
|
|
359
|
+
z.ZodTypeDef,
|
|
360
|
+
GetAllToolsRequest
|
|
361
|
+
> = z.object({
|
|
362
|
+
limit: z.number().default(10),
|
|
363
|
+
startingAfter: z.string().optional(),
|
|
364
|
+
endingBefore: z.string().optional(),
|
|
365
|
+
}).transform((v) => {
|
|
366
|
+
return remap$(v, {
|
|
367
|
+
startingAfter: "starting_after",
|
|
368
|
+
endingBefore: "ending_before",
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* @internal
|
|
374
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
375
|
+
*/
|
|
376
|
+
export namespace GetAllToolsRequest$ {
|
|
377
|
+
/** @deprecated use `GetAllToolsRequest$inboundSchema` instead. */
|
|
378
|
+
export const inboundSchema = GetAllToolsRequest$inboundSchema;
|
|
379
|
+
/** @deprecated use `GetAllToolsRequest$outboundSchema` instead. */
|
|
380
|
+
export const outboundSchema = GetAllToolsRequest$outboundSchema;
|
|
381
|
+
/** @deprecated use `GetAllToolsRequest$Outbound` instead. */
|
|
382
|
+
export type Outbound = GetAllToolsRequest$Outbound;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export function getAllToolsRequestToJSON(
|
|
386
|
+
getAllToolsRequest: GetAllToolsRequest,
|
|
387
|
+
): string {
|
|
388
|
+
return JSON.stringify(
|
|
389
|
+
GetAllToolsRequest$outboundSchema.parse(getAllToolsRequest),
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export function getAllToolsRequestFromJSON(
|
|
394
|
+
jsonString: string,
|
|
395
|
+
): SafeParseResult<GetAllToolsRequest, SDKValidationError> {
|
|
396
|
+
return safeParse(
|
|
397
|
+
jsonString,
|
|
398
|
+
(x) => GetAllToolsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
399
|
+
`Failed to parse 'GetAllToolsRequest' from JSON`,
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** @internal */
|
|
404
|
+
export const GetAllToolsObject$inboundSchema: z.ZodNativeEnum<
|
|
405
|
+
typeof GetAllToolsObject
|
|
406
|
+
> = z.nativeEnum(GetAllToolsObject);
|
|
407
|
+
|
|
408
|
+
/** @internal */
|
|
409
|
+
export const GetAllToolsObject$outboundSchema: z.ZodNativeEnum<
|
|
410
|
+
typeof GetAllToolsObject
|
|
411
|
+
> = GetAllToolsObject$inboundSchema;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @internal
|
|
415
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
416
|
+
*/
|
|
417
|
+
export namespace GetAllToolsObject$ {
|
|
418
|
+
/** @deprecated use `GetAllToolsObject$inboundSchema` instead. */
|
|
419
|
+
export const inboundSchema = GetAllToolsObject$inboundSchema;
|
|
420
|
+
/** @deprecated use `GetAllToolsObject$outboundSchema` instead. */
|
|
421
|
+
export const outboundSchema = GetAllToolsObject$outboundSchema;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** @internal */
|
|
425
|
+
export const GetAllToolsDataStatus$inboundSchema: z.ZodNativeEnum<
|
|
426
|
+
typeof GetAllToolsDataStatus
|
|
427
|
+
> = z.nativeEnum(GetAllToolsDataStatus);
|
|
428
|
+
|
|
429
|
+
/** @internal */
|
|
430
|
+
export const GetAllToolsDataStatus$outboundSchema: z.ZodNativeEnum<
|
|
431
|
+
typeof GetAllToolsDataStatus
|
|
432
|
+
> = GetAllToolsDataStatus$inboundSchema;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
437
|
+
*/
|
|
438
|
+
export namespace GetAllToolsDataStatus$ {
|
|
439
|
+
/** @deprecated use `GetAllToolsDataStatus$inboundSchema` instead. */
|
|
440
|
+
export const inboundSchema = GetAllToolsDataStatus$inboundSchema;
|
|
441
|
+
/** @deprecated use `GetAllToolsDataStatus$outboundSchema` instead. */
|
|
442
|
+
export const outboundSchema = GetAllToolsDataStatus$outboundSchema;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/** @internal */
|
|
446
|
+
export const GetAllToolsDataToolsType$inboundSchema: z.ZodNativeEnum<
|
|
447
|
+
typeof GetAllToolsDataToolsType
|
|
448
|
+
> = z.nativeEnum(GetAllToolsDataToolsType);
|
|
449
|
+
|
|
450
|
+
/** @internal */
|
|
451
|
+
export const GetAllToolsDataToolsType$outboundSchema: z.ZodNativeEnum<
|
|
452
|
+
typeof GetAllToolsDataToolsType
|
|
453
|
+
> = GetAllToolsDataToolsType$inboundSchema;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* @internal
|
|
457
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
458
|
+
*/
|
|
459
|
+
export namespace GetAllToolsDataToolsType$ {
|
|
460
|
+
/** @deprecated use `GetAllToolsDataToolsType$inboundSchema` instead. */
|
|
461
|
+
export const inboundSchema = GetAllToolsDataToolsType$inboundSchema;
|
|
462
|
+
/** @deprecated use `GetAllToolsDataToolsType$outboundSchema` instead. */
|
|
463
|
+
export const outboundSchema = GetAllToolsDataToolsType$outboundSchema;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/** @internal */
|
|
467
|
+
export const DataMethod$inboundSchema: z.ZodNativeEnum<typeof DataMethod> = z
|
|
468
|
+
.nativeEnum(DataMethod);
|
|
469
|
+
|
|
470
|
+
/** @internal */
|
|
471
|
+
export const DataMethod$outboundSchema: z.ZodNativeEnum<typeof DataMethod> =
|
|
472
|
+
DataMethod$inboundSchema;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* @internal
|
|
476
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
477
|
+
*/
|
|
478
|
+
export namespace DataMethod$ {
|
|
479
|
+
/** @deprecated use `DataMethod$inboundSchema` instead. */
|
|
480
|
+
export const inboundSchema = DataMethod$inboundSchema;
|
|
481
|
+
/** @deprecated use `DataMethod$outboundSchema` instead. */
|
|
482
|
+
export const outboundSchema = DataMethod$outboundSchema;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** @internal */
|
|
486
|
+
export const DataBlueprint$inboundSchema: z.ZodType<
|
|
487
|
+
DataBlueprint,
|
|
488
|
+
z.ZodTypeDef,
|
|
489
|
+
unknown
|
|
490
|
+
> = z.object({
|
|
491
|
+
url: z.string(),
|
|
492
|
+
method: DataMethod$inboundSchema,
|
|
493
|
+
headers: z.record(z.string()).optional(),
|
|
494
|
+
body: z.record(z.any()).optional(),
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
/** @internal */
|
|
498
|
+
export type DataBlueprint$Outbound = {
|
|
499
|
+
url: string;
|
|
500
|
+
method: string;
|
|
501
|
+
headers?: { [k: string]: string } | undefined;
|
|
502
|
+
body?: { [k: string]: any } | undefined;
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
/** @internal */
|
|
506
|
+
export const DataBlueprint$outboundSchema: z.ZodType<
|
|
507
|
+
DataBlueprint$Outbound,
|
|
508
|
+
z.ZodTypeDef,
|
|
509
|
+
DataBlueprint
|
|
510
|
+
> = z.object({
|
|
511
|
+
url: z.string(),
|
|
512
|
+
method: DataMethod$outboundSchema,
|
|
513
|
+
headers: z.record(z.string()).optional(),
|
|
514
|
+
body: z.record(z.any()).optional(),
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* @internal
|
|
519
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
520
|
+
*/
|
|
521
|
+
export namespace DataBlueprint$ {
|
|
522
|
+
/** @deprecated use `DataBlueprint$inboundSchema` instead. */
|
|
523
|
+
export const inboundSchema = DataBlueprint$inboundSchema;
|
|
524
|
+
/** @deprecated use `DataBlueprint$outboundSchema` instead. */
|
|
525
|
+
export const outboundSchema = DataBlueprint$outboundSchema;
|
|
526
|
+
/** @deprecated use `DataBlueprint$Outbound` instead. */
|
|
527
|
+
export type Outbound = DataBlueprint$Outbound;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function dataBlueprintToJSON(dataBlueprint: DataBlueprint): string {
|
|
531
|
+
return JSON.stringify(DataBlueprint$outboundSchema.parse(dataBlueprint));
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export function dataBlueprintFromJSON(
|
|
535
|
+
jsonString: string,
|
|
536
|
+
): SafeParseResult<DataBlueprint, SDKValidationError> {
|
|
537
|
+
return safeParse(
|
|
538
|
+
jsonString,
|
|
539
|
+
(x) => DataBlueprint$inboundSchema.parse(JSON.parse(x)),
|
|
540
|
+
`Failed to parse 'DataBlueprint' from JSON`,
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/** @internal */
|
|
545
|
+
export const GetAllToolsDataToolsResponseType$inboundSchema: z.ZodNativeEnum<
|
|
546
|
+
typeof GetAllToolsDataToolsResponseType
|
|
547
|
+
> = z.nativeEnum(GetAllToolsDataToolsResponseType);
|
|
548
|
+
|
|
549
|
+
/** @internal */
|
|
550
|
+
export const GetAllToolsDataToolsResponseType$outboundSchema: z.ZodNativeEnum<
|
|
551
|
+
typeof GetAllToolsDataToolsResponseType
|
|
552
|
+
> = GetAllToolsDataToolsResponseType$inboundSchema;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* @internal
|
|
556
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
557
|
+
*/
|
|
558
|
+
export namespace GetAllToolsDataToolsResponseType$ {
|
|
559
|
+
/** @deprecated use `GetAllToolsDataToolsResponseType$inboundSchema` instead. */
|
|
560
|
+
export const inboundSchema = GetAllToolsDataToolsResponseType$inboundSchema;
|
|
561
|
+
/** @deprecated use `GetAllToolsDataToolsResponseType$outboundSchema` instead. */
|
|
562
|
+
export const outboundSchema = GetAllToolsDataToolsResponseType$outboundSchema;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/** @internal */
|
|
566
|
+
export const DataDefaultValue$inboundSchema: z.ZodType<
|
|
567
|
+
DataDefaultValue,
|
|
568
|
+
z.ZodTypeDef,
|
|
569
|
+
unknown
|
|
570
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
571
|
+
|
|
572
|
+
/** @internal */
|
|
573
|
+
export type DataDefaultValue$Outbound = string | number | boolean;
|
|
574
|
+
|
|
575
|
+
/** @internal */
|
|
576
|
+
export const DataDefaultValue$outboundSchema: z.ZodType<
|
|
577
|
+
DataDefaultValue$Outbound,
|
|
578
|
+
z.ZodTypeDef,
|
|
579
|
+
DataDefaultValue
|
|
580
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* @internal
|
|
584
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
585
|
+
*/
|
|
586
|
+
export namespace DataDefaultValue$ {
|
|
587
|
+
/** @deprecated use `DataDefaultValue$inboundSchema` instead. */
|
|
588
|
+
export const inboundSchema = DataDefaultValue$inboundSchema;
|
|
589
|
+
/** @deprecated use `DataDefaultValue$outboundSchema` instead. */
|
|
590
|
+
export const outboundSchema = DataDefaultValue$outboundSchema;
|
|
591
|
+
/** @deprecated use `DataDefaultValue$Outbound` instead. */
|
|
592
|
+
export type Outbound = DataDefaultValue$Outbound;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export function dataDefaultValueToJSON(
|
|
596
|
+
dataDefaultValue: DataDefaultValue,
|
|
597
|
+
): string {
|
|
598
|
+
return JSON.stringify(
|
|
599
|
+
DataDefaultValue$outboundSchema.parse(dataDefaultValue),
|
|
600
|
+
);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export function dataDefaultValueFromJSON(
|
|
604
|
+
jsonString: string,
|
|
605
|
+
): SafeParseResult<DataDefaultValue, SDKValidationError> {
|
|
606
|
+
return safeParse(
|
|
607
|
+
jsonString,
|
|
608
|
+
(x) => DataDefaultValue$inboundSchema.parse(JSON.parse(x)),
|
|
609
|
+
`Failed to parse 'DataDefaultValue' from JSON`,
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
/** @internal */
|
|
614
|
+
export const DataArguments$inboundSchema: z.ZodType<
|
|
615
|
+
DataArguments,
|
|
616
|
+
z.ZodTypeDef,
|
|
617
|
+
unknown
|
|
618
|
+
> = z.object({
|
|
619
|
+
type: GetAllToolsDataToolsResponseType$inboundSchema,
|
|
620
|
+
description: z.string(),
|
|
621
|
+
send_to_model: z.boolean().default(true),
|
|
622
|
+
default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
623
|
+
}).transform((v) => {
|
|
624
|
+
return remap$(v, {
|
|
625
|
+
"send_to_model": "sendToModel",
|
|
626
|
+
"default_value": "defaultValue",
|
|
627
|
+
});
|
|
628
|
+
});
|
|
629
|
+
|
|
630
|
+
/** @internal */
|
|
631
|
+
export type DataArguments$Outbound = {
|
|
632
|
+
type: string;
|
|
633
|
+
description: string;
|
|
634
|
+
send_to_model: boolean;
|
|
635
|
+
default_value?: string | number | boolean | undefined;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
/** @internal */
|
|
639
|
+
export const DataArguments$outboundSchema: z.ZodType<
|
|
640
|
+
DataArguments$Outbound,
|
|
641
|
+
z.ZodTypeDef,
|
|
642
|
+
DataArguments
|
|
643
|
+
> = z.object({
|
|
644
|
+
type: GetAllToolsDataToolsResponseType$outboundSchema,
|
|
645
|
+
description: z.string(),
|
|
646
|
+
sendToModel: z.boolean().default(true),
|
|
647
|
+
defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
|
|
648
|
+
}).transform((v) => {
|
|
649
|
+
return remap$(v, {
|
|
650
|
+
sendToModel: "send_to_model",
|
|
651
|
+
defaultValue: "default_value",
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* @internal
|
|
657
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
658
|
+
*/
|
|
659
|
+
export namespace DataArguments$ {
|
|
660
|
+
/** @deprecated use `DataArguments$inboundSchema` instead. */
|
|
661
|
+
export const inboundSchema = DataArguments$inboundSchema;
|
|
662
|
+
/** @deprecated use `DataArguments$outboundSchema` instead. */
|
|
663
|
+
export const outboundSchema = DataArguments$outboundSchema;
|
|
664
|
+
/** @deprecated use `DataArguments$Outbound` instead. */
|
|
665
|
+
export type Outbound = DataArguments$Outbound;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
export function dataArgumentsToJSON(dataArguments: DataArguments): string {
|
|
669
|
+
return JSON.stringify(DataArguments$outboundSchema.parse(dataArguments));
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export function dataArgumentsFromJSON(
|
|
673
|
+
jsonString: string,
|
|
674
|
+
): SafeParseResult<DataArguments, SDKValidationError> {
|
|
675
|
+
return safeParse(
|
|
676
|
+
jsonString,
|
|
677
|
+
(x) => DataArguments$inboundSchema.parse(JSON.parse(x)),
|
|
678
|
+
`Failed to parse 'DataArguments' from JSON`,
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** @internal */
|
|
683
|
+
export const DataHttp$inboundSchema: z.ZodType<
|
|
684
|
+
DataHttp,
|
|
685
|
+
z.ZodTypeDef,
|
|
686
|
+
unknown
|
|
687
|
+
> = z.object({
|
|
688
|
+
blueprint: z.lazy(() => DataBlueprint$inboundSchema),
|
|
689
|
+
arguments: z.record(z.lazy(() => DataArguments$inboundSchema)).optional(),
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
/** @internal */
|
|
693
|
+
export type DataHttp$Outbound = {
|
|
694
|
+
blueprint: DataBlueprint$Outbound;
|
|
695
|
+
arguments?: { [k: string]: DataArguments$Outbound } | undefined;
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
/** @internal */
|
|
699
|
+
export const DataHttp$outboundSchema: z.ZodType<
|
|
700
|
+
DataHttp$Outbound,
|
|
701
|
+
z.ZodTypeDef,
|
|
702
|
+
DataHttp
|
|
703
|
+
> = z.object({
|
|
704
|
+
blueprint: z.lazy(() => DataBlueprint$outboundSchema),
|
|
705
|
+
arguments: z.record(z.lazy(() => DataArguments$outboundSchema)).optional(),
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* @internal
|
|
710
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
711
|
+
*/
|
|
712
|
+
export namespace DataHttp$ {
|
|
713
|
+
/** @deprecated use `DataHttp$inboundSchema` instead. */
|
|
714
|
+
export const inboundSchema = DataHttp$inboundSchema;
|
|
715
|
+
/** @deprecated use `DataHttp$outboundSchema` instead. */
|
|
716
|
+
export const outboundSchema = DataHttp$outboundSchema;
|
|
717
|
+
/** @deprecated use `DataHttp$Outbound` instead. */
|
|
718
|
+
export type Outbound = DataHttp$Outbound;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export function dataHttpToJSON(dataHttp: DataHttp): string {
|
|
722
|
+
return JSON.stringify(DataHttp$outboundSchema.parse(dataHttp));
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
export function dataHttpFromJSON(
|
|
726
|
+
jsonString: string,
|
|
727
|
+
): SafeParseResult<DataHttp, SDKValidationError> {
|
|
728
|
+
return safeParse(
|
|
729
|
+
jsonString,
|
|
730
|
+
(x) => DataHttp$inboundSchema.parse(JSON.parse(x)),
|
|
731
|
+
`Failed to parse 'DataHttp' from JSON`,
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/** @internal */
|
|
736
|
+
export const Data3$inboundSchema: z.ZodType<Data3, z.ZodTypeDef, unknown> = z
|
|
737
|
+
.object({
|
|
738
|
+
_id: z.string().default("tool_01JRT05N2M5WE9S565KZ1R9G1B"),
|
|
739
|
+
path: z.string(),
|
|
740
|
+
key: z.string(),
|
|
741
|
+
description: z.string(),
|
|
742
|
+
created_by_id: z.string().optional(),
|
|
743
|
+
updated_by_id: z.string().optional(),
|
|
744
|
+
project_id: z.string(),
|
|
745
|
+
workspace_id: z.string(),
|
|
746
|
+
created: z.string(),
|
|
747
|
+
updated: z.string(),
|
|
748
|
+
status: GetAllToolsDataStatus$inboundSchema,
|
|
749
|
+
version_hash: z.string(),
|
|
750
|
+
type: GetAllToolsDataToolsType$inboundSchema,
|
|
751
|
+
http: z.lazy(() => DataHttp$inboundSchema),
|
|
752
|
+
}).transform((v) => {
|
|
753
|
+
return remap$(v, {
|
|
754
|
+
"_id": "id",
|
|
755
|
+
"created_by_id": "createdById",
|
|
756
|
+
"updated_by_id": "updatedById",
|
|
757
|
+
"project_id": "projectId",
|
|
758
|
+
"workspace_id": "workspaceId",
|
|
759
|
+
"version_hash": "versionHash",
|
|
760
|
+
});
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
/** @internal */
|
|
764
|
+
export type Data3$Outbound = {
|
|
765
|
+
_id: string;
|
|
766
|
+
path: string;
|
|
767
|
+
key: string;
|
|
768
|
+
description: string;
|
|
769
|
+
created_by_id?: string | undefined;
|
|
770
|
+
updated_by_id?: string | undefined;
|
|
771
|
+
project_id: string;
|
|
772
|
+
workspace_id: string;
|
|
773
|
+
created: string;
|
|
774
|
+
updated: string;
|
|
775
|
+
status: string;
|
|
776
|
+
version_hash: string;
|
|
777
|
+
type: string;
|
|
778
|
+
http: DataHttp$Outbound;
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
/** @internal */
|
|
782
|
+
export const Data3$outboundSchema: z.ZodType<
|
|
783
|
+
Data3$Outbound,
|
|
784
|
+
z.ZodTypeDef,
|
|
785
|
+
Data3
|
|
786
|
+
> = z.object({
|
|
787
|
+
id: z.string().default("tool_01JRT05N2M5WE9S565KZ1R9G1B"),
|
|
788
|
+
path: z.string(),
|
|
789
|
+
key: z.string(),
|
|
790
|
+
description: z.string(),
|
|
791
|
+
createdById: z.string().optional(),
|
|
792
|
+
updatedById: z.string().optional(),
|
|
793
|
+
projectId: z.string(),
|
|
794
|
+
workspaceId: z.string(),
|
|
795
|
+
created: z.string(),
|
|
796
|
+
updated: z.string(),
|
|
797
|
+
status: GetAllToolsDataStatus$outboundSchema,
|
|
798
|
+
versionHash: z.string(),
|
|
799
|
+
type: GetAllToolsDataToolsType$outboundSchema,
|
|
800
|
+
http: z.lazy(() => DataHttp$outboundSchema),
|
|
801
|
+
}).transform((v) => {
|
|
802
|
+
return remap$(v, {
|
|
803
|
+
id: "_id",
|
|
804
|
+
createdById: "created_by_id",
|
|
805
|
+
updatedById: "updated_by_id",
|
|
806
|
+
projectId: "project_id",
|
|
807
|
+
workspaceId: "workspace_id",
|
|
808
|
+
versionHash: "version_hash",
|
|
809
|
+
});
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* @internal
|
|
814
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
815
|
+
*/
|
|
816
|
+
export namespace Data3$ {
|
|
817
|
+
/** @deprecated use `Data3$inboundSchema` instead. */
|
|
818
|
+
export const inboundSchema = Data3$inboundSchema;
|
|
819
|
+
/** @deprecated use `Data3$outboundSchema` instead. */
|
|
820
|
+
export const outboundSchema = Data3$outboundSchema;
|
|
821
|
+
/** @deprecated use `Data3$Outbound` instead. */
|
|
822
|
+
export type Outbound = Data3$Outbound;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export function data3ToJSON(data3: Data3): string {
|
|
826
|
+
return JSON.stringify(Data3$outboundSchema.parse(data3));
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export function data3FromJSON(
|
|
830
|
+
jsonString: string,
|
|
831
|
+
): SafeParseResult<Data3, SDKValidationError> {
|
|
832
|
+
return safeParse(
|
|
833
|
+
jsonString,
|
|
834
|
+
(x) => Data3$inboundSchema.parse(JSON.parse(x)),
|
|
835
|
+
`Failed to parse 'Data3' from JSON`,
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/** @internal */
|
|
840
|
+
export const DataStatus$inboundSchema: z.ZodNativeEnum<typeof DataStatus> = z
|
|
841
|
+
.nativeEnum(DataStatus);
|
|
842
|
+
|
|
843
|
+
/** @internal */
|
|
844
|
+
export const DataStatus$outboundSchema: z.ZodNativeEnum<typeof DataStatus> =
|
|
845
|
+
DataStatus$inboundSchema;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* @internal
|
|
849
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
850
|
+
*/
|
|
851
|
+
export namespace DataStatus$ {
|
|
852
|
+
/** @deprecated use `DataStatus$inboundSchema` instead. */
|
|
853
|
+
export const inboundSchema = DataStatus$inboundSchema;
|
|
854
|
+
/** @deprecated use `DataStatus$outboundSchema` instead. */
|
|
855
|
+
export const outboundSchema = DataStatus$outboundSchema;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
/** @internal */
|
|
859
|
+
export const GetAllToolsDataType$inboundSchema: z.ZodNativeEnum<
|
|
860
|
+
typeof GetAllToolsDataType
|
|
861
|
+
> = z.nativeEnum(GetAllToolsDataType);
|
|
862
|
+
|
|
863
|
+
/** @internal */
|
|
864
|
+
export const GetAllToolsDataType$outboundSchema: z.ZodNativeEnum<
|
|
865
|
+
typeof GetAllToolsDataType
|
|
866
|
+
> = GetAllToolsDataType$inboundSchema;
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* @internal
|
|
870
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
871
|
+
*/
|
|
872
|
+
export namespace GetAllToolsDataType$ {
|
|
873
|
+
/** @deprecated use `GetAllToolsDataType$inboundSchema` instead. */
|
|
874
|
+
export const inboundSchema = GetAllToolsDataType$inboundSchema;
|
|
875
|
+
/** @deprecated use `GetAllToolsDataType$outboundSchema` instead. */
|
|
876
|
+
export const outboundSchema = GetAllToolsDataType$outboundSchema;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/** @internal */
|
|
880
|
+
export const DataJsonSchema$inboundSchema: z.ZodType<
|
|
881
|
+
DataJsonSchema,
|
|
882
|
+
z.ZodTypeDef,
|
|
883
|
+
unknown
|
|
884
|
+
> = z.object({
|
|
885
|
+
name: z.string(),
|
|
886
|
+
description: z.string().optional(),
|
|
887
|
+
schema: z.record(z.any()),
|
|
888
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
889
|
+
});
|
|
890
|
+
|
|
891
|
+
/** @internal */
|
|
892
|
+
export type DataJsonSchema$Outbound = {
|
|
893
|
+
name: string;
|
|
894
|
+
description?: string | undefined;
|
|
895
|
+
schema: { [k: string]: any };
|
|
896
|
+
strict: boolean | null;
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
/** @internal */
|
|
900
|
+
export const DataJsonSchema$outboundSchema: z.ZodType<
|
|
901
|
+
DataJsonSchema$Outbound,
|
|
902
|
+
z.ZodTypeDef,
|
|
903
|
+
DataJsonSchema
|
|
904
|
+
> = z.object({
|
|
905
|
+
name: z.string(),
|
|
906
|
+
description: z.string().optional(),
|
|
907
|
+
schema: z.record(z.any()),
|
|
908
|
+
strict: z.nullable(z.boolean().default(false)),
|
|
909
|
+
});
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* @internal
|
|
913
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
914
|
+
*/
|
|
915
|
+
export namespace DataJsonSchema$ {
|
|
916
|
+
/** @deprecated use `DataJsonSchema$inboundSchema` instead. */
|
|
917
|
+
export const inboundSchema = DataJsonSchema$inboundSchema;
|
|
918
|
+
/** @deprecated use `DataJsonSchema$outboundSchema` instead. */
|
|
919
|
+
export const outboundSchema = DataJsonSchema$outboundSchema;
|
|
920
|
+
/** @deprecated use `DataJsonSchema$Outbound` instead. */
|
|
921
|
+
export type Outbound = DataJsonSchema$Outbound;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
export function dataJsonSchemaToJSON(dataJsonSchema: DataJsonSchema): string {
|
|
925
|
+
return JSON.stringify(DataJsonSchema$outboundSchema.parse(dataJsonSchema));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export function dataJsonSchemaFromJSON(
|
|
929
|
+
jsonString: string,
|
|
930
|
+
): SafeParseResult<DataJsonSchema, SDKValidationError> {
|
|
931
|
+
return safeParse(
|
|
932
|
+
jsonString,
|
|
933
|
+
(x) => DataJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
934
|
+
`Failed to parse 'DataJsonSchema' from JSON`,
|
|
935
|
+
);
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/** @internal */
|
|
939
|
+
export const Data2$inboundSchema: z.ZodType<Data2, z.ZodTypeDef, unknown> = z
|
|
940
|
+
.object({
|
|
941
|
+
_id: z.string().default("tool_01JRT05N2HY0RTJ5M7SHJH9T5N"),
|
|
942
|
+
path: z.string(),
|
|
943
|
+
key: z.string(),
|
|
944
|
+
description: z.string(),
|
|
945
|
+
created_by_id: z.string().optional(),
|
|
946
|
+
updated_by_id: z.string().optional(),
|
|
947
|
+
project_id: z.string(),
|
|
948
|
+
workspace_id: z.string(),
|
|
949
|
+
created: z.string(),
|
|
950
|
+
updated: z.string(),
|
|
951
|
+
status: DataStatus$inboundSchema,
|
|
952
|
+
version_hash: z.string(),
|
|
953
|
+
type: GetAllToolsDataType$inboundSchema,
|
|
954
|
+
json_schema: z.lazy(() => DataJsonSchema$inboundSchema),
|
|
955
|
+
}).transform((v) => {
|
|
956
|
+
return remap$(v, {
|
|
957
|
+
"_id": "id",
|
|
958
|
+
"created_by_id": "createdById",
|
|
959
|
+
"updated_by_id": "updatedById",
|
|
960
|
+
"project_id": "projectId",
|
|
961
|
+
"workspace_id": "workspaceId",
|
|
962
|
+
"version_hash": "versionHash",
|
|
963
|
+
"json_schema": "jsonSchema",
|
|
964
|
+
});
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
/** @internal */
|
|
968
|
+
export type Data2$Outbound = {
|
|
969
|
+
_id: string;
|
|
970
|
+
path: string;
|
|
971
|
+
key: string;
|
|
972
|
+
description: string;
|
|
973
|
+
created_by_id?: string | undefined;
|
|
974
|
+
updated_by_id?: string | undefined;
|
|
975
|
+
project_id: string;
|
|
976
|
+
workspace_id: string;
|
|
977
|
+
created: string;
|
|
978
|
+
updated: string;
|
|
979
|
+
status: string;
|
|
980
|
+
version_hash: string;
|
|
981
|
+
type: string;
|
|
982
|
+
json_schema: DataJsonSchema$Outbound;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
/** @internal */
|
|
986
|
+
export const Data2$outboundSchema: z.ZodType<
|
|
987
|
+
Data2$Outbound,
|
|
988
|
+
z.ZodTypeDef,
|
|
989
|
+
Data2
|
|
990
|
+
> = z.object({
|
|
991
|
+
id: z.string().default("tool_01JRT05N2HY0RTJ5M7SHJH9T5N"),
|
|
992
|
+
path: z.string(),
|
|
993
|
+
key: z.string(),
|
|
994
|
+
description: z.string(),
|
|
995
|
+
createdById: z.string().optional(),
|
|
996
|
+
updatedById: z.string().optional(),
|
|
997
|
+
projectId: z.string(),
|
|
998
|
+
workspaceId: z.string(),
|
|
999
|
+
created: z.string(),
|
|
1000
|
+
updated: z.string(),
|
|
1001
|
+
status: DataStatus$outboundSchema,
|
|
1002
|
+
versionHash: z.string(),
|
|
1003
|
+
type: GetAllToolsDataType$outboundSchema,
|
|
1004
|
+
jsonSchema: z.lazy(() => DataJsonSchema$outboundSchema),
|
|
1005
|
+
}).transform((v) => {
|
|
1006
|
+
return remap$(v, {
|
|
1007
|
+
id: "_id",
|
|
1008
|
+
createdById: "created_by_id",
|
|
1009
|
+
updatedById: "updated_by_id",
|
|
1010
|
+
projectId: "project_id",
|
|
1011
|
+
workspaceId: "workspace_id",
|
|
1012
|
+
versionHash: "version_hash",
|
|
1013
|
+
jsonSchema: "json_schema",
|
|
1014
|
+
});
|
|
1015
|
+
});
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* @internal
|
|
1019
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1020
|
+
*/
|
|
1021
|
+
export namespace Data2$ {
|
|
1022
|
+
/** @deprecated use `Data2$inboundSchema` instead. */
|
|
1023
|
+
export const inboundSchema = Data2$inboundSchema;
|
|
1024
|
+
/** @deprecated use `Data2$outboundSchema` instead. */
|
|
1025
|
+
export const outboundSchema = Data2$outboundSchema;
|
|
1026
|
+
/** @deprecated use `Data2$Outbound` instead. */
|
|
1027
|
+
export type Outbound = Data2$Outbound;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
export function data2ToJSON(data2: Data2): string {
|
|
1031
|
+
return JSON.stringify(Data2$outboundSchema.parse(data2));
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
export function data2FromJSON(
|
|
1035
|
+
jsonString: string,
|
|
1036
|
+
): SafeParseResult<Data2, SDKValidationError> {
|
|
1037
|
+
return safeParse(
|
|
1038
|
+
jsonString,
|
|
1039
|
+
(x) => Data2$inboundSchema.parse(JSON.parse(x)),
|
|
1040
|
+
`Failed to parse 'Data2' from JSON`,
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
/** @internal */
|
|
1045
|
+
export const GetAllToolsDataToolsStatus$inboundSchema: z.ZodNativeEnum<
|
|
1046
|
+
typeof GetAllToolsDataToolsStatus
|
|
1047
|
+
> = z.nativeEnum(GetAllToolsDataToolsStatus);
|
|
1048
|
+
|
|
1049
|
+
/** @internal */
|
|
1050
|
+
export const GetAllToolsDataToolsStatus$outboundSchema: z.ZodNativeEnum<
|
|
1051
|
+
typeof GetAllToolsDataToolsStatus
|
|
1052
|
+
> = GetAllToolsDataToolsStatus$inboundSchema;
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* @internal
|
|
1056
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1057
|
+
*/
|
|
1058
|
+
export namespace GetAllToolsDataToolsStatus$ {
|
|
1059
|
+
/** @deprecated use `GetAllToolsDataToolsStatus$inboundSchema` instead. */
|
|
1060
|
+
export const inboundSchema = GetAllToolsDataToolsStatus$inboundSchema;
|
|
1061
|
+
/** @deprecated use `GetAllToolsDataToolsStatus$outboundSchema` instead. */
|
|
1062
|
+
export const outboundSchema = GetAllToolsDataToolsStatus$outboundSchema;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
/** @internal */
|
|
1066
|
+
export const DataType$inboundSchema: z.ZodNativeEnum<typeof DataType> = z
|
|
1067
|
+
.nativeEnum(DataType);
|
|
1068
|
+
|
|
1069
|
+
/** @internal */
|
|
1070
|
+
export const DataType$outboundSchema: z.ZodNativeEnum<typeof DataType> =
|
|
1071
|
+
DataType$inboundSchema;
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* @internal
|
|
1075
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1076
|
+
*/
|
|
1077
|
+
export namespace DataType$ {
|
|
1078
|
+
/** @deprecated use `DataType$inboundSchema` instead. */
|
|
1079
|
+
export const inboundSchema = DataType$inboundSchema;
|
|
1080
|
+
/** @deprecated use `DataType$outboundSchema` instead. */
|
|
1081
|
+
export const outboundSchema = DataType$outboundSchema;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/** @internal */
|
|
1085
|
+
export const DataFunction$inboundSchema: z.ZodType<
|
|
1086
|
+
DataFunction,
|
|
1087
|
+
z.ZodTypeDef,
|
|
1088
|
+
unknown
|
|
1089
|
+
> = z.object({
|
|
1090
|
+
name: z.string(),
|
|
1091
|
+
description: z.string().optional(),
|
|
1092
|
+
strict: z.boolean().optional(),
|
|
1093
|
+
parameters: z.record(z.any()).optional(),
|
|
1094
|
+
});
|
|
1095
|
+
|
|
1096
|
+
/** @internal */
|
|
1097
|
+
export type DataFunction$Outbound = {
|
|
1098
|
+
name: string;
|
|
1099
|
+
description?: string | undefined;
|
|
1100
|
+
strict?: boolean | undefined;
|
|
1101
|
+
parameters?: { [k: string]: any } | undefined;
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
/** @internal */
|
|
1105
|
+
export const DataFunction$outboundSchema: z.ZodType<
|
|
1106
|
+
DataFunction$Outbound,
|
|
1107
|
+
z.ZodTypeDef,
|
|
1108
|
+
DataFunction
|
|
1109
|
+
> = z.object({
|
|
1110
|
+
name: z.string(),
|
|
1111
|
+
description: z.string().optional(),
|
|
1112
|
+
strict: z.boolean().optional(),
|
|
1113
|
+
parameters: z.record(z.any()).optional(),
|
|
1114
|
+
});
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @internal
|
|
1118
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1119
|
+
*/
|
|
1120
|
+
export namespace DataFunction$ {
|
|
1121
|
+
/** @deprecated use `DataFunction$inboundSchema` instead. */
|
|
1122
|
+
export const inboundSchema = DataFunction$inboundSchema;
|
|
1123
|
+
/** @deprecated use `DataFunction$outboundSchema` instead. */
|
|
1124
|
+
export const outboundSchema = DataFunction$outboundSchema;
|
|
1125
|
+
/** @deprecated use `DataFunction$Outbound` instead. */
|
|
1126
|
+
export type Outbound = DataFunction$Outbound;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export function dataFunctionToJSON(dataFunction: DataFunction): string {
|
|
1130
|
+
return JSON.stringify(DataFunction$outboundSchema.parse(dataFunction));
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
export function dataFunctionFromJSON(
|
|
1134
|
+
jsonString: string,
|
|
1135
|
+
): SafeParseResult<DataFunction, SDKValidationError> {
|
|
1136
|
+
return safeParse(
|
|
1137
|
+
jsonString,
|
|
1138
|
+
(x) => DataFunction$inboundSchema.parse(JSON.parse(x)),
|
|
1139
|
+
`Failed to parse 'DataFunction' from JSON`,
|
|
1140
|
+
);
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/** @internal */
|
|
1144
|
+
export const Data1$inboundSchema: z.ZodType<Data1, z.ZodTypeDef, unknown> = z
|
|
1145
|
+
.object({
|
|
1146
|
+
_id: z.string().default("tool_01JRT05N2HYA9BTYF01659WTYJ"),
|
|
1147
|
+
path: z.string(),
|
|
1148
|
+
key: z.string(),
|
|
1149
|
+
description: z.string(),
|
|
1150
|
+
created_by_id: z.string().optional(),
|
|
1151
|
+
updated_by_id: z.string().optional(),
|
|
1152
|
+
project_id: z.string(),
|
|
1153
|
+
workspace_id: z.string(),
|
|
1154
|
+
created: z.string(),
|
|
1155
|
+
updated: z.string(),
|
|
1156
|
+
status: GetAllToolsDataToolsStatus$inboundSchema,
|
|
1157
|
+
version_hash: z.string(),
|
|
1158
|
+
type: DataType$inboundSchema,
|
|
1159
|
+
function: z.lazy(() => DataFunction$inboundSchema),
|
|
1160
|
+
}).transform((v) => {
|
|
1161
|
+
return remap$(v, {
|
|
1162
|
+
"_id": "id",
|
|
1163
|
+
"created_by_id": "createdById",
|
|
1164
|
+
"updated_by_id": "updatedById",
|
|
1165
|
+
"project_id": "projectId",
|
|
1166
|
+
"workspace_id": "workspaceId",
|
|
1167
|
+
"version_hash": "versionHash",
|
|
1168
|
+
});
|
|
1169
|
+
});
|
|
1170
|
+
|
|
1171
|
+
/** @internal */
|
|
1172
|
+
export type Data1$Outbound = {
|
|
1173
|
+
_id: string;
|
|
1174
|
+
path: string;
|
|
1175
|
+
key: string;
|
|
1176
|
+
description: string;
|
|
1177
|
+
created_by_id?: string | undefined;
|
|
1178
|
+
updated_by_id?: string | undefined;
|
|
1179
|
+
project_id: string;
|
|
1180
|
+
workspace_id: string;
|
|
1181
|
+
created: string;
|
|
1182
|
+
updated: string;
|
|
1183
|
+
status: string;
|
|
1184
|
+
version_hash: string;
|
|
1185
|
+
type: string;
|
|
1186
|
+
function: DataFunction$Outbound;
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
/** @internal */
|
|
1190
|
+
export const Data1$outboundSchema: z.ZodType<
|
|
1191
|
+
Data1$Outbound,
|
|
1192
|
+
z.ZodTypeDef,
|
|
1193
|
+
Data1
|
|
1194
|
+
> = z.object({
|
|
1195
|
+
id: z.string().default("tool_01JRT05N2HYA9BTYF01659WTYJ"),
|
|
1196
|
+
path: z.string(),
|
|
1197
|
+
key: z.string(),
|
|
1198
|
+
description: z.string(),
|
|
1199
|
+
createdById: z.string().optional(),
|
|
1200
|
+
updatedById: z.string().optional(),
|
|
1201
|
+
projectId: z.string(),
|
|
1202
|
+
workspaceId: z.string(),
|
|
1203
|
+
created: z.string(),
|
|
1204
|
+
updated: z.string(),
|
|
1205
|
+
status: GetAllToolsDataToolsStatus$outboundSchema,
|
|
1206
|
+
versionHash: z.string(),
|
|
1207
|
+
type: DataType$outboundSchema,
|
|
1208
|
+
function: z.lazy(() => DataFunction$outboundSchema),
|
|
1209
|
+
}).transform((v) => {
|
|
1210
|
+
return remap$(v, {
|
|
1211
|
+
id: "_id",
|
|
1212
|
+
createdById: "created_by_id",
|
|
1213
|
+
updatedById: "updated_by_id",
|
|
1214
|
+
projectId: "project_id",
|
|
1215
|
+
workspaceId: "workspace_id",
|
|
1216
|
+
versionHash: "version_hash",
|
|
1217
|
+
});
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* @internal
|
|
1222
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1223
|
+
*/
|
|
1224
|
+
export namespace Data1$ {
|
|
1225
|
+
/** @deprecated use `Data1$inboundSchema` instead. */
|
|
1226
|
+
export const inboundSchema = Data1$inboundSchema;
|
|
1227
|
+
/** @deprecated use `Data1$outboundSchema` instead. */
|
|
1228
|
+
export const outboundSchema = Data1$outboundSchema;
|
|
1229
|
+
/** @deprecated use `Data1$Outbound` instead. */
|
|
1230
|
+
export type Outbound = Data1$Outbound;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export function data1ToJSON(data1: Data1): string {
|
|
1234
|
+
return JSON.stringify(Data1$outboundSchema.parse(data1));
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
export function data1FromJSON(
|
|
1238
|
+
jsonString: string,
|
|
1239
|
+
): SafeParseResult<Data1, SDKValidationError> {
|
|
1240
|
+
return safeParse(
|
|
1241
|
+
jsonString,
|
|
1242
|
+
(x) => Data1$inboundSchema.parse(JSON.parse(x)),
|
|
1243
|
+
`Failed to parse 'Data1' from JSON`,
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/** @internal */
|
|
1248
|
+
export const GetAllToolsData$inboundSchema: z.ZodType<
|
|
1249
|
+
GetAllToolsData,
|
|
1250
|
+
z.ZodTypeDef,
|
|
1251
|
+
unknown
|
|
1252
|
+
> = z.union([
|
|
1253
|
+
z.lazy(() => Data1$inboundSchema),
|
|
1254
|
+
z.lazy(() => Data2$inboundSchema),
|
|
1255
|
+
z.lazy(() => Data3$inboundSchema),
|
|
1256
|
+
]);
|
|
1257
|
+
|
|
1258
|
+
/** @internal */
|
|
1259
|
+
export type GetAllToolsData$Outbound =
|
|
1260
|
+
| Data1$Outbound
|
|
1261
|
+
| Data2$Outbound
|
|
1262
|
+
| Data3$Outbound;
|
|
1263
|
+
|
|
1264
|
+
/** @internal */
|
|
1265
|
+
export const GetAllToolsData$outboundSchema: z.ZodType<
|
|
1266
|
+
GetAllToolsData$Outbound,
|
|
1267
|
+
z.ZodTypeDef,
|
|
1268
|
+
GetAllToolsData
|
|
1269
|
+
> = z.union([
|
|
1270
|
+
z.lazy(() => Data1$outboundSchema),
|
|
1271
|
+
z.lazy(() => Data2$outboundSchema),
|
|
1272
|
+
z.lazy(() => Data3$outboundSchema),
|
|
1273
|
+
]);
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* @internal
|
|
1277
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1278
|
+
*/
|
|
1279
|
+
export namespace GetAllToolsData$ {
|
|
1280
|
+
/** @deprecated use `GetAllToolsData$inboundSchema` instead. */
|
|
1281
|
+
export const inboundSchema = GetAllToolsData$inboundSchema;
|
|
1282
|
+
/** @deprecated use `GetAllToolsData$outboundSchema` instead. */
|
|
1283
|
+
export const outboundSchema = GetAllToolsData$outboundSchema;
|
|
1284
|
+
/** @deprecated use `GetAllToolsData$Outbound` instead. */
|
|
1285
|
+
export type Outbound = GetAllToolsData$Outbound;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export function getAllToolsDataToJSON(
|
|
1289
|
+
getAllToolsData: GetAllToolsData,
|
|
1290
|
+
): string {
|
|
1291
|
+
return JSON.stringify(GetAllToolsData$outboundSchema.parse(getAllToolsData));
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
export function getAllToolsDataFromJSON(
|
|
1295
|
+
jsonString: string,
|
|
1296
|
+
): SafeParseResult<GetAllToolsData, SDKValidationError> {
|
|
1297
|
+
return safeParse(
|
|
1298
|
+
jsonString,
|
|
1299
|
+
(x) => GetAllToolsData$inboundSchema.parse(JSON.parse(x)),
|
|
1300
|
+
`Failed to parse 'GetAllToolsData' from JSON`,
|
|
1301
|
+
);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
/** @internal */
|
|
1305
|
+
export const GetAllToolsResponseBody$inboundSchema: z.ZodType<
|
|
1306
|
+
GetAllToolsResponseBody,
|
|
1307
|
+
z.ZodTypeDef,
|
|
1308
|
+
unknown
|
|
1309
|
+
> = z.object({
|
|
1310
|
+
object: GetAllToolsObject$inboundSchema,
|
|
1311
|
+
data: z.array(
|
|
1312
|
+
z.union([
|
|
1313
|
+
z.lazy(() => Data1$inboundSchema),
|
|
1314
|
+
z.lazy(() => Data2$inboundSchema),
|
|
1315
|
+
z.lazy(() => Data3$inboundSchema),
|
|
1316
|
+
]),
|
|
1317
|
+
),
|
|
1318
|
+
has_more: z.boolean(),
|
|
1319
|
+
}).transform((v) => {
|
|
1320
|
+
return remap$(v, {
|
|
1321
|
+
"has_more": "hasMore",
|
|
1322
|
+
});
|
|
1323
|
+
});
|
|
1324
|
+
|
|
1325
|
+
/** @internal */
|
|
1326
|
+
export type GetAllToolsResponseBody$Outbound = {
|
|
1327
|
+
object: string;
|
|
1328
|
+
data: Array<Data1$Outbound | Data2$Outbound | Data3$Outbound>;
|
|
1329
|
+
has_more: boolean;
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
/** @internal */
|
|
1333
|
+
export const GetAllToolsResponseBody$outboundSchema: z.ZodType<
|
|
1334
|
+
GetAllToolsResponseBody$Outbound,
|
|
1335
|
+
z.ZodTypeDef,
|
|
1336
|
+
GetAllToolsResponseBody
|
|
1337
|
+
> = z.object({
|
|
1338
|
+
object: GetAllToolsObject$outboundSchema,
|
|
1339
|
+
data: z.array(
|
|
1340
|
+
z.union([
|
|
1341
|
+
z.lazy(() => Data1$outboundSchema),
|
|
1342
|
+
z.lazy(() => Data2$outboundSchema),
|
|
1343
|
+
z.lazy(() => Data3$outboundSchema),
|
|
1344
|
+
]),
|
|
1345
|
+
),
|
|
1346
|
+
hasMore: z.boolean(),
|
|
1347
|
+
}).transform((v) => {
|
|
1348
|
+
return remap$(v, {
|
|
1349
|
+
hasMore: "has_more",
|
|
1350
|
+
});
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* @internal
|
|
1355
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1356
|
+
*/
|
|
1357
|
+
export namespace GetAllToolsResponseBody$ {
|
|
1358
|
+
/** @deprecated use `GetAllToolsResponseBody$inboundSchema` instead. */
|
|
1359
|
+
export const inboundSchema = GetAllToolsResponseBody$inboundSchema;
|
|
1360
|
+
/** @deprecated use `GetAllToolsResponseBody$outboundSchema` instead. */
|
|
1361
|
+
export const outboundSchema = GetAllToolsResponseBody$outboundSchema;
|
|
1362
|
+
/** @deprecated use `GetAllToolsResponseBody$Outbound` instead. */
|
|
1363
|
+
export type Outbound = GetAllToolsResponseBody$Outbound;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
export function getAllToolsResponseBodyToJSON(
|
|
1367
|
+
getAllToolsResponseBody: GetAllToolsResponseBody,
|
|
1368
|
+
): string {
|
|
1369
|
+
return JSON.stringify(
|
|
1370
|
+
GetAllToolsResponseBody$outboundSchema.parse(getAllToolsResponseBody),
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
export function getAllToolsResponseBodyFromJSON(
|
|
1375
|
+
jsonString: string,
|
|
1376
|
+
): SafeParseResult<GetAllToolsResponseBody, SDKValidationError> {
|
|
1377
|
+
return safeParse(
|
|
1378
|
+
jsonString,
|
|
1379
|
+
(x) => GetAllToolsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
1380
|
+
`Failed to parse 'GetAllToolsResponseBody' from JSON`,
|
|
1381
|
+
);
|
|
1382
|
+
}
|