@pdfvector/instance-client 0.0.52 → 0.0.60
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/CHANGELOG.md +64 -0
- package/README.md +16 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# @pdfvector/instance-client
|
|
2
2
|
|
|
3
|
+
## 0.0.60
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [[`5f61021`](https://github.com/phuctm97/pdfvector/commit/5f61021385f3d97e02bc92d2d8b5ed2ad3ffd17f)]:
|
|
7
|
+
- @pdfvector/instance-contract@0.0.56
|
|
8
|
+
|
|
9
|
+
## 0.0.59
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- [#273](https://github.com/phuctm97/pdfvector/pull/273) [`905025f`](https://github.com/phuctm97/pdfvector/commit/905025f926b760b5b1b7f6cfc876fc8557c70d46) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Release npm packages with trusted publishing
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [[`905025f`](https://github.com/phuctm97/pdfvector/commit/905025f926b760b5b1b7f6cfc876fc8557c70d46)]:
|
|
17
|
+
- @pdfvector/instance-contract@0.0.55
|
|
18
|
+
|
|
19
|
+
## 0.0.58
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
- [#271](https://github.com/phuctm97/pdfvector/pull/271) [`054e4db`](https://github.com/phuctm97/pdfvector/commit/054e4dbeb712d5fe482c80f08082c33e09480942) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Authenticate npm package release workflows
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [[`054e4db`](https://github.com/phuctm97/pdfvector/commit/054e4dbeb712d5fe482c80f08082c33e09480942)]:
|
|
27
|
+
- @pdfvector/instance-contract@0.0.54
|
|
28
|
+
|
|
29
|
+
## 0.0.57
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- [#270](https://github.com/phuctm97/pdfvector/pull/270) [`e3503c4`](https://github.com/phuctm97/pdfvector/commit/e3503c4922384cad889e92cc2a6f5979b05544fe) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Use npm publish for npm package release workflows
|
|
35
|
+
|
|
36
|
+
- Updated dependencies [[`e3503c4`](https://github.com/phuctm97/pdfvector/commit/e3503c4922384cad889e92cc2a6f5979b05544fe)]:
|
|
37
|
+
- @pdfvector/instance-contract@0.0.53
|
|
38
|
+
|
|
39
|
+
## 0.0.56
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
- [#269](https://github.com/phuctm97/pdfvector/pull/269) [`11c2f38`](https://github.com/phuctm97/pdfvector/commit/11c2f3891ceaa9f051664598624a3e75aa5f096d) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Fix npm package release publishing
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [[`11c2f38`](https://github.com/phuctm97/pdfvector/commit/11c2f3891ceaa9f051664598624a3e75aa5f096d)]:
|
|
47
|
+
- @pdfvector/instance-contract@0.0.52
|
|
48
|
+
|
|
49
|
+
## 0.0.55
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies [[`37c6f35`](https://github.com/phuctm97/pdfvector/commit/37c6f35a6d2129e95a79fd44f7834a6e12df04ee)]:
|
|
53
|
+
- @pdfvector/instance-contract@0.0.51
|
|
54
|
+
|
|
55
|
+
## 0.0.54
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [[`d6f79b3`](https://github.com/phuctm97/pdfvector/commit/d6f79b3d9a8bf5554e3f8dc0912468031ddb0c7a)]:
|
|
59
|
+
- @pdfvector/instance-contract@0.0.50
|
|
60
|
+
|
|
61
|
+
## 0.0.53
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- Updated dependencies [[`e24aa70`](https://github.com/phuctm97/pdfvector/commit/e24aa706cdd48a10efa13d3d613d63cebf921d16)]:
|
|
65
|
+
- @pdfvector/instance-contract@0.0.49
|
|
66
|
+
|
|
3
67
|
## 0.0.52
|
|
4
68
|
### Patch Changes
|
|
5
69
|
|
package/README.md
CHANGED
|
@@ -26,9 +26,11 @@ const client = createClient({
|
|
|
26
26
|
// Parse a document
|
|
27
27
|
const parseResult = await client.document.parse({
|
|
28
28
|
url: "https://example.com/document.pdf",
|
|
29
|
+
includePages: true,
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
console.log(parseResult.markdown);
|
|
33
|
+
console.log(parseResult.pages?.[0]?.markdown);
|
|
32
34
|
console.log(`Pages: ${parseResult.pageCount}, Model: ${parseResult.model}`);
|
|
33
35
|
|
|
34
36
|
// Ask questions about documents
|
|
@@ -100,6 +102,7 @@ All document endpoints accept three input methods: `url`, `file` (File/Blob), or
|
|
|
100
102
|
|
|
101
103
|
### Parse
|
|
102
104
|
|
|
105
|
+
<!-- pdfvector-docs:client-readme-document-parse:start -->
|
|
103
106
|
Extract text content from documents:
|
|
104
107
|
|
|
105
108
|
```typescript
|
|
@@ -107,16 +110,19 @@ const result = await client.document.parse(
|
|
|
107
110
|
{
|
|
108
111
|
url: "https://example.com/document.pdf",
|
|
109
112
|
model: "auto", // "auto" | "nano" | "mini" | "pro" | "max"
|
|
113
|
+
includePages: true, // optional: return page-separated markdown
|
|
110
114
|
},
|
|
111
115
|
{ context: { documentId: "my-doc-123" } }, // optional, for usage tracking
|
|
112
116
|
);
|
|
113
117
|
|
|
114
118
|
console.log(result.markdown); // Extracted text
|
|
119
|
+
console.log(result.pages); // [{ pageNumber: 1, markdown: "..." }]
|
|
115
120
|
console.log(result.pageCount); // Number of pages
|
|
116
121
|
console.log(result.model); // Model tier used
|
|
117
122
|
console.log(result.html); // Full HTML (only with 'max' model)
|
|
118
123
|
console.log(result.documentId); // "my-doc-123"
|
|
119
124
|
```
|
|
125
|
+
<!-- pdfvector-docs:client-readme-document-parse:end -->
|
|
120
126
|
|
|
121
127
|
### Parse from file data
|
|
122
128
|
|
|
@@ -382,20 +388,24 @@ result.errors?.forEach((error) => {
|
|
|
382
388
|
|
|
383
389
|
### Parse Academic Paper to Markdown
|
|
384
390
|
|
|
391
|
+
<!-- pdfvector-docs:client-readme-academic-parse:start -->
|
|
385
392
|
Resolve a paper ID or provider URL to its public PDF and parse it into markdown. Uses the same per-page model pricing as Document Parse.
|
|
386
393
|
|
|
387
394
|
```typescript
|
|
388
395
|
const result = await client.academic.parse({
|
|
389
396
|
id: "1706.03762", // DOI, PubMed ID, ArXiv ID, Semantic Scholar ID, or provider URL
|
|
390
397
|
model: "auto", // "auto" | "nano" | "mini" | "pro" | "max"
|
|
398
|
+
includePages: true,
|
|
391
399
|
});
|
|
392
400
|
|
|
393
401
|
console.log(`Title: ${result.title}`);
|
|
394
402
|
console.log(`Provider: ${result.detectedProvider}`);
|
|
395
403
|
console.log(`PDF: ${result.pdfURL}`);
|
|
396
404
|
console.log(result.markdown);
|
|
405
|
+
console.log(result.pages?.[0]?.markdown);
|
|
397
406
|
console.log(`Pages: ${result.pageCount}, Credits: ${result.credits}`);
|
|
398
407
|
```
|
|
408
|
+
<!-- pdfvector-docs:client-readme-academic-parse:end -->
|
|
399
409
|
|
|
400
410
|
You can pass a provider URL instead of an ID:
|
|
401
411
|
|
|
@@ -587,18 +597,19 @@ console.log(resultB.documentId); // "doc-b"
|
|
|
587
597
|
|
|
588
598
|
## Credit Costs
|
|
589
599
|
|
|
600
|
+
<!-- pdfvector-docs:client-readme-credit-costs:start -->
|
|
590
601
|
| API | nano | mini | pro | max | Unit |
|
|
591
602
|
|-----|------|------|-----|-----|------|
|
|
592
603
|
| Document Parse | 1 | 2 | 4 | 8 | /page |
|
|
593
604
|
| Document Ask | 2 | 4 | 8 | 16 | /page |
|
|
594
605
|
| Document Extract | 2 | 4 | 8 | 16 | /page |
|
|
595
|
-
| Identity Parse |
|
|
606
|
+
| Identity Parse | - | - | 6 | 10 | /page |
|
|
596
607
|
| Identity Ask | 6 | 10 | 14 | 18 | /page |
|
|
597
608
|
| Identity Extract | 6 | 10 | 14 | 18 | /page |
|
|
598
|
-
| Invoice Parse |
|
|
609
|
+
| Invoice Parse | - | - | 6 | 10 | /page |
|
|
599
610
|
| Invoice Ask | 6 | 10 | 14 | 18 | /page |
|
|
600
611
|
| Invoice Extract | 6 | 10 | 14 | 18 | /page |
|
|
601
|
-
| Bank Statement Parse |
|
|
612
|
+
| Bank Statement Parse | - | - | 6 | 10 | /page |
|
|
602
613
|
| Bank Statement Ask | 6 | 10 | 14 | 18 | /page |
|
|
603
614
|
| Bank Statement Extract | 6 | 10 | 14 | 18 | /page |
|
|
604
615
|
| Academic Search | 2 | 2 | 2 | 2 | /request |
|
|
@@ -607,7 +618,8 @@ console.log(resultB.documentId); // "doc-b"
|
|
|
607
618
|
| Academic Find Citations | 2 | 2 | 2 | 2 | /sentence |
|
|
608
619
|
| Academic Paper Graph | 2+ | 2+ | 2+ | 2+ | /request |
|
|
609
620
|
| Academic Similar Papers | 3 | 3 | 3 | 3 | /request |
|
|
610
|
-
|
|
|
621
|
+
| Academic Search Grants | 2 | 2 | 2 | 2 | /request |
|
|
622
|
+
<!-- pdfvector-docs:client-readme-credit-costs:end -->
|
|
611
623
|
|
|
612
624
|
## Error Handling
|
|
613
625
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfvector/instance-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.60",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Official TypeScript/JavaScript SDK for PDF Vector API - Parse PDF/Word/Image/Excel documents to clean, structured markdown format and search academic publications across multiple databases",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"main": ".tsc/lib/index.js",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@pdfvector/instance-contract": "^0.0.
|
|
36
|
+
"@pdfvector/instance-contract": "^0.0.56"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
".tsc",
|