@orq-ai/node 4.4.0-rc.25 → 4.4.0-rc.27
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 +27 -54
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +0 -4
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -4
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +6 -6
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +6 -7
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/partdoneevent.js +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/errors/index.d.ts +0 -4
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -4
- package/models/errors/index.js.map +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/fileget.js +1 -1
- package/models/operations/filelist.js +1 -1
- package/models/operations/fileupload.js +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/index.d.ts +0 -7
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -7
- package/models/operations/index.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -8
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +0 -4
- package/src/models/components/invokedeploymentrequest.ts +10 -17
- package/src/models/components/partdoneevent.ts +1 -1
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/errors/index.ts +0 -4
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/fileget.ts +1 -1
- package/src/models/operations/filelist.ts +1 -1
- package/src/models/operations/fileupload.ts +1 -1
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/index.ts +0 -7
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/sdk.ts +0 -12
- package/funcs/conversationsCreate.d.ts +0 -17
- package/funcs/conversationsCreate.d.ts.map +0 -1
- package/funcs/conversationsCreate.js +0 -114
- package/funcs/conversationsCreate.js.map +0 -1
- package/funcs/conversationsCreateConversationResponse.d.ts +0 -18
- package/funcs/conversationsCreateConversationResponse.d.ts.map +0 -1
- package/funcs/conversationsCreateConversationResponse.js +0 -132
- package/funcs/conversationsCreateConversationResponse.js.map +0 -1
- package/funcs/conversationsDelete.d.ts +0 -17
- package/funcs/conversationsDelete.d.ts.map +0 -1
- package/funcs/conversationsDelete.js +0 -127
- package/funcs/conversationsDelete.js.map +0 -1
- package/funcs/conversationsGenerateName.d.ts +0 -18
- package/funcs/conversationsGenerateName.d.ts.map +0 -1
- package/funcs/conversationsGenerateName.js +0 -128
- package/funcs/conversationsGenerateName.js.map +0 -1
- package/funcs/conversationsList.d.ts +0 -17
- package/funcs/conversationsList.d.ts.map +0 -1
- package/funcs/conversationsList.js +0 -126
- package/funcs/conversationsList.js.map +0 -1
- package/funcs/conversationsRetrieve.d.ts +0 -18
- package/funcs/conversationsRetrieve.d.ts.map +0 -1
- package/funcs/conversationsRetrieve.js +0 -127
- package/funcs/conversationsRetrieve.js.map +0 -1
- package/funcs/conversationsUpdate.d.ts +0 -18
- package/funcs/conversationsUpdate.d.ts.map +0 -1
- package/funcs/conversationsUpdate.js +0 -128
- package/funcs/conversationsUpdate.js.map +0 -1
- package/models/components/conversationresponse.d.ts +0 -74
- package/models/components/conversationresponse.d.ts.map +0 -1
- package/models/components/conversationresponse.js +0 -80
- package/models/components/conversationresponse.js.map +0 -1
- package/models/components/conversationwithmessagesresponse.d.ts +0 -79
- package/models/components/conversationwithmessagesresponse.d.ts.map +0 -1
- package/models/components/conversationwithmessagesresponse.js +0 -83
- package/models/components/conversationwithmessagesresponse.js.map +0 -1
- package/models/components/messageresponse.d.ts +0 -58
- package/models/components/messageresponse.d.ts.map +0 -1
- package/models/components/messageresponse.js +0 -89
- package/models/components/messageresponse.js.map +0 -1
- package/models/components/usermessagerequest.d.ts +0 -54
- package/models/components/usermessagerequest.d.ts.map +0 -1
- package/models/components/usermessagerequest.js +0 -79
- package/models/components/usermessagerequest.js.map +0 -1
- package/models/errors/deleteconversation.d.ts +0 -23
- package/models/errors/deleteconversation.d.ts.map +0 -1
- package/models/errors/deleteconversation.js +0 -68
- package/models/errors/deleteconversation.js.map +0 -1
- package/models/errors/generateconversationname.d.ts +0 -43
- package/models/errors/generateconversationname.d.ts.map +0 -1
- package/models/errors/generateconversationname.js +0 -94
- package/models/errors/generateconversationname.js.map +0 -1
- package/models/errors/retrieveconversation.d.ts +0 -23
- package/models/errors/retrieveconversation.d.ts.map +0 -1
- package/models/errors/retrieveconversation.js +0 -68
- package/models/errors/retrieveconversation.js.map +0 -1
- package/models/errors/updateconversation.d.ts +0 -23
- package/models/errors/updateconversation.d.ts.map +0 -1
- package/models/errors/updateconversation.js +0 -68
- package/models/errors/updateconversation.js.map +0 -1
- package/models/operations/createconversation.d.ts +0 -126
- package/models/operations/createconversation.d.ts.map +0 -1
- package/models/operations/createconversation.js +0 -101
- package/models/operations/createconversation.js.map +0 -1
- package/models/operations/createconversationresponse.d.ts +0 -209
- package/models/operations/createconversationresponse.d.ts.map +0 -1
- package/models/operations/createconversationresponse.js +0 -217
- package/models/operations/createconversationresponse.js.map +0 -1
- package/models/operations/deleteconversation.d.ts +0 -15
- package/models/operations/deleteconversation.d.ts.map +0 -1
- package/models/operations/deleteconversation.js +0 -54
- package/models/operations/deleteconversation.js.map +0 -1
- package/models/operations/generateconversationname.d.ts +0 -105
- package/models/operations/generateconversationname.d.ts.map +0 -1
- package/models/operations/generateconversationname.js +0 -103
- package/models/operations/generateconversationname.js.map +0 -1
- package/models/operations/listconversations.d.ts +0 -51
- package/models/operations/listconversations.d.ts.map +0 -1
- package/models/operations/listconversations.js +0 -74
- package/models/operations/listconversations.js.map +0 -1
- package/models/operations/retrieveconversation.d.ts +0 -15
- package/models/operations/retrieveconversation.d.ts.map +0 -1
- package/models/operations/retrieveconversation.js +0 -54
- package/models/operations/retrieveconversation.js.map +0 -1
- package/models/operations/updateconversation.d.ts +0 -131
- package/models/operations/updateconversation.d.ts.map +0 -1
- package/models/operations/updateconversation.js +0 -113
- package/models/operations/updateconversation.js.map +0 -1
- package/sdk/conversations.d.ts +0 -56
- package/sdk/conversations.d.ts.map +0 -1
- package/sdk/conversations.js +0 -82
- package/sdk/conversations.js.map +0 -1
- package/sdk/internal.d.ts +0 -13
- package/sdk/internal.d.ts.map +0 -1
- package/sdk/internal.js +0 -22
- package/sdk/internal.js.map +0 -1
- package/src/funcs/conversationsCreate.ts +0 -161
- package/src/funcs/conversationsCreateConversationResponse.ts +0 -186
- package/src/funcs/conversationsDelete.ts +0 -180
- package/src/funcs/conversationsGenerateName.ts +0 -194
- package/src/funcs/conversationsList.ts +0 -186
- package/src/funcs/conversationsRetrieve.ts +0 -181
- package/src/funcs/conversationsUpdate.ts +0 -184
- package/src/models/components/conversationresponse.ts +0 -132
- package/src/models/components/conversationwithmessagesresponse.ts +0 -149
- package/src/models/components/messageresponse.ts +0 -127
- package/src/models/components/usermessagerequest.ts +0 -136
- package/src/models/errors/deleteconversation.ts +0 -51
- package/src/models/errors/generateconversationname.ts +0 -99
- package/src/models/errors/retrieveconversation.ts +0 -51
- package/src/models/errors/updateconversation.ts +0 -51
- package/src/models/operations/createconversation.ts +0 -227
- package/src/models/operations/createconversationresponse.ts +0 -498
- package/src/models/operations/deleteconversation.ts +0 -39
- package/src/models/operations/generateconversationname.ts +0 -207
- package/src/models/operations/listconversations.ts +0 -104
- package/src/models/operations/retrieveconversation.ts +0 -41
- package/src/models/operations/updateconversation.ts +0 -252
- package/src/sdk/conversations.ts +0 -147
- package/src/sdk/internal.ts +0 -28
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { 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 GenerateConversationNameRequestBody = {
|
|
13
|
-
/**
|
|
14
|
-
* Conversation context used to generate a meaningful display name. Typically the first user message or a conversation summary.
|
|
15
|
-
*/
|
|
16
|
-
context: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type GenerateConversationNameRequest = {
|
|
20
|
-
/**
|
|
21
|
-
* The unique identifier of the conversation to generate a name for
|
|
22
|
-
*/
|
|
23
|
-
conversationId: string;
|
|
24
|
-
requestBody: GenerateConversationNameRequestBody;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Resource type discriminator.
|
|
29
|
-
*/
|
|
30
|
-
export const GenerateConversationNameKind = {
|
|
31
|
-
Conversation: "conversation",
|
|
32
|
-
} as const;
|
|
33
|
-
/**
|
|
34
|
-
* Resource type discriminator.
|
|
35
|
-
*/
|
|
36
|
-
export type GenerateConversationNameKind = ClosedEnum<
|
|
37
|
-
typeof GenerateConversationNameKind
|
|
38
|
-
>;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Additional conversation metadata.
|
|
42
|
-
*/
|
|
43
|
-
export type GenerateConversationNameMetadata = {
|
|
44
|
-
/**
|
|
45
|
-
* When `true`, indicates the conversation title is being auto-generated.
|
|
46
|
-
*/
|
|
47
|
-
generatingTitle?: boolean | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* Parent entity identifier (e.g., agent or deployment). Set to `null` for standalone conversations.
|
|
50
|
-
*/
|
|
51
|
-
entityId?: string | null | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Model identifier for standalone conversations in `provider/model_id` format. Set to `null` for entity-bound conversations.
|
|
54
|
-
*/
|
|
55
|
-
model?: string | null | undefined;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Conversation name successfully generated and updated. Returns the complete updated conversation object.
|
|
60
|
-
*/
|
|
61
|
-
export type GenerateConversationNameResponseBody = {
|
|
62
|
-
/**
|
|
63
|
-
* Unique conversation identifier with `conv_` prefix.
|
|
64
|
-
*/
|
|
65
|
-
id: string;
|
|
66
|
-
/**
|
|
67
|
-
* Resource type discriminator.
|
|
68
|
-
*/
|
|
69
|
-
kind: GenerateConversationNameKind;
|
|
70
|
-
/**
|
|
71
|
-
* Human-readable name for the conversation. Maximum 100 characters.
|
|
72
|
-
*/
|
|
73
|
-
displayName: string;
|
|
74
|
-
/**
|
|
75
|
-
* Unix timestamp in milliseconds when the conversation was created.
|
|
76
|
-
*/
|
|
77
|
-
createdAt: number;
|
|
78
|
-
/**
|
|
79
|
-
* Unix timestamp in milliseconds when the conversation was last modified.
|
|
80
|
-
*/
|
|
81
|
-
updatedAt: number;
|
|
82
|
-
/**
|
|
83
|
-
* Identifier of the user or system that created the conversation.
|
|
84
|
-
*/
|
|
85
|
-
createdById?: string | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* Identifier of the user or system that last modified the conversation.
|
|
88
|
-
*/
|
|
89
|
-
updatedById?: string | undefined;
|
|
90
|
-
/**
|
|
91
|
-
* Additional conversation metadata.
|
|
92
|
-
*/
|
|
93
|
-
metadata?: GenerateConversationNameMetadata | undefined;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
export type GenerateConversationNameRequestBody$Outbound = {
|
|
98
|
-
context: string;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/** @internal */
|
|
102
|
-
export const GenerateConversationNameRequestBody$outboundSchema: z.ZodType<
|
|
103
|
-
GenerateConversationNameRequestBody$Outbound,
|
|
104
|
-
z.ZodTypeDef,
|
|
105
|
-
GenerateConversationNameRequestBody
|
|
106
|
-
> = z.object({
|
|
107
|
-
context: z.string(),
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
export function generateConversationNameRequestBodyToJSON(
|
|
111
|
-
generateConversationNameRequestBody: GenerateConversationNameRequestBody,
|
|
112
|
-
): string {
|
|
113
|
-
return JSON.stringify(
|
|
114
|
-
GenerateConversationNameRequestBody$outboundSchema.parse(
|
|
115
|
-
generateConversationNameRequestBody,
|
|
116
|
-
),
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/** @internal */
|
|
121
|
-
export type GenerateConversationNameRequest$Outbound = {
|
|
122
|
-
conversation_id: string;
|
|
123
|
-
RequestBody: GenerateConversationNameRequestBody$Outbound;
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
/** @internal */
|
|
127
|
-
export const GenerateConversationNameRequest$outboundSchema: z.ZodType<
|
|
128
|
-
GenerateConversationNameRequest$Outbound,
|
|
129
|
-
z.ZodTypeDef,
|
|
130
|
-
GenerateConversationNameRequest
|
|
131
|
-
> = z.object({
|
|
132
|
-
conversationId: z.string(),
|
|
133
|
-
requestBody: z.lazy(() => GenerateConversationNameRequestBody$outboundSchema),
|
|
134
|
-
}).transform((v) => {
|
|
135
|
-
return remap$(v, {
|
|
136
|
-
conversationId: "conversation_id",
|
|
137
|
-
requestBody: "RequestBody",
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
export function generateConversationNameRequestToJSON(
|
|
142
|
-
generateConversationNameRequest: GenerateConversationNameRequest,
|
|
143
|
-
): string {
|
|
144
|
-
return JSON.stringify(
|
|
145
|
-
GenerateConversationNameRequest$outboundSchema.parse(
|
|
146
|
-
generateConversationNameRequest,
|
|
147
|
-
),
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/** @internal */
|
|
152
|
-
export const GenerateConversationNameKind$inboundSchema: z.ZodNativeEnum<
|
|
153
|
-
typeof GenerateConversationNameKind
|
|
154
|
-
> = z.nativeEnum(GenerateConversationNameKind);
|
|
155
|
-
|
|
156
|
-
/** @internal */
|
|
157
|
-
export const GenerateConversationNameMetadata$inboundSchema: z.ZodType<
|
|
158
|
-
GenerateConversationNameMetadata,
|
|
159
|
-
z.ZodTypeDef,
|
|
160
|
-
unknown
|
|
161
|
-
> = z.object({
|
|
162
|
-
generatingTitle: z.boolean().optional(),
|
|
163
|
-
entityId: z.nullable(z.string()).optional(),
|
|
164
|
-
model: z.nullable(z.string()).optional(),
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
export function generateConversationNameMetadataFromJSON(
|
|
168
|
-
jsonString: string,
|
|
169
|
-
): SafeParseResult<GenerateConversationNameMetadata, SDKValidationError> {
|
|
170
|
-
return safeParse(
|
|
171
|
-
jsonString,
|
|
172
|
-
(x) => GenerateConversationNameMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
173
|
-
`Failed to parse 'GenerateConversationNameMetadata' from JSON`,
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/** @internal */
|
|
178
|
-
export const GenerateConversationNameResponseBody$inboundSchema: z.ZodType<
|
|
179
|
-
GenerateConversationNameResponseBody,
|
|
180
|
-
z.ZodTypeDef,
|
|
181
|
-
unknown
|
|
182
|
-
> = z.object({
|
|
183
|
-
_id: z.string().default("conv_01kj0ah0875z2n8sph3zvkt3xq"),
|
|
184
|
-
kind: GenerateConversationNameKind$inboundSchema,
|
|
185
|
-
displayName: z.string(),
|
|
186
|
-
createdAt: z.number(),
|
|
187
|
-
updatedAt: z.number(),
|
|
188
|
-
createdById: z.string().optional(),
|
|
189
|
-
updatedById: z.string().optional(),
|
|
190
|
-
metadata: z.lazy(() => GenerateConversationNameMetadata$inboundSchema)
|
|
191
|
-
.optional(),
|
|
192
|
-
}).transform((v) => {
|
|
193
|
-
return remap$(v, {
|
|
194
|
-
"_id": "id",
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
export function generateConversationNameResponseBodyFromJSON(
|
|
199
|
-
jsonString: string,
|
|
200
|
-
): SafeParseResult<GenerateConversationNameResponseBody, SDKValidationError> {
|
|
201
|
-
return safeParse(
|
|
202
|
-
jsonString,
|
|
203
|
-
(x) =>
|
|
204
|
-
GenerateConversationNameResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
205
|
-
`Failed to parse 'GenerateConversationNameResponseBody' from JSON`,
|
|
206
|
-
);
|
|
207
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import * as components from "../components/index.js";
|
|
11
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
-
|
|
13
|
-
export type ListConversationsRequest = {
|
|
14
|
-
/**
|
|
15
|
-
* Maximum number of conversations to return. Range: 1-100. Default: 10.
|
|
16
|
-
*/
|
|
17
|
-
limit?: number | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* Pagination cursor. Returns conversations created after the specified conversation ID.
|
|
20
|
-
*/
|
|
21
|
-
startingAfter?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* Pagination cursor. Returns conversations created before the specified conversation ID.
|
|
24
|
-
*/
|
|
25
|
-
endingBefore?: string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Filter by parent entity. When specified, returns only conversations associated with this entity. When omitted, returns standalone conversations.
|
|
28
|
-
*/
|
|
29
|
-
entityId?: string | undefined;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const ListConversationsObject = {
|
|
33
|
-
List: "list",
|
|
34
|
-
} as const;
|
|
35
|
-
export type ListConversationsObject = ClosedEnum<
|
|
36
|
-
typeof ListConversationsObject
|
|
37
|
-
>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Successfully retrieved the list of conversations. Returns a paginated response containing conversation objects.
|
|
41
|
-
*/
|
|
42
|
-
export type ListConversationsResponseBody = {
|
|
43
|
-
object: ListConversationsObject;
|
|
44
|
-
data: Array<components.ConversationResponse>;
|
|
45
|
-
hasMore: boolean;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** @internal */
|
|
49
|
-
export type ListConversationsRequest$Outbound = {
|
|
50
|
-
limit?: number | undefined;
|
|
51
|
-
startingAfter?: string | undefined;
|
|
52
|
-
endingBefore?: string | undefined;
|
|
53
|
-
entityId?: string | undefined;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export const ListConversationsRequest$outboundSchema: z.ZodType<
|
|
58
|
-
ListConversationsRequest$Outbound,
|
|
59
|
-
z.ZodTypeDef,
|
|
60
|
-
ListConversationsRequest
|
|
61
|
-
> = z.object({
|
|
62
|
-
limit: z.number().int().optional(),
|
|
63
|
-
startingAfter: z.string().optional(),
|
|
64
|
-
endingBefore: z.string().optional(),
|
|
65
|
-
entityId: z.string().optional(),
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export function listConversationsRequestToJSON(
|
|
69
|
-
listConversationsRequest: ListConversationsRequest,
|
|
70
|
-
): string {
|
|
71
|
-
return JSON.stringify(
|
|
72
|
-
ListConversationsRequest$outboundSchema.parse(listConversationsRequest),
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** @internal */
|
|
77
|
-
export const ListConversationsObject$inboundSchema: z.ZodNativeEnum<
|
|
78
|
-
typeof ListConversationsObject
|
|
79
|
-
> = z.nativeEnum(ListConversationsObject);
|
|
80
|
-
|
|
81
|
-
/** @internal */
|
|
82
|
-
export const ListConversationsResponseBody$inboundSchema: z.ZodType<
|
|
83
|
-
ListConversationsResponseBody,
|
|
84
|
-
z.ZodTypeDef,
|
|
85
|
-
unknown
|
|
86
|
-
> = z.object({
|
|
87
|
-
object: ListConversationsObject$inboundSchema,
|
|
88
|
-
data: z.array(components.ConversationResponse$inboundSchema),
|
|
89
|
-
has_more: z.boolean(),
|
|
90
|
-
}).transform((v) => {
|
|
91
|
-
return remap$(v, {
|
|
92
|
-
"has_more": "hasMore",
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
export function listConversationsResponseBodyFromJSON(
|
|
97
|
-
jsonString: string,
|
|
98
|
-
): SafeParseResult<ListConversationsResponseBody, SDKValidationError> {
|
|
99
|
-
return safeParse(
|
|
100
|
-
jsonString,
|
|
101
|
-
(x) => ListConversationsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
102
|
-
`Failed to parse 'ListConversationsResponseBody' from JSON`,
|
|
103
|
-
);
|
|
104
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
|
|
8
|
-
export type RetrieveConversationRequest = {
|
|
9
|
-
/**
|
|
10
|
-
* The unique identifier of the conversation to retrieve
|
|
11
|
-
*/
|
|
12
|
-
conversationId: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type RetrieveConversationRequest$Outbound = {
|
|
17
|
-
conversation_id: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const RetrieveConversationRequest$outboundSchema: z.ZodType<
|
|
22
|
-
RetrieveConversationRequest$Outbound,
|
|
23
|
-
z.ZodTypeDef,
|
|
24
|
-
RetrieveConversationRequest
|
|
25
|
-
> = z.object({
|
|
26
|
-
conversationId: z.string(),
|
|
27
|
-
}).transform((v) => {
|
|
28
|
-
return remap$(v, {
|
|
29
|
-
conversationId: "conversation_id",
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export function retrieveConversationRequestToJSON(
|
|
34
|
-
retrieveConversationRequest: RetrieveConversationRequest,
|
|
35
|
-
): string {
|
|
36
|
-
return JSON.stringify(
|
|
37
|
-
RetrieveConversationRequest$outboundSchema.parse(
|
|
38
|
-
retrieveConversationRequest,
|
|
39
|
-
),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Metadata fields to update. Only provided fields are modified.
|
|
14
|
-
*/
|
|
15
|
-
export type UpdateConversationMetadata = {
|
|
16
|
-
/**
|
|
17
|
-
* Set to `true` to indicate the title is being auto-generated.
|
|
18
|
-
*/
|
|
19
|
-
generatingTitle?: boolean | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Parent entity identifier. Set to `null` to detach from an entity.
|
|
22
|
-
*/
|
|
23
|
-
entityId?: string | null | undefined;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export type UpdateConversationRequestBody = {
|
|
27
|
-
/**
|
|
28
|
-
* New display name for the conversation. Maximum 100 characters.
|
|
29
|
-
*/
|
|
30
|
-
displayName?: string | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Metadata fields to update. Only provided fields are modified.
|
|
33
|
-
*/
|
|
34
|
-
metadata?: UpdateConversationMetadata | undefined;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export type UpdateConversationRequest = {
|
|
38
|
-
/**
|
|
39
|
-
* The unique identifier of the conversation to update
|
|
40
|
-
*/
|
|
41
|
-
conversationId: string;
|
|
42
|
-
requestBody: UpdateConversationRequestBody;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Resource type discriminator.
|
|
47
|
-
*/
|
|
48
|
-
export const UpdateConversationKind = {
|
|
49
|
-
Conversation: "conversation",
|
|
50
|
-
} as const;
|
|
51
|
-
/**
|
|
52
|
-
* Resource type discriminator.
|
|
53
|
-
*/
|
|
54
|
-
export type UpdateConversationKind = ClosedEnum<typeof UpdateConversationKind>;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Additional conversation metadata.
|
|
58
|
-
*/
|
|
59
|
-
export type UpdateConversationConversationsMetadata = {
|
|
60
|
-
/**
|
|
61
|
-
* When `true`, indicates the conversation title is being auto-generated.
|
|
62
|
-
*/
|
|
63
|
-
generatingTitle?: boolean | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Parent entity identifier (e.g., agent or deployment). Set to `null` for standalone conversations.
|
|
66
|
-
*/
|
|
67
|
-
entityId?: string | null | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Model identifier for standalone conversations in `provider/model_id` format. Set to `null` for entity-bound conversations.
|
|
70
|
-
*/
|
|
71
|
-
model?: string | null | undefined;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Conversation successfully updated. Returns the complete updated conversation object.
|
|
76
|
-
*/
|
|
77
|
-
export type UpdateConversationResponseBody = {
|
|
78
|
-
/**
|
|
79
|
-
* Unique conversation identifier with `conv_` prefix.
|
|
80
|
-
*/
|
|
81
|
-
id: string;
|
|
82
|
-
/**
|
|
83
|
-
* Resource type discriminator.
|
|
84
|
-
*/
|
|
85
|
-
kind: UpdateConversationKind;
|
|
86
|
-
/**
|
|
87
|
-
* Human-readable name for the conversation. Maximum 100 characters.
|
|
88
|
-
*/
|
|
89
|
-
displayName: string;
|
|
90
|
-
/**
|
|
91
|
-
* Unix timestamp in milliseconds when the conversation was created.
|
|
92
|
-
*/
|
|
93
|
-
createdAt: number;
|
|
94
|
-
/**
|
|
95
|
-
* Unix timestamp in milliseconds when the conversation was last modified.
|
|
96
|
-
*/
|
|
97
|
-
updatedAt: number;
|
|
98
|
-
/**
|
|
99
|
-
* Identifier of the user or system that created the conversation.
|
|
100
|
-
*/
|
|
101
|
-
createdById?: string | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* Identifier of the user or system that last modified the conversation.
|
|
104
|
-
*/
|
|
105
|
-
updatedById?: string | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Additional conversation metadata.
|
|
108
|
-
*/
|
|
109
|
-
metadata?: UpdateConversationConversationsMetadata | undefined;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export type UpdateConversationMetadata$Outbound = {
|
|
114
|
-
generatingTitle?: boolean | undefined;
|
|
115
|
-
entityId?: string | null | undefined;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
/** @internal */
|
|
119
|
-
export const UpdateConversationMetadata$outboundSchema: z.ZodType<
|
|
120
|
-
UpdateConversationMetadata$Outbound,
|
|
121
|
-
z.ZodTypeDef,
|
|
122
|
-
UpdateConversationMetadata
|
|
123
|
-
> = z.object({
|
|
124
|
-
generatingTitle: z.boolean().optional(),
|
|
125
|
-
entityId: z.nullable(z.string()).optional(),
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
export function updateConversationMetadataToJSON(
|
|
129
|
-
updateConversationMetadata: UpdateConversationMetadata,
|
|
130
|
-
): string {
|
|
131
|
-
return JSON.stringify(
|
|
132
|
-
UpdateConversationMetadata$outboundSchema.parse(updateConversationMetadata),
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** @internal */
|
|
137
|
-
export type UpdateConversationRequestBody$Outbound = {
|
|
138
|
-
displayName?: string | undefined;
|
|
139
|
-
metadata?: UpdateConversationMetadata$Outbound | undefined;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/** @internal */
|
|
143
|
-
export const UpdateConversationRequestBody$outboundSchema: z.ZodType<
|
|
144
|
-
UpdateConversationRequestBody$Outbound,
|
|
145
|
-
z.ZodTypeDef,
|
|
146
|
-
UpdateConversationRequestBody
|
|
147
|
-
> = z.object({
|
|
148
|
-
displayName: z.string().optional(),
|
|
149
|
-
metadata: z.lazy(() => UpdateConversationMetadata$outboundSchema).optional(),
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
export function updateConversationRequestBodyToJSON(
|
|
153
|
-
updateConversationRequestBody: UpdateConversationRequestBody,
|
|
154
|
-
): string {
|
|
155
|
-
return JSON.stringify(
|
|
156
|
-
UpdateConversationRequestBody$outboundSchema.parse(
|
|
157
|
-
updateConversationRequestBody,
|
|
158
|
-
),
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/** @internal */
|
|
163
|
-
export type UpdateConversationRequest$Outbound = {
|
|
164
|
-
conversation_id: string;
|
|
165
|
-
RequestBody: UpdateConversationRequestBody$Outbound;
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
/** @internal */
|
|
169
|
-
export const UpdateConversationRequest$outboundSchema: z.ZodType<
|
|
170
|
-
UpdateConversationRequest$Outbound,
|
|
171
|
-
z.ZodTypeDef,
|
|
172
|
-
UpdateConversationRequest
|
|
173
|
-
> = z.object({
|
|
174
|
-
conversationId: z.string(),
|
|
175
|
-
requestBody: z.lazy(() => UpdateConversationRequestBody$outboundSchema),
|
|
176
|
-
}).transform((v) => {
|
|
177
|
-
return remap$(v, {
|
|
178
|
-
conversationId: "conversation_id",
|
|
179
|
-
requestBody: "RequestBody",
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
export function updateConversationRequestToJSON(
|
|
184
|
-
updateConversationRequest: UpdateConversationRequest,
|
|
185
|
-
): string {
|
|
186
|
-
return JSON.stringify(
|
|
187
|
-
UpdateConversationRequest$outboundSchema.parse(updateConversationRequest),
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/** @internal */
|
|
192
|
-
export const UpdateConversationKind$inboundSchema: z.ZodNativeEnum<
|
|
193
|
-
typeof UpdateConversationKind
|
|
194
|
-
> = z.nativeEnum(UpdateConversationKind);
|
|
195
|
-
|
|
196
|
-
/** @internal */
|
|
197
|
-
export const UpdateConversationConversationsMetadata$inboundSchema: z.ZodType<
|
|
198
|
-
UpdateConversationConversationsMetadata,
|
|
199
|
-
z.ZodTypeDef,
|
|
200
|
-
unknown
|
|
201
|
-
> = z.object({
|
|
202
|
-
generatingTitle: z.boolean().optional(),
|
|
203
|
-
entityId: z.nullable(z.string()).optional(),
|
|
204
|
-
model: z.nullable(z.string()).optional(),
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
export function updateConversationConversationsMetadataFromJSON(
|
|
208
|
-
jsonString: string,
|
|
209
|
-
): SafeParseResult<
|
|
210
|
-
UpdateConversationConversationsMetadata,
|
|
211
|
-
SDKValidationError
|
|
212
|
-
> {
|
|
213
|
-
return safeParse(
|
|
214
|
-
jsonString,
|
|
215
|
-
(x) =>
|
|
216
|
-
UpdateConversationConversationsMetadata$inboundSchema.parse(
|
|
217
|
-
JSON.parse(x),
|
|
218
|
-
),
|
|
219
|
-
`Failed to parse 'UpdateConversationConversationsMetadata' from JSON`,
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/** @internal */
|
|
224
|
-
export const UpdateConversationResponseBody$inboundSchema: z.ZodType<
|
|
225
|
-
UpdateConversationResponseBody,
|
|
226
|
-
z.ZodTypeDef,
|
|
227
|
-
unknown
|
|
228
|
-
> = z.object({
|
|
229
|
-
_id: z.string().default("conv_01kj0ah08d26cdt52apk02a132"),
|
|
230
|
-
kind: UpdateConversationKind$inboundSchema,
|
|
231
|
-
displayName: z.string(),
|
|
232
|
-
createdAt: z.number(),
|
|
233
|
-
updatedAt: z.number(),
|
|
234
|
-
createdById: z.string().optional(),
|
|
235
|
-
updatedById: z.string().optional(),
|
|
236
|
-
metadata: z.lazy(() => UpdateConversationConversationsMetadata$inboundSchema)
|
|
237
|
-
.optional(),
|
|
238
|
-
}).transform((v) => {
|
|
239
|
-
return remap$(v, {
|
|
240
|
-
"_id": "id",
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
export function updateConversationResponseBodyFromJSON(
|
|
245
|
-
jsonString: string,
|
|
246
|
-
): SafeParseResult<UpdateConversationResponseBody, SDKValidationError> {
|
|
247
|
-
return safeParse(
|
|
248
|
-
jsonString,
|
|
249
|
-
(x) => UpdateConversationResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
-
`Failed to parse 'UpdateConversationResponseBody' from JSON`,
|
|
251
|
-
);
|
|
252
|
-
}
|