@retab/node 0.0.48 → 0.0.52
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/README.md +8 -215
- package/dist/api/client.d.ts +2 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -2
- package/dist/api/documents/client.d.ts +3 -3
- package/dist/api/documents/client.d.ts.map +1 -1
- package/dist/api/documents/client.js +3 -3
- package/dist/api/projects/client.d.ts +15 -0
- package/dist/api/projects/client.d.ts.map +1 -0
- package/dist/api/projects/client.js +43 -0
- package/dist/api/projects/documents/client.d.ts +12 -0
- package/dist/api/projects/documents/client.d.ts.map +1 -0
- package/dist/api/projects/documents/client.js +39 -0
- package/dist/api/projects/iterations/client.d.ts +17 -0
- package/dist/api/projects/iterations/client.d.ts.map +1 -0
- package/dist/api/projects/iterations/client.js +64 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -1
- package/dist/generated_types.d.ts +17837 -40090
- package/dist/generated_types.d.ts.map +1 -1
- package/dist/generated_types.js +309 -979
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/types.d.ts +188 -80
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +22 -1
- package/package.json +6 -9
- package/dist/api/consensus/client.d.ts +0 -7
- package/dist/api/consensus/client.d.ts.map +0 -1
- package/dist/api/consensus/client.js +0 -14
- package/dist/errors.d.ts +0 -34
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -53
- package/dist/resource.d.ts +0 -12
- package/dist/resource.d.ts.map +0 -1
- package/dist/resource.js +0 -19
- package/dist/resources/consensus/completions.d.ts +0 -66
- package/dist/resources/consensus/completions.d.ts.map +0 -1
- package/dist/resources/consensus/completions.js +0 -84
- package/dist/resources/consensus/index.d.ts +0 -72
- package/dist/resources/consensus/index.d.ts.map +0 -1
- package/dist/resources/consensus/index.js +0 -76
- package/dist/resources/consensus/responses.d.ts +0 -69
- package/dist/resources/consensus/responses.d.ts.map +0 -1
- package/dist/resources/consensus/responses.js +0 -99
- package/dist/resources/documents/extractions.d.ts +0 -74
- package/dist/resources/documents/extractions.d.ts.map +0 -1
- package/dist/resources/documents/extractions.js +0 -196
- package/dist/resources/documents/index.d.ts +0 -21
- package/dist/resources/documents/index.d.ts.map +0 -1
- package/dist/resources/documents/index.js +0 -55
- package/dist/resources/evaluations/documents.d.ts +0 -40
- package/dist/resources/evaluations/documents.d.ts.map +0 -1
- package/dist/resources/evaluations/documents.js +0 -123
- package/dist/resources/evaluations/index.d.ts +0 -14
- package/dist/resources/evaluations/index.d.ts.map +0 -1
- package/dist/resources/evaluations/index.js +0 -17
- package/dist/resources/evaluations/iterations.d.ts +0 -50
- package/dist/resources/evaluations/iterations.d.ts.map +0 -1
- package/dist/resources/evaluations/iterations.js +0 -156
- package/dist/resources/files.d.ts +0 -82
- package/dist/resources/files.d.ts.map +0 -1
- package/dist/resources/files.js +0 -150
- package/dist/resources/finetuning.d.ts +0 -105
- package/dist/resources/finetuning.d.ts.map +0 -1
- package/dist/resources/finetuning.js +0 -181
- package/dist/resources/index.d.ts +0 -11
- package/dist/resources/index.d.ts.map +0 -1
- package/dist/resources/index.js +0 -10
- package/dist/resources/models.d.ts +0 -57
- package/dist/resources/models.d.ts.map +0 -1
- package/dist/resources/models.js +0 -72
- package/dist/resources/processors/automations/endpoints.d.ts +0 -90
- package/dist/resources/processors/automations/endpoints.d.ts.map +0 -1
- package/dist/resources/processors/automations/endpoints.js +0 -145
- package/dist/resources/processors/automations/index.d.ts +0 -7
- package/dist/resources/processors/automations/index.d.ts.map +0 -1
- package/dist/resources/processors/automations/index.js +0 -6
- package/dist/resources/processors/automations/links.d.ts +0 -90
- package/dist/resources/processors/automations/links.d.ts.map +0 -1
- package/dist/resources/processors/automations/links.js +0 -149
- package/dist/resources/processors/automations/logs.d.ts +0 -35
- package/dist/resources/processors/automations/logs.d.ts.map +0 -1
- package/dist/resources/processors/automations/logs.js +0 -60
- package/dist/resources/processors/automations/mailboxes.d.ts +0 -102
- package/dist/resources/processors/automations/mailboxes.d.ts.map +0 -1
- package/dist/resources/processors/automations/mailboxes.js +0 -157
- package/dist/resources/processors/automations/outlook.d.ts +0 -114
- package/dist/resources/processors/automations/outlook.d.ts.map +0 -1
- package/dist/resources/processors/automations/outlook.js +0 -170
- package/dist/resources/processors/automations/tests.d.ts +0 -58
- package/dist/resources/processors/automations/tests.d.ts.map +0 -1
- package/dist/resources/processors/automations/tests.js +0 -90
- package/dist/resources/processors/index.d.ts +0 -303
- package/dist/resources/processors/index.d.ts.map +0 -1
- package/dist/resources/processors/index.js +0 -261
- package/dist/resources/schemas.d.ts +0 -63
- package/dist/resources/schemas.d.ts.map +0 -1
- package/dist/resources/schemas.js +0 -183
- package/dist/resources/secrets/external_api_keys.d.ts +0 -61
- package/dist/resources/secrets/external_api_keys.d.ts.map +0 -1
- package/dist/resources/secrets/external_api_keys.js +0 -120
- package/dist/resources/secrets/index.d.ts +0 -14
- package/dist/resources/secrets/index.d.ts.map +0 -1
- package/dist/resources/secrets/index.js +0 -17
- package/dist/resources/secrets/webhooks.d.ts +0 -73
- package/dist/resources/secrets/webhooks.d.ts.map +0 -1
- package/dist/resources/secrets/webhooks.js +0 -145
- package/dist/resources/usage.d.ts +0 -223
- package/dist/resources/usage.d.ts.map +0 -1
- package/dist/resources/usage.js +0 -310
- package/dist/types/ai_models.d.ts +0 -389
- package/dist/types/ai_models.d.ts.map +0 -1
- package/dist/types/ai_models.js +0 -145
- package/dist/types/automations/cron.d.ts +0 -28
- package/dist/types/automations/cron.d.ts.map +0 -1
- package/dist/types/automations/cron.js +0 -1
- package/dist/types/automations/endpoints.d.ts +0 -13
- package/dist/types/automations/endpoints.d.ts.map +0 -1
- package/dist/types/automations/endpoints.js +0 -1
- package/dist/types/automations/index.d.ts +0 -7
- package/dist/types/automations/index.d.ts.map +0 -1
- package/dist/types/automations/index.js +0 -6
- package/dist/types/automations/links.d.ts +0 -15
- package/dist/types/automations/links.d.ts.map +0 -1
- package/dist/types/automations/links.js +0 -1
- package/dist/types/automations/mailboxes.d.ts +0 -18
- package/dist/types/automations/mailboxes.d.ts.map +0 -1
- package/dist/types/automations/mailboxes.js +0 -1
- package/dist/types/automations/outlook.d.ts +0 -37
- package/dist/types/automations/outlook.d.ts.map +0 -1
- package/dist/types/automations/outlook.js +0 -1
- package/dist/types/automations/webhooks.d.ts +0 -13
- package/dist/types/automations/webhooks.d.ts.map +0 -1
- package/dist/types/automations/webhooks.js +0 -1
- package/dist/types/browser_canvas.d.ts +0 -4
- package/dist/types/browser_canvas.d.ts.map +0 -1
- package/dist/types/browser_canvas.js +0 -2
- package/dist/types/chat.d.ts +0 -99
- package/dist/types/chat.d.ts.map +0 -1
- package/dist/types/chat.js +0 -20
- package/dist/types/consensus.d.ts +0 -10
- package/dist/types/consensus.d.ts.map +0 -1
- package/dist/types/consensus.js +0 -1
- package/dist/types/db/annotations.d.ts +0 -108
- package/dist/types/db/annotations.d.ts.map +0 -1
- package/dist/types/db/annotations.js +0 -6
- package/dist/types/db/files.d.ts +0 -133
- package/dist/types/db/files.d.ts.map +0 -1
- package/dist/types/db/files.js +0 -5
- package/dist/types/documents/extractions.d.ts +0 -1849
- package/dist/types/documents/extractions.d.ts.map +0 -1
- package/dist/types/documents/extractions.js +0 -211
- package/dist/types/documents/processing.d.ts +0 -249
- package/dist/types/documents/processing.d.ts.map +0 -1
- package/dist/types/documents/processing.js +0 -6
- package/dist/types/evaluations/iterations.d.ts +0 -41
- package/dist/types/evaluations/iterations.d.ts.map +0 -1
- package/dist/types/evaluations/iterations.js +0 -1
- package/dist/types/jobs/base.d.ts +0 -162
- package/dist/types/jobs/base.d.ts.map +0 -1
- package/dist/types/jobs/base.js +0 -6
- package/dist/types/jobs/specialized.d.ts +0 -200
- package/dist/types/jobs/specialized.d.ts.map +0 -1
- package/dist/types/jobs/specialized.js +0 -37
- package/dist/types/logs.d.ts +0 -92
- package/dist/types/logs.d.ts.map +0 -1
- package/dist/types/logs.js +0 -1
- package/dist/types/mime.d.ts +0 -426
- package/dist/types/mime.d.ts.map +0 -1
- package/dist/types/mime.js +0 -48
- package/dist/types/modalities.d.ts +0 -31
- package/dist/types/modalities.d.ts.map +0 -1
- package/dist/types/modalities.js +0 -109
- package/dist/types/pagination.d.ts +0 -5
- package/dist/types/pagination.d.ts.map +0 -1
- package/dist/types/pagination.js +0 -1
- package/dist/types/schemas/enhancement.d.ts +0 -250
- package/dist/types/schemas/enhancement.d.ts.map +0 -1
- package/dist/types/schemas/enhancement.js +0 -6
- package/dist/types/schemas/generate.d.ts +0 -160
- package/dist/types/schemas/generate.d.ts.map +0 -1
- package/dist/types/schemas/generate.js +0 -19
- package/dist/types/schemas/object.d.ts +0 -116
- package/dist/types/schemas/object.d.ts.map +0 -1
- package/dist/types/schemas/object.js +0 -861
- package/dist/types/secrets/external_api_keys.d.ts +0 -27
- package/dist/types/secrets/external_api_keys.d.ts.map +0 -1
- package/dist/types/secrets/external_api_keys.js +0 -11
- package/dist/types/secrets/index.d.ts +0 -2
- package/dist/types/secrets/index.d.ts.map +0 -1
- package/dist/types/secrets/index.js +0 -1
- package/dist/types/standards.d.ts +0 -37
- package/dist/types/standards.d.ts.map +0 -1
- package/dist/types/standards.js +0 -1
- package/dist/utils/ai_models.d.ts +0 -10
- package/dist/utils/ai_models.d.ts.map +0 -1
- package/dist/utils/ai_models.js +0 -183
- package/dist/utils/batch_processing.d.ts +0 -227
- package/dist/utils/batch_processing.d.ts.map +0 -1
- package/dist/utils/batch_processing.js +0 -268
- package/dist/utils/benchmarking.d.ts +0 -115
- package/dist/utils/benchmarking.d.ts.map +0 -1
- package/dist/utils/benchmarking.js +0 -355
- package/dist/utils/chat.d.ts +0 -70
- package/dist/utils/chat.d.ts.map +0 -1
- package/dist/utils/chat.js +0 -79
- package/dist/utils/cost_calculation.d.ts +0 -26
- package/dist/utils/cost_calculation.d.ts.map +0 -1
- package/dist/utils/cost_calculation.js +0 -99
- package/dist/utils/datasets.d.ts +0 -135
- package/dist/utils/datasets.d.ts.map +0 -1
- package/dist/utils/datasets.js +0 -359
- package/dist/utils/display.d.ts +0 -108
- package/dist/utils/display.d.ts.map +0 -1
- package/dist/utils/display.js +0 -244
- package/dist/utils/hash.d.ts +0 -18
- package/dist/utils/hash.d.ts.map +0 -1
- package/dist/utils/hash.js +0 -31
- package/dist/utils/hashing.d.ts +0 -18
- package/dist/utils/hashing.d.ts.map +0 -1
- package/dist/utils/hashing.js +0 -28
- package/dist/utils/index.d.ts +0 -8
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -10
- package/dist/utils/json_schema.d.ts +0 -18
- package/dist/utils/json_schema.d.ts.map +0 -1
- package/dist/utils/json_schema.js +0 -334
- package/dist/utils/json_schema_utils.d.ts +0 -42
- package/dist/utils/json_schema_utils.d.ts.map +0 -1
- package/dist/utils/json_schema_utils.js +0 -212
- package/dist/utils/jsonl.d.ts +0 -60
- package/dist/utils/jsonl.d.ts.map +0 -1
- package/dist/utils/jsonl.js +0 -259
- package/dist/utils/mime.d.ts +0 -6
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js +0 -129
- package/dist/utils/model_cards.d.ts +0 -219
- package/dist/utils/model_cards.d.ts.map +0 -1
- package/dist/utils/model_cards.js +0 -462
- package/dist/utils/prompt_optimization.d.ts +0 -96
- package/dist/utils/prompt_optimization.d.ts.map +0 -1
- package/dist/utils/prompt_optimization.js +0 -275
- package/dist/utils/responses.d.ts +0 -35
- package/dist/utils/responses.d.ts.map +0 -1
- package/dist/utils/responses.js +0 -37
- package/dist/utils/stream.d.ts +0 -13
- package/dist/utils/stream.d.ts.map +0 -1
- package/dist/utils/stream.js +0 -64
- package/dist/utils/stream_context_managers.d.ts +0 -147
- package/dist/utils/stream_context_managers.d.ts.map +0 -1
- package/dist/utils/stream_context_managers.js +0 -380
- package/dist/utils/usage.d.ts +0 -57
- package/dist/utils/usage.d.ts.map +0 -1
- package/dist/utils/usage.js +0 -97
- package/dist/utils/webhook_secrets.d.ts +0 -59
- package/dist/utils/webhook_secrets.d.ts.map +0 -1
- package/dist/utils/webhook_secrets.js +0 -107
- package/dist/utils/zod_to_json_schema.d.ts +0 -11
- package/dist/utils/zod_to_json_schema.d.ts.map +0 -1
- package/dist/utils/zod_to_json_schema.js +0 -123
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import APIV1 from "./api/client";
|
|
2
|
-
import { ClientOptions } from "./client";
|
|
1
|
+
import APIV1 from "./api/client.js";
|
|
3
2
|
export * from "./types";
|
|
4
3
|
export * from "./client";
|
|
4
|
+
export interface ClientOptions {
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
bearer?: string;
|
|
8
|
+
masterKey?: string;
|
|
9
|
+
}
|
|
5
10
|
export declare class Retab extends APIV1 {
|
|
6
11
|
constructor(options?: ClientOptions);
|
|
7
12
|
}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,iBAAiB,CAAC;AAGpC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,KAAM,SAAQ,KAAK;gBAClB,OAAO,CAAC,EAAE,aAAa;CAGpC"}
|
package/dist/index.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { Readable } from "stream";
|
|
2
|
-
import {
|
|
2
|
+
import { ZFieldItem, ZRefObject, ZRowList } from "./generated_types";
|
|
3
3
|
export * from "./generated_types";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
-
export declare
|
|
5
|
+
export declare function dataArray<Schema extends z.ZodType<any, any, any>>(schema: Schema): z.ZodType<z.output<Schema>[], z.ZodTypeDef, {
|
|
6
|
+
data: z.input<Schema>[];
|
|
7
|
+
}>;
|
|
8
|
+
export type Column = {
|
|
6
9
|
type: "column";
|
|
7
10
|
size: number;
|
|
8
|
-
items: (z.infer<typeof
|
|
9
|
-
name?: string
|
|
10
|
-
}
|
|
11
|
-
export type
|
|
12
|
-
export declare const ZRow: z.ZodType<{
|
|
11
|
+
items: (Row | z.infer<typeof ZFieldItem> | z.infer<typeof ZRefObject> | z.infer<typeof ZRowList>)[];
|
|
12
|
+
name?: string;
|
|
13
|
+
};
|
|
14
|
+
export type Row = {
|
|
13
15
|
type: "row";
|
|
14
|
-
name?: string
|
|
15
|
-
items: (z.infer<typeof
|
|
16
|
-
}
|
|
17
|
-
export
|
|
16
|
+
name?: string;
|
|
17
|
+
items: (Column | z.infer<typeof ZFieldItem> | z.infer<typeof ZRefObject>)[];
|
|
18
|
+
};
|
|
19
|
+
export declare const ZColumn: z.ZodType<Column>;
|
|
20
|
+
export declare const ZRow: z.ZodType<Row>;
|
|
18
21
|
export declare const ZMIMEData: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodLazy<z.ZodObject<{
|
|
19
22
|
filename: z.ZodString;
|
|
20
23
|
url: z.ZodString;
|
|
@@ -24,10 +27,7 @@ export declare const ZMIMEData: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<
|
|
|
24
27
|
}, {
|
|
25
28
|
filename: string;
|
|
26
29
|
url: string;
|
|
27
|
-
}>>]>, {
|
|
28
|
-
filename: string;
|
|
29
|
-
url: string;
|
|
30
|
-
}, string | {
|
|
30
|
+
}>>]>, any, string | {
|
|
31
31
|
filename: string;
|
|
32
32
|
url: string;
|
|
33
33
|
} | Readable | Buffer<ArrayBufferLike>>;
|
|
@@ -45,56 +45,50 @@ export declare const ZDocumentExtractRequest: z.ZodObject<{
|
|
|
45
45
|
}, {
|
|
46
46
|
filename: string;
|
|
47
47
|
url: string;
|
|
48
|
-
}>>]>, {
|
|
49
|
-
filename: string;
|
|
50
|
-
url: string;
|
|
51
|
-
}, string | {
|
|
48
|
+
}>>]>, any, string | {
|
|
52
49
|
filename: string;
|
|
53
50
|
url: string;
|
|
54
51
|
} | Readable | Buffer<ArrayBufferLike>>, "many">;
|
|
55
52
|
json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
56
|
-
modality: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">]
|
|
53
|
+
modality: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">, z.ZodLiteral<"native_fast">]>>;
|
|
57
54
|
image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
|
|
58
55
|
browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
|
|
59
56
|
model: z.ZodString;
|
|
60
57
|
temperature: z.ZodDefault<z.ZodNumber>;
|
|
61
|
-
reasoning_effort: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>>>;
|
|
58
|
+
reasoning_effort: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>>>;
|
|
62
59
|
n_consensus: z.ZodDefault<z.ZodNumber>;
|
|
63
60
|
seed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
64
61
|
store: z.ZodDefault<z.ZodBoolean>;
|
|
65
62
|
need_validation: z.ZodDefault<z.ZodBoolean>;
|
|
66
63
|
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
model: string;
|
|
68
64
|
json_schema: Record<string, any>;
|
|
65
|
+
model: string;
|
|
69
66
|
temperature: number;
|
|
67
|
+
modality: "text" | "image" | "native" | "image+text" | "native_fast";
|
|
68
|
+
reasoning_effort: "low" | "high" | "minimal" | "medium" | null;
|
|
70
69
|
image_resolution_dpi: number;
|
|
71
70
|
browser_canvas: "A3" | "A4" | "A5";
|
|
72
|
-
modality: "text" | "image" | "native" | "image+text";
|
|
73
|
-
reasoning_effort: "low" | "high" | "medium" | null;
|
|
74
71
|
n_consensus: number;
|
|
75
|
-
|
|
76
|
-
documents: {
|
|
77
|
-
filename: string;
|
|
78
|
-
url: string;
|
|
79
|
-
}[];
|
|
72
|
+
documents: any[];
|
|
80
73
|
store: boolean;
|
|
74
|
+
need_validation: boolean;
|
|
81
75
|
seed?: number | null | undefined;
|
|
82
76
|
}, {
|
|
83
|
-
model: string;
|
|
84
77
|
json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
85
|
-
|
|
78
|
+
model: string;
|
|
86
79
|
documents: (string | {
|
|
87
80
|
filename: string;
|
|
88
81
|
url: string;
|
|
89
82
|
} | Readable | Buffer<ArrayBufferLike>)[];
|
|
90
83
|
temperature?: number | undefined;
|
|
84
|
+
modality?: "text" | "image" | "native" | "image+text" | "native_fast" | undefined;
|
|
85
|
+
reasoning_effort?: "low" | "high" | "minimal" | "medium" | null | undefined;
|
|
91
86
|
image_resolution_dpi?: number | undefined;
|
|
92
87
|
browser_canvas?: "A3" | "A4" | "A5" | undefined;
|
|
93
|
-
reasoning_effort?: "low" | "high" | "medium" | null | undefined;
|
|
94
88
|
n_consensus?: number | undefined;
|
|
95
89
|
seed?: number | null | undefined;
|
|
96
|
-
need_validation?: boolean | undefined;
|
|
97
90
|
store?: boolean | undefined;
|
|
91
|
+
need_validation?: boolean | undefined;
|
|
98
92
|
}>;
|
|
99
93
|
export type DocumentExtractRequest = z.input<typeof ZDocumentExtractRequest>;
|
|
100
94
|
export declare const ZParseRequest: z.ZodObject<{
|
|
@@ -107,32 +101,26 @@ export declare const ZParseRequest: z.ZodObject<{
|
|
|
107
101
|
}, {
|
|
108
102
|
filename: string;
|
|
109
103
|
url: string;
|
|
110
|
-
}>>]>, {
|
|
111
|
-
filename: string;
|
|
112
|
-
url: string;
|
|
113
|
-
}, string | {
|
|
104
|
+
}>>]>, any, string | {
|
|
114
105
|
filename: string;
|
|
115
106
|
url: string;
|
|
116
107
|
} | Readable | Buffer<ArrayBufferLike>>;
|
|
117
|
-
model: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"gpt-4o">, z.ZodLiteral<"gpt-4o-mini">, z.ZodLiteral<"chatgpt-4o-latest">, z.ZodLiteral<"gpt-4.1">, z.ZodLiteral<"gpt-4.1-mini">, z.ZodLiteral<"gpt-4.1-mini-2025-04-14">, z.ZodLiteral<"gpt-4.1-2025-04-14">, z.ZodLiteral<"gpt-4.1-nano">, z.ZodLiteral<"gpt-4.1-nano-2025-04-14">, z.ZodLiteral<"gpt-4o-2024-11-20">, z.ZodLiteral<"gpt-4o-2024-08-06">, z.ZodLiteral<"gpt-4o-2024-05-13">, z.ZodLiteral<"gpt-4o-mini-2024-07-18">, z.ZodLiteral<"o1">, z.ZodLiteral<"o1-2024-12-17">, z.ZodLiteral<"o3">, z.ZodLiteral<"o3-2025-04-16">, z.ZodLiteral<"o4-mini">, z.ZodLiteral<"o4-mini-2025-04-16">, z.ZodLiteral<"gpt-4o-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-audio-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-mini-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-mini-realtime-preview-2024-12-17">, z.ZodLiteral<"claude-3-5-sonnet-latest">, z.ZodLiteral<"claude-3-5-sonnet-20241022">, z.ZodLiteral<"claude-3-opus-20240229">, z.ZodLiteral<"claude-3-sonnet-20240229">, z.ZodLiteral<"claude-3-haiku-20240307">, z.ZodLiteral<"grok-3">, z.ZodLiteral<"grok-3-mini">, z.ZodLiteral<"gemini-2.5-pro">, z.ZodLiteral<"gemini-2.5-flash">, z.ZodLiteral<"gemini-2.5-pro-preview-06-05">, z.ZodLiteral<"gemini-2.5-pro-preview-05-06">, z.ZodLiteral<"gemini-2.5-pro-preview-03-25">, z.ZodLiteral<"gemini-2.5-flash-preview-05-20">, z.ZodLiteral<"gemini-2.5-flash-preview-04-17">, z.ZodLiteral<"gemini-2.5-flash-lite
|
|
108
|
+
model: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"gpt-4o">, z.ZodLiteral<"gpt-4o-mini">, z.ZodLiteral<"chatgpt-4o-latest">, z.ZodLiteral<"gpt-5">, z.ZodLiteral<"gpt-5-2025-08-07">, z.ZodLiteral<"gpt-5-mini">, z.ZodLiteral<"gpt-5-mini-2025-08-07">, z.ZodLiteral<"gpt-5-nano">, z.ZodLiteral<"gpt-5-nano-2025-08-07">, z.ZodLiteral<"gpt-4.1">, z.ZodLiteral<"gpt-4.1-mini">, z.ZodLiteral<"gpt-4.1-mini-2025-04-14">, z.ZodLiteral<"gpt-4.1-2025-04-14">, z.ZodLiteral<"gpt-4.1-nano">, z.ZodLiteral<"gpt-4.1-nano-2025-04-14">, z.ZodLiteral<"gpt-4o-2024-11-20">, z.ZodLiteral<"gpt-4o-2024-08-06">, z.ZodLiteral<"gpt-4o-2024-05-13">, z.ZodLiteral<"gpt-4o-mini-2024-07-18">, z.ZodLiteral<"o1">, z.ZodLiteral<"o1-2024-12-17">, z.ZodLiteral<"o3">, z.ZodLiteral<"o3-2025-04-16">, z.ZodLiteral<"o4-mini">, z.ZodLiteral<"o4-mini-2025-04-16">, z.ZodLiteral<"gpt-4o-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-audio-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-mini-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-mini-realtime-preview-2024-12-17">, z.ZodLiteral<"claude-3-5-sonnet-latest">, z.ZodLiteral<"claude-3-5-sonnet-20241022">, z.ZodLiteral<"claude-3-opus-20240229">, z.ZodLiteral<"claude-3-sonnet-20240229">, z.ZodLiteral<"claude-3-haiku-20240307">, z.ZodLiteral<"claude-opus-4.1">, z.ZodLiteral<"claude-opus-4">, z.ZodLiteral<"claude-sonnet-4">, z.ZodLiteral<"claude-sonnet-4-20250514">, z.ZodLiteral<"grok-3">, z.ZodLiteral<"grok-3-mini">, z.ZodLiteral<"gemini-2.5-pro">, z.ZodLiteral<"gemini-2.5-flash">, z.ZodLiteral<"gemini-2.5-pro-preview-06-05">, z.ZodLiteral<"gemini-2.5-pro-preview-05-06">, z.ZodLiteral<"gemini-2.5-pro-preview-03-25">, z.ZodLiteral<"gemini-2.5-flash-preview-05-20">, z.ZodLiteral<"gemini-2.5-flash-preview-04-17">, z.ZodLiteral<"gemini-2.5-flash-lite">, z.ZodLiteral<"gemini-2.5-pro-exp-03-25">, z.ZodLiteral<"gemini-2.0-flash-lite">, z.ZodLiteral<"gemini-2.0-flash">, z.ZodLiteral<"auto-large">, z.ZodLiteral<"auto-small">, z.ZodLiteral<"auto-micro">, z.ZodLiteral<"human">]>>;
|
|
118
109
|
table_parsing_format: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"markdown">, z.ZodLiteral<"yaml">, z.ZodLiteral<"html">, z.ZodLiteral<"json">]>>;
|
|
119
110
|
image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
|
|
120
111
|
browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
|
|
121
112
|
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
model: "gpt-
|
|
113
|
+
model: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human";
|
|
123
114
|
image_resolution_dpi: number;
|
|
124
115
|
browser_canvas: "A3" | "A4" | "A5";
|
|
125
|
-
document: {
|
|
126
|
-
filename: string;
|
|
127
|
-
url: string;
|
|
128
|
-
};
|
|
129
116
|
table_parsing_format: "markdown" | "yaml" | "html" | "json";
|
|
117
|
+
document?: any;
|
|
130
118
|
}, {
|
|
131
119
|
document: string | {
|
|
132
120
|
filename: string;
|
|
133
121
|
url: string;
|
|
134
122
|
} | Readable | Buffer<ArrayBufferLike>;
|
|
135
|
-
model?: "gpt-
|
|
123
|
+
model?: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human" | undefined;
|
|
136
124
|
image_resolution_dpi?: number | undefined;
|
|
137
125
|
browser_canvas?: "A3" | "A4" | "A5" | undefined;
|
|
138
126
|
table_parsing_format?: "markdown" | "yaml" | "html" | "json" | undefined;
|
|
@@ -148,30 +136,27 @@ export declare const ZDocumentCreateMessageRequest: z.ZodObject<{
|
|
|
148
136
|
}, {
|
|
149
137
|
filename: string;
|
|
150
138
|
url: string;
|
|
151
|
-
}>>]>, {
|
|
152
|
-
filename: string;
|
|
153
|
-
url: string;
|
|
154
|
-
}, string | {
|
|
139
|
+
}>>]>, any, string | {
|
|
155
140
|
filename: string;
|
|
156
141
|
url: string;
|
|
157
142
|
} | Readable | Buffer<ArrayBufferLike>>;
|
|
158
|
-
modality: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">]
|
|
143
|
+
modality: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">, z.ZodLiteral<"native_fast">]>>;
|
|
159
144
|
image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
|
|
160
145
|
browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
|
|
146
|
+
model: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"gpt-4o">, z.ZodLiteral<"gpt-4o-mini">, z.ZodLiteral<"chatgpt-4o-latest">, z.ZodLiteral<"gpt-5">, z.ZodLiteral<"gpt-5-2025-08-07">, z.ZodLiteral<"gpt-5-mini">, z.ZodLiteral<"gpt-5-mini-2025-08-07">, z.ZodLiteral<"gpt-5-nano">, z.ZodLiteral<"gpt-5-nano-2025-08-07">, z.ZodLiteral<"gpt-4.1">, z.ZodLiteral<"gpt-4.1-mini">, z.ZodLiteral<"gpt-4.1-mini-2025-04-14">, z.ZodLiteral<"gpt-4.1-2025-04-14">, z.ZodLiteral<"gpt-4.1-nano">, z.ZodLiteral<"gpt-4.1-nano-2025-04-14">, z.ZodLiteral<"gpt-4o-2024-11-20">, z.ZodLiteral<"gpt-4o-2024-08-06">, z.ZodLiteral<"gpt-4o-2024-05-13">, z.ZodLiteral<"gpt-4o-mini-2024-07-18">, z.ZodLiteral<"o1">, z.ZodLiteral<"o1-2024-12-17">, z.ZodLiteral<"o3">, z.ZodLiteral<"o3-2025-04-16">, z.ZodLiteral<"o4-mini">, z.ZodLiteral<"o4-mini-2025-04-16">, z.ZodLiteral<"gpt-4o-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-audio-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-mini-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-mini-realtime-preview-2024-12-17">, z.ZodLiteral<"claude-3-5-sonnet-latest">, z.ZodLiteral<"claude-3-5-sonnet-20241022">, z.ZodLiteral<"claude-3-opus-20240229">, z.ZodLiteral<"claude-3-sonnet-20240229">, z.ZodLiteral<"claude-3-haiku-20240307">, z.ZodLiteral<"claude-opus-4.1">, z.ZodLiteral<"claude-opus-4">, z.ZodLiteral<"claude-sonnet-4">, z.ZodLiteral<"claude-sonnet-4-20250514">, z.ZodLiteral<"grok-3">, z.ZodLiteral<"grok-3-mini">, z.ZodLiteral<"gemini-2.5-pro">, z.ZodLiteral<"gemini-2.5-flash">, z.ZodLiteral<"gemini-2.5-pro-preview-06-05">, z.ZodLiteral<"gemini-2.5-pro-preview-05-06">, z.ZodLiteral<"gemini-2.5-pro-preview-03-25">, z.ZodLiteral<"gemini-2.5-flash-preview-05-20">, z.ZodLiteral<"gemini-2.5-flash-preview-04-17">, z.ZodLiteral<"gemini-2.5-flash-lite">, z.ZodLiteral<"gemini-2.5-pro-exp-03-25">, z.ZodLiteral<"gemini-2.0-flash-lite">, z.ZodLiteral<"gemini-2.0-flash">, z.ZodLiteral<"auto-large">, z.ZodLiteral<"auto-small">, z.ZodLiteral<"auto-micro">, z.ZodLiteral<"human">]>>;
|
|
161
147
|
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
model: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human";
|
|
149
|
+
modality: "text" | "image" | "native" | "image+text" | "native_fast";
|
|
162
150
|
image_resolution_dpi: number;
|
|
163
151
|
browser_canvas: "A3" | "A4" | "A5";
|
|
164
|
-
|
|
165
|
-
document: {
|
|
166
|
-
filename: string;
|
|
167
|
-
url: string;
|
|
168
|
-
};
|
|
152
|
+
document?: any;
|
|
169
153
|
}, {
|
|
170
|
-
modality: "text" | "image" | "native" | "image+text";
|
|
171
154
|
document: string | {
|
|
172
155
|
filename: string;
|
|
173
156
|
url: string;
|
|
174
157
|
} | Readable | Buffer<ArrayBufferLike>;
|
|
158
|
+
model?: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human" | undefined;
|
|
159
|
+
modality?: "text" | "image" | "native" | "image+text" | "native_fast" | undefined;
|
|
175
160
|
image_resolution_dpi?: number | undefined;
|
|
176
161
|
browser_canvas?: "A3" | "A4" | "A5" | undefined;
|
|
177
162
|
}>;
|
|
@@ -186,33 +171,30 @@ export declare const ZDocumentCreateInputRequest: z.ZodObject<{
|
|
|
186
171
|
}, {
|
|
187
172
|
filename: string;
|
|
188
173
|
url: string;
|
|
189
|
-
}>>]>, {
|
|
190
|
-
filename: string;
|
|
191
|
-
url: string;
|
|
192
|
-
}, string | {
|
|
174
|
+
}>>]>, any, string | {
|
|
193
175
|
filename: string;
|
|
194
176
|
url: string;
|
|
195
177
|
} | Readable | Buffer<ArrayBufferLike>>;
|
|
196
178
|
json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
197
|
-
modality: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">]
|
|
179
|
+
modality: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">, z.ZodLiteral<"native_fast">]>>;
|
|
198
180
|
image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
|
|
199
181
|
browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
|
|
182
|
+
model: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"gpt-4o">, z.ZodLiteral<"gpt-4o-mini">, z.ZodLiteral<"chatgpt-4o-latest">, z.ZodLiteral<"gpt-5">, z.ZodLiteral<"gpt-5-2025-08-07">, z.ZodLiteral<"gpt-5-mini">, z.ZodLiteral<"gpt-5-mini-2025-08-07">, z.ZodLiteral<"gpt-5-nano">, z.ZodLiteral<"gpt-5-nano-2025-08-07">, z.ZodLiteral<"gpt-4.1">, z.ZodLiteral<"gpt-4.1-mini">, z.ZodLiteral<"gpt-4.1-mini-2025-04-14">, z.ZodLiteral<"gpt-4.1-2025-04-14">, z.ZodLiteral<"gpt-4.1-nano">, z.ZodLiteral<"gpt-4.1-nano-2025-04-14">, z.ZodLiteral<"gpt-4o-2024-11-20">, z.ZodLiteral<"gpt-4o-2024-08-06">, z.ZodLiteral<"gpt-4o-2024-05-13">, z.ZodLiteral<"gpt-4o-mini-2024-07-18">, z.ZodLiteral<"o1">, z.ZodLiteral<"o1-2024-12-17">, z.ZodLiteral<"o3">, z.ZodLiteral<"o3-2025-04-16">, z.ZodLiteral<"o4-mini">, z.ZodLiteral<"o4-mini-2025-04-16">, z.ZodLiteral<"gpt-4o-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-audio-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-realtime-preview-2024-10-01">, z.ZodLiteral<"gpt-4o-mini-audio-preview-2024-12-17">, z.ZodLiteral<"gpt-4o-mini-realtime-preview-2024-12-17">, z.ZodLiteral<"claude-3-5-sonnet-latest">, z.ZodLiteral<"claude-3-5-sonnet-20241022">, z.ZodLiteral<"claude-3-opus-20240229">, z.ZodLiteral<"claude-3-sonnet-20240229">, z.ZodLiteral<"claude-3-haiku-20240307">, z.ZodLiteral<"claude-opus-4.1">, z.ZodLiteral<"claude-opus-4">, z.ZodLiteral<"claude-sonnet-4">, z.ZodLiteral<"claude-sonnet-4-20250514">, z.ZodLiteral<"grok-3">, z.ZodLiteral<"grok-3-mini">, z.ZodLiteral<"gemini-2.5-pro">, z.ZodLiteral<"gemini-2.5-flash">, z.ZodLiteral<"gemini-2.5-pro-preview-06-05">, z.ZodLiteral<"gemini-2.5-pro-preview-05-06">, z.ZodLiteral<"gemini-2.5-pro-preview-03-25">, z.ZodLiteral<"gemini-2.5-flash-preview-05-20">, z.ZodLiteral<"gemini-2.5-flash-preview-04-17">, z.ZodLiteral<"gemini-2.5-flash-lite">, z.ZodLiteral<"gemini-2.5-pro-exp-03-25">, z.ZodLiteral<"gemini-2.0-flash-lite">, z.ZodLiteral<"gemini-2.0-flash">, z.ZodLiteral<"auto-large">, z.ZodLiteral<"auto-small">, z.ZodLiteral<"auto-micro">, z.ZodLiteral<"human">]>>;
|
|
200
183
|
}, "strip", z.ZodTypeAny, {
|
|
201
184
|
json_schema: Record<string, any>;
|
|
185
|
+
model: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human";
|
|
186
|
+
modality: "text" | "image" | "native" | "image+text" | "native_fast";
|
|
202
187
|
image_resolution_dpi: number;
|
|
203
188
|
browser_canvas: "A3" | "A4" | "A5";
|
|
204
|
-
|
|
205
|
-
document: {
|
|
206
|
-
filename: string;
|
|
207
|
-
url: string;
|
|
208
|
-
};
|
|
189
|
+
document?: any;
|
|
209
190
|
}, {
|
|
210
191
|
json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
211
|
-
modality: "text" | "image" | "native" | "image+text";
|
|
212
192
|
document: string | {
|
|
213
193
|
filename: string;
|
|
214
194
|
url: string;
|
|
215
195
|
} | Readable | Buffer<ArrayBufferLike>;
|
|
196
|
+
model?: "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "chatgpt-4o-latest" | "gpt-5" | "gpt-5-2025-08-07" | "gpt-5-mini-2025-08-07" | "gpt-5-nano" | "gpt-5-nano-2025-08-07" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-mini-2025-04-14" | "gpt-4.1-2025-04-14" | "gpt-4.1-nano" | "gpt-4.1-nano-2025-04-14" | "gpt-4o-2024-11-20" | "gpt-4o-2024-08-06" | "gpt-4o-2024-05-13" | "gpt-4o-mini-2024-07-18" | "o1" | "o1-2024-12-17" | "o3" | "o3-2025-04-16" | "o4-mini" | "o4-mini-2025-04-16" | "gpt-4o-audio-preview-2024-12-17" | "gpt-4o-audio-preview-2024-10-01" | "gpt-4o-realtime-preview-2024-12-17" | "gpt-4o-realtime-preview-2024-10-01" | "gpt-4o-mini-audio-preview-2024-12-17" | "gpt-4o-mini-realtime-preview-2024-12-17" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-opus-20240229" | "claude-3-sonnet-20240229" | "claude-3-haiku-20240307" | "claude-opus-4.1" | "claude-opus-4" | "claude-sonnet-4" | "claude-sonnet-4-20250514" | "grok-3" | "grok-3-mini" | "gemini-2.5-pro" | "gemini-2.5-flash" | "gemini-2.5-pro-preview-06-05" | "gemini-2.5-pro-preview-05-06" | "gemini-2.5-pro-preview-03-25" | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.5-flash-lite" | "gemini-2.5-pro-exp-03-25" | "gemini-2.0-flash-lite" | "gemini-2.0-flash" | "auto-large" | "auto-small" | "auto-micro" | "human" | undefined;
|
|
197
|
+
modality?: "text" | "image" | "native" | "image+text" | "native_fast" | undefined;
|
|
216
198
|
image_resolution_dpi?: number | undefined;
|
|
217
199
|
browser_canvas?: "A3" | "A4" | "A5" | undefined;
|
|
218
200
|
}>;
|
|
@@ -227,17 +209,14 @@ export declare const ZGenerateSchemaRequest: z.ZodObject<{
|
|
|
227
209
|
}, {
|
|
228
210
|
filename: string;
|
|
229
211
|
url: string;
|
|
230
|
-
}>>]>, {
|
|
231
|
-
filename: string;
|
|
232
|
-
url: string;
|
|
233
|
-
}, string | {
|
|
212
|
+
}>>]>, any, string | {
|
|
234
213
|
filename: string;
|
|
235
214
|
url: string;
|
|
236
215
|
} | Readable | Buffer<ArrayBufferLike>>, "many">;
|
|
237
216
|
model: z.ZodDefault<z.ZodString>;
|
|
238
217
|
temperature: z.ZodDefault<z.ZodNumber>;
|
|
239
|
-
reasoning_effort: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>>>;
|
|
240
|
-
modality: z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">]
|
|
218
|
+
reasoning_effort: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"minimal">, z.ZodLiteral<"low">, z.ZodLiteral<"medium">, z.ZodLiteral<"high">]>>>>;
|
|
219
|
+
modality: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"text">, z.ZodLiteral<"image">, z.ZodLiteral<"native">, z.ZodLiteral<"image+text">, z.ZodLiteral<"native_fast">]>>;
|
|
241
220
|
instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
242
221
|
image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
|
|
243
222
|
browser_canvas: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"A3">, z.ZodLiteral<"A4">, z.ZodLiteral<"A5">]>>;
|
|
@@ -246,17 +225,13 @@ export declare const ZGenerateSchemaRequest: z.ZodObject<{
|
|
|
246
225
|
stream: boolean;
|
|
247
226
|
model: string;
|
|
248
227
|
temperature: number;
|
|
228
|
+
modality: "text" | "image" | "native" | "image+text" | "native_fast";
|
|
229
|
+
reasoning_effort: "low" | "high" | "minimal" | "medium" | null;
|
|
249
230
|
image_resolution_dpi: number;
|
|
250
231
|
browser_canvas: "A3" | "A4" | "A5";
|
|
251
|
-
|
|
252
|
-
reasoning_effort: "low" | "high" | "medium" | null;
|
|
253
|
-
documents: {
|
|
254
|
-
filename: string;
|
|
255
|
-
url: string;
|
|
256
|
-
}[];
|
|
232
|
+
documents: any[];
|
|
257
233
|
instructions?: string | null | undefined;
|
|
258
234
|
}, {
|
|
259
|
-
modality: "text" | "image" | "native" | "image+text";
|
|
260
235
|
documents: (string | {
|
|
261
236
|
filename: string;
|
|
262
237
|
url: string;
|
|
@@ -264,10 +239,143 @@ export declare const ZGenerateSchemaRequest: z.ZodObject<{
|
|
|
264
239
|
stream?: boolean | undefined;
|
|
265
240
|
model?: string | undefined;
|
|
266
241
|
temperature?: number | undefined;
|
|
242
|
+
modality?: "text" | "image" | "native" | "image+text" | "native_fast" | undefined;
|
|
243
|
+
reasoning_effort?: "low" | "high" | "minimal" | "medium" | null | undefined;
|
|
267
244
|
image_resolution_dpi?: number | undefined;
|
|
268
245
|
browser_canvas?: "A3" | "A4" | "A5" | undefined;
|
|
269
|
-
reasoning_effort?: "low" | "high" | "medium" | null | undefined;
|
|
270
246
|
instructions?: string | null | undefined;
|
|
271
247
|
}>;
|
|
272
248
|
export type GenerateSchemaRequest = z.input<typeof ZGenerateSchemaRequest>;
|
|
249
|
+
export declare const ZBaseProject: z.ZodObject<{
|
|
250
|
+
json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
251
|
+
id: z.ZodString;
|
|
252
|
+
name: z.ZodDefault<z.ZodString>;
|
|
253
|
+
updated_at: z.ZodString;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
id: string;
|
|
256
|
+
json_schema: Record<string, any>;
|
|
257
|
+
name: string;
|
|
258
|
+
updated_at: string;
|
|
259
|
+
}, {
|
|
260
|
+
id: string;
|
|
261
|
+
json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
262
|
+
updated_at: string;
|
|
263
|
+
name?: string | undefined;
|
|
264
|
+
}>;
|
|
265
|
+
export type BaseProjectInput = z.input<typeof ZBaseProject>;
|
|
266
|
+
export type BaseProject = z.output<typeof ZBaseProject>;
|
|
267
|
+
export declare const ZCreateProjectRequest: z.ZodObject<{
|
|
268
|
+
json_schema: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodType<z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodTypeDef, z.ZodType<unknown, z.ZodTypeDef, unknown>>]>, Record<string, any>, string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
}, "strip", z.ZodTypeAny, {
|
|
271
|
+
json_schema: Record<string, any>;
|
|
272
|
+
name: string;
|
|
273
|
+
}, {
|
|
274
|
+
json_schema: string | Record<string, any> | z.ZodType<unknown, z.ZodTypeDef, unknown>;
|
|
275
|
+
name: string;
|
|
276
|
+
}>;
|
|
277
|
+
export type CreateProjectRequest = z.input<typeof ZCreateProjectRequest>;
|
|
278
|
+
export declare const ZDocumentItem: z.ZodObject<{
|
|
279
|
+
mime_data: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodLazy<z.ZodObject<{
|
|
280
|
+
filename: z.ZodString;
|
|
281
|
+
url: z.ZodString;
|
|
282
|
+
}, "strip", z.ZodTypeAny, {
|
|
283
|
+
filename: string;
|
|
284
|
+
url: string;
|
|
285
|
+
}, {
|
|
286
|
+
filename: string;
|
|
287
|
+
url: string;
|
|
288
|
+
}>>]>, any, string | {
|
|
289
|
+
filename: string;
|
|
290
|
+
url: string;
|
|
291
|
+
} | Readable | Buffer<ArrayBufferLike>>;
|
|
292
|
+
annotation: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
293
|
+
annotation_metadata: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
294
|
+
extraction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
295
|
+
likelihoods: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
296
|
+
field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
297
|
+
agentic_field_locations: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
298
|
+
consensus_details: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
|
|
299
|
+
api_cost: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
|
|
300
|
+
value: z.ZodNumber;
|
|
301
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
302
|
+
}, "strip", z.ZodTypeAny, {
|
|
303
|
+
value: number;
|
|
304
|
+
currency: string;
|
|
305
|
+
}, {
|
|
306
|
+
value: number;
|
|
307
|
+
currency?: string | undefined;
|
|
308
|
+
}>>>>;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
extraction_id?: string | null | undefined;
|
|
311
|
+
likelihoods?: Record<string, any> | null | undefined;
|
|
312
|
+
field_locations?: Record<string, any> | null | undefined;
|
|
313
|
+
agentic_field_locations?: Record<string, any> | null | undefined;
|
|
314
|
+
consensus_details?: Record<string, any>[] | null | undefined;
|
|
315
|
+
api_cost?: {
|
|
316
|
+
value: number;
|
|
317
|
+
currency: string;
|
|
318
|
+
} | null | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
extraction_id?: string | null | undefined;
|
|
321
|
+
likelihoods?: Record<string, any> | null | undefined;
|
|
322
|
+
field_locations?: Record<string, any> | null | undefined;
|
|
323
|
+
agentic_field_locations?: Record<string, any> | null | undefined;
|
|
324
|
+
consensus_details?: Record<string, any>[] | null | undefined;
|
|
325
|
+
api_cost?: {
|
|
326
|
+
value: number;
|
|
327
|
+
currency?: string | undefined;
|
|
328
|
+
} | null | undefined;
|
|
329
|
+
}>>>>;
|
|
330
|
+
}, "strip", z.ZodTypeAny, {
|
|
331
|
+
annotation: Record<string, any>;
|
|
332
|
+
mime_data?: any;
|
|
333
|
+
annotation_metadata?: {
|
|
334
|
+
extraction_id?: string | null | undefined;
|
|
335
|
+
likelihoods?: Record<string, any> | null | undefined;
|
|
336
|
+
field_locations?: Record<string, any> | null | undefined;
|
|
337
|
+
agentic_field_locations?: Record<string, any> | null | undefined;
|
|
338
|
+
consensus_details?: Record<string, any>[] | null | undefined;
|
|
339
|
+
api_cost?: {
|
|
340
|
+
value: number;
|
|
341
|
+
currency: string;
|
|
342
|
+
} | null | undefined;
|
|
343
|
+
} | null | undefined;
|
|
344
|
+
}, {
|
|
345
|
+
mime_data: string | {
|
|
346
|
+
filename: string;
|
|
347
|
+
url: string;
|
|
348
|
+
} | Readable | Buffer<ArrayBufferLike>;
|
|
349
|
+
annotation?: Record<string, any> | undefined;
|
|
350
|
+
annotation_metadata?: {
|
|
351
|
+
extraction_id?: string | null | undefined;
|
|
352
|
+
likelihoods?: Record<string, any> | null | undefined;
|
|
353
|
+
field_locations?: Record<string, any> | null | undefined;
|
|
354
|
+
agentic_field_locations?: Record<string, any> | null | undefined;
|
|
355
|
+
consensus_details?: Record<string, any>[] | null | undefined;
|
|
356
|
+
api_cost?: {
|
|
357
|
+
value: number;
|
|
358
|
+
currency?: string | undefined;
|
|
359
|
+
} | null | undefined;
|
|
360
|
+
} | null | undefined;
|
|
361
|
+
}>;
|
|
362
|
+
export type DocumentItemInput = z.input<typeof ZDocumentItem>;
|
|
363
|
+
export type DocumentItem = z.output<typeof ZDocumentItem>;
|
|
364
|
+
export declare const ZModel: z.ZodLazy<z.ZodObject<{
|
|
365
|
+
id: z.ZodString;
|
|
366
|
+
created: z.ZodNumber;
|
|
367
|
+
object: z.ZodLiteral<"model">;
|
|
368
|
+
owned_by: z.ZodString;
|
|
369
|
+
}, "strip", z.ZodTypeAny, {
|
|
370
|
+
object: "model";
|
|
371
|
+
id: string;
|
|
372
|
+
created: number;
|
|
373
|
+
owned_by: string;
|
|
374
|
+
}, {
|
|
375
|
+
object: "model";
|
|
376
|
+
id: string;
|
|
377
|
+
created: number;
|
|
378
|
+
owned_by: string;
|
|
379
|
+
}>>;
|
|
380
|
+
export type Model = z.infer<typeof ZModel>;
|
|
273
381
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/dist/types.js
CHANGED
|
@@ -6,6 +6,9 @@ import * as z from "zod";
|
|
|
6
6
|
import { inferFileInfo } from "./mime";
|
|
7
7
|
import fs from "fs";
|
|
8
8
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
9
|
+
export function dataArray(schema) {
|
|
10
|
+
return z.object({ data: z.array(schema) }).transform((input) => input.data);
|
|
11
|
+
}
|
|
9
12
|
export const ZColumn = z.lazy(() => z.object({
|
|
10
13
|
type: z.literal("column"),
|
|
11
14
|
size: z.number(),
|
|
@@ -24,7 +27,7 @@ export const ZMIMEData = z.union([
|
|
|
24
27
|
generated.ZMIMEData,
|
|
25
28
|
]).transform(async (input, ctx) => {
|
|
26
29
|
try {
|
|
27
|
-
if (typeof input === "object" && "url" in input && "filename" in input) {
|
|
30
|
+
if (typeof input === "object" && input !== null && "url" in input && "filename" in input) {
|
|
28
31
|
return input;
|
|
29
32
|
}
|
|
30
33
|
return await inferFileInfo(input);
|
|
@@ -83,3 +86,21 @@ export const ZGenerateSchemaRequest = z.object({
|
|
|
83
86
|
...generated.ZGenerateSchemaRequest.schema.shape,
|
|
84
87
|
documents: ZMIMEData.array(),
|
|
85
88
|
});
|
|
89
|
+
export const ZBaseProject = z.object({
|
|
90
|
+
...generated.ZBaseProject.schema.shape,
|
|
91
|
+
json_schema: ZJSONSchema,
|
|
92
|
+
});
|
|
93
|
+
export const ZCreateProjectRequest = z.object({
|
|
94
|
+
...generated.ZCreateProjectRequest.schema.shape,
|
|
95
|
+
json_schema: ZJSONSchema,
|
|
96
|
+
});
|
|
97
|
+
export const ZDocumentItem = z.object({
|
|
98
|
+
...generated.ZDocumentItem.schema.shape,
|
|
99
|
+
mime_data: ZMIMEData,
|
|
100
|
+
});
|
|
101
|
+
export const ZModel = z.lazy(() => (z.object({
|
|
102
|
+
id: z.string(),
|
|
103
|
+
created: z.number(),
|
|
104
|
+
object: z.literal("model"),
|
|
105
|
+
owned_by: z.string(),
|
|
106
|
+
})));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retab/node",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.52",
|
|
4
4
|
"description": "Retab official Node.js library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
-
"test": "
|
|
14
|
-
"test:watch": "
|
|
15
|
-
"test:coverage": "
|
|
16
|
-
"test:verbose": "
|
|
13
|
+
"test": "bun test",
|
|
14
|
+
"test:watch": "bun test --watch",
|
|
15
|
+
"test:coverage": "bun test --coverage",
|
|
16
|
+
"test:verbose": "bun test --reporter verbose",
|
|
17
17
|
"lint": "eslint src --ext .ts",
|
|
18
18
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
19
19
|
"prepare": "npm run build",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"blake2": "^5.0.0",
|
|
39
39
|
"dotenv": "^17.2.0",
|
|
40
40
|
"file-type": "^21.0.0",
|
|
41
|
-
"form-data": "^4.0.
|
|
41
|
+
"form-data": "^4.0.4",
|
|
42
42
|
"js-yaml": "^4.1.0",
|
|
43
43
|
"openai": "^5.8.2",
|
|
44
44
|
"zod": "^3.22.0",
|
|
@@ -46,15 +46,12 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/blake2": "^4.0.4",
|
|
49
|
-
"@types/jest": "^29.0.0",
|
|
50
49
|
"@types/js-yaml": "^4.0.9",
|
|
51
50
|
"@types/node": "^20.0.0",
|
|
52
51
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
53
52
|
"@typescript-eslint/parser": "^6.0.0",
|
|
54
53
|
"eslint": "^8.0.0",
|
|
55
|
-
"jest": "^29.0.0",
|
|
56
54
|
"prettier": "^3.0.0",
|
|
57
|
-
"ts-jest": "^29.0.0",
|
|
58
55
|
"typescript": "^5.0.0"
|
|
59
56
|
},
|
|
60
57
|
"engines": {
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CompositionClient } from "@/client";
|
|
2
|
-
import { ReconciliationRequest, ReconciliationResponse } from "@/types";
|
|
3
|
-
export default class APIConsensus extends CompositionClient {
|
|
4
|
-
constructor(client: CompositionClient);
|
|
5
|
-
reconcile(params: ReconciliationRequest): Promise<ReconciliationResponse>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/api/consensus/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAmD,MAAM,SAAS,CAAC;AAEzH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,iBAAiB;gBAC3C,MAAM,EAAE,iBAAiB;IAG/B,SAAS,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAOlF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CompositionClient } from "@/client";
|
|
2
|
-
import { ZReconciliationRequest, ZReconciliationResponse } from "@/types";
|
|
3
|
-
export default class APIConsensus extends CompositionClient {
|
|
4
|
-
constructor(client) {
|
|
5
|
-
super(client);
|
|
6
|
-
}
|
|
7
|
-
async reconcile(params) {
|
|
8
|
-
return this._fetchJson(ZReconciliationResponse, {
|
|
9
|
-
url: "/v1/consensus/reconcile",
|
|
10
|
-
method: "POST",
|
|
11
|
-
body: ZReconciliationRequest.parse(params),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|