@pdfvector/instance-contract 0.0.43 → 0.0.45
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/.tsc/lib/fetchable-url-schema.d.ts +2 -0
- package/.tsc/lib/fetchable-url-schema.js +13 -0
- package/.tsc/lib/router/academic/fetch.d.ts +1 -1
- package/.tsc/lib/router/academic/find-citations.d.ts +1 -1
- package/.tsc/lib/router/academic/paper-graph.d.ts +1 -1
- package/.tsc/lib/router/academic/search.d.ts +1 -1
- package/.tsc/lib/router/academic/similar-papers.d.ts +1 -1
- package/.tsc/lib/router/bankStatement/ask.js +3 -5
- package/.tsc/lib/router/bankStatement/extract.js +3 -5
- package/.tsc/lib/router/bankStatement/parse.js +3 -5
- package/.tsc/lib/router/document/ask.js +3 -5
- package/.tsc/lib/router/document/extract.js +3 -5
- package/.tsc/lib/router/document/parse.js +3 -5
- package/.tsc/lib/router/free/bank-statement-parse.js +2 -2
- package/.tsc/lib/router/identity/ask.js +3 -5
- package/.tsc/lib/router/identity/extract.js +3 -5
- package/.tsc/lib/router/identity/parse.js +3 -5
- package/.tsc/lib/router/invoice/ask.js +3 -5
- package/.tsc/lib/router/invoice/extract.js +3 -5
- package/.tsc/lib/router/invoice/parse.js +3 -5
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
function isFetchableUrl(value) {
|
|
3
|
+
try {
|
|
4
|
+
const url = new URL(value);
|
|
5
|
+
return url.protocol === "http:" || url.protocol === "https:";
|
|
6
|
+
}
|
|
7
|
+
catch {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export const fetchableUrlSchema = z.url().refine(isFetchableUrl, {
|
|
12
|
+
message: "URL must use http or https",
|
|
13
|
+
});
|
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const fetch: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
3
3
|
ids: z.ZodArray<z.ZodString>;
|
|
4
4
|
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
5
|
-
year: "year";
|
|
6
5
|
url: "url";
|
|
6
|
+
year: "year";
|
|
7
7
|
doi: "doi";
|
|
8
8
|
title: "title";
|
|
9
9
|
providerURL: "providerURL";
|
|
@@ -12,8 +12,8 @@ export declare const findCitations: import("@orpc/contract").ContractProcedureBu
|
|
|
12
12
|
crossref: "crossref";
|
|
13
13
|
}>>>;
|
|
14
14
|
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
15
|
-
year: "year";
|
|
16
15
|
url: "url";
|
|
16
|
+
year: "year";
|
|
17
17
|
doi: "doi";
|
|
18
18
|
title: "title";
|
|
19
19
|
providerURL: "providerURL";
|
|
@@ -6,8 +6,8 @@ export declare const paperGraph: import("@orpc/contract").ContractProcedureBuild
|
|
|
6
6
|
citationsOffset: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
referencesOffset: z.ZodDefault<z.ZodNumber>;
|
|
8
8
|
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
9
|
-
year: "year";
|
|
10
9
|
url: "url";
|
|
10
|
+
year: "year";
|
|
11
11
|
doi: "doi";
|
|
12
12
|
title: "title";
|
|
13
13
|
providerURL: "providerURL";
|
|
@@ -16,8 +16,8 @@ export declare const search: import("@orpc/contract").ContractProcedureBuilderWi
|
|
|
16
16
|
yearFrom: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
17
|
yearTo: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18
18
|
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
19
|
-
year: "year";
|
|
20
19
|
url: "url";
|
|
20
|
+
year: "year";
|
|
21
21
|
doi: "doi";
|
|
22
22
|
title: "title";
|
|
23
23
|
providerURL: "providerURL";
|
|
@@ -4,8 +4,8 @@ export declare const similarPapers: import("@orpc/contract").ContractProcedureBu
|
|
|
4
4
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
5
5
|
includeEdges: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodEnum<{
|
|
7
|
-
year: "year";
|
|
8
7
|
url: "url";
|
|
8
|
+
year: "year";
|
|
9
9
|
doi: "doi";
|
|
10
10
|
title: "title";
|
|
11
11
|
providerURL: "providerURL";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
4
5
|
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
5
6
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
@@ -7,8 +8,7 @@ const specializedModelSchema = z
|
|
|
7
8
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
8
9
|
.default("auto");
|
|
9
10
|
const askInputSchema = z.object({
|
|
10
|
-
url:
|
|
11
|
-
.url()
|
|
11
|
+
url: fetchableUrlSchema
|
|
12
12
|
.optional()
|
|
13
13
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
14
14
|
file: z
|
|
@@ -27,9 +27,7 @@ const askInputSchema = z.object({
|
|
|
27
27
|
model: specializedModelSchema.describe(specializedAskModelDescription),
|
|
28
28
|
callback: z
|
|
29
29
|
.object({
|
|
30
|
-
url:
|
|
31
|
-
.url()
|
|
32
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
33
31
|
type: z
|
|
34
32
|
.string()
|
|
35
33
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
5
6
|
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -8,8 +9,7 @@ const specializedModelSchema = z
|
|
|
8
9
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
9
10
|
.default("auto");
|
|
10
11
|
const extractInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -29,9 +29,7 @@ const extractInputSchema = z.object({
|
|
|
29
29
|
model: specializedModelSchema.describe(specializedExtractModelDescription),
|
|
30
30
|
callback: z
|
|
31
31
|
.object({
|
|
32
|
-
url:
|
|
33
|
-
.url()
|
|
34
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
32
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
35
33
|
type: z
|
|
36
34
|
.string()
|
|
37
35
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
4
5
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
5
6
|
const specializedParseModelSchema = z
|
|
@@ -8,8 +9,7 @@ const specializedParseModelSchema = z
|
|
|
8
9
|
})
|
|
9
10
|
.default("auto");
|
|
10
11
|
const parseInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
|
|
|
24
24
|
model: specializedParseModelSchema.describe(specializedParseModelDescription("bank statement")),
|
|
25
25
|
callback: z
|
|
26
26
|
.object({
|
|
27
|
-
url:
|
|
28
|
-
.url()
|
|
29
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
27
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
28
|
type: z
|
|
31
29
|
.string()
|
|
32
30
|
.optional()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
4
5
|
import { documentAskModelDescription, outputAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
5
6
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
6
7
|
const askInputSchema = z.object({
|
|
7
|
-
url:
|
|
8
|
-
.url()
|
|
8
|
+
url: fetchableUrlSchema
|
|
9
9
|
.optional()
|
|
10
10
|
.describe("URL of the document file to fetch and parse"),
|
|
11
11
|
file: z
|
|
@@ -28,9 +28,7 @@ const askInputSchema = z.object({
|
|
|
28
28
|
.describe(documentAskModelDescription),
|
|
29
29
|
callback: z
|
|
30
30
|
.object({
|
|
31
|
-
url:
|
|
32
|
-
.url()
|
|
33
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
31
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
34
32
|
type: z
|
|
35
33
|
.string()
|
|
36
34
|
.optional()
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
5
6
|
import { documentExtractModelDescription, outputExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
6
7
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
7
8
|
const extractInputSchema = z.object({
|
|
8
|
-
url:
|
|
9
|
-
.url()
|
|
9
|
+
url: fetchableUrlSchema
|
|
10
10
|
.optional()
|
|
11
11
|
.describe("URL of the document file to fetch and parse"),
|
|
12
12
|
file: z
|
|
@@ -30,9 +30,7 @@ const extractInputSchema = z.object({
|
|
|
30
30
|
.describe(documentExtractModelDescription),
|
|
31
31
|
callback: z
|
|
32
32
|
.object({
|
|
33
|
-
url:
|
|
34
|
-
.url()
|
|
35
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
33
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
36
34
|
type: z
|
|
37
35
|
.string()
|
|
38
36
|
.optional()
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
4
5
|
import { documentParseModelDescription, outputModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
5
6
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
6
7
|
const parseInputSchema = z.object({
|
|
7
|
-
url:
|
|
8
|
-
.url()
|
|
8
|
+
url: fetchableUrlSchema
|
|
9
9
|
.optional()
|
|
10
10
|
.describe("URL of the document file to fetch and parse"),
|
|
11
11
|
file: z
|
|
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
|
|
|
24
24
|
.describe(documentParseModelDescription),
|
|
25
25
|
callback: z
|
|
26
26
|
.object({
|
|
27
|
-
url:
|
|
28
|
-
.url()
|
|
29
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
27
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
28
|
type: z
|
|
31
29
|
.string()
|
|
32
30
|
.optional()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
4
5
|
const inputSchema = z.object({
|
|
5
|
-
url:
|
|
6
|
-
.url()
|
|
6
|
+
url: fetchableUrlSchema
|
|
7
7
|
.optional()
|
|
8
8
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
9
9
|
file: z
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
4
5
|
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
5
6
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
@@ -7,8 +8,7 @@ const specializedModelSchema = z
|
|
|
7
8
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
8
9
|
.default("auto");
|
|
9
10
|
const askInputSchema = z.object({
|
|
10
|
-
url:
|
|
11
|
-
.url()
|
|
11
|
+
url: fetchableUrlSchema
|
|
12
12
|
.optional()
|
|
13
13
|
.describe("URL of the identity document file to fetch and parse"),
|
|
14
14
|
file: z
|
|
@@ -27,9 +27,7 @@ const askInputSchema = z.object({
|
|
|
27
27
|
model: specializedModelSchema.describe(specializedAskModelDescription),
|
|
28
28
|
callback: z
|
|
29
29
|
.object({
|
|
30
|
-
url:
|
|
31
|
-
.url()
|
|
32
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
33
31
|
type: z
|
|
34
32
|
.string()
|
|
35
33
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
5
6
|
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -8,8 +9,7 @@ const specializedModelSchema = z
|
|
|
8
9
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
9
10
|
.default("auto");
|
|
10
11
|
const extractInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the identity document file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -29,9 +29,7 @@ const extractInputSchema = z.object({
|
|
|
29
29
|
model: specializedModelSchema.describe(specializedExtractModelDescription),
|
|
30
30
|
callback: z
|
|
31
31
|
.object({
|
|
32
|
-
url:
|
|
33
|
-
.url()
|
|
34
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
32
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
35
33
|
type: z
|
|
36
34
|
.string()
|
|
37
35
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
4
5
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
5
6
|
const specializedParseModelSchema = z
|
|
@@ -8,8 +9,7 @@ const specializedParseModelSchema = z
|
|
|
8
9
|
})
|
|
9
10
|
.default("auto");
|
|
10
11
|
const parseInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the identity document file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -24,9 +24,7 @@ const parseInputSchema = z.object({
|
|
|
24
24
|
model: specializedParseModelSchema.describe(specializedParseModelDescription("identity document")),
|
|
25
25
|
callback: z
|
|
26
26
|
.object({
|
|
27
|
-
url:
|
|
28
|
-
.url()
|
|
29
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
27
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
28
|
type: z
|
|
31
29
|
.string()
|
|
32
30
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
4
5
|
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
5
6
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
@@ -7,8 +8,7 @@ const specializedModelSchema = z
|
|
|
7
8
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
8
9
|
.default("auto");
|
|
9
10
|
const askInputSchema = z.object({
|
|
10
|
-
url:
|
|
11
|
-
.url()
|
|
11
|
+
url: fetchableUrlSchema
|
|
12
12
|
.optional()
|
|
13
13
|
.describe("URL of the invoice file to fetch and parse"),
|
|
14
14
|
file: z
|
|
@@ -24,9 +24,7 @@ const askInputSchema = z.object({
|
|
|
24
24
|
model: specializedModelSchema.describe(specializedAskModelDescription),
|
|
25
25
|
callback: z
|
|
26
26
|
.object({
|
|
27
|
-
url:
|
|
28
|
-
.url()
|
|
29
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
27
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
30
28
|
type: z
|
|
31
29
|
.string()
|
|
32
30
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
5
6
|
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -8,8 +9,7 @@ const specializedModelSchema = z
|
|
|
8
9
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
9
10
|
.default("auto");
|
|
10
11
|
const extractInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the invoice file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -26,9 +26,7 @@ const extractInputSchema = z.object({
|
|
|
26
26
|
model: specializedModelSchema.describe(specializedExtractModelDescription),
|
|
27
27
|
callback: z
|
|
28
28
|
.object({
|
|
29
|
-
url:
|
|
30
|
-
.url()
|
|
31
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
29
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
32
30
|
type: z
|
|
33
31
|
.string()
|
|
34
32
|
.optional()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
+
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
3
4
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
4
5
|
import { getDefaultSpec } from "./get-default-spec.js";
|
|
5
6
|
const specializedParseModelSchema = z
|
|
@@ -8,8 +9,7 @@ const specializedParseModelSchema = z
|
|
|
8
9
|
})
|
|
9
10
|
.default("auto");
|
|
10
11
|
const parseInputSchema = z.object({
|
|
11
|
-
url:
|
|
12
|
-
.url()
|
|
12
|
+
url: fetchableUrlSchema
|
|
13
13
|
.optional()
|
|
14
14
|
.describe("URL of the invoice file to fetch and parse"),
|
|
15
15
|
file: z
|
|
@@ -21,9 +21,7 @@ const parseInputSchema = z.object({
|
|
|
21
21
|
model: specializedParseModelSchema.describe(specializedParseModelDescription("invoice")),
|
|
22
22
|
callback: z
|
|
23
23
|
.object({
|
|
24
|
-
url:
|
|
25
|
-
.url()
|
|
26
|
-
.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
24
|
+
url: fetchableUrlSchema.describe("Webhook URL where results will be POSTed when processing completes"),
|
|
27
25
|
type: z
|
|
28
26
|
.string()
|
|
29
27
|
.optional()
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @pdfvector/instance-contract
|
|
2
2
|
|
|
3
|
+
## 0.0.45
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#235](https://github.com/phuctm97/pdfvector/pull/235) [`721ecc6`](https://github.com/phuctm97/pdfvector/commit/721ecc609d77dc4670c1af61a125a4e30cc52ceb) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Update dependencies and improve Document Ask errors
|
|
9
|
+
|
|
10
|
+
## 0.0.44
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- [#232](https://github.com/phuctm97/pdfvector/pull/232) [`9baa3b9`](https://github.com/phuctm97/pdfvector/commit/9baa3b96ac3b6884eaf28aa466f04397e65fc43a) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Fix non-HTTP document URL validation
|
|
16
|
+
|
|
3
17
|
## 0.0.43
|
|
4
18
|
### Patch Changes
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfvector/instance-contract",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "API contract definitions for PDF Vector instance server",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"main": ".tsc/lib/index.js",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@orpc/client": "^1.14.
|
|
24
|
-
"@orpc/contract": "^1.14.
|
|
25
|
-
"@pdfvector/util": "0.0.
|
|
23
|
+
"@orpc/client": "^1.14.2",
|
|
24
|
+
"@orpc/contract": "^1.14.2",
|
|
25
|
+
"@pdfvector/util": "0.0.22"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"zod": "^4.4.1"
|