@orq-ai/node 4.4.0-rc.9 → 4.5.0-rc.0
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 +34 -54
- package/examples/package-lock.json +1 -1
- package/funcs/{conversationsRetrieve.d.ts → annotationsCreate.d.ts} +4 -8
- package/funcs/annotationsCreate.d.ts.map +1 -0
- package/funcs/{conversationsCreate.js → annotationsCreate.js} +21 -13
- package/funcs/annotationsCreate.js.map +1 -0
- package/funcs/{conversationsDelete.d.ts → annotationsDelete.d.ts} +4 -7
- package/funcs/annotationsDelete.d.ts.map +1 -0
- package/funcs/{conversationsCreateConversationResponse.js → annotationsDelete.js} +15 -25
- package/funcs/annotationsDelete.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/agentstartedstreamingevent.d.ts +9 -0
- package/models/components/agentstartedstreamingevent.d.ts.map +1 -1
- package/models/components/agentstartedstreamingevent.js +11 -1
- package/models/components/agentstartedstreamingevent.js.map +1 -1
- 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/createagentrequest.d.ts +1 -1
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +1 -1
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createannotation.d.ts +71 -0
- package/models/operations/createannotation.d.ts.map +1 -0
- package/models/operations/createannotation.js +91 -0
- package/models/operations/createannotation.js.map +1 -0
- 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.d.ts +587 -186
- package/models/operations/createeval.d.ts.map +1 -1
- package/models/operations/createeval.js +673 -240
- package/models/operations/createeval.js.map +1 -1
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createresponse.d.ts +3 -3
- package/models/operations/createresponse.d.ts.map +1 -1
- package/models/operations/createresponse.js +5 -5
- package/models/operations/createresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deleteannotation.d.ts +32 -0
- package/models/operations/deleteannotation.d.ts.map +1 -0
- package/models/operations/{deleteconversation.js → deleteannotation.js} +21 -8
- package/models/operations/deleteannotation.js.map +1 -0
- 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.d.ts +265 -104
- package/models/operations/getevals.d.ts.map +1 -1
- package/models/operations/getevals.js +389 -166
- package/models/operations/getevals.js.map +1 -1
- package/models/operations/index.d.ts +2 -7
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -7
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeeval.d.ts +35 -0
- package/models/operations/invokeeval.d.ts.map +1 -1
- package/models/operations/invokeeval.js +54 -1
- package/models/operations/invokeeval.js.map +1 -1
- package/models/operations/listagents.d.ts +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +1 -1
- package/models/operations/listagents.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/retrieveagentrequest.d.ts +1 -1
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +1 -1
- package/models/operations/retrieveagentrequest.js.map +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/updateagent.d.ts +1 -1
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +1 -1
- package/models/operations/updateagent.js.map +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.d.ts +349 -81
- package/models/operations/updateeval.d.ts.map +1 -1
- package/models/operations/updateeval.js +459 -143
- package/models/operations/updateeval.js.map +1 -1
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/sdk/annotations.d.ts +13 -0
- package/sdk/annotations.d.ts.map +1 -0
- package/sdk/annotations.js +26 -0
- package/sdk/annotations.js.map +1 -0
- package/sdk/sdk.d.ts +3 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -8
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/{conversationsCreate.ts → annotationsCreate.ts} +28 -18
- package/src/funcs/{conversationsDelete.ts → annotationsDelete.ts} +23 -32
- package/src/lib/config.ts +3 -3
- package/src/models/components/agentstartedstreamingevent.ts +14 -0
- 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/createagentrequest.ts +2 -2
- package/src/models/operations/createannotation.ts +162 -0
- 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 +1699 -657
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createresponse.ts +7 -7
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deleteannotation.ts +79 -0
- 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 +1017 -505
- package/src/models/operations/index.ts +2 -7
- package/src/models/operations/invokeeval.ts +124 -0
- package/src/models/operations/listagents.ts +2 -2
- 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/retrieveagentrequest.ts +2 -2
- 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/updateagent.ts +2 -2
- 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 +1092 -329
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/annotations.ts +39 -0
- package/src/sdk/sdk.ts +6 -12
- package/funcs/conversationsCreate.d.ts +0 -17
- package/funcs/conversationsCreate.d.ts.map +0 -1
- 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.map +0 -1
- 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.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.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/conversationsCreateConversationResponse.ts +0 -186
- 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,127 +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
|
-
import { ErrorPart, ErrorPart$inboundSchema } from "./errorpart.js";
|
|
12
|
-
import { FilePart, FilePart$inboundSchema } from "./filepart.js";
|
|
13
|
-
import { TextPart, TextPart$inboundSchema } from "./textpart.js";
|
|
14
|
-
import {
|
|
15
|
-
ToolResultPart,
|
|
16
|
-
ToolResultPart$inboundSchema,
|
|
17
|
-
} from "./toolresultpart.js";
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
21
|
-
*/
|
|
22
|
-
export type PublicMessagePart =
|
|
23
|
-
| TextPart
|
|
24
|
-
| FilePart
|
|
25
|
-
| ToolResultPart
|
|
26
|
-
| ErrorPart;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Message author role. `user` for end-user messages, `assistant` for AI-generated responses.
|
|
30
|
-
*/
|
|
31
|
-
export const MessageResponseRole = {
|
|
32
|
-
User: "user",
|
|
33
|
-
Assistant: "assistant",
|
|
34
|
-
} as const;
|
|
35
|
-
/**
|
|
36
|
-
* Message author role. `user` for end-user messages, `assistant` for AI-generated responses.
|
|
37
|
-
*/
|
|
38
|
-
export type MessageResponseRole = ClosedEnum<typeof MessageResponseRole>;
|
|
39
|
-
|
|
40
|
-
export type MessageResponse = {
|
|
41
|
-
/**
|
|
42
|
-
* Unique message identifier with `msg_` prefix.
|
|
43
|
-
*/
|
|
44
|
-
id: string;
|
|
45
|
-
/**
|
|
46
|
-
* Conversation identifier this message belongs to.
|
|
47
|
-
*/
|
|
48
|
-
conversationId: string;
|
|
49
|
-
/**
|
|
50
|
-
* Unix timestamp in milliseconds when the message was created.
|
|
51
|
-
*/
|
|
52
|
-
createdAt: number;
|
|
53
|
-
/**
|
|
54
|
-
* Identifier of the message author. User ID for user messages, "system" for assistant messages.
|
|
55
|
-
*/
|
|
56
|
-
createdById: string;
|
|
57
|
-
/**
|
|
58
|
-
* Content parts composing the message. Supports multiple content types (text, images, files, tool results).
|
|
59
|
-
*/
|
|
60
|
-
parts: Array<TextPart | FilePart | ToolResultPart | ErrorPart>;
|
|
61
|
-
/**
|
|
62
|
-
* Message author role. `user` for end-user messages, `assistant` for AI-generated responses.
|
|
63
|
-
*/
|
|
64
|
-
role: MessageResponseRole;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export const PublicMessagePart$inboundSchema: z.ZodType<
|
|
69
|
-
PublicMessagePart,
|
|
70
|
-
z.ZodTypeDef,
|
|
71
|
-
unknown
|
|
72
|
-
> = z.union([
|
|
73
|
-
TextPart$inboundSchema,
|
|
74
|
-
FilePart$inboundSchema,
|
|
75
|
-
ToolResultPart$inboundSchema,
|
|
76
|
-
ErrorPart$inboundSchema,
|
|
77
|
-
]);
|
|
78
|
-
|
|
79
|
-
export function publicMessagePartFromJSON(
|
|
80
|
-
jsonString: string,
|
|
81
|
-
): SafeParseResult<PublicMessagePart, SDKValidationError> {
|
|
82
|
-
return safeParse(
|
|
83
|
-
jsonString,
|
|
84
|
-
(x) => PublicMessagePart$inboundSchema.parse(JSON.parse(x)),
|
|
85
|
-
`Failed to parse 'PublicMessagePart' from JSON`,
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/** @internal */
|
|
90
|
-
export const MessageResponseRole$inboundSchema: z.ZodNativeEnum<
|
|
91
|
-
typeof MessageResponseRole
|
|
92
|
-
> = z.nativeEnum(MessageResponseRole);
|
|
93
|
-
|
|
94
|
-
/** @internal */
|
|
95
|
-
export const MessageResponse$inboundSchema: z.ZodType<
|
|
96
|
-
MessageResponse,
|
|
97
|
-
z.ZodTypeDef,
|
|
98
|
-
unknown
|
|
99
|
-
> = z.object({
|
|
100
|
-
_id: z.string(),
|
|
101
|
-
conversationId: z.string(),
|
|
102
|
-
createdAt: z.number(),
|
|
103
|
-
createdById: z.string(),
|
|
104
|
-
parts: z.array(
|
|
105
|
-
z.union([
|
|
106
|
-
TextPart$inboundSchema,
|
|
107
|
-
FilePart$inboundSchema,
|
|
108
|
-
ToolResultPart$inboundSchema,
|
|
109
|
-
ErrorPart$inboundSchema,
|
|
110
|
-
]),
|
|
111
|
-
),
|
|
112
|
-
role: MessageResponseRole$inboundSchema,
|
|
113
|
-
}).transform((v) => {
|
|
114
|
-
return remap$(v, {
|
|
115
|
-
"_id": "id",
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
export function messageResponseFromJSON(
|
|
120
|
-
jsonString: string,
|
|
121
|
-
): SafeParseResult<MessageResponse, SDKValidationError> {
|
|
122
|
-
return safeParse(
|
|
123
|
-
jsonString,
|
|
124
|
-
(x) => MessageResponse$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
-
`Failed to parse 'MessageResponse' from JSON`,
|
|
126
|
-
);
|
|
127
|
-
}
|
|
@@ -1,136 +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 { ClosedEnum } from "../../types/enums.js";
|
|
7
|
-
import {
|
|
8
|
-
ErrorPart,
|
|
9
|
-
ErrorPart$Outbound,
|
|
10
|
-
ErrorPart$outboundSchema,
|
|
11
|
-
} from "./errorpart.js";
|
|
12
|
-
import {
|
|
13
|
-
FilePart,
|
|
14
|
-
FilePart$Outbound,
|
|
15
|
-
FilePart$outboundSchema,
|
|
16
|
-
} from "./filepart.js";
|
|
17
|
-
import {
|
|
18
|
-
TextPart,
|
|
19
|
-
TextPart$Outbound,
|
|
20
|
-
TextPart$outboundSchema,
|
|
21
|
-
} from "./textpart.js";
|
|
22
|
-
import {
|
|
23
|
-
ToolResultPart,
|
|
24
|
-
ToolResultPart$Outbound,
|
|
25
|
-
ToolResultPart$outboundSchema,
|
|
26
|
-
} from "./toolresultpart.js";
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Role indicating this message is from a user
|
|
30
|
-
*/
|
|
31
|
-
export const UserMessageRequestRole = {
|
|
32
|
-
User: "user",
|
|
33
|
-
} as const;
|
|
34
|
-
/**
|
|
35
|
-
* Role indicating this message is from a user
|
|
36
|
-
*/
|
|
37
|
-
export type UserMessageRequestRole = ClosedEnum<typeof UserMessageRequestRole>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
41
|
-
*/
|
|
42
|
-
export type UserMessageRequestPublicMessagePart =
|
|
43
|
-
| TextPart
|
|
44
|
-
| FilePart
|
|
45
|
-
| ToolResultPart
|
|
46
|
-
| ErrorPart;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The user message to send to the model
|
|
50
|
-
*/
|
|
51
|
-
export type UserMessageRequest = {
|
|
52
|
-
/**
|
|
53
|
-
* Optional message ID in ULID format
|
|
54
|
-
*/
|
|
55
|
-
messageId?: string | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Role indicating this message is from a user
|
|
58
|
-
*/
|
|
59
|
-
role: UserMessageRequestRole;
|
|
60
|
-
/**
|
|
61
|
-
* Array of message parts. User messages can contain text, file, tool_result, and error parts.
|
|
62
|
-
*/
|
|
63
|
-
parts: Array<TextPart | FilePart | ToolResultPart | ErrorPart>;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/** @internal */
|
|
67
|
-
export const UserMessageRequestRole$outboundSchema: z.ZodNativeEnum<
|
|
68
|
-
typeof UserMessageRequestRole
|
|
69
|
-
> = z.nativeEnum(UserMessageRequestRole);
|
|
70
|
-
|
|
71
|
-
/** @internal */
|
|
72
|
-
export type UserMessageRequestPublicMessagePart$Outbound =
|
|
73
|
-
| TextPart$Outbound
|
|
74
|
-
| FilePart$Outbound
|
|
75
|
-
| ToolResultPart$Outbound
|
|
76
|
-
| ErrorPart$Outbound;
|
|
77
|
-
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const UserMessageRequestPublicMessagePart$outboundSchema: z.ZodType<
|
|
80
|
-
UserMessageRequestPublicMessagePart$Outbound,
|
|
81
|
-
z.ZodTypeDef,
|
|
82
|
-
UserMessageRequestPublicMessagePart
|
|
83
|
-
> = z.union([
|
|
84
|
-
TextPart$outboundSchema,
|
|
85
|
-
FilePart$outboundSchema,
|
|
86
|
-
ToolResultPart$outboundSchema,
|
|
87
|
-
ErrorPart$outboundSchema,
|
|
88
|
-
]);
|
|
89
|
-
|
|
90
|
-
export function userMessageRequestPublicMessagePartToJSON(
|
|
91
|
-
userMessageRequestPublicMessagePart: UserMessageRequestPublicMessagePart,
|
|
92
|
-
): string {
|
|
93
|
-
return JSON.stringify(
|
|
94
|
-
UserMessageRequestPublicMessagePart$outboundSchema.parse(
|
|
95
|
-
userMessageRequestPublicMessagePart,
|
|
96
|
-
),
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export type UserMessageRequest$Outbound = {
|
|
102
|
-
messageId?: string | undefined;
|
|
103
|
-
role: string;
|
|
104
|
-
parts: Array<
|
|
105
|
-
| TextPart$Outbound
|
|
106
|
-
| FilePart$Outbound
|
|
107
|
-
| ToolResultPart$Outbound
|
|
108
|
-
| ErrorPart$Outbound
|
|
109
|
-
>;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export const UserMessageRequest$outboundSchema: z.ZodType<
|
|
114
|
-
UserMessageRequest$Outbound,
|
|
115
|
-
z.ZodTypeDef,
|
|
116
|
-
UserMessageRequest
|
|
117
|
-
> = z.object({
|
|
118
|
-
messageId: z.string().optional(),
|
|
119
|
-
role: UserMessageRequestRole$outboundSchema,
|
|
120
|
-
parts: z.array(
|
|
121
|
-
z.union([
|
|
122
|
-
TextPart$outboundSchema,
|
|
123
|
-
FilePart$outboundSchema,
|
|
124
|
-
ToolResultPart$outboundSchema,
|
|
125
|
-
ErrorPart$outboundSchema,
|
|
126
|
-
]),
|
|
127
|
-
),
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
export function userMessageRequestToJSON(
|
|
131
|
-
userMessageRequest: UserMessageRequest,
|
|
132
|
-
): string {
|
|
133
|
-
return JSON.stringify(
|
|
134
|
-
UserMessageRequest$outboundSchema.parse(userMessageRequest),
|
|
135
|
-
);
|
|
136
|
-
}
|
|
@@ -1,51 +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 { OrqError } from "./orqerror.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or has already been deleted.
|
|
10
|
-
*/
|
|
11
|
-
export type DeleteConversationResponseBodyData = {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or has already been deleted.
|
|
17
|
-
*/
|
|
18
|
-
export class DeleteConversationResponseBody extends OrqError {
|
|
19
|
-
/** The original data that was passed to this error instance. */
|
|
20
|
-
data$: DeleteConversationResponseBodyData;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
err: DeleteConversationResponseBodyData,
|
|
24
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
-
) {
|
|
26
|
-
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
-
super(message, httpMeta);
|
|
28
|
-
this.data$ = err;
|
|
29
|
-
|
|
30
|
-
this.name = "DeleteConversationResponseBody";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const DeleteConversationResponseBody$inboundSchema: z.ZodType<
|
|
36
|
-
DeleteConversationResponseBody,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
unknown
|
|
39
|
-
> = z.object({
|
|
40
|
-
message: z.string(),
|
|
41
|
-
request$: z.instanceof(Request),
|
|
42
|
-
response$: z.instanceof(Response),
|
|
43
|
-
body$: z.string(),
|
|
44
|
-
})
|
|
45
|
-
.transform((v) => {
|
|
46
|
-
return new DeleteConversationResponseBody(v, {
|
|
47
|
-
request: v.request$,
|
|
48
|
-
response: v.response$,
|
|
49
|
-
body: v.body$,
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,99 +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 { OrqError } from "./orqerror.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Conversation not found.
|
|
10
|
-
*/
|
|
11
|
-
export type GenerateConversationNameConversationsResponseBodyData = {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Conversation not found.
|
|
17
|
-
*/
|
|
18
|
-
export class GenerateConversationNameConversationsResponseBody
|
|
19
|
-
extends OrqError
|
|
20
|
-
{
|
|
21
|
-
/** The original data that was passed to this error instance. */
|
|
22
|
-
data$: GenerateConversationNameConversationsResponseBodyData;
|
|
23
|
-
|
|
24
|
-
constructor(
|
|
25
|
-
err: GenerateConversationNameConversationsResponseBodyData,
|
|
26
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
27
|
-
) {
|
|
28
|
-
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
29
|
-
super(message, httpMeta);
|
|
30
|
-
this.data$ = err;
|
|
31
|
-
|
|
32
|
-
this.name = "GenerateConversationNameConversationsResponseBody";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Conversation already has a display name. This endpoint only generates names for conversations with empty display names.
|
|
38
|
-
*/
|
|
39
|
-
export type GenerateConversationNameResponseBodyData = {
|
|
40
|
-
message: string;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Conversation already has a display name. This endpoint only generates names for conversations with empty display names.
|
|
45
|
-
*/
|
|
46
|
-
export class GenerateConversationNameResponseBody extends OrqError {
|
|
47
|
-
/** The original data that was passed to this error instance. */
|
|
48
|
-
data$: GenerateConversationNameResponseBodyData;
|
|
49
|
-
|
|
50
|
-
constructor(
|
|
51
|
-
err: GenerateConversationNameResponseBodyData,
|
|
52
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
53
|
-
) {
|
|
54
|
-
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
55
|
-
super(message, httpMeta);
|
|
56
|
-
this.data$ = err;
|
|
57
|
-
|
|
58
|
-
this.name = "GenerateConversationNameResponseBody";
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** @internal */
|
|
63
|
-
export const GenerateConversationNameConversationsResponseBody$inboundSchema:
|
|
64
|
-
z.ZodType<
|
|
65
|
-
GenerateConversationNameConversationsResponseBody,
|
|
66
|
-
z.ZodTypeDef,
|
|
67
|
-
unknown
|
|
68
|
-
> = z.object({
|
|
69
|
-
message: z.string(),
|
|
70
|
-
request$: z.instanceof(Request),
|
|
71
|
-
response$: z.instanceof(Response),
|
|
72
|
-
body$: z.string(),
|
|
73
|
-
})
|
|
74
|
-
.transform((v) => {
|
|
75
|
-
return new GenerateConversationNameConversationsResponseBody(v, {
|
|
76
|
-
request: v.request$,
|
|
77
|
-
response: v.response$,
|
|
78
|
-
body: v.body$,
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
export const GenerateConversationNameResponseBody$inboundSchema: z.ZodType<
|
|
84
|
-
GenerateConversationNameResponseBody,
|
|
85
|
-
z.ZodTypeDef,
|
|
86
|
-
unknown
|
|
87
|
-
> = z.object({
|
|
88
|
-
message: z.string(),
|
|
89
|
-
request$: z.instanceof(Request),
|
|
90
|
-
response$: z.instanceof(Response),
|
|
91
|
-
body$: z.string(),
|
|
92
|
-
})
|
|
93
|
-
.transform((v) => {
|
|
94
|
-
return new GenerateConversationNameResponseBody(v, {
|
|
95
|
-
request: v.request$,
|
|
96
|
-
response: v.response$,
|
|
97
|
-
body: v.body$,
|
|
98
|
-
});
|
|
99
|
-
});
|
|
@@ -1,51 +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 { OrqError } from "./orqerror.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or you do not have permission to access it.
|
|
10
|
-
*/
|
|
11
|
-
export type RetrieveConversationResponseBodyData = {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or you do not have permission to access it.
|
|
17
|
-
*/
|
|
18
|
-
export class RetrieveConversationResponseBody extends OrqError {
|
|
19
|
-
/** The original data that was passed to this error instance. */
|
|
20
|
-
data$: RetrieveConversationResponseBodyData;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
err: RetrieveConversationResponseBodyData,
|
|
24
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
-
) {
|
|
26
|
-
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
-
super(message, httpMeta);
|
|
28
|
-
this.data$ = err;
|
|
29
|
-
|
|
30
|
-
this.name = "RetrieveConversationResponseBody";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const RetrieveConversationResponseBody$inboundSchema: z.ZodType<
|
|
36
|
-
RetrieveConversationResponseBody,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
unknown
|
|
39
|
-
> = z.object({
|
|
40
|
-
message: z.string(),
|
|
41
|
-
request$: z.instanceof(Request),
|
|
42
|
-
response$: z.instanceof(Response),
|
|
43
|
-
body$: z.string(),
|
|
44
|
-
})
|
|
45
|
-
.transform((v) => {
|
|
46
|
-
return new RetrieveConversationResponseBody(v, {
|
|
47
|
-
request: v.request$,
|
|
48
|
-
response: v.response$,
|
|
49
|
-
body: v.body$,
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,51 +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 { OrqError } from "./orqerror.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or you do not have permission to modify it.
|
|
10
|
-
*/
|
|
11
|
-
export type UpdateConversationResponseBodyData = {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Conversation not found. The specified conversation ID does not exist in the workspace or you do not have permission to modify it.
|
|
17
|
-
*/
|
|
18
|
-
export class UpdateConversationResponseBody extends OrqError {
|
|
19
|
-
/** The original data that was passed to this error instance. */
|
|
20
|
-
data$: UpdateConversationResponseBodyData;
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
err: UpdateConversationResponseBodyData,
|
|
24
|
-
httpMeta: { response: Response; request: Request; body: string },
|
|
25
|
-
) {
|
|
26
|
-
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
27
|
-
super(message, httpMeta);
|
|
28
|
-
this.data$ = err;
|
|
29
|
-
|
|
30
|
-
this.name = "UpdateConversationResponseBody";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const UpdateConversationResponseBody$inboundSchema: z.ZodType<
|
|
36
|
-
UpdateConversationResponseBody,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
unknown
|
|
39
|
-
> = z.object({
|
|
40
|
-
message: z.string(),
|
|
41
|
-
request$: z.instanceof(Request),
|
|
42
|
-
response$: z.instanceof(Response),
|
|
43
|
-
body$: z.string(),
|
|
44
|
-
})
|
|
45
|
-
.transform((v) => {
|
|
46
|
-
return new UpdateConversationResponseBody(v, {
|
|
47
|
-
request: v.request$,
|
|
48
|
-
response: v.response$,
|
|
49
|
-
body: v.body$,
|
|
50
|
-
});
|
|
51
|
-
});
|