@orq-ai/node 4.1.9 → 4.1.11
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 +222 -222
- package/bin/mcp-server.js.map +40 -40
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/models/components/conversationresponse.js +2 -2
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrieveconversation.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/examples/package-lock.json +1 -1
- 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/agentsCreate.ts +2 -11
- package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts → conversationsCreateConversationResponse.ts} +34 -38
- package/packages/orq-rc/src/funcs/conversationsList.ts +6 -1
- package/packages/orq-rc/src/funcs/conversationsRetrieve.ts +5 -4
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +6 -5
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +6 -5
- package/packages/orq-rc/src/funcs/toolsCreate.ts +2 -11
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/lib/sdks.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/conversationsCreateConversationResponse.ts +39 -0
- package/packages/orq-rc/src/mcp-server/tools/conversationsList.ts +2 -0
- package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentresponsemessage.ts +16 -1
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +16 -1
- package/packages/orq-rc/src/models/components/conversationresponse.ts +26 -26
- package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +226 -0
- package/packages/orq-rc/src/models/components/errorpart.ts +58 -0
- package/packages/orq-rc/src/models/components/index.ts +4 -0
- package/packages/orq-rc/src/models/components/messageresponse.ts +217 -0
- package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
- package/packages/orq-rc/src/models/components/publiccontact.ts +1 -1
- package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
- package/packages/orq-rc/src/models/components/responsestartedevent.ts +14 -0
- package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +1 -0
- package/packages/orq-rc/src/models/components/usermessagerequest.ts +194 -0
- package/packages/orq-rc/src/models/errors/index.ts +0 -2
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +40 -0
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +122 -5
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +110 -7
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createconversation.ts +59 -36
- package/packages/orq-rc/src/models/operations/createconversationresponse.ts +794 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +48 -40
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createimage.ts +105 -5
- package/packages/orq-rc/src/models/operations/creatememory.ts +3 -15
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +7 -7
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/deletememory.ts +6 -6
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +6 -6
- 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/generateconversationname.ts +27 -27
- package/packages/orq-rc/src/models/operations/getallmemories.ts +3 -8
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +6 -6
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +4 -4
- package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +4 -4
- package/packages/orq-rc/src/models/operations/index.ts +1 -1
- package/packages/orq-rc/src/models/operations/invokeagent.ts +128 -5
- package/packages/orq-rc/src/models/operations/listagents.ts +20 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listconversations.ts +10 -3
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +53 -53
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/parse.ts +157 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +22 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveconversation.ts +0 -197
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- 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 +9 -14
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +130 -7
- package/packages/orq-rc/src/models/operations/streamagent.ts +120 -5
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +122 -7
- package/packages/orq-rc/src/models/operations/updateagent.ts +20 -0
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateconversation.ts +39 -33
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- 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 +28 -28
- package/packages/orq-rc/src/models/operations/updatememory.ts +9 -32
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/conversations.ts +23 -1
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -18
- package/packages/orq-rc/src/sdk/internal.ts +28 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +12 -12
- 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/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- 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/retrieveconversation.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/mcp-server/tools/evaluatorsGetV2EvaluatorsIdVersionsVersionId.ts +0 -40
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
- package/packages/orq-rc/src/models/errors/getv2evaluatorsidversionsversionid.ts +0 -69
- package/packages/orq-rc/src/models/operations/getv2evaluatorsidversionsversionid.ts +0 -193
|
@@ -718,6 +718,38 @@ export type Prompt = {
|
|
|
718
718
|
version: Version;
|
|
719
719
|
};
|
|
720
720
|
|
|
721
|
+
/**
|
|
722
|
+
* @deprecated Use identity instead. Information about the contact making the request.
|
|
723
|
+
*
|
|
724
|
+
* @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
725
|
+
*/
|
|
726
|
+
export type CreateChatCompletionContact = {
|
|
727
|
+
/**
|
|
728
|
+
* Unique identifier for the contact
|
|
729
|
+
*/
|
|
730
|
+
id: string;
|
|
731
|
+
/**
|
|
732
|
+
* Display name of the contact
|
|
733
|
+
*/
|
|
734
|
+
displayName?: string | undefined;
|
|
735
|
+
/**
|
|
736
|
+
* Email address of the contact
|
|
737
|
+
*/
|
|
738
|
+
email?: string | undefined;
|
|
739
|
+
/**
|
|
740
|
+
* A hash of key/value pairs containing any other data about the contact
|
|
741
|
+
*/
|
|
742
|
+
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
743
|
+
/**
|
|
744
|
+
* URL to the contact's avatar or logo
|
|
745
|
+
*/
|
|
746
|
+
logoUrl?: string | undefined;
|
|
747
|
+
/**
|
|
748
|
+
* A list of tags associated with the contact
|
|
749
|
+
*/
|
|
750
|
+
tags?: Array<string> | undefined;
|
|
751
|
+
};
|
|
752
|
+
|
|
721
753
|
/**
|
|
722
754
|
* Thread information to group related requests
|
|
723
755
|
*/
|
|
@@ -1211,7 +1243,7 @@ export type Timeout = {
|
|
|
1211
1243
|
};
|
|
1212
1244
|
|
|
1213
1245
|
/**
|
|
1214
|
-
* Leverage Orq's intelligent routing capabilities to enhance your AI application with enterprise-grade reliability and observability. Orq provides automatic request management including retries on failures, model fallbacks for high availability,
|
|
1246
|
+
* Leverage Orq's intelligent routing capabilities to enhance your AI application with enterprise-grade reliability and observability. Orq provides automatic request management including retries on failures, model fallbacks for high availability, identity-level analytics tracking, conversation threading, and dynamic prompt templating with variable substitution.
|
|
1215
1247
|
*/
|
|
1216
1248
|
export type Orq = {
|
|
1217
1249
|
/**
|
|
@@ -1231,9 +1263,10 @@ export type Orq = {
|
|
|
1231
1263
|
*/
|
|
1232
1264
|
prompt?: Prompt | undefined;
|
|
1233
1265
|
/**
|
|
1234
|
-
* Information about the
|
|
1266
|
+
* Information about the identity making the request. If the identity does not exist, it will be created automatically.
|
|
1235
1267
|
*/
|
|
1236
|
-
|
|
1268
|
+
identity?: components.PublicContact | undefined;
|
|
1269
|
+
contact?: CreateChatCompletionContact | undefined;
|
|
1237
1270
|
/**
|
|
1238
1271
|
* Thread information to group related requests
|
|
1239
1272
|
*/
|
|
@@ -1389,7 +1422,7 @@ export type CreateChatCompletionRequestBody = {
|
|
|
1389
1422
|
*/
|
|
1390
1423
|
guardrails?: Array<CreateChatCompletionGuardrails> | undefined;
|
|
1391
1424
|
/**
|
|
1392
|
-
* Leverage Orq's intelligent routing capabilities to enhance your AI application with enterprise-grade reliability and observability. Orq provides automatic request management including retries on failures, model fallbacks for high availability,
|
|
1425
|
+
* Leverage Orq's intelligent routing capabilities to enhance your AI application with enterprise-grade reliability and observability. Orq provides automatic request management including retries on failures, model fallbacks for high availability, identity-level analytics tracking, conversation threading, and dynamic prompt templating with variable substitution.
|
|
1393
1426
|
*/
|
|
1394
1427
|
orq?: Orq | undefined;
|
|
1395
1428
|
stream?: boolean | undefined;
|
|
@@ -4220,6 +4253,72 @@ export function promptFromJSON(
|
|
|
4220
4253
|
);
|
|
4221
4254
|
}
|
|
4222
4255
|
|
|
4256
|
+
/** @internal */
|
|
4257
|
+
export const CreateChatCompletionContact$inboundSchema: z.ZodType<
|
|
4258
|
+
CreateChatCompletionContact,
|
|
4259
|
+
z.ZodTypeDef,
|
|
4260
|
+
unknown
|
|
4261
|
+
> = z.object({
|
|
4262
|
+
id: z.string(),
|
|
4263
|
+
display_name: z.string().optional(),
|
|
4264
|
+
email: z.string().optional(),
|
|
4265
|
+
metadata: z.array(z.record(z.any())).optional(),
|
|
4266
|
+
logo_url: z.string().optional(),
|
|
4267
|
+
tags: z.array(z.string()).optional(),
|
|
4268
|
+
}).transform((v) => {
|
|
4269
|
+
return remap$(v, {
|
|
4270
|
+
"display_name": "displayName",
|
|
4271
|
+
"logo_url": "logoUrl",
|
|
4272
|
+
});
|
|
4273
|
+
});
|
|
4274
|
+
/** @internal */
|
|
4275
|
+
export type CreateChatCompletionContact$Outbound = {
|
|
4276
|
+
id: string;
|
|
4277
|
+
display_name?: string | undefined;
|
|
4278
|
+
email?: string | undefined;
|
|
4279
|
+
metadata?: Array<{ [k: string]: any }> | undefined;
|
|
4280
|
+
logo_url?: string | undefined;
|
|
4281
|
+
tags?: Array<string> | undefined;
|
|
4282
|
+
};
|
|
4283
|
+
|
|
4284
|
+
/** @internal */
|
|
4285
|
+
export const CreateChatCompletionContact$outboundSchema: z.ZodType<
|
|
4286
|
+
CreateChatCompletionContact$Outbound,
|
|
4287
|
+
z.ZodTypeDef,
|
|
4288
|
+
CreateChatCompletionContact
|
|
4289
|
+
> = z.object({
|
|
4290
|
+
id: z.string(),
|
|
4291
|
+
displayName: z.string().optional(),
|
|
4292
|
+
email: z.string().optional(),
|
|
4293
|
+
metadata: z.array(z.record(z.any())).optional(),
|
|
4294
|
+
logoUrl: z.string().optional(),
|
|
4295
|
+
tags: z.array(z.string()).optional(),
|
|
4296
|
+
}).transform((v) => {
|
|
4297
|
+
return remap$(v, {
|
|
4298
|
+
displayName: "display_name",
|
|
4299
|
+
logoUrl: "logo_url",
|
|
4300
|
+
});
|
|
4301
|
+
});
|
|
4302
|
+
|
|
4303
|
+
export function createChatCompletionContactToJSON(
|
|
4304
|
+
createChatCompletionContact: CreateChatCompletionContact,
|
|
4305
|
+
): string {
|
|
4306
|
+
return JSON.stringify(
|
|
4307
|
+
CreateChatCompletionContact$outboundSchema.parse(
|
|
4308
|
+
createChatCompletionContact,
|
|
4309
|
+
),
|
|
4310
|
+
);
|
|
4311
|
+
}
|
|
4312
|
+
export function createChatCompletionContactFromJSON(
|
|
4313
|
+
jsonString: string,
|
|
4314
|
+
): SafeParseResult<CreateChatCompletionContact, SDKValidationError> {
|
|
4315
|
+
return safeParse(
|
|
4316
|
+
jsonString,
|
|
4317
|
+
(x) => CreateChatCompletionContact$inboundSchema.parse(JSON.parse(x)),
|
|
4318
|
+
`Failed to parse 'CreateChatCompletionContact' from JSON`,
|
|
4319
|
+
);
|
|
4320
|
+
}
|
|
4321
|
+
|
|
4223
4322
|
/** @internal */
|
|
4224
4323
|
export const CreateChatCompletionThread$inboundSchema: z.ZodType<
|
|
4225
4324
|
CreateChatCompletionThread,
|
|
@@ -6746,7 +6845,8 @@ export const Orq$inboundSchema: z.ZodType<Orq, z.ZodTypeDef, unknown> = z
|
|
|
6746
6845
|
retry: z.lazy(() => CreateChatCompletionRetry$inboundSchema).optional(),
|
|
6747
6846
|
fallbacks: z.array(z.lazy(() => Fallbacks$inboundSchema)).optional(),
|
|
6748
6847
|
prompt: z.lazy(() => Prompt$inboundSchema).optional(),
|
|
6749
|
-
|
|
6848
|
+
identity: components.PublicContact$inboundSchema.optional(),
|
|
6849
|
+
contact: z.lazy(() => CreateChatCompletionContact$inboundSchema).optional(),
|
|
6750
6850
|
thread: z.lazy(() => CreateChatCompletionThread$inboundSchema).optional(),
|
|
6751
6851
|
inputs: z.union([
|
|
6752
6852
|
z.record(z.any()),
|
|
@@ -6771,7 +6871,8 @@ export type Orq$Outbound = {
|
|
|
6771
6871
|
retry?: CreateChatCompletionRetry$Outbound | undefined;
|
|
6772
6872
|
fallbacks?: Array<Fallbacks$Outbound> | undefined;
|
|
6773
6873
|
prompt?: Prompt$Outbound | undefined;
|
|
6774
|
-
|
|
6874
|
+
identity?: components.PublicContact$Outbound | undefined;
|
|
6875
|
+
contact?: CreateChatCompletionContact$Outbound | undefined;
|
|
6775
6876
|
thread?: CreateChatCompletionThread$Outbound | undefined;
|
|
6776
6877
|
inputs?: { [k: string]: any } | Array<Inputs2$Outbound> | undefined;
|
|
6777
6878
|
cache?: Cache$Outbound | undefined;
|
|
@@ -6789,7 +6890,9 @@ export const Orq$outboundSchema: z.ZodType<Orq$Outbound, z.ZodTypeDef, Orq> = z
|
|
|
6789
6890
|
retry: z.lazy(() => CreateChatCompletionRetry$outboundSchema).optional(),
|
|
6790
6891
|
fallbacks: z.array(z.lazy(() => Fallbacks$outboundSchema)).optional(),
|
|
6791
6892
|
prompt: z.lazy(() => Prompt$outboundSchema).optional(),
|
|
6792
|
-
|
|
6893
|
+
identity: components.PublicContact$outboundSchema.optional(),
|
|
6894
|
+
contact: z.lazy(() => CreateChatCompletionContact$outboundSchema)
|
|
6895
|
+
.optional(),
|
|
6793
6896
|
thread: z.lazy(() => CreateChatCompletionThread$outboundSchema).optional(),
|
|
6794
6897
|
inputs: z.union([
|
|
6795
6898
|
z.record(z.any()),
|
|
@@ -167,7 +167,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
167
167
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
168
168
|
.optional(),
|
|
169
169
|
updated: z.string().datetime({ offset: true }).default(
|
|
170
|
-
"2026-01-
|
|
170
|
+
"2026-01-13T10:29:20.072Z",
|
|
171
171
|
).transform(v => new Date(v)),
|
|
172
172
|
}).transform((v) => {
|
|
173
173
|
return remap$(v, {
|
|
@@ -207,7 +207,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
207
207
|
tags: z.array(z.string()).optional(),
|
|
208
208
|
metadata: z.record(z.any()).optional(),
|
|
209
209
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
210
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
210
|
+
updated: z.date().default(() => new Date("2026-01-13T10:29:20.072Z"))
|
|
211
211
|
.transform(v => v.toISOString()),
|
|
212
212
|
}).transform((v) => {
|
|
213
213
|
return remap$(v, {
|
|
@@ -9,45 +9,66 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Optional metadata to attach to the conversation.
|
|
14
|
+
*/
|
|
12
15
|
export type CreateConversationMetadata = {
|
|
16
|
+
/**
|
|
17
|
+
* Set to `true` to indicate the title is being auto-generated.
|
|
18
|
+
*/
|
|
13
19
|
generatingTitle?: boolean | undefined;
|
|
14
20
|
/**
|
|
15
|
-
*
|
|
21
|
+
* Parent entity identifier to associate the conversation with. Omit or set to `null` for standalone conversations.
|
|
16
22
|
*/
|
|
17
|
-
entityId
|
|
23
|
+
entityId?: string | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Model identifier in `provider/model_id` format for standalone conversations. Omit or set to `null` for entity-bound conversations.
|
|
26
|
+
*/
|
|
27
|
+
model?: string | null | undefined;
|
|
18
28
|
};
|
|
19
29
|
|
|
20
30
|
export type CreateConversationRequestBody = {
|
|
21
31
|
/**
|
|
22
|
-
*
|
|
32
|
+
* Human-readable name for the conversation. Defaults to "Untitled" if omitted.
|
|
23
33
|
*/
|
|
24
34
|
displayName?: string | undefined;
|
|
25
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Project identifier to associate the conversation with.
|
|
37
|
+
*/
|
|
38
|
+
projectId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Optional metadata to attach to the conversation.
|
|
41
|
+
*/
|
|
42
|
+
metadata?: CreateConversationMetadata | undefined;
|
|
26
43
|
};
|
|
27
44
|
|
|
28
45
|
/**
|
|
29
|
-
*
|
|
46
|
+
* Resource type discriminator.
|
|
30
47
|
*/
|
|
31
48
|
export const CreateConversationKind = {
|
|
32
49
|
Conversation: "conversation",
|
|
33
50
|
} as const;
|
|
34
51
|
/**
|
|
35
|
-
*
|
|
52
|
+
* Resource type discriminator.
|
|
36
53
|
*/
|
|
37
54
|
export type CreateConversationKind = ClosedEnum<typeof CreateConversationKind>;
|
|
38
55
|
|
|
39
56
|
/**
|
|
40
|
-
*
|
|
57
|
+
* Additional conversation metadata.
|
|
41
58
|
*/
|
|
42
59
|
export type CreateConversationConversationsMetadata = {
|
|
43
60
|
/**
|
|
44
|
-
*
|
|
61
|
+
* When `true`, indicates the conversation title is being auto-generated.
|
|
45
62
|
*/
|
|
46
63
|
generatingTitle?: boolean | undefined;
|
|
47
64
|
/**
|
|
48
|
-
*
|
|
65
|
+
* Parent entity identifier (e.g., agent or deployment). Set to `null` for standalone conversations.
|
|
49
66
|
*/
|
|
50
|
-
entityId?: string | undefined;
|
|
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;
|
|
51
72
|
};
|
|
52
73
|
|
|
53
74
|
/**
|
|
@@ -55,39 +76,35 @@ export type CreateConversationConversationsMetadata = {
|
|
|
55
76
|
*/
|
|
56
77
|
export type CreateConversationResponseBody = {
|
|
57
78
|
/**
|
|
58
|
-
* Unique
|
|
79
|
+
* Unique conversation identifier with `conv_` prefix.
|
|
59
80
|
*/
|
|
60
81
|
id?: string | undefined;
|
|
61
82
|
/**
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
entityId: string;
|
|
65
|
-
/**
|
|
66
|
-
* Type discriminator indicating this is a conversation
|
|
83
|
+
* Resource type discriminator.
|
|
67
84
|
*/
|
|
68
85
|
kind: CreateConversationKind;
|
|
69
86
|
/**
|
|
70
|
-
*
|
|
87
|
+
* Human-readable name for the conversation. Maximum 100 characters.
|
|
71
88
|
*/
|
|
72
89
|
displayName: string;
|
|
73
90
|
/**
|
|
74
|
-
* Unix timestamp
|
|
91
|
+
* Unix timestamp in milliseconds when the conversation was created.
|
|
75
92
|
*/
|
|
76
93
|
createdAt: number;
|
|
77
94
|
/**
|
|
78
|
-
* Unix timestamp
|
|
95
|
+
* Unix timestamp in milliseconds when the conversation was last modified.
|
|
79
96
|
*/
|
|
80
97
|
updatedAt: number;
|
|
81
98
|
/**
|
|
82
|
-
*
|
|
99
|
+
* Identifier of the user or system that created the conversation.
|
|
83
100
|
*/
|
|
84
101
|
createdById?: string | undefined;
|
|
85
102
|
/**
|
|
86
|
-
*
|
|
103
|
+
* Identifier of the user or system that last modified the conversation.
|
|
87
104
|
*/
|
|
88
105
|
updatedById?: string | undefined;
|
|
89
106
|
/**
|
|
90
|
-
*
|
|
107
|
+
* Additional conversation metadata.
|
|
91
108
|
*/
|
|
92
109
|
metadata?: CreateConversationConversationsMetadata | undefined;
|
|
93
110
|
};
|
|
@@ -99,12 +116,14 @@ export const CreateConversationMetadata$inboundSchema: z.ZodType<
|
|
|
99
116
|
unknown
|
|
100
117
|
> = z.object({
|
|
101
118
|
generatingTitle: z.boolean().optional(),
|
|
102
|
-
entityId: z.string(),
|
|
119
|
+
entityId: z.nullable(z.string()).optional(),
|
|
120
|
+
model: z.nullable(z.string()).optional(),
|
|
103
121
|
});
|
|
104
122
|
/** @internal */
|
|
105
123
|
export type CreateConversationMetadata$Outbound = {
|
|
106
124
|
generatingTitle?: boolean | undefined;
|
|
107
|
-
entityId
|
|
125
|
+
entityId?: string | null | undefined;
|
|
126
|
+
model?: string | null | undefined;
|
|
108
127
|
};
|
|
109
128
|
|
|
110
129
|
/** @internal */
|
|
@@ -114,7 +133,8 @@ export const CreateConversationMetadata$outboundSchema: z.ZodType<
|
|
|
114
133
|
CreateConversationMetadata
|
|
115
134
|
> = z.object({
|
|
116
135
|
generatingTitle: z.boolean().optional(),
|
|
117
|
-
entityId: z.string(),
|
|
136
|
+
entityId: z.nullable(z.string()).optional(),
|
|
137
|
+
model: z.nullable(z.string()).optional(),
|
|
118
138
|
});
|
|
119
139
|
|
|
120
140
|
export function createConversationMetadataToJSON(
|
|
@@ -141,12 +161,14 @@ export const CreateConversationRequestBody$inboundSchema: z.ZodType<
|
|
|
141
161
|
unknown
|
|
142
162
|
> = z.object({
|
|
143
163
|
displayName: z.string().default("Untitled"),
|
|
144
|
-
|
|
164
|
+
projectId: z.string(),
|
|
165
|
+
metadata: z.lazy(() => CreateConversationMetadata$inboundSchema).optional(),
|
|
145
166
|
});
|
|
146
167
|
/** @internal */
|
|
147
168
|
export type CreateConversationRequestBody$Outbound = {
|
|
148
169
|
displayName: string;
|
|
149
|
-
|
|
170
|
+
projectId: string;
|
|
171
|
+
metadata?: CreateConversationMetadata$Outbound | undefined;
|
|
150
172
|
};
|
|
151
173
|
|
|
152
174
|
/** @internal */
|
|
@@ -156,7 +178,8 @@ export const CreateConversationRequestBody$outboundSchema: z.ZodType<
|
|
|
156
178
|
CreateConversationRequestBody
|
|
157
179
|
> = z.object({
|
|
158
180
|
displayName: z.string().default("Untitled"),
|
|
159
|
-
|
|
181
|
+
projectId: z.string(),
|
|
182
|
+
metadata: z.lazy(() => CreateConversationMetadata$outboundSchema).optional(),
|
|
160
183
|
});
|
|
161
184
|
|
|
162
185
|
export function createConversationRequestBodyToJSON(
|
|
@@ -194,12 +217,14 @@ export const CreateConversationConversationsMetadata$inboundSchema: z.ZodType<
|
|
|
194
217
|
unknown
|
|
195
218
|
> = z.object({
|
|
196
219
|
generatingTitle: z.boolean().optional(),
|
|
197
|
-
entityId: z.string().optional(),
|
|
220
|
+
entityId: z.nullable(z.string()).optional(),
|
|
221
|
+
model: z.nullable(z.string()).optional(),
|
|
198
222
|
});
|
|
199
223
|
/** @internal */
|
|
200
224
|
export type CreateConversationConversationsMetadata$Outbound = {
|
|
201
225
|
generatingTitle?: boolean | undefined;
|
|
202
|
-
entityId?: string | undefined;
|
|
226
|
+
entityId?: string | null | undefined;
|
|
227
|
+
model?: string | null | undefined;
|
|
203
228
|
};
|
|
204
229
|
|
|
205
230
|
/** @internal */
|
|
@@ -209,7 +234,8 @@ export const CreateConversationConversationsMetadata$outboundSchema: z.ZodType<
|
|
|
209
234
|
CreateConversationConversationsMetadata
|
|
210
235
|
> = z.object({
|
|
211
236
|
generatingTitle: z.boolean().optional(),
|
|
212
|
-
entityId: z.string().optional(),
|
|
237
|
+
entityId: z.nullable(z.string()).optional(),
|
|
238
|
+
model: z.nullable(z.string()).optional(),
|
|
213
239
|
});
|
|
214
240
|
|
|
215
241
|
export function createConversationConversationsMetadataToJSON(
|
|
@@ -244,8 +270,7 @@ export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
|
244
270
|
z.ZodTypeDef,
|
|
245
271
|
unknown
|
|
246
272
|
> = z.object({
|
|
247
|
-
_id: z.string().default("
|
|
248
|
-
entityId: z.string(),
|
|
273
|
+
_id: z.string().default("conv_01keveeqc66by3b4g2n3cs72hj"),
|
|
249
274
|
kind: CreateConversationKind$inboundSchema,
|
|
250
275
|
displayName: z.string(),
|
|
251
276
|
createdAt: z.number(),
|
|
@@ -262,7 +287,6 @@ export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
|
262
287
|
/** @internal */
|
|
263
288
|
export type CreateConversationResponseBody$Outbound = {
|
|
264
289
|
_id: string;
|
|
265
|
-
entityId: string;
|
|
266
290
|
kind: string;
|
|
267
291
|
displayName: string;
|
|
268
292
|
createdAt: number;
|
|
@@ -278,8 +302,7 @@ export const CreateConversationResponseBody$outboundSchema: z.ZodType<
|
|
|
278
302
|
z.ZodTypeDef,
|
|
279
303
|
CreateConversationResponseBody
|
|
280
304
|
> = z.object({
|
|
281
|
-
id: z.string().default("
|
|
282
|
-
entityId: z.string(),
|
|
305
|
+
id: z.string().default("conv_01keveeqc66by3b4g2n3cs72hj"),
|
|
283
306
|
kind: CreateConversationKind$outboundSchema,
|
|
284
307
|
displayName: z.string(),
|
|
285
308
|
createdAt: z.number(),
|