@pdfvector/instance-contract 0.0.55 → 0.0.57
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/academic/fetch.js +2 -0
- package/.tsc/lib/router/academic/find-citations.js +2 -0
- package/.tsc/lib/router/academic/paper-graph.js +2 -0
- package/.tsc/lib/router/academic/search-grants.js +2 -0
- package/.tsc/lib/router/academic/search.js +2 -0
- package/.tsc/lib/router/academic/similar-papers.js +2 -0
- package/.tsc/lib/router/bankStatement/ask.js +6 -1
- package/.tsc/lib/router/bankStatement/extract.js +6 -1
- package/.tsc/lib/router/bankStatement/parse.js +6 -1
- package/.tsc/lib/router/document/ask.js +6 -1
- package/.tsc/lib/router/document/extract.js +6 -1
- package/.tsc/lib/router/identity/ask.js +6 -1
- package/.tsc/lib/router/identity/extract.js +6 -1
- package/.tsc/lib/router/identity/parse.js +6 -1
- package/.tsc/lib/router/invoice/ask.js +6 -1
- package/.tsc/lib/router/invoice/extract.js +6 -1
- package/.tsc/lib/router/invoice/parse.js +6 -1
- package/CHANGELOG.md +17 -0
- package/package.json +4 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { providerSchema } from "./provider.js";
|
|
@@ -112,6 +113,7 @@ export const fetch = oc
|
|
|
112
113
|
mediaType.examples = requestExamples;
|
|
113
114
|
}
|
|
114
115
|
}
|
|
116
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-fetch");
|
|
115
117
|
return op;
|
|
116
118
|
},
|
|
117
119
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { providerSchema } from "./provider.js";
|
|
@@ -109,6 +110,7 @@ export const findCitations = oc
|
|
|
109
110
|
mediaType.examples = requestExamples;
|
|
110
111
|
}
|
|
111
112
|
}
|
|
113
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-find-citations");
|
|
112
114
|
return op;
|
|
113
115
|
},
|
|
114
116
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { providerSchema } from "./provider.js";
|
|
@@ -137,6 +138,7 @@ export const paperGraph = oc
|
|
|
137
138
|
mediaType.examples = requestExamples;
|
|
138
139
|
}
|
|
139
140
|
}
|
|
141
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-paper-graph");
|
|
140
142
|
return op;
|
|
141
143
|
},
|
|
142
144
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { grantProviderSchema } from "./provider.js";
|
|
@@ -164,6 +165,7 @@ export const searchGrants = oc
|
|
|
164
165
|
mediaType.examples = requestExamples;
|
|
165
166
|
}
|
|
166
167
|
}
|
|
168
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-search-grants");
|
|
167
169
|
return op;
|
|
168
170
|
},
|
|
169
171
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { providerSchema } from "./provider.js";
|
|
@@ -147,6 +148,7 @@ export const search = oc
|
|
|
147
148
|
mediaType.examples = requestExamples;
|
|
148
149
|
}
|
|
149
150
|
}
|
|
151
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-search");
|
|
150
152
|
return op;
|
|
151
153
|
},
|
|
152
154
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { academicCreditCosts } from "@pdfvector/util";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
import { providerSchema } from "./provider.js";
|
|
@@ -136,6 +137,7 @@ export const similarPapers = oc
|
|
|
136
137
|
mediaType.examples = requestExamples;
|
|
137
138
|
}
|
|
138
139
|
}
|
|
140
|
+
op["x-codeSamples"] = getOpenApiCodeSamples("academic-similar-papers");
|
|
139
141
|
return op;
|
|
140
142
|
},
|
|
141
143
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
@@ -70,7 +71,11 @@ export const ask = oc
|
|
|
70
71
|
summary: "Ask a question about a bank statement",
|
|
71
72
|
description: `Parse a bank statement and answer a question about its content using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
72
73
|
tags: ["Bank Statement"],
|
|
73
|
-
spec: (op) =>
|
|
74
|
+
spec: (op) => {
|
|
75
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
76
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("bank-statement-ask");
|
|
77
|
+
return spec;
|
|
78
|
+
},
|
|
74
79
|
})
|
|
75
80
|
.input(askInputSchema)
|
|
76
81
|
.output(askOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
@@ -95,7 +96,11 @@ export const extract = oc
|
|
|
95
96
|
summary: "Extract structured data from a bank statement",
|
|
96
97
|
description: `Parse a bank statement and extract structured data matching a provided JSON Schema using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
97
98
|
tags: ["Bank Statement"],
|
|
98
|
-
spec: (op) =>
|
|
99
|
+
spec: (op) => {
|
|
100
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
101
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("bank-statement-extract");
|
|
102
|
+
return spec;
|
|
103
|
+
},
|
|
99
104
|
})
|
|
100
105
|
.input(extractInputSchema)
|
|
101
106
|
.output(extractOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -87,7 +88,11 @@ export const parse = oc
|
|
|
87
88
|
summary: "Parse a bank statement",
|
|
88
89
|
description: `Extract text and structured data from a bank statement. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
89
90
|
tags: ["Bank Statement"],
|
|
90
|
-
spec: (op) =>
|
|
91
|
+
spec: (op) => {
|
|
92
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
93
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("bank-statement-parse");
|
|
94
|
+
return spec;
|
|
95
|
+
},
|
|
91
96
|
})
|
|
92
97
|
.input(parseInputSchema)
|
|
93
98
|
.output(parseOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
@@ -116,7 +117,11 @@ export const ask = oc
|
|
|
116
117
|
summary: "Ask a question about a document",
|
|
117
118
|
description: `Parse a document and answer a question about its content using AI. Supports ${supportedFileTypesLong}. Files up to 1000 pages and up to 500MB in size. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
118
119
|
tags: ["Document"],
|
|
119
|
-
spec: (op) =>
|
|
120
|
+
spec: (op) => {
|
|
121
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
122
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("document-ask");
|
|
123
|
+
return spec;
|
|
124
|
+
},
|
|
120
125
|
})
|
|
121
126
|
.input(askInputSchema)
|
|
122
127
|
.output(askOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
@@ -134,7 +135,11 @@ export const extract = oc
|
|
|
134
135
|
summary: "Extract structured data from a document",
|
|
135
136
|
description: `Parse a document and extract structured data matching a provided JSON Schema using AI. Supports ${supportedFileTypesLong}. Files up to 1000 pages and up to 500MB in size. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
136
137
|
tags: ["Document"],
|
|
137
|
-
spec: (op) =>
|
|
138
|
+
spec: (op) => {
|
|
139
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
140
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("document-extract");
|
|
141
|
+
return spec;
|
|
142
|
+
},
|
|
138
143
|
})
|
|
139
144
|
.input(extractInputSchema)
|
|
140
145
|
.output(extractOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
@@ -77,7 +78,11 @@ export const ask = oc
|
|
|
77
78
|
summary: "Ask a question about an identity document",
|
|
78
79
|
description: `Parse an identity document and answer a question about its content using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
79
80
|
tags: ["Identity"],
|
|
80
|
-
spec: (op) =>
|
|
81
|
+
spec: (op) => {
|
|
82
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
83
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("identity-ask");
|
|
84
|
+
return spec;
|
|
85
|
+
},
|
|
81
86
|
})
|
|
82
87
|
.input(askInputSchema)
|
|
83
88
|
.output(askOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
@@ -85,7 +86,11 @@ export const extract = oc
|
|
|
85
86
|
summary: "Extract structured data from an identity document",
|
|
86
87
|
description: `Parse an identity document and extract structured data matching a provided JSON Schema using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
87
88
|
tags: ["Identity"],
|
|
88
|
-
spec: (op) =>
|
|
89
|
+
spec: (op) => {
|
|
90
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
91
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("identity-extract");
|
|
92
|
+
return spec;
|
|
93
|
+
},
|
|
89
94
|
})
|
|
90
95
|
.input(extractInputSchema)
|
|
91
96
|
.output(extractOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -91,7 +92,11 @@ export const parse = oc
|
|
|
91
92
|
summary: "Parse an identity document",
|
|
92
93
|
description: `Extract text and structured data from an identity document. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
93
94
|
tags: ["Identity"],
|
|
94
|
-
spec: (op) =>
|
|
95
|
+
spec: (op) => {
|
|
96
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
97
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("identity-parse");
|
|
98
|
+
return spec;
|
|
99
|
+
},
|
|
95
100
|
})
|
|
96
101
|
.input(parseInputSchema)
|
|
97
102
|
.output(parseOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { pdfvectorModelSchema } from "../../pdfvector-model-schema.js";
|
|
@@ -67,7 +68,11 @@ export const ask = oc
|
|
|
67
68
|
summary: "Ask a question about an invoice",
|
|
68
69
|
description: `Parse an invoice and answer a question about its content using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
69
70
|
tags: ["Invoice"],
|
|
70
|
-
spec: (op) =>
|
|
71
|
+
spec: (op) => {
|
|
72
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
73
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("invoice-ask");
|
|
74
|
+
return spec;
|
|
75
|
+
},
|
|
71
76
|
})
|
|
72
77
|
.input(askInputSchema)
|
|
73
78
|
.output(askOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { jsonSchemaInput } from "../../json-schema-input.js";
|
|
@@ -91,7 +92,11 @@ export const extract = oc
|
|
|
91
92
|
summary: "Extract structured data from an invoice",
|
|
92
93
|
description: `Parse an invoice and extract structured data matching a provided JSON Schema using AI. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
93
94
|
tags: ["Invoice"],
|
|
94
|
-
spec: (op) =>
|
|
95
|
+
spec: (op) => {
|
|
96
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
97
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("invoice-extract");
|
|
98
|
+
return spec;
|
|
99
|
+
},
|
|
95
100
|
})
|
|
96
101
|
.input(extractInputSchema)
|
|
97
102
|
.output(extractOutputSchema);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { oc } from "@orpc/contract";
|
|
2
|
+
import { getOpenApiCodeSamples } from "@pdfvector/api-docs";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { fetchableUrlSchema } from "../../fetchable-url-schema.js";
|
|
4
5
|
import { specializedParseModelDescription, supportedFileFormatsDescription, supportedFileMimeErrorMessage, supportedFileMimes, supportedFileTypesLong, } from "../../supported-mimes.js";
|
|
@@ -82,7 +83,11 @@ export const parse = oc
|
|
|
82
83
|
summary: "Parse an invoice",
|
|
83
84
|
description: `Extract text and structured data from an invoice. Supports ${supportedFileTypesLong}. Provide the document via file upload, a public URL, or a base64-encoded string.`,
|
|
84
85
|
tags: ["Invoice"],
|
|
85
|
-
spec: (op) =>
|
|
86
|
+
spec: (op) => {
|
|
87
|
+
const spec = getDefaultSpec(op, requestExamples);
|
|
88
|
+
spec["x-codeSamples"] = getOpenApiCodeSamples("invoice-parse");
|
|
89
|
+
return spec;
|
|
90
|
+
},
|
|
86
91
|
})
|
|
87
92
|
.input(parseInputSchema)
|
|
88
93
|
.output(parseOutputSchema);
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @pdfvector/instance-contract
|
|
2
2
|
|
|
3
|
+
## 0.0.57
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#277](https://github.com/phuctm97/pdfvector/pull/277) [`fcea0c1`](https://github.com/phuctm97/pdfvector/commit/fcea0c13283fafebdd39b12f849d92396c3708b1) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Fix malformed Office upload handling.
|
|
9
|
+
|
|
10
|
+
## 0.0.56
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- [#274](https://github.com/phuctm97/pdfvector/pull/274) [`5f61021`](https://github.com/phuctm97/pdfvector/commit/5f61021385f3d97e02bc92d2d8b5ed2ad3ffd17f) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Expand shared public API docs, export pricing, add full OpenAPI code samples, and remove the redundant website skills.sh route.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`5f61021`](https://github.com/phuctm97/pdfvector/commit/5f61021385f3d97e02bc92d2d8b5ed2ad3ffd17f)]:
|
|
18
|
+
- @pdfvector/api-docs@0.0.6
|
|
19
|
+
|
|
3
20
|
## 0.0.55
|
|
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.57",
|
|
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/api-docs": "^0.0.
|
|
23
|
+
"@orpc/client": "^1.14.6",
|
|
24
|
+
"@orpc/contract": "^1.14.6",
|
|
25
|
+
"@pdfvector/api-docs": "^0.0.6",
|
|
26
26
|
"@pdfvector/util": "^0.0.23"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|