@orq-ai/node 4.9.13 → 4.9.17
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/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/reasoningpart.js +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/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- 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/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- 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/packages/orq-rc/src/funcs/identitiesCreate.ts +10 -15
- package/packages/orq-rc/src/funcs/identitiesDelete.ts +7 -16
- package/packages/orq-rc/src/funcs/identitiesList.ts +6 -5
- package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +6 -18
- package/packages/orq-rc/src/funcs/identitiesUpdate.ts +9 -15
- package/packages/orq-rc/src/funcs/{remoteconfigsRetrieve.ts → modelsList.ts} +14 -33
- package/packages/orq-rc/src/funcs/projectsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/projectsDelete.ts +3 -0
- package/packages/orq-rc/src/funcs/projectsList.ts +1 -1
- package/packages/orq-rc/src/funcs/{contactsCreate.ts → reportingQuery.ts} +13 -13
- package/packages/orq-rc/src/funcs/skillsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/skillsDelete.ts +3 -0
- package/packages/orq-rc/src/funcs/skillsGet.ts +1 -1
- package/packages/orq-rc/src/funcs/skillsList.ts +1 -1
- package/packages/orq-rc/src/funcs/skillsUpdate.ts +1 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/models/components/createidentityrequest.ts +76 -0
- package/packages/orq-rc/src/models/components/createidentityresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/createprojectrequest.ts +6 -0
- package/packages/orq-rc/src/models/components/createprojectresponse.ts +3 -0
- package/packages/orq-rc/src/models/components/createskillrequest.ts +18 -0
- package/packages/orq-rc/src/models/components/createskillresponse.ts +3 -0
- package/packages/orq-rc/src/models/components/datapoint.ts +60 -0
- package/packages/orq-rc/src/models/components/deleteidentityresponse.ts +27 -0
- package/packages/orq-rc/src/models/components/file.ts +0 -3
- package/packages/orq-rc/src/models/components/filter.ts +137 -0
- package/packages/orq-rc/src/models/components/getprojectresponse.ts +3 -0
- package/packages/orq-rc/src/models/components/getskillresponse.ts +3 -0
- package/packages/orq-rc/src/models/components/identity.ts +83 -0
- package/packages/orq-rc/src/models/components/identitymetrics.ts +45 -0
- package/packages/orq-rc/src/models/components/index.ts +16 -0
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +17 -10
- package/packages/orq-rc/src/models/components/listidentitiesresponse.ts +41 -0
- package/packages/orq-rc/src/models/components/listprojectsresponse.ts +12 -0
- package/packages/orq-rc/src/models/components/listskillsresponse.ts +12 -0
- package/packages/orq-rc/src/models/components/modelref.ts +6 -0
- package/packages/orq-rc/src/models/components/project.ts +42 -3
- package/packages/orq-rc/src/models/components/publicmodelentry.ts +70 -0
- package/packages/orq-rc/src/models/components/queryreportrequest.ts +237 -0
- package/packages/orq-rc/src/models/components/queryreportresponse.ts +99 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/responsemeta.ts +103 -0
- package/packages/orq-rc/src/models/components/retrieveidentityresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/skill.ts +37 -3
- package/packages/orq-rc/src/models/components/totals.ts +34 -0
- package/packages/orq-rc/src/models/components/updateidentityrequest.ts +75 -0
- package/packages/orq-rc/src/models/components/updateidentityresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/updateprojectrequest.ts +12 -0
- package/packages/orq-rc/src/models/components/updateprojectresponse.ts +3 -0
- package/packages/orq-rc/src/models/components/updateskillrequest.ts +21 -0
- package/packages/orq-rc/src/models/components/updateskillresponse.ts +3 -0
- package/packages/orq-rc/src/models/errors/index.ts +0 -3
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +3 -3
- package/packages/orq-rc/src/models/operations/createannotation.ts +7 -11
- package/packages/orq-rc/src/models/operations/createdataset.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createeval.ts +45 -31
- package/packages/orq-rc/src/models/operations/createknowledge.ts +9 -9
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +3 -3
- package/packages/orq-rc/src/models/operations/createprompt.ts +3 -3
- package/packages/orq-rc/src/models/operations/createtool.ts +36 -36
- package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -3
- package/packages/orq-rc/src/models/operations/getalltools.ts +21 -21
- package/packages/orq-rc/src/models/operations/getevals.ts +22 -16
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +6 -6
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +1 -3
- package/packages/orq-rc/src/models/operations/invokeeval.ts +83 -80
- package/packages/orq-rc/src/models/operations/listagents.ts +3 -3
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/listidentities.ts +9 -230
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +6 -6
- package/packages/orq-rc/src/models/operations/listmodels.ts +60 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2agentsa2a.ts +14 -17
- package/packages/orq-rc/src/models/operations/postv2feedback.ts +34 -27
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +14 -17
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/projectdelete.ts +3 -0
- package/packages/orq-rc/src/models/operations/projectget.ts +3 -0
- package/packages/orq-rc/src/models/operations/projectlist.ts +15 -0
- package/packages/orq-rc/src/models/operations/projectupdate.ts +3 -0
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3 -3
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrieveidentity.ts +3 -138
- package/packages/orq-rc/src/models/operations/retrievetool.ts +21 -21
- package/packages/orq-rc/src/models/operations/runagent.ts +4 -4
- package/packages/orq-rc/src/models/operations/skilldelete.ts +3 -0
- package/packages/orq-rc/src/models/operations/skilllist.ts +12 -0
- package/packages/orq-rc/src/models/operations/skillupdate.ts +3 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +4 -4
- package/packages/orq-rc/src/models/operations/updateagent.ts +6 -6
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatedataset.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +30 -23
- package/packages/orq-rc/src/models/operations/updateidentity.ts +5 -154
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +12 -12
- package/packages/orq-rc/src/models/operations/updateprompt.ts +3 -3
- package/packages/orq-rc/src/models/operations/updatetool.ts +37 -37
- package/packages/orq-rc/src/sdk/feedback.ts +8 -8
- package/packages/orq-rc/src/sdk/identities.ts +18 -17
- package/packages/orq-rc/src/sdk/models.ts +25 -0
- package/packages/orq-rc/src/sdk/projects.ts +5 -2
- package/packages/orq-rc/src/sdk/reporting.ts +27 -0
- package/packages/orq-rc/src/sdk/sdk.ts +22 -22
- package/packages/orq-rc/src/sdk/skills.ts +7 -4
- package/src/lib/config.ts +3 -3
- package/src/models/components/reasoningpart.ts +1 -1
- 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/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.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/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.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/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/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
- package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -118
- package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
- package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
|
@@ -11,6 +11,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
11
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
13
|
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
16
17
|
InvalidRequestError,
|
|
@@ -18,7 +19,6 @@ import {
|
|
|
18
19
|
RequestTimeoutError,
|
|
19
20
|
UnexpectedClientError,
|
|
20
21
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
-
import * as errors from "../models/errors/index.js";
|
|
22
22
|
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
23
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
24
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -38,8 +38,7 @@ export function identitiesUpdate(
|
|
|
38
38
|
options?: RequestOptions,
|
|
39
39
|
): APIPromise<
|
|
40
40
|
Result<
|
|
41
|
-
|
|
42
|
-
| errors.UpdateIdentityResponseBody
|
|
41
|
+
components.UpdateIdentityResponse,
|
|
43
42
|
| OrqError
|
|
44
43
|
| ResponseValidationError
|
|
45
44
|
| ConnectionError
|
|
@@ -64,8 +63,7 @@ async function $do(
|
|
|
64
63
|
): Promise<
|
|
65
64
|
[
|
|
66
65
|
Result<
|
|
67
|
-
|
|
68
|
-
| errors.UpdateIdentityResponseBody
|
|
66
|
+
components.UpdateIdentityResponse,
|
|
69
67
|
| OrqError
|
|
70
68
|
| ResponseValidationError
|
|
71
69
|
| ConnectionError
|
|
@@ -87,7 +85,9 @@ async function $do(
|
|
|
87
85
|
return [parsed, { status: "invalid" }];
|
|
88
86
|
}
|
|
89
87
|
const payload = parsed.value;
|
|
90
|
-
const body = encodeJSON("body", payload.
|
|
88
|
+
const body = encodeJSON("body", payload.UpdateIdentityRequest, {
|
|
89
|
+
explode: true,
|
|
90
|
+
});
|
|
91
91
|
|
|
92
92
|
const pathParams = {
|
|
93
93
|
id: encodeSimple("id", payload.id, {
|
|
@@ -148,13 +148,8 @@ async function $do(
|
|
|
148
148
|
}
|
|
149
149
|
const response = doResult.value;
|
|
150
150
|
|
|
151
|
-
const responseFields = {
|
|
152
|
-
HttpMeta: { Response: response, Request: req },
|
|
153
|
-
};
|
|
154
|
-
|
|
155
151
|
const [result] = await M.match<
|
|
156
|
-
|
|
157
|
-
| errors.UpdateIdentityResponseBody
|
|
152
|
+
components.UpdateIdentityResponse,
|
|
158
153
|
| OrqError
|
|
159
154
|
| ResponseValidationError
|
|
160
155
|
| ConnectionError
|
|
@@ -164,11 +159,10 @@ async function $do(
|
|
|
164
159
|
| UnexpectedClientError
|
|
165
160
|
| SDKValidationError
|
|
166
161
|
>(
|
|
167
|
-
M.json(200,
|
|
168
|
-
M.jsonErr(404, errors.UpdateIdentityResponseBody$inboundSchema),
|
|
162
|
+
M.json(200, components.UpdateIdentityResponse$inboundSchema),
|
|
169
163
|
M.fail("4XX"),
|
|
170
164
|
M.fail("5XX"),
|
|
171
|
-
)(response, req
|
|
165
|
+
)(response, req);
|
|
172
166
|
if (!result.ok) {
|
|
173
167
|
return [result, { status: "complete", request: req, response }];
|
|
174
168
|
}
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
7
6
|
import { matchStatusCode } from "../lib/http.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
9
8
|
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
11
|
import { pathToFunc } from "../lib/url.js";
|
|
@@ -26,15 +24,17 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
24
|
import { Result } from "../types/fp.js";
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
|
-
*
|
|
27
|
+
* List models
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Lists all models available through the AI Router. Returns each model in OpenAI-compatible shape with its provider, ID, and creation timestamp.
|
|
30
31
|
*/
|
|
31
|
-
export function
|
|
32
|
+
export function modelsList(
|
|
32
33
|
client: OrqCore,
|
|
33
|
-
request?: operations.RemoteConfigsGetConfigRequestBody | undefined,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): APIPromise<
|
|
36
36
|
Result<
|
|
37
|
-
operations.
|
|
37
|
+
operations.ListModelsResponseBody,
|
|
38
38
|
| OrqError
|
|
39
39
|
| ResponseValidationError
|
|
40
40
|
| ConnectionError
|
|
@@ -47,19 +47,17 @@ export function remoteconfigsRetrieve(
|
|
|
47
47
|
> {
|
|
48
48
|
return new APIPromise($do(
|
|
49
49
|
client,
|
|
50
|
-
request,
|
|
51
50
|
options,
|
|
52
51
|
));
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
async function $do(
|
|
56
55
|
client: OrqCore,
|
|
57
|
-
request?: operations.RemoteConfigsGetConfigRequestBody | undefined,
|
|
58
56
|
options?: RequestOptions,
|
|
59
57
|
): Promise<
|
|
60
58
|
[
|
|
61
59
|
Result<
|
|
62
|
-
operations.
|
|
60
|
+
operations.ListModelsResponseBody,
|
|
63
61
|
| OrqError
|
|
64
62
|
| ResponseValidationError
|
|
65
63
|
| ConnectionError
|
|
@@ -72,25 +70,9 @@ async function $do(
|
|
|
72
70
|
APICall,
|
|
73
71
|
]
|
|
74
72
|
> {
|
|
75
|
-
const
|
|
76
|
-
request,
|
|
77
|
-
(value) =>
|
|
78
|
-
operations.RemoteConfigsGetConfigRequestBody$outboundSchema.optional()
|
|
79
|
-
.parse(value),
|
|
80
|
-
"Input validation failed",
|
|
81
|
-
);
|
|
82
|
-
if (!parsed.ok) {
|
|
83
|
-
return [parsed, { status: "invalid" }];
|
|
84
|
-
}
|
|
85
|
-
const payload = parsed.value;
|
|
86
|
-
const body = payload === undefined
|
|
87
|
-
? null
|
|
88
|
-
: encodeJSON("body", payload, { explode: true });
|
|
89
|
-
|
|
90
|
-
const path = pathToFunc("/v2/remoteconfigs")();
|
|
73
|
+
const path = pathToFunc("/v3/router/models")();
|
|
91
74
|
|
|
92
75
|
const headers = new Headers(compactMap({
|
|
93
|
-
"Content-Type": "application/json",
|
|
94
76
|
Accept: "application/json",
|
|
95
77
|
}));
|
|
96
78
|
|
|
@@ -101,7 +83,7 @@ async function $do(
|
|
|
101
83
|
const context = {
|
|
102
84
|
options: client._options,
|
|
103
85
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
-
operationID: "
|
|
86
|
+
operationID: "list-models",
|
|
105
87
|
oAuth2Scopes: null,
|
|
106
88
|
|
|
107
89
|
resolvedSecurity: requestSecurity,
|
|
@@ -115,11 +97,10 @@ async function $do(
|
|
|
115
97
|
|
|
116
98
|
const requestRes = client._createRequest(context, {
|
|
117
99
|
security: requestSecurity,
|
|
118
|
-
method: "
|
|
100
|
+
method: "GET",
|
|
119
101
|
baseURL: options?.serverURL,
|
|
120
102
|
path: path,
|
|
121
103
|
headers: headers,
|
|
122
|
-
body: body,
|
|
123
104
|
userAgent: client._options.userAgent,
|
|
124
105
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
125
106
|
}, options);
|
|
@@ -141,7 +122,7 @@ async function $do(
|
|
|
141
122
|
const response = doResult.value;
|
|
142
123
|
|
|
143
124
|
const [result] = await M.match<
|
|
144
|
-
operations.
|
|
125
|
+
operations.ListModelsResponseBody,
|
|
145
126
|
| OrqError
|
|
146
127
|
| ResponseValidationError
|
|
147
128
|
| ConnectionError
|
|
@@ -151,9 +132,9 @@ async function $do(
|
|
|
151
132
|
| UnexpectedClientError
|
|
152
133
|
| SDKValidationError
|
|
153
134
|
>(
|
|
154
|
-
M.json(200, operations.
|
|
155
|
-
M.fail(
|
|
156
|
-
M.fail(
|
|
135
|
+
M.json(200, operations.ListModelsResponseBody$inboundSchema),
|
|
136
|
+
M.fail("4XX"),
|
|
137
|
+
M.fail("5XX"),
|
|
157
138
|
)(response, req);
|
|
158
139
|
if (!result.ok) {
|
|
159
140
|
return [result, { status: "complete", request: req, response }];
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Create a new project
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Creates a
|
|
32
|
+
* Creates a project in the current workspace. Projects are workspace-level containers for resources such as skills, deployments, datasets, rules, and related team access.
|
|
33
33
|
*/
|
|
34
34
|
export function projectsCreate(
|
|
35
35
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* List all projects
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Returns
|
|
33
|
+
* Returns projects visible to the current workspace, ordered by creation time with the newest project first. Use `starting_after` or `ending_before` to page through large collections.
|
|
34
34
|
*/
|
|
35
35
|
export function projectsList(
|
|
36
36
|
client: OrqCore,
|
|
@@ -11,6 +11,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
11
11
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
13
|
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
14
15
|
import {
|
|
15
16
|
ConnectionError,
|
|
16
17
|
InvalidRequestError,
|
|
@@ -21,23 +22,22 @@ import {
|
|
|
21
22
|
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
23
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
24
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
-
import * as operations from "../models/operations/index.js";
|
|
25
25
|
import { APICall, APIPromise } from "../types/async.js";
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Query reporting metrics
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* Returns time-series analytics for AI usage, cost, latency, evaluator results, and guardrail outcomes. Select a metric and time range, break results down by supported dimensions, apply filters, and optionally include totals for the full range.
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function reportingQuery(
|
|
35
35
|
client: OrqCore,
|
|
36
|
-
request:
|
|
36
|
+
request: components.QueryReportRequest,
|
|
37
37
|
options?: RequestOptions,
|
|
38
38
|
): APIPromise<
|
|
39
39
|
Result<
|
|
40
|
-
|
|
40
|
+
components.QueryReportResponse,
|
|
41
41
|
| OrqError
|
|
42
42
|
| ResponseValidationError
|
|
43
43
|
| ConnectionError
|
|
@@ -57,12 +57,12 @@ export function contactsCreate(
|
|
|
57
57
|
|
|
58
58
|
async function $do(
|
|
59
59
|
client: OrqCore,
|
|
60
|
-
request:
|
|
60
|
+
request: components.QueryReportRequest,
|
|
61
61
|
options?: RequestOptions,
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
|
|
65
|
+
components.QueryReportResponse,
|
|
66
66
|
| OrqError
|
|
67
67
|
| ResponseValidationError
|
|
68
68
|
| ConnectionError
|
|
@@ -77,7 +77,7 @@ async function $do(
|
|
|
77
77
|
> {
|
|
78
78
|
const parsed = safeParse(
|
|
79
79
|
request,
|
|
80
|
-
(value) =>
|
|
80
|
+
(value) => components.QueryReportRequest$outboundSchema.parse(value),
|
|
81
81
|
"Input validation failed",
|
|
82
82
|
);
|
|
83
83
|
if (!parsed.ok) {
|
|
@@ -86,7 +86,7 @@ async function $do(
|
|
|
86
86
|
const payload = parsed.value;
|
|
87
87
|
const body = encodeJSON("body", payload, { explode: true });
|
|
88
88
|
|
|
89
|
-
const path = pathToFunc("/v2/
|
|
89
|
+
const path = pathToFunc("/v2/reporting")();
|
|
90
90
|
|
|
91
91
|
const headers = new Headers(compactMap({
|
|
92
92
|
"Content-Type": "application/json",
|
|
@@ -100,7 +100,7 @@ async function $do(
|
|
|
100
100
|
const context = {
|
|
101
101
|
options: client._options,
|
|
102
102
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
103
|
-
operationID: "
|
|
103
|
+
operationID: "ReportingQuery",
|
|
104
104
|
oAuth2Scopes: null,
|
|
105
105
|
|
|
106
106
|
resolvedSecurity: requestSecurity,
|
|
@@ -140,7 +140,7 @@ async function $do(
|
|
|
140
140
|
const response = doResult.value;
|
|
141
141
|
|
|
142
142
|
const [result] = await M.match<
|
|
143
|
-
|
|
143
|
+
components.QueryReportResponse,
|
|
144
144
|
| OrqError
|
|
145
145
|
| ResponseValidationError
|
|
146
146
|
| ConnectionError
|
|
@@ -150,7 +150,7 @@ async function $do(
|
|
|
150
150
|
| UnexpectedClientError
|
|
151
151
|
| SDKValidationError
|
|
152
152
|
>(
|
|
153
|
-
M.json(200,
|
|
153
|
+
M.json(200, components.QueryReportResponse$inboundSchema),
|
|
154
154
|
M.fail("4XX"),
|
|
155
155
|
M.fail("5XX"),
|
|
156
156
|
)(response, req);
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Create a new skill
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* Creates a reusable skill in the workspace. Skills store instructions, metadata, and an optional project location so teams can standardize repeatable AI workflows.
|
|
33
33
|
*/
|
|
34
34
|
export function skillsCreate(
|
|
35
35
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Retrieve a skill
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Retrieves an existing skill by
|
|
33
|
+
* Retrieves an existing skill by skill ID. Display names are also accepted for compatibility because they are unique within a workspace.
|
|
34
34
|
*/
|
|
35
35
|
export function skillsGet(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* List all skills
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Returns
|
|
33
|
+
* Returns the skills visible to the current workspace, ordered by creation time with the newest skill first. Use `starting_after` or `ending_before` to page through large collections.
|
|
34
34
|
*/
|
|
35
35
|
export function skillsList(
|
|
36
36
|
client: OrqCore,
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Update a skill
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Updates
|
|
33
|
+
* Updates mutable skill fields. Omitted optional fields keep their current values. Repeated fields such as `tags` replace the existing collection when provided.
|
|
34
34
|
*/
|
|
35
35
|
export function skillsUpdate(
|
|
36
36
|
client: OrqCore,
|
|
@@ -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.10.0-rc.
|
|
72
|
-
genVersion: "2.884.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 4.10.0-rc.
|
|
71
|
+
sdkVersion: "4.10.0-rc.23",
|
|
72
|
+
genVersion: "2.884.11",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 4.10.0-rc.23 2.884.11 2.0 @orq-ai/node",
|
|
74
74
|
} as const;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type CreateIdentityRequestMetadata = {};
|
|
9
|
+
|
|
10
|
+
export type CreateIdentityRequest = {
|
|
11
|
+
externalId?: string | undefined;
|
|
12
|
+
displayName?: string | undefined;
|
|
13
|
+
email?: string | undefined;
|
|
14
|
+
avatarUrl?: string | undefined;
|
|
15
|
+
tags?: Array<string> | undefined;
|
|
16
|
+
metadata?: CreateIdentityRequestMetadata | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type CreateIdentityRequestMetadata$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const CreateIdentityRequestMetadata$outboundSchema: z.ZodType<
|
|
24
|
+
CreateIdentityRequestMetadata$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
CreateIdentityRequestMetadata
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
export function createIdentityRequestMetadataToJSON(
|
|
30
|
+
createIdentityRequestMetadata: CreateIdentityRequestMetadata,
|
|
31
|
+
): string {
|
|
32
|
+
return JSON.stringify(
|
|
33
|
+
CreateIdentityRequestMetadata$outboundSchema.parse(
|
|
34
|
+
createIdentityRequestMetadata,
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type CreateIdentityRequest$Outbound = {
|
|
41
|
+
external_id?: string | undefined;
|
|
42
|
+
display_name?: string | undefined;
|
|
43
|
+
email?: string | undefined;
|
|
44
|
+
avatar_url?: string | undefined;
|
|
45
|
+
tags?: Array<string> | undefined;
|
|
46
|
+
metadata?: CreateIdentityRequestMetadata$Outbound | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const CreateIdentityRequest$outboundSchema: z.ZodType<
|
|
51
|
+
CreateIdentityRequest$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
CreateIdentityRequest
|
|
54
|
+
> = z.object({
|
|
55
|
+
externalId: z.string().optional(),
|
|
56
|
+
displayName: z.string().optional(),
|
|
57
|
+
email: z.string().optional(),
|
|
58
|
+
avatarUrl: z.string().optional(),
|
|
59
|
+
tags: z.array(z.string()).optional(),
|
|
60
|
+
metadata: z.lazy(() => CreateIdentityRequestMetadata$outboundSchema)
|
|
61
|
+
.optional(),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
externalId: "external_id",
|
|
65
|
+
displayName: "display_name",
|
|
66
|
+
avatarUrl: "avatar_url",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function createIdentityRequestToJSON(
|
|
71
|
+
createIdentityRequest: CreateIdentityRequest,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
CreateIdentityRequest$outboundSchema.parse(createIdentityRequest),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import { Identity, Identity$inboundSchema } from "./identity.js";
|
|
10
|
+
|
|
11
|
+
export type CreateIdentityResponse = {
|
|
12
|
+
identity?: Identity | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const CreateIdentityResponse$inboundSchema: z.ZodType<
|
|
17
|
+
CreateIdentityResponse,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
identity: Identity$inboundSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function createIdentityResponseFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<CreateIdentityResponse, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => CreateIdentityResponse$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'CreateIdentityResponse' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
|
|
7
7
|
export type CreateProjectRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Project name. Names must be non-empty and at most 128 characters.
|
|
10
|
+
*/
|
|
8
11
|
name?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Team identifiers to associate with the project.
|
|
14
|
+
*/
|
|
9
15
|
teams?: Array<string> | undefined;
|
|
10
16
|
};
|
|
11
17
|
|
|
@@ -9,6 +9,9 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
9
9
|
import { Project, Project$inboundSchema } from "./project.js";
|
|
10
10
|
|
|
11
11
|
export type CreateProjectResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Newly created project.
|
|
14
|
+
*/
|
|
12
15
|
project?: Project | undefined;
|
|
13
16
|
};
|
|
14
17
|
|
|
@@ -6,11 +6,29 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
|
|
8
8
|
export type CreateSkillRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Workspace-unique display name. Must start with a letter and may contain letters, numbers, underscores, and hyphens.
|
|
11
|
+
*/
|
|
9
12
|
displayName?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Short human-readable summary of what the skill is for.
|
|
15
|
+
*/
|
|
10
16
|
description?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Free-form labels for organizing the skill.
|
|
19
|
+
*/
|
|
11
20
|
tags?: Array<string> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Project path where the skill should be stored.
|
|
23
|
+
*/
|
|
12
24
|
path?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Project that should contain the skill.
|
|
27
|
+
*/
|
|
13
28
|
projectId?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Instruction body for the skill. Omit to create metadata first and fill instructions later.
|
|
31
|
+
*/
|
|
14
32
|
instructions?: string | undefined;
|
|
15
33
|
};
|
|
16
34
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DataPoint = {
|
|
11
|
+
/**
|
|
12
|
+
* Bucket start in UTC, RFC 3339. Clients that need epoch ms can call
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* `Date.parse(timestamp)` or `new Date(timestamp).getTime()` —
|
|
16
|
+
* returning the int64 in JSON would force a string (protojson rule)
|
|
17
|
+
* and force callers to coerce anyway, so we ship ISO only.
|
|
18
|
+
*/
|
|
19
|
+
timestamp?: Date | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Public breakdown labels for this bucket, keyed by group-by column.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* Empty when no group-by was requested. Empty values are omitted so
|
|
25
|
+
* the caller never has to special-case `""`.
|
|
26
|
+
*/
|
|
27
|
+
dimensions?: { [k: string]: string } | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Metric values for this bucket. Single-metric requests carry one
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* entry keyed by the requested metric name (e.g. `"genai.cost"` →
|
|
33
|
+
* `0.000495`). Bundle metrics carry one entry per field. Numbers are
|
|
34
|
+
* pre-rounded to 10 significant digits to avoid IEEE-754 display
|
|
35
|
+
* noise like `0.00009900000000000001`.
|
|
36
|
+
*/
|
|
37
|
+
metrics?: { [k: string]: number } | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const DataPoint$inboundSchema: z.ZodType<
|
|
42
|
+
DataPoint,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
47
|
+
.optional(),
|
|
48
|
+
dimensions: z.record(z.string()).optional(),
|
|
49
|
+
metrics: z.record(z.number()).optional(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function dataPointFromJSON(
|
|
53
|
+
jsonString: string,
|
|
54
|
+
): SafeParseResult<DataPoint, SDKValidationError> {
|
|
55
|
+
return safeParse(
|
|
56
|
+
jsonString,
|
|
57
|
+
(x) => DataPoint$inboundSchema.parse(JSON.parse(x)),
|
|
58
|
+
`Failed to parse 'DataPoint' from JSON`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type DeleteIdentityResponse = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const DeleteIdentityResponse$inboundSchema: z.ZodType<
|
|
14
|
+
DeleteIdentityResponse,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
export function deleteIdentityResponseFromJSON(
|
|
20
|
+
jsonString: string,
|
|
21
|
+
): SafeParseResult<DeleteIdentityResponse, SDKValidationError> {
|
|
22
|
+
return safeParse(
|
|
23
|
+
jsonString,
|
|
24
|
+
(x) => DeleteIdentityResponse$inboundSchema.parse(JSON.parse(x)),
|
|
25
|
+
`Failed to parse 'DeleteIdentityResponse' from JSON`,
|
|
26
|
+
);
|
|
27
|
+
}
|