@pdfvector/instance-client 0.0.51 → 0.0.59

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +10 -0
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,69 @@
1
1
  # @pdfvector/instance-client
2
2
 
3
+ ## 0.0.59
4
+ ### Patch Changes
5
+
6
+
7
+
8
+ - [#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
9
+
10
+ - Updated dependencies [[`905025f`](https://github.com/phuctm97/pdfvector/commit/905025f926b760b5b1b7f6cfc876fc8557c70d46)]:
11
+ - @pdfvector/instance-contract@0.0.55
12
+
13
+ ## 0.0.58
14
+ ### Patch Changes
15
+
16
+
17
+
18
+ - [#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
19
+
20
+ - Updated dependencies [[`054e4db`](https://github.com/phuctm97/pdfvector/commit/054e4dbeb712d5fe482c80f08082c33e09480942)]:
21
+ - @pdfvector/instance-contract@0.0.54
22
+
23
+ ## 0.0.57
24
+ ### Patch Changes
25
+
26
+
27
+
28
+ - [#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
29
+
30
+ - Updated dependencies [[`e3503c4`](https://github.com/phuctm97/pdfvector/commit/e3503c4922384cad889e92cc2a6f5979b05544fe)]:
31
+ - @pdfvector/instance-contract@0.0.53
32
+
33
+ ## 0.0.56
34
+ ### Patch Changes
35
+
36
+
37
+
38
+ - [#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
39
+
40
+ - Updated dependencies [[`11c2f38`](https://github.com/phuctm97/pdfvector/commit/11c2f3891ceaa9f051664598624a3e75aa5f096d)]:
41
+ - @pdfvector/instance-contract@0.0.52
42
+
43
+ ## 0.0.55
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [[`37c6f35`](https://github.com/phuctm97/pdfvector/commit/37c6f35a6d2129e95a79fd44f7834a6e12df04ee)]:
47
+ - @pdfvector/instance-contract@0.0.51
48
+
49
+ ## 0.0.54
50
+ ### Patch Changes
51
+
52
+ - Updated dependencies [[`d6f79b3`](https://github.com/phuctm97/pdfvector/commit/d6f79b3d9a8bf5554e3f8dc0912468031ddb0c7a)]:
53
+ - @pdfvector/instance-contract@0.0.50
54
+
55
+ ## 0.0.53
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [[`e24aa70`](https://github.com/phuctm97/pdfvector/commit/e24aa706cdd48a10efa13d3d613d63cebf921d16)]:
59
+ - @pdfvector/instance-contract@0.0.49
60
+
61
+ ## 0.0.52
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [[`a2e6883`](https://github.com/phuctm97/pdfvector/commit/a2e68833d9f0dd6b38ea5b4b2a91aefb9f13aaf8)]:
65
+ - @pdfvector/instance-contract@0.0.48
66
+
3
67
  ## 0.0.51
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/instance-client",
3
- "version": "0.0.51",
3
+ "version": "0.0.59",
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.47"
36
+ "@pdfvector/instance-contract": "^0.0.55"
37
37
  },
38
38
  "files": [
39
39
  ".tsc",