@pdfvector/instance-contract 0.0.18 → 0.0.19

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.
@@ -16,5 +16,6 @@ export declare const parse: import("@orpc/contract").ContractProcedureBuilderWit
16
16
  max: "max";
17
17
  }>;
18
18
  requestId: z.ZodNumber;
19
+ html: z.ZodOptional<z.ZodString>;
19
20
  documentId: z.ZodOptional<z.ZodString>;
20
21
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -43,6 +43,11 @@ const parseOutputSchema = z.object({
43
43
  .number()
44
44
  .int()
45
45
  .describe("Unique request identifier for this API call"),
46
+ html: z
47
+ .string()
48
+ .optional()
49
+ .describe("Full HTML representation of the document content. Only available when using the 'max' model. " +
50
+ "Preserves rich formatting, tables, selection marks, and visual layout that cannot be fully represented in markdown."),
46
51
  documentId: z
47
52
  .string()
48
53
  .optional()
@@ -20,5 +20,6 @@ export declare const parse: import("@orpc/contract").ContractProcedureBuilderWit
20
20
  max: "max";
21
21
  }>;
22
22
  requestId: z.ZodNumber;
23
+ html: z.ZodOptional<z.ZodString>;
23
24
  documentId: z.ZodOptional<z.ZodString>;
24
25
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -47,6 +47,11 @@ const parseOutputSchema = z.object({
47
47
  .number()
48
48
  .int()
49
49
  .describe("Unique request identifier for this API call"),
50
+ html: z
51
+ .string()
52
+ .optional()
53
+ .describe("Full HTML representation of the document content. Only available when using the 'max' model. " +
54
+ "Preserves rich formatting, tables, selection marks, and visual layout that cannot be fully represented in markdown."),
50
55
  documentId: z
51
56
  .string()
52
57
  .optional()
@@ -70,7 +70,7 @@ export const ask = oc
70
70
  .route({
71
71
  summary: "Ask a question about an identity document",
72
72
  description: "Parse an identity document and answer a question about its content using AI. Supports PDF, Word (.docx), Excel (.xlsx), CSV, and Image (.png, .jpg) files. Provide the document via file upload, a public URL, or a base64-encoded string.",
73
- tags: ["Identity Document"],
73
+ tags: ["Identity"],
74
74
  spec: (op) => getDefaultSpec(op, requestExamples),
75
75
  })
76
76
  .input(askInputSchema)
@@ -100,7 +100,7 @@ export const extract = oc
100
100
  .route({
101
101
  summary: "Extract structured data from an identity document",
102
102
  description: "Parse an identity document and extract structured data matching a provided JSON Schema using AI. Supports PDF, Word (.docx), Excel (.xlsx), CSV, and Image (.png, .jpg) files. Provide the document via file upload, a public URL, or a base64-encoded string.",
103
- tags: ["Identity Document"],
103
+ tags: ["Identity"],
104
104
  spec: (op) => getDefaultSpec(op, requestExamples),
105
105
  })
106
106
  .input(extractInputSchema)
@@ -16,6 +16,7 @@ export declare const parse: import("@orpc/contract").ContractProcedureBuilderWit
16
16
  max: "max";
17
17
  }>;
18
18
  documentType: z.ZodOptional<z.ZodString>;
19
+ html: z.ZodOptional<z.ZodString>;
19
20
  requestId: z.ZodNumber;
20
21
  documentId: z.ZodOptional<z.ZodString>;
21
22
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -43,6 +43,11 @@ const parseOutputSchema = z.object({
43
43
  .string()
44
44
  .optional()
45
45
  .describe("Detected identity document type (e.g., passport, driver's license)"),
46
+ html: z
47
+ .string()
48
+ .optional()
49
+ .describe("Full HTML representation of the document content. Only available when using the 'max' model. " +
50
+ "Preserves rich formatting, tables, selection marks, and visual layout that cannot be fully represented in markdown."),
46
51
  requestId: z
47
52
  .number()
48
53
  .int()
@@ -76,7 +81,7 @@ export const parse = oc
76
81
  .route({
77
82
  summary: "Parse an identity document",
78
83
  description: "Extract text and structured data from an identity document. Supports PDF, Word (.docx), Excel (.xlsx), CSV, and Image (.png, .jpg) files. Provide the document via file upload, a public URL, or a base64-encoded string.",
79
- tags: ["Identity Document"],
84
+ tags: ["Identity"],
80
85
  spec: (op) => getDefaultSpec(op, requestExamples),
81
86
  })
82
87
  .input(parseInputSchema)
@@ -16,5 +16,6 @@ export declare const parse: import("@orpc/contract").ContractProcedureBuilderWit
16
16
  max: "max";
17
17
  }>;
18
18
  requestId: z.ZodNumber;
19
+ html: z.ZodOptional<z.ZodString>;
19
20
  documentId: z.ZodOptional<z.ZodString>;
20
21
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
@@ -38,6 +38,11 @@ const parseOutputSchema = z.object({
38
38
  .number()
39
39
  .int()
40
40
  .describe("Unique request identifier for this API call"),
41
+ html: z
42
+ .string()
43
+ .optional()
44
+ .describe("Full HTML representation of the document content. Only available when using the 'max' model. " +
45
+ "Preserves rich formatting, tables, selection marks, and visual layout that cannot be fully represented in markdown."),
41
46
  documentId: z
42
47
  .string()
43
48
  .optional()
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @pdfvector/instance-contract
2
2
 
3
+ ## 0.0.19
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#116](https://github.com/phuctm97/pdfvector/pull/116) [`c9bf7f0`](https://github.com/phuctm97/pdfvector/commit/c9bf7f05be2be778818306010cf1b484e4233702) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Add HTML field to parse response and rename Identity Document tag to Identity
9
+
3
10
  ## 0.0.18
4
11
  ### Patch Changes
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/instance-contract",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "main": ".tsc/lib/index.js",
6
6
  "dependencies": {