@pdfvector/util 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.
- package/.tsc/lib/index.d.ts +1 -0
- package/.tsc/lib/index.js +1 -0
- package/.tsc/lib/tier.d.ts +6 -0
- package/.tsc/lib/tier.js +8 -1
- package/.tsc/lib/usage-status.d.ts +4 -0
- package/.tsc/lib/usage-status.js +7 -0
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
package/.tsc/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./free-tier";
|
|
|
4
4
|
export * from "./get-error-message";
|
|
5
5
|
export * from "./plan";
|
|
6
6
|
export * from "./tier";
|
|
7
|
+
export * from "./usage-status";
|
|
7
8
|
export declare const isCI: boolean;
|
|
8
9
|
export declare const isLocal: boolean;
|
|
9
10
|
export declare const isLive: boolean;
|
package/.tsc/lib/index.js
CHANGED
package/.tsc/lib/tier.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ export declare const maxTierAdditionalFormats: readonly ["Image (PNG, JPG, TIFF,
|
|
|
26
26
|
export declare const allSupportedFormatsShort = "PDF, DOCX, XLSX, PPTX, CSV, PNG, JPG, TIFF, BMP, HEIF, TXT, MD, TSV, XML, RTF, HTML, ODT, ODS, ODP, EPUB, BIB, RIS, NBIB, ENW";
|
|
27
27
|
/** Long human-readable summary of all supported formats. */
|
|
28
28
|
export declare const allSupportedFormatsLong: string;
|
|
29
|
+
/** Image dimension limits enforced by the underlying OCR engine (Azure Document Intelligence).
|
|
30
|
+
* Images outside this range are rejected with HTTP 400 before processing begins. */
|
|
31
|
+
export declare const imageDimensionLimits: {
|
|
32
|
+
readonly minPixels: 50;
|
|
33
|
+
readonly maxPixels: 10000;
|
|
34
|
+
};
|
|
29
35
|
/** Pre-built format note for API descriptions (used in contract model descriptions). */
|
|
30
36
|
export declare const formatsByTierDescription: string;
|
|
31
37
|
/** Academic/grant API: fixed credits per request */
|
package/.tsc/lib/tier.js
CHANGED
|
@@ -66,10 +66,17 @@ export const allSupportedFormatsLong = "PDF, Word (.docx), Excel (.xlsx), PowerP
|
|
|
66
66
|
"Plain Text (.txt, .md, .tsv, .xml), RTF, HTML, " +
|
|
67
67
|
"OpenDocument (.odt, .ods, .odp), EPUB, " +
|
|
68
68
|
"and Bibliography (.bib, .ris, .nbib, .enw) files";
|
|
69
|
+
/** Image dimension limits enforced by the underlying OCR engine (Azure Document Intelligence).
|
|
70
|
+
* Images outside this range are rejected with HTTP 400 before processing begins. */
|
|
71
|
+
export const imageDimensionLimits = {
|
|
72
|
+
minPixels: 50,
|
|
73
|
+
maxPixels: 10000,
|
|
74
|
+
};
|
|
69
75
|
/** Pre-built format note for API descriptions (used in contract model descriptions). */
|
|
70
76
|
export const formatsByTierDescription = "Supported formats by tier:\n" +
|
|
71
77
|
`- All tiers: ${allTierFormats.join(", ")}.\n` +
|
|
72
|
-
`- Max/Auto adds: ${maxTierAdditionalFormats.join(", ")}
|
|
78
|
+
`- Max/Auto adds: ${maxTierAdditionalFormats.join(", ")}. ` +
|
|
79
|
+
`Image dimensions must be between ${imageDimensionLimits.minPixels}×${imageDimensionLimits.minPixels} and ${imageDimensionLimits.maxPixels}×${imageDimensionLimits.maxPixels} pixels.`;
|
|
73
80
|
// ─── Academic credit costs ────────────────────────────────────────────
|
|
74
81
|
/** Academic/grant API: fixed credits per request */
|
|
75
82
|
export const academicCreditCosts = {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const usageStatuses: readonly ["success", "user_error", "system_error"];
|
|
2
|
+
export type UsageStatus = (typeof usageStatuses)[number];
|
|
3
|
+
export declare const errorStages: readonly ["auth", "validation", "preprocessing", "processing"];
|
|
4
|
+
export type ErrorStage = (typeof errorStages)[number];
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @pdfvector/util
|
|
2
2
|
|
|
3
|
+
## 0.0.19
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#199](https://github.com/phuctm97/pdfvector/pull/199) [`761547d`](https://github.com/phuctm97/pdfvector/commit/761547db6ad1cf6bd11ea7a1f56b6f4806c72f6a) Thanks [@khanhduyvt0101](https://github.com/khanhduyvt0101)! - Redesign request usage tracking with 3-state taxonomy
|
|
9
|
+
|
|
3
10
|
## 0.0.18
|
|
4
11
|
### Patch Changes
|
|
5
12
|
|