@orq-ai/node 3.12.4 → 3.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/bin/mcp-server.js +112 -112
- package/bin/mcp-server.js.map +33 -33
- package/docs/sdks/deployments/README.md +0 -2
- package/examples/package-lock.json +1 -1
- package/funcs/deploymentsStream.js +5 -2
- package/funcs/deploymentsStream.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/event-streams.d.ts +3 -3
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createbudget.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/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +9 -19
- package/packages/orq-rc/README.md +180 -181
- package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
- package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
- package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -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/agentsList.ts +167 -0
- package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
- package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
- package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
- package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +49 -1
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
- 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/postV2AgentsInternal.ts +33 -0
- package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
- package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
- 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 +1956 -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/deploymentgetconfig.ts +36 -27
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
- 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/getagent.ts +1171 -0
- package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
- 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 +1241 -0
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
- package/packages/orq-rc/src/models/operations/index.ts +24 -0
- package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
- package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
- package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
- 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 +29 -22
- package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
- package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
- package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +6627 -1224
- 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 +1348 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
- package/packages/orq-rc/src/sdk/agents.ts +148 -0
- package/packages/orq-rc/src/sdk/budgets.ts +5 -5
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/sdk.ts +27 -1
- package/src/funcs/deploymentsStream.ts +11 -10
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +6 -8
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createbudget.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/createeval.ts +16 -16
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
|
@@ -0,0 +1,419 @@
|
|
|
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 RetrieveActionRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The unique key of the agent
|
|
15
|
+
*/
|
|
16
|
+
agentKey: string;
|
|
17
|
+
/**
|
|
18
|
+
* The unique id of the task
|
|
19
|
+
*/
|
|
20
|
+
taskId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The unique id of the action
|
|
23
|
+
*/
|
|
24
|
+
actionId: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type Tool = {
|
|
28
|
+
/**
|
|
29
|
+
* The tool' id in orq
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
requiresApproval?: boolean | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const RetrieveActionReview = {
|
|
37
|
+
Approved: "approved",
|
|
38
|
+
Rejected: "rejected",
|
|
39
|
+
} as const;
|
|
40
|
+
export type RetrieveActionReview = ClosedEnum<typeof RetrieveActionReview>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* An action is a tool that an agent chooses to use. If executed is false, together with the output being there, it can indicate that a tool was mocked
|
|
44
|
+
*/
|
|
45
|
+
export type State = {
|
|
46
|
+
review?: RetrieveActionReview | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* The source of the review, where it was approved or rejected
|
|
49
|
+
*/
|
|
50
|
+
reviewSource?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Only refers to an internal user of the platform, who approved or rejected the tool execution
|
|
53
|
+
*/
|
|
54
|
+
reviewedById?: string | undefined;
|
|
55
|
+
executed?: boolean | undefined;
|
|
56
|
+
error?: string | undefined;
|
|
57
|
+
input: { [k: string]: any };
|
|
58
|
+
output: { [k: string]: any };
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The action object
|
|
63
|
+
*/
|
|
64
|
+
export type RetrieveActionResponseBody = {
|
|
65
|
+
/**
|
|
66
|
+
* Internal id for the action
|
|
67
|
+
*/
|
|
68
|
+
id: string;
|
|
69
|
+
/**
|
|
70
|
+
* The tool call id what the agent chooses to use and generates
|
|
71
|
+
*/
|
|
72
|
+
agentToolCallId: string;
|
|
73
|
+
tool: Tool;
|
|
74
|
+
created: string;
|
|
75
|
+
updated: string;
|
|
76
|
+
started?: string | undefined;
|
|
77
|
+
finished?: string | undefined;
|
|
78
|
+
agentId: string;
|
|
79
|
+
actionType: string;
|
|
80
|
+
agentExecutionId: string;
|
|
81
|
+
workspaceId: string;
|
|
82
|
+
/**
|
|
83
|
+
* An action is a tool that an agent chooses to use. If executed is false, together with the output being there, it can indicate that a tool was mocked
|
|
84
|
+
*/
|
|
85
|
+
state: State;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const RetrieveActionRequest$inboundSchema: z.ZodType<
|
|
90
|
+
RetrieveActionRequest,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.object({
|
|
94
|
+
agent_key: z.string(),
|
|
95
|
+
task_id: z.string(),
|
|
96
|
+
action_id: z.string(),
|
|
97
|
+
}).transform((v) => {
|
|
98
|
+
return remap$(v, {
|
|
99
|
+
"agent_key": "agentKey",
|
|
100
|
+
"task_id": "taskId",
|
|
101
|
+
"action_id": "actionId",
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export type RetrieveActionRequest$Outbound = {
|
|
107
|
+
agent_key: string;
|
|
108
|
+
task_id: string;
|
|
109
|
+
action_id: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const RetrieveActionRequest$outboundSchema: z.ZodType<
|
|
114
|
+
RetrieveActionRequest$Outbound,
|
|
115
|
+
z.ZodTypeDef,
|
|
116
|
+
RetrieveActionRequest
|
|
117
|
+
> = z.object({
|
|
118
|
+
agentKey: z.string(),
|
|
119
|
+
taskId: z.string(),
|
|
120
|
+
actionId: z.string(),
|
|
121
|
+
}).transform((v) => {
|
|
122
|
+
return remap$(v, {
|
|
123
|
+
agentKey: "agent_key",
|
|
124
|
+
taskId: "task_id",
|
|
125
|
+
actionId: "action_id",
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @internal
|
|
131
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
132
|
+
*/
|
|
133
|
+
export namespace RetrieveActionRequest$ {
|
|
134
|
+
/** @deprecated use `RetrieveActionRequest$inboundSchema` instead. */
|
|
135
|
+
export const inboundSchema = RetrieveActionRequest$inboundSchema;
|
|
136
|
+
/** @deprecated use `RetrieveActionRequest$outboundSchema` instead. */
|
|
137
|
+
export const outboundSchema = RetrieveActionRequest$outboundSchema;
|
|
138
|
+
/** @deprecated use `RetrieveActionRequest$Outbound` instead. */
|
|
139
|
+
export type Outbound = RetrieveActionRequest$Outbound;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export function retrieveActionRequestToJSON(
|
|
143
|
+
retrieveActionRequest: RetrieveActionRequest,
|
|
144
|
+
): string {
|
|
145
|
+
return JSON.stringify(
|
|
146
|
+
RetrieveActionRequest$outboundSchema.parse(retrieveActionRequest),
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function retrieveActionRequestFromJSON(
|
|
151
|
+
jsonString: string,
|
|
152
|
+
): SafeParseResult<RetrieveActionRequest, SDKValidationError> {
|
|
153
|
+
return safeParse(
|
|
154
|
+
jsonString,
|
|
155
|
+
(x) => RetrieveActionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
156
|
+
`Failed to parse 'RetrieveActionRequest' from JSON`,
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/** @internal */
|
|
161
|
+
export const Tool$inboundSchema: z.ZodType<Tool, z.ZodTypeDef, unknown> = z
|
|
162
|
+
.object({
|
|
163
|
+
id: z.string(),
|
|
164
|
+
display_name: z.string(),
|
|
165
|
+
requires_approval: z.boolean().default(false),
|
|
166
|
+
}).transform((v) => {
|
|
167
|
+
return remap$(v, {
|
|
168
|
+
"display_name": "displayName",
|
|
169
|
+
"requires_approval": "requiresApproval",
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export type Tool$Outbound = {
|
|
175
|
+
id: string;
|
|
176
|
+
display_name: string;
|
|
177
|
+
requires_approval: boolean;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export const Tool$outboundSchema: z.ZodType<Tool$Outbound, z.ZodTypeDef, Tool> =
|
|
182
|
+
z.object({
|
|
183
|
+
id: z.string(),
|
|
184
|
+
displayName: z.string(),
|
|
185
|
+
requiresApproval: z.boolean().default(false),
|
|
186
|
+
}).transform((v) => {
|
|
187
|
+
return remap$(v, {
|
|
188
|
+
displayName: "display_name",
|
|
189
|
+
requiresApproval: "requires_approval",
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @internal
|
|
195
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
196
|
+
*/
|
|
197
|
+
export namespace Tool$ {
|
|
198
|
+
/** @deprecated use `Tool$inboundSchema` instead. */
|
|
199
|
+
export const inboundSchema = Tool$inboundSchema;
|
|
200
|
+
/** @deprecated use `Tool$outboundSchema` instead. */
|
|
201
|
+
export const outboundSchema = Tool$outboundSchema;
|
|
202
|
+
/** @deprecated use `Tool$Outbound` instead. */
|
|
203
|
+
export type Outbound = Tool$Outbound;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function toolToJSON(tool: Tool): string {
|
|
207
|
+
return JSON.stringify(Tool$outboundSchema.parse(tool));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function toolFromJSON(
|
|
211
|
+
jsonString: string,
|
|
212
|
+
): SafeParseResult<Tool, SDKValidationError> {
|
|
213
|
+
return safeParse(
|
|
214
|
+
jsonString,
|
|
215
|
+
(x) => Tool$inboundSchema.parse(JSON.parse(x)),
|
|
216
|
+
`Failed to parse 'Tool' from JSON`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** @internal */
|
|
221
|
+
export const RetrieveActionReview$inboundSchema: z.ZodNativeEnum<
|
|
222
|
+
typeof RetrieveActionReview
|
|
223
|
+
> = z.nativeEnum(RetrieveActionReview);
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const RetrieveActionReview$outboundSchema: z.ZodNativeEnum<
|
|
227
|
+
typeof RetrieveActionReview
|
|
228
|
+
> = RetrieveActionReview$inboundSchema;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @internal
|
|
232
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
233
|
+
*/
|
|
234
|
+
export namespace RetrieveActionReview$ {
|
|
235
|
+
/** @deprecated use `RetrieveActionReview$inboundSchema` instead. */
|
|
236
|
+
export const inboundSchema = RetrieveActionReview$inboundSchema;
|
|
237
|
+
/** @deprecated use `RetrieveActionReview$outboundSchema` instead. */
|
|
238
|
+
export const outboundSchema = RetrieveActionReview$outboundSchema;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const State$inboundSchema: z.ZodType<State, z.ZodTypeDef, unknown> = z
|
|
243
|
+
.object({
|
|
244
|
+
review: z.nullable(RetrieveActionReview$inboundSchema).optional(),
|
|
245
|
+
review_source: z.string().optional(),
|
|
246
|
+
reviewed_by_id: z.string().optional(),
|
|
247
|
+
executed: z.boolean().default(false),
|
|
248
|
+
error: z.string().optional(),
|
|
249
|
+
input: z.record(z.any()),
|
|
250
|
+
output: z.record(z.any()),
|
|
251
|
+
}).transform((v) => {
|
|
252
|
+
return remap$(v, {
|
|
253
|
+
"review_source": "reviewSource",
|
|
254
|
+
"reviewed_by_id": "reviewedById",
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
/** @internal */
|
|
259
|
+
export type State$Outbound = {
|
|
260
|
+
review?: string | null | undefined;
|
|
261
|
+
review_source?: string | undefined;
|
|
262
|
+
reviewed_by_id?: string | undefined;
|
|
263
|
+
executed: boolean;
|
|
264
|
+
error?: string | undefined;
|
|
265
|
+
input: { [k: string]: any };
|
|
266
|
+
output: { [k: string]: any };
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
/** @internal */
|
|
270
|
+
export const State$outboundSchema: z.ZodType<
|
|
271
|
+
State$Outbound,
|
|
272
|
+
z.ZodTypeDef,
|
|
273
|
+
State
|
|
274
|
+
> = z.object({
|
|
275
|
+
review: z.nullable(RetrieveActionReview$outboundSchema).optional(),
|
|
276
|
+
reviewSource: z.string().optional(),
|
|
277
|
+
reviewedById: z.string().optional(),
|
|
278
|
+
executed: z.boolean().default(false),
|
|
279
|
+
error: z.string().optional(),
|
|
280
|
+
input: z.record(z.any()),
|
|
281
|
+
output: z.record(z.any()),
|
|
282
|
+
}).transform((v) => {
|
|
283
|
+
return remap$(v, {
|
|
284
|
+
reviewSource: "review_source",
|
|
285
|
+
reviewedById: "reviewed_by_id",
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* @internal
|
|
291
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
292
|
+
*/
|
|
293
|
+
export namespace State$ {
|
|
294
|
+
/** @deprecated use `State$inboundSchema` instead. */
|
|
295
|
+
export const inboundSchema = State$inboundSchema;
|
|
296
|
+
/** @deprecated use `State$outboundSchema` instead. */
|
|
297
|
+
export const outboundSchema = State$outboundSchema;
|
|
298
|
+
/** @deprecated use `State$Outbound` instead. */
|
|
299
|
+
export type Outbound = State$Outbound;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export function stateToJSON(state: State): string {
|
|
303
|
+
return JSON.stringify(State$outboundSchema.parse(state));
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export function stateFromJSON(
|
|
307
|
+
jsonString: string,
|
|
308
|
+
): SafeParseResult<State, SDKValidationError> {
|
|
309
|
+
return safeParse(
|
|
310
|
+
jsonString,
|
|
311
|
+
(x) => State$inboundSchema.parse(JSON.parse(x)),
|
|
312
|
+
`Failed to parse 'State' from JSON`,
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const RetrieveActionResponseBody$inboundSchema: z.ZodType<
|
|
318
|
+
RetrieveActionResponseBody,
|
|
319
|
+
z.ZodTypeDef,
|
|
320
|
+
unknown
|
|
321
|
+
> = z.object({
|
|
322
|
+
_id: z.string(),
|
|
323
|
+
agent_tool_call_id: z.string(),
|
|
324
|
+
tool: z.lazy(() => Tool$inboundSchema),
|
|
325
|
+
created: z.string(),
|
|
326
|
+
updated: z.string(),
|
|
327
|
+
started: z.string().optional(),
|
|
328
|
+
finished: z.string().optional(),
|
|
329
|
+
agent_id: z.string(),
|
|
330
|
+
action_type: z.string(),
|
|
331
|
+
agent_execution_id: z.string(),
|
|
332
|
+
workspace_id: z.string(),
|
|
333
|
+
state: z.lazy(() => State$inboundSchema),
|
|
334
|
+
}).transform((v) => {
|
|
335
|
+
return remap$(v, {
|
|
336
|
+
"_id": "id",
|
|
337
|
+
"agent_tool_call_id": "agentToolCallId",
|
|
338
|
+
"agent_id": "agentId",
|
|
339
|
+
"action_type": "actionType",
|
|
340
|
+
"agent_execution_id": "agentExecutionId",
|
|
341
|
+
"workspace_id": "workspaceId",
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
/** @internal */
|
|
346
|
+
export type RetrieveActionResponseBody$Outbound = {
|
|
347
|
+
_id: string;
|
|
348
|
+
agent_tool_call_id: string;
|
|
349
|
+
tool: Tool$Outbound;
|
|
350
|
+
created: string;
|
|
351
|
+
updated: string;
|
|
352
|
+
started?: string | undefined;
|
|
353
|
+
finished?: string | undefined;
|
|
354
|
+
agent_id: string;
|
|
355
|
+
action_type: string;
|
|
356
|
+
agent_execution_id: string;
|
|
357
|
+
workspace_id: string;
|
|
358
|
+
state: State$Outbound;
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/** @internal */
|
|
362
|
+
export const RetrieveActionResponseBody$outboundSchema: z.ZodType<
|
|
363
|
+
RetrieveActionResponseBody$Outbound,
|
|
364
|
+
z.ZodTypeDef,
|
|
365
|
+
RetrieveActionResponseBody
|
|
366
|
+
> = z.object({
|
|
367
|
+
id: z.string(),
|
|
368
|
+
agentToolCallId: z.string(),
|
|
369
|
+
tool: z.lazy(() => Tool$outboundSchema),
|
|
370
|
+
created: z.string(),
|
|
371
|
+
updated: z.string(),
|
|
372
|
+
started: z.string().optional(),
|
|
373
|
+
finished: z.string().optional(),
|
|
374
|
+
agentId: z.string(),
|
|
375
|
+
actionType: z.string(),
|
|
376
|
+
agentExecutionId: z.string(),
|
|
377
|
+
workspaceId: z.string(),
|
|
378
|
+
state: z.lazy(() => State$outboundSchema),
|
|
379
|
+
}).transform((v) => {
|
|
380
|
+
return remap$(v, {
|
|
381
|
+
id: "_id",
|
|
382
|
+
agentToolCallId: "agent_tool_call_id",
|
|
383
|
+
agentId: "agent_id",
|
|
384
|
+
actionType: "action_type",
|
|
385
|
+
agentExecutionId: "agent_execution_id",
|
|
386
|
+
workspaceId: "workspace_id",
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @internal
|
|
392
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
393
|
+
*/
|
|
394
|
+
export namespace RetrieveActionResponseBody$ {
|
|
395
|
+
/** @deprecated use `RetrieveActionResponseBody$inboundSchema` instead. */
|
|
396
|
+
export const inboundSchema = RetrieveActionResponseBody$inboundSchema;
|
|
397
|
+
/** @deprecated use `RetrieveActionResponseBody$outboundSchema` instead. */
|
|
398
|
+
export const outboundSchema = RetrieveActionResponseBody$outboundSchema;
|
|
399
|
+
/** @deprecated use `RetrieveActionResponseBody$Outbound` instead. */
|
|
400
|
+
export type Outbound = RetrieveActionResponseBody$Outbound;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export function retrieveActionResponseBodyToJSON(
|
|
404
|
+
retrieveActionResponseBody: RetrieveActionResponseBody,
|
|
405
|
+
): string {
|
|
406
|
+
return JSON.stringify(
|
|
407
|
+
RetrieveActionResponseBody$outboundSchema.parse(retrieveActionResponseBody),
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export function retrieveActionResponseBodyFromJSON(
|
|
412
|
+
jsonString: string,
|
|
413
|
+
): SafeParseResult<RetrieveActionResponseBody, SDKValidationError> {
|
|
414
|
+
return safeParse(
|
|
415
|
+
jsonString,
|
|
416
|
+
(x) => RetrieveActionResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
417
|
+
`Failed to parse 'RetrieveActionResponseBody' from JSON`,
|
|
418
|
+
);
|
|
419
|
+
}
|
|
@@ -127,7 +127,7 @@ export const RetrieveContactResponseBody$inboundSchema: z.ZodType<
|
|
|
127
127
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
128
128
|
.optional(),
|
|
129
129
|
updated: z.string().datetime({ offset: true }).default(
|
|
130
|
-
"2025-09-
|
|
130
|
+
"2025-09-09T09:35:11.330Z",
|
|
131
131
|
).transform(v => new Date(v)),
|
|
132
132
|
}).transform((v) => {
|
|
133
133
|
return remap$(v, {
|
|
@@ -165,7 +165,7 @@ export const RetrieveContactResponseBody$outboundSchema: z.ZodType<
|
|
|
165
165
|
tags: z.array(z.string()).optional(),
|
|
166
166
|
metadata: z.record(z.any()).optional(),
|
|
167
167
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
168
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
168
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
169
169
|
.transform(v => v.toISOString()),
|
|
170
170
|
}).transform((v) => {
|
|
171
171
|
return remap$(v, {
|
|
@@ -2957,7 +2957,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
2957
2957
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
2958
2958
|
.optional(),
|
|
2959
2959
|
updated: z.string().datetime({ offset: true }).default(
|
|
2960
|
-
"2025-09-
|
|
2960
|
+
"2025-09-09T09:35:11.330Z",
|
|
2961
2961
|
).transform(v => new Date(v)),
|
|
2962
2962
|
}).transform((v) => {
|
|
2963
2963
|
return remap$(v, {
|
|
@@ -3015,7 +3015,7 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
|
|
|
3015
3015
|
createdById: z.string().optional(),
|
|
3016
3016
|
updatedById: z.string().optional(),
|
|
3017
3017
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
3018
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
3018
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
3019
3019
|
.transform(v => v.toISOString()),
|
|
3020
3020
|
}).transform((v) => {
|
|
3021
3021
|
return remap$(v, {
|
|
@@ -201,7 +201,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
201
201
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
202
202
|
.optional(),
|
|
203
203
|
updated: z.string().datetime({ offset: true }).default(
|
|
204
|
-
"2025-09-
|
|
204
|
+
"2025-09-09T09:35:11.330Z",
|
|
205
205
|
).transform(v => new Date(v)),
|
|
206
206
|
}).transform((v) => {
|
|
207
207
|
return remap$(v, {
|
|
@@ -241,7 +241,7 @@ export const RetrieveDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
241
241
|
updatedById: z.string().optional(),
|
|
242
242
|
metadata: z.lazy(() => RetrieveDatasetMetadata$outboundSchema),
|
|
243
243
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
244
|
-
updated: z.date().default(() => new Date("2025-09-
|
|
244
|
+
updated: z.date().default(() => new Date("2025-09-09T09:35:11.330Z"))
|
|
245
245
|
.transform(v => v.toISOString()),
|
|
246
246
|
}).transform((v) => {
|
|
247
247
|
return remap$(v, {
|
|
@@ -172,7 +172,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
172
172
|
z.ZodTypeDef,
|
|
173
173
|
unknown
|
|
174
174
|
> = z.object({
|
|
175
|
-
_id: z.string().default("
|
|
175
|
+
_id: z.string().default("01K4PX8V6VS0J31CAKVC8YDB7S"),
|
|
176
176
|
display_name: z.string(),
|
|
177
177
|
description: z.string().optional(),
|
|
178
178
|
status: RetrieveDatasourceStatus$inboundSchema,
|
|
@@ -216,7 +216,7 @@ export const RetrieveDatasourceResponseBody$outboundSchema: z.ZodType<
|
|
|
216
216
|
z.ZodTypeDef,
|
|
217
217
|
RetrieveDatasourceResponseBody
|
|
218
218
|
> = z.object({
|
|
219
|
-
id: z.string().default("
|
|
219
|
+
id: z.string().default("01K4PX8V6VS0J31CAKVC8YDB7S"),
|
|
220
220
|
displayName: z.string(),
|
|
221
221
|
description: z.string().optional(),
|
|
222
222
|
status: RetrieveDatasourceStatus$outboundSchema,
|
|
@@ -0,0 +1,198 @@
|
|
|
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 { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type RetrieveMemoryRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* The unique key identifier of the memory store
|
|
14
|
+
*/
|
|
15
|
+
memoryStoreKey: string;
|
|
16
|
+
/**
|
|
17
|
+
* The unique identifier of the memory
|
|
18
|
+
*/
|
|
19
|
+
memoryId: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Memory successfully retrieved.
|
|
24
|
+
*/
|
|
25
|
+
export type RetrieveMemoryResponseBody = {
|
|
26
|
+
id: string;
|
|
27
|
+
entityId: string;
|
|
28
|
+
created: string;
|
|
29
|
+
updated: string;
|
|
30
|
+
createdById?: string | null | undefined;
|
|
31
|
+
updatedById?: string | null | undefined;
|
|
32
|
+
storeId: string;
|
|
33
|
+
tags: { [k: string]: string };
|
|
34
|
+
workspaceId: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const RetrieveMemoryRequest$inboundSchema: z.ZodType<
|
|
39
|
+
RetrieveMemoryRequest,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
memory_store_key: z.string(),
|
|
44
|
+
memory_id: z.string(),
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
"memory_store_key": "memoryStoreKey",
|
|
48
|
+
"memory_id": "memoryId",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type RetrieveMemoryRequest$Outbound = {
|
|
54
|
+
memory_store_key: string;
|
|
55
|
+
memory_id: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const RetrieveMemoryRequest$outboundSchema: z.ZodType<
|
|
60
|
+
RetrieveMemoryRequest$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
RetrieveMemoryRequest
|
|
63
|
+
> = z.object({
|
|
64
|
+
memoryStoreKey: z.string(),
|
|
65
|
+
memoryId: z.string(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
memoryStoreKey: "memory_store_key",
|
|
69
|
+
memoryId: "memory_id",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace RetrieveMemoryRequest$ {
|
|
78
|
+
/** @deprecated use `RetrieveMemoryRequest$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = RetrieveMemoryRequest$inboundSchema;
|
|
80
|
+
/** @deprecated use `RetrieveMemoryRequest$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = RetrieveMemoryRequest$outboundSchema;
|
|
82
|
+
/** @deprecated use `RetrieveMemoryRequest$Outbound` instead. */
|
|
83
|
+
export type Outbound = RetrieveMemoryRequest$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function retrieveMemoryRequestToJSON(
|
|
87
|
+
retrieveMemoryRequest: RetrieveMemoryRequest,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
RetrieveMemoryRequest$outboundSchema.parse(retrieveMemoryRequest),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function retrieveMemoryRequestFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<RetrieveMemoryRequest, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => RetrieveMemoryRequest$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'RetrieveMemoryRequest' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const RetrieveMemoryResponseBody$inboundSchema: z.ZodType<
|
|
106
|
+
RetrieveMemoryResponseBody,
|
|
107
|
+
z.ZodTypeDef,
|
|
108
|
+
unknown
|
|
109
|
+
> = z.object({
|
|
110
|
+
_id: z.string(),
|
|
111
|
+
entity_id: z.string(),
|
|
112
|
+
created: z.string(),
|
|
113
|
+
updated: z.string(),
|
|
114
|
+
created_by_id: z.nullable(z.string()).optional(),
|
|
115
|
+
updated_by_id: z.nullable(z.string()).optional(),
|
|
116
|
+
store_id: z.string(),
|
|
117
|
+
tags: z.record(z.string()),
|
|
118
|
+
workspace_id: z.string(),
|
|
119
|
+
}).transform((v) => {
|
|
120
|
+
return remap$(v, {
|
|
121
|
+
"_id": "id",
|
|
122
|
+
"entity_id": "entityId",
|
|
123
|
+
"created_by_id": "createdById",
|
|
124
|
+
"updated_by_id": "updatedById",
|
|
125
|
+
"store_id": "storeId",
|
|
126
|
+
"workspace_id": "workspaceId",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export type RetrieveMemoryResponseBody$Outbound = {
|
|
132
|
+
_id: string;
|
|
133
|
+
entity_id: string;
|
|
134
|
+
created: string;
|
|
135
|
+
updated: string;
|
|
136
|
+
created_by_id?: string | null | undefined;
|
|
137
|
+
updated_by_id?: string | null | undefined;
|
|
138
|
+
store_id: string;
|
|
139
|
+
tags: { [k: string]: string };
|
|
140
|
+
workspace_id: string;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const RetrieveMemoryResponseBody$outboundSchema: z.ZodType<
|
|
145
|
+
RetrieveMemoryResponseBody$Outbound,
|
|
146
|
+
z.ZodTypeDef,
|
|
147
|
+
RetrieveMemoryResponseBody
|
|
148
|
+
> = z.object({
|
|
149
|
+
id: z.string(),
|
|
150
|
+
entityId: z.string(),
|
|
151
|
+
created: z.string(),
|
|
152
|
+
updated: z.string(),
|
|
153
|
+
createdById: z.nullable(z.string()).optional(),
|
|
154
|
+
updatedById: z.nullable(z.string()).optional(),
|
|
155
|
+
storeId: z.string(),
|
|
156
|
+
tags: z.record(z.string()),
|
|
157
|
+
workspaceId: z.string(),
|
|
158
|
+
}).transform((v) => {
|
|
159
|
+
return remap$(v, {
|
|
160
|
+
id: "_id",
|
|
161
|
+
entityId: "entity_id",
|
|
162
|
+
createdById: "created_by_id",
|
|
163
|
+
updatedById: "updated_by_id",
|
|
164
|
+
storeId: "store_id",
|
|
165
|
+
workspaceId: "workspace_id",
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
172
|
+
*/
|
|
173
|
+
export namespace RetrieveMemoryResponseBody$ {
|
|
174
|
+
/** @deprecated use `RetrieveMemoryResponseBody$inboundSchema` instead. */
|
|
175
|
+
export const inboundSchema = RetrieveMemoryResponseBody$inboundSchema;
|
|
176
|
+
/** @deprecated use `RetrieveMemoryResponseBody$outboundSchema` instead. */
|
|
177
|
+
export const outboundSchema = RetrieveMemoryResponseBody$outboundSchema;
|
|
178
|
+
/** @deprecated use `RetrieveMemoryResponseBody$Outbound` instead. */
|
|
179
|
+
export type Outbound = RetrieveMemoryResponseBody$Outbound;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function retrieveMemoryResponseBodyToJSON(
|
|
183
|
+
retrieveMemoryResponseBody: RetrieveMemoryResponseBody,
|
|
184
|
+
): string {
|
|
185
|
+
return JSON.stringify(
|
|
186
|
+
RetrieveMemoryResponseBody$outboundSchema.parse(retrieveMemoryResponseBody),
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function retrieveMemoryResponseBodyFromJSON(
|
|
191
|
+
jsonString: string,
|
|
192
|
+
): SafeParseResult<RetrieveMemoryResponseBody, SDKValidationError> {
|
|
193
|
+
return safeParse(
|
|
194
|
+
jsonString,
|
|
195
|
+
(x) => RetrieveMemoryResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
196
|
+
`Failed to parse 'RetrieveMemoryResponseBody' from JSON`,
|
|
197
|
+
);
|
|
198
|
+
}
|