@pdfvector/instance-contract 0.0.36 → 0.0.38
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/router/admin/get-free-usage-records.d.ts +12 -0
- package/.tsc/lib/router/admin/get-free-usage-records.js +4 -0
- package/.tsc/lib/router/admin/get-usage-records.d.ts +12 -0
- package/.tsc/lib/router/admin/get-usage-records.js +4 -0
- package/.tsc/lib/router/bankStatement/ask.js +2 -2
- package/.tsc/lib/router/bankStatement/extract.js +2 -2
- package/.tsc/lib/router/bankStatement/parse.js +2 -2
- package/.tsc/lib/router/document/ask.js +2 -2
- package/.tsc/lib/router/document/extract.js +2 -2
- package/.tsc/lib/router/document/parse.js +2 -2
- package/.tsc/lib/router/free/bank-statement-parse.js +2 -2
- package/.tsc/lib/router/identity/ask.js +2 -2
- package/.tsc/lib/router/identity/extract.js +2 -2
- package/.tsc/lib/router/identity/parse.js +2 -2
- package/.tsc/lib/router/invoice/ask.js +2 -2
- package/.tsc/lib/router/invoice/extract.js +2 -2
- package/.tsc/lib/router/invoice/parse.js +2 -2
- package/.tsc/lib/supported-mimes.d.ts +5 -0
- package/.tsc/lib/supported-mimes.js +5 -0
- package/CHANGELOG.md +17 -0
- package/package.json +2 -2
|
@@ -14,6 +14,18 @@ export declare const getFreeUsageRecords: import("@orpc/contract").ContractProce
|
|
|
14
14
|
documentType: z.ZodNullable<z.ZodString>;
|
|
15
15
|
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
16
16
|
error: z.ZodNullable<z.ZodString>;
|
|
17
|
+
status: z.ZodEnum<{
|
|
18
|
+
success: "success";
|
|
19
|
+
user_error: "user_error";
|
|
20
|
+
system_error: "system_error";
|
|
21
|
+
}>;
|
|
22
|
+
errorStage: z.ZodNullable<z.ZodEnum<{
|
|
23
|
+
auth: "auth";
|
|
24
|
+
validation: "validation";
|
|
25
|
+
preprocessing: "preprocessing";
|
|
26
|
+
processing: "processing";
|
|
27
|
+
}>>;
|
|
28
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
17
29
|
duration: z.ZodNumber;
|
|
18
30
|
createdAt: z.ZodNumber;
|
|
19
31
|
}, z.core.$strip>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { errorStages, usageStatuses } from "@pdfvector/util";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
const freeUsageRecordSchema = z.object({
|
|
4
5
|
id: z.number(),
|
|
@@ -11,6 +12,9 @@ const freeUsageRecordSchema = z.object({
|
|
|
11
12
|
documentType: z.string().nullable(),
|
|
12
13
|
pageCount: z.number().nullable(),
|
|
13
14
|
error: z.string().nullable(),
|
|
15
|
+
status: z.enum(usageStatuses),
|
|
16
|
+
errorStage: z.enum(errorStages).nullable(),
|
|
17
|
+
errorCode: z.string().nullable(),
|
|
14
18
|
duration: z.number(),
|
|
15
19
|
createdAt: z.number(),
|
|
16
20
|
});
|
|
@@ -13,6 +13,18 @@ export declare const getUsageRecords: import("@orpc/contract").ContractProcedure
|
|
|
13
13
|
documentType: z.ZodString;
|
|
14
14
|
documentId: z.ZodNullable<z.ZodString>;
|
|
15
15
|
error: z.ZodNullable<z.ZodString>;
|
|
16
|
+
status: z.ZodEnum<{
|
|
17
|
+
success: "success";
|
|
18
|
+
user_error: "user_error";
|
|
19
|
+
system_error: "system_error";
|
|
20
|
+
}>;
|
|
21
|
+
errorStage: z.ZodNullable<z.ZodEnum<{
|
|
22
|
+
auth: "auth";
|
|
23
|
+
validation: "validation";
|
|
24
|
+
preprocessing: "preprocessing";
|
|
25
|
+
processing: "processing";
|
|
26
|
+
}>>;
|
|
27
|
+
errorCode: z.ZodNullable<z.ZodString>;
|
|
16
28
|
duration: z.ZodNumber;
|
|
17
29
|
operation: z.ZodString;
|
|
18
30
|
pageCount: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { errorStages, usageStatuses } from "@pdfvector/util";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
const usageRecordSchema = z.object({
|
|
4
5
|
id: z.number(),
|
|
@@ -10,6 +11,9 @@ const usageRecordSchema = z.object({
|
|
|
10
11
|
documentType: z.string(),
|
|
11
12
|
documentId: z.string().nullable(),
|
|
12
13
|
error: z.string().nullable(),
|
|
14
|
+
status: z.enum(usageStatuses),
|
|
15
|
+
errorStage: z.enum(errorStages).nullable(),
|
|
16
|
+
errorCode: z.string().nullable(),
|
|
13
17
|
duration: z.number(),
|
|
14
18
|
operation: z.string(),
|
|
15
19
|
pageCount: z.number().nullable(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const askInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Bank statement file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const extractInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Bank statement file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
3
|
+
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
4
|
import { getDefaultSpec } from "./get-default-spec";
|
|
5
5
|
const specializedParseModelSchema = z
|
|
6
6
|
.enum(["pro", "max", "auto"], {
|
|
@@ -14,7 +14,7 @@ const parseInputSchema = z.object({
|
|
|
14
14
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
15
15
|
file: z
|
|
16
16
|
.file()
|
|
17
|
-
.mime([...supportedFileMimes])
|
|
17
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
18
18
|
.optional()
|
|
19
19
|
.describe(`Bank statement file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
20
20
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { documentAskModelDescription, outputAskModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { documentAskModelDescription, outputAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const askInputSchema = z.object({
|
|
7
7
|
url: z
|
|
@@ -10,7 +10,7 @@ const askInputSchema = z.object({
|
|
|
10
10
|
.describe("URL of the document file to fetch and parse"),
|
|
11
11
|
file: z
|
|
12
12
|
.file()
|
|
13
|
-
.mime([...supportedFileMimes])
|
|
13
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
14
14
|
.optional()
|
|
15
15
|
.describe(`Document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
16
16
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { documentExtractModelDescription, outputExtractModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { documentExtractModelDescription, outputExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const extractInputSchema = z.object({
|
|
7
7
|
url: z
|
|
@@ -10,7 +10,7 @@ const extractInputSchema = z.object({
|
|
|
10
10
|
.describe("URL of the document file to fetch and parse"),
|
|
11
11
|
file: z
|
|
12
12
|
.file()
|
|
13
|
-
.mime([...supportedFileMimes])
|
|
13
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
14
14
|
.optional()
|
|
15
15
|
.describe(`Document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
16
16
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { documentParseModelDescription, outputModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { documentParseModelDescription, outputModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const parseInputSchema = z.object({
|
|
7
7
|
url: z
|
|
@@ -10,7 +10,7 @@ const parseInputSchema = z.object({
|
|
|
10
10
|
.describe("URL of the document file to fetch and parse"),
|
|
11
11
|
file: z
|
|
12
12
|
.file()
|
|
13
|
-
.mime([...supportedFileMimes])
|
|
13
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
14
14
|
.optional()
|
|
15
15
|
.describe(`Document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
16
16
|
base64: z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
3
|
+
import { supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
4
|
const inputSchema = z.object({
|
|
5
5
|
url: z
|
|
6
6
|
.url()
|
|
@@ -8,7 +8,7 @@ const inputSchema = z.object({
|
|
|
8
8
|
.describe("URL of the bank statement file to fetch and parse"),
|
|
9
9
|
file: z
|
|
10
10
|
.file()
|
|
11
|
-
.mime([...supportedFileMimes])
|
|
11
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
12
12
|
.optional()
|
|
13
13
|
.describe(`Bank statement file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
14
14
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const askInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the identity document file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Identity document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const extractInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the identity document file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Identity document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
3
|
+
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
4
|
import { getDefaultSpec } from "./get-default-spec";
|
|
5
5
|
const specializedParseModelSchema = z
|
|
6
6
|
.enum(["pro", "max", "auto"], {
|
|
@@ -14,7 +14,7 @@ const parseInputSchema = z.object({
|
|
|
14
14
|
.describe("URL of the identity document file to fetch and parse"),
|
|
15
15
|
file: z
|
|
16
16
|
.file()
|
|
17
|
-
.mime([...supportedFileMimes])
|
|
17
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
18
18
|
.optional()
|
|
19
19
|
.describe(`Identity document file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
20
20
|
base64: z
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputAskModelDescription, specializedAskModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const askInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the invoice file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Invoice file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z.string().optional().describe("Base64-encoded invoice file content"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema";
|
|
4
|
-
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
|
+
import { outputExtractModelDescription, specializedExtractModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
5
5
|
import { getDefaultSpec } from "./get-default-spec";
|
|
6
6
|
const specializedModelSchema = z
|
|
7
7
|
.enum(["auto", ...pdfvectorModelSchema.options])
|
|
@@ -13,7 +13,7 @@ const extractInputSchema = z.object({
|
|
|
13
13
|
.describe("URL of the invoice file to fetch and parse"),
|
|
14
14
|
file: z
|
|
15
15
|
.file()
|
|
16
|
-
.mime([...supportedFileMimes])
|
|
16
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
17
17
|
.optional()
|
|
18
18
|
.describe(`Invoice file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
19
19
|
base64: z.string().optional().describe("Base64-encoded invoice file content"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
3
|
+
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes";
|
|
4
4
|
import { getDefaultSpec } from "./get-default-spec";
|
|
5
5
|
const specializedParseModelSchema = z
|
|
6
6
|
.enum(["pro", "max", "auto"], {
|
|
@@ -14,7 +14,7 @@ const parseInputSchema = z.object({
|
|
|
14
14
|
.describe("URL of the invoice file to fetch and parse"),
|
|
15
15
|
file: z
|
|
16
16
|
.file()
|
|
17
|
-
.mime([...supportedFileMimes])
|
|
17
|
+
.mime([...supportedFileMimes], supportedFileMimeErrorMessage)
|
|
18
18
|
.optional()
|
|
19
19
|
.describe(`Invoice file upload via multipart form-data (${supportedFileFormatsDescription})`),
|
|
20
20
|
base64: z.string().optional().describe("Base64-encoded invoice file content"),
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const supportedFileMimes: readonly ["application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/csv", "application/csv", "image/png", "image/jpeg", "image/tiff", "image/bmp", "image/heif", "image/heic", "text/plain", "text/markdown", "text/tab-separated-values", "text/xml", "application/xml", "application/rtf", "text/rtf", "text/html", "application/epub+zip", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.presentation", "application/x-bibtex"];
|
|
6
6
|
export declare const supportedFileFormatsDescription = "PDF, DOCX, XLSX, PPTX, CSV, PNG, JPG, TIFF, BMP, HEIF, TXT, MD, TSV, XML, RTF, HTML, ODT, ODS, ODP, EPUB, BIB, RIS, NBIB, ENW";
|
|
7
|
+
/**
|
|
8
|
+
* Friendly validation error when an uploaded file's MIME type is not supported.
|
|
9
|
+
* Lists the human-readable extensions instead of raw MIME types.
|
|
10
|
+
*/
|
|
11
|
+
export declare const supportedFileMimeErrorMessage = "file must be a supported format: PDF, DOCX, XLSX, PPTX, CSV, PNG, JPG, TIFF, BMP, HEIF, TXT, MD, TSV, XML, RTF, HTML, ODT, ODS, ODP, EPUB, BIB, RIS, NBIB, ENW";
|
|
7
12
|
/**
|
|
8
13
|
* Human-readable description of supported file types with extensions.
|
|
9
14
|
* Used in route-level API descriptions.
|
|
@@ -40,6 +40,11 @@ export const supportedFileMimes = [
|
|
|
40
40
|
"application/x-bibtex",
|
|
41
41
|
];
|
|
42
42
|
export const supportedFileFormatsDescription = allSupportedFormatsShort;
|
|
43
|
+
/**
|
|
44
|
+
* Friendly validation error when an uploaded file's MIME type is not supported.
|
|
45
|
+
* Lists the human-readable extensions instead of raw MIME types.
|
|
46
|
+
*/
|
|
47
|
+
export const supportedFileMimeErrorMessage = `file must be a supported format: ${allSupportedFormatsShort}`;
|
|
43
48
|
/**
|
|
44
49
|
* Human-readable description of supported file types with extensions.
|
|
45
50
|
* Used in route-level API descriptions.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @pdfvector/instance-contract
|
|
2
2
|
|
|
3
|
+
## 0.0.38
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [`f715571`](https://github.com/phuctm97/pdfvector/commit/f715571148b5adcee39caa66291bf886e3eac7b6) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Redesign playground and return friendly file upload errors
|
|
9
|
+
|
|
10
|
+
## 0.0.37
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- [#199](https://github.com/phuctm97/pdfvector/pull/199) [`761547d`](https://github.com/phuctm97/pdfvector/commit/761547db6ad1cf6bd11ea7a1f56b6f4806c72f6a) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Redesign request usage tracking with 3-state taxonomy
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`761547d`](https://github.com/phuctm97/pdfvector/commit/761547db6ad1cf6bd11ea7a1f56b6f4806c72f6a)]:
|
|
18
|
+
- @pdfvector/util@0.0.19
|
|
19
|
+
|
|
3
20
|
## 0.0.36
|
|
4
21
|
### Patch Changes
|
|
5
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfvector/instance-contract",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "API contract definitions for PDF Vector instance server",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": ".tsc/lib/index.js",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@orpc/contract": "^1.13.14",
|
|
24
|
-
"@pdfvector/util": "0.0.
|
|
24
|
+
"@pdfvector/util": "0.0.19"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"zod": "^4.3.6"
|