@orq-ai/node 4.4.0-rc.26 → 4.4.0-rc.28
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 +3 -3
- package/lib/config.js +3 -3
- 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 +3 -3
- 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,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
|
-
});
|
|
@@ -1,227 +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
|
-
* Optional metadata to attach to the conversation.
|
|
14
|
-
*/
|
|
15
|
-
export type CreateConversationMetadata = {
|
|
16
|
-
/**
|
|
17
|
-
* Set to `true` to indicate the title is being auto-generated.
|
|
18
|
-
*/
|
|
19
|
-
generatingTitle?: boolean | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Parent entity identifier to associate the conversation with. Omit or set to `null` for standalone conversations.
|
|
22
|
-
*/
|
|
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;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export type CreateConversationRequestBody = {
|
|
31
|
-
/**
|
|
32
|
-
* Human-readable name for the conversation. Defaults to "Untitled" if omitted.
|
|
33
|
-
*/
|
|
34
|
-
displayName?: string | undefined;
|
|
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;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Resource type discriminator.
|
|
47
|
-
*/
|
|
48
|
-
export const CreateConversationKind = {
|
|
49
|
-
Conversation: "conversation",
|
|
50
|
-
} as const;
|
|
51
|
-
/**
|
|
52
|
-
* Resource type discriminator.
|
|
53
|
-
*/
|
|
54
|
-
export type CreateConversationKind = ClosedEnum<typeof CreateConversationKind>;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Additional conversation metadata.
|
|
58
|
-
*/
|
|
59
|
-
export type CreateConversationConversationsMetadata = {
|
|
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 created. Returns the complete conversation object including the generated ID and timestamps.
|
|
76
|
-
*/
|
|
77
|
-
export type CreateConversationResponseBody = {
|
|
78
|
-
/**
|
|
79
|
-
* Unique conversation identifier with `conv_` prefix.
|
|
80
|
-
*/
|
|
81
|
-
id: string;
|
|
82
|
-
/**
|
|
83
|
-
* Resource type discriminator.
|
|
84
|
-
*/
|
|
85
|
-
kind: CreateConversationKind;
|
|
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?: CreateConversationConversationsMetadata | undefined;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
export type CreateConversationMetadata$Outbound = {
|
|
114
|
-
generatingTitle?: boolean | undefined;
|
|
115
|
-
entityId?: string | null | undefined;
|
|
116
|
-
model?: string | null | undefined;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/** @internal */
|
|
120
|
-
export const CreateConversationMetadata$outboundSchema: z.ZodType<
|
|
121
|
-
CreateConversationMetadata$Outbound,
|
|
122
|
-
z.ZodTypeDef,
|
|
123
|
-
CreateConversationMetadata
|
|
124
|
-
> = z.object({
|
|
125
|
-
generatingTitle: z.boolean().optional(),
|
|
126
|
-
entityId: z.nullable(z.string()).optional(),
|
|
127
|
-
model: z.nullable(z.string()).optional(),
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
export function createConversationMetadataToJSON(
|
|
131
|
-
createConversationMetadata: CreateConversationMetadata,
|
|
132
|
-
): string {
|
|
133
|
-
return JSON.stringify(
|
|
134
|
-
CreateConversationMetadata$outboundSchema.parse(createConversationMetadata),
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/** @internal */
|
|
139
|
-
export type CreateConversationRequestBody$Outbound = {
|
|
140
|
-
displayName: string;
|
|
141
|
-
projectId: string;
|
|
142
|
-
metadata?: CreateConversationMetadata$Outbound | undefined;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/** @internal */
|
|
146
|
-
export const CreateConversationRequestBody$outboundSchema: z.ZodType<
|
|
147
|
-
CreateConversationRequestBody$Outbound,
|
|
148
|
-
z.ZodTypeDef,
|
|
149
|
-
CreateConversationRequestBody
|
|
150
|
-
> = z.object({
|
|
151
|
-
displayName: z.string().default("Untitled"),
|
|
152
|
-
projectId: z.string(),
|
|
153
|
-
metadata: z.lazy(() => CreateConversationMetadata$outboundSchema).optional(),
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
export function createConversationRequestBodyToJSON(
|
|
157
|
-
createConversationRequestBody: CreateConversationRequestBody,
|
|
158
|
-
): string {
|
|
159
|
-
return JSON.stringify(
|
|
160
|
-
CreateConversationRequestBody$outboundSchema.parse(
|
|
161
|
-
createConversationRequestBody,
|
|
162
|
-
),
|
|
163
|
-
);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/** @internal */
|
|
167
|
-
export const CreateConversationKind$inboundSchema: z.ZodNativeEnum<
|
|
168
|
-
typeof CreateConversationKind
|
|
169
|
-
> = z.nativeEnum(CreateConversationKind);
|
|
170
|
-
|
|
171
|
-
/** @internal */
|
|
172
|
-
export const CreateConversationConversationsMetadata$inboundSchema: z.ZodType<
|
|
173
|
-
CreateConversationConversationsMetadata,
|
|
174
|
-
z.ZodTypeDef,
|
|
175
|
-
unknown
|
|
176
|
-
> = z.object({
|
|
177
|
-
generatingTitle: z.boolean().optional(),
|
|
178
|
-
entityId: z.nullable(z.string()).optional(),
|
|
179
|
-
model: z.nullable(z.string()).optional(),
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
export function createConversationConversationsMetadataFromJSON(
|
|
183
|
-
jsonString: string,
|
|
184
|
-
): SafeParseResult<
|
|
185
|
-
CreateConversationConversationsMetadata,
|
|
186
|
-
SDKValidationError
|
|
187
|
-
> {
|
|
188
|
-
return safeParse(
|
|
189
|
-
jsonString,
|
|
190
|
-
(x) =>
|
|
191
|
-
CreateConversationConversationsMetadata$inboundSchema.parse(
|
|
192
|
-
JSON.parse(x),
|
|
193
|
-
),
|
|
194
|
-
`Failed to parse 'CreateConversationConversationsMetadata' from JSON`,
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/** @internal */
|
|
199
|
-
export const CreateConversationResponseBody$inboundSchema: z.ZodType<
|
|
200
|
-
CreateConversationResponseBody,
|
|
201
|
-
z.ZodTypeDef,
|
|
202
|
-
unknown
|
|
203
|
-
> = z.object({
|
|
204
|
-
_id: z.string().default("conv_01kj0c151096jc59a83g8n8bqq"),
|
|
205
|
-
kind: CreateConversationKind$inboundSchema,
|
|
206
|
-
displayName: z.string(),
|
|
207
|
-
createdAt: z.number(),
|
|
208
|
-
updatedAt: z.number(),
|
|
209
|
-
createdById: z.string().optional(),
|
|
210
|
-
updatedById: z.string().optional(),
|
|
211
|
-
metadata: z.lazy(() => CreateConversationConversationsMetadata$inboundSchema)
|
|
212
|
-
.optional(),
|
|
213
|
-
}).transform((v) => {
|
|
214
|
-
return remap$(v, {
|
|
215
|
-
"_id": "id",
|
|
216
|
-
});
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
export function createConversationResponseBodyFromJSON(
|
|
220
|
-
jsonString: string,
|
|
221
|
-
): SafeParseResult<CreateConversationResponseBody, SDKValidationError> {
|
|
222
|
-
return safeParse(
|
|
223
|
-
jsonString,
|
|
224
|
-
(x) => CreateConversationResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
225
|
-
`Failed to parse 'CreateConversationResponseBody' from JSON`,
|
|
226
|
-
);
|
|
227
|
-
}
|