@embedpdf/models 1.5.0 → 2.0.0-next.0
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pdf.d.ts +27 -17
- package/package.json +1 -1
package/dist/pdf.d.ts
CHANGED
|
@@ -40,10 +40,6 @@ export interface PdfDocumentObject {
|
|
|
40
40
|
* Identity of document
|
|
41
41
|
*/
|
|
42
42
|
id: string;
|
|
43
|
-
/**
|
|
44
|
-
* Name of the document
|
|
45
|
-
*/
|
|
46
|
-
name?: string;
|
|
47
43
|
/**
|
|
48
44
|
* Count of pages in this document
|
|
49
45
|
*/
|
|
@@ -2039,10 +2035,6 @@ export interface PdfFileWithoutContent {
|
|
|
2039
2035
|
* id of file
|
|
2040
2036
|
*/
|
|
2041
2037
|
id: string;
|
|
2042
|
-
/**
|
|
2043
|
-
* Name of the file
|
|
2044
|
-
*/
|
|
2045
|
-
name?: string;
|
|
2046
2038
|
}
|
|
2047
2039
|
export interface PdfFileLoader extends PdfFileWithoutContent {
|
|
2048
2040
|
/**
|
|
@@ -2085,15 +2077,15 @@ export interface PdfFileUrl extends PdfFileWithoutContent {
|
|
|
2085
2077
|
url: string;
|
|
2086
2078
|
}
|
|
2087
2079
|
export declare enum PdfErrorCode {
|
|
2088
|
-
Ok = 0,//
|
|
2089
|
-
Unknown = 1,// #define FPDF_ERR_UNKNOWN 1
|
|
2090
|
-
NotFound = 2,// #define FPDF_ERR_FILE 2
|
|
2091
|
-
WrongFormat = 3,// #define FPDF_ERR_FORMAT 3
|
|
2092
|
-
Password = 4,// #define FPDF_ERR_PASSWORD 4
|
|
2093
|
-
Security = 5,// #define FPDF_ERR_SECURITY 5
|
|
2094
|
-
PageError = 6,// #define FPDF_ERR_PAGE 6
|
|
2095
|
-
XFALoad = 7,// #
|
|
2096
|
-
XFALayout = 8,//
|
|
2080
|
+
Ok = 0,// #define FPDF_ERR_SUCCESS 0
|
|
2081
|
+
Unknown = 1,// #define FPDF_ERR_UNKNOWN 1
|
|
2082
|
+
NotFound = 2,// #define FPDF_ERR_FILE 2
|
|
2083
|
+
WrongFormat = 3,// #define FPDF_ERR_FORMAT 3
|
|
2084
|
+
Password = 4,// #define FPDF_ERR_PASSWORD 4 - Password required or incorrect
|
|
2085
|
+
Security = 5,// #define FPDF_ERR_SECURITY 5
|
|
2086
|
+
PageError = 6,// #define FPDF_ERR_PAGE 6
|
|
2087
|
+
XFALoad = 7,// #define FPDF_ERR_XFALOAD 7
|
|
2088
|
+
XFALayout = 8,// #define FPDF_ERR_XFALAYOUT 8
|
|
2097
2089
|
Cancelled = 9,
|
|
2098
2090
|
Initialization = 10,
|
|
2099
2091
|
NotReady = 11,
|
|
@@ -2153,6 +2145,20 @@ export interface PdfOpenDocumentBufferOptions {
|
|
|
2153
2145
|
*/
|
|
2154
2146
|
password?: string;
|
|
2155
2147
|
}
|
|
2148
|
+
export interface PdfRequestOptions {
|
|
2149
|
+
/**
|
|
2150
|
+
* Custom HTTP headers to include in all requests (HEAD, GET, range requests)
|
|
2151
|
+
* Example: { 'Authorization': 'Bearer token', 'X-Custom-Header': 'value' }
|
|
2152
|
+
*/
|
|
2153
|
+
headers?: Record<string, string>;
|
|
2154
|
+
/**
|
|
2155
|
+
* Controls whether cookies are sent with requests
|
|
2156
|
+
* - 'omit': Never send cookies (default)
|
|
2157
|
+
* - 'same-origin': Send cookies for same-origin requests
|
|
2158
|
+
* - 'include': Always send cookies (requires CORS)
|
|
2159
|
+
*/
|
|
2160
|
+
credentials?: RequestCredentials;
|
|
2161
|
+
}
|
|
2156
2162
|
export interface PdfOpenDocumentUrlOptions {
|
|
2157
2163
|
/**
|
|
2158
2164
|
* Password for the document
|
|
@@ -2162,6 +2168,10 @@ export interface PdfOpenDocumentUrlOptions {
|
|
|
2162
2168
|
* Loading mode
|
|
2163
2169
|
*/
|
|
2164
2170
|
mode?: 'auto' | 'range-request' | 'full-fetch';
|
|
2171
|
+
/**
|
|
2172
|
+
* HTTP request options for fetching the PDF
|
|
2173
|
+
*/
|
|
2174
|
+
requestOptions?: PdfRequestOptions;
|
|
2165
2175
|
}
|
|
2166
2176
|
export interface PdfRenderOptions {
|
|
2167
2177
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/models",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
|
|
6
6
|
"type": "module",
|