-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
index.ts
914 lines (816 loc) · 32.2 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
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
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
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
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
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
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreHttp from "@azure/core-http";
/** Request parameter to train a new custom model. */
export interface TrainRequest {
/** Source path containing the training documents. */
source: string;
/** Filter to apply to the documents in the source path for training. */
sourceFilter?: TrainSourceFilter;
/** Use label file for training a model. */
useLabelFile?: boolean;
/** Optional user defined model name (max length: 1024). */
modelName?: string;
}
/** Filter to apply to the documents in the source path for training. */
export interface TrainSourceFilter {
/** A case-sensitive prefix string to filter documents in the source path for training. For example, when using a Azure storage blob Uri, use the prefix to restrict sub folders for training. */
prefix?: string;
/** A flag to indicate if sub folders within the set of prefix folders will also need to be included when searching for content to be preprocessed. */
includeSubfolders?: boolean;
}
export interface ErrorResponse {
error: ErrorInformation;
}
export interface ErrorInformation {
code: string;
message: string;
}
/** Response to the get custom model operation. */
export interface Model {
/** Basic custom model information. */
modelInfo: ModelInfo;
/** Keys extracted by the custom model. */
keys?: KeysResult;
/** Training result for custom model. */
trainResult?: TrainResult;
/** Training result for composed model. */
composedTrainResults?: TrainResult[];
}
/** Basic custom model information. */
export interface ModelInfo {
/** Model identifier. */
modelId: string;
/** Status of the model. */
status: ModelStatus;
/** Date and time (UTC) when the model was created. */
trainingStartedOn: Date;
/** Date and time (UTC) when the status was last updated. */
trainingCompletedOn: Date;
/** Optional user defined model name (max length: 1024). */
modelName?: string;
/** Optional model attributes. */
attributes?: Attributes;
}
/** Optional model attributes. */
export interface Attributes {
/** Is this model composed? (default: false). */
isComposed?: boolean;
}
/** Keys extracted by the custom model. */
export interface KeysResult {
/** Object mapping clusterIds to a list of keys. */
clusters: { [propertyName: string]: string[] };
}
/** Custom model training result. */
export interface TrainResult {
/** List of the documents used to train the model and any errors reported in each document. */
trainingDocuments: TrainingDocumentInfo[];
/** List of fields used to train the model and the train operation error reported by each. */
fields?: FormFieldsReport[];
/** Average accuracy. */
averageModelAccuracy?: number;
/** Model identifier. */
modelId?: string;
/** Errors returned during the training operation. */
errors?: ErrorInformation[];
}
/** Report for a custom model training document. */
export interface TrainingDocumentInfo {
/** Training document name. */
name: string;
/** Total number of pages trained. */
pageCount: number;
/** List of errors. */
errors: ErrorInformation[];
/** Status of the training operation. */
status: TrainStatus;
}
/** Report for a custom model training field. */
export interface FormFieldsReport {
/** Training field name. */
fieldName: string;
/** Estimated extraction accuracy for this field. */
accuracy: number;
}
/** Uri or local path to source data. */
export interface SourcePath {
/** File source path. */
source?: string;
}
/** Status and result of the queued analyze operation. */
export interface AnalyzeOperationResult {
/** Operation status. */
status: OperationStatus;
/** Date and time (UTC) when the analyze operation was submitted. */
createdOn: Date;
/** Date and time (UTC) when the status was last updated. */
lastModified: Date;
/** Results of the analyze operation. */
analyzeResult?: AnalyzeResult;
}
/** Analyze operation result. */
export interface AnalyzeResult {
/** Version of schema used for this result. */
version: string;
/** Text extracted from the input. */
readResults: ReadResult[];
/** Page-level information extracted from the input. */
pageResults?: PageResult[];
/** Document-level information extracted from the input. */
documentResults?: DocumentResult[];
/** List of errors reported during the analyze operation. */
errors?: ErrorInformation[];
}
/** Text extracted from a page in the input document. */
export interface ReadResult {
/** The 1-based page number in the input document. */
pageNumber: number;
/** The general orientation of the text in clockwise direction, measured in degrees between (-180, 180]. */
angle: number;
/** The width of the image/PDF in pixels/inches, respectively. */
width: number;
/** The height of the image/PDF in pixels/inches, respectively. */
height: number;
/** The unit used by the width, height and boundingBox properties. For images, the unit is "pixel". For PDF, the unit is "inch". */
unit: LengthUnit;
/** The detected language on the page overall. */
language?: Language;
/** When includeTextDetails is set to true, a list of recognized text lines. The maximum number of lines returned is 300 per page. The lines are sorted top to bottom, left to right, although in certain cases proximity is treated with higher priority. As the sorting order depends on the detected text, it may change across images and OCR version updates. Thus, business logic should be built upon the actual line location instead of order. */
lines?: TextLine[];
/** List of selection marks extracted from the page. */
selectionMarks?: SelectionMark[];
}
/** An object representing an extracted text line. */
export interface TextLine {
/** The text content of the line. */
text: string;
/** Bounding box of an extracted line. */
boundingBox: number[];
/** The detected language of this line, if different from the overall page language. */
language?: Language;
/** List of words in the text line. */
words: TextWord[];
/** Text appearance properties. */
appearance?: TextAppearance;
}
/** An object representing a word. */
export interface TextWord {
/** The text content of the word. */
text: string;
/** Bounding box of an extracted word. */
boundingBox: number[];
/** Confidence value. */
confidence?: number;
}
/** An object representing the appearance of the text line. */
export interface TextAppearance {
/** An object representing the style of the text line. */
style: TextStyle;
}
/** An object representing the style of the text line. */
export interface TextStyle {
/** The text line style name, including handwriting and other. */
name: StyleName;
/** The confidence of text line style. */
confidence: number;
}
/** Information about the extracted selection mark. */
export interface SelectionMark {
/** Bounding box of the selection mark. */
boundingBox: number[];
/** Confidence value. */
confidence: number;
/** State of the selection mark. */
state: SelectionMarkState;
}
/** Extracted information from a single page. */
export interface PageResult {
/** Page number. */
pageNumber: number;
/** Cluster identifier. */
clusterId?: number;
/** List of key-value pairs extracted from the page. */
keyValuePairs?: KeyValuePair[];
/** List of data tables extracted from the page. */
tables?: DataTable[];
}
/** Information about the extracted key-value pair. */
export interface KeyValuePair {
/** A user defined label for the key/value pair entry. */
label?: string;
/** Information about the extracted key in a key-value pair. */
key: KeyValueElement;
/** Information about the extracted value in a key-value pair. */
value: KeyValueElement;
/** Confidence value. */
confidence: number;
}
/** Information about the extracted key or value in a key-value pair. */
export interface KeyValueElement {
/** Semantic data type of the key value element. */
type?: KeyValueType;
/** The text content of the key or value. */
text: string;
/** Bounding box of the key or value. */
boundingBox?: number[];
/** When includeTextDetails is set to true, a list of references to the text elements constituting this key or value. */
elements?: string[];
}
/** Information about the extracted table contained in a page. */
export interface DataTable {
/** Number of rows. */
rows: number;
/** Number of columns. */
columns: number;
/** List of cells contained in the table. */
cells: DataTableCell[];
/** Bounding box of the table. */
boundingBox: number[];
}
/** Information about the extracted cell in a table. */
export interface DataTableCell {
/** Row index of the cell. */
rowIndex: number;
/** Column index of the cell. */
columnIndex: number;
/** Number of rows spanned by this cell. */
rowSpan?: number;
/** Number of columns spanned by this cell. */
columnSpan?: number;
/** Text content of the cell. */
text: string;
/** Bounding box of the cell. */
boundingBox: number[];
/** Confidence value. */
confidence: number;
/** When includeTextDetails is set to true, a list of references to the text elements constituting this table cell. */
elements?: string[];
/** Is the current cell a header cell? */
isHeader?: boolean;
/** Is the current cell a footer cell? */
isFooter?: boolean;
}
/** A set of extracted fields corresponding to the input document. */
export interface DocumentResult {
/** Document type. */
docType: string;
/** Model identifier. */
modelId?: string;
/** First and last page number where the document is found. */
pageRange: number[];
/** Predicted document type confidence. */
docTypeConfidence?: number;
/** Dictionary of named field values. */
fields: { [propertyName: string]: FieldValue };
}
/** Recognized field value. */
export interface FieldValue {
/** Type of field value. */
type: FieldValueType;
/** String value. */
valueString?: string;
/** Date value. */
valueDate?: Date;
/**
* Time value.
* This value should be an ISO-8601 formatted string representing time. E.g. "HH:MM:SS" or "HH:MM:SS.mm".
*/
valueTime?: string;
/** Phone number value. */
valuePhoneNumber?: string;
/** Floating point value. */
valueNumber?: number;
/** Integer value. */
valueInteger?: number;
/** Array of field values. */
valueArray?: FieldValue[];
/** Dictionary of named field values. */
valueObject?: { [propertyName: string]: FieldValue };
/** Selection mark value. */
valueSelectionMark?: FieldValueSelectionMark;
/** Text content of the extracted field. */
text?: string;
/** Bounding box of the field value, if appropriate. */
boundingBox?: number[];
/** Confidence score. */
confidence?: number;
/** When includeTextDetails is set to true, a list of references to the text elements constituting this field. */
elements?: string[];
/** The 1-based page number in the input document. */
pageNumber?: number;
}
/** Request parameter to copy an existing custom model from the source resource to a target resource referenced by the resource ID. */
export interface CopyRequest {
/** Azure Resource Id of the target Form Recognizer resource where the model is copied to. */
targetResourceId: string;
/** Location of the target Azure resource. A valid Azure region name supported by Cognitive Services. */
targetResourceRegion: string;
/** Entity that encodes claims to authorize the copy request. */
copyAuthorization: CopyAuthorizationResult;
}
/** Request parameter that contains authorization claims for copy operation. */
export interface CopyAuthorizationResult {
/** Model identifier. */
modelId: string;
/** Token claim used to authorize the request. */
accessToken: string;
/** The time when the access token expires. The date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC until the expiration time. */
expirationDateTimeTicks: number;
}
/** Status and result of the queued copy operation. */
export interface CopyOperationResult {
/** Operation status. */
status: OperationStatus;
/** Date and time (UTC) when the copy operation was submitted. */
createdOn: Date;
/** Date and time (UTC) when the status was last updated. */
lastModified: Date;
/** Results of the copy operation. */
copyResult?: CopyResult;
}
/** Custom model copy result. */
export interface CopyResult {
/** Identifier of the target model. */
modelId: string;
/** Errors returned during the copy operation. */
errors?: ErrorInformation[];
}
/** Request contract for compose operation. */
export interface ComposeRequest {
/** List of model ids to compose. */
modelIds: string[];
/** Optional user defined model name (max length: 1024). */
modelName?: string;
}
/** Response to the list custom models operation. */
export interface Models {
/** Summary of all trained custom models. */
summary?: ModelsSummary;
/** Collection of trained custom models. */
modelList?: ModelInfo[];
/** Link to the next page of custom models. */
nextLink?: string;
}
/** Summary of all trained custom models. */
export interface ModelsSummary {
/** Current count of trained custom models. */
count: number;
/** Max number of models that can be trained for this account. */
limit: number;
/** Date and time (UTC) when the summary was last updated. */
lastModified: Date;
}
/** Defines headers for GeneratedClient_trainCustomModelAsync operation. */
export interface GeneratedClientTrainCustomModelAsyncHeaders {
/** Location and ID of the model being trained. The status of model training is specified in the status property at the model location. */
location?: string;
}
/** Defines headers for GeneratedClient_analyzeWithCustomModel operation. */
export interface GeneratedClientAnalyzeWithCustomModelHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the analyze operation. */
operationLocation?: string;
}
/** Defines headers for GeneratedClient_copyCustomModel operation. */
export interface GeneratedClientCopyCustomModelHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the copy operation. */
operationLocation?: string;
}
/** Defines headers for GeneratedClient_generateModelCopyAuthorization operation. */
export interface GeneratedClientGenerateModelCopyAuthorizationHeaders {
/** Location and ID of the model being copied. The status of model copy is specified in the status property at the model location. */
location?: string;
}
/** Defines headers for GeneratedClient_composeCustomModelsAsync operation. */
export interface GeneratedClientComposeCustomModelsAsyncHeaders {
/** Location and ID of the composed model. The status of composed model is specified in the status property at the model location. */
location?: string;
}
/** Defines headers for GeneratedClient_analyzeBusinessCardAsync operation. */
export interface GeneratedClientAnalyzeBusinessCardAsyncHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the analyze operation. */
operationLocation?: string;
}
/** Defines headers for GeneratedClient_analyzeInvoiceAsync operation. */
export interface GeneratedClientAnalyzeInvoiceAsyncHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the analyze operation. */
operationLocation?: string;
}
/** Defines headers for GeneratedClient_analyzeReceiptAsync operation. */
export interface GeneratedClientAnalyzeReceiptAsyncHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the analyze operation. */
operationLocation?: string;
}
/** Defines headers for GeneratedClient_analyzeLayoutAsync operation. */
export interface GeneratedClientAnalyzeLayoutAsyncHeaders {
/** URL containing the resultId used to track the progress and obtain the result of the analyze operation. */
operationLocation?: string;
}
/** Known values of {@link Language} that the service accepts. */
export const enum KnownLanguage {
En = "en",
Es = "es",
De = "de",
Fr = "fr",
It = "it",
Nl = "nl",
Pt = "pt",
ZhHans = "zh-Hans"
}
/**
* Defines values for Language. \
* {@link KnownLanguage} can be used interchangeably with Language,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **en** \
* **es** \
* **de** \
* **fr** \
* **it** \
* **nl** \
* **pt** \
* **zh-Hans**
*/
export type Language = string;
/** Known values of {@link StyleName} that the service accepts. */
export const enum KnownStyleName {
Other = "other",
Handwriting = "handwriting"
}
/**
* Defines values for StyleName. \
* {@link KnownStyleName} can be used interchangeably with StyleName,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **other** \
* **handwriting**
*/
export type StyleName = string;
/** Known values of {@link SelectionMarkState} that the service accepts. */
export const enum KnownSelectionMarkState {
Selected = "selected",
Unselected = "unselected"
}
/**
* Defines values for SelectionMarkState. \
* {@link KnownSelectionMarkState} can be used interchangeably with SelectionMarkState,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **selected** \
* **unselected**
*/
export type SelectionMarkState = string;
/** Known values of {@link KeyValueType} that the service accepts. */
export const enum KnownKeyValueType {
String = "string",
SelectionMark = "selectionMark"
}
/**
* Defines values for KeyValueType. \
* {@link KnownKeyValueType} can be used interchangeably with KeyValueType,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **string** \
* **selectionMark**
*/
export type KeyValueType = string;
/** Known values of {@link FieldValueSelectionMark} that the service accepts. */
export const enum KnownFieldValueSelectionMark {
Selected = "selected",
Unselected = "unselected"
}
/**
* Defines values for FieldValueSelectionMark. \
* {@link KnownFieldValueSelectionMark} can be used interchangeably with FieldValueSelectionMark,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **selected** \
* **unselected**
*/
export type FieldValueSelectionMark = string;
/** Known values of {@link Locale} that the service accepts. */
export const enum KnownLocale {
EnAU = "en-AU",
EnCA = "en-CA",
EnGB = "en-GB",
EnIN = "en-IN",
EnUS = "en-US"
}
/**
* Defines values for Locale. \
* {@link KnownLocale} can be used interchangeably with Locale,
* this enum contains the known values that the service supports.
* ### Know values supported by the service
* **en-AU** \
* **en-CA** \
* **en-GB** \
* **en-IN** \
* **en-US**
*/
export type Locale = string;
/** Defines values for ModelStatus. */
export type ModelStatus = "creating" | "ready" | "invalid";
/** Defines values for TrainStatus. */
export type TrainStatus = "succeeded" | "partiallySucceeded" | "failed";
/** Defines values for ContentType. */
export type ContentType =
| "application/pdf"
| "image/bmp"
| "image/jpeg"
| "image/png"
| "image/tiff";
/** Defines values for OperationStatus. */
export type OperationStatus = "notStarted" | "running" | "succeeded" | "failed";
/** Defines values for LengthUnit. */
export type LengthUnit = "pixel" | "inch";
/** Defines values for FieldValueType. */
export type FieldValueType =
| "string"
| "date"
| "time"
| "phoneNumber"
| "number"
| "integer"
| "array"
| "object"
| "selectionMark";
/** Contains response data for the trainCustomModelAsync operation. */
export type GeneratedClientTrainCustomModelAsyncResponse = GeneratedClientTrainCustomModelAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientTrainCustomModelAsyncHeaders;
};
};
/** Optional parameters. */
export interface GeneratedClientGetCustomModelOptionalParams
extends coreHttp.OperationOptions {
/** Include list of extracted keys in model information. */
includeKeys?: boolean;
}
/** Contains response data for the getCustomModel operation. */
export type GeneratedClientGetCustomModelResponse = Model & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: Model;
};
};
/** Optional parameters. */
export interface GeneratedClientAnalyzeWithCustomModel$binaryOptionalParams
extends coreHttp.OperationOptions {
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
}
/** Optional parameters. */
export interface GeneratedClientAnalyzeWithCustomModel$jsonOptionalParams
extends coreHttp.OperationOptions {
/** .json, .pdf, .jpg, .png or .tiff type file stream. */
fileStream?: SourcePath;
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
}
/** Contains response data for the analyzeWithCustomModel operation. */
export type GeneratedClientAnalyzeWithCustomModelResponse = GeneratedClientAnalyzeWithCustomModelHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientAnalyzeWithCustomModelHeaders;
};
};
/** Contains response data for the getAnalyzeFormResult operation. */
export type GeneratedClientGetAnalyzeFormResultResponse = AnalyzeOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: AnalyzeOperationResult;
};
};
/** Contains response data for the copyCustomModel operation. */
export type GeneratedClientCopyCustomModelResponse = GeneratedClientCopyCustomModelHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientCopyCustomModelHeaders;
};
};
/** Contains response data for the getCustomModelCopyResult operation. */
export type GeneratedClientGetCustomModelCopyResultResponse = CopyOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: CopyOperationResult;
};
};
/** Contains response data for the generateModelCopyAuthorization operation. */
export type GeneratedClientGenerateModelCopyAuthorizationResponse = GeneratedClientGenerateModelCopyAuthorizationHeaders &
CopyAuthorizationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: CopyAuthorizationResult;
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientGenerateModelCopyAuthorizationHeaders;
};
};
/** Contains response data for the composeCustomModelsAsync operation. */
export type GeneratedClientComposeCustomModelsAsyncResponse = GeneratedClientComposeCustomModelsAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientComposeCustomModelsAsyncHeaders;
};
};
/** Optional parameters. */
export interface GeneratedClientAnalyzeBusinessCardAsync$binaryOptionalParams
extends coreHttp.OperationOptions {
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Optional parameters. */
export interface GeneratedClientAnalyzeBusinessCardAsync$jsonOptionalParams
extends coreHttp.OperationOptions {
/** .json, .pdf, .jpg, .png or .tiff type file stream. */
fileStream?: SourcePath;
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Contains response data for the analyzeBusinessCardAsync operation. */
export type GeneratedClientAnalyzeBusinessCardAsyncResponse = GeneratedClientAnalyzeBusinessCardAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientAnalyzeBusinessCardAsyncHeaders;
};
};
/** Contains response data for the getAnalyzeBusinessCardResult operation. */
export type GeneratedClientGetAnalyzeBusinessCardResultResponse = AnalyzeOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: AnalyzeOperationResult;
};
};
/** Optional parameters. */
export interface GeneratedClientAnalyzeInvoiceAsync$binaryOptionalParams
extends coreHttp.OperationOptions {
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Optional parameters. */
export interface GeneratedClientAnalyzeInvoiceAsync$jsonOptionalParams
extends coreHttp.OperationOptions {
/** .json, .pdf, .jpg, .png or .tiff type file stream. */
fileStream?: SourcePath;
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Contains response data for the analyzeInvoiceAsync operation. */
export type GeneratedClientAnalyzeInvoiceAsyncResponse = GeneratedClientAnalyzeInvoiceAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientAnalyzeInvoiceAsyncHeaders;
};
};
/** Contains response data for the getAnalyzeInvoiceResult operation. */
export type GeneratedClientGetAnalyzeInvoiceResultResponse = AnalyzeOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: AnalyzeOperationResult;
};
};
/** Optional parameters. */
export interface GeneratedClientAnalyzeReceiptAsync$binaryOptionalParams
extends coreHttp.OperationOptions {
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Optional parameters. */
export interface GeneratedClientAnalyzeReceiptAsync$jsonOptionalParams
extends coreHttp.OperationOptions {
/** .json, .pdf, .jpg, .png or .tiff type file stream. */
fileStream?: SourcePath;
/** Include text lines and element references in the result. */
includeTextDetails?: boolean;
/** Locale of the input document. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US(default). */
locale?: Locale;
}
/** Contains response data for the analyzeReceiptAsync operation. */
export type GeneratedClientAnalyzeReceiptAsyncResponse = GeneratedClientAnalyzeReceiptAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientAnalyzeReceiptAsyncHeaders;
};
};
/** Contains response data for the getAnalyzeReceiptResult operation. */
export type GeneratedClientGetAnalyzeReceiptResultResponse = AnalyzeOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: AnalyzeOperationResult;
};
};
/** Optional parameters. */
export interface GeneratedClientAnalyzeLayoutAsync$binaryOptionalParams
extends coreHttp.OperationOptions {
/** The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt'), simplified Chinese ('zh-Hans') and Spanish ('es') are supported (print – nine languages and handwritten – English only). Layout supports auto language identification and multi language documents, so only provide a language code if you would like to force the documented to be processed as that specific language. */
language?: Language;
/** Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR result. For a range of pages, use a hyphen. Separate each page or range with a comma or space. */
pages?: string[];
}
/** Optional parameters. */
export interface GeneratedClientAnalyzeLayoutAsync$jsonOptionalParams
extends coreHttp.OperationOptions {
/** .json, .pdf, .jpg, .png or .tiff type file stream. */
fileStream?: SourcePath;
/** The BCP-47 language code of the text in the document. Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German (‘de’), Italian (‘it’), Portuguese (‘pt'), simplified Chinese ('zh-Hans') and Spanish ('es') are supported (print – nine languages and handwritten – English only). Layout supports auto language identification and multi language documents, so only provide a language code if you would like to force the documented to be processed as that specific language. */
language?: Language;
/** Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR result. For a range of pages, use a hyphen. Separate each page or range with a comma or space. */
pages?: string[];
}
/** Contains response data for the analyzeLayoutAsync operation. */
export type GeneratedClientAnalyzeLayoutAsyncResponse = GeneratedClientAnalyzeLayoutAsyncHeaders & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The parsed HTTP response headers. */
parsedHeaders: GeneratedClientAnalyzeLayoutAsyncHeaders;
};
};
/** Contains response data for the getAnalyzeLayoutResult operation. */
export type GeneratedClientGetAnalyzeLayoutResultResponse = AnalyzeOperationResult & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: AnalyzeOperationResult;
};
};
/** Contains response data for the listCustomModels operation. */
export type GeneratedClientListCustomModelsResponse = Models & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: Models;
};
};
/** Contains response data for the getCustomModels operation. */
export type GeneratedClientGetCustomModelsResponse = Models & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: Models;
};
};
/** Contains response data for the listCustomModelsNext operation. */
export type GeneratedClientListCustomModelsNextResponse = Models & {
/** The underlying HTTP response. */
_response: coreHttp.HttpResponse & {
/** The response body as text (string format) */
bodyAsText: string;
/** The response body as parsed JSON or XML */
parsedBody: Models;
};
};
/** Optional parameters. */
export interface GeneratedClientOptionalParams
extends coreHttp.ServiceClientOptions {
/** Overrides client endpoint. */
endpoint?: string;
}