@orq-ai/node 4.1.12 → 4.1.14
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 +220 -220
- package/bin/mcp-server.js.map +39 -39
- package/examples/package-lock.json +2 -2
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +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 +2 -2
- package/packages/orq-rc/examples/feedbackCreate.example.ts +32 -0
- package/packages/orq-rc/examples/package-lock.json +2 -2
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +6 -6
- package/packages/orq-rc/package.json +2 -2
- package/packages/orq-rc/src/funcs/contactsCreate.ts +2 -0
- package/packages/orq-rc/src/funcs/contactsDelete.ts +2 -0
- package/packages/orq-rc/src/funcs/contactsList.ts +2 -0
- package/packages/orq-rc/src/funcs/contactsRetrieve.ts +2 -0
- package/packages/orq-rc/src/funcs/contactsUpdate.ts +2 -0
- package/packages/orq-rc/src/funcs/identitiesCreate.ts +165 -0
- package/packages/orq-rc/src/funcs/identitiesDelete.ts +176 -0
- package/packages/orq-rc/src/funcs/identitiesList.ts +170 -0
- package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/identitiesUpdate.ts +176 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +11 -1
- package/packages/orq-rc/src/mcp-server/tools/identitiesCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/identitiesDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/identitiesList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/identitiesRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/identitiesUpdate.ts +37 -0
- package/packages/orq-rc/src/models/components/conversationresponse.ts +2 -2
- package/packages/orq-rc/src/models/components/conversationwithmessagesresponse.ts +2 -2
- package/packages/orq-rc/src/models/components/partdoneevent.ts +2 -2
- package/packages/orq-rc/src/models/components/reasoningpart.ts +2 -2
- package/packages/orq-rc/src/models/errors/deleteidentity.ts +78 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/retrieveidentity.ts +78 -0
- package/packages/orq-rc/src/models/errors/updateidentity.ts +70 -0
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +132 -15
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createconversation.ts +2 -2
- package/packages/orq-rc/src/models/operations/createconversationresponse.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- 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/createidentity.ts +237 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +33 -29
- package/packages/orq-rc/src/models/operations/deleteidentity.ts +54 -0
- 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 +2 -2
- 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/index.ts +5 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +24 -20
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- 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/listidentities.ts +432 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- 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/retrieveidentity.ts +180 -0
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +280 -36
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +323 -46
- package/packages/orq-rc/src/models/operations/updateagent.ts +138 -15
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateconversation.ts +2 -2
- 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/updateidentity.ts +281 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/contacts.ts +10 -0
- package/packages/orq-rc/src/sdk/identities.ts +99 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/lib/config.ts +3 -3
- 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/examples/contactsCreate.example.ts +0 -42
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Update an identity
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Updates specific fields of an existing identity. Only the fields provided in the request body will be updated.
|
|
33
|
+
*/
|
|
34
|
+
export function identitiesUpdate(
|
|
35
|
+
client: OrqCore,
|
|
36
|
+
request: operations.UpdateIdentityRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.UpdateIdentityResponseBody,
|
|
41
|
+
| errors.UpdateIdentityResponseBody
|
|
42
|
+
| OrqError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OrqCore,
|
|
61
|
+
request: operations.UpdateIdentityRequest,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.UpdateIdentityResponseBody,
|
|
67
|
+
| errors.UpdateIdentityResponseBody
|
|
68
|
+
| OrqError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) => operations.UpdateIdentityRequest$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload.RequestBody, { explode: true });
|
|
90
|
+
|
|
91
|
+
const pathParams = {
|
|
92
|
+
id: encodeSimple("id", payload.id, {
|
|
93
|
+
explode: false,
|
|
94
|
+
charEncoding: "percent",
|
|
95
|
+
}),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const path = pathToFunc("/v2/identities/{id}")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
"Content-Type": "application/json",
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
106
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
107
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
108
|
+
|
|
109
|
+
const context = {
|
|
110
|
+
options: client._options,
|
|
111
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
112
|
+
operationID: "UpdateIdentity",
|
|
113
|
+
oAuth2Scopes: null,
|
|
114
|
+
|
|
115
|
+
resolvedSecurity: requestSecurity,
|
|
116
|
+
|
|
117
|
+
securitySource: client._options.apiKey,
|
|
118
|
+
retryConfig: options?.retries
|
|
119
|
+
|| client._options.retryConfig
|
|
120
|
+
|| { strategy: "none" },
|
|
121
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const requestRes = client._createRequest(context, {
|
|
125
|
+
security: requestSecurity,
|
|
126
|
+
method: "PATCH",
|
|
127
|
+
baseURL: options?.serverURL,
|
|
128
|
+
path: path,
|
|
129
|
+
headers: headers,
|
|
130
|
+
body: body,
|
|
131
|
+
userAgent: client._options.userAgent,
|
|
132
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
133
|
+
}, options);
|
|
134
|
+
if (!requestRes.ok) {
|
|
135
|
+
return [requestRes, { status: "invalid" }];
|
|
136
|
+
}
|
|
137
|
+
const req = requestRes.value;
|
|
138
|
+
|
|
139
|
+
const doResult = await client._do(req, {
|
|
140
|
+
context,
|
|
141
|
+
errorCodes: ["404", "4XX", "5XX"],
|
|
142
|
+
retryConfig: context.retryConfig,
|
|
143
|
+
retryCodes: context.retryCodes,
|
|
144
|
+
});
|
|
145
|
+
if (!doResult.ok) {
|
|
146
|
+
return [doResult, { status: "request-error", request: req }];
|
|
147
|
+
}
|
|
148
|
+
const response = doResult.value;
|
|
149
|
+
|
|
150
|
+
const responseFields = {
|
|
151
|
+
HttpMeta: { Response: response, Request: req },
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
operations.UpdateIdentityResponseBody,
|
|
156
|
+
| errors.UpdateIdentityResponseBody
|
|
157
|
+
| OrqError
|
|
158
|
+
| ResponseValidationError
|
|
159
|
+
| ConnectionError
|
|
160
|
+
| RequestAbortedError
|
|
161
|
+
| RequestTimeoutError
|
|
162
|
+
| InvalidRequestError
|
|
163
|
+
| UnexpectedClientError
|
|
164
|
+
| SDKValidationError
|
|
165
|
+
>(
|
|
166
|
+
M.json(200, operations.UpdateIdentityResponseBody$inboundSchema),
|
|
167
|
+
M.jsonErr(404, errors.UpdateIdentityResponseBody$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
169
|
+
M.fail("5XX"),
|
|
170
|
+
)(response, req, { extraFields: responseFields });
|
|
171
|
+
if (!result.ok) {
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "2.0",
|
|
71
|
-
sdkVersion: "4.2.0-rc.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.2.0-rc.
|
|
71
|
+
sdkVersion: "4.2.0-rc.41",
|
|
72
|
+
genVersion: "2.796.4",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.2.0-rc.41 2.796.4 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
|
@@ -63,6 +63,11 @@ import { tool$filesCreate } from "./tools/filesCreate.js";
|
|
|
63
63
|
import { tool$filesDelete } from "./tools/filesDelete.js";
|
|
64
64
|
import { tool$filesGet } from "./tools/filesGet.js";
|
|
65
65
|
import { tool$filesList } from "./tools/filesList.js";
|
|
66
|
+
import { tool$identitiesCreate } from "./tools/identitiesCreate.js";
|
|
67
|
+
import { tool$identitiesDelete } from "./tools/identitiesDelete.js";
|
|
68
|
+
import { tool$identitiesList } from "./tools/identitiesList.js";
|
|
69
|
+
import { tool$identitiesRetrieve } from "./tools/identitiesRetrieve.js";
|
|
70
|
+
import { tool$identitiesUpdate } from "./tools/identitiesUpdate.js";
|
|
66
71
|
import { tool$knowledgeCreate } from "./tools/knowledgeCreate.js";
|
|
67
72
|
import { tool$knowledgeCreateChunks } from "./tools/knowledgeCreateChunks.js";
|
|
68
73
|
import { tool$knowledgeCreateDatasource } from "./tools/knowledgeCreateDatasource.js";
|
|
@@ -128,7 +133,7 @@ export function createMCPServer(deps: {
|
|
|
128
133
|
}) {
|
|
129
134
|
const server = new McpServer({
|
|
130
135
|
name: "Orq",
|
|
131
|
-
version: "4.2.0-rc.
|
|
136
|
+
version: "4.2.0-rc.41",
|
|
132
137
|
});
|
|
133
138
|
|
|
134
139
|
const client = new OrqCore({
|
|
@@ -172,6 +177,11 @@ export function createMCPServer(deps: {
|
|
|
172
177
|
tool(tool$evalsDelete);
|
|
173
178
|
tool(tool$evalsInvoke);
|
|
174
179
|
tool(tool$evaluatorsGetV2EvaluatorsIdVersions);
|
|
180
|
+
tool(tool$identitiesList);
|
|
181
|
+
tool(tool$identitiesCreate);
|
|
182
|
+
tool(tool$identitiesRetrieve);
|
|
183
|
+
tool(tool$identitiesUpdate);
|
|
184
|
+
tool(tool$identitiesDelete);
|
|
175
185
|
tool(tool$deploymentsInvoke);
|
|
176
186
|
tool(tool$deploymentsList);
|
|
177
187
|
tool(tool$deploymentsGetConfig);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { identitiesCreate } from "../../funcs/identitiesCreate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateIdentityRequestBody$inboundSchema.optional(),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$identitiesCreate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "identities-create",
|
|
15
|
+
description: `Create an identity
|
|
16
|
+
|
|
17
|
+
Creates a new identity with a unique external_id. If an identity with the same external_id already exists, the operation will fail. Use this endpoint to add users from your system to orq.ai for tracking their usage and engagement.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await identitiesCreate(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { identitiesDelete } from "../../funcs/identitiesDelete.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DeleteIdentityRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$identitiesDelete: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "identities-delete",
|
|
15
|
+
description: `Delete an identity
|
|
16
|
+
|
|
17
|
+
Permanently deletes an identity from your workspace and cleans up associated budget configurations. This action cannot be undone.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await identitiesDelete(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return formatResult(void 0, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { identitiesList } from "../../funcs/identitiesList.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListIdentitiesRequest$inboundSchema.optional(),
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$identitiesList: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "identities-list",
|
|
15
|
+
description: `List identities
|
|
16
|
+
|
|
17
|
+
Retrieves a paginated list of identities in your workspace. Use pagination parameters to navigate through large identity lists efficiently.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await identitiesList(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { identitiesRetrieve } from "../../funcs/identitiesRetrieve.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.RetrieveIdentityRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$identitiesRetrieve: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "identities-retrieve",
|
|
15
|
+
description: `Retrieve an identity
|
|
16
|
+
|
|
17
|
+
Retrieves detailed information about a specific identity using their identity ID or external ID from your system.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await identitiesRetrieve(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { identitiesUpdate } from "../../funcs/identitiesUpdate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.UpdateIdentityRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$identitiesUpdate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "identities-update",
|
|
15
|
+
description: `Update an identity
|
|
16
|
+
|
|
17
|
+
Updates specific fields of an existing identity. Only the fields provided in the request body will be updated.`,
|
|
18
|
+
args,
|
|
19
|
+
tool: async (client, args, ctx) => {
|
|
20
|
+
const [result, apiCall] = await identitiesUpdate(
|
|
21
|
+
client,
|
|
22
|
+
args.request,
|
|
23
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
24
|
+
).$inspect();
|
|
25
|
+
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
return {
|
|
28
|
+
content: [{ type: "text", text: result.error.message }],
|
|
29
|
+
isError: true,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const value = result.value;
|
|
34
|
+
|
|
35
|
+
return formatResult(value, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -131,7 +131,7 @@ export const ConversationResponse$inboundSchema: z.ZodType<
|
|
|
131
131
|
z.ZodTypeDef,
|
|
132
132
|
unknown
|
|
133
133
|
> = z.object({
|
|
134
|
-
_id: z.string().default("
|
|
134
|
+
_id: z.string().default("conv_01kfb68tc0nrng0vbgrdyaf9sn"),
|
|
135
135
|
kind: ConversationResponseKind$inboundSchema,
|
|
136
136
|
displayName: z.string(),
|
|
137
137
|
createdAt: z.number(),
|
|
@@ -162,7 +162,7 @@ export const ConversationResponse$outboundSchema: z.ZodType<
|
|
|
162
162
|
z.ZodTypeDef,
|
|
163
163
|
ConversationResponse
|
|
164
164
|
> = z.object({
|
|
165
|
-
id: z.string().default("
|
|
165
|
+
id: z.string().default("conv_01kfb68tc0nrng0vbgrdyaf9sn"),
|
|
166
166
|
kind: ConversationResponseKind$outboundSchema,
|
|
167
167
|
displayName: z.string(),
|
|
168
168
|
createdAt: z.number(),
|
|
@@ -155,7 +155,7 @@ export const ConversationWithMessagesResponse$inboundSchema: z.ZodType<
|
|
|
155
155
|
z.ZodTypeDef,
|
|
156
156
|
unknown
|
|
157
157
|
> = z.object({
|
|
158
|
-
_id: z.string().default("
|
|
158
|
+
_id: z.string().default("conv_01kfb68tc551be8p1vsgt6f57d"),
|
|
159
159
|
kind: ConversationWithMessagesResponseKind$inboundSchema,
|
|
160
160
|
displayName: z.string(),
|
|
161
161
|
createdAt: z.number(),
|
|
@@ -189,7 +189,7 @@ export const ConversationWithMessagesResponse$outboundSchema: z.ZodType<
|
|
|
189
189
|
z.ZodTypeDef,
|
|
190
190
|
ConversationWithMessagesResponse
|
|
191
191
|
> = z.object({
|
|
192
|
-
id: z.string().default("
|
|
192
|
+
id: z.string().default("conv_01kfb68tc551be8p1vsgt6f57d"),
|
|
193
193
|
kind: ConversationWithMessagesResponseKind$outboundSchema,
|
|
194
194
|
displayName: z.string(),
|
|
195
195
|
createdAt: z.number(),
|
|
@@ -79,7 +79,7 @@ export const PartReasoningPart$inboundSchema: z.ZodType<
|
|
|
79
79
|
z.ZodTypeDef,
|
|
80
80
|
unknown
|
|
81
81
|
> = z.object({
|
|
82
|
-
_id: z.string().default("
|
|
82
|
+
_id: z.string().default("reasoning_01kfb68t3n83jkz0t3qp8ccph9"),
|
|
83
83
|
metadata: z.record(z.any()).optional(),
|
|
84
84
|
kind: PartKind$inboundSchema,
|
|
85
85
|
reasoning: z.string(),
|
|
@@ -104,7 +104,7 @@ export const PartReasoningPart$outboundSchema: z.ZodType<
|
|
|
104
104
|
z.ZodTypeDef,
|
|
105
105
|
PartReasoningPart
|
|
106
106
|
> = z.object({
|
|
107
|
-
id: z.string().default("
|
|
107
|
+
id: z.string().default("reasoning_01kfb68t3n83jkz0t3qp8ccph9"),
|
|
108
108
|
metadata: z.record(z.any()).optional(),
|
|
109
109
|
kind: PartKind$outboundSchema,
|
|
110
110
|
reasoning: z.string(),
|
|
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
unknown
|
|
42
42
|
> = z.object({
|
|
43
|
-
_id: z.string().default("
|
|
43
|
+
_id: z.string().default("reasoning_01kfb68t3bm75jf5e6hgwng67g"),
|
|
44
44
|
metadata: z.record(z.any()).optional(),
|
|
45
45
|
kind: z.literal("reasoning"),
|
|
46
46
|
reasoning: z.string(),
|
|
@@ -65,7 +65,7 @@ export const ReasoningPart$outboundSchema: z.ZodType<
|
|
|
65
65
|
z.ZodTypeDef,
|
|
66
66
|
ReasoningPart
|
|
67
67
|
> = z.object({
|
|
68
|
-
id: z.string().default("
|
|
68
|
+
id: z.string().default("reasoning_01kfb68t3bm75jf5e6hgwng67g"),
|
|
69
69
|
metadata: z.record(z.any()).optional(),
|
|
70
70
|
kind: z.literal("reasoning"),
|
|
71
71
|
reasoning: z.string(),
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
* Identity not found
|
|
10
|
+
*/
|
|
11
|
+
export type DeleteIdentityResponseBodyData = {
|
|
12
|
+
/**
|
|
13
|
+
* Error message
|
|
14
|
+
*/
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Identity not found
|
|
20
|
+
*/
|
|
21
|
+
export class DeleteIdentityResponseBody extends OrqError {
|
|
22
|
+
/**
|
|
23
|
+
* Error message
|
|
24
|
+
*/
|
|
25
|
+
error: string;
|
|
26
|
+
|
|
27
|
+
/** The original data that was passed to this error instance. */
|
|
28
|
+
data$: DeleteIdentityResponseBodyData;
|
|
29
|
+
|
|
30
|
+
constructor(
|
|
31
|
+
err: DeleteIdentityResponseBodyData,
|
|
32
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
33
|
+
) {
|
|
34
|
+
const message = "message" in err && typeof err.message === "string"
|
|
35
|
+
? err.message
|
|
36
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
37
|
+
super(message, httpMeta);
|
|
38
|
+
this.data$ = err;
|
|
39
|
+
this.error = err.error;
|
|
40
|
+
|
|
41
|
+
this.name = "DeleteIdentityResponseBody";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const DeleteIdentityResponseBody$inboundSchema: z.ZodType<
|
|
47
|
+
DeleteIdentityResponseBody,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
error: z.string(),
|
|
52
|
+
request$: z.instanceof(Request),
|
|
53
|
+
response$: z.instanceof(Response),
|
|
54
|
+
body$: z.string(),
|
|
55
|
+
})
|
|
56
|
+
.transform((v) => {
|
|
57
|
+
return new DeleteIdentityResponseBody(v, {
|
|
58
|
+
request: v.request$,
|
|
59
|
+
response: v.response$,
|
|
60
|
+
body: v.body$,
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type DeleteIdentityResponseBody$Outbound = {
|
|
66
|
+
error: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const DeleteIdentityResponseBody$outboundSchema: z.ZodType<
|
|
71
|
+
DeleteIdentityResponseBody$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
DeleteIdentityResponseBody
|
|
74
|
+
> = z.instanceof(DeleteIdentityResponseBody)
|
|
75
|
+
.transform(v => v.data$)
|
|
76
|
+
.pipe(z.object({
|
|
77
|
+
error: z.string(),
|
|
78
|
+
}));
|
|
@@ -8,6 +8,7 @@ export * from "./deleteagent.js";
|
|
|
8
8
|
export * from "./deletecontact.js";
|
|
9
9
|
export * from "./deleteconversation.js";
|
|
10
10
|
export * from "./deleteeval.js";
|
|
11
|
+
export * from "./deleteidentity.js";
|
|
11
12
|
export * from "./generateconversationname.js";
|
|
12
13
|
export * from "./getevals.js";
|
|
13
14
|
export * from "./getpromptversion.js";
|
|
@@ -22,6 +23,7 @@ export * from "./responsevalidationerror.js";
|
|
|
22
23
|
export * from "./retrieveagentrequest.js";
|
|
23
24
|
export * from "./retrievecontact.js";
|
|
24
25
|
export * from "./retrieveconversation.js";
|
|
26
|
+
export * from "./retrieveidentity.js";
|
|
25
27
|
export * from "./sdkvalidationerror.js";
|
|
26
28
|
export * from "./streamagent.js";
|
|
27
29
|
export * from "./streamrunagent.js";
|
|
@@ -29,5 +31,6 @@ export * from "./updateagent.js";
|
|
|
29
31
|
export * from "./updatecontact.js";
|
|
30
32
|
export * from "./updateconversation.js";
|
|
31
33
|
export * from "./updateeval.js";
|
|
34
|
+
export * from "./updateidentity.js";
|
|
32
35
|
export * from "./updateprompt.js";
|
|
33
36
|
export * from "./updatetool.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
* Identity not found
|
|
10
|
+
*/
|
|
11
|
+
export type RetrieveIdentityResponseBodyData = {
|
|
12
|
+
/**
|
|
13
|
+
* Error message
|
|
14
|
+
*/
|
|
15
|
+
error: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Identity not found
|
|
20
|
+
*/
|
|
21
|
+
export class RetrieveIdentityResponseBody extends OrqError {
|
|
22
|
+
/**
|
|
23
|
+
* Error message
|
|
24
|
+
*/
|
|
25
|
+
error: string;
|
|
26
|
+
|
|
27
|
+
/** The original data that was passed to this error instance. */
|
|
28
|
+
data$: RetrieveIdentityResponseBodyData;
|
|
29
|
+
|
|
30
|
+
constructor(
|
|
31
|
+
err: RetrieveIdentityResponseBodyData,
|
|
32
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
33
|
+
) {
|
|
34
|
+
const message = "message" in err && typeof err.message === "string"
|
|
35
|
+
? err.message
|
|
36
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
37
|
+
super(message, httpMeta);
|
|
38
|
+
this.data$ = err;
|
|
39
|
+
this.error = err.error;
|
|
40
|
+
|
|
41
|
+
this.name = "RetrieveIdentityResponseBody";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const RetrieveIdentityResponseBody$inboundSchema: z.ZodType<
|
|
47
|
+
RetrieveIdentityResponseBody,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
error: z.string(),
|
|
52
|
+
request$: z.instanceof(Request),
|
|
53
|
+
response$: z.instanceof(Response),
|
|
54
|
+
body$: z.string(),
|
|
55
|
+
})
|
|
56
|
+
.transform((v) => {
|
|
57
|
+
return new RetrieveIdentityResponseBody(v, {
|
|
58
|
+
request: v.request$,
|
|
59
|
+
response: v.response$,
|
|
60
|
+
body: v.body$,
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type RetrieveIdentityResponseBody$Outbound = {
|
|
66
|
+
error: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const RetrieveIdentityResponseBody$outboundSchema: z.ZodType<
|
|
71
|
+
RetrieveIdentityResponseBody$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
RetrieveIdentityResponseBody
|
|
74
|
+
> = z.instanceof(RetrieveIdentityResponseBody)
|
|
75
|
+
.transform(v => v.data$)
|
|
76
|
+
.pipe(z.object({
|
|
77
|
+
error: z.string(),
|
|
78
|
+
}));
|