@pdfvector/client 0.0.50 → 0.0.52

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @pdfvector/client
2
2
 
3
+ ## 0.0.52
4
+
5
+ ### Patch Changes
6
+
7
+ - [#376](https://github.com/phuctm97/pdfvector/pull/376) [`3b01a52`](https://github.com/phuctm97/pdfvector/commit/3b01a52958ae4d2d7830d41ae36b1021ab6fc8a7) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Upgrade workspace dependencies, remove package overrides and redundant declarations, merge shared API documentation into the util package, use native Bun timing in instance retries, and replace manual browser detection with Bowser.
8
+ - Updated dependencies [[`3b01a52`](https://github.com/phuctm97/pdfvector/commit/3b01a52958ae4d2d7830d41ae36b1021ab6fc8a7)]:
9
+ - @pdfvector/instance-client@0.0.72
10
+
11
+ ## 0.0.51
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`8c7c7d0`](https://github.com/phuctm97/pdfvector/commit/8c7c7d0c650765ffe93f9e7524c42e9eba1e1f15)]:
16
+ - @pdfvector/instance-client@0.0.71
17
+
3
18
  ## 0.0.50
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -625,6 +625,8 @@ console.log(resultB.documentId); // "doc-b"
625
625
 
626
626
  All API errors are thrown as `PDFVectorError` instances. The SDK maps server errors into specific subclasses and adds user/agent-friendly fields such as `title`, `suggestion`, `userError`, retry flags, and `requestId`.
627
627
 
628
+ For `INTERNAL_SERVER_ERROR`, the API returns a safe message and keeps the original provider failure in server diagnostics. Use `requestId` when contacting support. For document processing failures, check `reasonCode` and `retryableWithHigherModel` instead of parsing the message; `EXTRACTION_FAILED` identifies unusable structured output even if message wording changes. `DOCUMENT_PROCESSING_FAILED` identifies a processing rejection that was not confirmed to be a caller-input error, so the SDK suggests retrying or contacting support rather than changing the document. Error responses do not include raw AI output.
629
+
628
630
  ```typescript
629
631
  import {
630
632
  PDFVectorError,
@@ -722,7 +724,6 @@ try {
722
724
  console.error("The document has no readable content");
723
725
  } else if (error instanceof ExtractionFailedError) {
724
726
  console.error(`Extraction failed. Hint: ${error.hint}`);
725
- if (error.rawText) console.error(`Model output sample: ${error.rawText}`);
726
727
  }
727
728
  }
728
729
  ```
@@ -751,7 +752,7 @@ PDFVectorError
751
752
  ├── UnprocessableContentError (422)
752
753
  │ ├── EmptyDocumentError
753
754
  │ ├── NoTextDetectedError
754
- │ └── ExtractionFailedError — hint, rawText
755
+ │ └── ExtractionFailedError — hint
755
756
  ├── InternalServerError (500)
756
757
  └── NotImplementedError (501)
757
758
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfvector/client",
3
- "version": "0.0.50",
3
+ "version": "0.0.52",
4
4
  "type": "module",
5
5
  "description": "Official TypeScript/JavaScript SDK for PDF Vector API",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "main": ".tsc/lib/index.js",
25
25
  "dependencies": {
26
- "@pdfvector/instance-client": "^0.0.70"
26
+ "@pdfvector/instance-client": "^0.0.72"
27
27
  },
28
28
  "types": ".tsc/lib/index.d.ts",
29
29
  "files": [