@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.
Files changed (96) hide show
  1. package/esm/funcs/alphaExtractionsCreate.d.ts +19 -0
  2. package/esm/funcs/alphaExtractionsCreate.js +105 -0
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/models/classifierfiltersfilter.d.ts +10 -0
  6. package/esm/models/classifierfiltersfilter.js +16 -0
  7. package/esm/models/classifierscalarfilter.d.ts +35 -0
  8. package/esm/models/classifierscalarfilter.js +21 -0
  9. package/esm/models/classifierscalarfilteroperator.d.ts +16 -0
  10. package/esm/models/classifierscalarfilteroperator.js +15 -0
  11. package/esm/models/classifiersetfilter.d.ts +32 -0
  12. package/esm/models/classifiersetfilter.js +21 -0
  13. package/esm/models/classifiersetfilteroperator.d.ts +16 -0
  14. package/esm/models/classifiersetfilteroperator.js +15 -0
  15. package/esm/models/decisionsresponse.d.ts +3 -3
  16. package/esm/models/decisionsresponse.js +3 -3
  17. package/esm/models/extractiondateanswer.d.ts +46 -0
  18. package/esm/models/extractiondateanswer.js +37 -0
  19. package/esm/models/extractiondatefield.d.ts +22 -0
  20. package/esm/models/extractiondatefield.js +20 -0
  21. package/esm/models/extractiondatetimeanswer.d.ts +46 -0
  22. package/esm/models/extractiondatetimeanswer.js +37 -0
  23. package/esm/models/extractiondatetimefield.d.ts +22 -0
  24. package/esm/models/extractiondatetimefield.js +20 -0
  25. package/esm/models/extractiondurationanswer.d.ts +50 -0
  26. package/esm/models/extractiondurationanswer.js +38 -0
  27. package/esm/models/extractiondurationfield.d.ts +34 -0
  28. package/esm/models/extractiondurationfield.js +23 -0
  29. package/esm/models/extractionestimateanswer.d.ts +89 -0
  30. package/esm/models/extractionestimateanswer.js +80 -0
  31. package/esm/models/extractionestimatefield.d.ts +70 -0
  32. package/esm/models/extractionestimatefield.js +65 -0
  33. package/esm/models/extractionforecastanswer.d.ts +72 -0
  34. package/esm/models/extractionforecastanswer.js +72 -0
  35. package/esm/models/extractionforecastfield.d.ts +90 -0
  36. package/esm/models/extractionforecastfield.js +80 -0
  37. package/esm/models/extractionforecaststep.d.ts +50 -0
  38. package/esm/models/extractionforecaststep.js +57 -0
  39. package/esm/models/extractionlistanswer.d.ts +51 -0
  40. package/esm/models/extractionlistanswer.js +47 -0
  41. package/esm/models/extractionlistfield.d.ts +38 -0
  42. package/esm/models/extractionlistfield.js +31 -0
  43. package/esm/models/extractionnumberanswer.d.ts +46 -0
  44. package/esm/models/extractionnumberanswer.js +37 -0
  45. package/esm/models/extractionnumberfield.d.ts +31 -0
  46. package/esm/models/extractionnumberfield.js +23 -0
  47. package/esm/models/extractionsrequest.d.ts +75 -0
  48. package/esm/models/extractionsrequest.js +65 -0
  49. package/esm/models/extractionsresponse.d.ts +42 -0
  50. package/esm/models/extractionsresponse.js +61 -0
  51. package/esm/models/extractionsusage.d.ts +19 -0
  52. package/esm/models/extractionsusage.js +29 -0
  53. package/esm/models/extractiontextanswer.d.ts +46 -0
  54. package/esm/models/extractiontextanswer.js +37 -0
  55. package/esm/models/extractiontextfield.d.ts +22 -0
  56. package/esm/models/extractiontextfield.js +20 -0
  57. package/esm/models/extractiontimeanswer.d.ts +46 -0
  58. package/esm/models/extractiontimeanswer.js +37 -0
  59. package/esm/models/extractiontimefield.d.ts +22 -0
  60. package/esm/models/extractiontimefield.js +20 -0
  61. package/esm/models/filter.d.ts +10 -0
  62. package/esm/models/filter.js +14 -0
  63. package/esm/models/generationresponse.d.ts +1 -0
  64. package/esm/models/generationresponse.js +1 -0
  65. package/esm/models/imagegenerationrequest.d.ts +2 -2
  66. package/esm/models/index.d.ts +33 -0
  67. package/esm/models/index.js +33 -0
  68. package/esm/models/observabilityfilterrulegroup.d.ts +5 -5
  69. package/esm/models/observabilityfilterrulegroup.js +5 -7
  70. package/esm/models/operations/createapialphaextractions.d.ts +57 -0
  71. package/esm/models/operations/createapialphaextractions.js +26 -0
  72. package/esm/models/operations/deleteinternvaultsecret.d.ts +1 -1
  73. package/esm/models/operations/deletevaultsecret.d.ts +1 -1
  74. package/esm/models/operations/getanalyticsmeta.d.ts +6 -50
  75. package/esm/models/operations/getanalyticsmeta.js +6 -41
  76. package/esm/models/operations/index.d.ts +1 -0
  77. package/esm/models/operations/index.js +1 -0
  78. package/esm/models/operations/queryanalytics.d.ts +5 -85
  79. package/esm/models/operations/queryanalytics.js +3 -60
  80. package/esm/models/operator.d.ts +50 -0
  81. package/esm/models/operator.js +46 -0
  82. package/esm/models/scalarfilter.d.ts +35 -0
  83. package/esm/models/scalarfilter.js +21 -0
  84. package/esm/models/scalarfilteroperator.d.ts +20 -0
  85. package/esm/models/scalarfilteroperator.js +19 -0
  86. package/esm/models/setfilter.d.ts +37 -0
  87. package/esm/models/setfilter.js +27 -0
  88. package/esm/models/setfilteroperator.d.ts +16 -0
  89. package/esm/models/setfilteroperator.js +15 -0
  90. package/esm/models/vaultsecretwriterequest.d.ts +1 -1
  91. package/esm/sdk/alpha.d.ts +3 -0
  92. package/esm/sdk/alpha.js +4 -0
  93. package/esm/sdk/extractions.d.ts +13 -0
  94. package/esm/sdk/extractions.js +19 -0
  95. package/jsr.json +1 -1
  96. package/package.json +7 -7
@@ -0,0 +1,90 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
+ export declare const Interval: {
4
+ readonly Step: "step";
5
+ readonly Minute: "minute";
6
+ readonly Hour: "hour";
7
+ readonly Day: "day";
8
+ readonly Week: "week";
9
+ readonly Month: "month";
10
+ readonly Quarter: "quarter";
11
+ readonly Year: "year";
12
+ };
13
+ export type Interval = OpenEnum<typeof Interval>;
14
+ export type ExtractionForecastFieldMax = number | string;
15
+ export type ExtractionForecastFieldMin = number | string;
16
+ export declare const ExtractionForecastFieldScale: {
17
+ readonly Linear: "linear";
18
+ readonly Log: "log";
19
+ };
20
+ export type ExtractionForecastFieldScale = OpenEnum<typeof ExtractionForecastFieldScale>;
21
+ export declare const ExtractionForecastFieldStepYear: {
22
+ readonly Year: "year";
23
+ };
24
+ export type ExtractionForecastFieldStepYear = ClosedEnum<typeof ExtractionForecastFieldStepYear>;
25
+ export declare const ExtractionForecastFieldStepMonth: {
26
+ readonly Month: "month";
27
+ };
28
+ export type ExtractionForecastFieldStepMonth = ClosedEnum<typeof ExtractionForecastFieldStepMonth>;
29
+ export type ExtractionForecastFieldStepUnion = number | ExtractionForecastFieldStepMonth | ExtractionForecastFieldStepYear;
30
+ export type ExtractionForecastField = {
31
+ /**
32
+ * Number of forecast steps.
33
+ */
34
+ horizon: number;
35
+ /**
36
+ * What the field should contain.
37
+ */
38
+ instructions?: string | undefined;
39
+ interval: Interval;
40
+ max: number | string;
41
+ min: number | string;
42
+ /**
43
+ * Probability of null above which `value` is null. Default 0.5.
44
+ */
45
+ nullThreshold?: number | undefined;
46
+ scale?: ExtractionForecastFieldScale | undefined;
47
+ step?: number | ExtractionForecastFieldStepMonth | ExtractionForecastFieldStepYear | undefined;
48
+ type: "forecast";
49
+ unit?: string | undefined;
50
+ };
51
+ /** @internal */
52
+ export declare const Interval$outboundSchema: z.ZodType<string, Interval>;
53
+ /** @internal */
54
+ export type ExtractionForecastFieldMax$Outbound = number | string;
55
+ /** @internal */
56
+ export declare const ExtractionForecastFieldMax$outboundSchema: z.ZodType<ExtractionForecastFieldMax$Outbound, ExtractionForecastFieldMax>;
57
+ export declare function extractionForecastFieldMaxToJSON(extractionForecastFieldMax: ExtractionForecastFieldMax): string;
58
+ /** @internal */
59
+ export type ExtractionForecastFieldMin$Outbound = number | string;
60
+ /** @internal */
61
+ export declare const ExtractionForecastFieldMin$outboundSchema: z.ZodType<ExtractionForecastFieldMin$Outbound, ExtractionForecastFieldMin>;
62
+ export declare function extractionForecastFieldMinToJSON(extractionForecastFieldMin: ExtractionForecastFieldMin): string;
63
+ /** @internal */
64
+ export declare const ExtractionForecastFieldScale$outboundSchema: z.ZodType<string, ExtractionForecastFieldScale>;
65
+ /** @internal */
66
+ export declare const ExtractionForecastFieldStepYear$outboundSchema: z.ZodEnum<typeof ExtractionForecastFieldStepYear>;
67
+ /** @internal */
68
+ export declare const ExtractionForecastFieldStepMonth$outboundSchema: z.ZodEnum<typeof ExtractionForecastFieldStepMonth>;
69
+ /** @internal */
70
+ export type ExtractionForecastFieldStepUnion$Outbound = number | string | string;
71
+ /** @internal */
72
+ export declare const ExtractionForecastFieldStepUnion$outboundSchema: z.ZodType<ExtractionForecastFieldStepUnion$Outbound, ExtractionForecastFieldStepUnion>;
73
+ export declare function extractionForecastFieldStepUnionToJSON(extractionForecastFieldStepUnion: ExtractionForecastFieldStepUnion): string;
74
+ /** @internal */
75
+ export type ExtractionForecastField$Outbound = {
76
+ horizon: number;
77
+ instructions?: string | undefined;
78
+ interval: string;
79
+ max: number | string;
80
+ min: number | string;
81
+ null_threshold?: number | undefined;
82
+ scale?: string | undefined;
83
+ step?: number | string | string | undefined;
84
+ type: "forecast";
85
+ unit?: string | undefined;
86
+ };
87
+ /** @internal */
88
+ export declare const ExtractionForecastField$outboundSchema: z.ZodType<ExtractionForecastField$Outbound, ExtractionForecastField>;
89
+ export declare function extractionForecastFieldToJSON(extractionForecastField: ExtractionForecastField): string;
90
+ //# sourceMappingURL=extractionforecastfield.d.ts.map
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 25643b9662b3
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
+ export const Interval = {
9
+ Step: "step",
10
+ Minute: "minute",
11
+ Hour: "hour",
12
+ Day: "day",
13
+ Week: "week",
14
+ Month: "month",
15
+ Quarter: "quarter",
16
+ Year: "year",
17
+ };
18
+ export const ExtractionForecastFieldScale = {
19
+ Linear: "linear",
20
+ Log: "log",
21
+ };
22
+ export const ExtractionForecastFieldStepYear = {
23
+ Year: "year",
24
+ };
25
+ export const ExtractionForecastFieldStepMonth = {
26
+ Month: "month",
27
+ };
28
+ /** @internal */
29
+ export const Interval$outboundSchema = openEnums
30
+ .outboundSchema(Interval);
31
+ /** @internal */
32
+ export const ExtractionForecastFieldMax$outboundSchema = z.union([z.number(), z.string()]);
33
+ export function extractionForecastFieldMaxToJSON(extractionForecastFieldMax) {
34
+ return JSON.stringify(ExtractionForecastFieldMax$outboundSchema.parse(extractionForecastFieldMax));
35
+ }
36
+ /** @internal */
37
+ export const ExtractionForecastFieldMin$outboundSchema = z.union([z.number(), z.string()]);
38
+ export function extractionForecastFieldMinToJSON(extractionForecastFieldMin) {
39
+ return JSON.stringify(ExtractionForecastFieldMin$outboundSchema.parse(extractionForecastFieldMin));
40
+ }
41
+ /** @internal */
42
+ export const ExtractionForecastFieldScale$outboundSchema = openEnums.outboundSchema(ExtractionForecastFieldScale);
43
+ /** @internal */
44
+ export const ExtractionForecastFieldStepYear$outboundSchema = z.enum(ExtractionForecastFieldStepYear);
45
+ /** @internal */
46
+ export const ExtractionForecastFieldStepMonth$outboundSchema = z.enum(ExtractionForecastFieldStepMonth);
47
+ /** @internal */
48
+ export const ExtractionForecastFieldStepUnion$outboundSchema = z.union([
49
+ z.number(),
50
+ ExtractionForecastFieldStepMonth$outboundSchema,
51
+ ExtractionForecastFieldStepYear$outboundSchema,
52
+ ]);
53
+ export function extractionForecastFieldStepUnionToJSON(extractionForecastFieldStepUnion) {
54
+ return JSON.stringify(ExtractionForecastFieldStepUnion$outboundSchema.parse(extractionForecastFieldStepUnion));
55
+ }
56
+ /** @internal */
57
+ export const ExtractionForecastField$outboundSchema = z.object({
58
+ horizon: z.int(),
59
+ instructions: z.string().optional(),
60
+ interval: Interval$outboundSchema,
61
+ max: z.union([z.number(), z.string()]),
62
+ min: z.union([z.number(), z.string()]),
63
+ nullThreshold: z.number().optional(),
64
+ scale: ExtractionForecastFieldScale$outboundSchema.optional(),
65
+ step: z.union([
66
+ z.number(),
67
+ ExtractionForecastFieldStepMonth$outboundSchema,
68
+ ExtractionForecastFieldStepYear$outboundSchema,
69
+ ]).optional(),
70
+ type: z.literal("forecast"),
71
+ unit: z.string().optional(),
72
+ }).transform((v) => {
73
+ return remap$(v, {
74
+ nullThreshold: "null_threshold",
75
+ });
76
+ });
77
+ export function extractionForecastFieldToJSON(extractionForecastField) {
78
+ return JSON.stringify(ExtractionForecastField$outboundSchema.parse(extractionForecastField));
79
+ }
80
+ //# sourceMappingURL=extractionforecastfield.js.map
@@ -0,0 +1,50 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type ExtractionForecastStepMean = number | string;
5
+ export type ExtractionForecastStepMedian = number | string;
6
+ export type ExtractionForecastStepP10 = number | string;
7
+ export type ExtractionForecastStepP90 = number | string;
8
+ export type ExtractionForecastStepQuantile = number | string;
9
+ export type ExtractionForecastStepValue = number | string;
10
+ export type ExtractionForecastStep = {
11
+ mean?: number | string | undefined;
12
+ median?: number | string | undefined;
13
+ /**
14
+ * Probability mass above `max`.
15
+ */
16
+ pAbove?: number | undefined;
17
+ /**
18
+ * Probability mass below `min`.
19
+ */
20
+ pBelow?: number | undefined;
21
+ p10?: number | string | undefined;
22
+ p90?: number | string | undefined;
23
+ /**
24
+ * 99 percentiles, present when the provider is asked for quantiles.
25
+ */
26
+ quantiles?: Array<number | string> | undefined;
27
+ value: number | string | null;
28
+ };
29
+ /** @internal */
30
+ export declare const ExtractionForecastStepMean$inboundSchema: z.ZodType<ExtractionForecastStepMean, unknown>;
31
+ export declare function extractionForecastStepMeanFromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepMean, SDKValidationError>;
32
+ /** @internal */
33
+ export declare const ExtractionForecastStepMedian$inboundSchema: z.ZodType<ExtractionForecastStepMedian, unknown>;
34
+ export declare function extractionForecastStepMedianFromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepMedian, SDKValidationError>;
35
+ /** @internal */
36
+ export declare const ExtractionForecastStepP10$inboundSchema: z.ZodType<ExtractionForecastStepP10, unknown>;
37
+ export declare function extractionForecastStepP10FromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepP10, SDKValidationError>;
38
+ /** @internal */
39
+ export declare const ExtractionForecastStepP90$inboundSchema: z.ZodType<ExtractionForecastStepP90, unknown>;
40
+ export declare function extractionForecastStepP90FromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepP90, SDKValidationError>;
41
+ /** @internal */
42
+ export declare const ExtractionForecastStepQuantile$inboundSchema: z.ZodType<ExtractionForecastStepQuantile, unknown>;
43
+ export declare function extractionForecastStepQuantileFromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepQuantile, SDKValidationError>;
44
+ /** @internal */
45
+ export declare const ExtractionForecastStepValue$inboundSchema: z.ZodType<ExtractionForecastStepValue, unknown>;
46
+ export declare function extractionForecastStepValueFromJSON(jsonString: string): SafeParseResult<ExtractionForecastStepValue, SDKValidationError>;
47
+ /** @internal */
48
+ export declare const ExtractionForecastStep$inboundSchema: z.ZodType<ExtractionForecastStep, unknown>;
49
+ export declare function extractionForecastStepFromJSON(jsonString: string): SafeParseResult<ExtractionForecastStep, SDKValidationError>;
50
+ //# sourceMappingURL=extractionforecaststep.d.ts.map
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5e3688a043e1
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
+ /** @internal */
9
+ export const ExtractionForecastStepMean$inboundSchema = z.union([z.number(), z.string()]);
10
+ export function extractionForecastStepMeanFromJSON(jsonString) {
11
+ return safeParse(jsonString, (x) => ExtractionForecastStepMean$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepMean' from JSON`);
12
+ }
13
+ /** @internal */
14
+ export const ExtractionForecastStepMedian$inboundSchema = z.union([z.number(), z.string()]);
15
+ export function extractionForecastStepMedianFromJSON(jsonString) {
16
+ return safeParse(jsonString, (x) => ExtractionForecastStepMedian$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepMedian' from JSON`);
17
+ }
18
+ /** @internal */
19
+ export const ExtractionForecastStepP10$inboundSchema = z.union([z.number(), z.string()]);
20
+ export function extractionForecastStepP10FromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => ExtractionForecastStepP10$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepP10' from JSON`);
22
+ }
23
+ /** @internal */
24
+ export const ExtractionForecastStepP90$inboundSchema = z.union([z.number(), z.string()]);
25
+ export function extractionForecastStepP90FromJSON(jsonString) {
26
+ return safeParse(jsonString, (x) => ExtractionForecastStepP90$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepP90' from JSON`);
27
+ }
28
+ /** @internal */
29
+ export const ExtractionForecastStepQuantile$inboundSchema = z.union([z.number(), z.string()]);
30
+ export function extractionForecastStepQuantileFromJSON(jsonString) {
31
+ return safeParse(jsonString, (x) => ExtractionForecastStepQuantile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepQuantile' from JSON`);
32
+ }
33
+ /** @internal */
34
+ export const ExtractionForecastStepValue$inboundSchema = z.union([z.number(), z.string()]);
35
+ export function extractionForecastStepValueFromJSON(jsonString) {
36
+ return safeParse(jsonString, (x) => ExtractionForecastStepValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStepValue' from JSON`);
37
+ }
38
+ /** @internal */
39
+ export const ExtractionForecastStep$inboundSchema = z.object({
40
+ mean: z.union([z.number(), z.string()]).optional(),
41
+ median: z.union([z.number(), z.string()]).optional(),
42
+ p_above: z.number().optional(),
43
+ p_below: z.number().optional(),
44
+ p10: z.union([z.number(), z.string()]).optional(),
45
+ p90: z.union([z.number(), z.string()]).optional(),
46
+ quantiles: z.array(z.union([z.number(), z.string()])).optional(),
47
+ value: z.nullable(z.union([z.number(), z.string()])),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ "p_above": "pAbove",
51
+ "p_below": "pBelow",
52
+ });
53
+ });
54
+ export function extractionForecastStepFromJSON(jsonString) {
55
+ return safeParse(jsonString, (x) => ExtractionForecastStep$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionForecastStep' from JSON`);
56
+ }
57
+ //# sourceMappingURL=extractionforecaststep.js.map
@@ -0,0 +1,51 @@
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
+ export type ExtractionListAnswerGuess = string | number;
6
+ /**
7
+ * Set to `image` when the answer was read from an image rather than the state text.
8
+ */
9
+ export declare const ExtractionListAnswerSource: {
10
+ readonly State: "state";
11
+ readonly Image: "image";
12
+ };
13
+ /**
14
+ * Set to `image` when the answer was read from an image rather than the state text.
15
+ */
16
+ export type ExtractionListAnswerSource = OpenEnum<typeof ExtractionListAnswerSource>;
17
+ export type ExtractionListAnswerValue = string | number;
18
+ export type ExtractionListAnswer = {
19
+ confidence?: number | undefined;
20
+ /**
21
+ * The most likely value even when `value` is null because `p_null` crossed the threshold.
22
+ */
23
+ guess?: Array<string | number> | undefined;
24
+ /**
25
+ * Probability that the state contains nothing for this field.
26
+ */
27
+ pNull?: number | undefined;
28
+ /**
29
+ * Set to `image` when the answer was read from an image rather than the state text.
30
+ */
31
+ source?: ExtractionListAnswerSource | undefined;
32
+ spans?: Array<Array<number>> | undefined;
33
+ /**
34
+ * Confidence in the spelling of text read from an image.
35
+ */
36
+ spellConfidence?: number | undefined;
37
+ type: "list";
38
+ value: Array<string | number> | null;
39
+ };
40
+ /** @internal */
41
+ export declare const ExtractionListAnswerGuess$inboundSchema: z.ZodType<ExtractionListAnswerGuess, unknown>;
42
+ export declare function extractionListAnswerGuessFromJSON(jsonString: string): SafeParseResult<ExtractionListAnswerGuess, SDKValidationError>;
43
+ /** @internal */
44
+ export declare const ExtractionListAnswerSource$inboundSchema: z.ZodType<ExtractionListAnswerSource, unknown>;
45
+ /** @internal */
46
+ export declare const ExtractionListAnswerValue$inboundSchema: z.ZodType<ExtractionListAnswerValue, unknown>;
47
+ export declare function extractionListAnswerValueFromJSON(jsonString: string): SafeParseResult<ExtractionListAnswerValue, SDKValidationError>;
48
+ /** @internal */
49
+ export declare const ExtractionListAnswer$inboundSchema: z.ZodType<ExtractionListAnswer, unknown>;
50
+ export declare function extractionListAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionListAnswer, SDKValidationError>;
51
+ //# sourceMappingURL=extractionlistanswer.d.ts.map
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 26a830a1b9b0
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 ExtractionListAnswerSource = {
13
+ State: "state",
14
+ Image: "image",
15
+ };
16
+ /** @internal */
17
+ export const ExtractionListAnswerGuess$inboundSchema = z.union([z.string(), z.number()]);
18
+ export function extractionListAnswerGuessFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => ExtractionListAnswerGuess$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionListAnswerGuess' from JSON`);
20
+ }
21
+ /** @internal */
22
+ export const ExtractionListAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionListAnswerSource);
23
+ /** @internal */
24
+ export const ExtractionListAnswerValue$inboundSchema = z.union([z.string(), z.number()]);
25
+ export function extractionListAnswerValueFromJSON(jsonString) {
26
+ return safeParse(jsonString, (x) => ExtractionListAnswerValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionListAnswerValue' from JSON`);
27
+ }
28
+ /** @internal */
29
+ export const ExtractionListAnswer$inboundSchema = z.object({
30
+ confidence: z.number().optional(),
31
+ guess: z.array(z.union([z.string(), z.number()])).optional(),
32
+ p_null: z.number().optional(),
33
+ source: ExtractionListAnswerSource$inboundSchema.optional(),
34
+ spans: z.array(z.array(z.int())).optional(),
35
+ spell_confidence: z.number().optional(),
36
+ type: z.literal("list"),
37
+ value: z.nullable(z.array(z.union([z.string(), z.number()]))),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "p_null": "pNull",
41
+ "spell_confidence": "spellConfidence",
42
+ });
43
+ });
44
+ export function extractionListAnswerFromJSON(jsonString) {
45
+ return safeParse(jsonString, (x) => ExtractionListAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionListAnswer' from JSON`);
46
+ }
47
+ //# sourceMappingURL=extractionlistanswer.js.map
@@ -0,0 +1,38 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ export declare const Items: {
4
+ readonly Text: "text";
5
+ readonly Number: "number";
6
+ readonly Date: "date";
7
+ };
8
+ export type Items = OpenEnum<typeof Items>;
9
+ export type ExtractionListField = {
10
+ /**
11
+ * Decimal places kept in `value`.
12
+ */
13
+ decimals?: number | undefined;
14
+ /**
15
+ * What the field should contain.
16
+ */
17
+ instructions?: string | undefined;
18
+ items: Items;
19
+ /**
20
+ * Probability of null above which `value` is null. Default 0.5.
21
+ */
22
+ nullThreshold?: number | undefined;
23
+ type: "list";
24
+ };
25
+ /** @internal */
26
+ export declare const Items$outboundSchema: z.ZodType<string, Items>;
27
+ /** @internal */
28
+ export type ExtractionListField$Outbound = {
29
+ decimals?: number | undefined;
30
+ instructions?: string | undefined;
31
+ items: string;
32
+ null_threshold?: number | undefined;
33
+ type: "list";
34
+ };
35
+ /** @internal */
36
+ export declare const ExtractionListField$outboundSchema: z.ZodType<ExtractionListField$Outbound, ExtractionListField>;
37
+ export declare function extractionListFieldToJSON(extractionListField: ExtractionListField): string;
38
+ //# sourceMappingURL=extractionlistfield.d.ts.map
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: babad368b81e
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
+ export const Items = {
9
+ Text: "text",
10
+ Number: "number",
11
+ Date: "date",
12
+ };
13
+ /** @internal */
14
+ export const Items$outboundSchema = openEnums
15
+ .outboundSchema(Items);
16
+ /** @internal */
17
+ export const ExtractionListField$outboundSchema = z.object({
18
+ decimals: z.int().optional(),
19
+ instructions: z.string().optional(),
20
+ items: Items$outboundSchema,
21
+ nullThreshold: z.number().optional(),
22
+ type: z.literal("list"),
23
+ }).transform((v) => {
24
+ return remap$(v, {
25
+ nullThreshold: "null_threshold",
26
+ });
27
+ });
28
+ export function extractionListFieldToJSON(extractionListField) {
29
+ return JSON.stringify(ExtractionListField$outboundSchema.parse(extractionListField));
30
+ }
31
+ //# sourceMappingURL=extractionlistfield.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 ExtractionNumberAnswerSource: {
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 ExtractionNumberAnswerSource = OpenEnum<typeof ExtractionNumberAnswerSource>;
16
+ export type ExtractionNumberAnswer = {
17
+ confidence?: number | undefined;
18
+ /**
19
+ * The most likely value even when `value` is null because `p_null` crossed the threshold.
20
+ */
21
+ guess?: number | 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?: ExtractionNumberAnswerSource | 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: "number";
39
+ value: number | null;
40
+ };
41
+ /** @internal */
42
+ export declare const ExtractionNumberAnswerSource$inboundSchema: z.ZodType<ExtractionNumberAnswerSource, unknown>;
43
+ /** @internal */
44
+ export declare const ExtractionNumberAnswer$inboundSchema: z.ZodType<ExtractionNumberAnswer, unknown>;
45
+ export declare function extractionNumberAnswerFromJSON(jsonString: string): SafeParseResult<ExtractionNumberAnswer, SDKValidationError>;
46
+ //# sourceMappingURL=extractionnumberanswer.d.ts.map
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 39bb8411110e
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 ExtractionNumberAnswerSource = {
13
+ State: "state",
14
+ Image: "image",
15
+ };
16
+ /** @internal */
17
+ export const ExtractionNumberAnswerSource$inboundSchema = openEnums.inboundSchema(ExtractionNumberAnswerSource);
18
+ /** @internal */
19
+ export const ExtractionNumberAnswer$inboundSchema = z.object({
20
+ confidence: z.number().optional(),
21
+ guess: z.number().optional(),
22
+ p_null: z.number().optional(),
23
+ source: ExtractionNumberAnswerSource$inboundSchema.optional(),
24
+ span: z.array(z.int()).optional(),
25
+ spell_confidence: z.number().optional(),
26
+ type: z.literal("number"),
27
+ value: z.nullable(z.number()),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "p_null": "pNull",
31
+ "spell_confidence": "spellConfidence",
32
+ });
33
+ });
34
+ export function extractionNumberAnswerFromJSON(jsonString) {
35
+ return safeParse(jsonString, (x) => ExtractionNumberAnswer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExtractionNumberAnswer' from JSON`);
36
+ }
37
+ //# sourceMappingURL=extractionnumberanswer.js.map
@@ -0,0 +1,31 @@
1
+ import * as z from "zod/v4";
2
+ export type ExtractionNumberField = {
3
+ /**
4
+ * Decimal places kept in `value`.
5
+ */
6
+ decimals?: number | undefined;
7
+ /**
8
+ * What the field should contain.
9
+ */
10
+ instructions?: string | undefined;
11
+ integer?: boolean | undefined;
12
+ /**
13
+ * Probability of null above which `value` is null. Default 0.5.
14
+ */
15
+ nullThreshold?: number | undefined;
16
+ type: "number";
17
+ unit?: string | undefined;
18
+ };
19
+ /** @internal */
20
+ export type ExtractionNumberField$Outbound = {
21
+ decimals?: number | undefined;
22
+ instructions?: string | undefined;
23
+ integer?: boolean | undefined;
24
+ null_threshold?: number | undefined;
25
+ type: "number";
26
+ unit?: string | undefined;
27
+ };
28
+ /** @internal */
29
+ export declare const ExtractionNumberField$outboundSchema: z.ZodType<ExtractionNumberField$Outbound, ExtractionNumberField>;
30
+ export declare function extractionNumberFieldToJSON(extractionNumberField: ExtractionNumberField): string;
31
+ //# sourceMappingURL=extractionnumberfield.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c4c239c1c3f9
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const ExtractionNumberField$outboundSchema = z.object({
9
+ decimals: z.int().optional(),
10
+ instructions: z.string().optional(),
11
+ integer: z.boolean().optional(),
12
+ nullThreshold: z.number().optional(),
13
+ type: z.literal("number"),
14
+ unit: z.string().optional(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ nullThreshold: "null_threshold",
18
+ });
19
+ });
20
+ export function extractionNumberFieldToJSON(extractionNumberField) {
21
+ return JSON.stringify(ExtractionNumberField$outboundSchema.parse(extractionNumberField));
22
+ }
23
+ //# sourceMappingURL=extractionnumberfield.js.map