@openrouter/sdk 1.2.103 → 1.2.105
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/esm/funcs/scimCreateSyncJob.d.ts +18 -0
- package/esm/funcs/scimCreateSyncJob.js +99 -0
- package/esm/funcs/scimGetSyncJob.d.ts +19 -0
- package/esm/funcs/scimGetSyncJob.js +103 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/baseinputsunion.d.ts +3 -2
- package/esm/models/baseinputsunion.js +3 -0
- package/esm/models/chatsystemmessage.d.ts +22 -0
- package/esm/models/chatsystemmessage.js +14 -0
- package/esm/models/configurationupdateitem.d.ts +37 -0
- package/esm/models/configurationupdateitem.js +33 -0
- package/esm/models/configurationupdatereasoning.d.ts +44 -0
- package/esm/models/configurationupdatereasoning.js +38 -0
- package/esm/models/createscimsyncjobresponse.d.ts +11 -0
- package/esm/models/createscimsyncjobresponse.js +15 -0
- package/esm/models/getscimsyncjobresponse.d.ts +11 -0
- package/esm/models/getscimsyncjobresponse.js +15 -0
- package/esm/models/index.d.ts +9 -0
- package/esm/models/index.js +9 -0
- package/esm/models/inputsunion.d.ts +5 -4
- package/esm/models/inputsunion.js +3 -0
- package/esm/models/mcpcallitem.d.ts +6 -2
- package/esm/models/mcpcallitem.js +2 -1
- package/esm/models/mcphttperror.d.ts +26 -0
- package/esm/models/mcphttperror.js +20 -0
- package/esm/models/mcpprotocolerror.d.ts +26 -0
- package/esm/models/mcpprotocolerror.js +20 -0
- package/esm/models/mcptoolcallerror.d.ts +14 -0
- package/esm/models/mcptoolcallerror.js +19 -0
- package/esm/models/mcptoolexecutionerror.d.ts +24 -0
- package/esm/models/mcptoolexecutionerror.js +19 -0
- package/esm/models/operations/createscimsyncjob.d.ts +65 -0
- package/esm/models/operations/createscimsyncjob.js +35 -0
- package/esm/models/operations/getscimsyncjob.d.ts +55 -0
- package/esm/models/operations/getscimsyncjob.js +21 -0
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.js +2 -0
- package/esm/models/responseserrorfield.d.ts +1 -0
- package/esm/models/responseserrorfield.js +1 -0
- package/esm/models/scimsyncjob.d.ts +57 -0
- package/esm/models/scimsyncjob.js +44 -0
- package/esm/sdk/scim.d.ts +14 -0
- package/esm/sdk/scim.js +20 -0
- package/jsr.json +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Start a SCIM directory sync
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
*/
|
|
17
|
+
export declare function scimCreateSyncJob(client: OpenRouterCore, request?: operations.CreateScimSyncJobRequest | undefined, options?: RequestOptions): APIPromise<Result<operations.CreateScimSyncJobResponse, errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
//# sourceMappingURL=scimCreateSyncJob.d.ts.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e5a91c340b44
|
|
4
|
+
*/
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as operations from "../models/operations/index.js";
|
|
14
|
+
import { APIPromise } from "../types/async.js";
|
|
15
|
+
/**
|
|
16
|
+
* Start a SCIM directory sync
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Start a SCIM directory sync. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
*/
|
|
21
|
+
export function scimCreateSyncJob(client, request, options) {
|
|
22
|
+
return new APIPromise($do(client, request, options));
|
|
23
|
+
}
|
|
24
|
+
async function $do(client, request, options) {
|
|
25
|
+
const parsed = safeParse(request, (value) => operations.CreateScimSyncJobRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
26
|
+
if (!parsed.ok) {
|
|
27
|
+
return [parsed, { status: "invalid" }];
|
|
28
|
+
}
|
|
29
|
+
const payload = parsed.value;
|
|
30
|
+
const body = null;
|
|
31
|
+
const path = pathToFunc("/scim/sync-jobs")();
|
|
32
|
+
const headers = new Headers(compactMap({
|
|
33
|
+
Accept: "application/json",
|
|
34
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload?.["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
35
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload?.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
36
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload?.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
37
|
+
}));
|
|
38
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
39
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
40
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
41
|
+
const context = {
|
|
42
|
+
options: client._options,
|
|
43
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
44
|
+
operationID: "createScimSyncJob",
|
|
45
|
+
oAuth2Scopes: null,
|
|
46
|
+
resolvedSecurity: requestSecurity,
|
|
47
|
+
securitySource: client._options.apiKey,
|
|
48
|
+
retryConfig: options?.retries
|
|
49
|
+
|| client._options.retryConfig
|
|
50
|
+
|| {
|
|
51
|
+
strategy: "backoff",
|
|
52
|
+
backoff: {
|
|
53
|
+
initialInterval: 500,
|
|
54
|
+
maxInterval: 60000,
|
|
55
|
+
exponent: 1.5,
|
|
56
|
+
maxElapsedTime: 3600000,
|
|
57
|
+
},
|
|
58
|
+
retryConnectionErrors: true,
|
|
59
|
+
}
|
|
60
|
+
|| { strategy: "none" },
|
|
61
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
62
|
+
};
|
|
63
|
+
const requestRes = client._createRequest(context, {
|
|
64
|
+
security: requestSecurity,
|
|
65
|
+
method: "POST",
|
|
66
|
+
baseURL: options?.serverURL,
|
|
67
|
+
path: path,
|
|
68
|
+
headers: headers,
|
|
69
|
+
body: body,
|
|
70
|
+
userAgent: client._options.userAgent,
|
|
71
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
72
|
+
}, options);
|
|
73
|
+
if (!requestRes.ok) {
|
|
74
|
+
return [requestRes, { status: "invalid" }];
|
|
75
|
+
}
|
|
76
|
+
const req = requestRes.value;
|
|
77
|
+
const doResult = await client._do(req, {
|
|
78
|
+
context,
|
|
79
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
80
|
+
retryConfig: context.retryConfig,
|
|
81
|
+
retryCodes: context.retryCodes,
|
|
82
|
+
});
|
|
83
|
+
if (!doResult.ok) {
|
|
84
|
+
return [doResult, { status: "request-error", request: req }];
|
|
85
|
+
}
|
|
86
|
+
const response = doResult.value;
|
|
87
|
+
const responseFields = {
|
|
88
|
+
HttpMeta: { Response: response, Request: req },
|
|
89
|
+
};
|
|
90
|
+
const [result] = await M.match(M.json(202, operations.CreateScimSyncJobResponse$inboundSchema, {
|
|
91
|
+
hdrs: true,
|
|
92
|
+
key: "Result",
|
|
93
|
+
}), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
94
|
+
if (!result.ok) {
|
|
95
|
+
return [result, { status: "complete", request: req, response }];
|
|
96
|
+
}
|
|
97
|
+
return [result, { status: "complete", request: req, response }];
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=scimCreateSyncJob.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as models from "../models/index.js";
|
|
9
|
+
import * as operations from "../models/operations/index.js";
|
|
10
|
+
import { APIPromise } from "../types/async.js";
|
|
11
|
+
import { Result } from "../types/fp.js";
|
|
12
|
+
/**
|
|
13
|
+
* Get SCIM directory sync status
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Get SCIM directory sync status. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
|
+
*/
|
|
18
|
+
export declare function scimGetSyncJob(client: OpenRouterCore, request: operations.GetScimSyncJobRequest, options?: RequestOptions): APIPromise<Result<models.GetScimSyncJobResponse, errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
//# sourceMappingURL=scimGetSyncJob.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 95876bc94c5c
|
|
4
|
+
*/
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as errors from "../models/errors/index.js";
|
|
13
|
+
import * as models from "../models/index.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Get SCIM directory sync status
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Get SCIM directory sync status. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
|
+
*/
|
|
22
|
+
export function scimGetSyncJob(client, request, options) {
|
|
23
|
+
return new APIPromise($do(client, request, options));
|
|
24
|
+
}
|
|
25
|
+
async function $do(client, request, options) {
|
|
26
|
+
const parsed = safeParse(request, (value) => operations.GetScimSyncJobRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
|
+
if (!parsed.ok) {
|
|
28
|
+
return [parsed, { status: "invalid" }];
|
|
29
|
+
}
|
|
30
|
+
const payload = parsed.value;
|
|
31
|
+
const body = null;
|
|
32
|
+
const pathParams = {
|
|
33
|
+
id: encodeSimple("id", payload.id, {
|
|
34
|
+
explode: false,
|
|
35
|
+
charEncoding: "percent",
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
38
|
+
const path = pathToFunc("/scim/sync-jobs/{id}")(pathParams);
|
|
39
|
+
const headers = new Headers(compactMap({
|
|
40
|
+
Accept: "application/json",
|
|
41
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
42
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
43
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
44
|
+
}));
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
const context = {
|
|
49
|
+
options: client._options,
|
|
50
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
51
|
+
operationID: "getScimSyncJob",
|
|
52
|
+
oAuth2Scopes: null,
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
securitySource: client._options.apiKey,
|
|
55
|
+
retryConfig: options?.retries
|
|
56
|
+
|| client._options.retryConfig
|
|
57
|
+
|| {
|
|
58
|
+
strategy: "backoff",
|
|
59
|
+
backoff: {
|
|
60
|
+
initialInterval: 500,
|
|
61
|
+
maxInterval: 60000,
|
|
62
|
+
exponent: 1.5,
|
|
63
|
+
maxElapsedTime: 3600000,
|
|
64
|
+
},
|
|
65
|
+
retryConnectionErrors: true,
|
|
66
|
+
}
|
|
67
|
+
|| { strategy: "none" },
|
|
68
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
69
|
+
};
|
|
70
|
+
const requestRes = client._createRequest(context, {
|
|
71
|
+
security: requestSecurity,
|
|
72
|
+
method: "GET",
|
|
73
|
+
baseURL: options?.serverURL,
|
|
74
|
+
path: path,
|
|
75
|
+
headers: headers,
|
|
76
|
+
body: body,
|
|
77
|
+
userAgent: client._options.userAgent,
|
|
78
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
79
|
+
}, options);
|
|
80
|
+
if (!requestRes.ok) {
|
|
81
|
+
return [requestRes, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const req = requestRes.value;
|
|
84
|
+
const doResult = await client._do(req, {
|
|
85
|
+
context,
|
|
86
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
87
|
+
retryConfig: context.retryConfig,
|
|
88
|
+
retryCodes: context.retryCodes,
|
|
89
|
+
});
|
|
90
|
+
if (!doResult.ok) {
|
|
91
|
+
return [doResult, { status: "request-error", request: req }];
|
|
92
|
+
}
|
|
93
|
+
const response = doResult.value;
|
|
94
|
+
const responseFields = {
|
|
95
|
+
HttpMeta: { Response: response, Request: req },
|
|
96
|
+
};
|
|
97
|
+
const [result] = await M.match(M.json(200, models.GetScimSyncJobResponse$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
98
|
+
if (!result.ok) {
|
|
99
|
+
return [result, { status: "complete", request: req, response }];
|
|
100
|
+
}
|
|
101
|
+
return [result, { status: "complete", request: req, response }];
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=scimGetSyncJob.js.map
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.2.
|
|
53
|
+
readonly sdkVersion: "1.2.105";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.105 2.914.0 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.2.
|
|
32
|
+
sdkVersion: "1.2.105",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.105 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -4,6 +4,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
5
|
import { ApplyPatchCallItem } from "./applypatchcallitem.js";
|
|
6
6
|
import { ApplyPatchCallOutputItem } from "./applypatchcalloutputitem.js";
|
|
7
|
+
import { ConfigurationUpdateItem } from "./configurationupdateitem.js";
|
|
7
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
8
9
|
import { InputAudio } from "./inputaudio.js";
|
|
9
10
|
import { InputFile } from "./inputfile.js";
|
|
@@ -60,8 +61,8 @@ export type BaseInputsMessage = {
|
|
|
60
61
|
role: BaseInputsRoleUser | BaseInputsRoleSystem | BaseInputsRoleAssistant | BaseInputsRoleDeveloper;
|
|
61
62
|
type?: BaseInputsType | undefined;
|
|
62
63
|
};
|
|
63
|
-
export type BaseInputsUnion1 = OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage;
|
|
64
|
-
export type BaseInputsUnion = string | Array<OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage>;
|
|
64
|
+
export type BaseInputsUnion1 = OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage | ConfigurationUpdateItem;
|
|
65
|
+
export type BaseInputsUnion = string | Array<OpenAIResponseFunctionToolCall | OutputMessage | OpenAIResponseCustomToolCall | ApplyPatchCallItem | OpenAIResponseInputMessageItem | OpenAIResponseFunctionToolCallOutput | OutputItemImageGenerationCall | OpenAIResponseCustomToolCallOutput | ApplyPatchCallOutputItem | BaseInputsMessage | ConfigurationUpdateItem>;
|
|
65
66
|
/** @internal */
|
|
66
67
|
export declare const BaseInputsContent1$inboundSchema: z.ZodType<BaseInputsContent1, unknown>;
|
|
67
68
|
export declare function baseInputsContent1FromJSON(jsonString: string): SafeParseResult<BaseInputsContent1, SDKValidationError>;
|
|
@@ -7,6 +7,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
8
|
import { ApplyPatchCallItem$inboundSchema, } from "./applypatchcallitem.js";
|
|
9
9
|
import { ApplyPatchCallOutputItem$inboundSchema, } from "./applypatchcalloutputitem.js";
|
|
10
|
+
import { ConfigurationUpdateItem$inboundSchema, } from "./configurationupdateitem.js";
|
|
10
11
|
import { InputAudio$inboundSchema } from "./inputaudio.js";
|
|
11
12
|
import { InputFile$inboundSchema } from "./inputfile.js";
|
|
12
13
|
import { InputImage$inboundSchema } from "./inputimage.js";
|
|
@@ -133,6 +134,7 @@ export const BaseInputsUnion1$inboundSchema = z.union([
|
|
|
133
134
|
OpenAIResponseCustomToolCallOutput$inboundSchema,
|
|
134
135
|
ApplyPatchCallOutputItem$inboundSchema,
|
|
135
136
|
z.lazy(() => BaseInputsMessage$inboundSchema),
|
|
137
|
+
ConfigurationUpdateItem$inboundSchema,
|
|
136
138
|
]);
|
|
137
139
|
export function baseInputsUnion1FromJSON(jsonString) {
|
|
138
140
|
return safeParse(jsonString, (x) => BaseInputsUnion1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BaseInputsUnion1' from JSON`);
|
|
@@ -151,6 +153,7 @@ export const BaseInputsUnion$inboundSchema = z.union([
|
|
|
151
153
|
OpenAIResponseCustomToolCallOutput$inboundSchema,
|
|
152
154
|
ApplyPatchCallOutputItem$inboundSchema,
|
|
153
155
|
z.lazy(() => BaseInputsMessage$inboundSchema),
|
|
156
|
+
ConfigurationUpdateItem$inboundSchema,
|
|
154
157
|
])),
|
|
155
158
|
]);
|
|
156
159
|
export function baseInputsUnionFromJSON(jsonString) {
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ChatContentText, ChatContentText$Outbound } from "./chatcontenttext.js";
|
|
3
|
+
import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
|
|
4
|
+
/**
|
|
5
|
+
* OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
|
|
6
|
+
*/
|
|
7
|
+
export type ConfigurationUpdate = {
|
|
8
|
+
/**
|
|
9
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
10
|
+
*/
|
|
11
|
+
reasoning: ConfigurationUpdateReasoning;
|
|
12
|
+
};
|
|
3
13
|
/**
|
|
4
14
|
* System message content
|
|
5
15
|
*/
|
|
@@ -8,6 +18,10 @@ export type ChatSystemMessageContent = string | Array<ChatContentText>;
|
|
|
8
18
|
* System message for setting behavior
|
|
9
19
|
*/
|
|
10
20
|
export type ChatSystemMessage = {
|
|
21
|
+
/**
|
|
22
|
+
* OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
|
|
23
|
+
*/
|
|
24
|
+
configurationUpdate?: ConfigurationUpdate | null | undefined;
|
|
11
25
|
/**
|
|
12
26
|
* System message content
|
|
13
27
|
*/
|
|
@@ -19,12 +33,20 @@ export type ChatSystemMessage = {
|
|
|
19
33
|
role: "system";
|
|
20
34
|
};
|
|
21
35
|
/** @internal */
|
|
36
|
+
export type ConfigurationUpdate$Outbound = {
|
|
37
|
+
reasoning: ConfigurationUpdateReasoning$Outbound;
|
|
38
|
+
};
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare const ConfigurationUpdate$outboundSchema: z.ZodType<ConfigurationUpdate$Outbound, ConfigurationUpdate>;
|
|
41
|
+
export declare function configurationUpdateToJSON(configurationUpdate: ConfigurationUpdate): string;
|
|
42
|
+
/** @internal */
|
|
22
43
|
export type ChatSystemMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
|
|
23
44
|
/** @internal */
|
|
24
45
|
export declare const ChatSystemMessageContent$outboundSchema: z.ZodType<ChatSystemMessageContent$Outbound, ChatSystemMessageContent>;
|
|
25
46
|
export declare function chatSystemMessageContentToJSON(chatSystemMessageContent: ChatSystemMessageContent): string;
|
|
26
47
|
/** @internal */
|
|
27
48
|
export type ChatSystemMessage$Outbound = {
|
|
49
|
+
configuration_update?: ConfigurationUpdate$Outbound | null | undefined;
|
|
28
50
|
content: string | Array<ChatContentText$Outbound>;
|
|
29
51
|
name?: string | undefined;
|
|
30
52
|
role: "system";
|
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
* @generated-id: e404d41c140a
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
7
|
import { ChatContentText$outboundSchema, } from "./chatcontenttext.js";
|
|
8
|
+
import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ConfigurationUpdate$outboundSchema = z.object({
|
|
11
|
+
reasoning: ConfigurationUpdateReasoning$outboundSchema,
|
|
12
|
+
});
|
|
13
|
+
export function configurationUpdateToJSON(configurationUpdate) {
|
|
14
|
+
return JSON.stringify(ConfigurationUpdate$outboundSchema.parse(configurationUpdate));
|
|
15
|
+
}
|
|
7
16
|
/** @internal */
|
|
8
17
|
export const ChatSystemMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
|
|
9
18
|
export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
|
|
@@ -11,9 +20,14 @@ export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
|
|
|
11
20
|
}
|
|
12
21
|
/** @internal */
|
|
13
22
|
export const ChatSystemMessage$outboundSchema = z.object({
|
|
23
|
+
configurationUpdate: z.nullable(z.lazy(() => ConfigurationUpdate$outboundSchema)).optional(),
|
|
14
24
|
content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
|
|
15
25
|
name: z.string().optional(),
|
|
16
26
|
role: z.literal("system"),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
configurationUpdate: "configuration_update",
|
|
30
|
+
});
|
|
17
31
|
});
|
|
18
32
|
export function chatSystemMessageToJSON(chatSystemMessage) {
|
|
19
33
|
return JSON.stringify(ChatSystemMessage$outboundSchema.parse(chatSystemMessage));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
export declare const ConfigurationUpdateItemType: {
|
|
7
|
+
readonly ConfigurationUpdate: "configuration_update";
|
|
8
|
+
};
|
|
9
|
+
export type ConfigurationUpdateItemType = ClosedEnum<typeof ConfigurationUpdateItemType>;
|
|
10
|
+
/**
|
|
11
|
+
* Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding items. Place it before the user message it should apply to; it stays in effect until another configuration update. Two adjacent configuration updates are rejected. Only supported by models that accept mid-conversation effort changes.
|
|
12
|
+
*/
|
|
13
|
+
export type ConfigurationUpdateItem = {
|
|
14
|
+
id?: string | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
17
|
+
*/
|
|
18
|
+
reasoning: ConfigurationUpdateReasoning;
|
|
19
|
+
type: ConfigurationUpdateItemType;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ConfigurationUpdateItemType$inboundSchema: z.ZodEnum<typeof ConfigurationUpdateItemType>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ConfigurationUpdateItemType$outboundSchema: z.ZodEnum<typeof ConfigurationUpdateItemType>;
|
|
25
|
+
/** @internal */
|
|
26
|
+
export declare const ConfigurationUpdateItem$inboundSchema: z.ZodType<ConfigurationUpdateItem, unknown>;
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type ConfigurationUpdateItem$Outbound = {
|
|
29
|
+
id?: string | null | undefined;
|
|
30
|
+
reasoning: ConfigurationUpdateReasoning$Outbound;
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const ConfigurationUpdateItem$outboundSchema: z.ZodType<ConfigurationUpdateItem$Outbound, ConfigurationUpdateItem>;
|
|
35
|
+
export declare function configurationUpdateItemToJSON(configurationUpdateItem: ConfigurationUpdateItem): string;
|
|
36
|
+
export declare function configurationUpdateItemFromJSON(jsonString: string): SafeParseResult<ConfigurationUpdateItem, SDKValidationError>;
|
|
37
|
+
//# sourceMappingURL=configurationupdateitem.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 8ced38e347e1
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ConfigurationUpdateReasoning$inboundSchema, ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
|
|
8
|
+
export const ConfigurationUpdateItemType = {
|
|
9
|
+
ConfigurationUpdate: "configuration_update",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ConfigurationUpdateItemType$inboundSchema = z.enum(ConfigurationUpdateItemType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ConfigurationUpdateItemType$outboundSchema = ConfigurationUpdateItemType$inboundSchema;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ConfigurationUpdateItem$inboundSchema = z.object({
|
|
17
|
+
id: z.nullable(z.string()).optional(),
|
|
18
|
+
reasoning: ConfigurationUpdateReasoning$inboundSchema,
|
|
19
|
+
type: ConfigurationUpdateItemType$inboundSchema,
|
|
20
|
+
});
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ConfigurationUpdateItem$outboundSchema = z.object({
|
|
23
|
+
id: z.nullable(z.string()).optional(),
|
|
24
|
+
reasoning: ConfigurationUpdateReasoning$outboundSchema,
|
|
25
|
+
type: ConfigurationUpdateItemType$outboundSchema,
|
|
26
|
+
});
|
|
27
|
+
export function configurationUpdateItemToJSON(configurationUpdateItem) {
|
|
28
|
+
return JSON.stringify(ConfigurationUpdateItem$outboundSchema.parse(configurationUpdateItem));
|
|
29
|
+
}
|
|
30
|
+
export function configurationUpdateItemFromJSON(jsonString) {
|
|
31
|
+
return safeParse(jsonString, (x) => ConfigurationUpdateItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConfigurationUpdateItem' from JSON`);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=configurationupdateitem.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
7
|
+
*/
|
|
8
|
+
export declare const ConfigurationUpdateReasoningEffort: {
|
|
9
|
+
readonly Max: "max";
|
|
10
|
+
readonly Xhigh: "xhigh";
|
|
11
|
+
readonly High: "high";
|
|
12
|
+
readonly Medium: "medium";
|
|
13
|
+
readonly Low: "low";
|
|
14
|
+
readonly Minimal: "minimal";
|
|
15
|
+
readonly None: "none";
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
19
|
+
*/
|
|
20
|
+
export type ConfigurationUpdateReasoningEffort = OpenEnum<typeof ConfigurationUpdateReasoningEffort>;
|
|
21
|
+
/**
|
|
22
|
+
* Reasoning settings applied from this point in the conversation onward
|
|
23
|
+
*/
|
|
24
|
+
export type ConfigurationUpdateReasoning = {
|
|
25
|
+
/**
|
|
26
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
27
|
+
*/
|
|
28
|
+
effort: ConfigurationUpdateReasoningEffort;
|
|
29
|
+
};
|
|
30
|
+
/** @internal */
|
|
31
|
+
export declare const ConfigurationUpdateReasoningEffort$inboundSchema: z.ZodType<ConfigurationUpdateReasoningEffort, unknown>;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ConfigurationUpdateReasoningEffort$outboundSchema: z.ZodType<string, ConfigurationUpdateReasoningEffort>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export declare const ConfigurationUpdateReasoning$inboundSchema: z.ZodType<ConfigurationUpdateReasoning, unknown>;
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ConfigurationUpdateReasoning$Outbound = {
|
|
38
|
+
effort: string;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const ConfigurationUpdateReasoning$outboundSchema: z.ZodType<ConfigurationUpdateReasoning$Outbound, ConfigurationUpdateReasoning>;
|
|
42
|
+
export declare function configurationUpdateReasoningToJSON(configurationUpdateReasoning: ConfigurationUpdateReasoning): string;
|
|
43
|
+
export declare function configurationUpdateReasoningFromJSON(jsonString: string): SafeParseResult<ConfigurationUpdateReasoning, SDKValidationError>;
|
|
44
|
+
//# sourceMappingURL=configurationupdatereasoning.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 616a3d75a2d0
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* Reasoning effort to apply from this point in the conversation onward
|
|
10
|
+
*/
|
|
11
|
+
export const ConfigurationUpdateReasoningEffort = {
|
|
12
|
+
Max: "max",
|
|
13
|
+
Xhigh: "xhigh",
|
|
14
|
+
High: "high",
|
|
15
|
+
Medium: "medium",
|
|
16
|
+
Low: "low",
|
|
17
|
+
Minimal: "minimal",
|
|
18
|
+
None: "none",
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ConfigurationUpdateReasoningEffort$inboundSchema = openEnums.inboundSchema(ConfigurationUpdateReasoningEffort);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const ConfigurationUpdateReasoningEffort$outboundSchema = openEnums.outboundSchema(ConfigurationUpdateReasoningEffort);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ConfigurationUpdateReasoning$inboundSchema = z.object({
|
|
26
|
+
effort: ConfigurationUpdateReasoningEffort$inboundSchema,
|
|
27
|
+
});
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ConfigurationUpdateReasoning$outboundSchema = z.object({
|
|
30
|
+
effort: ConfigurationUpdateReasoningEffort$outboundSchema,
|
|
31
|
+
});
|
|
32
|
+
export function configurationUpdateReasoningToJSON(configurationUpdateReasoning) {
|
|
33
|
+
return JSON.stringify(ConfigurationUpdateReasoning$outboundSchema.parse(configurationUpdateReasoning));
|
|
34
|
+
}
|
|
35
|
+
export function configurationUpdateReasoningFromJSON(jsonString) {
|
|
36
|
+
return safeParse(jsonString, (x) => ConfigurationUpdateReasoning$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConfigurationUpdateReasoning' from JSON`);
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=configurationupdatereasoning.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ScimSyncJob } from "./scimsyncjob.js";
|
|
5
|
+
export type CreateScimSyncJobResponse = {
|
|
6
|
+
data: ScimSyncJob;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const CreateScimSyncJobResponse$inboundSchema: z.ZodType<CreateScimSyncJobResponse, unknown>;
|
|
10
|
+
export declare function createScimSyncJobResponseFromJSON(jsonString: string): SafeParseResult<CreateScimSyncJobResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=createscimsyncjobresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: cbd527ad55e4
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ScimSyncJob$inboundSchema } from "./scimsyncjob.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CreateScimSyncJobResponse$inboundSchema = z.object({
|
|
10
|
+
data: ScimSyncJob$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function createScimSyncJobResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => CreateScimSyncJobResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateScimSyncJobResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=createscimsyncjobresponse.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ScimSyncJob } from "./scimsyncjob.js";
|
|
5
|
+
export type GetScimSyncJobResponse = {
|
|
6
|
+
data: ScimSyncJob;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const GetScimSyncJobResponse$inboundSchema: z.ZodType<GetScimSyncJobResponse, unknown>;
|
|
10
|
+
export declare function getScimSyncJobResponseFromJSON(jsonString: string): SafeParseResult<GetScimSyncJobResponse, SDKValidationError>;
|
|
11
|
+
//# sourceMappingURL=getscimsyncjobresponse.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3ada334326d5
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ScimSyncJob$inboundSchema } from "./scimsyncjob.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const GetScimSyncJobResponse$inboundSchema = z.object({
|
|
10
|
+
data: ScimSyncJob$inboundSchema,
|
|
11
|
+
});
|
|
12
|
+
export function getScimSyncJobResponseFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => GetScimSyncJobResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetScimSyncJobResponse' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=getscimsyncjobresponse.js.map
|