@openrouter/sdk 1.4.9 → 1.4.11
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/endUsersCreate.d.ts +19 -0
- package/esm/funcs/endUsersCreate.js +100 -0
- package/esm/funcs/endUsersDelete.d.ts +18 -0
- package/esm/funcs/endUsersDelete.js +103 -0
- package/esm/funcs/endUsersGet.d.ts +19 -0
- package/esm/funcs/endUsersGet.js +103 -0
- package/esm/funcs/endUsersList.d.ts +21 -0
- package/esm/funcs/endUsersList.js +135 -0
- package/esm/funcs/endUsersUpdate.d.ts +19 -0
- package/esm/funcs/endUsersUpdate.js +106 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/alignment.d.ts +17 -0
- package/esm/models/alignment.js +15 -0
- package/esm/models/alignmentallowedcallrecord.d.ts +19 -0
- package/esm/models/alignmentallowedcallrecord.js +17 -0
- package/esm/models/alignmentblockedcallrecord.d.ts +19 -0
- package/esm/models/alignmentblockedcallrecord.js +17 -0
- package/esm/models/alignmentcallrecord.d.ts +12 -0
- package/esm/models/alignmentcallrecord.js +19 -0
- package/esm/models/alignmentchataudio.d.ts +20 -0
- package/esm/models/alignmentchataudio.js +15 -0
- package/esm/models/alignmentchatimage.d.ts +24 -0
- package/esm/models/alignmentchatimage.js +32 -0
- package/esm/models/alignmentchatrejected.d.ts +31 -0
- package/esm/models/alignmentchatrejected.js +32 -0
- package/esm/models/alignmentchattoolcall.d.ts +26 -0
- package/esm/models/alignmentchattoolcall.js +29 -0
- package/esm/models/alignmentplugin.d.ts +54 -0
- package/esm/models/alignmentplugin.js +33 -0
- package/esm/models/alignmentrejected.d.ts +10 -0
- package/esm/models/alignmentrejected.js +17 -0
- package/esm/models/alignmentresponsesrejected.d.ts +18 -0
- package/esm/models/alignmentresponsesrejected.js +31 -0
- package/esm/models/alignmentrulerecord.d.ts +17 -0
- package/esm/models/alignmentrulerecord.js +15 -0
- package/esm/models/alignmentunavailablecallrecord.d.ts +25 -0
- package/esm/models/alignmentunavailablecallrecord.js +25 -0
- package/esm/models/batchobject.d.ts +5 -0
- package/esm/models/batchobject.js +2 -0
- package/esm/models/chatrequest.d.ts +5 -4
- package/esm/models/chatrequest.js +3 -0
- package/esm/models/createenduserrequest.d.ts +15 -0
- package/esm/models/createenduserrequest.js +13 -0
- package/esm/models/enduser.d.ts +25 -0
- package/esm/models/enduser.js +24 -0
- package/esm/models/enduserresponse.d.ts +11 -0
- package/esm/models/enduserresponse.js +15 -0
- package/esm/models/index.d.ts +27 -1
- package/esm/models/index.js +27 -1
- package/esm/models/listendusersresponse.d.ts +15 -0
- package/esm/models/listendusersresponse.js +21 -0
- package/esm/models/messagesrequest.d.ts +5 -4
- package/esm/models/messagesrequest.js +3 -0
- package/esm/models/{responseserrorfield.d.ts → openresponseserrorfield.d.ts} +10 -5
- package/esm/models/{responseserrorfield.js → openresponseserrorfield.js} +7 -5
- package/esm/models/openresponseserrormetadata.d.ts +31 -0
- package/esm/models/openresponseserrormetadata.js +25 -0
- package/esm/models/openresponsesresult.d.ts +8 -3
- package/esm/models/openresponsesresult.js +4 -2
- package/esm/models/operations/createenduser.d.ts +56 -0
- package/esm/models/operations/createenduser.js +23 -0
- package/esm/models/operations/deleteenduser.d.ts +58 -0
- package/esm/models/operations/deleteenduser.js +21 -0
- package/esm/models/operations/getenduser.d.ts +58 -0
- package/esm/models/operations/getenduser.js +21 -0
- package/esm/models/operations/index.d.ts +5 -0
- package/esm/models/operations/index.js +5 -0
- package/esm/models/operations/listendusers.d.ts +82 -0
- package/esm/models/operations/listendusers.js +38 -0
- package/esm/models/operations/updateenduser.d.ts +61 -0
- package/esm/models/operations/updateenduser.js +24 -0
- package/esm/models/outputitemapplypatchcall.d.ts +31 -0
- package/esm/models/outputitemapplypatchcall.js +49 -0
- package/esm/models/outputitemcodeinterpretercall.d.ts +37 -0
- package/esm/models/outputitemcodeinterpretercall.js +51 -0
- package/esm/models/outputitemcustomtoolcall.d.ts +32 -0
- package/esm/models/outputitemcustomtoolcall.js +34 -0
- package/esm/models/outputitemfilesearchcall.d.ts +14 -0
- package/esm/models/outputitemfilesearchcall.js +18 -0
- package/esm/models/outputitemfunctioncall.d.ts +46 -0
- package/esm/models/outputitemfunctioncall.js +54 -0
- package/esm/models/outputitemimagegenerationcall.d.ts +1 -8
- package/esm/models/outputitemimagegenerationcall.js +1 -6
- package/esm/models/outputitemreasoning.d.ts +40 -0
- package/esm/models/outputitemreasoning.js +54 -0
- package/esm/models/outputitemwebsearchcall.d.ts +47 -0
- package/esm/models/outputitemwebsearchcall.js +60 -0
- package/esm/models/outputmessage.d.ts +1 -7
- package/esm/models/outputmessage.js +1 -6
- package/esm/models/outputwebsearchcallitem.d.ts +25 -25
- package/esm/models/outputwebsearchcallitem.js +31 -32
- package/esm/models/responsesrequest.d.ts +5 -4
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/updateenduserrequest.d.ts +15 -0
- package/esm/models/updateenduserrequest.js +18 -0
- package/esm/sdk/endusers.d.ts +44 -0
- package/esm/sdk/endusers.js +60 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +9 -9
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7fb2aab2b543
|
|
4
|
+
*/
|
|
5
|
+
import { encodeJSON, 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 { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { EndUserResponse$inboundSchema as models_EndUserResponse$inboundSchema } from "../models/enduserresponse.js";
|
|
14
|
+
import { UpdateEndUserRequest$outboundSchema as operations_UpdateEndUserRequest$outboundSchema } from "../models/operations/updateenduser.js";
|
|
15
|
+
import { APIPromise } from "../types/async.js";
|
|
16
|
+
/**
|
|
17
|
+
* Update a registered end user
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* Update registration state without changing identity. State changes do not enforce inference access. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
|
+
*/
|
|
22
|
+
export function endUsersUpdate(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_UpdateEndUserRequest$outboundSchema.parse(value), "Input validation failed");
|
|
27
|
+
if (!parsed.ok) {
|
|
28
|
+
return [parsed, { status: "invalid" }];
|
|
29
|
+
}
|
|
30
|
+
const payload = parsed.value;
|
|
31
|
+
const body = encodeJSON("body", payload.UpdateEndUserRequest, {
|
|
32
|
+
explode: true,
|
|
33
|
+
});
|
|
34
|
+
const pathParams = {
|
|
35
|
+
user: encodeSimple("user", payload.user, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/end-users/{user}")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
Accept: "application/json",
|
|
44
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
45
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
46
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
47
|
+
}));
|
|
48
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
49
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
50
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
51
|
+
const context = {
|
|
52
|
+
options: client._options,
|
|
53
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
54
|
+
operationID: "updateEndUser",
|
|
55
|
+
oAuth2Scopes: null,
|
|
56
|
+
resolvedSecurity: requestSecurity,
|
|
57
|
+
securitySource: client._options.apiKey,
|
|
58
|
+
retryConfig: options?.retries
|
|
59
|
+
|| client._options.retryConfig
|
|
60
|
+
|| {
|
|
61
|
+
strategy: "backoff",
|
|
62
|
+
backoff: {
|
|
63
|
+
initialInterval: 500,
|
|
64
|
+
maxInterval: 60000,
|
|
65
|
+
exponent: 1.5,
|
|
66
|
+
maxElapsedTime: 3600000,
|
|
67
|
+
},
|
|
68
|
+
retryConnectionErrors: true,
|
|
69
|
+
}
|
|
70
|
+
|| { strategy: "none" },
|
|
71
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
72
|
+
};
|
|
73
|
+
const requestRes = client._createRequest(context, {
|
|
74
|
+
security: requestSecurity,
|
|
75
|
+
method: "PATCH",
|
|
76
|
+
baseURL: options?.serverURL,
|
|
77
|
+
path: path,
|
|
78
|
+
headers: headers,
|
|
79
|
+
body: body,
|
|
80
|
+
userAgent: client._options.userAgent,
|
|
81
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
82
|
+
}, options);
|
|
83
|
+
if (!requestRes.ok) {
|
|
84
|
+
return [requestRes, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const req = requestRes.value;
|
|
87
|
+
const doResult = await client._do(req, {
|
|
88
|
+
context,
|
|
89
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
90
|
+
retryConfig: context.retryConfig,
|
|
91
|
+
retryCodes: context.retryCodes,
|
|
92
|
+
});
|
|
93
|
+
if (!doResult.ok) {
|
|
94
|
+
return [doResult, { status: "request-error", request: req }];
|
|
95
|
+
}
|
|
96
|
+
const response = doResult.value;
|
|
97
|
+
const responseFields = {
|
|
98
|
+
HttpMeta: { Response: response, Request: req },
|
|
99
|
+
};
|
|
100
|
+
const [result] = await M.match(M.json(200, models_EndUserResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$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 });
|
|
101
|
+
if (!result.ok) {
|
|
102
|
+
return [result, { status: "complete", request: req, response }];
|
|
103
|
+
}
|
|
104
|
+
return [result, { status: "complete", request: req, response }];
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=endUsersUpdate.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.4.
|
|
53
|
+
readonly sdkVersion: "1.4.11";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.4.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.4.11 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.4.
|
|
32
|
+
sdkVersion: "1.4.11",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.4.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.4.11 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AlignmentCallRecord } from "./alignmentcallrecord.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Beta. The result of the alignment plugin for this request; the shape may change.
|
|
7
|
+
*/
|
|
8
|
+
export type Alignment = {
|
|
9
|
+
/**
|
|
10
|
+
* One record per evaluated assistant message of the request, in the order the messages were produced.
|
|
11
|
+
*/
|
|
12
|
+
calls: Array<AlignmentCallRecord>;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const Alignment$inboundSchema: z.ZodType<Alignment, unknown>;
|
|
16
|
+
export declare function alignmentFromJSON(jsonString: string): SafeParseResult<Alignment, SDKValidationError>;
|
|
17
|
+
//# sourceMappingURL=alignment.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 43184be859d0
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { AlignmentCallRecord$inboundSchema, } from "./alignmentcallrecord.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const Alignment$inboundSchema = z.object({
|
|
10
|
+
calls: z.array(AlignmentCallRecord$inboundSchema),
|
|
11
|
+
});
|
|
12
|
+
export function alignmentFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => Alignment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Alignment' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=alignment.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AlignmentRuleRecord } from "./alignmentrulerecord.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type AlignmentAllowedCallRecord = {
|
|
6
|
+
/**
|
|
7
|
+
* Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering.
|
|
8
|
+
*/
|
|
9
|
+
call: number;
|
|
10
|
+
outcome: "allowed";
|
|
11
|
+
/**
|
|
12
|
+
* One record per rule, in the order of `rules` in the request.
|
|
13
|
+
*/
|
|
14
|
+
rules: Array<AlignmentRuleRecord>;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const AlignmentAllowedCallRecord$inboundSchema: z.ZodType<AlignmentAllowedCallRecord, unknown>;
|
|
18
|
+
export declare function alignmentAllowedCallRecordFromJSON(jsonString: string): SafeParseResult<AlignmentAllowedCallRecord, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=alignmentallowedcallrecord.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e25d7cab6275
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { AlignmentRuleRecord$inboundSchema, } from "./alignmentrulerecord.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const AlignmentAllowedCallRecord$inboundSchema = z.object({
|
|
10
|
+
call: z.int(),
|
|
11
|
+
outcome: z.literal("allowed"),
|
|
12
|
+
rules: z.array(AlignmentRuleRecord$inboundSchema),
|
|
13
|
+
});
|
|
14
|
+
export function alignmentAllowedCallRecordFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => AlignmentAllowedCallRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentAllowedCallRecord' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=alignmentallowedcallrecord.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AlignmentRuleRecord } from "./alignmentrulerecord.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type AlignmentBlockedCallRecord = {
|
|
6
|
+
/**
|
|
7
|
+
* Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering.
|
|
8
|
+
*/
|
|
9
|
+
call: number;
|
|
10
|
+
outcome: "blocked";
|
|
11
|
+
/**
|
|
12
|
+
* One record per rule, in the order of `rules` in the request.
|
|
13
|
+
*/
|
|
14
|
+
rules: Array<AlignmentRuleRecord>;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const AlignmentBlockedCallRecord$inboundSchema: z.ZodType<AlignmentBlockedCallRecord, unknown>;
|
|
18
|
+
export declare function alignmentBlockedCallRecordFromJSON(jsonString: string): SafeParseResult<AlignmentBlockedCallRecord, SDKValidationError>;
|
|
19
|
+
//# sourceMappingURL=alignmentblockedcallrecord.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 645166311886
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { AlignmentRuleRecord$inboundSchema, } from "./alignmentrulerecord.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const AlignmentBlockedCallRecord$inboundSchema = z.object({
|
|
10
|
+
call: z.int(),
|
|
11
|
+
outcome: z.literal("blocked"),
|
|
12
|
+
rules: z.array(AlignmentRuleRecord$inboundSchema),
|
|
13
|
+
});
|
|
14
|
+
export function alignmentBlockedCallRecordFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => AlignmentBlockedCallRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentBlockedCallRecord' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=alignmentblockedcallrecord.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { AlignmentAllowedCallRecord } from "./alignmentallowedcallrecord.js";
|
|
5
|
+
import { AlignmentBlockedCallRecord } from "./alignmentblockedcallrecord.js";
|
|
6
|
+
import { AlignmentUnavailableCallRecord } from "./alignmentunavailablecallrecord.js";
|
|
7
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
8
|
+
export type AlignmentCallRecord = AlignmentAllowedCallRecord | AlignmentBlockedCallRecord | AlignmentUnavailableCallRecord | discriminatedUnionTypes.Unknown<"outcome">;
|
|
9
|
+
/** @internal */
|
|
10
|
+
export declare const AlignmentCallRecord$inboundSchema: z.ZodType<AlignmentCallRecord, unknown>;
|
|
11
|
+
export declare function alignmentCallRecordFromJSON(jsonString: string): SafeParseResult<AlignmentCallRecord, SDKValidationError>;
|
|
12
|
+
//# sourceMappingURL=alignmentcallrecord.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 4a29229bf91b
|
|
4
|
+
*/
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
7
|
+
import { AlignmentAllowedCallRecord$inboundSchema, } from "./alignmentallowedcallrecord.js";
|
|
8
|
+
import { AlignmentBlockedCallRecord$inboundSchema, } from "./alignmentblockedcallrecord.js";
|
|
9
|
+
import { AlignmentUnavailableCallRecord$inboundSchema, } from "./alignmentunavailablecallrecord.js";
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const AlignmentCallRecord$inboundSchema = discriminatedUnion("outcome", {
|
|
12
|
+
allowed: AlignmentAllowedCallRecord$inboundSchema,
|
|
13
|
+
blocked: AlignmentBlockedCallRecord$inboundSchema,
|
|
14
|
+
unavailable: AlignmentUnavailableCallRecord$inboundSchema,
|
|
15
|
+
});
|
|
16
|
+
export function alignmentCallRecordFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => AlignmentCallRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentCallRecord' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=alignmentcallrecord.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* The audio of the withheld message: its `id` and `transcript`. The plugin does not retain `data` or `expires_at`.
|
|
6
|
+
*/
|
|
7
|
+
export type AlignmentChatAudio = {
|
|
8
|
+
/**
|
|
9
|
+
* The provider id of the audio.
|
|
10
|
+
*/
|
|
11
|
+
id?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* The transcript of the audio.
|
|
14
|
+
*/
|
|
15
|
+
transcript: string;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const AlignmentChatAudio$inboundSchema: z.ZodType<AlignmentChatAudio, unknown>;
|
|
19
|
+
export declare function alignmentChatAudioFromJSON(jsonString: string): SafeParseResult<AlignmentChatAudio, SDKValidationError>;
|
|
20
|
+
//# sourceMappingURL=alignmentchataudio.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 01e8aa37a8f9
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const AlignmentChatAudio$inboundSchema = z.object({
|
|
9
|
+
id: z.string().optional(),
|
|
10
|
+
transcript: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export function alignmentChatAudioFromJSON(jsonString) {
|
|
13
|
+
return safeParse(jsonString, (x) => AlignmentChatAudio$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatAudio' from JSON`);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=alignmentchataudio.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type AlignmentChatImageImageUrl = {
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const AlignmentChatImageType: {
|
|
9
|
+
readonly ImageUrl: "image_url";
|
|
10
|
+
};
|
|
11
|
+
export type AlignmentChatImageType = ClosedEnum<typeof AlignmentChatImageType>;
|
|
12
|
+
export type AlignmentChatImage = {
|
|
13
|
+
imageUrl: AlignmentChatImageImageUrl;
|
|
14
|
+
type: AlignmentChatImageType;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const AlignmentChatImageImageUrl$inboundSchema: z.ZodType<AlignmentChatImageImageUrl, unknown>;
|
|
18
|
+
export declare function alignmentChatImageImageUrlFromJSON(jsonString: string): SafeParseResult<AlignmentChatImageImageUrl, SDKValidationError>;
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const AlignmentChatImageType$inboundSchema: z.ZodEnum<typeof AlignmentChatImageType>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const AlignmentChatImage$inboundSchema: z.ZodType<AlignmentChatImage, unknown>;
|
|
23
|
+
export declare function alignmentChatImageFromJSON(jsonString: string): SafeParseResult<AlignmentChatImage, SDKValidationError>;
|
|
24
|
+
//# sourceMappingURL=alignmentchatimage.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f366173904ff
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
export const AlignmentChatImageType = {
|
|
9
|
+
ImageUrl: "image_url",
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const AlignmentChatImageImageUrl$inboundSchema = z.object({
|
|
13
|
+
url: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export function alignmentChatImageImageUrlFromJSON(jsonString) {
|
|
16
|
+
return safeParse(jsonString, (x) => AlignmentChatImageImageUrl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatImageImageUrl' from JSON`);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const AlignmentChatImageType$inboundSchema = z.enum(AlignmentChatImageType);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const AlignmentChatImage$inboundSchema = z.object({
|
|
22
|
+
image_url: z.lazy(() => AlignmentChatImageImageUrl$inboundSchema),
|
|
23
|
+
type: AlignmentChatImageType$inboundSchema,
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"image_url": "imageUrl",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export function alignmentChatImageFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => AlignmentChatImage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatImage' from JSON`);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=alignmentchatimage.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { AlignmentChatAudio } from "./alignmentchataudio.js";
|
|
5
|
+
import { AlignmentChatImage } from "./alignmentchatimage.js";
|
|
6
|
+
import { AlignmentChatToolCall } from "./alignmentchattoolcall.js";
|
|
7
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
8
|
+
export declare const AlignmentChatRejectedRole: {
|
|
9
|
+
readonly Assistant: "assistant";
|
|
10
|
+
};
|
|
11
|
+
export type AlignmentChatRejectedRole = ClosedEnum<typeof AlignmentChatRejectedRole>;
|
|
12
|
+
/**
|
|
13
|
+
* The assistant message of the withheld turn, without reasoning. `audio` holds the id and transcript of the audio, without `data` or `expires_at`.
|
|
14
|
+
*/
|
|
15
|
+
export type AlignmentChatRejected = {
|
|
16
|
+
/**
|
|
17
|
+
* The audio of the withheld message: its `id` and `transcript`. The plugin does not retain `data` or `expires_at`.
|
|
18
|
+
*/
|
|
19
|
+
audio?: AlignmentChatAudio | undefined;
|
|
20
|
+
content: string | null;
|
|
21
|
+
images?: Array<AlignmentChatImage> | undefined;
|
|
22
|
+
refusal: string | null;
|
|
23
|
+
role: AlignmentChatRejectedRole;
|
|
24
|
+
toolCalls?: Array<AlignmentChatToolCall> | undefined;
|
|
25
|
+
};
|
|
26
|
+
/** @internal */
|
|
27
|
+
export declare const AlignmentChatRejectedRole$inboundSchema: z.ZodEnum<typeof AlignmentChatRejectedRole>;
|
|
28
|
+
/** @internal */
|
|
29
|
+
export declare const AlignmentChatRejected$inboundSchema: z.ZodType<AlignmentChatRejected, unknown>;
|
|
30
|
+
export declare function alignmentChatRejectedFromJSON(jsonString: string): SafeParseResult<AlignmentChatRejected, SDKValidationError>;
|
|
31
|
+
//# sourceMappingURL=alignmentchatrejected.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 435622aeeeaf
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { AlignmentChatAudio$inboundSchema, } from "./alignmentchataudio.js";
|
|
9
|
+
import { AlignmentChatImage$inboundSchema, } from "./alignmentchatimage.js";
|
|
10
|
+
import { AlignmentChatToolCall$inboundSchema, } from "./alignmentchattoolcall.js";
|
|
11
|
+
export const AlignmentChatRejectedRole = {
|
|
12
|
+
Assistant: "assistant",
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const AlignmentChatRejectedRole$inboundSchema = z.enum(AlignmentChatRejectedRole);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AlignmentChatRejected$inboundSchema = z.object({
|
|
18
|
+
audio: AlignmentChatAudio$inboundSchema.optional(),
|
|
19
|
+
content: z.nullable(z.string()),
|
|
20
|
+
images: z.array(AlignmentChatImage$inboundSchema).optional(),
|
|
21
|
+
refusal: z.nullable(z.string()),
|
|
22
|
+
role: AlignmentChatRejectedRole$inboundSchema,
|
|
23
|
+
tool_calls: z.array(AlignmentChatToolCall$inboundSchema).optional(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"tool_calls": "toolCalls",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
export function alignmentChatRejectedFromJSON(jsonString) {
|
|
30
|
+
return safeParse(jsonString, (x) => AlignmentChatRejected$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatRejected' from JSON`);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=alignmentchatrejected.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export type AlignmentChatToolCallFunction = {
|
|
6
|
+
arguments: string;
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const AlignmentChatToolCallType: {
|
|
10
|
+
readonly Function: "function";
|
|
11
|
+
};
|
|
12
|
+
export type AlignmentChatToolCallType = ClosedEnum<typeof AlignmentChatToolCallType>;
|
|
13
|
+
export type AlignmentChatToolCall = {
|
|
14
|
+
function: AlignmentChatToolCallFunction;
|
|
15
|
+
id: string;
|
|
16
|
+
type: AlignmentChatToolCallType;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const AlignmentChatToolCallFunction$inboundSchema: z.ZodType<AlignmentChatToolCallFunction, unknown>;
|
|
20
|
+
export declare function alignmentChatToolCallFunctionFromJSON(jsonString: string): SafeParseResult<AlignmentChatToolCallFunction, SDKValidationError>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const AlignmentChatToolCallType$inboundSchema: z.ZodEnum<typeof AlignmentChatToolCallType>;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const AlignmentChatToolCall$inboundSchema: z.ZodType<AlignmentChatToolCall, unknown>;
|
|
25
|
+
export declare function alignmentChatToolCallFromJSON(jsonString: string): SafeParseResult<AlignmentChatToolCall, SDKValidationError>;
|
|
26
|
+
//# sourceMappingURL=alignmentchattoolcall.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 6dab9dad37b6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const AlignmentChatToolCallType = {
|
|
8
|
+
Function: "function",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const AlignmentChatToolCallFunction$inboundSchema = z.object({
|
|
12
|
+
arguments: z.string(),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export function alignmentChatToolCallFunctionFromJSON(jsonString) {
|
|
16
|
+
return safeParse(jsonString, (x) => AlignmentChatToolCallFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatToolCallFunction' from JSON`);
|
|
17
|
+
}
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const AlignmentChatToolCallType$inboundSchema = z.enum(AlignmentChatToolCallType);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const AlignmentChatToolCall$inboundSchema = z.object({
|
|
22
|
+
function: z.lazy(() => AlignmentChatToolCallFunction$inboundSchema),
|
|
23
|
+
id: z.string(),
|
|
24
|
+
type: AlignmentChatToolCallType$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
export function alignmentChatToolCallFromJSON(jsonString) {
|
|
27
|
+
return safeParse(jsonString, (x) => AlignmentChatToolCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentChatToolCall' from JSON`);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=alignmentchattoolcall.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AlignmentPluginMode: {
|
|
7
|
+
readonly Enforce: "enforce";
|
|
8
|
+
readonly Audit: "audit";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
|
|
12
|
+
*/
|
|
13
|
+
export type AlignmentPluginMode = OpenEnum<typeof AlignmentPluginMode>;
|
|
14
|
+
/**
|
|
15
|
+
* Beta. States the listed rules to the model and evaluates every turn against them. Requests are evaluated only for entities admitted to the beta; the configuration, metadata, and error shapes may change.
|
|
16
|
+
*/
|
|
17
|
+
export type AlignmentPlugin = {
|
|
18
|
+
id: "alignment";
|
|
19
|
+
/**
|
|
20
|
+
* Whether the rules are stated to the model in a system message on every provider call. Default true.
|
|
21
|
+
*/
|
|
22
|
+
instruct?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Provider calls made again after a blocked turn, in enforce mode. Default 1.
|
|
25
|
+
*/
|
|
26
|
+
maxRetries?: number | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
|
|
29
|
+
*/
|
|
30
|
+
mode?: AlignmentPluginMode | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Texts that state what the reply must do or must not do. Each rule is evaluated on its own.
|
|
33
|
+
*/
|
|
34
|
+
rules: Array<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Probability at or above which a rule is broken. Default 0.7.
|
|
37
|
+
*/
|
|
38
|
+
threshold?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const AlignmentPluginMode$outboundSchema: z.ZodType<string, AlignmentPluginMode>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type AlignmentPlugin$Outbound = {
|
|
44
|
+
id: "alignment";
|
|
45
|
+
instruct?: boolean | undefined;
|
|
46
|
+
max_retries?: number | undefined;
|
|
47
|
+
mode?: string | undefined;
|
|
48
|
+
rules: Array<string>;
|
|
49
|
+
threshold?: number | undefined;
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const AlignmentPlugin$outboundSchema: z.ZodType<AlignmentPlugin$Outbound, AlignmentPlugin>;
|
|
53
|
+
export declare function alignmentPluginToJSON(alignmentPlugin: AlignmentPlugin): string;
|
|
54
|
+
//# sourceMappingURL=alignmentplugin.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d60fbed09ef4
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `enforce`.
|
|
10
|
+
*/
|
|
11
|
+
export const AlignmentPluginMode = {
|
|
12
|
+
Enforce: "enforce",
|
|
13
|
+
Audit: "audit",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const AlignmentPluginMode$outboundSchema = openEnums.outboundSchema(AlignmentPluginMode);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const AlignmentPlugin$outboundSchema = z.object({
|
|
19
|
+
id: z.literal("alignment"),
|
|
20
|
+
instruct: z.boolean().optional(),
|
|
21
|
+
maxRetries: z.int().optional(),
|
|
22
|
+
mode: AlignmentPluginMode$outboundSchema.optional(),
|
|
23
|
+
rules: z.array(z.string()),
|
|
24
|
+
threshold: z.number().optional(),
|
|
25
|
+
}).transform((v) => {
|
|
26
|
+
return remap$(v, {
|
|
27
|
+
maxRetries: "max_retries",
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export function alignmentPluginToJSON(alignmentPlugin) {
|
|
31
|
+
return JSON.stringify(AlignmentPlugin$outboundSchema.parse(alignmentPlugin));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=alignmentplugin.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { AlignmentChatRejected } from "./alignmentchatrejected.js";
|
|
4
|
+
import { AlignmentResponsesRejected } from "./alignmentresponsesrejected.js";
|
|
5
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
|
+
export type AlignmentRejected = AlignmentChatRejected | Array<AlignmentResponsesRejected>;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const AlignmentRejected$inboundSchema: z.ZodType<AlignmentRejected, unknown>;
|
|
9
|
+
export declare function alignmentRejectedFromJSON(jsonString: string): SafeParseResult<AlignmentRejected, SDKValidationError>;
|
|
10
|
+
//# sourceMappingURL=alignmentrejected.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9c98493f46cb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { AlignmentChatRejected$inboundSchema, } from "./alignmentchatrejected.js";
|
|
8
|
+
import { AlignmentResponsesRejected$inboundSchema, } from "./alignmentresponsesrejected.js";
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const AlignmentRejected$inboundSchema = z.union([
|
|
11
|
+
AlignmentChatRejected$inboundSchema,
|
|
12
|
+
z.array(AlignmentResponsesRejected$inboundSchema),
|
|
13
|
+
]);
|
|
14
|
+
export function alignmentRejectedFromJSON(jsonString) {
|
|
15
|
+
return safeParse(jsonString, (x) => AlignmentRejected$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AlignmentRejected' from JSON`);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=alignmentrejected.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { OutputItemApplyPatchCall } from "./outputitemapplypatchcall.js";
|
|
6
|
+
import { OutputItemCodeInterpreterCall } from "./outputitemcodeinterpretercall.js";
|
|
7
|
+
import { OutputItemCustomToolCall } from "./outputitemcustomtoolcall.js";
|
|
8
|
+
import { OutputItemFileSearchCall } from "./outputitemfilesearchcall.js";
|
|
9
|
+
import { OutputItemFunctionCall } from "./outputitemfunctioncall.js";
|
|
10
|
+
import { OutputItemImageGenerationCall } from "./outputitemimagegenerationcall.js";
|
|
11
|
+
import { OutputItemReasoning } from "./outputitemreasoning.js";
|
|
12
|
+
import { OutputItemWebSearchCall } from "./outputitemwebsearchcall.js";
|
|
13
|
+
import { OutputMessage } from "./outputmessage.js";
|
|
14
|
+
export type AlignmentResponsesRejected = OutputItemApplyPatchCall | OutputItemCodeInterpreterCall | OutputItemCustomToolCall | OutputItemFileSearchCall | OutputItemFunctionCall | OutputItemImageGenerationCall | OutputMessage | OutputItemReasoning | OutputItemWebSearchCall | discriminatedUnionTypes.Unknown<"type">;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const AlignmentResponsesRejected$inboundSchema: z.ZodType<AlignmentResponsesRejected, unknown>;
|
|
17
|
+
export declare function alignmentResponsesRejectedFromJSON(jsonString: string): SafeParseResult<AlignmentResponsesRejected, SDKValidationError>;
|
|
18
|
+
//# sourceMappingURL=alignmentresponsesrejected.d.ts.map
|