groupdocs-parser-cloud 23.10.0 → 26.2.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 +1 -1
- package/lib/{api_client.d.ts → src/api_client.d.ts} +17 -17
- package/lib/{api_client.js → src/api_client.js} +135 -125
- package/lib/{api_error.d.ts → src/api_error.d.ts} +56 -56
- package/lib/{api_error.js → src/api_error.js} +81 -80
- package/lib/{auth.d.ts → src/auth.d.ts} +23 -22
- package/lib/{auth.js → src/auth.js} +96 -71
- package/lib/{configuration.d.ts → src/configuration.d.ts} +39 -39
- package/lib/{configuration.js → src/configuration.js} +56 -55
- package/lib/{model.d.ts → src/model.d.ts} +2248 -2206
- package/lib/{model.js → src/model.js} +2216 -2169
- package/lib/{package_version.d.ts → src/package_version.d.ts} +4 -4
- package/lib/{package_version.js → src/package_version.js} +30 -29
- package/lib/{parser_api.d.ts → src/parser_api.d.ts} +274 -270
- package/lib/{parser_api.js → src/parser_api.js} +930 -893
- package/lib/{serializer.d.ts → src/serializer.d.ts} +14 -14
- package/lib/{serializer.js → src/serializer.js} +171 -170
- package/lib/test/api/test_auth_api.d.ts +1 -0
- package/lib/test/api/test_auth_api.js +45 -0
- package/lib/test/api/test_barcode_api.d.ts +1 -0
- package/lib/test/api/test_barcode_api.js +64 -0
- package/lib/test/api/test_file_api.d.ts +1 -0
- package/lib/test/api/test_file_api.js +95 -0
- package/lib/test/api/test_folder_api.d.ts +1 -0
- package/lib/test/api/test_folder_api.js +84 -0
- package/lib/test/api/test_formats_api.d.ts +1 -0
- package/lib/test/api/test_formats_api.js +60 -0
- package/lib/test/api/test_parser_container_api.d.ts +1 -0
- package/lib/test/api/test_parser_container_api.js +134 -0
- package/lib/test/api/test_parser_image_api.d.ts +1 -0
- package/lib/test/api/test_parser_image_api.js +179 -0
- package/lib/test/api/test_parser_info_api.d.ts +1 -0
- package/lib/test/api/test_parser_info_api.js +112 -0
- package/lib/test/api/test_parser_parse_api.d.ts +1 -0
- package/lib/test/api/test_parser_parse_api.js +184 -0
- package/lib/test/api/test_parser_template_api.d.ts +1 -0
- package/lib/test/api/test_parser_template_api.js +168 -0
- package/lib/test/api/test_parser_text_api.d.ts +1 -0
- package/lib/test/api/test_parser_text_api.js +180 -0
- package/lib/test/api/test_storage_api.d.ts +1 -0
- package/lib/test/api/test_storage_api.js +76 -0
- package/lib/test/test_context.d.ts +30 -0
- package/lib/test/test_context.js +156 -0
- package/lib/test/test_coverage.d.ts +1 -0
- package/lib/test/test_coverage.js +77 -0
- package/lib/test/test_file.d.ts +50 -0
- package/lib/test/test_file.js +92 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +16 -14
|
@@ -1,893 +1,930 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* The MIT License (MIT)
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c)
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* @param
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
localVarPath =
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
*
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
*
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
*
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
*
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* The MIT License (MIT)
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Aspose Pty Ltd
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
*
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
*
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
28
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
29
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(o, k2, desc);
|
|
32
|
+
}) : (function(o, m, k, k2) {
|
|
33
|
+
if (k2 === undefined) k2 = k;
|
|
34
|
+
o[k2] = m[k];
|
|
35
|
+
}));
|
|
36
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
+
};
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.TemplateApi = exports.StorageApi = exports.ParseApi = exports.InfoApi = exports.FolderApi = exports.FileApi = void 0;
|
|
50
|
+
const FormData = require("form-data");
|
|
51
|
+
const api_client_1 = require("./api_client");
|
|
52
|
+
const configuration_1 = require("./configuration");
|
|
53
|
+
const serializer_1 = require("./serializer");
|
|
54
|
+
__exportStar(require("./model"), exports);
|
|
55
|
+
__exportStar(require("./configuration"), exports);
|
|
56
|
+
/**
|
|
57
|
+
* GroupDocs.Parser Cloud API
|
|
58
|
+
*/
|
|
59
|
+
class FileApi {
|
|
60
|
+
/**
|
|
61
|
+
* Creates new instance of FileApi
|
|
62
|
+
* @param appSid Application identifier (App SID).
|
|
63
|
+
* @param appKey Application private key (App Key).
|
|
64
|
+
*/
|
|
65
|
+
static fromKeys(appSid, appKey) {
|
|
66
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
67
|
+
return new FileApi(config);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates new instance of FileApi
|
|
71
|
+
* @param config API configuration.
|
|
72
|
+
*/
|
|
73
|
+
static fromConfig(config) {
|
|
74
|
+
return new FileApi(config);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @param config Configuration.
|
|
78
|
+
*/
|
|
79
|
+
constructor(config) {
|
|
80
|
+
this.configuration = config;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Copy file
|
|
84
|
+
* @param requestObj contains request parameters
|
|
85
|
+
*/
|
|
86
|
+
copyFile(requestObj) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
if (requestObj === null || requestObj === undefined) {
|
|
89
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling copyFile.');
|
|
90
|
+
}
|
|
91
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/file/copy/{srcPath}"
|
|
92
|
+
.replace("{" + "srcPath" + "}", String(requestObj.srcPath));
|
|
93
|
+
const queryParameters = {};
|
|
94
|
+
// verify required parameter 'requestObj.srcPath' is not null or undefined
|
|
95
|
+
if (requestObj.srcPath === null || requestObj.srcPath === undefined) {
|
|
96
|
+
throw new Error('Required parameter "requestObj.srcPath" was null or undefined when calling copyFile.');
|
|
97
|
+
}
|
|
98
|
+
// verify required parameter 'requestObj.destPath' is not null or undefined
|
|
99
|
+
if (requestObj.destPath === null || requestObj.destPath === undefined) {
|
|
100
|
+
throw new Error('Required parameter "requestObj.destPath" was null or undefined when calling copyFile.');
|
|
101
|
+
}
|
|
102
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destPath", requestObj.destPath);
|
|
103
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "srcStorageName", requestObj.srcStorageName);
|
|
104
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destStorageName", requestObj.destStorageName);
|
|
105
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "versionId", requestObj.versionId);
|
|
106
|
+
const requestOptions = {
|
|
107
|
+
method: "PUT",
|
|
108
|
+
params: queryParameters,
|
|
109
|
+
url: localVarPath,
|
|
110
|
+
responseType: "json",
|
|
111
|
+
};
|
|
112
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
113
|
+
return Promise.resolve(response);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Delete file
|
|
118
|
+
* @param requestObj contains request parameters
|
|
119
|
+
*/
|
|
120
|
+
deleteFile(requestObj) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
if (requestObj === null || requestObj === undefined) {
|
|
123
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling deleteFile.');
|
|
124
|
+
}
|
|
125
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/file/{path}"
|
|
126
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
127
|
+
const queryParameters = {};
|
|
128
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
129
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
130
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling deleteFile.');
|
|
131
|
+
}
|
|
132
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
133
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "versionId", requestObj.versionId);
|
|
134
|
+
const requestOptions = {
|
|
135
|
+
method: "DELETE",
|
|
136
|
+
params: queryParameters,
|
|
137
|
+
url: localVarPath,
|
|
138
|
+
responseType: "json",
|
|
139
|
+
};
|
|
140
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
141
|
+
return Promise.resolve(response);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Download file
|
|
146
|
+
* @param requestObj contains request parameters
|
|
147
|
+
*/
|
|
148
|
+
downloadFile(requestObj) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (requestObj === null || requestObj === undefined) {
|
|
151
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling downloadFile.');
|
|
152
|
+
}
|
|
153
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/file/{path}"
|
|
154
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
155
|
+
const queryParameters = {};
|
|
156
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
157
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
158
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling downloadFile.');
|
|
159
|
+
}
|
|
160
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
161
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "versionId", requestObj.versionId);
|
|
162
|
+
const requestOptions = {
|
|
163
|
+
method: "GET",
|
|
164
|
+
params: queryParameters,
|
|
165
|
+
url: localVarPath,
|
|
166
|
+
responseType: "arraybuffer",
|
|
167
|
+
responseEncoding: null,
|
|
168
|
+
};
|
|
169
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
170
|
+
const result = serializer_1.Serializer.deserialize(response.data, "Buffer");
|
|
171
|
+
return Promise.resolve(result);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Move file
|
|
176
|
+
* @param requestObj contains request parameters
|
|
177
|
+
*/
|
|
178
|
+
moveFile(requestObj) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
if (requestObj === null || requestObj === undefined) {
|
|
181
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling moveFile.');
|
|
182
|
+
}
|
|
183
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/file/move/{srcPath}"
|
|
184
|
+
.replace("{" + "srcPath" + "}", String(requestObj.srcPath));
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
// verify required parameter 'requestObj.srcPath' is not null or undefined
|
|
187
|
+
if (requestObj.srcPath === null || requestObj.srcPath === undefined) {
|
|
188
|
+
throw new Error('Required parameter "requestObj.srcPath" was null or undefined when calling moveFile.');
|
|
189
|
+
}
|
|
190
|
+
// verify required parameter 'requestObj.destPath' is not null or undefined
|
|
191
|
+
if (requestObj.destPath === null || requestObj.destPath === undefined) {
|
|
192
|
+
throw new Error('Required parameter "requestObj.destPath" was null or undefined when calling moveFile.');
|
|
193
|
+
}
|
|
194
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destPath", requestObj.destPath);
|
|
195
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "srcStorageName", requestObj.srcStorageName);
|
|
196
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destStorageName", requestObj.destStorageName);
|
|
197
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "versionId", requestObj.versionId);
|
|
198
|
+
const requestOptions = {
|
|
199
|
+
method: "PUT",
|
|
200
|
+
params: queryParameters,
|
|
201
|
+
url: localVarPath,
|
|
202
|
+
responseType: "json",
|
|
203
|
+
};
|
|
204
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
205
|
+
return Promise.resolve(response);
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Upload file
|
|
210
|
+
* @param requestObj contains request parameters
|
|
211
|
+
*/
|
|
212
|
+
uploadFile(requestObj) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
if (requestObj === null || requestObj === undefined) {
|
|
215
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling uploadFile.');
|
|
216
|
+
}
|
|
217
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/file/{path}"
|
|
218
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
219
|
+
const queryParameters = {};
|
|
220
|
+
const formParams = new FormData();
|
|
221
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
222
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
223
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling uploadFile.');
|
|
224
|
+
}
|
|
225
|
+
// verify required parameter 'requestObj.file' is not null or undefined
|
|
226
|
+
if (requestObj.file === null || requestObj.file === undefined) {
|
|
227
|
+
throw new Error('Required parameter "requestObj.file" was null or undefined when calling uploadFile.');
|
|
228
|
+
}
|
|
229
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
230
|
+
if (requestObj.file !== undefined) {
|
|
231
|
+
formParams.append("File", requestObj.file, { filename: "file.name" });
|
|
232
|
+
}
|
|
233
|
+
const requestOptions = {
|
|
234
|
+
method: "PUT",
|
|
235
|
+
params: queryParameters,
|
|
236
|
+
url: localVarPath,
|
|
237
|
+
responseType: "json",
|
|
238
|
+
data: formParams,
|
|
239
|
+
};
|
|
240
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
241
|
+
const result = serializer_1.Serializer.deserialize(response.data, "FilesUploadResult");
|
|
242
|
+
return Promise.resolve(result);
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.FileApi = FileApi;
|
|
247
|
+
/**
|
|
248
|
+
* GroupDocs.Parser Cloud API
|
|
249
|
+
*/
|
|
250
|
+
class FolderApi {
|
|
251
|
+
/**
|
|
252
|
+
* Creates new instance of FolderApi
|
|
253
|
+
* @param appSid Application identifier (App SID).
|
|
254
|
+
* @param appKey Application private key (App Key).
|
|
255
|
+
*/
|
|
256
|
+
static fromKeys(appSid, appKey) {
|
|
257
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
258
|
+
return new FolderApi(config);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Creates new instance of FolderApi
|
|
262
|
+
* @param config API configuration.
|
|
263
|
+
*/
|
|
264
|
+
static fromConfig(config) {
|
|
265
|
+
return new FolderApi(config);
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* @param config Configuration.
|
|
269
|
+
*/
|
|
270
|
+
constructor(config) {
|
|
271
|
+
this.configuration = config;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Copy folder
|
|
275
|
+
* @param requestObj contains request parameters
|
|
276
|
+
*/
|
|
277
|
+
copyFolder(requestObj) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
if (requestObj === null || requestObj === undefined) {
|
|
280
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling copyFolder.');
|
|
281
|
+
}
|
|
282
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/folder/copy/{srcPath}"
|
|
283
|
+
.replace("{" + "srcPath" + "}", String(requestObj.srcPath));
|
|
284
|
+
const queryParameters = {};
|
|
285
|
+
// verify required parameter 'requestObj.srcPath' is not null or undefined
|
|
286
|
+
if (requestObj.srcPath === null || requestObj.srcPath === undefined) {
|
|
287
|
+
throw new Error('Required parameter "requestObj.srcPath" was null or undefined when calling copyFolder.');
|
|
288
|
+
}
|
|
289
|
+
// verify required parameter 'requestObj.destPath' is not null or undefined
|
|
290
|
+
if (requestObj.destPath === null || requestObj.destPath === undefined) {
|
|
291
|
+
throw new Error('Required parameter "requestObj.destPath" was null or undefined when calling copyFolder.');
|
|
292
|
+
}
|
|
293
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destPath", requestObj.destPath);
|
|
294
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "srcStorageName", requestObj.srcStorageName);
|
|
295
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destStorageName", requestObj.destStorageName);
|
|
296
|
+
const requestOptions = {
|
|
297
|
+
method: "PUT",
|
|
298
|
+
params: queryParameters,
|
|
299
|
+
url: localVarPath,
|
|
300
|
+
responseType: "json",
|
|
301
|
+
};
|
|
302
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
303
|
+
return Promise.resolve(response);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Create the folder
|
|
308
|
+
* @param requestObj contains request parameters
|
|
309
|
+
*/
|
|
310
|
+
createFolder(requestObj) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
if (requestObj === null || requestObj === undefined) {
|
|
313
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling createFolder.');
|
|
314
|
+
}
|
|
315
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/folder/{path}"
|
|
316
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
317
|
+
const queryParameters = {};
|
|
318
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
319
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
320
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling createFolder.');
|
|
321
|
+
}
|
|
322
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
323
|
+
const requestOptions = {
|
|
324
|
+
method: "PUT",
|
|
325
|
+
params: queryParameters,
|
|
326
|
+
url: localVarPath,
|
|
327
|
+
responseType: "json",
|
|
328
|
+
};
|
|
329
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
330
|
+
return Promise.resolve(response);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Delete folder
|
|
335
|
+
* @param requestObj contains request parameters
|
|
336
|
+
*/
|
|
337
|
+
deleteFolder(requestObj) {
|
|
338
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
339
|
+
if (requestObj === null || requestObj === undefined) {
|
|
340
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling deleteFolder.');
|
|
341
|
+
}
|
|
342
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/folder/{path}"
|
|
343
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
344
|
+
const queryParameters = {};
|
|
345
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
346
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
347
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling deleteFolder.');
|
|
348
|
+
}
|
|
349
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
350
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "recursive", requestObj.recursive);
|
|
351
|
+
const requestOptions = {
|
|
352
|
+
method: "DELETE",
|
|
353
|
+
params: queryParameters,
|
|
354
|
+
url: localVarPath,
|
|
355
|
+
responseType: "json",
|
|
356
|
+
};
|
|
357
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
358
|
+
return Promise.resolve(response);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Get all files and folders within a folder
|
|
363
|
+
* @param requestObj contains request parameters
|
|
364
|
+
*/
|
|
365
|
+
getFilesList(requestObj) {
|
|
366
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
+
if (requestObj === null || requestObj === undefined) {
|
|
368
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling getFilesList.');
|
|
369
|
+
}
|
|
370
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/folder/{path}"
|
|
371
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
372
|
+
const queryParameters = {};
|
|
373
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
374
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
375
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling getFilesList.');
|
|
376
|
+
}
|
|
377
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
378
|
+
const requestOptions = {
|
|
379
|
+
method: "GET",
|
|
380
|
+
params: queryParameters,
|
|
381
|
+
url: localVarPath,
|
|
382
|
+
responseType: "json",
|
|
383
|
+
};
|
|
384
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
385
|
+
const result = serializer_1.Serializer.deserialize(response.data, "FilesList");
|
|
386
|
+
return Promise.resolve(result);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Move folder
|
|
391
|
+
* @param requestObj contains request parameters
|
|
392
|
+
*/
|
|
393
|
+
moveFolder(requestObj) {
|
|
394
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
395
|
+
if (requestObj === null || requestObj === undefined) {
|
|
396
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling moveFolder.');
|
|
397
|
+
}
|
|
398
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/folder/move/{srcPath}"
|
|
399
|
+
.replace("{" + "srcPath" + "}", String(requestObj.srcPath));
|
|
400
|
+
const queryParameters = {};
|
|
401
|
+
// verify required parameter 'requestObj.srcPath' is not null or undefined
|
|
402
|
+
if (requestObj.srcPath === null || requestObj.srcPath === undefined) {
|
|
403
|
+
throw new Error('Required parameter "requestObj.srcPath" was null or undefined when calling moveFolder.');
|
|
404
|
+
}
|
|
405
|
+
// verify required parameter 'requestObj.destPath' is not null or undefined
|
|
406
|
+
if (requestObj.destPath === null || requestObj.destPath === undefined) {
|
|
407
|
+
throw new Error('Required parameter "requestObj.destPath" was null or undefined when calling moveFolder.');
|
|
408
|
+
}
|
|
409
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destPath", requestObj.destPath);
|
|
410
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "srcStorageName", requestObj.srcStorageName);
|
|
411
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "destStorageName", requestObj.destStorageName);
|
|
412
|
+
const requestOptions = {
|
|
413
|
+
method: "PUT",
|
|
414
|
+
params: queryParameters,
|
|
415
|
+
url: localVarPath,
|
|
416
|
+
responseType: "json",
|
|
417
|
+
};
|
|
418
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
419
|
+
return Promise.resolve(response);
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
exports.FolderApi = FolderApi;
|
|
424
|
+
/**
|
|
425
|
+
* GroupDocs.Parser Cloud API
|
|
426
|
+
*/
|
|
427
|
+
class InfoApi {
|
|
428
|
+
/**
|
|
429
|
+
* Creates new instance of InfoApi
|
|
430
|
+
* @param appSid Application identifier (App SID).
|
|
431
|
+
* @param appKey Application private key (App Key).
|
|
432
|
+
*/
|
|
433
|
+
static fromKeys(appSid, appKey) {
|
|
434
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
435
|
+
return new InfoApi(config);
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Creates new instance of InfoApi
|
|
439
|
+
* @param config API configuration.
|
|
440
|
+
*/
|
|
441
|
+
static fromConfig(config) {
|
|
442
|
+
return new InfoApi(config);
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* @param config Configuration.
|
|
446
|
+
*/
|
|
447
|
+
constructor(config) {
|
|
448
|
+
this.configuration = config;
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* Retrieve a container items (relative paths) from document to work with formats that contain attachments, ZIP archives etc.
|
|
452
|
+
* @param requestObj contains request parameters
|
|
453
|
+
*/
|
|
454
|
+
container(requestObj) {
|
|
455
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
456
|
+
if (requestObj === null || requestObj === undefined) {
|
|
457
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling container.');
|
|
458
|
+
}
|
|
459
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/container";
|
|
460
|
+
const queryParameters = {};
|
|
461
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
462
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
463
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling container.');
|
|
464
|
+
}
|
|
465
|
+
const requestOptions = {
|
|
466
|
+
method: "POST",
|
|
467
|
+
params: queryParameters,
|
|
468
|
+
url: localVarPath,
|
|
469
|
+
responseType: "json",
|
|
470
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "ContainerOptions" : requestObj.options.constructor.name),
|
|
471
|
+
};
|
|
472
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
473
|
+
const result = serializer_1.Serializer.deserialize(response.data, "ContainerResult");
|
|
474
|
+
return Promise.resolve(result);
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Retrieve information about document.
|
|
479
|
+
* @param requestObj contains request parameters
|
|
480
|
+
*/
|
|
481
|
+
getInfo(requestObj) {
|
|
482
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
483
|
+
if (requestObj === null || requestObj === undefined) {
|
|
484
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling getInfo.');
|
|
485
|
+
}
|
|
486
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/info";
|
|
487
|
+
const queryParameters = {};
|
|
488
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
489
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
490
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling getInfo.');
|
|
491
|
+
}
|
|
492
|
+
const requestOptions = {
|
|
493
|
+
method: "POST",
|
|
494
|
+
params: queryParameters,
|
|
495
|
+
url: localVarPath,
|
|
496
|
+
responseType: "json",
|
|
497
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "InfoOptions" : requestObj.options.constructor.name),
|
|
498
|
+
};
|
|
499
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
500
|
+
const result = serializer_1.Serializer.deserialize(response.data, "InfoResult");
|
|
501
|
+
return Promise.resolve(result);
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* List supported file formats.
|
|
506
|
+
* @param requestObj contains request parameters
|
|
507
|
+
*/
|
|
508
|
+
getSupportedFileFormats() {
|
|
509
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
510
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/formats";
|
|
511
|
+
const queryParameters = {};
|
|
512
|
+
const requestOptions = {
|
|
513
|
+
method: "GET",
|
|
514
|
+
params: queryParameters,
|
|
515
|
+
url: localVarPath,
|
|
516
|
+
responseType: "json",
|
|
517
|
+
};
|
|
518
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
519
|
+
const result = serializer_1.Serializer.deserialize(response.data, "FormatsResult");
|
|
520
|
+
return Promise.resolve(result);
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
exports.InfoApi = InfoApi;
|
|
525
|
+
/**
|
|
526
|
+
* GroupDocs.Parser Cloud API
|
|
527
|
+
*/
|
|
528
|
+
class ParseApi {
|
|
529
|
+
/**
|
|
530
|
+
* Creates new instance of ParseApi
|
|
531
|
+
* @param appSid Application identifier (App SID).
|
|
532
|
+
* @param appKey Application private key (App Key).
|
|
533
|
+
*/
|
|
534
|
+
static fromKeys(appSid, appKey) {
|
|
535
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
536
|
+
return new ParseApi(config);
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Creates new instance of ParseApi
|
|
540
|
+
* @param config API configuration.
|
|
541
|
+
*/
|
|
542
|
+
static fromConfig(config) {
|
|
543
|
+
return new ParseApi(config);
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* @param config Configuration.
|
|
547
|
+
*/
|
|
548
|
+
constructor(config) {
|
|
549
|
+
this.configuration = config;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Extract document data using AI and given template.
|
|
553
|
+
* @param requestObj contains request parameters
|
|
554
|
+
*/
|
|
555
|
+
aIParse(requestObj) {
|
|
556
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
557
|
+
if (requestObj === null || requestObj === undefined) {
|
|
558
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling aIParse.');
|
|
559
|
+
}
|
|
560
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/aiparse";
|
|
561
|
+
const queryParameters = {};
|
|
562
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
563
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
564
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling aIParse.');
|
|
565
|
+
}
|
|
566
|
+
const requestOptions = {
|
|
567
|
+
method: "POST",
|
|
568
|
+
params: queryParameters,
|
|
569
|
+
url: localVarPath,
|
|
570
|
+
responseType: "json",
|
|
571
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "AIParseOptions" : requestObj.options.constructor.name),
|
|
572
|
+
};
|
|
573
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
574
|
+
const result = serializer_1.Serializer.deserialize(response.data, "any");
|
|
575
|
+
return Promise.resolve(result);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Extract barcodes from document.
|
|
580
|
+
* @param requestObj contains request parameters
|
|
581
|
+
*/
|
|
582
|
+
barcodes(requestObj) {
|
|
583
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
584
|
+
if (requestObj === null || requestObj === undefined) {
|
|
585
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling barcodes.');
|
|
586
|
+
}
|
|
587
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/barcodes";
|
|
588
|
+
const queryParameters = {};
|
|
589
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
590
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
591
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling barcodes.');
|
|
592
|
+
}
|
|
593
|
+
const requestOptions = {
|
|
594
|
+
method: "POST",
|
|
595
|
+
params: queryParameters,
|
|
596
|
+
url: localVarPath,
|
|
597
|
+
responseType: "json",
|
|
598
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "BarcodesOptions" : requestObj.options.constructor.name),
|
|
599
|
+
};
|
|
600
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
601
|
+
const result = serializer_1.Serializer.deserialize(response.data, "BarcodesResult");
|
|
602
|
+
return Promise.resolve(result);
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Extract images from document.
|
|
607
|
+
* @param requestObj contains request parameters
|
|
608
|
+
*/
|
|
609
|
+
images(requestObj) {
|
|
610
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
611
|
+
if (requestObj === null || requestObj === undefined) {
|
|
612
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling images.');
|
|
613
|
+
}
|
|
614
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/images";
|
|
615
|
+
const queryParameters = {};
|
|
616
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
617
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
618
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling images.');
|
|
619
|
+
}
|
|
620
|
+
const requestOptions = {
|
|
621
|
+
method: "POST",
|
|
622
|
+
params: queryParameters,
|
|
623
|
+
url: localVarPath,
|
|
624
|
+
responseType: "json",
|
|
625
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "ImagesOptions" : requestObj.options.constructor.name),
|
|
626
|
+
};
|
|
627
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
628
|
+
const result = serializer_1.Serializer.deserialize(response.data, "ImagesResult");
|
|
629
|
+
return Promise.resolve(result);
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* Extract document data by a predefined template.
|
|
634
|
+
* @param requestObj contains request parameters
|
|
635
|
+
*/
|
|
636
|
+
parse(requestObj) {
|
|
637
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
638
|
+
if (requestObj === null || requestObj === undefined) {
|
|
639
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling parse.');
|
|
640
|
+
}
|
|
641
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/parse";
|
|
642
|
+
const queryParameters = {};
|
|
643
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
644
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
645
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling parse.');
|
|
646
|
+
}
|
|
647
|
+
const requestOptions = {
|
|
648
|
+
method: "POST",
|
|
649
|
+
params: queryParameters,
|
|
650
|
+
url: localVarPath,
|
|
651
|
+
responseType: "json",
|
|
652
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "ParseOptions" : requestObj.options.constructor.name),
|
|
653
|
+
};
|
|
654
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
655
|
+
const result = serializer_1.Serializer.deserialize(response.data, "ParseResult");
|
|
656
|
+
return Promise.resolve(result);
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* Extract text from document.
|
|
661
|
+
* @param requestObj contains request parameters
|
|
662
|
+
*/
|
|
663
|
+
text(requestObj) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
665
|
+
if (requestObj === null || requestObj === undefined) {
|
|
666
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling text.');
|
|
667
|
+
}
|
|
668
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/text";
|
|
669
|
+
const queryParameters = {};
|
|
670
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
671
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
672
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling text.');
|
|
673
|
+
}
|
|
674
|
+
const requestOptions = {
|
|
675
|
+
method: "POST",
|
|
676
|
+
params: queryParameters,
|
|
677
|
+
url: localVarPath,
|
|
678
|
+
responseType: "json",
|
|
679
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "TextOptions" : requestObj.options.constructor.name),
|
|
680
|
+
};
|
|
681
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
682
|
+
const result = serializer_1.Serializer.deserialize(response.data, "TextResult");
|
|
683
|
+
return Promise.resolve(result);
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
exports.ParseApi = ParseApi;
|
|
688
|
+
/**
|
|
689
|
+
* GroupDocs.Parser Cloud API
|
|
690
|
+
*/
|
|
691
|
+
class StorageApi {
|
|
692
|
+
/**
|
|
693
|
+
* Creates new instance of StorageApi
|
|
694
|
+
* @param appSid Application identifier (App SID).
|
|
695
|
+
* @param appKey Application private key (App Key).
|
|
696
|
+
*/
|
|
697
|
+
static fromKeys(appSid, appKey) {
|
|
698
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
699
|
+
return new StorageApi(config);
|
|
700
|
+
}
|
|
701
|
+
/**
|
|
702
|
+
* Creates new instance of StorageApi
|
|
703
|
+
* @param config API configuration.
|
|
704
|
+
*/
|
|
705
|
+
static fromConfig(config) {
|
|
706
|
+
return new StorageApi(config);
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* @param config Configuration.
|
|
710
|
+
*/
|
|
711
|
+
constructor(config) {
|
|
712
|
+
this.configuration = config;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Get disc usage
|
|
716
|
+
* @param requestObj contains request parameters
|
|
717
|
+
*/
|
|
718
|
+
getDiscUsage(requestObj) {
|
|
719
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
720
|
+
if (requestObj === null || requestObj === undefined) {
|
|
721
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling getDiscUsage.');
|
|
722
|
+
}
|
|
723
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/disc";
|
|
724
|
+
const queryParameters = {};
|
|
725
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
726
|
+
const requestOptions = {
|
|
727
|
+
method: "GET",
|
|
728
|
+
params: queryParameters,
|
|
729
|
+
url: localVarPath,
|
|
730
|
+
responseType: "json",
|
|
731
|
+
};
|
|
732
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
733
|
+
const result = serializer_1.Serializer.deserialize(response.data, "DiscUsage");
|
|
734
|
+
return Promise.resolve(result);
|
|
735
|
+
});
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Get file versions
|
|
739
|
+
* @param requestObj contains request parameters
|
|
740
|
+
*/
|
|
741
|
+
getFileVersions(requestObj) {
|
|
742
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
743
|
+
if (requestObj === null || requestObj === undefined) {
|
|
744
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling getFileVersions.');
|
|
745
|
+
}
|
|
746
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/version/{path}"
|
|
747
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
748
|
+
const queryParameters = {};
|
|
749
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
750
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
751
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling getFileVersions.');
|
|
752
|
+
}
|
|
753
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
754
|
+
const requestOptions = {
|
|
755
|
+
method: "GET",
|
|
756
|
+
params: queryParameters,
|
|
757
|
+
url: localVarPath,
|
|
758
|
+
responseType: "json",
|
|
759
|
+
};
|
|
760
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
761
|
+
const result = serializer_1.Serializer.deserialize(response.data, "FileVersions");
|
|
762
|
+
return Promise.resolve(result);
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Check if file or folder exists
|
|
767
|
+
* @param requestObj contains request parameters
|
|
768
|
+
*/
|
|
769
|
+
objectExists(requestObj) {
|
|
770
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
771
|
+
if (requestObj === null || requestObj === undefined) {
|
|
772
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling objectExists.');
|
|
773
|
+
}
|
|
774
|
+
let localVarPath = this.configuration.getServerUrl() + "/parser/storage/exist/{path}"
|
|
775
|
+
.replace("{" + "path" + "}", String(requestObj.path));
|
|
776
|
+
const queryParameters = {};
|
|
777
|
+
// verify required parameter 'requestObj.path' is not null or undefined
|
|
778
|
+
if (requestObj.path === null || requestObj.path === undefined) {
|
|
779
|
+
throw new Error('Required parameter "requestObj.path" was null or undefined when calling objectExists.');
|
|
780
|
+
}
|
|
781
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "storageName", requestObj.storageName);
|
|
782
|
+
localVarPath = (0, api_client_1.addQueryParameterToUrl)(localVarPath, queryParameters, "versionId", requestObj.versionId);
|
|
783
|
+
const requestOptions = {
|
|
784
|
+
method: "GET",
|
|
785
|
+
params: queryParameters,
|
|
786
|
+
url: localVarPath,
|
|
787
|
+
responseType: "json",
|
|
788
|
+
};
|
|
789
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
790
|
+
const result = serializer_1.Serializer.deserialize(response.data, "ObjectExist");
|
|
791
|
+
return Promise.resolve(result);
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Check if storage exists
|
|
796
|
+
* @param requestObj contains request parameters
|
|
797
|
+
*/
|
|
798
|
+
storageExists(requestObj) {
|
|
799
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
800
|
+
if (requestObj === null || requestObj === undefined) {
|
|
801
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling storageExists.');
|
|
802
|
+
}
|
|
803
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/storage/{storageName}/exist"
|
|
804
|
+
.replace("{" + "storageName" + "}", String(requestObj.storageName));
|
|
805
|
+
const queryParameters = {};
|
|
806
|
+
// verify required parameter 'requestObj.storageName' is not null or undefined
|
|
807
|
+
if (requestObj.storageName === null || requestObj.storageName === undefined) {
|
|
808
|
+
throw new Error('Required parameter "requestObj.storageName" was null or undefined when calling storageExists.');
|
|
809
|
+
}
|
|
810
|
+
const requestOptions = {
|
|
811
|
+
method: "GET",
|
|
812
|
+
params: queryParameters,
|
|
813
|
+
url: localVarPath,
|
|
814
|
+
responseType: "json",
|
|
815
|
+
};
|
|
816
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
817
|
+
const result = serializer_1.Serializer.deserialize(response.data, "StorageExist");
|
|
818
|
+
return Promise.resolve(result);
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
exports.StorageApi = StorageApi;
|
|
823
|
+
/**
|
|
824
|
+
* GroupDocs.Parser Cloud API
|
|
825
|
+
*/
|
|
826
|
+
class TemplateApi {
|
|
827
|
+
/**
|
|
828
|
+
* Creates new instance of TemplateApi
|
|
829
|
+
* @param appSid Application identifier (App SID).
|
|
830
|
+
* @param appKey Application private key (App Key).
|
|
831
|
+
*/
|
|
832
|
+
static fromKeys(appSid, appKey) {
|
|
833
|
+
const config = new configuration_1.Configuration(appSid, appKey);
|
|
834
|
+
return new TemplateApi(config);
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Creates new instance of TemplateApi
|
|
838
|
+
* @param config API configuration.
|
|
839
|
+
*/
|
|
840
|
+
static fromConfig(config) {
|
|
841
|
+
return new TemplateApi(config);
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* @param config Configuration.
|
|
845
|
+
*/
|
|
846
|
+
constructor(config) {
|
|
847
|
+
this.configuration = config;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Create or update document template.
|
|
851
|
+
* @param requestObj contains request parameters
|
|
852
|
+
*/
|
|
853
|
+
createTemplate(requestObj) {
|
|
854
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
855
|
+
if (requestObj === null || requestObj === undefined) {
|
|
856
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling createTemplate.');
|
|
857
|
+
}
|
|
858
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/template";
|
|
859
|
+
const queryParameters = {};
|
|
860
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
861
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
862
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling createTemplate.');
|
|
863
|
+
}
|
|
864
|
+
const requestOptions = {
|
|
865
|
+
method: "PUT",
|
|
866
|
+
params: queryParameters,
|
|
867
|
+
url: localVarPath,
|
|
868
|
+
responseType: "json",
|
|
869
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "CreateTemplateOptions" : requestObj.options.constructor.name),
|
|
870
|
+
};
|
|
871
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
872
|
+
const result = serializer_1.Serializer.deserialize(response.data, "TemplateResult");
|
|
873
|
+
return Promise.resolve(result);
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Delete document template.
|
|
878
|
+
* @param requestObj contains request parameters
|
|
879
|
+
*/
|
|
880
|
+
deleteTemplate(requestObj) {
|
|
881
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
882
|
+
if (requestObj === null || requestObj === undefined) {
|
|
883
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling deleteTemplate.');
|
|
884
|
+
}
|
|
885
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/template";
|
|
886
|
+
const queryParameters = {};
|
|
887
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
888
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
889
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling deleteTemplate.');
|
|
890
|
+
}
|
|
891
|
+
const requestOptions = {
|
|
892
|
+
method: "DELETE",
|
|
893
|
+
params: queryParameters,
|
|
894
|
+
url: localVarPath,
|
|
895
|
+
responseType: "json",
|
|
896
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "TemplateOptions" : requestObj.options.constructor.name),
|
|
897
|
+
};
|
|
898
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
899
|
+
return Promise.resolve(response);
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Retrieve document template.
|
|
904
|
+
* @param requestObj contains request parameters
|
|
905
|
+
*/
|
|
906
|
+
getTemplate(requestObj) {
|
|
907
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
908
|
+
if (requestObj === null || requestObj === undefined) {
|
|
909
|
+
throw new Error('Required parameter "requestObj" was null or undefined when calling getTemplate.');
|
|
910
|
+
}
|
|
911
|
+
const localVarPath = this.configuration.getServerUrl() + "/parser/template";
|
|
912
|
+
const queryParameters = {};
|
|
913
|
+
// verify required parameter 'requestObj.options' is not null or undefined
|
|
914
|
+
if (requestObj.options === null || requestObj.options === undefined) {
|
|
915
|
+
throw new Error('Required parameter "requestObj.options" was null or undefined when calling getTemplate.');
|
|
916
|
+
}
|
|
917
|
+
const requestOptions = {
|
|
918
|
+
method: "POST",
|
|
919
|
+
params: queryParameters,
|
|
920
|
+
url: localVarPath,
|
|
921
|
+
responseType: "json",
|
|
922
|
+
data: serializer_1.Serializer.serialize(requestObj.options, requestObj.options.constructor.name === "Object" ? "TemplateOptions" : requestObj.options.constructor.name),
|
|
923
|
+
};
|
|
924
|
+
const response = yield (0, api_client_1.invokeApiMethod)(requestOptions, this.configuration);
|
|
925
|
+
const result = serializer_1.Serializer.deserialize(response.data, "Template");
|
|
926
|
+
return Promise.resolve(result);
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
exports.TemplateApi = TemplateApi;
|