@orq-ai/node 3.3.10 → 3.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +39 -39
- package/bin/mcp-server.js.map +21 -21
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +2 -4
- package/packages/orq-rc/README.md +68 -17
- package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -83
- package/packages/orq-rc/docs/sdks/memorystores/README.md +1211 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +74 -0
- package/packages/orq-rc/docs/sdks/sessions/README.md +385 -0
- package/packages/orq-rc/docs/sdks/tools/README.md +425 -0
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +165 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +169 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +164 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +162 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +172 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +175 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +171 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +172 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +167 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +162 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +168 -0
- package/packages/orq-rc/src/funcs/postV2TracesSessionsCount.ts +155 -0
- package/packages/orq-rc/src/funcs/sessionsCreate.ts +159 -0
- package/packages/orq-rc/src/funcs/sessionsDelete.ts +170 -0
- package/packages/orq-rc/src/funcs/sessionsGet.ts +169 -0
- package/packages/orq-rc/src/funcs/sessionsList.ts +157 -0
- package/packages/orq-rc/src/funcs/sessionsUpdate.ts +170 -0
- package/packages/orq-rc/src/funcs/toolsCreate.ts +157 -0
- package/packages/orq-rc/src/funcs/toolsDelete.ts +161 -0
- package/packages/orq-rc/src/funcs/toolsList.ts +170 -0
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +160 -0
- package/packages/orq-rc/src/funcs/{knowledgeSearch.ts → toolsUpdate.ts} +18 -15
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/prompts.ts +8 -1
- package/packages/orq-rc/src/mcp-server/resources.ts +16 -2
- package/packages/orq-rc/src/mcp-server/server.ts +55 -5
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/postV2TracesSessionsCount.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/{knowledgeSearch.ts → sessionsGet.ts} +8 -6
- package/packages/orq-rc/src/mcp-server/tools/sessionsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/sessionsUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools.ts +6 -3
- package/packages/orq-rc/src/models/components/deployments.ts +124 -29
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchunk.ts +99 -41
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +10 -10
- package/packages/orq-rc/src/models/operations/createknowledge.ts +175 -14
- package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +1619 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +6 -6
- package/packages/orq-rc/src/models/operations/createsession.ts +632 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +2297 -0
- package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
- package/packages/orq-rc/src/models/operations/deletesession.ts +78 -0
- package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +57 -35
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +124 -29
- package/packages/orq-rc/src/models/operations/deployments.ts +3 -3
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +135 -30
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1061 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -3
- package/packages/orq-rc/src/models/operations/getalltools.ts +1382 -0
- package/packages/orq-rc/src/models/operations/getonechunk.ts +8 -8
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +92 -8
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -3
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -3
- package/packages/orq-rc/src/models/operations/getsession.ts +400 -0
- package/packages/orq-rc/src/models/operations/index.ts +26 -1
- package/packages/orq-rc/src/models/operations/listchunks.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +10 -10
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +94 -8
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -3
- package/packages/orq-rc/src/models/operations/listsessions.ts +6732 -0
- package/packages/orq-rc/src/models/operations/postv2tracessessionscount.ts +7043 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +10 -10
- package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +944 -0
- package/packages/orq-rc/src/models/operations/retrievetool.ts +1350 -0
- package/packages/orq-rc/src/models/operations/updatechunk.ts +10 -10
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +10 -10
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +201 -20
- package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +1148 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatesession.ts +731 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +2464 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +0 -15
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/sdk.ts +36 -1
- package/packages/orq-rc/src/sdk/sessions.ts +99 -0
- package/packages/orq-rc/src/sdk/tools.ts +99 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1673
|
@@ -0,0 +1,731 @@
|
|
|
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 UpdateSessionBilling = {
|
|
12
|
+
/**
|
|
13
|
+
* Total cost of the session
|
|
14
|
+
*/
|
|
15
|
+
inputCost: number;
|
|
16
|
+
/**
|
|
17
|
+
* Total cost of the session
|
|
18
|
+
*/
|
|
19
|
+
outputCost: number;
|
|
20
|
+
/**
|
|
21
|
+
* Total usage of the session
|
|
22
|
+
*/
|
|
23
|
+
totalCost: number;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type UpdateSessionUsage = {
|
|
27
|
+
/**
|
|
28
|
+
* Total input tokens of the session
|
|
29
|
+
*/
|
|
30
|
+
promptTokens: number;
|
|
31
|
+
/**
|
|
32
|
+
* Total output tokens of the session
|
|
33
|
+
*/
|
|
34
|
+
completionTokens: number;
|
|
35
|
+
/**
|
|
36
|
+
* Total tokens of the session
|
|
37
|
+
*/
|
|
38
|
+
totalTokens: number;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type UpdateSessionRequestBody = {
|
|
42
|
+
id?: string | undefined;
|
|
43
|
+
externalId?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Duration of the session in ms
|
|
46
|
+
*/
|
|
47
|
+
duration?: number | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* List of contact ids
|
|
50
|
+
*/
|
|
51
|
+
contactIds?: Array<string> | undefined;
|
|
52
|
+
billing?: UpdateSessionBilling | undefined;
|
|
53
|
+
usage?: UpdateSessionUsage | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Total traces of the session
|
|
56
|
+
*/
|
|
57
|
+
tracesCount?: number | undefined;
|
|
58
|
+
tags?: Array<string> | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The workspace id
|
|
61
|
+
*/
|
|
62
|
+
workspaceId?: string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* The project id
|
|
65
|
+
*/
|
|
66
|
+
projectId?: string | null | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The time when the session was created
|
|
69
|
+
*/
|
|
70
|
+
startedAt?: Date | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* The time when the session was updated
|
|
73
|
+
*/
|
|
74
|
+
updatedAt?: Date | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type UpdateSessionRequest = {
|
|
78
|
+
/**
|
|
79
|
+
* Unique identifier of the session
|
|
80
|
+
*/
|
|
81
|
+
sessionId: string;
|
|
82
|
+
requestBody?: UpdateSessionRequestBody | undefined;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type UpdateSessionSessionsBilling = {
|
|
86
|
+
/**
|
|
87
|
+
* Total cost of the session
|
|
88
|
+
*/
|
|
89
|
+
inputCost: number;
|
|
90
|
+
/**
|
|
91
|
+
* Total cost of the session
|
|
92
|
+
*/
|
|
93
|
+
outputCost: number;
|
|
94
|
+
/**
|
|
95
|
+
* Total usage of the session
|
|
96
|
+
*/
|
|
97
|
+
totalCost: number;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export type UpdateSessionSessionsUsage = {
|
|
101
|
+
/**
|
|
102
|
+
* Total input tokens of the session
|
|
103
|
+
*/
|
|
104
|
+
promptTokens: number;
|
|
105
|
+
/**
|
|
106
|
+
* Total output tokens of the session
|
|
107
|
+
*/
|
|
108
|
+
completionTokens: number;
|
|
109
|
+
/**
|
|
110
|
+
* Total tokens of the session
|
|
111
|
+
*/
|
|
112
|
+
totalTokens: number;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Session
|
|
117
|
+
*/
|
|
118
|
+
export type UpdateSessionResponseBody = {
|
|
119
|
+
id: string;
|
|
120
|
+
externalId: string;
|
|
121
|
+
/**
|
|
122
|
+
* Duration of the session in ms
|
|
123
|
+
*/
|
|
124
|
+
duration: number;
|
|
125
|
+
/**
|
|
126
|
+
* List of contact ids
|
|
127
|
+
*/
|
|
128
|
+
contactIds: Array<string>;
|
|
129
|
+
billing: UpdateSessionSessionsBilling;
|
|
130
|
+
usage: UpdateSessionSessionsUsage;
|
|
131
|
+
/**
|
|
132
|
+
* Total traces of the session
|
|
133
|
+
*/
|
|
134
|
+
tracesCount: number;
|
|
135
|
+
tags: Array<string>;
|
|
136
|
+
/**
|
|
137
|
+
* The workspace id
|
|
138
|
+
*/
|
|
139
|
+
workspaceId: string;
|
|
140
|
+
/**
|
|
141
|
+
* The project id
|
|
142
|
+
*/
|
|
143
|
+
projectId?: string | null | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* The time when the session was created
|
|
146
|
+
*/
|
|
147
|
+
startedAt?: Date | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* The time when the session was updated
|
|
150
|
+
*/
|
|
151
|
+
updatedAt?: Date | undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/** @internal */
|
|
155
|
+
export const UpdateSessionBilling$inboundSchema: z.ZodType<
|
|
156
|
+
UpdateSessionBilling,
|
|
157
|
+
z.ZodTypeDef,
|
|
158
|
+
unknown
|
|
159
|
+
> = z.object({
|
|
160
|
+
input_cost: z.number(),
|
|
161
|
+
output_cost: z.number(),
|
|
162
|
+
total_cost: z.number(),
|
|
163
|
+
}).transform((v) => {
|
|
164
|
+
return remap$(v, {
|
|
165
|
+
"input_cost": "inputCost",
|
|
166
|
+
"output_cost": "outputCost",
|
|
167
|
+
"total_cost": "totalCost",
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
/** @internal */
|
|
172
|
+
export type UpdateSessionBilling$Outbound = {
|
|
173
|
+
input_cost: number;
|
|
174
|
+
output_cost: number;
|
|
175
|
+
total_cost: number;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/** @internal */
|
|
179
|
+
export const UpdateSessionBilling$outboundSchema: z.ZodType<
|
|
180
|
+
UpdateSessionBilling$Outbound,
|
|
181
|
+
z.ZodTypeDef,
|
|
182
|
+
UpdateSessionBilling
|
|
183
|
+
> = z.object({
|
|
184
|
+
inputCost: z.number(),
|
|
185
|
+
outputCost: z.number(),
|
|
186
|
+
totalCost: z.number(),
|
|
187
|
+
}).transform((v) => {
|
|
188
|
+
return remap$(v, {
|
|
189
|
+
inputCost: "input_cost",
|
|
190
|
+
outputCost: "output_cost",
|
|
191
|
+
totalCost: "total_cost",
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @internal
|
|
197
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
198
|
+
*/
|
|
199
|
+
export namespace UpdateSessionBilling$ {
|
|
200
|
+
/** @deprecated use `UpdateSessionBilling$inboundSchema` instead. */
|
|
201
|
+
export const inboundSchema = UpdateSessionBilling$inboundSchema;
|
|
202
|
+
/** @deprecated use `UpdateSessionBilling$outboundSchema` instead. */
|
|
203
|
+
export const outboundSchema = UpdateSessionBilling$outboundSchema;
|
|
204
|
+
/** @deprecated use `UpdateSessionBilling$Outbound` instead. */
|
|
205
|
+
export type Outbound = UpdateSessionBilling$Outbound;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function updateSessionBillingToJSON(
|
|
209
|
+
updateSessionBilling: UpdateSessionBilling,
|
|
210
|
+
): string {
|
|
211
|
+
return JSON.stringify(
|
|
212
|
+
UpdateSessionBilling$outboundSchema.parse(updateSessionBilling),
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function updateSessionBillingFromJSON(
|
|
217
|
+
jsonString: string,
|
|
218
|
+
): SafeParseResult<UpdateSessionBilling, SDKValidationError> {
|
|
219
|
+
return safeParse(
|
|
220
|
+
jsonString,
|
|
221
|
+
(x) => UpdateSessionBilling$inboundSchema.parse(JSON.parse(x)),
|
|
222
|
+
`Failed to parse 'UpdateSessionBilling' from JSON`,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** @internal */
|
|
227
|
+
export const UpdateSessionUsage$inboundSchema: z.ZodType<
|
|
228
|
+
UpdateSessionUsage,
|
|
229
|
+
z.ZodTypeDef,
|
|
230
|
+
unknown
|
|
231
|
+
> = z.object({
|
|
232
|
+
prompt_tokens: z.number(),
|
|
233
|
+
completion_tokens: z.number(),
|
|
234
|
+
total_tokens: z.number(),
|
|
235
|
+
}).transform((v) => {
|
|
236
|
+
return remap$(v, {
|
|
237
|
+
"prompt_tokens": "promptTokens",
|
|
238
|
+
"completion_tokens": "completionTokens",
|
|
239
|
+
"total_tokens": "totalTokens",
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
/** @internal */
|
|
244
|
+
export type UpdateSessionUsage$Outbound = {
|
|
245
|
+
prompt_tokens: number;
|
|
246
|
+
completion_tokens: number;
|
|
247
|
+
total_tokens: number;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const UpdateSessionUsage$outboundSchema: z.ZodType<
|
|
252
|
+
UpdateSessionUsage$Outbound,
|
|
253
|
+
z.ZodTypeDef,
|
|
254
|
+
UpdateSessionUsage
|
|
255
|
+
> = z.object({
|
|
256
|
+
promptTokens: z.number(),
|
|
257
|
+
completionTokens: z.number(),
|
|
258
|
+
totalTokens: z.number(),
|
|
259
|
+
}).transform((v) => {
|
|
260
|
+
return remap$(v, {
|
|
261
|
+
promptTokens: "prompt_tokens",
|
|
262
|
+
completionTokens: "completion_tokens",
|
|
263
|
+
totalTokens: "total_tokens",
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @internal
|
|
269
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
270
|
+
*/
|
|
271
|
+
export namespace UpdateSessionUsage$ {
|
|
272
|
+
/** @deprecated use `UpdateSessionUsage$inboundSchema` instead. */
|
|
273
|
+
export const inboundSchema = UpdateSessionUsage$inboundSchema;
|
|
274
|
+
/** @deprecated use `UpdateSessionUsage$outboundSchema` instead. */
|
|
275
|
+
export const outboundSchema = UpdateSessionUsage$outboundSchema;
|
|
276
|
+
/** @deprecated use `UpdateSessionUsage$Outbound` instead. */
|
|
277
|
+
export type Outbound = UpdateSessionUsage$Outbound;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function updateSessionUsageToJSON(
|
|
281
|
+
updateSessionUsage: UpdateSessionUsage,
|
|
282
|
+
): string {
|
|
283
|
+
return JSON.stringify(
|
|
284
|
+
UpdateSessionUsage$outboundSchema.parse(updateSessionUsage),
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function updateSessionUsageFromJSON(
|
|
289
|
+
jsonString: string,
|
|
290
|
+
): SafeParseResult<UpdateSessionUsage, SDKValidationError> {
|
|
291
|
+
return safeParse(
|
|
292
|
+
jsonString,
|
|
293
|
+
(x) => UpdateSessionUsage$inboundSchema.parse(JSON.parse(x)),
|
|
294
|
+
`Failed to parse 'UpdateSessionUsage' from JSON`,
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const UpdateSessionRequestBody$inboundSchema: z.ZodType<
|
|
300
|
+
UpdateSessionRequestBody,
|
|
301
|
+
z.ZodTypeDef,
|
|
302
|
+
unknown
|
|
303
|
+
> = z.object({
|
|
304
|
+
_id: z.string().optional(),
|
|
305
|
+
external_id: z.string().optional(),
|
|
306
|
+
duration: z.number().optional(),
|
|
307
|
+
contact_ids: z.array(z.string()).optional(),
|
|
308
|
+
billing: z.lazy(() => UpdateSessionBilling$inboundSchema).optional(),
|
|
309
|
+
usage: z.lazy(() => UpdateSessionUsage$inboundSchema).optional(),
|
|
310
|
+
traces_count: z.number().optional(),
|
|
311
|
+
tags: z.array(z.string()).optional(),
|
|
312
|
+
workspace_id: z.string().optional(),
|
|
313
|
+
project_id: z.nullable(z.string()).optional(),
|
|
314
|
+
started_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
315
|
+
.optional(),
|
|
316
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
317
|
+
.optional(),
|
|
318
|
+
}).transform((v) => {
|
|
319
|
+
return remap$(v, {
|
|
320
|
+
"_id": "id",
|
|
321
|
+
"external_id": "externalId",
|
|
322
|
+
"contact_ids": "contactIds",
|
|
323
|
+
"traces_count": "tracesCount",
|
|
324
|
+
"workspace_id": "workspaceId",
|
|
325
|
+
"project_id": "projectId",
|
|
326
|
+
"started_at": "startedAt",
|
|
327
|
+
"updated_at": "updatedAt",
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
/** @internal */
|
|
332
|
+
export type UpdateSessionRequestBody$Outbound = {
|
|
333
|
+
_id?: string | undefined;
|
|
334
|
+
external_id?: string | undefined;
|
|
335
|
+
duration?: number | undefined;
|
|
336
|
+
contact_ids?: Array<string> | undefined;
|
|
337
|
+
billing?: UpdateSessionBilling$Outbound | undefined;
|
|
338
|
+
usage?: UpdateSessionUsage$Outbound | undefined;
|
|
339
|
+
traces_count?: number | undefined;
|
|
340
|
+
tags?: Array<string> | undefined;
|
|
341
|
+
workspace_id?: string | undefined;
|
|
342
|
+
project_id?: string | null | undefined;
|
|
343
|
+
started_at?: string | undefined;
|
|
344
|
+
updated_at?: string | undefined;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/** @internal */
|
|
348
|
+
export const UpdateSessionRequestBody$outboundSchema: z.ZodType<
|
|
349
|
+
UpdateSessionRequestBody$Outbound,
|
|
350
|
+
z.ZodTypeDef,
|
|
351
|
+
UpdateSessionRequestBody
|
|
352
|
+
> = z.object({
|
|
353
|
+
id: z.string().optional(),
|
|
354
|
+
externalId: z.string().optional(),
|
|
355
|
+
duration: z.number().optional(),
|
|
356
|
+
contactIds: z.array(z.string()).optional(),
|
|
357
|
+
billing: z.lazy(() => UpdateSessionBilling$outboundSchema).optional(),
|
|
358
|
+
usage: z.lazy(() => UpdateSessionUsage$outboundSchema).optional(),
|
|
359
|
+
tracesCount: z.number().optional(),
|
|
360
|
+
tags: z.array(z.string()).optional(),
|
|
361
|
+
workspaceId: z.string().optional(),
|
|
362
|
+
projectId: z.nullable(z.string()).optional(),
|
|
363
|
+
startedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
364
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
365
|
+
}).transform((v) => {
|
|
366
|
+
return remap$(v, {
|
|
367
|
+
id: "_id",
|
|
368
|
+
externalId: "external_id",
|
|
369
|
+
contactIds: "contact_ids",
|
|
370
|
+
tracesCount: "traces_count",
|
|
371
|
+
workspaceId: "workspace_id",
|
|
372
|
+
projectId: "project_id",
|
|
373
|
+
startedAt: "started_at",
|
|
374
|
+
updatedAt: "updated_at",
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* @internal
|
|
380
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
381
|
+
*/
|
|
382
|
+
export namespace UpdateSessionRequestBody$ {
|
|
383
|
+
/** @deprecated use `UpdateSessionRequestBody$inboundSchema` instead. */
|
|
384
|
+
export const inboundSchema = UpdateSessionRequestBody$inboundSchema;
|
|
385
|
+
/** @deprecated use `UpdateSessionRequestBody$outboundSchema` instead. */
|
|
386
|
+
export const outboundSchema = UpdateSessionRequestBody$outboundSchema;
|
|
387
|
+
/** @deprecated use `UpdateSessionRequestBody$Outbound` instead. */
|
|
388
|
+
export type Outbound = UpdateSessionRequestBody$Outbound;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export function updateSessionRequestBodyToJSON(
|
|
392
|
+
updateSessionRequestBody: UpdateSessionRequestBody,
|
|
393
|
+
): string {
|
|
394
|
+
return JSON.stringify(
|
|
395
|
+
UpdateSessionRequestBody$outboundSchema.parse(updateSessionRequestBody),
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export function updateSessionRequestBodyFromJSON(
|
|
400
|
+
jsonString: string,
|
|
401
|
+
): SafeParseResult<UpdateSessionRequestBody, SDKValidationError> {
|
|
402
|
+
return safeParse(
|
|
403
|
+
jsonString,
|
|
404
|
+
(x) => UpdateSessionRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
405
|
+
`Failed to parse 'UpdateSessionRequestBody' from JSON`,
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/** @internal */
|
|
410
|
+
export const UpdateSessionRequest$inboundSchema: z.ZodType<
|
|
411
|
+
UpdateSessionRequest,
|
|
412
|
+
z.ZodTypeDef,
|
|
413
|
+
unknown
|
|
414
|
+
> = z.object({
|
|
415
|
+
session_id: z.string(),
|
|
416
|
+
RequestBody: z.lazy(() => UpdateSessionRequestBody$inboundSchema).optional(),
|
|
417
|
+
}).transform((v) => {
|
|
418
|
+
return remap$(v, {
|
|
419
|
+
"session_id": "sessionId",
|
|
420
|
+
"RequestBody": "requestBody",
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
/** @internal */
|
|
425
|
+
export type UpdateSessionRequest$Outbound = {
|
|
426
|
+
session_id: string;
|
|
427
|
+
RequestBody?: UpdateSessionRequestBody$Outbound | undefined;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
/** @internal */
|
|
431
|
+
export const UpdateSessionRequest$outboundSchema: z.ZodType<
|
|
432
|
+
UpdateSessionRequest$Outbound,
|
|
433
|
+
z.ZodTypeDef,
|
|
434
|
+
UpdateSessionRequest
|
|
435
|
+
> = z.object({
|
|
436
|
+
sessionId: z.string(),
|
|
437
|
+
requestBody: z.lazy(() => UpdateSessionRequestBody$outboundSchema).optional(),
|
|
438
|
+
}).transform((v) => {
|
|
439
|
+
return remap$(v, {
|
|
440
|
+
sessionId: "session_id",
|
|
441
|
+
requestBody: "RequestBody",
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* @internal
|
|
447
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
448
|
+
*/
|
|
449
|
+
export namespace UpdateSessionRequest$ {
|
|
450
|
+
/** @deprecated use `UpdateSessionRequest$inboundSchema` instead. */
|
|
451
|
+
export const inboundSchema = UpdateSessionRequest$inboundSchema;
|
|
452
|
+
/** @deprecated use `UpdateSessionRequest$outboundSchema` instead. */
|
|
453
|
+
export const outboundSchema = UpdateSessionRequest$outboundSchema;
|
|
454
|
+
/** @deprecated use `UpdateSessionRequest$Outbound` instead. */
|
|
455
|
+
export type Outbound = UpdateSessionRequest$Outbound;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export function updateSessionRequestToJSON(
|
|
459
|
+
updateSessionRequest: UpdateSessionRequest,
|
|
460
|
+
): string {
|
|
461
|
+
return JSON.stringify(
|
|
462
|
+
UpdateSessionRequest$outboundSchema.parse(updateSessionRequest),
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
export function updateSessionRequestFromJSON(
|
|
467
|
+
jsonString: string,
|
|
468
|
+
): SafeParseResult<UpdateSessionRequest, SDKValidationError> {
|
|
469
|
+
return safeParse(
|
|
470
|
+
jsonString,
|
|
471
|
+
(x) => UpdateSessionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
472
|
+
`Failed to parse 'UpdateSessionRequest' from JSON`,
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/** @internal */
|
|
477
|
+
export const UpdateSessionSessionsBilling$inboundSchema: z.ZodType<
|
|
478
|
+
UpdateSessionSessionsBilling,
|
|
479
|
+
z.ZodTypeDef,
|
|
480
|
+
unknown
|
|
481
|
+
> = z.object({
|
|
482
|
+
input_cost: z.number(),
|
|
483
|
+
output_cost: z.number(),
|
|
484
|
+
total_cost: z.number(),
|
|
485
|
+
}).transform((v) => {
|
|
486
|
+
return remap$(v, {
|
|
487
|
+
"input_cost": "inputCost",
|
|
488
|
+
"output_cost": "outputCost",
|
|
489
|
+
"total_cost": "totalCost",
|
|
490
|
+
});
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
/** @internal */
|
|
494
|
+
export type UpdateSessionSessionsBilling$Outbound = {
|
|
495
|
+
input_cost: number;
|
|
496
|
+
output_cost: number;
|
|
497
|
+
total_cost: number;
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
/** @internal */
|
|
501
|
+
export const UpdateSessionSessionsBilling$outboundSchema: z.ZodType<
|
|
502
|
+
UpdateSessionSessionsBilling$Outbound,
|
|
503
|
+
z.ZodTypeDef,
|
|
504
|
+
UpdateSessionSessionsBilling
|
|
505
|
+
> = z.object({
|
|
506
|
+
inputCost: z.number(),
|
|
507
|
+
outputCost: z.number(),
|
|
508
|
+
totalCost: z.number(),
|
|
509
|
+
}).transform((v) => {
|
|
510
|
+
return remap$(v, {
|
|
511
|
+
inputCost: "input_cost",
|
|
512
|
+
outputCost: "output_cost",
|
|
513
|
+
totalCost: "total_cost",
|
|
514
|
+
});
|
|
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 UpdateSessionSessionsBilling$ {
|
|
522
|
+
/** @deprecated use `UpdateSessionSessionsBilling$inboundSchema` instead. */
|
|
523
|
+
export const inboundSchema = UpdateSessionSessionsBilling$inboundSchema;
|
|
524
|
+
/** @deprecated use `UpdateSessionSessionsBilling$outboundSchema` instead. */
|
|
525
|
+
export const outboundSchema = UpdateSessionSessionsBilling$outboundSchema;
|
|
526
|
+
/** @deprecated use `UpdateSessionSessionsBilling$Outbound` instead. */
|
|
527
|
+
export type Outbound = UpdateSessionSessionsBilling$Outbound;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function updateSessionSessionsBillingToJSON(
|
|
531
|
+
updateSessionSessionsBilling: UpdateSessionSessionsBilling,
|
|
532
|
+
): string {
|
|
533
|
+
return JSON.stringify(
|
|
534
|
+
UpdateSessionSessionsBilling$outboundSchema.parse(
|
|
535
|
+
updateSessionSessionsBilling,
|
|
536
|
+
),
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export function updateSessionSessionsBillingFromJSON(
|
|
541
|
+
jsonString: string,
|
|
542
|
+
): SafeParseResult<UpdateSessionSessionsBilling, SDKValidationError> {
|
|
543
|
+
return safeParse(
|
|
544
|
+
jsonString,
|
|
545
|
+
(x) => UpdateSessionSessionsBilling$inboundSchema.parse(JSON.parse(x)),
|
|
546
|
+
`Failed to parse 'UpdateSessionSessionsBilling' from JSON`,
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/** @internal */
|
|
551
|
+
export const UpdateSessionSessionsUsage$inboundSchema: z.ZodType<
|
|
552
|
+
UpdateSessionSessionsUsage,
|
|
553
|
+
z.ZodTypeDef,
|
|
554
|
+
unknown
|
|
555
|
+
> = z.object({
|
|
556
|
+
prompt_tokens: z.number(),
|
|
557
|
+
completion_tokens: z.number(),
|
|
558
|
+
total_tokens: z.number(),
|
|
559
|
+
}).transform((v) => {
|
|
560
|
+
return remap$(v, {
|
|
561
|
+
"prompt_tokens": "promptTokens",
|
|
562
|
+
"completion_tokens": "completionTokens",
|
|
563
|
+
"total_tokens": "totalTokens",
|
|
564
|
+
});
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
/** @internal */
|
|
568
|
+
export type UpdateSessionSessionsUsage$Outbound = {
|
|
569
|
+
prompt_tokens: number;
|
|
570
|
+
completion_tokens: number;
|
|
571
|
+
total_tokens: number;
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
/** @internal */
|
|
575
|
+
export const UpdateSessionSessionsUsage$outboundSchema: z.ZodType<
|
|
576
|
+
UpdateSessionSessionsUsage$Outbound,
|
|
577
|
+
z.ZodTypeDef,
|
|
578
|
+
UpdateSessionSessionsUsage
|
|
579
|
+
> = z.object({
|
|
580
|
+
promptTokens: z.number(),
|
|
581
|
+
completionTokens: z.number(),
|
|
582
|
+
totalTokens: z.number(),
|
|
583
|
+
}).transform((v) => {
|
|
584
|
+
return remap$(v, {
|
|
585
|
+
promptTokens: "prompt_tokens",
|
|
586
|
+
completionTokens: "completion_tokens",
|
|
587
|
+
totalTokens: "total_tokens",
|
|
588
|
+
});
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* @internal
|
|
593
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
594
|
+
*/
|
|
595
|
+
export namespace UpdateSessionSessionsUsage$ {
|
|
596
|
+
/** @deprecated use `UpdateSessionSessionsUsage$inboundSchema` instead. */
|
|
597
|
+
export const inboundSchema = UpdateSessionSessionsUsage$inboundSchema;
|
|
598
|
+
/** @deprecated use `UpdateSessionSessionsUsage$outboundSchema` instead. */
|
|
599
|
+
export const outboundSchema = UpdateSessionSessionsUsage$outboundSchema;
|
|
600
|
+
/** @deprecated use `UpdateSessionSessionsUsage$Outbound` instead. */
|
|
601
|
+
export type Outbound = UpdateSessionSessionsUsage$Outbound;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export function updateSessionSessionsUsageToJSON(
|
|
605
|
+
updateSessionSessionsUsage: UpdateSessionSessionsUsage,
|
|
606
|
+
): string {
|
|
607
|
+
return JSON.stringify(
|
|
608
|
+
UpdateSessionSessionsUsage$outboundSchema.parse(updateSessionSessionsUsage),
|
|
609
|
+
);
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export function updateSessionSessionsUsageFromJSON(
|
|
613
|
+
jsonString: string,
|
|
614
|
+
): SafeParseResult<UpdateSessionSessionsUsage, SDKValidationError> {
|
|
615
|
+
return safeParse(
|
|
616
|
+
jsonString,
|
|
617
|
+
(x) => UpdateSessionSessionsUsage$inboundSchema.parse(JSON.parse(x)),
|
|
618
|
+
`Failed to parse 'UpdateSessionSessionsUsage' from JSON`,
|
|
619
|
+
);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** @internal */
|
|
623
|
+
export const UpdateSessionResponseBody$inboundSchema: z.ZodType<
|
|
624
|
+
UpdateSessionResponseBody,
|
|
625
|
+
z.ZodTypeDef,
|
|
626
|
+
unknown
|
|
627
|
+
> = z.object({
|
|
628
|
+
_id: z.string(),
|
|
629
|
+
external_id: z.string(),
|
|
630
|
+
duration: z.number(),
|
|
631
|
+
contact_ids: z.array(z.string()),
|
|
632
|
+
billing: z.lazy(() => UpdateSessionSessionsBilling$inboundSchema),
|
|
633
|
+
usage: z.lazy(() => UpdateSessionSessionsUsage$inboundSchema),
|
|
634
|
+
traces_count: z.number(),
|
|
635
|
+
tags: z.array(z.string()),
|
|
636
|
+
workspace_id: z.string(),
|
|
637
|
+
project_id: z.nullable(z.string()).optional(),
|
|
638
|
+
started_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
639
|
+
.optional(),
|
|
640
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
641
|
+
.optional(),
|
|
642
|
+
}).transform((v) => {
|
|
643
|
+
return remap$(v, {
|
|
644
|
+
"_id": "id",
|
|
645
|
+
"external_id": "externalId",
|
|
646
|
+
"contact_ids": "contactIds",
|
|
647
|
+
"traces_count": "tracesCount",
|
|
648
|
+
"workspace_id": "workspaceId",
|
|
649
|
+
"project_id": "projectId",
|
|
650
|
+
"started_at": "startedAt",
|
|
651
|
+
"updated_at": "updatedAt",
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
/** @internal */
|
|
656
|
+
export type UpdateSessionResponseBody$Outbound = {
|
|
657
|
+
_id: string;
|
|
658
|
+
external_id: string;
|
|
659
|
+
duration: number;
|
|
660
|
+
contact_ids: Array<string>;
|
|
661
|
+
billing: UpdateSessionSessionsBilling$Outbound;
|
|
662
|
+
usage: UpdateSessionSessionsUsage$Outbound;
|
|
663
|
+
traces_count: number;
|
|
664
|
+
tags: Array<string>;
|
|
665
|
+
workspace_id: string;
|
|
666
|
+
project_id?: string | null | undefined;
|
|
667
|
+
started_at?: string | undefined;
|
|
668
|
+
updated_at?: string | undefined;
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
/** @internal */
|
|
672
|
+
export const UpdateSessionResponseBody$outboundSchema: z.ZodType<
|
|
673
|
+
UpdateSessionResponseBody$Outbound,
|
|
674
|
+
z.ZodTypeDef,
|
|
675
|
+
UpdateSessionResponseBody
|
|
676
|
+
> = z.object({
|
|
677
|
+
id: z.string(),
|
|
678
|
+
externalId: z.string(),
|
|
679
|
+
duration: z.number(),
|
|
680
|
+
contactIds: z.array(z.string()),
|
|
681
|
+
billing: z.lazy(() => UpdateSessionSessionsBilling$outboundSchema),
|
|
682
|
+
usage: z.lazy(() => UpdateSessionSessionsUsage$outboundSchema),
|
|
683
|
+
tracesCount: z.number(),
|
|
684
|
+
tags: z.array(z.string()),
|
|
685
|
+
workspaceId: z.string(),
|
|
686
|
+
projectId: z.nullable(z.string()).optional(),
|
|
687
|
+
startedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
688
|
+
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
689
|
+
}).transform((v) => {
|
|
690
|
+
return remap$(v, {
|
|
691
|
+
id: "_id",
|
|
692
|
+
externalId: "external_id",
|
|
693
|
+
contactIds: "contact_ids",
|
|
694
|
+
tracesCount: "traces_count",
|
|
695
|
+
workspaceId: "workspace_id",
|
|
696
|
+
projectId: "project_id",
|
|
697
|
+
startedAt: "started_at",
|
|
698
|
+
updatedAt: "updated_at",
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* @internal
|
|
704
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
705
|
+
*/
|
|
706
|
+
export namespace UpdateSessionResponseBody$ {
|
|
707
|
+
/** @deprecated use `UpdateSessionResponseBody$inboundSchema` instead. */
|
|
708
|
+
export const inboundSchema = UpdateSessionResponseBody$inboundSchema;
|
|
709
|
+
/** @deprecated use `UpdateSessionResponseBody$outboundSchema` instead. */
|
|
710
|
+
export const outboundSchema = UpdateSessionResponseBody$outboundSchema;
|
|
711
|
+
/** @deprecated use `UpdateSessionResponseBody$Outbound` instead. */
|
|
712
|
+
export type Outbound = UpdateSessionResponseBody$Outbound;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export function updateSessionResponseBodyToJSON(
|
|
716
|
+
updateSessionResponseBody: UpdateSessionResponseBody,
|
|
717
|
+
): string {
|
|
718
|
+
return JSON.stringify(
|
|
719
|
+
UpdateSessionResponseBody$outboundSchema.parse(updateSessionResponseBody),
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
export function updateSessionResponseBodyFromJSON(
|
|
724
|
+
jsonString: string,
|
|
725
|
+
): SafeParseResult<UpdateSessionResponseBody, SDKValidationError> {
|
|
726
|
+
return safeParse(
|
|
727
|
+
jsonString,
|
|
728
|
+
(x) => UpdateSessionResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
729
|
+
`Failed to parse 'UpdateSessionResponseBody' from JSON`,
|
|
730
|
+
);
|
|
731
|
+
}
|