oxpdf 0.1.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/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +412 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +232 -0
- package/dist/index.d.ts +232 -0
- package/dist/index.js +374 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
interface ClientOptions {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
/** Request timeout in milliseconds (default: 120_000) */
|
|
5
|
+
timeout?: number;
|
|
6
|
+
}
|
|
7
|
+
interface ParseOptions {
|
|
8
|
+
schema?: Record<string, unknown>;
|
|
9
|
+
schemaTemplate?: string;
|
|
10
|
+
schemaId?: string;
|
|
11
|
+
useOcr?: boolean;
|
|
12
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
13
|
+
pages?: number[];
|
|
14
|
+
}
|
|
15
|
+
interface ParseStreamOptions extends ParseOptions {
|
|
16
|
+
batchSize?: number;
|
|
17
|
+
}
|
|
18
|
+
interface ParseResult {
|
|
19
|
+
success: boolean;
|
|
20
|
+
data?: Record<string, unknown>;
|
|
21
|
+
error?: string;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
cached?: boolean;
|
|
24
|
+
quota?: Record<string, unknown>;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
interface StreamEvent {
|
|
28
|
+
event: string;
|
|
29
|
+
data: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
interface UploadOptions {
|
|
32
|
+
schemaId?: string;
|
|
33
|
+
schemaName?: string;
|
|
34
|
+
useOcr?: boolean;
|
|
35
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
36
|
+
}
|
|
37
|
+
interface UploadResult {
|
|
38
|
+
job_id: string;
|
|
39
|
+
status: string;
|
|
40
|
+
message: string;
|
|
41
|
+
estimated_time_seconds: number;
|
|
42
|
+
ocr_enabled: boolean;
|
|
43
|
+
quota: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface JobStatus {
|
|
46
|
+
id: string;
|
|
47
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
48
|
+
progress: number;
|
|
49
|
+
created_at: string;
|
|
50
|
+
started_at?: string;
|
|
51
|
+
completed_at?: string;
|
|
52
|
+
result?: Record<string, unknown>;
|
|
53
|
+
error?: string;
|
|
54
|
+
}
|
|
55
|
+
interface ValidateOptions {
|
|
56
|
+
schemaId?: string;
|
|
57
|
+
schemaName?: string;
|
|
58
|
+
}
|
|
59
|
+
interface ExtractImagesOptions {
|
|
60
|
+
pages?: number[];
|
|
61
|
+
minWidth?: number;
|
|
62
|
+
minHeight?: number;
|
|
63
|
+
useOcr?: boolean;
|
|
64
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
65
|
+
}
|
|
66
|
+
interface ImageInfo {
|
|
67
|
+
id: string;
|
|
68
|
+
pdf_filename: string;
|
|
69
|
+
page_number: number;
|
|
70
|
+
image_index: number;
|
|
71
|
+
format: string;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
file_size: number;
|
|
75
|
+
url: string;
|
|
76
|
+
created_at: string;
|
|
77
|
+
expires_at: string;
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
}
|
|
80
|
+
interface ImageListResult {
|
|
81
|
+
images: ImageInfo[];
|
|
82
|
+
total: number;
|
|
83
|
+
limit: number;
|
|
84
|
+
offset: number;
|
|
85
|
+
}
|
|
86
|
+
interface ImageUrlResult {
|
|
87
|
+
url: string;
|
|
88
|
+
expires_in: number;
|
|
89
|
+
image_id: string;
|
|
90
|
+
}
|
|
91
|
+
interface FileInfo {
|
|
92
|
+
id: string;
|
|
93
|
+
filename: string;
|
|
94
|
+
file_size: number;
|
|
95
|
+
page_count: number;
|
|
96
|
+
created_at: string;
|
|
97
|
+
download_url: string;
|
|
98
|
+
}
|
|
99
|
+
interface FileListResult {
|
|
100
|
+
pdfs: FileInfo[];
|
|
101
|
+
total: number;
|
|
102
|
+
}
|
|
103
|
+
interface SchemaTemplate {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
category?: string;
|
|
108
|
+
schema?: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
interface SchemaInfo {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
is_default: boolean;
|
|
114
|
+
created_at: string;
|
|
115
|
+
schema?: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
interface CreateSchemaOptions {
|
|
118
|
+
name: string;
|
|
119
|
+
schema: Record<string, unknown>;
|
|
120
|
+
isDefault?: boolean;
|
|
121
|
+
}
|
|
122
|
+
interface UpdateSchemaOptions {
|
|
123
|
+
name: string;
|
|
124
|
+
schema: Record<string, unknown>;
|
|
125
|
+
isDefault?: boolean;
|
|
126
|
+
}
|
|
127
|
+
interface GenerateSchemaOptions {
|
|
128
|
+
description: string;
|
|
129
|
+
refinement?: string;
|
|
130
|
+
currentSchema?: Record<string, unknown>;
|
|
131
|
+
selectedText?: string;
|
|
132
|
+
}
|
|
133
|
+
interface GenerateSchemaResult {
|
|
134
|
+
schema: Record<string, unknown>;
|
|
135
|
+
suggested_name: string;
|
|
136
|
+
generations_remaining: number;
|
|
137
|
+
generations_limit: number;
|
|
138
|
+
period_reset_date: string;
|
|
139
|
+
}
|
|
140
|
+
interface AnalyticsResult {
|
|
141
|
+
context: "personal" | "org";
|
|
142
|
+
recent_events: Array<{
|
|
143
|
+
event_type: string;
|
|
144
|
+
endpoint: string;
|
|
145
|
+
timestamp: string;
|
|
146
|
+
metadata: Record<string, unknown>;
|
|
147
|
+
}>;
|
|
148
|
+
statistics: {
|
|
149
|
+
total_requests: number;
|
|
150
|
+
total_pages: number;
|
|
151
|
+
current_month_requests: number;
|
|
152
|
+
current_month_pages: number;
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare class OxPDFClient {
|
|
159
|
+
#private;
|
|
160
|
+
constructor(options: ClientOptions);
|
|
161
|
+
/** Parse a PDF and return structured JSON. */
|
|
162
|
+
parse(file: Blob | Buffer | Uint8Array, filename: string, options?: ParseOptions): Promise<ParseResult>;
|
|
163
|
+
/** Parse a PDF from a file path (Node.js only). */
|
|
164
|
+
parseFile(filePath: string, options?: ParseOptions): Promise<ParseResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Streaming parse via Server-Sent Events.
|
|
167
|
+
* Returns an async generator that yields ``StreamEvent`` objects.
|
|
168
|
+
*/
|
|
169
|
+
parseStream(file: Blob | Buffer | Uint8Array, filename: string, options?: ParseStreamOptions): AsyncGenerator<StreamEvent>;
|
|
170
|
+
/** Streaming parse from a file path (Node.js only). */
|
|
171
|
+
parseFileStream(filePath: string, options?: ParseStreamOptions): AsyncGenerator<StreamEvent>;
|
|
172
|
+
/** Upload a PDF for async background processing. Returns a job_id. */
|
|
173
|
+
upload(file: Blob | Buffer | Uint8Array, filename: string, options?: UploadOptions): Promise<UploadResult>;
|
|
174
|
+
/** Poll the status of an async PDF processing job. */
|
|
175
|
+
jobStatus(jobId: string): Promise<JobStatus>;
|
|
176
|
+
/** Validate a PDF without full processing (dry-run). */
|
|
177
|
+
validate(file: Blob | Buffer | Uint8Array, filename: string, options?: ValidateOptions): Promise<Record<string, unknown>>;
|
|
178
|
+
/** Extract images from a PDF. */
|
|
179
|
+
extractImages(file: Blob | Buffer | Uint8Array, filename: string, options?: ExtractImagesOptions): Promise<Record<string, unknown>>;
|
|
180
|
+
/** List extracted images. */
|
|
181
|
+
listImages(limit?: number, offset?: number): Promise<ImageListResult>;
|
|
182
|
+
/** Get or refresh a presigned URL for an image. */
|
|
183
|
+
getImageUrl(imageId: string, expirationSeconds?: number): Promise<ImageUrlResult>;
|
|
184
|
+
/** Delete a specific image. */
|
|
185
|
+
deleteImage(imageId: string): Promise<void>;
|
|
186
|
+
/** Delete all extracted images. */
|
|
187
|
+
deleteAllImages(): Promise<Record<string, unknown>>;
|
|
188
|
+
/** List previously uploaded PDFs. */
|
|
189
|
+
listFiles(): Promise<FileListResult>;
|
|
190
|
+
/** Get metadata and download URL for an uploaded PDF. */
|
|
191
|
+
getFile(pdfId: string): Promise<FileInfo>;
|
|
192
|
+
/** Delete an uploaded PDF. */
|
|
193
|
+
deleteFile(pdfId: string): Promise<void>;
|
|
194
|
+
/** List pre-built schema templates (pdf route). */
|
|
195
|
+
listTemplates(): Promise<SchemaTemplate[]>;
|
|
196
|
+
/** List schema templates from /schemas/templates/list. */
|
|
197
|
+
listSchemaTemplates(): Promise<SchemaTemplate[]>;
|
|
198
|
+
/** Get a specific schema template with full definition. */
|
|
199
|
+
getSchemaTemplate(templateId: string): Promise<SchemaTemplate>;
|
|
200
|
+
/** List user's saved schemas. */
|
|
201
|
+
listSchemas(): Promise<SchemaInfo[]>;
|
|
202
|
+
/** Get a specific schema by ID. */
|
|
203
|
+
getSchema(schemaId: string): Promise<SchemaInfo>;
|
|
204
|
+
/** Create a new JSON schema. */
|
|
205
|
+
createSchema(options: CreateSchemaOptions): Promise<SchemaInfo>;
|
|
206
|
+
/** Update an existing schema. */
|
|
207
|
+
updateSchema(schemaId: string, options: UpdateSchemaOptions): Promise<SchemaInfo>;
|
|
208
|
+
/** Delete a schema. */
|
|
209
|
+
deleteSchema(schemaId: string): Promise<void>;
|
|
210
|
+
/** Set a schema as the default. */
|
|
211
|
+
setDefaultSchema(schemaId: string): Promise<SchemaInfo>;
|
|
212
|
+
/** Generate a schema using AI from a natural-language description. */
|
|
213
|
+
generateSchema(options: GenerateSchemaOptions): Promise<GenerateSchemaResult>;
|
|
214
|
+
/** Get usage analytics for the current user/org. */
|
|
215
|
+
getAnalytics(): Promise<AnalyticsResult>;
|
|
216
|
+
/** Submit in-app feedback. */
|
|
217
|
+
submitFeedback(feedback: string): Promise<{
|
|
218
|
+
success: boolean;
|
|
219
|
+
}>;
|
|
220
|
+
/** Get available pricing tiers. */
|
|
221
|
+
getPricing(billingCycle?: string): Promise<Record<string, unknown>>;
|
|
222
|
+
/** Get the current user's tier and quota. */
|
|
223
|
+
getCurrentTier(): Promise<Record<string, unknown>>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class OxPDFError extends Error {
|
|
227
|
+
readonly statusCode: number | undefined;
|
|
228
|
+
readonly responseBody: string | undefined;
|
|
229
|
+
constructor(message: string, statusCode?: number, responseBody?: string);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export { type AnalyticsResult, type ClientOptions, type CreateSchemaOptions, type ExtractImagesOptions, type FileInfo, type FileListResult, type GenerateSchemaOptions, type GenerateSchemaResult, type ImageInfo, type ImageListResult, type ImageUrlResult, type JobStatus, OxPDFClient, OxPDFError, type ParseOptions, type ParseResult, type ParseStreamOptions, type SchemaInfo, type SchemaTemplate, type StreamEvent, type UpdateSchemaOptions, type UploadOptions, type UploadResult, type ValidateOptions };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
interface ClientOptions {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
/** Request timeout in milliseconds (default: 120_000) */
|
|
5
|
+
timeout?: number;
|
|
6
|
+
}
|
|
7
|
+
interface ParseOptions {
|
|
8
|
+
schema?: Record<string, unknown>;
|
|
9
|
+
schemaTemplate?: string;
|
|
10
|
+
schemaId?: string;
|
|
11
|
+
useOcr?: boolean;
|
|
12
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
13
|
+
pages?: number[];
|
|
14
|
+
}
|
|
15
|
+
interface ParseStreamOptions extends ParseOptions {
|
|
16
|
+
batchSize?: number;
|
|
17
|
+
}
|
|
18
|
+
interface ParseResult {
|
|
19
|
+
success: boolean;
|
|
20
|
+
data?: Record<string, unknown>;
|
|
21
|
+
error?: string;
|
|
22
|
+
metadata?: Record<string, unknown>;
|
|
23
|
+
cached?: boolean;
|
|
24
|
+
quota?: Record<string, unknown>;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
interface StreamEvent {
|
|
28
|
+
event: string;
|
|
29
|
+
data: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
interface UploadOptions {
|
|
32
|
+
schemaId?: string;
|
|
33
|
+
schemaName?: string;
|
|
34
|
+
useOcr?: boolean;
|
|
35
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
36
|
+
}
|
|
37
|
+
interface UploadResult {
|
|
38
|
+
job_id: string;
|
|
39
|
+
status: string;
|
|
40
|
+
message: string;
|
|
41
|
+
estimated_time_seconds: number;
|
|
42
|
+
ocr_enabled: boolean;
|
|
43
|
+
quota: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
interface JobStatus {
|
|
46
|
+
id: string;
|
|
47
|
+
status: "pending" | "processing" | "completed" | "failed";
|
|
48
|
+
progress: number;
|
|
49
|
+
created_at: string;
|
|
50
|
+
started_at?: string;
|
|
51
|
+
completed_at?: string;
|
|
52
|
+
result?: Record<string, unknown>;
|
|
53
|
+
error?: string;
|
|
54
|
+
}
|
|
55
|
+
interface ValidateOptions {
|
|
56
|
+
schemaId?: string;
|
|
57
|
+
schemaName?: string;
|
|
58
|
+
}
|
|
59
|
+
interface ExtractImagesOptions {
|
|
60
|
+
pages?: number[];
|
|
61
|
+
minWidth?: number;
|
|
62
|
+
minHeight?: number;
|
|
63
|
+
useOcr?: boolean;
|
|
64
|
+
ocrEngine?: "surya" | "groq_vision";
|
|
65
|
+
}
|
|
66
|
+
interface ImageInfo {
|
|
67
|
+
id: string;
|
|
68
|
+
pdf_filename: string;
|
|
69
|
+
page_number: number;
|
|
70
|
+
image_index: number;
|
|
71
|
+
format: string;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
file_size: number;
|
|
75
|
+
url: string;
|
|
76
|
+
created_at: string;
|
|
77
|
+
expires_at: string;
|
|
78
|
+
[key: string]: unknown;
|
|
79
|
+
}
|
|
80
|
+
interface ImageListResult {
|
|
81
|
+
images: ImageInfo[];
|
|
82
|
+
total: number;
|
|
83
|
+
limit: number;
|
|
84
|
+
offset: number;
|
|
85
|
+
}
|
|
86
|
+
interface ImageUrlResult {
|
|
87
|
+
url: string;
|
|
88
|
+
expires_in: number;
|
|
89
|
+
image_id: string;
|
|
90
|
+
}
|
|
91
|
+
interface FileInfo {
|
|
92
|
+
id: string;
|
|
93
|
+
filename: string;
|
|
94
|
+
file_size: number;
|
|
95
|
+
page_count: number;
|
|
96
|
+
created_at: string;
|
|
97
|
+
download_url: string;
|
|
98
|
+
}
|
|
99
|
+
interface FileListResult {
|
|
100
|
+
pdfs: FileInfo[];
|
|
101
|
+
total: number;
|
|
102
|
+
}
|
|
103
|
+
interface SchemaTemplate {
|
|
104
|
+
id: string;
|
|
105
|
+
name: string;
|
|
106
|
+
description: string;
|
|
107
|
+
category?: string;
|
|
108
|
+
schema?: Record<string, unknown>;
|
|
109
|
+
}
|
|
110
|
+
interface SchemaInfo {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
is_default: boolean;
|
|
114
|
+
created_at: string;
|
|
115
|
+
schema?: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
interface CreateSchemaOptions {
|
|
118
|
+
name: string;
|
|
119
|
+
schema: Record<string, unknown>;
|
|
120
|
+
isDefault?: boolean;
|
|
121
|
+
}
|
|
122
|
+
interface UpdateSchemaOptions {
|
|
123
|
+
name: string;
|
|
124
|
+
schema: Record<string, unknown>;
|
|
125
|
+
isDefault?: boolean;
|
|
126
|
+
}
|
|
127
|
+
interface GenerateSchemaOptions {
|
|
128
|
+
description: string;
|
|
129
|
+
refinement?: string;
|
|
130
|
+
currentSchema?: Record<string, unknown>;
|
|
131
|
+
selectedText?: string;
|
|
132
|
+
}
|
|
133
|
+
interface GenerateSchemaResult {
|
|
134
|
+
schema: Record<string, unknown>;
|
|
135
|
+
suggested_name: string;
|
|
136
|
+
generations_remaining: number;
|
|
137
|
+
generations_limit: number;
|
|
138
|
+
period_reset_date: string;
|
|
139
|
+
}
|
|
140
|
+
interface AnalyticsResult {
|
|
141
|
+
context: "personal" | "org";
|
|
142
|
+
recent_events: Array<{
|
|
143
|
+
event_type: string;
|
|
144
|
+
endpoint: string;
|
|
145
|
+
timestamp: string;
|
|
146
|
+
metadata: Record<string, unknown>;
|
|
147
|
+
}>;
|
|
148
|
+
statistics: {
|
|
149
|
+
total_requests: number;
|
|
150
|
+
total_pages: number;
|
|
151
|
+
current_month_requests: number;
|
|
152
|
+
current_month_pages: number;
|
|
153
|
+
[key: string]: unknown;
|
|
154
|
+
};
|
|
155
|
+
[key: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare class OxPDFClient {
|
|
159
|
+
#private;
|
|
160
|
+
constructor(options: ClientOptions);
|
|
161
|
+
/** Parse a PDF and return structured JSON. */
|
|
162
|
+
parse(file: Blob | Buffer | Uint8Array, filename: string, options?: ParseOptions): Promise<ParseResult>;
|
|
163
|
+
/** Parse a PDF from a file path (Node.js only). */
|
|
164
|
+
parseFile(filePath: string, options?: ParseOptions): Promise<ParseResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Streaming parse via Server-Sent Events.
|
|
167
|
+
* Returns an async generator that yields ``StreamEvent`` objects.
|
|
168
|
+
*/
|
|
169
|
+
parseStream(file: Blob | Buffer | Uint8Array, filename: string, options?: ParseStreamOptions): AsyncGenerator<StreamEvent>;
|
|
170
|
+
/** Streaming parse from a file path (Node.js only). */
|
|
171
|
+
parseFileStream(filePath: string, options?: ParseStreamOptions): AsyncGenerator<StreamEvent>;
|
|
172
|
+
/** Upload a PDF for async background processing. Returns a job_id. */
|
|
173
|
+
upload(file: Blob | Buffer | Uint8Array, filename: string, options?: UploadOptions): Promise<UploadResult>;
|
|
174
|
+
/** Poll the status of an async PDF processing job. */
|
|
175
|
+
jobStatus(jobId: string): Promise<JobStatus>;
|
|
176
|
+
/** Validate a PDF without full processing (dry-run). */
|
|
177
|
+
validate(file: Blob | Buffer | Uint8Array, filename: string, options?: ValidateOptions): Promise<Record<string, unknown>>;
|
|
178
|
+
/** Extract images from a PDF. */
|
|
179
|
+
extractImages(file: Blob | Buffer | Uint8Array, filename: string, options?: ExtractImagesOptions): Promise<Record<string, unknown>>;
|
|
180
|
+
/** List extracted images. */
|
|
181
|
+
listImages(limit?: number, offset?: number): Promise<ImageListResult>;
|
|
182
|
+
/** Get or refresh a presigned URL for an image. */
|
|
183
|
+
getImageUrl(imageId: string, expirationSeconds?: number): Promise<ImageUrlResult>;
|
|
184
|
+
/** Delete a specific image. */
|
|
185
|
+
deleteImage(imageId: string): Promise<void>;
|
|
186
|
+
/** Delete all extracted images. */
|
|
187
|
+
deleteAllImages(): Promise<Record<string, unknown>>;
|
|
188
|
+
/** List previously uploaded PDFs. */
|
|
189
|
+
listFiles(): Promise<FileListResult>;
|
|
190
|
+
/** Get metadata and download URL for an uploaded PDF. */
|
|
191
|
+
getFile(pdfId: string): Promise<FileInfo>;
|
|
192
|
+
/** Delete an uploaded PDF. */
|
|
193
|
+
deleteFile(pdfId: string): Promise<void>;
|
|
194
|
+
/** List pre-built schema templates (pdf route). */
|
|
195
|
+
listTemplates(): Promise<SchemaTemplate[]>;
|
|
196
|
+
/** List schema templates from /schemas/templates/list. */
|
|
197
|
+
listSchemaTemplates(): Promise<SchemaTemplate[]>;
|
|
198
|
+
/** Get a specific schema template with full definition. */
|
|
199
|
+
getSchemaTemplate(templateId: string): Promise<SchemaTemplate>;
|
|
200
|
+
/** List user's saved schemas. */
|
|
201
|
+
listSchemas(): Promise<SchemaInfo[]>;
|
|
202
|
+
/** Get a specific schema by ID. */
|
|
203
|
+
getSchema(schemaId: string): Promise<SchemaInfo>;
|
|
204
|
+
/** Create a new JSON schema. */
|
|
205
|
+
createSchema(options: CreateSchemaOptions): Promise<SchemaInfo>;
|
|
206
|
+
/** Update an existing schema. */
|
|
207
|
+
updateSchema(schemaId: string, options: UpdateSchemaOptions): Promise<SchemaInfo>;
|
|
208
|
+
/** Delete a schema. */
|
|
209
|
+
deleteSchema(schemaId: string): Promise<void>;
|
|
210
|
+
/** Set a schema as the default. */
|
|
211
|
+
setDefaultSchema(schemaId: string): Promise<SchemaInfo>;
|
|
212
|
+
/** Generate a schema using AI from a natural-language description. */
|
|
213
|
+
generateSchema(options: GenerateSchemaOptions): Promise<GenerateSchemaResult>;
|
|
214
|
+
/** Get usage analytics for the current user/org. */
|
|
215
|
+
getAnalytics(): Promise<AnalyticsResult>;
|
|
216
|
+
/** Submit in-app feedback. */
|
|
217
|
+
submitFeedback(feedback: string): Promise<{
|
|
218
|
+
success: boolean;
|
|
219
|
+
}>;
|
|
220
|
+
/** Get available pricing tiers. */
|
|
221
|
+
getPricing(billingCycle?: string): Promise<Record<string, unknown>>;
|
|
222
|
+
/** Get the current user's tier and quota. */
|
|
223
|
+
getCurrentTier(): Promise<Record<string, unknown>>;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class OxPDFError extends Error {
|
|
227
|
+
readonly statusCode: number | undefined;
|
|
228
|
+
readonly responseBody: string | undefined;
|
|
229
|
+
constructor(message: string, statusCode?: number, responseBody?: string);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export { type AnalyticsResult, type ClientOptions, type CreateSchemaOptions, type ExtractImagesOptions, type FileInfo, type FileListResult, type GenerateSchemaOptions, type GenerateSchemaResult, type ImageInfo, type ImageListResult, type ImageUrlResult, type JobStatus, OxPDFClient, OxPDFError, type ParseOptions, type ParseResult, type ParseStreamOptions, type SchemaInfo, type SchemaTemplate, type StreamEvent, type UpdateSchemaOptions, type UploadOptions, type UploadResult, type ValidateOptions };
|