@openrouter/sdk 1.5.23 → 1.5.25
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/alphaExtractionsCreate.d.ts +19 -0
- package/esm/funcs/alphaExtractionsCreate.js +105 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/classifierfiltersfilter.d.ts +10 -0
- package/esm/models/classifierfiltersfilter.js +16 -0
- package/esm/models/classifierscalarfilter.d.ts +35 -0
- package/esm/models/classifierscalarfilter.js +21 -0
- package/esm/models/classifierscalarfilteroperator.d.ts +16 -0
- package/esm/models/classifierscalarfilteroperator.js +15 -0
- package/esm/models/classifiersetfilter.d.ts +32 -0
- package/esm/models/classifiersetfilter.js +21 -0
- package/esm/models/classifiersetfilteroperator.d.ts +16 -0
- package/esm/models/classifiersetfilteroperator.js +15 -0
- package/esm/models/decisionsresponse.d.ts +3 -3
- package/esm/models/decisionsresponse.js +3 -3
- package/esm/models/extractiondateanswer.d.ts +46 -0
- package/esm/models/extractiondateanswer.js +37 -0
- package/esm/models/extractiondatefield.d.ts +22 -0
- package/esm/models/extractiondatefield.js +20 -0
- package/esm/models/extractiondatetimeanswer.d.ts +46 -0
- package/esm/models/extractiondatetimeanswer.js +37 -0
- package/esm/models/extractiondatetimefield.d.ts +22 -0
- package/esm/models/extractiondatetimefield.js +20 -0
- package/esm/models/extractiondurationanswer.d.ts +50 -0
- package/esm/models/extractiondurationanswer.js +38 -0
- package/esm/models/extractiondurationfield.d.ts +34 -0
- package/esm/models/extractiondurationfield.js +23 -0
- package/esm/models/extractionestimateanswer.d.ts +89 -0
- package/esm/models/extractionestimateanswer.js +80 -0
- package/esm/models/extractionestimatefield.d.ts +70 -0
- package/esm/models/extractionestimatefield.js +65 -0
- package/esm/models/extractionforecastanswer.d.ts +72 -0
- package/esm/models/extractionforecastanswer.js +72 -0
- package/esm/models/extractionforecastfield.d.ts +90 -0
- package/esm/models/extractionforecastfield.js +80 -0
- package/esm/models/extractionforecaststep.d.ts +50 -0
- package/esm/models/extractionforecaststep.js +57 -0
- package/esm/models/extractionlistanswer.d.ts +51 -0
- package/esm/models/extractionlistanswer.js +47 -0
- package/esm/models/extractionlistfield.d.ts +38 -0
- package/esm/models/extractionlistfield.js +31 -0
- package/esm/models/extractionnumberanswer.d.ts +46 -0
- package/esm/models/extractionnumberanswer.js +37 -0
- package/esm/models/extractionnumberfield.d.ts +31 -0
- package/esm/models/extractionnumberfield.js +23 -0
- package/esm/models/extractionsrequest.d.ts +75 -0
- package/esm/models/extractionsrequest.js +65 -0
- package/esm/models/extractionsresponse.d.ts +42 -0
- package/esm/models/extractionsresponse.js +61 -0
- package/esm/models/extractionsusage.d.ts +19 -0
- package/esm/models/extractionsusage.js +29 -0
- package/esm/models/extractiontextanswer.d.ts +46 -0
- package/esm/models/extractiontextanswer.js +37 -0
- package/esm/models/extractiontextfield.d.ts +22 -0
- package/esm/models/extractiontextfield.js +20 -0
- package/esm/models/extractiontimeanswer.d.ts +46 -0
- package/esm/models/extractiontimeanswer.js +37 -0
- package/esm/models/extractiontimefield.d.ts +22 -0
- package/esm/models/extractiontimefield.js +20 -0
- package/esm/models/filter.d.ts +10 -0
- package/esm/models/filter.js +14 -0
- package/esm/models/generationresponse.d.ts +1 -0
- package/esm/models/generationresponse.js +1 -0
- package/esm/models/imagegenerationrequest.d.ts +2 -2
- package/esm/models/index.d.ts +33 -0
- package/esm/models/index.js +33 -0
- package/esm/models/observabilityfilterrulegroup.d.ts +5 -5
- package/esm/models/observabilityfilterrulegroup.js +5 -7
- package/esm/models/operations/createapialphaextractions.d.ts +57 -0
- package/esm/models/operations/createapialphaextractions.js +26 -0
- package/esm/models/operations/deleteinternvaultsecret.d.ts +1 -1
- package/esm/models/operations/deletevaultsecret.d.ts +1 -1
- package/esm/models/operations/getanalyticsmeta.d.ts +6 -50
- package/esm/models/operations/getanalyticsmeta.js +6 -41
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/queryanalytics.d.ts +5 -85
- package/esm/models/operations/queryanalytics.js +3 -60
- package/esm/models/operator.d.ts +50 -0
- package/esm/models/operator.js +46 -0
- package/esm/models/scalarfilter.d.ts +35 -0
- package/esm/models/scalarfilter.js +21 -0
- package/esm/models/scalarfilteroperator.d.ts +20 -0
- package/esm/models/scalarfilteroperator.js +19 -0
- package/esm/models/setfilter.d.ts +37 -0
- package/esm/models/setfilter.js +27 -0
- package/esm/models/setfilteroperator.d.ts +16 -0
- package/esm/models/setfilteroperator.js +15 -0
- package/esm/models/vaultsecretwriterequest.d.ts +1 -1
- package/esm/sdk/alpha.d.ts +3 -0
- package/esm/sdk/alpha.js +4 -0
- package/esm/sdk/extractions.d.ts +13 -0
- package/esm/sdk/extractions.js +19 -0
- package/jsr.json +1 -1
- package/package.json +7 -7
|
@@ -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
|
+
* Submit an Extractions request
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Extracts, computes, estimates or forecasts typed fields from a state string and image assets using an extraction-style System One model. Alpha: the shape is not stable.
|
|
17
|
+
*/
|
|
18
|
+
export declare function alphaExtractionsCreate(client: OpenRouterCore, request: operations.CreateApiAlphaExtractionsRequest, options?: RequestOptions): APIPromise<Result<models.ExtractionsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
//# sourceMappingURL=alphaExtractionsCreate.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 317c66b4f586
|
|
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 { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.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 { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { ExtractionsResponse$inboundSchema as models_ExtractionsResponse$inboundSchema } from "../models/extractionsresponse.js";
|
|
14
|
+
import { CreateApiAlphaExtractionsServerList } from "../models/operations/createapialphaextractions.js";
|
|
15
|
+
import { CreateApiAlphaExtractionsRequest$outboundSchema as operations_CreateApiAlphaExtractionsRequest$outboundSchema } from "../models/operations/createapialphaextractions.js";
|
|
16
|
+
import { APIPromise } from "../types/async.js";
|
|
17
|
+
/**
|
|
18
|
+
* Submit an Extractions request
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Extracts, computes, estimates or forecasts typed fields from a state string and image assets using an extraction-style System One model. Alpha: the shape is not stable.
|
|
22
|
+
*/
|
|
23
|
+
export function alphaExtractionsCreate(client, request, options) {
|
|
24
|
+
return new APIPromise($do(client, request, options));
|
|
25
|
+
}
|
|
26
|
+
async function $do(client, request, options) {
|
|
27
|
+
const parsed = safeParse(request, (value) => operations_CreateApiAlphaExtractionsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
28
|
+
if (!parsed.ok) {
|
|
29
|
+
return [parsed, { status: "invalid" }];
|
|
30
|
+
}
|
|
31
|
+
const payload = parsed.value;
|
|
32
|
+
const body = encodeJSON("body", payload.ExtractionsRequest, {
|
|
33
|
+
explode: true,
|
|
34
|
+
});
|
|
35
|
+
const baseURL = options?.serverURL
|
|
36
|
+
|| pathToFunc(CreateApiAlphaExtractionsServerList[0], {
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
})();
|
|
39
|
+
const path = pathToFunc("/api/alpha/extractions")();
|
|
40
|
+
const headers = new Headers(compactMap({
|
|
41
|
+
"Content-Type": "application/json",
|
|
42
|
+
Accept: "application/json",
|
|
43
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
44
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
45
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
46
|
+
}));
|
|
47
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
48
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
49
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
50
|
+
const context = {
|
|
51
|
+
options: client._options,
|
|
52
|
+
baseURL: baseURL ?? "",
|
|
53
|
+
operationID: "createApiAlphaExtractions",
|
|
54
|
+
oAuth2Scopes: null,
|
|
55
|
+
resolvedSecurity: requestSecurity,
|
|
56
|
+
securitySource: client._options.apiKey,
|
|
57
|
+
retryConfig: options?.retries
|
|
58
|
+
|| client._options.retryConfig
|
|
59
|
+
|| {
|
|
60
|
+
strategy: "backoff",
|
|
61
|
+
backoff: {
|
|
62
|
+
initialInterval: 500,
|
|
63
|
+
maxInterval: 60000,
|
|
64
|
+
exponent: 1.5,
|
|
65
|
+
maxElapsedTime: 3600000,
|
|
66
|
+
},
|
|
67
|
+
retryConnectionErrors: true,
|
|
68
|
+
}
|
|
69
|
+
|| { strategy: "none" },
|
|
70
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
71
|
+
};
|
|
72
|
+
const requestRes = client._createRequest(context, {
|
|
73
|
+
security: requestSecurity,
|
|
74
|
+
method: "POST",
|
|
75
|
+
baseURL: baseURL,
|
|
76
|
+
path: path,
|
|
77
|
+
headers: headers,
|
|
78
|
+
body: body,
|
|
79
|
+
userAgent: client._options.userAgent,
|
|
80
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
81
|
+
}, options);
|
|
82
|
+
if (!requestRes.ok) {
|
|
83
|
+
return [requestRes, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const req = requestRes.value;
|
|
86
|
+
const doResult = await client._do(req, {
|
|
87
|
+
context,
|
|
88
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
89
|
+
retryConfig: context.retryConfig,
|
|
90
|
+
retryCodes: context.retryCodes,
|
|
91
|
+
});
|
|
92
|
+
if (!doResult.ok) {
|
|
93
|
+
return [doResult, { status: "request-error", request: req }];
|
|
94
|
+
}
|
|
95
|
+
const response = doResult.value;
|
|
96
|
+
const responseFields = {
|
|
97
|
+
HttpMeta: { Response: response, Request: req },
|
|
98
|
+
};
|
|
99
|
+
const [result] = await M.match(M.json(200, models_ExtractionsResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
|
+
if (!result.ok) {
|
|
101
|
+
return [result, { status: "complete", request: req, response }];
|
|
102
|
+
}
|
|
103
|
+
return [result, { status: "complete", request: req, response }];
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=alphaExtractionsCreate.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.5.
|
|
53
|
+
readonly sdkVersion: "1.5.25";
|
|
54
54
|
readonly genVersion: "2.950.13";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.25 2.950.13 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.5.
|
|
32
|
+
sdkVersion: "1.5.25",
|
|
33
33
|
genVersion: "2.950.13",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.25 2.950.13 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierScalarFilter, ClassifierScalarFilter$Outbound } from "./classifierscalarfilter.js";
|
|
3
|
+
import { ClassifierSetFilter, ClassifierSetFilter$Outbound } from "./classifiersetfilter.js";
|
|
4
|
+
export type ClassifierFiltersFilter = ClassifierScalarFilter | ClassifierSetFilter;
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type ClassifierFiltersFilter$Outbound = ClassifierScalarFilter$Outbound | ClassifierSetFilter$Outbound;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ClassifierFiltersFilter$outboundSchema: z.ZodType<ClassifierFiltersFilter$Outbound, ClassifierFiltersFilter>;
|
|
9
|
+
export declare function classifierFiltersFilterToJSON(classifierFiltersFilter: ClassifierFiltersFilter): string;
|
|
10
|
+
//# sourceMappingURL=classifierfiltersfilter.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0dfaa0b42d0d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierScalarFilter$outboundSchema, } from "./classifierscalarfilter.js";
|
|
7
|
+
import { ClassifierSetFilter$outboundSchema, } from "./classifiersetfilter.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ClassifierFiltersFilter$outboundSchema = z.union([
|
|
10
|
+
ClassifierScalarFilter$outboundSchema,
|
|
11
|
+
ClassifierSetFilter$outboundSchema,
|
|
12
|
+
]);
|
|
13
|
+
export function classifierFiltersFilterToJSON(classifierFiltersFilter) {
|
|
14
|
+
return JSON.stringify(ClassifierFiltersFilter$outboundSchema.parse(classifierFiltersFilter));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=classifierfiltersfilter.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierScalarFilterOperator } from "./classifierscalarfilteroperator.js";
|
|
3
|
+
/**
|
|
4
|
+
* Scalar (string or number) filter value.
|
|
5
|
+
*/
|
|
6
|
+
export type ClassifierScalarFilterValue = string | number;
|
|
7
|
+
export type ClassifierScalarFilter = {
|
|
8
|
+
/**
|
|
9
|
+
* Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
|
|
10
|
+
*/
|
|
11
|
+
field: string;
|
|
12
|
+
/**
|
|
13
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
14
|
+
*/
|
|
15
|
+
operator: ClassifierScalarFilterOperator;
|
|
16
|
+
/**
|
|
17
|
+
* Scalar (string or number) filter value.
|
|
18
|
+
*/
|
|
19
|
+
value: string | number;
|
|
20
|
+
};
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type ClassifierScalarFilterValue$Outbound = string | number;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const ClassifierScalarFilterValue$outboundSchema: z.ZodType<ClassifierScalarFilterValue$Outbound, ClassifierScalarFilterValue>;
|
|
25
|
+
export declare function classifierScalarFilterValueToJSON(classifierScalarFilterValue: ClassifierScalarFilterValue): string;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type ClassifierScalarFilter$Outbound = {
|
|
28
|
+
field: string;
|
|
29
|
+
operator: string;
|
|
30
|
+
value: string | number;
|
|
31
|
+
};
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const ClassifierScalarFilter$outboundSchema: z.ZodType<ClassifierScalarFilter$Outbound, ClassifierScalarFilter>;
|
|
34
|
+
export declare function classifierScalarFilterToJSON(classifierScalarFilter: ClassifierScalarFilter): string;
|
|
35
|
+
//# sourceMappingURL=classifierscalarfilter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 46c64a60f2ad
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierScalarFilterOperator$outboundSchema, } from "./classifierscalarfilteroperator.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ClassifierScalarFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
9
|
+
export function classifierScalarFilterValueToJSON(classifierScalarFilterValue) {
|
|
10
|
+
return JSON.stringify(ClassifierScalarFilterValue$outboundSchema.parse(classifierScalarFilterValue));
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ClassifierScalarFilter$outboundSchema = z.object({
|
|
14
|
+
field: z.string(),
|
|
15
|
+
operator: ClassifierScalarFilterOperator$outboundSchema,
|
|
16
|
+
value: z.union([z.string(), z.number()]),
|
|
17
|
+
});
|
|
18
|
+
export function classifierScalarFilterToJSON(classifierScalarFilter) {
|
|
19
|
+
return JSON.stringify(ClassifierScalarFilter$outboundSchema.parse(classifierScalarFilter));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=classifierscalarfilter.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ClassifierScalarFilterOperator: {
|
|
7
|
+
readonly Eq: "eq";
|
|
8
|
+
readonly Neq: "neq";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
12
|
+
*/
|
|
13
|
+
export type ClassifierScalarFilterOperator = OpenEnum<typeof ClassifierScalarFilterOperator>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ClassifierScalarFilterOperator$outboundSchema: z.ZodType<string, ClassifierScalarFilterOperator>;
|
|
16
|
+
//# sourceMappingURL=classifierscalarfilteroperator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: be3daabcb488
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Equality operator taking a scalar filter value. Ordered comparisons are not available because classification values are strings.
|
|
8
|
+
*/
|
|
9
|
+
export const ClassifierScalarFilterOperator = {
|
|
10
|
+
Eq: "eq",
|
|
11
|
+
Neq: "neq",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ClassifierScalarFilterOperator$outboundSchema = openEnums.outboundSchema(ClassifierScalarFilterOperator);
|
|
15
|
+
//# sourceMappingURL=classifierscalarfilteroperator.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClassifierSetFilterOperator } from "./classifiersetfilteroperator.js";
|
|
3
|
+
export type ClassifierSetFilterValue = string | number;
|
|
4
|
+
export type ClassifierSetFilter = {
|
|
5
|
+
/**
|
|
6
|
+
* Classifier dimension name to filter on (snake_case identifier, e.g. "department", "work_type").
|
|
7
|
+
*/
|
|
8
|
+
field: string;
|
|
9
|
+
/**
|
|
10
|
+
* Set-membership operator taking an array filter value.
|
|
11
|
+
*/
|
|
12
|
+
operator: ClassifierSetFilterOperator;
|
|
13
|
+
/**
|
|
14
|
+
* Array of scalar filter values.
|
|
15
|
+
*/
|
|
16
|
+
value: Array<string | number>;
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type ClassifierSetFilterValue$Outbound = string | number;
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ClassifierSetFilterValue$outboundSchema: z.ZodType<ClassifierSetFilterValue$Outbound, ClassifierSetFilterValue>;
|
|
22
|
+
export declare function classifierSetFilterValueToJSON(classifierSetFilterValue: ClassifierSetFilterValue): string;
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type ClassifierSetFilter$Outbound = {
|
|
25
|
+
field: string;
|
|
26
|
+
operator: string;
|
|
27
|
+
value: Array<string | number>;
|
|
28
|
+
};
|
|
29
|
+
/** @internal */
|
|
30
|
+
export declare const ClassifierSetFilter$outboundSchema: z.ZodType<ClassifierSetFilter$Outbound, ClassifierSetFilter>;
|
|
31
|
+
export declare function classifierSetFilterToJSON(classifierSetFilter: ClassifierSetFilter): string;
|
|
32
|
+
//# sourceMappingURL=classifiersetfilter.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 469f32f201f3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { ClassifierSetFilterOperator$outboundSchema, } from "./classifiersetfilteroperator.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ClassifierSetFilterValue$outboundSchema = z.union([z.string(), z.number()]);
|
|
9
|
+
export function classifierSetFilterValueToJSON(classifierSetFilterValue) {
|
|
10
|
+
return JSON.stringify(ClassifierSetFilterValue$outboundSchema.parse(classifierSetFilterValue));
|
|
11
|
+
}
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ClassifierSetFilter$outboundSchema = z.object({
|
|
14
|
+
field: z.string(),
|
|
15
|
+
operator: ClassifierSetFilterOperator$outboundSchema,
|
|
16
|
+
value: z.array(z.union([z.string(), z.number()])),
|
|
17
|
+
});
|
|
18
|
+
export function classifierSetFilterToJSON(classifierSetFilter) {
|
|
19
|
+
return JSON.stringify(ClassifierSetFilter$outboundSchema.parse(classifierSetFilter));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=classifiersetfilter.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* Set-membership operator taking an array filter value.
|
|
5
|
+
*/
|
|
6
|
+
export declare const ClassifierSetFilterOperator: {
|
|
7
|
+
readonly In: "in";
|
|
8
|
+
readonly NotIn: "not_in";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Set-membership operator taking an array filter value.
|
|
12
|
+
*/
|
|
13
|
+
export type ClassifierSetFilterOperator = OpenEnum<typeof ClassifierSetFilterOperator>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ClassifierSetFilterOperator$outboundSchema: z.ZodType<string, ClassifierSetFilterOperator>;
|
|
16
|
+
//# sourceMappingURL=classifiersetfilteroperator.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 51a625e91249
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
/**
|
|
7
|
+
* Set-membership operator taking an array filter value.
|
|
8
|
+
*/
|
|
9
|
+
export const ClassifierSetFilterOperator = {
|
|
10
|
+
In: "in",
|
|
11
|
+
NotIn: "not_in",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ClassifierSetFilterOperator$outboundSchema = openEnums.outboundSchema(ClassifierSetFilterOperator);
|
|
15
|
+
//# sourceMappingURL=classifiersetfilteroperator.js.map
|
|
@@ -9,7 +9,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* A Decisions answer using a boolean, choice, score, or image bounding-box evaluation.
|
|
11
11
|
*/
|
|
12
|
-
export type
|
|
12
|
+
export type DecisionsResponseAnswers = DecisionsBoxAnswer | DecisionsChoiceAnswer | DecisionsNoulAnswer | DecisionsScoreAnswer | discriminatedUnionTypes.Unknown<"type">;
|
|
13
13
|
export type DecisionsResponseUsage = {
|
|
14
14
|
cost?: number | undefined;
|
|
15
15
|
inputTokens: number;
|
|
@@ -25,8 +25,8 @@ export type DecisionsResponse = {
|
|
|
25
25
|
usage: DecisionsResponseUsage;
|
|
26
26
|
};
|
|
27
27
|
/** @internal */
|
|
28
|
-
export declare const
|
|
29
|
-
export declare function
|
|
28
|
+
export declare const DecisionsResponseAnswers$inboundSchema: z.ZodType<DecisionsResponseAnswers, unknown>;
|
|
29
|
+
export declare function decisionsResponseAnswersFromJSON(jsonString: string): SafeParseResult<DecisionsResponseAnswers, SDKValidationError>;
|
|
30
30
|
/** @internal */
|
|
31
31
|
export declare const DecisionsResponseUsage$inboundSchema: z.ZodType<DecisionsResponseUsage, unknown>;
|
|
32
32
|
export declare function decisionsResponseUsageFromJSON(jsonString: string): SafeParseResult<DecisionsResponseUsage, SDKValidationError>;
|
|
@@ -11,14 +11,14 @@ import { DecisionsChoiceAnswer$inboundSchema, } from "./decisionschoiceanswer.js
|
|
|
11
11
|
import { DecisionsNoulAnswer$inboundSchema, } from "./decisionsnoulanswer.js";
|
|
12
12
|
import { DecisionsScoreAnswer$inboundSchema, } from "./decisionsscoreanswer.js";
|
|
13
13
|
/** @internal */
|
|
14
|
-
export const
|
|
14
|
+
export const DecisionsResponseAnswers$inboundSchema = discriminatedUnion("type", {
|
|
15
15
|
box: DecisionsBoxAnswer$inboundSchema,
|
|
16
16
|
choice: DecisionsChoiceAnswer$inboundSchema,
|
|
17
17
|
noul: DecisionsNoulAnswer$inboundSchema,
|
|
18
18
|
score: DecisionsScoreAnswer$inboundSchema,
|
|
19
19
|
});
|
|
20
|
-
export function
|
|
21
|
-
return safeParse(jsonString, (x) =>
|
|
20
|
+
export function decisionsResponseAnswersFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => DecisionsResponseAnswers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DecisionsResponseAnswers' from JSON`);
|
|
22
22
|
}
|
|
23
23
|
/** @internal */
|
|
24
24
|
export const DecisionsResponseUsage$inboundSchema = z.object({
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ExtractionDateAnswerSource: {
|
|
9
|
+
readonly State: "state";
|
|
10
|
+
readonly Image: "image";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
14
|
+
*/
|
|
15
|
+
export type ExtractionDateAnswerSource = OpenEnum<typeof ExtractionDateAnswerSource>;
|
|
16
|
+
export type ExtractionDateAnswer = {
|
|
17
|
+
confidence?: number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The most likely value even when `value` is null because `p_null` crossed the threshold.
|
|
20
|
+
*/
|
|
21
|
+
guess?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Probability that the state contains nothing for this field.
|
|
24
|
+
*/
|
|
25
|
+
pNull?: number | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
28
|
+
*/
|
|
29
|
+
source?: ExtractionDateAnswerSource | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.
|
|
32
|
+
*/
|
|
33
|
+
span?: Array<number> | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Confidence in the spelling of text read from an image.
|
|
36
|
+
*/
|
|
37
|
+
spellConfidence?: number | undefined;
|
|
38
|
+
type: "date";
|
|
39
|
+
value: string | null;
|
|
40
|
+
};
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const ExtractionDateAnswerSource$inboundSchema: z.ZodType<ExtractionDateAnswerSource, unknown>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const ExtractionDateAnswer$inboundSchema: z.ZodType<ExtractionDateAnswer, unknown>;
|
|
45
|
+
export declare function extractionDateAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionDateAnswer, SDKValidationError>;
|
|
46
|
+
//# sourceMappingURL=extractiondateanswer.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f956b3a98040
|
|
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 * as openEnums from "../types/enums.js";
|
|
9
|
+
/**
|
|
10
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
11
|
+
*/
|
|
12
|
+
export const ExtractionDateAnswerSource = {
|
|
13
|
+
State: "state",
|
|
14
|
+
Image: "image",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ExtractionDateAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionDateAnswerSource);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ExtractionDateAnswer$inboundSchema = z.object({
|
|
20
|
+
confidence: z.number().optional(),
|
|
21
|
+
guess: z.string().optional(),
|
|
22
|
+
p_null: z.number().optional(),
|
|
23
|
+
source: ExtractionDateAnswerSource$inboundSchema.optional(),
|
|
24
|
+
span: z.array(z.int()).optional(),
|
|
25
|
+
spell_confidence: z.number().optional(),
|
|
26
|
+
type: z.literal("date"),
|
|
27
|
+
value: z.nullable(z.string()),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"p_null": "pNull",
|
|
31
|
+
"spell_confidence": "spellConfidence",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export function extractionDateAnswerFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => ExtractionDateAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionDateAnswer' from JSON`);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=extractiondateanswer.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type ExtractionDateField = {
|
|
3
|
+
/**
|
|
4
|
+
* What the field should contain.
|
|
5
|
+
*/
|
|
6
|
+
instructions?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Probability of null above which `value` is null. Default 0.5.
|
|
9
|
+
*/
|
|
10
|
+
nullThreshold?: number | undefined;
|
|
11
|
+
type: "date";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type ExtractionDateField$Outbound = {
|
|
15
|
+
instructions?: string | undefined;
|
|
16
|
+
null_threshold?: number | undefined;
|
|
17
|
+
type: "date";
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ExtractionDateField$outboundSchema: z.ZodType<ExtractionDateField$Outbound, ExtractionDateField>;
|
|
21
|
+
export declare function extractionDateFieldToJSON(extractionDateField: ExtractionDateField): string;
|
|
22
|
+
//# sourceMappingURL=extractiondatefield.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 1c94ff9c9db3
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ExtractionDateField$outboundSchema = z.object({
|
|
9
|
+
instructions: z.string().optional(),
|
|
10
|
+
nullThreshold: z.number().optional(),
|
|
11
|
+
type: z.literal("date"),
|
|
12
|
+
}).transform((v) => {
|
|
13
|
+
return remap$(v, {
|
|
14
|
+
nullThreshold: "null_threshold",
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
export function extractionDateFieldToJSON(extractionDateField) {
|
|
18
|
+
return JSON.stringify(ExtractionDateField$outboundSchema.parse(extractionDateField));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=extractiondatefield.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ExtractionDatetimeAnswerSource: {
|
|
9
|
+
readonly State: "state";
|
|
10
|
+
readonly Image: "image";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
14
|
+
*/
|
|
15
|
+
export type ExtractionDatetimeAnswerSource = OpenEnum<typeof ExtractionDatetimeAnswerSource>;
|
|
16
|
+
export type ExtractionDatetimeAnswer = {
|
|
17
|
+
confidence?: number | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The most likely value even when `value` is null because `p_null` crossed the threshold.
|
|
20
|
+
*/
|
|
21
|
+
guess?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Probability that the state contains nothing for this field.
|
|
24
|
+
*/
|
|
25
|
+
pNull?: number | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
28
|
+
*/
|
|
29
|
+
source?: ExtractionDatetimeAnswerSource | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Unicode code point offsets [start, end) into the state text: index code points (not UTF-16 code units or UTF-8 bytes), so an emoji or accented letter counts once.
|
|
32
|
+
*/
|
|
33
|
+
span?: Array<number> | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Confidence in the spelling of text read from an image.
|
|
36
|
+
*/
|
|
37
|
+
spellConfidence?: number | undefined;
|
|
38
|
+
type: "datetime";
|
|
39
|
+
value: string | null;
|
|
40
|
+
};
|
|
41
|
+
/** @internal */
|
|
42
|
+
export declare const ExtractionDatetimeAnswerSource$inboundSchema: z.ZodType<ExtractionDatetimeAnswerSource, unknown>;
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const ExtractionDatetimeAnswer$inboundSchema: z.ZodType<ExtractionDatetimeAnswer, unknown>;
|
|
45
|
+
export declare function extractionDatetimeAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionDatetimeAnswer, SDKValidationError>;
|
|
46
|
+
//# sourceMappingURL=extractiondatetimeanswer.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 78957c3e6418
|
|
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 * as openEnums from "../types/enums.js";
|
|
9
|
+
/**
|
|
10
|
+
* Set to `image` when the answer was read from an image rather than the state text.
|
|
11
|
+
*/
|
|
12
|
+
export const ExtractionDatetimeAnswerSource = {
|
|
13
|
+
State: "state",
|
|
14
|
+
Image: "image",
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const ExtractionDatetimeAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionDatetimeAnswerSource);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ExtractionDatetimeAnswer$inboundSchema = z.object({
|
|
20
|
+
confidence: z.number().optional(),
|
|
21
|
+
guess: z.string().optional(),
|
|
22
|
+
p_null: z.number().optional(),
|
|
23
|
+
source: ExtractionDatetimeAnswerSource$inboundSchema.optional(),
|
|
24
|
+
span: z.array(z.int()).optional(),
|
|
25
|
+
spell_confidence: z.number().optional(),
|
|
26
|
+
type: z.literal("datetime"),
|
|
27
|
+
value: z.nullable(z.string()),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"p_null": "pNull",
|
|
31
|
+
"spell_confidence": "spellConfidence",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export function extractionDatetimeAnswerFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => ExtractionDatetimeAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionDatetimeAnswer' from JSON`);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=extractiondatetimeanswer.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
export type ExtractionDatetimeField = {
|
|
3
|
+
/**
|
|
4
|
+
* What the field should contain.
|
|
5
|
+
*/
|
|
6
|
+
instructions?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Probability of null above which `value` is null. Default 0.5.
|
|
9
|
+
*/
|
|
10
|
+
nullThreshold?: number | undefined;
|
|
11
|
+
type: "datetime";
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type ExtractionDatetimeField$Outbound = {
|
|
15
|
+
instructions?: string | undefined;
|
|
16
|
+
null_threshold?: number | undefined;
|
|
17
|
+
type: "datetime";
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ExtractionDatetimeField$outboundSchema: z.ZodType<ExtractionDatetimeField$Outbound, ExtractionDatetimeField>;
|
|
21
|
+
export declare function extractionDatetimeFieldToJSON(extractionDatetimeField: ExtractionDatetimeField): string;
|
|
22
|
+
//# sourceMappingURL=extractiondatetimefield.d.ts.map
|