@maxim_mazurok/gapi.client.documentai-v1 0.0.20220808

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/tests.ts ADDED
@@ -0,0 +1,2689 @@
1
+ /* This is stub file for gapi.client.documentai-v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220808
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://documentai.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.documentai */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /**
33
+ * Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support
34
+ * this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
35
+ */
36
+ await gapi.client.documentai.operations.delete({
37
+ name: "Test string",
38
+ });
39
+ /** Fetches processor types. Note that we do not use ListProcessorTypes here because it is not paginated. */
40
+ await gapi.client.documentai.projects.locations.fetchProcessorTypes({
41
+ parent: "Test string",
42
+ });
43
+ /** Gets information about a location. */
44
+ await gapi.client.documentai.projects.locations.get({
45
+ name: "Test string",
46
+ });
47
+ /** Lists information about the supported locations for this service. */
48
+ await gapi.client.documentai.projects.locations.list({
49
+ filter: "Test string",
50
+ name: "Test string",
51
+ pageSize: 42,
52
+ pageToken: "Test string",
53
+ });
54
+ /**
55
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
56
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
57
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
58
+ * 1, corresponding to `Code.CANCELLED`.
59
+ */
60
+ await gapi.client.documentai.projects.locations.operations.cancel({
61
+ name: "Test string",
62
+ });
63
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
64
+ await gapi.client.documentai.projects.locations.operations.get({
65
+ name: "Test string",
66
+ });
67
+ /**
68
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
69
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
70
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
71
+ * ensure the name binding is the parent resource, without the operations collection id.
72
+ */
73
+ await gapi.client.documentai.projects.locations.operations.list({
74
+ filter: "Test string",
75
+ name: "Test string",
76
+ pageSize: 42,
77
+ pageToken: "Test string",
78
+ });
79
+ /** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
80
+ await gapi.client.documentai.projects.locations.processors.batchProcess({
81
+ name: "Test string",
82
+ }, {
83
+ documentOutputConfig: {
84
+ gcsOutputConfig: {
85
+ gcsUri: "Test string",
86
+ },
87
+ },
88
+ inputDocuments: {
89
+ gcsDocuments: {
90
+ documents: [
91
+ {
92
+ gcsUri: "Test string",
93
+ mimeType: "Test string",
94
+ }
95
+ ],
96
+ },
97
+ gcsPrefix: {
98
+ gcsUriPrefix: "Test string",
99
+ },
100
+ },
101
+ skipHumanReview: true,
102
+ });
103
+ /** Creates a processor from the type processor that the user chose. The processor will be at "ENABLED" state by default after its creation. */
104
+ await gapi.client.documentai.projects.locations.processors.create({
105
+ parent: "Test string",
106
+ }, {
107
+ createTime: "Test string",
108
+ defaultProcessorVersion: "Test string",
109
+ displayName: "Test string",
110
+ kmsKeyName: "Test string",
111
+ name: "Test string",
112
+ processEndpoint: "Test string",
113
+ state: "Test string",
114
+ type: "Test string",
115
+ });
116
+ /** Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor. */
117
+ await gapi.client.documentai.projects.locations.processors.delete({
118
+ name: "Test string",
119
+ });
120
+ /** Disables a processor */
121
+ await gapi.client.documentai.projects.locations.processors.disable({
122
+ name: "Test string",
123
+ }, {
124
+ });
125
+ /** Enables a processor */
126
+ await gapi.client.documentai.projects.locations.processors.enable({
127
+ name: "Test string",
128
+ }, {
129
+ });
130
+ /** Gets a processor detail. */
131
+ await gapi.client.documentai.projects.locations.processors.get({
132
+ name: "Test string",
133
+ });
134
+ /** Lists all processors which belong to this project. */
135
+ await gapi.client.documentai.projects.locations.processors.list({
136
+ pageSize: 42,
137
+ pageToken: "Test string",
138
+ parent: "Test string",
139
+ });
140
+ /** Processes a single document. */
141
+ await gapi.client.documentai.projects.locations.processors.process({
142
+ name: "Test string",
143
+ }, {
144
+ fieldMask: "Test string",
145
+ inlineDocument: {
146
+ content: "Test string",
147
+ entities: [
148
+ {
149
+ confidence: 42,
150
+ id: "Test string",
151
+ mentionId: "Test string",
152
+ mentionText: "Test string",
153
+ nonPresent: true,
154
+ normalizedValue: {
155
+ addressValue: {
156
+ addressLines: [
157
+ "Test string"
158
+ ],
159
+ administrativeArea: "Test string",
160
+ languageCode: "Test string",
161
+ locality: "Test string",
162
+ organization: "Test string",
163
+ postalCode: "Test string",
164
+ recipients: [
165
+ "Test string"
166
+ ],
167
+ regionCode: "Test string",
168
+ revision: 42,
169
+ sortingCode: "Test string",
170
+ sublocality: "Test string",
171
+ },
172
+ booleanValue: true,
173
+ datetimeValue: {
174
+ day: 42,
175
+ hours: 42,
176
+ minutes: 42,
177
+ month: 42,
178
+ nanos: 42,
179
+ seconds: 42,
180
+ timeZone: {
181
+ id: "Test string",
182
+ version: "Test string",
183
+ },
184
+ utcOffset: "Test string",
185
+ year: 42,
186
+ },
187
+ dateValue: {
188
+ day: 42,
189
+ month: 42,
190
+ year: 42,
191
+ },
192
+ floatValue: 42,
193
+ integerValue: 42,
194
+ moneyValue: {
195
+ currencyCode: "Test string",
196
+ nanos: 42,
197
+ units: "Test string",
198
+ },
199
+ text: "Test string",
200
+ },
201
+ pageAnchor: {
202
+ pageRefs: [
203
+ {
204
+ boundingPoly: {
205
+ normalizedVertices: [
206
+ {
207
+ x: 42,
208
+ y: 42,
209
+ }
210
+ ],
211
+ vertices: [
212
+ {
213
+ x: 42,
214
+ y: 42,
215
+ }
216
+ ],
217
+ },
218
+ confidence: 42,
219
+ layoutId: "Test string",
220
+ layoutType: "Test string",
221
+ page: "Test string",
222
+ }
223
+ ],
224
+ },
225
+ properties: undefined,
226
+ provenance: {
227
+ id: 42,
228
+ parents: [
229
+ {
230
+ id: 42,
231
+ index: 42,
232
+ revision: 42,
233
+ }
234
+ ],
235
+ revision: 42,
236
+ type: "Test string",
237
+ },
238
+ redacted: true,
239
+ textAnchor: {
240
+ content: "Test string",
241
+ textSegments: [
242
+ {
243
+ endIndex: "Test string",
244
+ startIndex: "Test string",
245
+ }
246
+ ],
247
+ },
248
+ type: "Test string",
249
+ }
250
+ ],
251
+ entityRelations: [
252
+ {
253
+ objectId: "Test string",
254
+ relation: "Test string",
255
+ subjectId: "Test string",
256
+ }
257
+ ],
258
+ error: {
259
+ code: 42,
260
+ details: [
261
+ {
262
+ A: 42
263
+ }
264
+ ],
265
+ message: "Test string",
266
+ },
267
+ mimeType: "Test string",
268
+ pages: [
269
+ {
270
+ blocks: [
271
+ {
272
+ detectedLanguages: [
273
+ {
274
+ confidence: 42,
275
+ languageCode: "Test string",
276
+ }
277
+ ],
278
+ layout: {
279
+ boundingPoly: {
280
+ normalizedVertices: [
281
+ {
282
+ x: 42,
283
+ y: 42,
284
+ }
285
+ ],
286
+ vertices: [
287
+ {
288
+ x: 42,
289
+ y: 42,
290
+ }
291
+ ],
292
+ },
293
+ confidence: 42,
294
+ orientation: "Test string",
295
+ textAnchor: {
296
+ content: "Test string",
297
+ textSegments: [
298
+ {
299
+ endIndex: "Test string",
300
+ startIndex: "Test string",
301
+ }
302
+ ],
303
+ },
304
+ },
305
+ provenance: {
306
+ id: 42,
307
+ parents: [
308
+ {
309
+ id: 42,
310
+ index: 42,
311
+ revision: 42,
312
+ }
313
+ ],
314
+ revision: 42,
315
+ type: "Test string",
316
+ },
317
+ }
318
+ ],
319
+ detectedBarcodes: [
320
+ {
321
+ barcode: {
322
+ format: "Test string",
323
+ rawValue: "Test string",
324
+ valueFormat: "Test string",
325
+ },
326
+ layout: {
327
+ boundingPoly: {
328
+ normalizedVertices: [
329
+ {
330
+ x: 42,
331
+ y: 42,
332
+ }
333
+ ],
334
+ vertices: [
335
+ {
336
+ x: 42,
337
+ y: 42,
338
+ }
339
+ ],
340
+ },
341
+ confidence: 42,
342
+ orientation: "Test string",
343
+ textAnchor: {
344
+ content: "Test string",
345
+ textSegments: [
346
+ {
347
+ endIndex: "Test string",
348
+ startIndex: "Test string",
349
+ }
350
+ ],
351
+ },
352
+ },
353
+ }
354
+ ],
355
+ detectedLanguages: [
356
+ {
357
+ confidence: 42,
358
+ languageCode: "Test string",
359
+ }
360
+ ],
361
+ dimension: {
362
+ height: 42,
363
+ unit: "Test string",
364
+ width: 42,
365
+ },
366
+ formFields: [
367
+ {
368
+ correctedKeyText: "Test string",
369
+ correctedValueText: "Test string",
370
+ fieldName: {
371
+ boundingPoly: {
372
+ normalizedVertices: [
373
+ {
374
+ x: 42,
375
+ y: 42,
376
+ }
377
+ ],
378
+ vertices: [
379
+ {
380
+ x: 42,
381
+ y: 42,
382
+ }
383
+ ],
384
+ },
385
+ confidence: 42,
386
+ orientation: "Test string",
387
+ textAnchor: {
388
+ content: "Test string",
389
+ textSegments: [
390
+ {
391
+ endIndex: "Test string",
392
+ startIndex: "Test string",
393
+ }
394
+ ],
395
+ },
396
+ },
397
+ fieldValue: {
398
+ boundingPoly: {
399
+ normalizedVertices: [
400
+ {
401
+ x: 42,
402
+ y: 42,
403
+ }
404
+ ],
405
+ vertices: [
406
+ {
407
+ x: 42,
408
+ y: 42,
409
+ }
410
+ ],
411
+ },
412
+ confidence: 42,
413
+ orientation: "Test string",
414
+ textAnchor: {
415
+ content: "Test string",
416
+ textSegments: [
417
+ {
418
+ endIndex: "Test string",
419
+ startIndex: "Test string",
420
+ }
421
+ ],
422
+ },
423
+ },
424
+ nameDetectedLanguages: [
425
+ {
426
+ confidence: 42,
427
+ languageCode: "Test string",
428
+ }
429
+ ],
430
+ provenance: {
431
+ id: 42,
432
+ parents: [
433
+ {
434
+ id: 42,
435
+ index: 42,
436
+ revision: 42,
437
+ }
438
+ ],
439
+ revision: 42,
440
+ type: "Test string",
441
+ },
442
+ valueDetectedLanguages: [
443
+ {
444
+ confidence: 42,
445
+ languageCode: "Test string",
446
+ }
447
+ ],
448
+ valueType: "Test string",
449
+ }
450
+ ],
451
+ image: {
452
+ content: "Test string",
453
+ height: 42,
454
+ mimeType: "Test string",
455
+ width: 42,
456
+ },
457
+ layout: {
458
+ boundingPoly: {
459
+ normalizedVertices: [
460
+ {
461
+ x: 42,
462
+ y: 42,
463
+ }
464
+ ],
465
+ vertices: [
466
+ {
467
+ x: 42,
468
+ y: 42,
469
+ }
470
+ ],
471
+ },
472
+ confidence: 42,
473
+ orientation: "Test string",
474
+ textAnchor: {
475
+ content: "Test string",
476
+ textSegments: [
477
+ {
478
+ endIndex: "Test string",
479
+ startIndex: "Test string",
480
+ }
481
+ ],
482
+ },
483
+ },
484
+ lines: [
485
+ {
486
+ detectedLanguages: [
487
+ {
488
+ confidence: 42,
489
+ languageCode: "Test string",
490
+ }
491
+ ],
492
+ layout: {
493
+ boundingPoly: {
494
+ normalizedVertices: [
495
+ {
496
+ x: 42,
497
+ y: 42,
498
+ }
499
+ ],
500
+ vertices: [
501
+ {
502
+ x: 42,
503
+ y: 42,
504
+ }
505
+ ],
506
+ },
507
+ confidence: 42,
508
+ orientation: "Test string",
509
+ textAnchor: {
510
+ content: "Test string",
511
+ textSegments: [
512
+ {
513
+ endIndex: "Test string",
514
+ startIndex: "Test string",
515
+ }
516
+ ],
517
+ },
518
+ },
519
+ provenance: {
520
+ id: 42,
521
+ parents: [
522
+ {
523
+ id: 42,
524
+ index: 42,
525
+ revision: 42,
526
+ }
527
+ ],
528
+ revision: 42,
529
+ type: "Test string",
530
+ },
531
+ }
532
+ ],
533
+ pageNumber: 42,
534
+ paragraphs: [
535
+ {
536
+ detectedLanguages: [
537
+ {
538
+ confidence: 42,
539
+ languageCode: "Test string",
540
+ }
541
+ ],
542
+ layout: {
543
+ boundingPoly: {
544
+ normalizedVertices: [
545
+ {
546
+ x: 42,
547
+ y: 42,
548
+ }
549
+ ],
550
+ vertices: [
551
+ {
552
+ x: 42,
553
+ y: 42,
554
+ }
555
+ ],
556
+ },
557
+ confidence: 42,
558
+ orientation: "Test string",
559
+ textAnchor: {
560
+ content: "Test string",
561
+ textSegments: [
562
+ {
563
+ endIndex: "Test string",
564
+ startIndex: "Test string",
565
+ }
566
+ ],
567
+ },
568
+ },
569
+ provenance: {
570
+ id: 42,
571
+ parents: [
572
+ {
573
+ id: 42,
574
+ index: 42,
575
+ revision: 42,
576
+ }
577
+ ],
578
+ revision: 42,
579
+ type: "Test string",
580
+ },
581
+ }
582
+ ],
583
+ provenance: {
584
+ id: 42,
585
+ parents: [
586
+ {
587
+ id: 42,
588
+ index: 42,
589
+ revision: 42,
590
+ }
591
+ ],
592
+ revision: 42,
593
+ type: "Test string",
594
+ },
595
+ symbols: [
596
+ {
597
+ detectedLanguages: [
598
+ {
599
+ confidence: 42,
600
+ languageCode: "Test string",
601
+ }
602
+ ],
603
+ layout: {
604
+ boundingPoly: {
605
+ normalizedVertices: [
606
+ {
607
+ x: 42,
608
+ y: 42,
609
+ }
610
+ ],
611
+ vertices: [
612
+ {
613
+ x: 42,
614
+ y: 42,
615
+ }
616
+ ],
617
+ },
618
+ confidence: 42,
619
+ orientation: "Test string",
620
+ textAnchor: {
621
+ content: "Test string",
622
+ textSegments: [
623
+ {
624
+ endIndex: "Test string",
625
+ startIndex: "Test string",
626
+ }
627
+ ],
628
+ },
629
+ },
630
+ }
631
+ ],
632
+ tables: [
633
+ {
634
+ bodyRows: [
635
+ {
636
+ cells: [
637
+ {
638
+ colSpan: 42,
639
+ detectedLanguages: [
640
+ {
641
+ confidence: 42,
642
+ languageCode: "Test string",
643
+ }
644
+ ],
645
+ layout: {
646
+ boundingPoly: {
647
+ normalizedVertices: [
648
+ {
649
+ x: 42,
650
+ y: 42,
651
+ }
652
+ ],
653
+ vertices: [
654
+ {
655
+ x: 42,
656
+ y: 42,
657
+ }
658
+ ],
659
+ },
660
+ confidence: 42,
661
+ orientation: "Test string",
662
+ textAnchor: {
663
+ content: "Test string",
664
+ textSegments: [
665
+ {
666
+ endIndex: "Test string",
667
+ startIndex: "Test string",
668
+ }
669
+ ],
670
+ },
671
+ },
672
+ rowSpan: 42,
673
+ }
674
+ ],
675
+ }
676
+ ],
677
+ detectedLanguages: [
678
+ {
679
+ confidence: 42,
680
+ languageCode: "Test string",
681
+ }
682
+ ],
683
+ headerRows: [
684
+ {
685
+ cells: [
686
+ {
687
+ colSpan: 42,
688
+ detectedLanguages: [
689
+ {
690
+ confidence: 42,
691
+ languageCode: "Test string",
692
+ }
693
+ ],
694
+ layout: {
695
+ boundingPoly: {
696
+ normalizedVertices: [
697
+ {
698
+ x: 42,
699
+ y: 42,
700
+ }
701
+ ],
702
+ vertices: [
703
+ {
704
+ x: 42,
705
+ y: 42,
706
+ }
707
+ ],
708
+ },
709
+ confidence: 42,
710
+ orientation: "Test string",
711
+ textAnchor: {
712
+ content: "Test string",
713
+ textSegments: [
714
+ {
715
+ endIndex: "Test string",
716
+ startIndex: "Test string",
717
+ }
718
+ ],
719
+ },
720
+ },
721
+ rowSpan: 42,
722
+ }
723
+ ],
724
+ }
725
+ ],
726
+ layout: {
727
+ boundingPoly: {
728
+ normalizedVertices: [
729
+ {
730
+ x: 42,
731
+ y: 42,
732
+ }
733
+ ],
734
+ vertices: [
735
+ {
736
+ x: 42,
737
+ y: 42,
738
+ }
739
+ ],
740
+ },
741
+ confidence: 42,
742
+ orientation: "Test string",
743
+ textAnchor: {
744
+ content: "Test string",
745
+ textSegments: [
746
+ {
747
+ endIndex: "Test string",
748
+ startIndex: "Test string",
749
+ }
750
+ ],
751
+ },
752
+ },
753
+ }
754
+ ],
755
+ tokens: [
756
+ {
757
+ detectedBreak: {
758
+ type: "Test string",
759
+ },
760
+ detectedLanguages: [
761
+ {
762
+ confidence: 42,
763
+ languageCode: "Test string",
764
+ }
765
+ ],
766
+ layout: {
767
+ boundingPoly: {
768
+ normalizedVertices: [
769
+ {
770
+ x: 42,
771
+ y: 42,
772
+ }
773
+ ],
774
+ vertices: [
775
+ {
776
+ x: 42,
777
+ y: 42,
778
+ }
779
+ ],
780
+ },
781
+ confidence: 42,
782
+ orientation: "Test string",
783
+ textAnchor: {
784
+ content: "Test string",
785
+ textSegments: [
786
+ {
787
+ endIndex: "Test string",
788
+ startIndex: "Test string",
789
+ }
790
+ ],
791
+ },
792
+ },
793
+ provenance: {
794
+ id: 42,
795
+ parents: [
796
+ {
797
+ id: 42,
798
+ index: 42,
799
+ revision: 42,
800
+ }
801
+ ],
802
+ revision: 42,
803
+ type: "Test string",
804
+ },
805
+ }
806
+ ],
807
+ transforms: [
808
+ {
809
+ cols: 42,
810
+ data: "Test string",
811
+ rows: 42,
812
+ type: 42,
813
+ }
814
+ ],
815
+ visualElements: [
816
+ {
817
+ detectedLanguages: [
818
+ {
819
+ confidence: 42,
820
+ languageCode: "Test string",
821
+ }
822
+ ],
823
+ layout: {
824
+ boundingPoly: {
825
+ normalizedVertices: [
826
+ {
827
+ x: 42,
828
+ y: 42,
829
+ }
830
+ ],
831
+ vertices: [
832
+ {
833
+ x: 42,
834
+ y: 42,
835
+ }
836
+ ],
837
+ },
838
+ confidence: 42,
839
+ orientation: "Test string",
840
+ textAnchor: {
841
+ content: "Test string",
842
+ textSegments: [
843
+ {
844
+ endIndex: "Test string",
845
+ startIndex: "Test string",
846
+ }
847
+ ],
848
+ },
849
+ },
850
+ type: "Test string",
851
+ }
852
+ ],
853
+ }
854
+ ],
855
+ revisions: [
856
+ {
857
+ agent: "Test string",
858
+ createTime: "Test string",
859
+ humanReview: {
860
+ state: "Test string",
861
+ stateMessage: "Test string",
862
+ },
863
+ id: "Test string",
864
+ parent: [
865
+ 42
866
+ ],
867
+ parentIds: [
868
+ "Test string"
869
+ ],
870
+ processor: "Test string",
871
+ }
872
+ ],
873
+ shardInfo: {
874
+ shardCount: "Test string",
875
+ shardIndex: "Test string",
876
+ textOffset: "Test string",
877
+ },
878
+ text: "Test string",
879
+ textChanges: [
880
+ {
881
+ changedText: "Test string",
882
+ provenance: [
883
+ {
884
+ id: 42,
885
+ parents: [
886
+ {
887
+ id: 42,
888
+ index: 42,
889
+ revision: 42,
890
+ }
891
+ ],
892
+ revision: 42,
893
+ type: "Test string",
894
+ }
895
+ ],
896
+ textAnchor: {
897
+ content: "Test string",
898
+ textSegments: [
899
+ {
900
+ endIndex: "Test string",
901
+ startIndex: "Test string",
902
+ }
903
+ ],
904
+ },
905
+ }
906
+ ],
907
+ textStyles: [
908
+ {
909
+ backgroundColor: {
910
+ alpha: 42,
911
+ blue: 42,
912
+ green: 42,
913
+ red: 42,
914
+ },
915
+ color: {
916
+ alpha: 42,
917
+ blue: 42,
918
+ green: 42,
919
+ red: 42,
920
+ },
921
+ fontSize: {
922
+ size: 42,
923
+ unit: "Test string",
924
+ },
925
+ fontWeight: "Test string",
926
+ textAnchor: {
927
+ content: "Test string",
928
+ textSegments: [
929
+ {
930
+ endIndex: "Test string",
931
+ startIndex: "Test string",
932
+ }
933
+ ],
934
+ },
935
+ textDecoration: "Test string",
936
+ textStyle: "Test string",
937
+ }
938
+ ],
939
+ uri: "Test string",
940
+ },
941
+ rawDocument: {
942
+ content: "Test string",
943
+ mimeType: "Test string",
944
+ },
945
+ skipHumanReview: true,
946
+ });
947
+ /** Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments. */
948
+ await gapi.client.documentai.projects.locations.processors.setDefaultProcessorVersion({
949
+ processor: "Test string",
950
+ }, {
951
+ defaultProcessorVersion: "Test string",
952
+ });
953
+ /** Send a document for Human Review. The input document should be processed by the specified processor. */
954
+ await gapi.client.documentai.projects.locations.processors.humanReviewConfig.reviewDocument({
955
+ humanReviewConfig: "Test string",
956
+ }, {
957
+ documentSchema: {
958
+ description: "Test string",
959
+ displayName: "Test string",
960
+ entityTypes: [
961
+ {
962
+ baseTypes: [
963
+ "Test string"
964
+ ],
965
+ displayName: "Test string",
966
+ enumValues: {
967
+ values: [
968
+ "Test string"
969
+ ],
970
+ },
971
+ name: "Test string",
972
+ properties: [
973
+ {
974
+ name: "Test string",
975
+ occurrenceType: "Test string",
976
+ valueType: "Test string",
977
+ }
978
+ ],
979
+ }
980
+ ],
981
+ metadata: {
982
+ documentAllowMultipleLabels: true,
983
+ documentSplitter: true,
984
+ prefixedNamingOnProperties: true,
985
+ skipNamingValidation: true,
986
+ },
987
+ },
988
+ enableSchemaValidation: true,
989
+ inlineDocument: {
990
+ content: "Test string",
991
+ entities: [
992
+ {
993
+ confidence: 42,
994
+ id: "Test string",
995
+ mentionId: "Test string",
996
+ mentionText: "Test string",
997
+ nonPresent: true,
998
+ normalizedValue: {
999
+ addressValue: {
1000
+ addressLines: [
1001
+ "Test string"
1002
+ ],
1003
+ administrativeArea: "Test string",
1004
+ languageCode: "Test string",
1005
+ locality: "Test string",
1006
+ organization: "Test string",
1007
+ postalCode: "Test string",
1008
+ recipients: [
1009
+ "Test string"
1010
+ ],
1011
+ regionCode: "Test string",
1012
+ revision: 42,
1013
+ sortingCode: "Test string",
1014
+ sublocality: "Test string",
1015
+ },
1016
+ booleanValue: true,
1017
+ datetimeValue: {
1018
+ day: 42,
1019
+ hours: 42,
1020
+ minutes: 42,
1021
+ month: 42,
1022
+ nanos: 42,
1023
+ seconds: 42,
1024
+ timeZone: {
1025
+ id: "Test string",
1026
+ version: "Test string",
1027
+ },
1028
+ utcOffset: "Test string",
1029
+ year: 42,
1030
+ },
1031
+ dateValue: {
1032
+ day: 42,
1033
+ month: 42,
1034
+ year: 42,
1035
+ },
1036
+ floatValue: 42,
1037
+ integerValue: 42,
1038
+ moneyValue: {
1039
+ currencyCode: "Test string",
1040
+ nanos: 42,
1041
+ units: "Test string",
1042
+ },
1043
+ text: "Test string",
1044
+ },
1045
+ pageAnchor: {
1046
+ pageRefs: [
1047
+ {
1048
+ boundingPoly: {
1049
+ normalizedVertices: [
1050
+ {
1051
+ x: 42,
1052
+ y: 42,
1053
+ }
1054
+ ],
1055
+ vertices: [
1056
+ {
1057
+ x: 42,
1058
+ y: 42,
1059
+ }
1060
+ ],
1061
+ },
1062
+ confidence: 42,
1063
+ layoutId: "Test string",
1064
+ layoutType: "Test string",
1065
+ page: "Test string",
1066
+ }
1067
+ ],
1068
+ },
1069
+ properties: undefined,
1070
+ provenance: {
1071
+ id: 42,
1072
+ parents: [
1073
+ {
1074
+ id: 42,
1075
+ index: 42,
1076
+ revision: 42,
1077
+ }
1078
+ ],
1079
+ revision: 42,
1080
+ type: "Test string",
1081
+ },
1082
+ redacted: true,
1083
+ textAnchor: {
1084
+ content: "Test string",
1085
+ textSegments: [
1086
+ {
1087
+ endIndex: "Test string",
1088
+ startIndex: "Test string",
1089
+ }
1090
+ ],
1091
+ },
1092
+ type: "Test string",
1093
+ }
1094
+ ],
1095
+ entityRelations: [
1096
+ {
1097
+ objectId: "Test string",
1098
+ relation: "Test string",
1099
+ subjectId: "Test string",
1100
+ }
1101
+ ],
1102
+ error: {
1103
+ code: 42,
1104
+ details: [
1105
+ {
1106
+ A: 42
1107
+ }
1108
+ ],
1109
+ message: "Test string",
1110
+ },
1111
+ mimeType: "Test string",
1112
+ pages: [
1113
+ {
1114
+ blocks: [
1115
+ {
1116
+ detectedLanguages: [
1117
+ {
1118
+ confidence: 42,
1119
+ languageCode: "Test string",
1120
+ }
1121
+ ],
1122
+ layout: {
1123
+ boundingPoly: {
1124
+ normalizedVertices: [
1125
+ {
1126
+ x: 42,
1127
+ y: 42,
1128
+ }
1129
+ ],
1130
+ vertices: [
1131
+ {
1132
+ x: 42,
1133
+ y: 42,
1134
+ }
1135
+ ],
1136
+ },
1137
+ confidence: 42,
1138
+ orientation: "Test string",
1139
+ textAnchor: {
1140
+ content: "Test string",
1141
+ textSegments: [
1142
+ {
1143
+ endIndex: "Test string",
1144
+ startIndex: "Test string",
1145
+ }
1146
+ ],
1147
+ },
1148
+ },
1149
+ provenance: {
1150
+ id: 42,
1151
+ parents: [
1152
+ {
1153
+ id: 42,
1154
+ index: 42,
1155
+ revision: 42,
1156
+ }
1157
+ ],
1158
+ revision: 42,
1159
+ type: "Test string",
1160
+ },
1161
+ }
1162
+ ],
1163
+ detectedBarcodes: [
1164
+ {
1165
+ barcode: {
1166
+ format: "Test string",
1167
+ rawValue: "Test string",
1168
+ valueFormat: "Test string",
1169
+ },
1170
+ layout: {
1171
+ boundingPoly: {
1172
+ normalizedVertices: [
1173
+ {
1174
+ x: 42,
1175
+ y: 42,
1176
+ }
1177
+ ],
1178
+ vertices: [
1179
+ {
1180
+ x: 42,
1181
+ y: 42,
1182
+ }
1183
+ ],
1184
+ },
1185
+ confidence: 42,
1186
+ orientation: "Test string",
1187
+ textAnchor: {
1188
+ content: "Test string",
1189
+ textSegments: [
1190
+ {
1191
+ endIndex: "Test string",
1192
+ startIndex: "Test string",
1193
+ }
1194
+ ],
1195
+ },
1196
+ },
1197
+ }
1198
+ ],
1199
+ detectedLanguages: [
1200
+ {
1201
+ confidence: 42,
1202
+ languageCode: "Test string",
1203
+ }
1204
+ ],
1205
+ dimension: {
1206
+ height: 42,
1207
+ unit: "Test string",
1208
+ width: 42,
1209
+ },
1210
+ formFields: [
1211
+ {
1212
+ correctedKeyText: "Test string",
1213
+ correctedValueText: "Test string",
1214
+ fieldName: {
1215
+ boundingPoly: {
1216
+ normalizedVertices: [
1217
+ {
1218
+ x: 42,
1219
+ y: 42,
1220
+ }
1221
+ ],
1222
+ vertices: [
1223
+ {
1224
+ x: 42,
1225
+ y: 42,
1226
+ }
1227
+ ],
1228
+ },
1229
+ confidence: 42,
1230
+ orientation: "Test string",
1231
+ textAnchor: {
1232
+ content: "Test string",
1233
+ textSegments: [
1234
+ {
1235
+ endIndex: "Test string",
1236
+ startIndex: "Test string",
1237
+ }
1238
+ ],
1239
+ },
1240
+ },
1241
+ fieldValue: {
1242
+ boundingPoly: {
1243
+ normalizedVertices: [
1244
+ {
1245
+ x: 42,
1246
+ y: 42,
1247
+ }
1248
+ ],
1249
+ vertices: [
1250
+ {
1251
+ x: 42,
1252
+ y: 42,
1253
+ }
1254
+ ],
1255
+ },
1256
+ confidence: 42,
1257
+ orientation: "Test string",
1258
+ textAnchor: {
1259
+ content: "Test string",
1260
+ textSegments: [
1261
+ {
1262
+ endIndex: "Test string",
1263
+ startIndex: "Test string",
1264
+ }
1265
+ ],
1266
+ },
1267
+ },
1268
+ nameDetectedLanguages: [
1269
+ {
1270
+ confidence: 42,
1271
+ languageCode: "Test string",
1272
+ }
1273
+ ],
1274
+ provenance: {
1275
+ id: 42,
1276
+ parents: [
1277
+ {
1278
+ id: 42,
1279
+ index: 42,
1280
+ revision: 42,
1281
+ }
1282
+ ],
1283
+ revision: 42,
1284
+ type: "Test string",
1285
+ },
1286
+ valueDetectedLanguages: [
1287
+ {
1288
+ confidence: 42,
1289
+ languageCode: "Test string",
1290
+ }
1291
+ ],
1292
+ valueType: "Test string",
1293
+ }
1294
+ ],
1295
+ image: {
1296
+ content: "Test string",
1297
+ height: 42,
1298
+ mimeType: "Test string",
1299
+ width: 42,
1300
+ },
1301
+ layout: {
1302
+ boundingPoly: {
1303
+ normalizedVertices: [
1304
+ {
1305
+ x: 42,
1306
+ y: 42,
1307
+ }
1308
+ ],
1309
+ vertices: [
1310
+ {
1311
+ x: 42,
1312
+ y: 42,
1313
+ }
1314
+ ],
1315
+ },
1316
+ confidence: 42,
1317
+ orientation: "Test string",
1318
+ textAnchor: {
1319
+ content: "Test string",
1320
+ textSegments: [
1321
+ {
1322
+ endIndex: "Test string",
1323
+ startIndex: "Test string",
1324
+ }
1325
+ ],
1326
+ },
1327
+ },
1328
+ lines: [
1329
+ {
1330
+ detectedLanguages: [
1331
+ {
1332
+ confidence: 42,
1333
+ languageCode: "Test string",
1334
+ }
1335
+ ],
1336
+ layout: {
1337
+ boundingPoly: {
1338
+ normalizedVertices: [
1339
+ {
1340
+ x: 42,
1341
+ y: 42,
1342
+ }
1343
+ ],
1344
+ vertices: [
1345
+ {
1346
+ x: 42,
1347
+ y: 42,
1348
+ }
1349
+ ],
1350
+ },
1351
+ confidence: 42,
1352
+ orientation: "Test string",
1353
+ textAnchor: {
1354
+ content: "Test string",
1355
+ textSegments: [
1356
+ {
1357
+ endIndex: "Test string",
1358
+ startIndex: "Test string",
1359
+ }
1360
+ ],
1361
+ },
1362
+ },
1363
+ provenance: {
1364
+ id: 42,
1365
+ parents: [
1366
+ {
1367
+ id: 42,
1368
+ index: 42,
1369
+ revision: 42,
1370
+ }
1371
+ ],
1372
+ revision: 42,
1373
+ type: "Test string",
1374
+ },
1375
+ }
1376
+ ],
1377
+ pageNumber: 42,
1378
+ paragraphs: [
1379
+ {
1380
+ detectedLanguages: [
1381
+ {
1382
+ confidence: 42,
1383
+ languageCode: "Test string",
1384
+ }
1385
+ ],
1386
+ layout: {
1387
+ boundingPoly: {
1388
+ normalizedVertices: [
1389
+ {
1390
+ x: 42,
1391
+ y: 42,
1392
+ }
1393
+ ],
1394
+ vertices: [
1395
+ {
1396
+ x: 42,
1397
+ y: 42,
1398
+ }
1399
+ ],
1400
+ },
1401
+ confidence: 42,
1402
+ orientation: "Test string",
1403
+ textAnchor: {
1404
+ content: "Test string",
1405
+ textSegments: [
1406
+ {
1407
+ endIndex: "Test string",
1408
+ startIndex: "Test string",
1409
+ }
1410
+ ],
1411
+ },
1412
+ },
1413
+ provenance: {
1414
+ id: 42,
1415
+ parents: [
1416
+ {
1417
+ id: 42,
1418
+ index: 42,
1419
+ revision: 42,
1420
+ }
1421
+ ],
1422
+ revision: 42,
1423
+ type: "Test string",
1424
+ },
1425
+ }
1426
+ ],
1427
+ provenance: {
1428
+ id: 42,
1429
+ parents: [
1430
+ {
1431
+ id: 42,
1432
+ index: 42,
1433
+ revision: 42,
1434
+ }
1435
+ ],
1436
+ revision: 42,
1437
+ type: "Test string",
1438
+ },
1439
+ symbols: [
1440
+ {
1441
+ detectedLanguages: [
1442
+ {
1443
+ confidence: 42,
1444
+ languageCode: "Test string",
1445
+ }
1446
+ ],
1447
+ layout: {
1448
+ boundingPoly: {
1449
+ normalizedVertices: [
1450
+ {
1451
+ x: 42,
1452
+ y: 42,
1453
+ }
1454
+ ],
1455
+ vertices: [
1456
+ {
1457
+ x: 42,
1458
+ y: 42,
1459
+ }
1460
+ ],
1461
+ },
1462
+ confidence: 42,
1463
+ orientation: "Test string",
1464
+ textAnchor: {
1465
+ content: "Test string",
1466
+ textSegments: [
1467
+ {
1468
+ endIndex: "Test string",
1469
+ startIndex: "Test string",
1470
+ }
1471
+ ],
1472
+ },
1473
+ },
1474
+ }
1475
+ ],
1476
+ tables: [
1477
+ {
1478
+ bodyRows: [
1479
+ {
1480
+ cells: [
1481
+ {
1482
+ colSpan: 42,
1483
+ detectedLanguages: [
1484
+ {
1485
+ confidence: 42,
1486
+ languageCode: "Test string",
1487
+ }
1488
+ ],
1489
+ layout: {
1490
+ boundingPoly: {
1491
+ normalizedVertices: [
1492
+ {
1493
+ x: 42,
1494
+ y: 42,
1495
+ }
1496
+ ],
1497
+ vertices: [
1498
+ {
1499
+ x: 42,
1500
+ y: 42,
1501
+ }
1502
+ ],
1503
+ },
1504
+ confidence: 42,
1505
+ orientation: "Test string",
1506
+ textAnchor: {
1507
+ content: "Test string",
1508
+ textSegments: [
1509
+ {
1510
+ endIndex: "Test string",
1511
+ startIndex: "Test string",
1512
+ }
1513
+ ],
1514
+ },
1515
+ },
1516
+ rowSpan: 42,
1517
+ }
1518
+ ],
1519
+ }
1520
+ ],
1521
+ detectedLanguages: [
1522
+ {
1523
+ confidence: 42,
1524
+ languageCode: "Test string",
1525
+ }
1526
+ ],
1527
+ headerRows: [
1528
+ {
1529
+ cells: [
1530
+ {
1531
+ colSpan: 42,
1532
+ detectedLanguages: [
1533
+ {
1534
+ confidence: 42,
1535
+ languageCode: "Test string",
1536
+ }
1537
+ ],
1538
+ layout: {
1539
+ boundingPoly: {
1540
+ normalizedVertices: [
1541
+ {
1542
+ x: 42,
1543
+ y: 42,
1544
+ }
1545
+ ],
1546
+ vertices: [
1547
+ {
1548
+ x: 42,
1549
+ y: 42,
1550
+ }
1551
+ ],
1552
+ },
1553
+ confidence: 42,
1554
+ orientation: "Test string",
1555
+ textAnchor: {
1556
+ content: "Test string",
1557
+ textSegments: [
1558
+ {
1559
+ endIndex: "Test string",
1560
+ startIndex: "Test string",
1561
+ }
1562
+ ],
1563
+ },
1564
+ },
1565
+ rowSpan: 42,
1566
+ }
1567
+ ],
1568
+ }
1569
+ ],
1570
+ layout: {
1571
+ boundingPoly: {
1572
+ normalizedVertices: [
1573
+ {
1574
+ x: 42,
1575
+ y: 42,
1576
+ }
1577
+ ],
1578
+ vertices: [
1579
+ {
1580
+ x: 42,
1581
+ y: 42,
1582
+ }
1583
+ ],
1584
+ },
1585
+ confidence: 42,
1586
+ orientation: "Test string",
1587
+ textAnchor: {
1588
+ content: "Test string",
1589
+ textSegments: [
1590
+ {
1591
+ endIndex: "Test string",
1592
+ startIndex: "Test string",
1593
+ }
1594
+ ],
1595
+ },
1596
+ },
1597
+ }
1598
+ ],
1599
+ tokens: [
1600
+ {
1601
+ detectedBreak: {
1602
+ type: "Test string",
1603
+ },
1604
+ detectedLanguages: [
1605
+ {
1606
+ confidence: 42,
1607
+ languageCode: "Test string",
1608
+ }
1609
+ ],
1610
+ layout: {
1611
+ boundingPoly: {
1612
+ normalizedVertices: [
1613
+ {
1614
+ x: 42,
1615
+ y: 42,
1616
+ }
1617
+ ],
1618
+ vertices: [
1619
+ {
1620
+ x: 42,
1621
+ y: 42,
1622
+ }
1623
+ ],
1624
+ },
1625
+ confidence: 42,
1626
+ orientation: "Test string",
1627
+ textAnchor: {
1628
+ content: "Test string",
1629
+ textSegments: [
1630
+ {
1631
+ endIndex: "Test string",
1632
+ startIndex: "Test string",
1633
+ }
1634
+ ],
1635
+ },
1636
+ },
1637
+ provenance: {
1638
+ id: 42,
1639
+ parents: [
1640
+ {
1641
+ id: 42,
1642
+ index: 42,
1643
+ revision: 42,
1644
+ }
1645
+ ],
1646
+ revision: 42,
1647
+ type: "Test string",
1648
+ },
1649
+ }
1650
+ ],
1651
+ transforms: [
1652
+ {
1653
+ cols: 42,
1654
+ data: "Test string",
1655
+ rows: 42,
1656
+ type: 42,
1657
+ }
1658
+ ],
1659
+ visualElements: [
1660
+ {
1661
+ detectedLanguages: [
1662
+ {
1663
+ confidence: 42,
1664
+ languageCode: "Test string",
1665
+ }
1666
+ ],
1667
+ layout: {
1668
+ boundingPoly: {
1669
+ normalizedVertices: [
1670
+ {
1671
+ x: 42,
1672
+ y: 42,
1673
+ }
1674
+ ],
1675
+ vertices: [
1676
+ {
1677
+ x: 42,
1678
+ y: 42,
1679
+ }
1680
+ ],
1681
+ },
1682
+ confidence: 42,
1683
+ orientation: "Test string",
1684
+ textAnchor: {
1685
+ content: "Test string",
1686
+ textSegments: [
1687
+ {
1688
+ endIndex: "Test string",
1689
+ startIndex: "Test string",
1690
+ }
1691
+ ],
1692
+ },
1693
+ },
1694
+ type: "Test string",
1695
+ }
1696
+ ],
1697
+ }
1698
+ ],
1699
+ revisions: [
1700
+ {
1701
+ agent: "Test string",
1702
+ createTime: "Test string",
1703
+ humanReview: {
1704
+ state: "Test string",
1705
+ stateMessage: "Test string",
1706
+ },
1707
+ id: "Test string",
1708
+ parent: [
1709
+ 42
1710
+ ],
1711
+ parentIds: [
1712
+ "Test string"
1713
+ ],
1714
+ processor: "Test string",
1715
+ }
1716
+ ],
1717
+ shardInfo: {
1718
+ shardCount: "Test string",
1719
+ shardIndex: "Test string",
1720
+ textOffset: "Test string",
1721
+ },
1722
+ text: "Test string",
1723
+ textChanges: [
1724
+ {
1725
+ changedText: "Test string",
1726
+ provenance: [
1727
+ {
1728
+ id: 42,
1729
+ parents: [
1730
+ {
1731
+ id: 42,
1732
+ index: 42,
1733
+ revision: 42,
1734
+ }
1735
+ ],
1736
+ revision: 42,
1737
+ type: "Test string",
1738
+ }
1739
+ ],
1740
+ textAnchor: {
1741
+ content: "Test string",
1742
+ textSegments: [
1743
+ {
1744
+ endIndex: "Test string",
1745
+ startIndex: "Test string",
1746
+ }
1747
+ ],
1748
+ },
1749
+ }
1750
+ ],
1751
+ textStyles: [
1752
+ {
1753
+ backgroundColor: {
1754
+ alpha: 42,
1755
+ blue: 42,
1756
+ green: 42,
1757
+ red: 42,
1758
+ },
1759
+ color: {
1760
+ alpha: 42,
1761
+ blue: 42,
1762
+ green: 42,
1763
+ red: 42,
1764
+ },
1765
+ fontSize: {
1766
+ size: 42,
1767
+ unit: "Test string",
1768
+ },
1769
+ fontWeight: "Test string",
1770
+ textAnchor: {
1771
+ content: "Test string",
1772
+ textSegments: [
1773
+ {
1774
+ endIndex: "Test string",
1775
+ startIndex: "Test string",
1776
+ }
1777
+ ],
1778
+ },
1779
+ textDecoration: "Test string",
1780
+ textStyle: "Test string",
1781
+ }
1782
+ ],
1783
+ uri: "Test string",
1784
+ },
1785
+ priority: "Test string",
1786
+ });
1787
+ /** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
1788
+ await gapi.client.documentai.projects.locations.processors.processorVersions.batchProcess({
1789
+ name: "Test string",
1790
+ }, {
1791
+ documentOutputConfig: {
1792
+ gcsOutputConfig: {
1793
+ gcsUri: "Test string",
1794
+ },
1795
+ },
1796
+ inputDocuments: {
1797
+ gcsDocuments: {
1798
+ documents: [
1799
+ {
1800
+ gcsUri: "Test string",
1801
+ mimeType: "Test string",
1802
+ }
1803
+ ],
1804
+ },
1805
+ gcsPrefix: {
1806
+ gcsUriPrefix: "Test string",
1807
+ },
1808
+ },
1809
+ skipHumanReview: true,
1810
+ });
1811
+ /** Deletes the processor version, all artifacts under the processor version will be deleted. */
1812
+ await gapi.client.documentai.projects.locations.processors.processorVersions.delete({
1813
+ name: "Test string",
1814
+ });
1815
+ /** Deploys the processor version. */
1816
+ await gapi.client.documentai.projects.locations.processors.processorVersions.deploy({
1817
+ name: "Test string",
1818
+ }, {
1819
+ });
1820
+ /** Gets a processor version detail. */
1821
+ await gapi.client.documentai.projects.locations.processors.processorVersions.get({
1822
+ name: "Test string",
1823
+ });
1824
+ /** Lists all versions of a processor. */
1825
+ await gapi.client.documentai.projects.locations.processors.processorVersions.list({
1826
+ pageSize: 42,
1827
+ pageToken: "Test string",
1828
+ parent: "Test string",
1829
+ });
1830
+ /** Processes a single document. */
1831
+ await gapi.client.documentai.projects.locations.processors.processorVersions.process({
1832
+ name: "Test string",
1833
+ }, {
1834
+ fieldMask: "Test string",
1835
+ inlineDocument: {
1836
+ content: "Test string",
1837
+ entities: [
1838
+ {
1839
+ confidence: 42,
1840
+ id: "Test string",
1841
+ mentionId: "Test string",
1842
+ mentionText: "Test string",
1843
+ nonPresent: true,
1844
+ normalizedValue: {
1845
+ addressValue: {
1846
+ addressLines: [
1847
+ "Test string"
1848
+ ],
1849
+ administrativeArea: "Test string",
1850
+ languageCode: "Test string",
1851
+ locality: "Test string",
1852
+ organization: "Test string",
1853
+ postalCode: "Test string",
1854
+ recipients: [
1855
+ "Test string"
1856
+ ],
1857
+ regionCode: "Test string",
1858
+ revision: 42,
1859
+ sortingCode: "Test string",
1860
+ sublocality: "Test string",
1861
+ },
1862
+ booleanValue: true,
1863
+ datetimeValue: {
1864
+ day: 42,
1865
+ hours: 42,
1866
+ minutes: 42,
1867
+ month: 42,
1868
+ nanos: 42,
1869
+ seconds: 42,
1870
+ timeZone: {
1871
+ id: "Test string",
1872
+ version: "Test string",
1873
+ },
1874
+ utcOffset: "Test string",
1875
+ year: 42,
1876
+ },
1877
+ dateValue: {
1878
+ day: 42,
1879
+ month: 42,
1880
+ year: 42,
1881
+ },
1882
+ floatValue: 42,
1883
+ integerValue: 42,
1884
+ moneyValue: {
1885
+ currencyCode: "Test string",
1886
+ nanos: 42,
1887
+ units: "Test string",
1888
+ },
1889
+ text: "Test string",
1890
+ },
1891
+ pageAnchor: {
1892
+ pageRefs: [
1893
+ {
1894
+ boundingPoly: {
1895
+ normalizedVertices: [
1896
+ {
1897
+ x: 42,
1898
+ y: 42,
1899
+ }
1900
+ ],
1901
+ vertices: [
1902
+ {
1903
+ x: 42,
1904
+ y: 42,
1905
+ }
1906
+ ],
1907
+ },
1908
+ confidence: 42,
1909
+ layoutId: "Test string",
1910
+ layoutType: "Test string",
1911
+ page: "Test string",
1912
+ }
1913
+ ],
1914
+ },
1915
+ properties: undefined,
1916
+ provenance: {
1917
+ id: 42,
1918
+ parents: [
1919
+ {
1920
+ id: 42,
1921
+ index: 42,
1922
+ revision: 42,
1923
+ }
1924
+ ],
1925
+ revision: 42,
1926
+ type: "Test string",
1927
+ },
1928
+ redacted: true,
1929
+ textAnchor: {
1930
+ content: "Test string",
1931
+ textSegments: [
1932
+ {
1933
+ endIndex: "Test string",
1934
+ startIndex: "Test string",
1935
+ }
1936
+ ],
1937
+ },
1938
+ type: "Test string",
1939
+ }
1940
+ ],
1941
+ entityRelations: [
1942
+ {
1943
+ objectId: "Test string",
1944
+ relation: "Test string",
1945
+ subjectId: "Test string",
1946
+ }
1947
+ ],
1948
+ error: {
1949
+ code: 42,
1950
+ details: [
1951
+ {
1952
+ A: 42
1953
+ }
1954
+ ],
1955
+ message: "Test string",
1956
+ },
1957
+ mimeType: "Test string",
1958
+ pages: [
1959
+ {
1960
+ blocks: [
1961
+ {
1962
+ detectedLanguages: [
1963
+ {
1964
+ confidence: 42,
1965
+ languageCode: "Test string",
1966
+ }
1967
+ ],
1968
+ layout: {
1969
+ boundingPoly: {
1970
+ normalizedVertices: [
1971
+ {
1972
+ x: 42,
1973
+ y: 42,
1974
+ }
1975
+ ],
1976
+ vertices: [
1977
+ {
1978
+ x: 42,
1979
+ y: 42,
1980
+ }
1981
+ ],
1982
+ },
1983
+ confidence: 42,
1984
+ orientation: "Test string",
1985
+ textAnchor: {
1986
+ content: "Test string",
1987
+ textSegments: [
1988
+ {
1989
+ endIndex: "Test string",
1990
+ startIndex: "Test string",
1991
+ }
1992
+ ],
1993
+ },
1994
+ },
1995
+ provenance: {
1996
+ id: 42,
1997
+ parents: [
1998
+ {
1999
+ id: 42,
2000
+ index: 42,
2001
+ revision: 42,
2002
+ }
2003
+ ],
2004
+ revision: 42,
2005
+ type: "Test string",
2006
+ },
2007
+ }
2008
+ ],
2009
+ detectedBarcodes: [
2010
+ {
2011
+ barcode: {
2012
+ format: "Test string",
2013
+ rawValue: "Test string",
2014
+ valueFormat: "Test string",
2015
+ },
2016
+ layout: {
2017
+ boundingPoly: {
2018
+ normalizedVertices: [
2019
+ {
2020
+ x: 42,
2021
+ y: 42,
2022
+ }
2023
+ ],
2024
+ vertices: [
2025
+ {
2026
+ x: 42,
2027
+ y: 42,
2028
+ }
2029
+ ],
2030
+ },
2031
+ confidence: 42,
2032
+ orientation: "Test string",
2033
+ textAnchor: {
2034
+ content: "Test string",
2035
+ textSegments: [
2036
+ {
2037
+ endIndex: "Test string",
2038
+ startIndex: "Test string",
2039
+ }
2040
+ ],
2041
+ },
2042
+ },
2043
+ }
2044
+ ],
2045
+ detectedLanguages: [
2046
+ {
2047
+ confidence: 42,
2048
+ languageCode: "Test string",
2049
+ }
2050
+ ],
2051
+ dimension: {
2052
+ height: 42,
2053
+ unit: "Test string",
2054
+ width: 42,
2055
+ },
2056
+ formFields: [
2057
+ {
2058
+ correctedKeyText: "Test string",
2059
+ correctedValueText: "Test string",
2060
+ fieldName: {
2061
+ boundingPoly: {
2062
+ normalizedVertices: [
2063
+ {
2064
+ x: 42,
2065
+ y: 42,
2066
+ }
2067
+ ],
2068
+ vertices: [
2069
+ {
2070
+ x: 42,
2071
+ y: 42,
2072
+ }
2073
+ ],
2074
+ },
2075
+ confidence: 42,
2076
+ orientation: "Test string",
2077
+ textAnchor: {
2078
+ content: "Test string",
2079
+ textSegments: [
2080
+ {
2081
+ endIndex: "Test string",
2082
+ startIndex: "Test string",
2083
+ }
2084
+ ],
2085
+ },
2086
+ },
2087
+ fieldValue: {
2088
+ boundingPoly: {
2089
+ normalizedVertices: [
2090
+ {
2091
+ x: 42,
2092
+ y: 42,
2093
+ }
2094
+ ],
2095
+ vertices: [
2096
+ {
2097
+ x: 42,
2098
+ y: 42,
2099
+ }
2100
+ ],
2101
+ },
2102
+ confidence: 42,
2103
+ orientation: "Test string",
2104
+ textAnchor: {
2105
+ content: "Test string",
2106
+ textSegments: [
2107
+ {
2108
+ endIndex: "Test string",
2109
+ startIndex: "Test string",
2110
+ }
2111
+ ],
2112
+ },
2113
+ },
2114
+ nameDetectedLanguages: [
2115
+ {
2116
+ confidence: 42,
2117
+ languageCode: "Test string",
2118
+ }
2119
+ ],
2120
+ provenance: {
2121
+ id: 42,
2122
+ parents: [
2123
+ {
2124
+ id: 42,
2125
+ index: 42,
2126
+ revision: 42,
2127
+ }
2128
+ ],
2129
+ revision: 42,
2130
+ type: "Test string",
2131
+ },
2132
+ valueDetectedLanguages: [
2133
+ {
2134
+ confidence: 42,
2135
+ languageCode: "Test string",
2136
+ }
2137
+ ],
2138
+ valueType: "Test string",
2139
+ }
2140
+ ],
2141
+ image: {
2142
+ content: "Test string",
2143
+ height: 42,
2144
+ mimeType: "Test string",
2145
+ width: 42,
2146
+ },
2147
+ layout: {
2148
+ boundingPoly: {
2149
+ normalizedVertices: [
2150
+ {
2151
+ x: 42,
2152
+ y: 42,
2153
+ }
2154
+ ],
2155
+ vertices: [
2156
+ {
2157
+ x: 42,
2158
+ y: 42,
2159
+ }
2160
+ ],
2161
+ },
2162
+ confidence: 42,
2163
+ orientation: "Test string",
2164
+ textAnchor: {
2165
+ content: "Test string",
2166
+ textSegments: [
2167
+ {
2168
+ endIndex: "Test string",
2169
+ startIndex: "Test string",
2170
+ }
2171
+ ],
2172
+ },
2173
+ },
2174
+ lines: [
2175
+ {
2176
+ detectedLanguages: [
2177
+ {
2178
+ confidence: 42,
2179
+ languageCode: "Test string",
2180
+ }
2181
+ ],
2182
+ layout: {
2183
+ boundingPoly: {
2184
+ normalizedVertices: [
2185
+ {
2186
+ x: 42,
2187
+ y: 42,
2188
+ }
2189
+ ],
2190
+ vertices: [
2191
+ {
2192
+ x: 42,
2193
+ y: 42,
2194
+ }
2195
+ ],
2196
+ },
2197
+ confidence: 42,
2198
+ orientation: "Test string",
2199
+ textAnchor: {
2200
+ content: "Test string",
2201
+ textSegments: [
2202
+ {
2203
+ endIndex: "Test string",
2204
+ startIndex: "Test string",
2205
+ }
2206
+ ],
2207
+ },
2208
+ },
2209
+ provenance: {
2210
+ id: 42,
2211
+ parents: [
2212
+ {
2213
+ id: 42,
2214
+ index: 42,
2215
+ revision: 42,
2216
+ }
2217
+ ],
2218
+ revision: 42,
2219
+ type: "Test string",
2220
+ },
2221
+ }
2222
+ ],
2223
+ pageNumber: 42,
2224
+ paragraphs: [
2225
+ {
2226
+ detectedLanguages: [
2227
+ {
2228
+ confidence: 42,
2229
+ languageCode: "Test string",
2230
+ }
2231
+ ],
2232
+ layout: {
2233
+ boundingPoly: {
2234
+ normalizedVertices: [
2235
+ {
2236
+ x: 42,
2237
+ y: 42,
2238
+ }
2239
+ ],
2240
+ vertices: [
2241
+ {
2242
+ x: 42,
2243
+ y: 42,
2244
+ }
2245
+ ],
2246
+ },
2247
+ confidence: 42,
2248
+ orientation: "Test string",
2249
+ textAnchor: {
2250
+ content: "Test string",
2251
+ textSegments: [
2252
+ {
2253
+ endIndex: "Test string",
2254
+ startIndex: "Test string",
2255
+ }
2256
+ ],
2257
+ },
2258
+ },
2259
+ provenance: {
2260
+ id: 42,
2261
+ parents: [
2262
+ {
2263
+ id: 42,
2264
+ index: 42,
2265
+ revision: 42,
2266
+ }
2267
+ ],
2268
+ revision: 42,
2269
+ type: "Test string",
2270
+ },
2271
+ }
2272
+ ],
2273
+ provenance: {
2274
+ id: 42,
2275
+ parents: [
2276
+ {
2277
+ id: 42,
2278
+ index: 42,
2279
+ revision: 42,
2280
+ }
2281
+ ],
2282
+ revision: 42,
2283
+ type: "Test string",
2284
+ },
2285
+ symbols: [
2286
+ {
2287
+ detectedLanguages: [
2288
+ {
2289
+ confidence: 42,
2290
+ languageCode: "Test string",
2291
+ }
2292
+ ],
2293
+ layout: {
2294
+ boundingPoly: {
2295
+ normalizedVertices: [
2296
+ {
2297
+ x: 42,
2298
+ y: 42,
2299
+ }
2300
+ ],
2301
+ vertices: [
2302
+ {
2303
+ x: 42,
2304
+ y: 42,
2305
+ }
2306
+ ],
2307
+ },
2308
+ confidence: 42,
2309
+ orientation: "Test string",
2310
+ textAnchor: {
2311
+ content: "Test string",
2312
+ textSegments: [
2313
+ {
2314
+ endIndex: "Test string",
2315
+ startIndex: "Test string",
2316
+ }
2317
+ ],
2318
+ },
2319
+ },
2320
+ }
2321
+ ],
2322
+ tables: [
2323
+ {
2324
+ bodyRows: [
2325
+ {
2326
+ cells: [
2327
+ {
2328
+ colSpan: 42,
2329
+ detectedLanguages: [
2330
+ {
2331
+ confidence: 42,
2332
+ languageCode: "Test string",
2333
+ }
2334
+ ],
2335
+ layout: {
2336
+ boundingPoly: {
2337
+ normalizedVertices: [
2338
+ {
2339
+ x: 42,
2340
+ y: 42,
2341
+ }
2342
+ ],
2343
+ vertices: [
2344
+ {
2345
+ x: 42,
2346
+ y: 42,
2347
+ }
2348
+ ],
2349
+ },
2350
+ confidence: 42,
2351
+ orientation: "Test string",
2352
+ textAnchor: {
2353
+ content: "Test string",
2354
+ textSegments: [
2355
+ {
2356
+ endIndex: "Test string",
2357
+ startIndex: "Test string",
2358
+ }
2359
+ ],
2360
+ },
2361
+ },
2362
+ rowSpan: 42,
2363
+ }
2364
+ ],
2365
+ }
2366
+ ],
2367
+ detectedLanguages: [
2368
+ {
2369
+ confidence: 42,
2370
+ languageCode: "Test string",
2371
+ }
2372
+ ],
2373
+ headerRows: [
2374
+ {
2375
+ cells: [
2376
+ {
2377
+ colSpan: 42,
2378
+ detectedLanguages: [
2379
+ {
2380
+ confidence: 42,
2381
+ languageCode: "Test string",
2382
+ }
2383
+ ],
2384
+ layout: {
2385
+ boundingPoly: {
2386
+ normalizedVertices: [
2387
+ {
2388
+ x: 42,
2389
+ y: 42,
2390
+ }
2391
+ ],
2392
+ vertices: [
2393
+ {
2394
+ x: 42,
2395
+ y: 42,
2396
+ }
2397
+ ],
2398
+ },
2399
+ confidence: 42,
2400
+ orientation: "Test string",
2401
+ textAnchor: {
2402
+ content: "Test string",
2403
+ textSegments: [
2404
+ {
2405
+ endIndex: "Test string",
2406
+ startIndex: "Test string",
2407
+ }
2408
+ ],
2409
+ },
2410
+ },
2411
+ rowSpan: 42,
2412
+ }
2413
+ ],
2414
+ }
2415
+ ],
2416
+ layout: {
2417
+ boundingPoly: {
2418
+ normalizedVertices: [
2419
+ {
2420
+ x: 42,
2421
+ y: 42,
2422
+ }
2423
+ ],
2424
+ vertices: [
2425
+ {
2426
+ x: 42,
2427
+ y: 42,
2428
+ }
2429
+ ],
2430
+ },
2431
+ confidence: 42,
2432
+ orientation: "Test string",
2433
+ textAnchor: {
2434
+ content: "Test string",
2435
+ textSegments: [
2436
+ {
2437
+ endIndex: "Test string",
2438
+ startIndex: "Test string",
2439
+ }
2440
+ ],
2441
+ },
2442
+ },
2443
+ }
2444
+ ],
2445
+ tokens: [
2446
+ {
2447
+ detectedBreak: {
2448
+ type: "Test string",
2449
+ },
2450
+ detectedLanguages: [
2451
+ {
2452
+ confidence: 42,
2453
+ languageCode: "Test string",
2454
+ }
2455
+ ],
2456
+ layout: {
2457
+ boundingPoly: {
2458
+ normalizedVertices: [
2459
+ {
2460
+ x: 42,
2461
+ y: 42,
2462
+ }
2463
+ ],
2464
+ vertices: [
2465
+ {
2466
+ x: 42,
2467
+ y: 42,
2468
+ }
2469
+ ],
2470
+ },
2471
+ confidence: 42,
2472
+ orientation: "Test string",
2473
+ textAnchor: {
2474
+ content: "Test string",
2475
+ textSegments: [
2476
+ {
2477
+ endIndex: "Test string",
2478
+ startIndex: "Test string",
2479
+ }
2480
+ ],
2481
+ },
2482
+ },
2483
+ provenance: {
2484
+ id: 42,
2485
+ parents: [
2486
+ {
2487
+ id: 42,
2488
+ index: 42,
2489
+ revision: 42,
2490
+ }
2491
+ ],
2492
+ revision: 42,
2493
+ type: "Test string",
2494
+ },
2495
+ }
2496
+ ],
2497
+ transforms: [
2498
+ {
2499
+ cols: 42,
2500
+ data: "Test string",
2501
+ rows: 42,
2502
+ type: 42,
2503
+ }
2504
+ ],
2505
+ visualElements: [
2506
+ {
2507
+ detectedLanguages: [
2508
+ {
2509
+ confidence: 42,
2510
+ languageCode: "Test string",
2511
+ }
2512
+ ],
2513
+ layout: {
2514
+ boundingPoly: {
2515
+ normalizedVertices: [
2516
+ {
2517
+ x: 42,
2518
+ y: 42,
2519
+ }
2520
+ ],
2521
+ vertices: [
2522
+ {
2523
+ x: 42,
2524
+ y: 42,
2525
+ }
2526
+ ],
2527
+ },
2528
+ confidence: 42,
2529
+ orientation: "Test string",
2530
+ textAnchor: {
2531
+ content: "Test string",
2532
+ textSegments: [
2533
+ {
2534
+ endIndex: "Test string",
2535
+ startIndex: "Test string",
2536
+ }
2537
+ ],
2538
+ },
2539
+ },
2540
+ type: "Test string",
2541
+ }
2542
+ ],
2543
+ }
2544
+ ],
2545
+ revisions: [
2546
+ {
2547
+ agent: "Test string",
2548
+ createTime: "Test string",
2549
+ humanReview: {
2550
+ state: "Test string",
2551
+ stateMessage: "Test string",
2552
+ },
2553
+ id: "Test string",
2554
+ parent: [
2555
+ 42
2556
+ ],
2557
+ parentIds: [
2558
+ "Test string"
2559
+ ],
2560
+ processor: "Test string",
2561
+ }
2562
+ ],
2563
+ shardInfo: {
2564
+ shardCount: "Test string",
2565
+ shardIndex: "Test string",
2566
+ textOffset: "Test string",
2567
+ },
2568
+ text: "Test string",
2569
+ textChanges: [
2570
+ {
2571
+ changedText: "Test string",
2572
+ provenance: [
2573
+ {
2574
+ id: 42,
2575
+ parents: [
2576
+ {
2577
+ id: 42,
2578
+ index: 42,
2579
+ revision: 42,
2580
+ }
2581
+ ],
2582
+ revision: 42,
2583
+ type: "Test string",
2584
+ }
2585
+ ],
2586
+ textAnchor: {
2587
+ content: "Test string",
2588
+ textSegments: [
2589
+ {
2590
+ endIndex: "Test string",
2591
+ startIndex: "Test string",
2592
+ }
2593
+ ],
2594
+ },
2595
+ }
2596
+ ],
2597
+ textStyles: [
2598
+ {
2599
+ backgroundColor: {
2600
+ alpha: 42,
2601
+ blue: 42,
2602
+ green: 42,
2603
+ red: 42,
2604
+ },
2605
+ color: {
2606
+ alpha: 42,
2607
+ blue: 42,
2608
+ green: 42,
2609
+ red: 42,
2610
+ },
2611
+ fontSize: {
2612
+ size: 42,
2613
+ unit: "Test string",
2614
+ },
2615
+ fontWeight: "Test string",
2616
+ textAnchor: {
2617
+ content: "Test string",
2618
+ textSegments: [
2619
+ {
2620
+ endIndex: "Test string",
2621
+ startIndex: "Test string",
2622
+ }
2623
+ ],
2624
+ },
2625
+ textDecoration: "Test string",
2626
+ textStyle: "Test string",
2627
+ }
2628
+ ],
2629
+ uri: "Test string",
2630
+ },
2631
+ rawDocument: {
2632
+ content: "Test string",
2633
+ mimeType: "Test string",
2634
+ },
2635
+ skipHumanReview: true,
2636
+ });
2637
+ /** Undeploys the processor version. */
2638
+ await gapi.client.documentai.projects.locations.processors.processorVersions.undeploy({
2639
+ name: "Test string",
2640
+ }, {
2641
+ });
2642
+ /** Lists the processor types that exist. */
2643
+ await gapi.client.documentai.projects.locations.processorTypes.list({
2644
+ pageSize: 42,
2645
+ pageToken: "Test string",
2646
+ parent: "Test string",
2647
+ });
2648
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
2649
+ await gapi.client.documentai.projects.operations.get({
2650
+ name: "Test string",
2651
+ });
2652
+ /** Gets information about a location. */
2653
+ await gapi.client.documentai.uiv1beta3.projects.locations.get({
2654
+ name: "Test string",
2655
+ });
2656
+ /** Lists information about the supported locations for this service. */
2657
+ await gapi.client.documentai.uiv1beta3.projects.locations.list({
2658
+ filter: "Test string",
2659
+ name: "Test string",
2660
+ pageSize: 42,
2661
+ pageToken: "Test string",
2662
+ });
2663
+ /**
2664
+ * Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this
2665
+ * method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation
2666
+ * completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of
2667
+ * 1, corresponding to `Code.CANCELLED`.
2668
+ */
2669
+ await gapi.client.documentai.uiv1beta3.projects.locations.operations.cancel({
2670
+ name: "Test string",
2671
+ });
2672
+ /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
2673
+ await gapi.client.documentai.uiv1beta3.projects.locations.operations.get({
2674
+ name: "Test string",
2675
+ });
2676
+ /**
2677
+ * Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
2678
+ * override the binding to use different resource name schemes, such as `users/*‍/operations`. To override the binding, API services can add a binding such as
2679
+ * `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
2680
+ * ensure the name binding is the parent resource, without the operations collection id.
2681
+ */
2682
+ await gapi.client.documentai.uiv1beta3.projects.locations.operations.list({
2683
+ filter: "Test string",
2684
+ name: "Test string",
2685
+ pageSize: 42,
2686
+ pageToken: "Test string",
2687
+ });
2688
+ }
2689
+ });