@azure-rest/ai-document-translator 1.0.0-alpha.20250618.1 → 1.0.0-alpha.20250717.1

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.
@@ -1,826 +1,826 @@
1
- ## API Report File for "@azure-rest/ai-document-translator"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import type { AbortSignalLike } from '@azure/abort-controller';
8
- import type { CancelOnProgress } from '@azure/core-lro';
9
- import type { Client } from '@azure-rest/core-client';
10
- import type { ClientOptions } from '@azure-rest/core-client';
11
- import type { CreateHttpPollerOptions } from '@azure/core-lro';
12
- import type { HttpResponse } from '@azure-rest/core-client';
13
- import type { KeyCredential } from '@azure/core-auth';
14
- import type { OperationState } from '@azure/core-lro';
15
- import type { PathUncheckedResponse } from '@azure-rest/core-client';
16
- import type { RawHttpHeaders } from '@azure/core-rest-pipeline';
17
- import type { RequestParameters } from '@azure-rest/core-client';
18
- import type { StreamableMethod } from '@azure-rest/core-client';
19
-
20
- // @public
21
- export interface BatchRequest {
22
- source: SourceInput;
23
- storageType?: "Folder" | "File";
24
- targets: Array<TargetInput>;
25
- }
26
-
27
- // @public
28
- function createClient(endpoint: string, credentials: KeyCredential, options?: DocumentTranslatorClientOptions): DocumentTranslatorClient;
29
- export default createClient;
30
-
31
- // @public (undocumented)
32
- export interface DocumentFilter {
33
- prefix?: string;
34
- suffix?: string;
35
- }
36
-
37
- // @public
38
- export interface DocumentsStatusOutput {
39
- "@nextLink"?: string;
40
- value: Array<DocumentStatusOutput>;
41
- }
42
-
43
- // @public
44
- export interface DocumentStatusOutput {
45
- characterCharged?: number;
46
- createdDateTimeUtc: string;
47
- error?: TranslationErrorOutput;
48
- id: string;
49
- lastActionDateTimeUtc: string;
50
- path?: string;
51
- progress: number;
52
- sourcePath: string;
53
- status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed";
54
- to: string;
55
- }
56
-
57
- // @public
58
- export interface DocumentTranslationCancelTranslation200Response extends HttpResponse {
59
- // (undocumented)
60
- body: TranslationStatusOutput;
61
- // (undocumented)
62
- status: "200";
63
- }
64
-
65
- // @public
66
- export interface DocumentTranslationCancelTranslation401Response extends HttpResponse {
67
- // (undocumented)
68
- body: TranslationErrorResponseOutput;
69
- // (undocumented)
70
- status: "401";
71
- }
72
-
73
- // @public
74
- export interface DocumentTranslationCancelTranslation404Response extends HttpResponse {
75
- // (undocumented)
76
- body: TranslationErrorResponseOutput;
77
- // (undocumented)
78
- status: "404";
79
- }
80
-
81
- // @public
82
- export interface DocumentTranslationCancelTranslation429Response extends HttpResponse {
83
- // (undocumented)
84
- body: TranslationErrorResponseOutput;
85
- // (undocumented)
86
- status: "429";
87
- }
88
-
89
- // @public
90
- export interface DocumentTranslationCancelTranslation500Response extends HttpResponse {
91
- // (undocumented)
92
- body: TranslationErrorResponseOutput;
93
- // (undocumented)
94
- status: "500";
95
- }
96
-
97
- // @public
98
- export interface DocumentTranslationCancelTranslation503Response extends HttpResponse {
99
- // (undocumented)
100
- body: TranslationErrorResponseOutput;
101
- // (undocumented)
102
- status: "503";
103
- }
104
-
105
- // @public (undocumented)
106
- export type DocumentTranslationCancelTranslationParameters = RequestParameters;
107
-
108
- // @public (undocumented)
109
- export interface DocumentTranslationGetDocumentsStatus200Headers {
110
- "retry-after"?: number;
111
- etag?: string;
112
- }
113
-
114
- // @public
115
- export interface DocumentTranslationGetDocumentsStatus200Response extends HttpResponse {
116
- // (undocumented)
117
- body: DocumentsStatusOutput;
118
- // (undocumented)
119
- headers: RawHttpHeaders & DocumentTranslationGetDocumentsStatus200Headers;
120
- // (undocumented)
121
- status: "200";
122
- }
123
-
124
- // @public
125
- export interface DocumentTranslationGetDocumentsStatus400Response extends HttpResponse {
126
- // (undocumented)
127
- body: TranslationErrorResponseOutput;
128
- // (undocumented)
129
- status: "400";
130
- }
131
-
132
- // @public
133
- export interface DocumentTranslationGetDocumentsStatus401Response extends HttpResponse {
134
- // (undocumented)
135
- body: TranslationErrorResponseOutput;
136
- // (undocumented)
137
- status: "401";
138
- }
139
-
140
- // @public
141
- export interface DocumentTranslationGetDocumentsStatus404Response extends HttpResponse {
142
- // (undocumented)
143
- body: TranslationErrorResponseOutput;
144
- // (undocumented)
145
- status: "404";
146
- }
147
-
148
- // @public
149
- export interface DocumentTranslationGetDocumentsStatus429Response extends HttpResponse {
150
- // (undocumented)
151
- body: TranslationErrorResponseOutput;
152
- // (undocumented)
153
- status: "429";
154
- }
155
-
156
- // @public
157
- export interface DocumentTranslationGetDocumentsStatus500Response extends HttpResponse {
158
- // (undocumented)
159
- body: TranslationErrorResponseOutput;
160
- // (undocumented)
161
- status: "500";
162
- }
163
-
164
- // @public
165
- export interface DocumentTranslationGetDocumentsStatus503Response extends HttpResponse {
166
- // (undocumented)
167
- body: TranslationErrorResponseOutput;
168
- // (undocumented)
169
- status: "503";
170
- }
171
-
172
- // @public (undocumented)
173
- export type DocumentTranslationGetDocumentsStatusParameters = DocumentTranslationGetDocumentsStatusQueryParam & RequestParameters;
174
-
175
- // @public (undocumented)
176
- export interface DocumentTranslationGetDocumentsStatusQueryParam {
177
- // (undocumented)
178
- queryParameters?: DocumentTranslationGetDocumentsStatusQueryParamProperties;
179
- }
180
-
181
- // @public (undocumented)
182
- export interface DocumentTranslationGetDocumentsStatusQueryParamProperties {
183
- $maxpagesize?: number;
184
- $orderBy?: Array<string>;
185
- $skip?: number;
186
- $top?: number;
187
- createdDateTimeUtcEnd?: Date | string;
188
- createdDateTimeUtcStart?: Date | string;
189
- ids?: Array<string>;
190
- statuses?: Array<string>;
191
- }
192
-
193
- // @public (undocumented)
194
- export interface DocumentTranslationGetDocumentStatus200Headers {
195
- "retry-after"?: number;
196
- etag?: string;
197
- }
198
-
199
- // @public
200
- export interface DocumentTranslationGetDocumentStatus200Response extends HttpResponse {
201
- // (undocumented)
202
- body: DocumentStatusOutput;
203
- // (undocumented)
204
- headers: RawHttpHeaders & DocumentTranslationGetDocumentStatus200Headers;
205
- // (undocumented)
206
- status: "200";
207
- }
208
-
209
- // @public
210
- export interface DocumentTranslationGetDocumentStatus401Response extends HttpResponse {
211
- // (undocumented)
212
- body: TranslationErrorResponseOutput;
213
- // (undocumented)
214
- status: "401";
215
- }
216
-
217
- // @public
218
- export interface DocumentTranslationGetDocumentStatus404Response extends HttpResponse {
219
- // (undocumented)
220
- body: TranslationErrorResponseOutput;
221
- // (undocumented)
222
- status: "404";
223
- }
224
-
225
- // @public
226
- export interface DocumentTranslationGetDocumentStatus429Response extends HttpResponse {
227
- // (undocumented)
228
- body: TranslationErrorResponseOutput;
229
- // (undocumented)
230
- status: "429";
231
- }
232
-
233
- // @public
234
- export interface DocumentTranslationGetDocumentStatus500Response extends HttpResponse {
235
- // (undocumented)
236
- body: TranslationErrorResponseOutput;
237
- // (undocumented)
238
- status: "500";
239
- }
240
-
241
- // @public
242
- export interface DocumentTranslationGetDocumentStatus503Response extends HttpResponse {
243
- // (undocumented)
244
- body: TranslationErrorResponseOutput;
245
- // (undocumented)
246
- status: "503";
247
- }
248
-
249
- // @public (undocumented)
250
- export type DocumentTranslationGetDocumentStatusParameters = RequestParameters;
251
-
252
- // @public (undocumented)
253
- export interface DocumentTranslationGetSupportedDocumentFormats200Headers {
254
- "retry-after"?: number;
255
- }
256
-
257
- // @public
258
- export interface DocumentTranslationGetSupportedDocumentFormats200Response extends HttpResponse {
259
- // (undocumented)
260
- body: SupportedFileFormatsOutput;
261
- // (undocumented)
262
- headers: RawHttpHeaders & DocumentTranslationGetSupportedDocumentFormats200Headers;
263
- // (undocumented)
264
- status: "200";
265
- }
266
-
267
- // @public
268
- export interface DocumentTranslationGetSupportedDocumentFormats429Response extends HttpResponse {
269
- // (undocumented)
270
- body: TranslationErrorResponseOutput;
271
- // (undocumented)
272
- status: "429";
273
- }
274
-
275
- // @public
276
- export interface DocumentTranslationGetSupportedDocumentFormats500Response extends HttpResponse {
277
- // (undocumented)
278
- body: TranslationErrorResponseOutput;
279
- // (undocumented)
280
- status: "500";
281
- }
282
-
283
- // @public
284
- export interface DocumentTranslationGetSupportedDocumentFormats503Response extends HttpResponse {
285
- // (undocumented)
286
- body: TranslationErrorResponseOutput;
287
- // (undocumented)
288
- status: "503";
289
- }
290
-
291
- // @public (undocumented)
292
- export type DocumentTranslationGetSupportedDocumentFormatsParameters = RequestParameters;
293
-
294
- // @public (undocumented)
295
- export interface DocumentTranslationGetSupportedGlossaryFormats200Headers {
296
- "retry-after"?: number;
297
- }
298
-
299
- // @public
300
- export interface DocumentTranslationGetSupportedGlossaryFormats200Response extends HttpResponse {
301
- // (undocumented)
302
- body: SupportedFileFormatsOutput;
303
- // (undocumented)
304
- headers: RawHttpHeaders & DocumentTranslationGetSupportedGlossaryFormats200Headers;
305
- // (undocumented)
306
- status: "200";
307
- }
308
-
309
- // @public
310
- export interface DocumentTranslationGetSupportedGlossaryFormats429Response extends HttpResponse {
311
- // (undocumented)
312
- body: TranslationErrorResponseOutput;
313
- // (undocumented)
314
- status: "429";
315
- }
316
-
317
- // @public
318
- export interface DocumentTranslationGetSupportedGlossaryFormats500Response extends HttpResponse {
319
- // (undocumented)
320
- body: TranslationErrorResponseOutput;
321
- // (undocumented)
322
- status: "500";
323
- }
324
-
325
- // @public
326
- export interface DocumentTranslationGetSupportedGlossaryFormats503Response extends HttpResponse {
327
- // (undocumented)
328
- body: TranslationErrorResponseOutput;
329
- // (undocumented)
330
- status: "503";
331
- }
332
-
333
- // @public (undocumented)
334
- export type DocumentTranslationGetSupportedGlossaryFormatsParameters = RequestParameters;
335
-
336
- // @public (undocumented)
337
- export interface DocumentTranslationGetSupportedStorageSources200Headers {
338
- "retry-after"?: number;
339
- }
340
-
341
- // @public
342
- export interface DocumentTranslationGetSupportedStorageSources200Response extends HttpResponse {
343
- // (undocumented)
344
- body: SupportedStorageSourcesOutput;
345
- // (undocumented)
346
- headers: RawHttpHeaders & DocumentTranslationGetSupportedStorageSources200Headers;
347
- // (undocumented)
348
- status: "200";
349
- }
350
-
351
- // @public
352
- export interface DocumentTranslationGetSupportedStorageSources429Response extends HttpResponse {
353
- // (undocumented)
354
- body: TranslationErrorResponseOutput;
355
- // (undocumented)
356
- status: "429";
357
- }
358
-
359
- // @public
360
- export interface DocumentTranslationGetSupportedStorageSources500Response extends HttpResponse {
361
- // (undocumented)
362
- body: TranslationErrorResponseOutput;
363
- // (undocumented)
364
- status: "500";
365
- }
366
-
367
- // @public
368
- export interface DocumentTranslationGetSupportedStorageSources503Response extends HttpResponse {
369
- // (undocumented)
370
- body: TranslationErrorResponseOutput;
371
- // (undocumented)
372
- status: "503";
373
- }
374
-
375
- // @public (undocumented)
376
- export type DocumentTranslationGetSupportedStorageSourcesParameters = RequestParameters;
377
-
378
- // @public (undocumented)
379
- export interface DocumentTranslationGetTranslationsStatus200Headers {
380
- "retry-after"?: number;
381
- etag?: string;
382
- }
383
-
384
- // @public
385
- export interface DocumentTranslationGetTranslationsStatus200Response extends HttpResponse {
386
- // (undocumented)
387
- body: TranslationsStatusOutput;
388
- // (undocumented)
389
- headers: RawHttpHeaders & DocumentTranslationGetTranslationsStatus200Headers;
390
- // (undocumented)
391
- status: "200";
392
- }
393
-
394
- // @public
395
- export interface DocumentTranslationGetTranslationsStatus400Response extends HttpResponse {
396
- // (undocumented)
397
- body: TranslationErrorResponseOutput;
398
- // (undocumented)
399
- status: "400";
400
- }
401
-
402
- // @public
403
- export interface DocumentTranslationGetTranslationsStatus401Response extends HttpResponse {
404
- // (undocumented)
405
- body: TranslationErrorResponseOutput;
406
- // (undocumented)
407
- status: "401";
408
- }
409
-
410
- // @public
411
- export interface DocumentTranslationGetTranslationsStatus429Response extends HttpResponse {
412
- // (undocumented)
413
- body: TranslationErrorResponseOutput;
414
- // (undocumented)
415
- status: "429";
416
- }
417
-
418
- // @public
419
- export interface DocumentTranslationGetTranslationsStatus500Response extends HttpResponse {
420
- // (undocumented)
421
- body: TranslationErrorResponseOutput;
422
- // (undocumented)
423
- status: "500";
424
- }
425
-
426
- // @public
427
- export interface DocumentTranslationGetTranslationsStatus503Response extends HttpResponse {
428
- // (undocumented)
429
- body: TranslationErrorResponseOutput;
430
- // (undocumented)
431
- status: "503";
432
- }
433
-
434
- // @public (undocumented)
435
- export type DocumentTranslationGetTranslationsStatusParameters = DocumentTranslationGetTranslationsStatusQueryParam & RequestParameters;
436
-
437
- // @public (undocumented)
438
- export interface DocumentTranslationGetTranslationsStatusQueryParam {
439
- // (undocumented)
440
- queryParameters?: DocumentTranslationGetTranslationsStatusQueryParamProperties;
441
- }
442
-
443
- // @public (undocumented)
444
- export interface DocumentTranslationGetTranslationsStatusQueryParamProperties {
445
- $maxpagesize?: number;
446
- $orderBy?: Array<string>;
447
- $skip?: number;
448
- $top?: number;
449
- createdDateTimeUtcEnd?: Date | string;
450
- createdDateTimeUtcStart?: Date | string;
451
- ids?: Array<string>;
452
- statuses?: Array<string>;
453
- }
454
-
455
- // @public (undocumented)
456
- export interface DocumentTranslationGetTranslationStatus200Headers {
457
- "retry-after"?: number;
458
- etag?: string;
459
- }
460
-
461
- // @public
462
- export interface DocumentTranslationGetTranslationStatus200Response extends HttpResponse {
463
- // (undocumented)
464
- body: TranslationStatusOutput;
465
- // (undocumented)
466
- headers: RawHttpHeaders & DocumentTranslationGetTranslationStatus200Headers;
467
- // (undocumented)
468
- status: "200";
469
- }
470
-
471
- // @public
472
- export interface DocumentTranslationGetTranslationStatus401Response extends HttpResponse {
473
- // (undocumented)
474
- body: TranslationErrorResponseOutput;
475
- // (undocumented)
476
- status: "401";
477
- }
478
-
479
- // @public
480
- export interface DocumentTranslationGetTranslationStatus404Response extends HttpResponse {
481
- // (undocumented)
482
- body: TranslationErrorResponseOutput;
483
- // (undocumented)
484
- status: "404";
485
- }
486
-
487
- // @public
488
- export interface DocumentTranslationGetTranslationStatus429Response extends HttpResponse {
489
- // (undocumented)
490
- body: TranslationErrorResponseOutput;
491
- // (undocumented)
492
- status: "429";
493
- }
494
-
495
- // @public
496
- export interface DocumentTranslationGetTranslationStatus500Response extends HttpResponse {
497
- // (undocumented)
498
- body: TranslationErrorResponseOutput;
499
- // (undocumented)
500
- status: "500";
501
- }
502
-
503
- // @public
504
- export interface DocumentTranslationGetTranslationStatus503Response extends HttpResponse {
505
- // (undocumented)
506
- body: TranslationErrorResponseOutput;
507
- // (undocumented)
508
- status: "503";
509
- }
510
-
511
- // @public (undocumented)
512
- export type DocumentTranslationGetTranslationStatusParameters = RequestParameters;
513
-
514
- // @public (undocumented)
515
- export interface DocumentTranslationStartTranslation202Headers {
516
- "operation-location"?: string;
517
- }
518
-
519
- // @public
520
- export interface DocumentTranslationStartTranslation202Response extends HttpResponse {
521
- // (undocumented)
522
- headers: RawHttpHeaders & DocumentTranslationStartTranslation202Headers;
523
- // (undocumented)
524
- status: "202";
525
- }
526
-
527
- // @public
528
- export interface DocumentTranslationStartTranslation400Response extends HttpResponse {
529
- // (undocumented)
530
- body: TranslationErrorResponseOutput;
531
- // (undocumented)
532
- status: "400";
533
- }
534
-
535
- // @public
536
- export interface DocumentTranslationStartTranslation401Response extends HttpResponse {
537
- // (undocumented)
538
- body: TranslationErrorResponseOutput;
539
- // (undocumented)
540
- status: "401";
541
- }
542
-
543
- // @public
544
- export interface DocumentTranslationStartTranslation429Response extends HttpResponse {
545
- // (undocumented)
546
- body: TranslationErrorResponseOutput;
547
- // (undocumented)
548
- status: "429";
549
- }
550
-
551
- // @public
552
- export interface DocumentTranslationStartTranslation500Response extends HttpResponse {
553
- // (undocumented)
554
- body: TranslationErrorResponseOutput;
555
- // (undocumented)
556
- status: "500";
557
- }
558
-
559
- // @public
560
- export interface DocumentTranslationStartTranslation503Response extends HttpResponse {
561
- // (undocumented)
562
- body: TranslationErrorResponseOutput;
563
- // (undocumented)
564
- status: "503";
565
- }
566
-
567
- // @public (undocumented)
568
- export interface DocumentTranslationStartTranslationBodyParam {
569
- body: StartTranslationDetails;
570
- }
571
-
572
- // @public (undocumented)
573
- export interface DocumentTranslationStartTranslationMediaTypesParam {
574
- contentType?: "application/json" | "text/json" | "application/*+json";
575
- }
576
-
577
- // @public (undocumented)
578
- export type DocumentTranslationStartTranslationParameters = DocumentTranslationStartTranslationMediaTypesParam & DocumentTranslationStartTranslationBodyParam & RequestParameters;
579
-
580
- // @public (undocumented)
581
- export type DocumentTranslatorClient = Client & {
582
- path: Routes;
583
- };
584
-
585
- // @public
586
- export interface DocumentTranslatorClientOptions extends ClientOptions {
587
- }
588
-
589
- // @public (undocumented)
590
- export interface FileFormatOutput {
591
- contentTypes: Array<string>;
592
- defaultVersion?: string;
593
- fileExtensions: Array<string>;
594
- format: string;
595
- versions?: Array<string>;
596
- }
597
-
598
- // @public
599
- export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
600
-
601
- // @public (undocumented)
602
- export interface GetDocumentsStatus {
603
- get(options?: DocumentTranslationGetDocumentsStatusParameters): StreamableMethod<DocumentTranslationGetDocumentsStatus200Response | DocumentTranslationGetDocumentsStatus400Response | DocumentTranslationGetDocumentsStatus401Response | DocumentTranslationGetDocumentsStatus404Response | DocumentTranslationGetDocumentsStatus429Response | DocumentTranslationGetDocumentsStatus500Response | DocumentTranslationGetDocumentsStatus503Response>;
604
- }
605
-
606
- // @public (undocumented)
607
- export interface GetDocumentStatus {
608
- get(options?: DocumentTranslationGetDocumentStatusParameters): StreamableMethod<DocumentTranslationGetDocumentStatus200Response | DocumentTranslationGetDocumentStatus401Response | DocumentTranslationGetDocumentStatus404Response | DocumentTranslationGetDocumentStatus429Response | DocumentTranslationGetDocumentStatus500Response | DocumentTranslationGetDocumentStatus503Response>;
609
- }
610
-
611
- // @public
612
- export function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
613
-
614
- // @public
615
- export type GetPage<TPage> = (pageLink: string) => Promise<{
616
- page: TPage;
617
- nextPageLink?: string;
618
- }>;
619
-
620
- // @public (undocumented)
621
- export interface GetSupportedDocumentFormats {
622
- get(options?: DocumentTranslationGetSupportedDocumentFormatsParameters): StreamableMethod<DocumentTranslationGetSupportedDocumentFormats200Response | DocumentTranslationGetSupportedDocumentFormats429Response | DocumentTranslationGetSupportedDocumentFormats500Response | DocumentTranslationGetSupportedDocumentFormats503Response>;
623
- }
624
-
625
- // @public (undocumented)
626
- export interface GetSupportedGlossaryFormats {
627
- get(options?: DocumentTranslationGetSupportedGlossaryFormatsParameters): StreamableMethod<DocumentTranslationGetSupportedGlossaryFormats200Response | DocumentTranslationGetSupportedGlossaryFormats429Response | DocumentTranslationGetSupportedGlossaryFormats500Response | DocumentTranslationGetSupportedGlossaryFormats503Response>;
628
- }
629
-
630
- // @public (undocumented)
631
- export interface GetSupportedStorageSources {
632
- get(options?: DocumentTranslationGetSupportedStorageSourcesParameters): StreamableMethod<DocumentTranslationGetSupportedStorageSources200Response | DocumentTranslationGetSupportedStorageSources429Response | DocumentTranslationGetSupportedStorageSources500Response | DocumentTranslationGetSupportedStorageSources503Response>;
633
- }
634
-
635
- // @public (undocumented)
636
- export interface GetTranslationStatus {
637
- delete(options?: DocumentTranslationCancelTranslationParameters): StreamableMethod<DocumentTranslationCancelTranslation200Response | DocumentTranslationCancelTranslation401Response | DocumentTranslationCancelTranslation404Response | DocumentTranslationCancelTranslation429Response | DocumentTranslationCancelTranslation500Response | DocumentTranslationCancelTranslation503Response>;
638
- get(options?: DocumentTranslationGetTranslationStatusParameters): StreamableMethod<DocumentTranslationGetTranslationStatus200Response | DocumentTranslationGetTranslationStatus401Response | DocumentTranslationGetTranslationStatus404Response | DocumentTranslationGetTranslationStatus429Response | DocumentTranslationGetTranslationStatus500Response | DocumentTranslationGetTranslationStatus503Response>;
639
- }
640
-
641
- // @public
642
- export interface Glossary {
643
- format: string;
644
- glossaryUrl: string;
645
- storageSource?: "AzureBlob";
646
- version?: string;
647
- }
648
-
649
- // @public
650
- export interface InnerTranslationErrorOutput {
651
- code: string;
652
- innerError?: InnerTranslationErrorOutput;
653
- message: string;
654
- readonly target?: string;
655
- }
656
-
657
- // @public (undocumented)
658
- export function isUnexpected(response: DocumentTranslationStartTranslation202Response | DocumentTranslationStartTranslation400Response | DocumentTranslationStartTranslation401Response | DocumentTranslationStartTranslation429Response | DocumentTranslationStartTranslation500Response | DocumentTranslationStartTranslation503Response): response is DocumentTranslationStartTranslation400Response;
659
-
660
- // @public (undocumented)
661
- export function isUnexpected(response: DocumentTranslationGetTranslationsStatus200Response | DocumentTranslationGetTranslationsStatus400Response | DocumentTranslationGetTranslationsStatus401Response | DocumentTranslationGetTranslationsStatus429Response | DocumentTranslationGetTranslationsStatus500Response | DocumentTranslationGetTranslationsStatus503Response): response is DocumentTranslationGetTranslationsStatus400Response;
662
-
663
- // @public (undocumented)
664
- export function isUnexpected(response: DocumentTranslationGetDocumentStatus200Response | DocumentTranslationGetDocumentStatus401Response | DocumentTranslationGetDocumentStatus404Response | DocumentTranslationGetDocumentStatus429Response | DocumentTranslationGetDocumentStatus500Response | DocumentTranslationGetDocumentStatus503Response): response is DocumentTranslationGetDocumentStatus401Response;
665
-
666
- // @public (undocumented)
667
- export function isUnexpected(response: DocumentTranslationGetTranslationStatus200Response | DocumentTranslationGetTranslationStatus401Response | DocumentTranslationGetTranslationStatus404Response | DocumentTranslationGetTranslationStatus429Response | DocumentTranslationGetTranslationStatus500Response | DocumentTranslationGetTranslationStatus503Response): response is DocumentTranslationGetTranslationStatus401Response;
668
-
669
- // @public (undocumented)
670
- export function isUnexpected(response: DocumentTranslationCancelTranslation200Response | DocumentTranslationCancelTranslation401Response | DocumentTranslationCancelTranslation404Response | DocumentTranslationCancelTranslation429Response | DocumentTranslationCancelTranslation500Response | DocumentTranslationCancelTranslation503Response): response is DocumentTranslationCancelTranslation401Response;
671
-
672
- // @public (undocumented)
673
- export function isUnexpected(response: DocumentTranslationGetDocumentsStatus200Response | DocumentTranslationGetDocumentsStatus400Response | DocumentTranslationGetDocumentsStatus401Response | DocumentTranslationGetDocumentsStatus404Response | DocumentTranslationGetDocumentsStatus429Response | DocumentTranslationGetDocumentsStatus500Response | DocumentTranslationGetDocumentsStatus503Response): response is DocumentTranslationGetDocumentsStatus400Response;
674
-
675
- // @public (undocumented)
676
- export function isUnexpected(response: DocumentTranslationGetSupportedDocumentFormats200Response | DocumentTranslationGetSupportedDocumentFormats429Response | DocumentTranslationGetSupportedDocumentFormats500Response | DocumentTranslationGetSupportedDocumentFormats503Response): response is DocumentTranslationGetSupportedDocumentFormats429Response;
677
-
678
- // @public (undocumented)
679
- export function isUnexpected(response: DocumentTranslationGetSupportedGlossaryFormats200Response | DocumentTranslationGetSupportedGlossaryFormats429Response | DocumentTranslationGetSupportedGlossaryFormats500Response | DocumentTranslationGetSupportedGlossaryFormats503Response): response is DocumentTranslationGetSupportedGlossaryFormats429Response;
680
-
681
- // @public (undocumented)
682
- export function isUnexpected(response: DocumentTranslationGetSupportedStorageSources200Response | DocumentTranslationGetSupportedStorageSources429Response | DocumentTranslationGetSupportedStorageSources500Response | DocumentTranslationGetSupportedStorageSources503Response): response is DocumentTranslationGetSupportedStorageSources429Response;
683
-
684
- // @public
685
- export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings = PageSettings> {
686
- [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
687
- byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
688
- next(): Promise<IteratorResult<TElement>>;
689
- }
690
-
691
- // @public
692
- export interface PageSettings {
693
- continuationToken?: string;
694
- }
695
-
696
- // @public
697
- export function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
698
-
699
- // @public
700
- export type PaginateReturn<TResult> = TResult extends {
701
- body: {
702
- value?: infer TPage;
703
- };
704
- } ? GetArrayType<TPage> : Array<unknown>;
705
-
706
- // @public
707
- export interface PagingOptions<TResponse> {
708
- customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
709
- }
710
-
711
- // @public (undocumented)
712
- export interface Routes {
713
- (path: "/batches"): StartTranslation;
714
- (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus;
715
- (path: "/batches/{id}", id: string): GetTranslationStatus;
716
- (path: "/batches/{id}/documents", id: string): GetDocumentsStatus;
717
- (path: "/documents/formats"): GetSupportedDocumentFormats;
718
- (path: "/glossaries/formats"): GetSupportedGlossaryFormats;
719
- (path: "/storagesources"): GetSupportedStorageSources;
720
- }
721
-
722
- // @public
723
- export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
724
- getOperationState(): TState;
725
- getResult(): TResult | undefined;
726
- isDone(): boolean;
727
- // @deprecated
728
- isStopped(): boolean;
729
- onProgress(callback: (state: TState) => void): CancelOnProgress;
730
- poll(options?: {
731
- abortSignal?: AbortSignalLike;
732
- }): Promise<TState>;
733
- pollUntilDone(pollOptions?: {
734
- abortSignal?: AbortSignalLike;
735
- }): Promise<TResult>;
736
- serialize(): Promise<string>;
737
- // @deprecated
738
- stopPolling(): void;
739
- submitted(): Promise<void>;
740
- // @deprecated
741
- toString(): string;
742
- }
743
-
744
- // @public
745
- export interface SourceInput {
746
- // (undocumented)
747
- filter?: DocumentFilter;
748
- language?: string;
749
- sourceUrl: string;
750
- storageSource?: "AzureBlob";
751
- }
752
-
753
- // @public (undocumented)
754
- export interface StartTranslation {
755
- get(options?: DocumentTranslationGetTranslationsStatusParameters): StreamableMethod<DocumentTranslationGetTranslationsStatus200Response | DocumentTranslationGetTranslationsStatus400Response | DocumentTranslationGetTranslationsStatus401Response | DocumentTranslationGetTranslationsStatus429Response | DocumentTranslationGetTranslationsStatus500Response | DocumentTranslationGetTranslationsStatus503Response>;
756
- post(options: DocumentTranslationStartTranslationParameters): StreamableMethod<DocumentTranslationStartTranslation202Response | DocumentTranslationStartTranslation400Response | DocumentTranslationStartTranslation401Response | DocumentTranslationStartTranslation429Response | DocumentTranslationStartTranslation500Response | DocumentTranslationStartTranslation503Response>;
757
- }
758
-
759
- // @public
760
- export interface StartTranslationDetails {
761
- inputs: Array<BatchRequest>;
762
- }
763
-
764
- // @public (undocumented)
765
- export interface StatusSummaryOutput {
766
- cancelled: number;
767
- failed: number;
768
- inProgress: number;
769
- notYetStarted: number;
770
- success: number;
771
- total: number;
772
- totalCharacterCharged: number;
773
- }
774
-
775
- // @public
776
- export interface SupportedFileFormatsOutput {
777
- value: Array<FileFormatOutput>;
778
- }
779
-
780
- // @public
781
- export interface SupportedStorageSourcesOutput {
782
- value: Array<"AzureBlob">;
783
- }
784
-
785
- // @public
786
- export interface TargetInput {
787
- category?: string;
788
- glossaries?: Array<Glossary>;
789
- language: string;
790
- storageSource?: "AzureBlob";
791
- targetUrl: string;
792
- }
793
-
794
- // @public
795
- export interface TranslationErrorOutput {
796
- code: "InvalidRequest" | "InvalidArgument" | "InternalServerError" | "ServiceUnavailable" | "ResourceNotFound" | "Unauthorized" | "RequestRateTooHigh";
797
- innerError?: InnerTranslationErrorOutput;
798
- message: string;
799
- readonly target?: string;
800
- }
801
-
802
- // @public
803
- export interface TranslationErrorResponseOutput {
804
- error?: TranslationErrorOutput;
805
- }
806
-
807
- // @public
808
- export interface TranslationsStatusOutput {
809
- "@nextLink"?: string;
810
- value: Array<TranslationStatusOutput>;
811
- }
812
-
813
- // @public
814
- export interface TranslationStatusOutput {
815
- createdDateTimeUtc: string;
816
- error?: TranslationErrorOutput;
817
- id: string;
818
- lastActionDateTimeUtc: string;
819
- status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed";
820
- // (undocumented)
821
- summary: StatusSummaryOutput;
822
- }
823
-
824
- // (No @packageDocumentation comment for this package)
825
-
826
- ```
1
+ ## API Report File for "@azure-rest/ai-document-translator"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import type { AbortSignalLike } from '@azure/abort-controller';
8
+ import type { CancelOnProgress } from '@azure/core-lro';
9
+ import type { Client } from '@azure-rest/core-client';
10
+ import type { ClientOptions } from '@azure-rest/core-client';
11
+ import type { CreateHttpPollerOptions } from '@azure/core-lro';
12
+ import type { HttpResponse } from '@azure-rest/core-client';
13
+ import type { KeyCredential } from '@azure/core-auth';
14
+ import type { OperationState } from '@azure/core-lro';
15
+ import type { PathUncheckedResponse } from '@azure-rest/core-client';
16
+ import type { RawHttpHeaders } from '@azure/core-rest-pipeline';
17
+ import type { RequestParameters } from '@azure-rest/core-client';
18
+ import type { StreamableMethod } from '@azure-rest/core-client';
19
+
20
+ // @public
21
+ export interface BatchRequest {
22
+ source: SourceInput;
23
+ storageType?: "Folder" | "File";
24
+ targets: Array<TargetInput>;
25
+ }
26
+
27
+ // @public
28
+ function createClient(endpoint: string, credentials: KeyCredential, options?: DocumentTranslatorClientOptions): DocumentTranslatorClient;
29
+ export default createClient;
30
+
31
+ // @public (undocumented)
32
+ export interface DocumentFilter {
33
+ prefix?: string;
34
+ suffix?: string;
35
+ }
36
+
37
+ // @public
38
+ export interface DocumentsStatusOutput {
39
+ "@nextLink"?: string;
40
+ value: Array<DocumentStatusOutput>;
41
+ }
42
+
43
+ // @public
44
+ export interface DocumentStatusOutput {
45
+ characterCharged?: number;
46
+ createdDateTimeUtc: string;
47
+ error?: TranslationErrorOutput;
48
+ id: string;
49
+ lastActionDateTimeUtc: string;
50
+ path?: string;
51
+ progress: number;
52
+ sourcePath: string;
53
+ status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed";
54
+ to: string;
55
+ }
56
+
57
+ // @public
58
+ export interface DocumentTranslationCancelTranslation200Response extends HttpResponse {
59
+ // (undocumented)
60
+ body: TranslationStatusOutput;
61
+ // (undocumented)
62
+ status: "200";
63
+ }
64
+
65
+ // @public
66
+ export interface DocumentTranslationCancelTranslation401Response extends HttpResponse {
67
+ // (undocumented)
68
+ body: TranslationErrorResponseOutput;
69
+ // (undocumented)
70
+ status: "401";
71
+ }
72
+
73
+ // @public
74
+ export interface DocumentTranslationCancelTranslation404Response extends HttpResponse {
75
+ // (undocumented)
76
+ body: TranslationErrorResponseOutput;
77
+ // (undocumented)
78
+ status: "404";
79
+ }
80
+
81
+ // @public
82
+ export interface DocumentTranslationCancelTranslation429Response extends HttpResponse {
83
+ // (undocumented)
84
+ body: TranslationErrorResponseOutput;
85
+ // (undocumented)
86
+ status: "429";
87
+ }
88
+
89
+ // @public
90
+ export interface DocumentTranslationCancelTranslation500Response extends HttpResponse {
91
+ // (undocumented)
92
+ body: TranslationErrorResponseOutput;
93
+ // (undocumented)
94
+ status: "500";
95
+ }
96
+
97
+ // @public
98
+ export interface DocumentTranslationCancelTranslation503Response extends HttpResponse {
99
+ // (undocumented)
100
+ body: TranslationErrorResponseOutput;
101
+ // (undocumented)
102
+ status: "503";
103
+ }
104
+
105
+ // @public (undocumented)
106
+ export type DocumentTranslationCancelTranslationParameters = RequestParameters;
107
+
108
+ // @public (undocumented)
109
+ export interface DocumentTranslationGetDocumentsStatus200Headers {
110
+ "retry-after"?: number;
111
+ etag?: string;
112
+ }
113
+
114
+ // @public
115
+ export interface DocumentTranslationGetDocumentsStatus200Response extends HttpResponse {
116
+ // (undocumented)
117
+ body: DocumentsStatusOutput;
118
+ // (undocumented)
119
+ headers: RawHttpHeaders & DocumentTranslationGetDocumentsStatus200Headers;
120
+ // (undocumented)
121
+ status: "200";
122
+ }
123
+
124
+ // @public
125
+ export interface DocumentTranslationGetDocumentsStatus400Response extends HttpResponse {
126
+ // (undocumented)
127
+ body: TranslationErrorResponseOutput;
128
+ // (undocumented)
129
+ status: "400";
130
+ }
131
+
132
+ // @public
133
+ export interface DocumentTranslationGetDocumentsStatus401Response extends HttpResponse {
134
+ // (undocumented)
135
+ body: TranslationErrorResponseOutput;
136
+ // (undocumented)
137
+ status: "401";
138
+ }
139
+
140
+ // @public
141
+ export interface DocumentTranslationGetDocumentsStatus404Response extends HttpResponse {
142
+ // (undocumented)
143
+ body: TranslationErrorResponseOutput;
144
+ // (undocumented)
145
+ status: "404";
146
+ }
147
+
148
+ // @public
149
+ export interface DocumentTranslationGetDocumentsStatus429Response extends HttpResponse {
150
+ // (undocumented)
151
+ body: TranslationErrorResponseOutput;
152
+ // (undocumented)
153
+ status: "429";
154
+ }
155
+
156
+ // @public
157
+ export interface DocumentTranslationGetDocumentsStatus500Response extends HttpResponse {
158
+ // (undocumented)
159
+ body: TranslationErrorResponseOutput;
160
+ // (undocumented)
161
+ status: "500";
162
+ }
163
+
164
+ // @public
165
+ export interface DocumentTranslationGetDocumentsStatus503Response extends HttpResponse {
166
+ // (undocumented)
167
+ body: TranslationErrorResponseOutput;
168
+ // (undocumented)
169
+ status: "503";
170
+ }
171
+
172
+ // @public (undocumented)
173
+ export type DocumentTranslationGetDocumentsStatusParameters = DocumentTranslationGetDocumentsStatusQueryParam & RequestParameters;
174
+
175
+ // @public (undocumented)
176
+ export interface DocumentTranslationGetDocumentsStatusQueryParam {
177
+ // (undocumented)
178
+ queryParameters?: DocumentTranslationGetDocumentsStatusQueryParamProperties;
179
+ }
180
+
181
+ // @public (undocumented)
182
+ export interface DocumentTranslationGetDocumentsStatusQueryParamProperties {
183
+ $maxpagesize?: number;
184
+ $orderBy?: Array<string>;
185
+ $skip?: number;
186
+ $top?: number;
187
+ createdDateTimeUtcEnd?: Date | string;
188
+ createdDateTimeUtcStart?: Date | string;
189
+ ids?: Array<string>;
190
+ statuses?: Array<string>;
191
+ }
192
+
193
+ // @public (undocumented)
194
+ export interface DocumentTranslationGetDocumentStatus200Headers {
195
+ "retry-after"?: number;
196
+ etag?: string;
197
+ }
198
+
199
+ // @public
200
+ export interface DocumentTranslationGetDocumentStatus200Response extends HttpResponse {
201
+ // (undocumented)
202
+ body: DocumentStatusOutput;
203
+ // (undocumented)
204
+ headers: RawHttpHeaders & DocumentTranslationGetDocumentStatus200Headers;
205
+ // (undocumented)
206
+ status: "200";
207
+ }
208
+
209
+ // @public
210
+ export interface DocumentTranslationGetDocumentStatus401Response extends HttpResponse {
211
+ // (undocumented)
212
+ body: TranslationErrorResponseOutput;
213
+ // (undocumented)
214
+ status: "401";
215
+ }
216
+
217
+ // @public
218
+ export interface DocumentTranslationGetDocumentStatus404Response extends HttpResponse {
219
+ // (undocumented)
220
+ body: TranslationErrorResponseOutput;
221
+ // (undocumented)
222
+ status: "404";
223
+ }
224
+
225
+ // @public
226
+ export interface DocumentTranslationGetDocumentStatus429Response extends HttpResponse {
227
+ // (undocumented)
228
+ body: TranslationErrorResponseOutput;
229
+ // (undocumented)
230
+ status: "429";
231
+ }
232
+
233
+ // @public
234
+ export interface DocumentTranslationGetDocumentStatus500Response extends HttpResponse {
235
+ // (undocumented)
236
+ body: TranslationErrorResponseOutput;
237
+ // (undocumented)
238
+ status: "500";
239
+ }
240
+
241
+ // @public
242
+ export interface DocumentTranslationGetDocumentStatus503Response extends HttpResponse {
243
+ // (undocumented)
244
+ body: TranslationErrorResponseOutput;
245
+ // (undocumented)
246
+ status: "503";
247
+ }
248
+
249
+ // @public (undocumented)
250
+ export type DocumentTranslationGetDocumentStatusParameters = RequestParameters;
251
+
252
+ // @public (undocumented)
253
+ export interface DocumentTranslationGetSupportedDocumentFormats200Headers {
254
+ "retry-after"?: number;
255
+ }
256
+
257
+ // @public
258
+ export interface DocumentTranslationGetSupportedDocumentFormats200Response extends HttpResponse {
259
+ // (undocumented)
260
+ body: SupportedFileFormatsOutput;
261
+ // (undocumented)
262
+ headers: RawHttpHeaders & DocumentTranslationGetSupportedDocumentFormats200Headers;
263
+ // (undocumented)
264
+ status: "200";
265
+ }
266
+
267
+ // @public
268
+ export interface DocumentTranslationGetSupportedDocumentFormats429Response extends HttpResponse {
269
+ // (undocumented)
270
+ body: TranslationErrorResponseOutput;
271
+ // (undocumented)
272
+ status: "429";
273
+ }
274
+
275
+ // @public
276
+ export interface DocumentTranslationGetSupportedDocumentFormats500Response extends HttpResponse {
277
+ // (undocumented)
278
+ body: TranslationErrorResponseOutput;
279
+ // (undocumented)
280
+ status: "500";
281
+ }
282
+
283
+ // @public
284
+ export interface DocumentTranslationGetSupportedDocumentFormats503Response extends HttpResponse {
285
+ // (undocumented)
286
+ body: TranslationErrorResponseOutput;
287
+ // (undocumented)
288
+ status: "503";
289
+ }
290
+
291
+ // @public (undocumented)
292
+ export type DocumentTranslationGetSupportedDocumentFormatsParameters = RequestParameters;
293
+
294
+ // @public (undocumented)
295
+ export interface DocumentTranslationGetSupportedGlossaryFormats200Headers {
296
+ "retry-after"?: number;
297
+ }
298
+
299
+ // @public
300
+ export interface DocumentTranslationGetSupportedGlossaryFormats200Response extends HttpResponse {
301
+ // (undocumented)
302
+ body: SupportedFileFormatsOutput;
303
+ // (undocumented)
304
+ headers: RawHttpHeaders & DocumentTranslationGetSupportedGlossaryFormats200Headers;
305
+ // (undocumented)
306
+ status: "200";
307
+ }
308
+
309
+ // @public
310
+ export interface DocumentTranslationGetSupportedGlossaryFormats429Response extends HttpResponse {
311
+ // (undocumented)
312
+ body: TranslationErrorResponseOutput;
313
+ // (undocumented)
314
+ status: "429";
315
+ }
316
+
317
+ // @public
318
+ export interface DocumentTranslationGetSupportedGlossaryFormats500Response extends HttpResponse {
319
+ // (undocumented)
320
+ body: TranslationErrorResponseOutput;
321
+ // (undocumented)
322
+ status: "500";
323
+ }
324
+
325
+ // @public
326
+ export interface DocumentTranslationGetSupportedGlossaryFormats503Response extends HttpResponse {
327
+ // (undocumented)
328
+ body: TranslationErrorResponseOutput;
329
+ // (undocumented)
330
+ status: "503";
331
+ }
332
+
333
+ // @public (undocumented)
334
+ export type DocumentTranslationGetSupportedGlossaryFormatsParameters = RequestParameters;
335
+
336
+ // @public (undocumented)
337
+ export interface DocumentTranslationGetSupportedStorageSources200Headers {
338
+ "retry-after"?: number;
339
+ }
340
+
341
+ // @public
342
+ export interface DocumentTranslationGetSupportedStorageSources200Response extends HttpResponse {
343
+ // (undocumented)
344
+ body: SupportedStorageSourcesOutput;
345
+ // (undocumented)
346
+ headers: RawHttpHeaders & DocumentTranslationGetSupportedStorageSources200Headers;
347
+ // (undocumented)
348
+ status: "200";
349
+ }
350
+
351
+ // @public
352
+ export interface DocumentTranslationGetSupportedStorageSources429Response extends HttpResponse {
353
+ // (undocumented)
354
+ body: TranslationErrorResponseOutput;
355
+ // (undocumented)
356
+ status: "429";
357
+ }
358
+
359
+ // @public
360
+ export interface DocumentTranslationGetSupportedStorageSources500Response extends HttpResponse {
361
+ // (undocumented)
362
+ body: TranslationErrorResponseOutput;
363
+ // (undocumented)
364
+ status: "500";
365
+ }
366
+
367
+ // @public
368
+ export interface DocumentTranslationGetSupportedStorageSources503Response extends HttpResponse {
369
+ // (undocumented)
370
+ body: TranslationErrorResponseOutput;
371
+ // (undocumented)
372
+ status: "503";
373
+ }
374
+
375
+ // @public (undocumented)
376
+ export type DocumentTranslationGetSupportedStorageSourcesParameters = RequestParameters;
377
+
378
+ // @public (undocumented)
379
+ export interface DocumentTranslationGetTranslationsStatus200Headers {
380
+ "retry-after"?: number;
381
+ etag?: string;
382
+ }
383
+
384
+ // @public
385
+ export interface DocumentTranslationGetTranslationsStatus200Response extends HttpResponse {
386
+ // (undocumented)
387
+ body: TranslationsStatusOutput;
388
+ // (undocumented)
389
+ headers: RawHttpHeaders & DocumentTranslationGetTranslationsStatus200Headers;
390
+ // (undocumented)
391
+ status: "200";
392
+ }
393
+
394
+ // @public
395
+ export interface DocumentTranslationGetTranslationsStatus400Response extends HttpResponse {
396
+ // (undocumented)
397
+ body: TranslationErrorResponseOutput;
398
+ // (undocumented)
399
+ status: "400";
400
+ }
401
+
402
+ // @public
403
+ export interface DocumentTranslationGetTranslationsStatus401Response extends HttpResponse {
404
+ // (undocumented)
405
+ body: TranslationErrorResponseOutput;
406
+ // (undocumented)
407
+ status: "401";
408
+ }
409
+
410
+ // @public
411
+ export interface DocumentTranslationGetTranslationsStatus429Response extends HttpResponse {
412
+ // (undocumented)
413
+ body: TranslationErrorResponseOutput;
414
+ // (undocumented)
415
+ status: "429";
416
+ }
417
+
418
+ // @public
419
+ export interface DocumentTranslationGetTranslationsStatus500Response extends HttpResponse {
420
+ // (undocumented)
421
+ body: TranslationErrorResponseOutput;
422
+ // (undocumented)
423
+ status: "500";
424
+ }
425
+
426
+ // @public
427
+ export interface DocumentTranslationGetTranslationsStatus503Response extends HttpResponse {
428
+ // (undocumented)
429
+ body: TranslationErrorResponseOutput;
430
+ // (undocumented)
431
+ status: "503";
432
+ }
433
+
434
+ // @public (undocumented)
435
+ export type DocumentTranslationGetTranslationsStatusParameters = DocumentTranslationGetTranslationsStatusQueryParam & RequestParameters;
436
+
437
+ // @public (undocumented)
438
+ export interface DocumentTranslationGetTranslationsStatusQueryParam {
439
+ // (undocumented)
440
+ queryParameters?: DocumentTranslationGetTranslationsStatusQueryParamProperties;
441
+ }
442
+
443
+ // @public (undocumented)
444
+ export interface DocumentTranslationGetTranslationsStatusQueryParamProperties {
445
+ $maxpagesize?: number;
446
+ $orderBy?: Array<string>;
447
+ $skip?: number;
448
+ $top?: number;
449
+ createdDateTimeUtcEnd?: Date | string;
450
+ createdDateTimeUtcStart?: Date | string;
451
+ ids?: Array<string>;
452
+ statuses?: Array<string>;
453
+ }
454
+
455
+ // @public (undocumented)
456
+ export interface DocumentTranslationGetTranslationStatus200Headers {
457
+ "retry-after"?: number;
458
+ etag?: string;
459
+ }
460
+
461
+ // @public
462
+ export interface DocumentTranslationGetTranslationStatus200Response extends HttpResponse {
463
+ // (undocumented)
464
+ body: TranslationStatusOutput;
465
+ // (undocumented)
466
+ headers: RawHttpHeaders & DocumentTranslationGetTranslationStatus200Headers;
467
+ // (undocumented)
468
+ status: "200";
469
+ }
470
+
471
+ // @public
472
+ export interface DocumentTranslationGetTranslationStatus401Response extends HttpResponse {
473
+ // (undocumented)
474
+ body: TranslationErrorResponseOutput;
475
+ // (undocumented)
476
+ status: "401";
477
+ }
478
+
479
+ // @public
480
+ export interface DocumentTranslationGetTranslationStatus404Response extends HttpResponse {
481
+ // (undocumented)
482
+ body: TranslationErrorResponseOutput;
483
+ // (undocumented)
484
+ status: "404";
485
+ }
486
+
487
+ // @public
488
+ export interface DocumentTranslationGetTranslationStatus429Response extends HttpResponse {
489
+ // (undocumented)
490
+ body: TranslationErrorResponseOutput;
491
+ // (undocumented)
492
+ status: "429";
493
+ }
494
+
495
+ // @public
496
+ export interface DocumentTranslationGetTranslationStatus500Response extends HttpResponse {
497
+ // (undocumented)
498
+ body: TranslationErrorResponseOutput;
499
+ // (undocumented)
500
+ status: "500";
501
+ }
502
+
503
+ // @public
504
+ export interface DocumentTranslationGetTranslationStatus503Response extends HttpResponse {
505
+ // (undocumented)
506
+ body: TranslationErrorResponseOutput;
507
+ // (undocumented)
508
+ status: "503";
509
+ }
510
+
511
+ // @public (undocumented)
512
+ export type DocumentTranslationGetTranslationStatusParameters = RequestParameters;
513
+
514
+ // @public (undocumented)
515
+ export interface DocumentTranslationStartTranslation202Headers {
516
+ "operation-location"?: string;
517
+ }
518
+
519
+ // @public
520
+ export interface DocumentTranslationStartTranslation202Response extends HttpResponse {
521
+ // (undocumented)
522
+ headers: RawHttpHeaders & DocumentTranslationStartTranslation202Headers;
523
+ // (undocumented)
524
+ status: "202";
525
+ }
526
+
527
+ // @public
528
+ export interface DocumentTranslationStartTranslation400Response extends HttpResponse {
529
+ // (undocumented)
530
+ body: TranslationErrorResponseOutput;
531
+ // (undocumented)
532
+ status: "400";
533
+ }
534
+
535
+ // @public
536
+ export interface DocumentTranslationStartTranslation401Response extends HttpResponse {
537
+ // (undocumented)
538
+ body: TranslationErrorResponseOutput;
539
+ // (undocumented)
540
+ status: "401";
541
+ }
542
+
543
+ // @public
544
+ export interface DocumentTranslationStartTranslation429Response extends HttpResponse {
545
+ // (undocumented)
546
+ body: TranslationErrorResponseOutput;
547
+ // (undocumented)
548
+ status: "429";
549
+ }
550
+
551
+ // @public
552
+ export interface DocumentTranslationStartTranslation500Response extends HttpResponse {
553
+ // (undocumented)
554
+ body: TranslationErrorResponseOutput;
555
+ // (undocumented)
556
+ status: "500";
557
+ }
558
+
559
+ // @public
560
+ export interface DocumentTranslationStartTranslation503Response extends HttpResponse {
561
+ // (undocumented)
562
+ body: TranslationErrorResponseOutput;
563
+ // (undocumented)
564
+ status: "503";
565
+ }
566
+
567
+ // @public (undocumented)
568
+ export interface DocumentTranslationStartTranslationBodyParam {
569
+ body: StartTranslationDetails;
570
+ }
571
+
572
+ // @public (undocumented)
573
+ export interface DocumentTranslationStartTranslationMediaTypesParam {
574
+ contentType?: "application/json" | "text/json" | "application/*+json";
575
+ }
576
+
577
+ // @public (undocumented)
578
+ export type DocumentTranslationStartTranslationParameters = DocumentTranslationStartTranslationMediaTypesParam & DocumentTranslationStartTranslationBodyParam & RequestParameters;
579
+
580
+ // @public (undocumented)
581
+ export type DocumentTranslatorClient = Client & {
582
+ path: Routes;
583
+ };
584
+
585
+ // @public
586
+ export interface DocumentTranslatorClientOptions extends ClientOptions {
587
+ }
588
+
589
+ // @public (undocumented)
590
+ export interface FileFormatOutput {
591
+ contentTypes: Array<string>;
592
+ defaultVersion?: string;
593
+ fileExtensions: Array<string>;
594
+ format: string;
595
+ versions?: Array<string>;
596
+ }
597
+
598
+ // @public
599
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
600
+
601
+ // @public (undocumented)
602
+ export interface GetDocumentsStatus {
603
+ get(options?: DocumentTranslationGetDocumentsStatusParameters): StreamableMethod<DocumentTranslationGetDocumentsStatus200Response | DocumentTranslationGetDocumentsStatus400Response | DocumentTranslationGetDocumentsStatus401Response | DocumentTranslationGetDocumentsStatus404Response | DocumentTranslationGetDocumentsStatus429Response | DocumentTranslationGetDocumentsStatus500Response | DocumentTranslationGetDocumentsStatus503Response>;
604
+ }
605
+
606
+ // @public (undocumented)
607
+ export interface GetDocumentStatus {
608
+ get(options?: DocumentTranslationGetDocumentStatusParameters): StreamableMethod<DocumentTranslationGetDocumentStatus200Response | DocumentTranslationGetDocumentStatus401Response | DocumentTranslationGetDocumentStatus404Response | DocumentTranslationGetDocumentStatus429Response | DocumentTranslationGetDocumentStatus500Response | DocumentTranslationGetDocumentStatus503Response>;
609
+ }
610
+
611
+ // @public
612
+ export function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
613
+
614
+ // @public
615
+ export type GetPage<TPage> = (pageLink: string) => Promise<{
616
+ page: TPage;
617
+ nextPageLink?: string;
618
+ }>;
619
+
620
+ // @public (undocumented)
621
+ export interface GetSupportedDocumentFormats {
622
+ get(options?: DocumentTranslationGetSupportedDocumentFormatsParameters): StreamableMethod<DocumentTranslationGetSupportedDocumentFormats200Response | DocumentTranslationGetSupportedDocumentFormats429Response | DocumentTranslationGetSupportedDocumentFormats500Response | DocumentTranslationGetSupportedDocumentFormats503Response>;
623
+ }
624
+
625
+ // @public (undocumented)
626
+ export interface GetSupportedGlossaryFormats {
627
+ get(options?: DocumentTranslationGetSupportedGlossaryFormatsParameters): StreamableMethod<DocumentTranslationGetSupportedGlossaryFormats200Response | DocumentTranslationGetSupportedGlossaryFormats429Response | DocumentTranslationGetSupportedGlossaryFormats500Response | DocumentTranslationGetSupportedGlossaryFormats503Response>;
628
+ }
629
+
630
+ // @public (undocumented)
631
+ export interface GetSupportedStorageSources {
632
+ get(options?: DocumentTranslationGetSupportedStorageSourcesParameters): StreamableMethod<DocumentTranslationGetSupportedStorageSources200Response | DocumentTranslationGetSupportedStorageSources429Response | DocumentTranslationGetSupportedStorageSources500Response | DocumentTranslationGetSupportedStorageSources503Response>;
633
+ }
634
+
635
+ // @public (undocumented)
636
+ export interface GetTranslationStatus {
637
+ delete(options?: DocumentTranslationCancelTranslationParameters): StreamableMethod<DocumentTranslationCancelTranslation200Response | DocumentTranslationCancelTranslation401Response | DocumentTranslationCancelTranslation404Response | DocumentTranslationCancelTranslation429Response | DocumentTranslationCancelTranslation500Response | DocumentTranslationCancelTranslation503Response>;
638
+ get(options?: DocumentTranslationGetTranslationStatusParameters): StreamableMethod<DocumentTranslationGetTranslationStatus200Response | DocumentTranslationGetTranslationStatus401Response | DocumentTranslationGetTranslationStatus404Response | DocumentTranslationGetTranslationStatus429Response | DocumentTranslationGetTranslationStatus500Response | DocumentTranslationGetTranslationStatus503Response>;
639
+ }
640
+
641
+ // @public
642
+ export interface Glossary {
643
+ format: string;
644
+ glossaryUrl: string;
645
+ storageSource?: "AzureBlob";
646
+ version?: string;
647
+ }
648
+
649
+ // @public
650
+ export interface InnerTranslationErrorOutput {
651
+ code: string;
652
+ innerError?: InnerTranslationErrorOutput;
653
+ message: string;
654
+ readonly target?: string;
655
+ }
656
+
657
+ // @public (undocumented)
658
+ export function isUnexpected(response: DocumentTranslationStartTranslation202Response | DocumentTranslationStartTranslation400Response | DocumentTranslationStartTranslation401Response | DocumentTranslationStartTranslation429Response | DocumentTranslationStartTranslation500Response | DocumentTranslationStartTranslation503Response): response is DocumentTranslationStartTranslation400Response;
659
+
660
+ // @public (undocumented)
661
+ export function isUnexpected(response: DocumentTranslationGetTranslationsStatus200Response | DocumentTranslationGetTranslationsStatus400Response | DocumentTranslationGetTranslationsStatus401Response | DocumentTranslationGetTranslationsStatus429Response | DocumentTranslationGetTranslationsStatus500Response | DocumentTranslationGetTranslationsStatus503Response): response is DocumentTranslationGetTranslationsStatus400Response;
662
+
663
+ // @public (undocumented)
664
+ export function isUnexpected(response: DocumentTranslationGetDocumentStatus200Response | DocumentTranslationGetDocumentStatus401Response | DocumentTranslationGetDocumentStatus404Response | DocumentTranslationGetDocumentStatus429Response | DocumentTranslationGetDocumentStatus500Response | DocumentTranslationGetDocumentStatus503Response): response is DocumentTranslationGetDocumentStatus401Response;
665
+
666
+ // @public (undocumented)
667
+ export function isUnexpected(response: DocumentTranslationGetTranslationStatus200Response | DocumentTranslationGetTranslationStatus401Response | DocumentTranslationGetTranslationStatus404Response | DocumentTranslationGetTranslationStatus429Response | DocumentTranslationGetTranslationStatus500Response | DocumentTranslationGetTranslationStatus503Response): response is DocumentTranslationGetTranslationStatus401Response;
668
+
669
+ // @public (undocumented)
670
+ export function isUnexpected(response: DocumentTranslationCancelTranslation200Response | DocumentTranslationCancelTranslation401Response | DocumentTranslationCancelTranslation404Response | DocumentTranslationCancelTranslation429Response | DocumentTranslationCancelTranslation500Response | DocumentTranslationCancelTranslation503Response): response is DocumentTranslationCancelTranslation401Response;
671
+
672
+ // @public (undocumented)
673
+ export function isUnexpected(response: DocumentTranslationGetDocumentsStatus200Response | DocumentTranslationGetDocumentsStatus400Response | DocumentTranslationGetDocumentsStatus401Response | DocumentTranslationGetDocumentsStatus404Response | DocumentTranslationGetDocumentsStatus429Response | DocumentTranslationGetDocumentsStatus500Response | DocumentTranslationGetDocumentsStatus503Response): response is DocumentTranslationGetDocumentsStatus400Response;
674
+
675
+ // @public (undocumented)
676
+ export function isUnexpected(response: DocumentTranslationGetSupportedDocumentFormats200Response | DocumentTranslationGetSupportedDocumentFormats429Response | DocumentTranslationGetSupportedDocumentFormats500Response | DocumentTranslationGetSupportedDocumentFormats503Response): response is DocumentTranslationGetSupportedDocumentFormats429Response;
677
+
678
+ // @public (undocumented)
679
+ export function isUnexpected(response: DocumentTranslationGetSupportedGlossaryFormats200Response | DocumentTranslationGetSupportedGlossaryFormats429Response | DocumentTranslationGetSupportedGlossaryFormats500Response | DocumentTranslationGetSupportedGlossaryFormats503Response): response is DocumentTranslationGetSupportedGlossaryFormats429Response;
680
+
681
+ // @public (undocumented)
682
+ export function isUnexpected(response: DocumentTranslationGetSupportedStorageSources200Response | DocumentTranslationGetSupportedStorageSources429Response | DocumentTranslationGetSupportedStorageSources500Response | DocumentTranslationGetSupportedStorageSources503Response): response is DocumentTranslationGetSupportedStorageSources429Response;
683
+
684
+ // @public
685
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings = PageSettings> {
686
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
687
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
688
+ next(): Promise<IteratorResult<TElement>>;
689
+ }
690
+
691
+ // @public
692
+ export interface PageSettings {
693
+ continuationToken?: string;
694
+ }
695
+
696
+ // @public
697
+ export function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
698
+
699
+ // @public
700
+ export type PaginateReturn<TResult> = TResult extends {
701
+ body: {
702
+ value?: infer TPage;
703
+ };
704
+ } ? GetArrayType<TPage> : Array<unknown>;
705
+
706
+ // @public
707
+ export interface PagingOptions<TResponse> {
708
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
709
+ }
710
+
711
+ // @public (undocumented)
712
+ export interface Routes {
713
+ (path: "/batches"): StartTranslation;
714
+ (path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus;
715
+ (path: "/batches/{id}", id: string): GetTranslationStatus;
716
+ (path: "/batches/{id}/documents", id: string): GetDocumentsStatus;
717
+ (path: "/documents/formats"): GetSupportedDocumentFormats;
718
+ (path: "/glossaries/formats"): GetSupportedGlossaryFormats;
719
+ (path: "/storagesources"): GetSupportedStorageSources;
720
+ }
721
+
722
+ // @public
723
+ export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
724
+ getOperationState(): TState;
725
+ getResult(): TResult | undefined;
726
+ isDone(): boolean;
727
+ // @deprecated
728
+ isStopped(): boolean;
729
+ onProgress(callback: (state: TState) => void): CancelOnProgress;
730
+ poll(options?: {
731
+ abortSignal?: AbortSignalLike;
732
+ }): Promise<TState>;
733
+ pollUntilDone(pollOptions?: {
734
+ abortSignal?: AbortSignalLike;
735
+ }): Promise<TResult>;
736
+ serialize(): Promise<string>;
737
+ // @deprecated
738
+ stopPolling(): void;
739
+ submitted(): Promise<void>;
740
+ // @deprecated
741
+ toString(): string;
742
+ }
743
+
744
+ // @public
745
+ export interface SourceInput {
746
+ // (undocumented)
747
+ filter?: DocumentFilter;
748
+ language?: string;
749
+ sourceUrl: string;
750
+ storageSource?: "AzureBlob";
751
+ }
752
+
753
+ // @public (undocumented)
754
+ export interface StartTranslation {
755
+ get(options?: DocumentTranslationGetTranslationsStatusParameters): StreamableMethod<DocumentTranslationGetTranslationsStatus200Response | DocumentTranslationGetTranslationsStatus400Response | DocumentTranslationGetTranslationsStatus401Response | DocumentTranslationGetTranslationsStatus429Response | DocumentTranslationGetTranslationsStatus500Response | DocumentTranslationGetTranslationsStatus503Response>;
756
+ post(options: DocumentTranslationStartTranslationParameters): StreamableMethod<DocumentTranslationStartTranslation202Response | DocumentTranslationStartTranslation400Response | DocumentTranslationStartTranslation401Response | DocumentTranslationStartTranslation429Response | DocumentTranslationStartTranslation500Response | DocumentTranslationStartTranslation503Response>;
757
+ }
758
+
759
+ // @public
760
+ export interface StartTranslationDetails {
761
+ inputs: Array<BatchRequest>;
762
+ }
763
+
764
+ // @public (undocumented)
765
+ export interface StatusSummaryOutput {
766
+ cancelled: number;
767
+ failed: number;
768
+ inProgress: number;
769
+ notYetStarted: number;
770
+ success: number;
771
+ total: number;
772
+ totalCharacterCharged: number;
773
+ }
774
+
775
+ // @public
776
+ export interface SupportedFileFormatsOutput {
777
+ value: Array<FileFormatOutput>;
778
+ }
779
+
780
+ // @public
781
+ export interface SupportedStorageSourcesOutput {
782
+ value: Array<"AzureBlob">;
783
+ }
784
+
785
+ // @public
786
+ export interface TargetInput {
787
+ category?: string;
788
+ glossaries?: Array<Glossary>;
789
+ language: string;
790
+ storageSource?: "AzureBlob";
791
+ targetUrl: string;
792
+ }
793
+
794
+ // @public
795
+ export interface TranslationErrorOutput {
796
+ code: "InvalidRequest" | "InvalidArgument" | "InternalServerError" | "ServiceUnavailable" | "ResourceNotFound" | "Unauthorized" | "RequestRateTooHigh";
797
+ innerError?: InnerTranslationErrorOutput;
798
+ message: string;
799
+ readonly target?: string;
800
+ }
801
+
802
+ // @public
803
+ export interface TranslationErrorResponseOutput {
804
+ error?: TranslationErrorOutput;
805
+ }
806
+
807
+ // @public
808
+ export interface TranslationsStatusOutput {
809
+ "@nextLink"?: string;
810
+ value: Array<TranslationStatusOutput>;
811
+ }
812
+
813
+ // @public
814
+ export interface TranslationStatusOutput {
815
+ createdDateTimeUtc: string;
816
+ error?: TranslationErrorOutput;
817
+ id: string;
818
+ lastActionDateTimeUtc: string;
819
+ status: "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed";
820
+ // (undocumented)
821
+ summary: StatusSummaryOutput;
822
+ }
823
+
824
+ // (No @packageDocumentation comment for this package)
825
+
826
+ ```