@azure-rest/ai-translation-text 1.0.2-alpha.20250718.1 → 1.0.2-alpha.20250730.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.
- package/dist/browser/authenticationCustomized.js +6 -3
- package/dist/browser/authenticationCustomized.js.map +1 -1
- package/dist/browser/customClient.js +17 -14
- package/dist/browser/customClient.js.map +1 -1
- package/dist/browser/isUnexpected.js +4 -5
- package/dist/browser/isUnexpected.js.map +1 -1
- package/dist/browser/textTranslationClient.js +10 -9
- package/dist/browser/textTranslationClient.js.map +1 -1
- package/dist/commonjs/authenticationCustomized.js +6 -3
- package/dist/commonjs/authenticationCustomized.js.map +1 -1
- package/dist/commonjs/customClient.js +17 -14
- package/dist/commonjs/customClient.js.map +1 -1
- package/dist/commonjs/isUnexpected.js +4 -5
- package/dist/commonjs/isUnexpected.js.map +1 -1
- package/dist/commonjs/textTranslationClient.js +10 -9
- package/dist/commonjs/textTranslationClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/authenticationCustomized.js +6 -3
- package/dist/esm/authenticationCustomized.js.map +1 -1
- package/dist/esm/customClient.js +17 -14
- package/dist/esm/customClient.js.map +1 -1
- package/dist/esm/isUnexpected.js +4 -5
- package/dist/esm/isUnexpected.js.map +1 -1
- package/dist/esm/textTranslationClient.js +10 -9
- package/dist/esm/textTranslationClient.js.map +1 -1
- package/dist/react-native/authenticationCustomized.js +6 -3
- package/dist/react-native/authenticationCustomized.js.map +1 -1
- package/dist/react-native/customClient.js +17 -14
- package/dist/react-native/customClient.js.map +1 -1
- package/dist/react-native/isUnexpected.js +4 -5
- package/dist/react-native/isUnexpected.js.map +1 -1
- package/dist/react-native/textTranslationClient.js +10 -9
- package/dist/react-native/textTranslationClient.js.map +1 -1
- package/package.json +2 -2
- package/review/ai-translation-text-node.api.md +664 -664
|
@@ -1,664 +1,664 @@
|
|
|
1
|
-
## API Report File for "@azure-rest/ai-translation-text"
|
|
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 { Client } from '@azure-rest/core-client';
|
|
8
|
-
import type { ClientOptions } from '@azure-rest/core-client';
|
|
9
|
-
import type { HttpResponse } from '@azure-rest/core-client';
|
|
10
|
-
import type { KeyCredential } from '@azure/core-auth';
|
|
11
|
-
import type { RawHttpHeaders } from '@azure/core-rest-pipeline';
|
|
12
|
-
import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
|
|
13
|
-
import type { RequestParameters } from '@azure-rest/core-client';
|
|
14
|
-
import type { StreamableMethod } from '@azure-rest/core-client';
|
|
15
|
-
import type { TokenCredential } from '@azure/core-auth';
|
|
16
|
-
|
|
17
|
-
// @public
|
|
18
|
-
export interface BackTranslationOutput {
|
|
19
|
-
displayText: string;
|
|
20
|
-
frequencyCount: number;
|
|
21
|
-
normalizedText: string;
|
|
22
|
-
numExamples: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// @public
|
|
26
|
-
export interface BreakSentenceItemOutput {
|
|
27
|
-
detectedLanguage?: DetectedLanguageOutput;
|
|
28
|
-
sentLen: number[];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// @public (undocumented)
|
|
32
|
-
export function buildMultiCollection(items: string[], parameterName: string): string;
|
|
33
|
-
|
|
34
|
-
// @public
|
|
35
|
-
function createClient(credential: TranslatorCredential | TranslatorTokenCredential | KeyCredential | TokenCredential, options?: ClientOptions): TextTranslationClient;
|
|
36
|
-
|
|
37
|
-
// @public
|
|
38
|
-
function createClient(endpoint: string, options?: ClientOptions): TextTranslationClient;
|
|
39
|
-
|
|
40
|
-
// @public
|
|
41
|
-
function createClient(endpoint: string, credential: TranslatorCredential | TranslatorTokenCredential | KeyCredential | TokenCredential, options?: ClientOptions): TextTranslationClient;
|
|
42
|
-
export default createClient;
|
|
43
|
-
|
|
44
|
-
// @public
|
|
45
|
-
export interface DetectedLanguageOutput {
|
|
46
|
-
language: string;
|
|
47
|
-
score: number;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// @public
|
|
51
|
-
export interface DictionaryExampleItemOutput {
|
|
52
|
-
examples: Array<DictionaryExampleOutput>;
|
|
53
|
-
normalizedSource: string;
|
|
54
|
-
normalizedTarget: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// @public
|
|
58
|
-
export interface DictionaryExampleOutput {
|
|
59
|
-
sourcePrefix: string;
|
|
60
|
-
sourceSuffix: string;
|
|
61
|
-
sourceTerm: string;
|
|
62
|
-
targetPrefix: string;
|
|
63
|
-
targetSuffix: string;
|
|
64
|
-
targetTerm: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// @public
|
|
68
|
-
export interface DictionaryExampleTextItem extends InputTextItem {
|
|
69
|
-
translation: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// @public
|
|
73
|
-
export interface DictionaryLookupItemOutput {
|
|
74
|
-
displaySource: string;
|
|
75
|
-
normalizedSource: string;
|
|
76
|
-
translations: Array<DictionaryTranslationOutput>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// @public
|
|
80
|
-
export interface DictionaryTranslationOutput {
|
|
81
|
-
backTranslations: Array<BackTranslationOutput>;
|
|
82
|
-
confidence: number;
|
|
83
|
-
displayTarget: string;
|
|
84
|
-
normalizedTarget: string;
|
|
85
|
-
posTag: string;
|
|
86
|
-
prefixWord: string;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// @public
|
|
90
|
-
export interface ErrorDetailsOutput {
|
|
91
|
-
code: number;
|
|
92
|
-
message: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// @public
|
|
96
|
-
export interface ErrorResponseOutput {
|
|
97
|
-
error: ErrorDetailsOutput;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// @public (undocumented)
|
|
101
|
-
export interface FindSentenceBoundaries {
|
|
102
|
-
post(options: FindSentenceBoundariesParameters): StreamableMethod<FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// @public (undocumented)
|
|
106
|
-
export interface FindSentenceBoundaries200Headers {
|
|
107
|
-
"x-requestid": string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
// @public
|
|
111
|
-
export interface FindSentenceBoundaries200Response extends HttpResponse {
|
|
112
|
-
// (undocumented)
|
|
113
|
-
body: Array<BreakSentenceItemOutput>;
|
|
114
|
-
// (undocumented)
|
|
115
|
-
headers: RawHttpHeaders & FindSentenceBoundaries200Headers;
|
|
116
|
-
// (undocumented)
|
|
117
|
-
status: "200";
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// @public (undocumented)
|
|
121
|
-
export interface FindSentenceBoundariesBodyParam {
|
|
122
|
-
body: Array<InputTextItem>;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// @public (undocumented)
|
|
126
|
-
export interface FindSentenceBoundariesDefaultHeaders {
|
|
127
|
-
"x-requestid": string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// @public (undocumented)
|
|
131
|
-
export interface FindSentenceBoundariesDefaultResponse extends HttpResponse {
|
|
132
|
-
// (undocumented)
|
|
133
|
-
body: ErrorResponseOutput;
|
|
134
|
-
// (undocumented)
|
|
135
|
-
headers: RawHttpHeaders & FindSentenceBoundariesDefaultHeaders;
|
|
136
|
-
// (undocumented)
|
|
137
|
-
status: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// @public (undocumented)
|
|
141
|
-
export interface FindSentenceBoundariesHeaderParam {
|
|
142
|
-
// (undocumented)
|
|
143
|
-
headers?: RawHttpHeadersInput & FindSentenceBoundariesHeaders;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// @public (undocumented)
|
|
147
|
-
export interface FindSentenceBoundariesHeaders {
|
|
148
|
-
"X-ClientTraceId"?: string;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// @public (undocumented)
|
|
152
|
-
export type FindSentenceBoundariesParameters = FindSentenceBoundariesQueryParam & FindSentenceBoundariesHeaderParam & FindSentenceBoundariesBodyParam & RequestParameters;
|
|
153
|
-
|
|
154
|
-
// @public (undocumented)
|
|
155
|
-
export interface FindSentenceBoundariesQueryParam {
|
|
156
|
-
// (undocumented)
|
|
157
|
-
queryParameters?: FindSentenceBoundariesQueryParamProperties;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// @public (undocumented)
|
|
161
|
-
export interface FindSentenceBoundariesQueryParamProperties {
|
|
162
|
-
language?: string;
|
|
163
|
-
script?: string;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// @public (undocumented)
|
|
167
|
-
export interface GetSupportedLanguages {
|
|
168
|
-
get(options?: GetSupportedLanguagesParameters): StreamableMethod<GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse>;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// @public (undocumented)
|
|
172
|
-
export interface GetSupportedLanguages200Headers {
|
|
173
|
-
"x-requestid": string;
|
|
174
|
-
etag: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// @public
|
|
178
|
-
export interface GetSupportedLanguages200Response extends HttpResponse {
|
|
179
|
-
// (undocumented)
|
|
180
|
-
body: GetSupportedLanguagesResultOutput;
|
|
181
|
-
// (undocumented)
|
|
182
|
-
headers: RawHttpHeaders & GetSupportedLanguages200Headers;
|
|
183
|
-
// (undocumented)
|
|
184
|
-
status: "200";
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// @public (undocumented)
|
|
188
|
-
export interface GetSupportedLanguagesDefaultHeaders {
|
|
189
|
-
"x-requestid": string;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// @public (undocumented)
|
|
193
|
-
export interface GetSupportedLanguagesDefaultResponse extends HttpResponse {
|
|
194
|
-
// (undocumented)
|
|
195
|
-
body: ErrorResponseOutput;
|
|
196
|
-
// (undocumented)
|
|
197
|
-
headers: RawHttpHeaders & GetSupportedLanguagesDefaultHeaders;
|
|
198
|
-
// (undocumented)
|
|
199
|
-
status: string;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// @public (undocumented)
|
|
203
|
-
export interface GetSupportedLanguagesHeaderParam {
|
|
204
|
-
// (undocumented)
|
|
205
|
-
headers?: RawHttpHeadersInput & GetSupportedLanguagesHeaders;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// @public (undocumented)
|
|
209
|
-
export interface GetSupportedLanguagesHeaders {
|
|
210
|
-
"Accept-Language"?: string;
|
|
211
|
-
"If-None-Match"?: string;
|
|
212
|
-
"X-ClientTraceId"?: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
// @public (undocumented)
|
|
216
|
-
export type GetSupportedLanguagesParameters = GetSupportedLanguagesQueryParam & GetSupportedLanguagesHeaderParam & RequestParameters;
|
|
217
|
-
|
|
218
|
-
// @public (undocumented)
|
|
219
|
-
export interface GetSupportedLanguagesQueryParam {
|
|
220
|
-
// (undocumented)
|
|
221
|
-
queryParameters?: GetSupportedLanguagesQueryParamProperties;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// @public (undocumented)
|
|
225
|
-
export interface GetSupportedLanguagesQueryParamProperties {
|
|
226
|
-
scope?: string;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// @public
|
|
230
|
-
export interface GetSupportedLanguagesResultOutput {
|
|
231
|
-
dictionary?: Record<string, SourceDictionaryLanguageOutput>;
|
|
232
|
-
translation?: Record<string, TranslationLanguageOutput>;
|
|
233
|
-
transliteration?: Record<string, TransliterationLanguageOutput>;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
// @public
|
|
237
|
-
export interface InputTextItem {
|
|
238
|
-
text: string;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// @public (undocumented)
|
|
242
|
-
export function isUnexpected(response: GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse): response is GetSupportedLanguagesDefaultResponse;
|
|
243
|
-
|
|
244
|
-
// @public (undocumented)
|
|
245
|
-
export function isUnexpected(response: Translate200Response | TranslateDefaultResponse): response is TranslateDefaultResponse;
|
|
246
|
-
|
|
247
|
-
// @public (undocumented)
|
|
248
|
-
export function isUnexpected(response: Transliterate200Response | TransliterateDefaultResponse): response is TransliterateDefaultResponse;
|
|
249
|
-
|
|
250
|
-
// @public (undocumented)
|
|
251
|
-
export function isUnexpected(response: FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse): response is FindSentenceBoundariesDefaultResponse;
|
|
252
|
-
|
|
253
|
-
// @public (undocumented)
|
|
254
|
-
export function isUnexpected(response: LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse): response is LookupDictionaryEntriesDefaultResponse;
|
|
255
|
-
|
|
256
|
-
// @public (undocumented)
|
|
257
|
-
export function isUnexpected(response: LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse): response is LookupDictionaryExamplesDefaultResponse;
|
|
258
|
-
|
|
259
|
-
// @public
|
|
260
|
-
export type LanguageDirectionalityOutput = "ltr" | "rtl";
|
|
261
|
-
|
|
262
|
-
// @public
|
|
263
|
-
export interface LanguageScriptOutput {
|
|
264
|
-
code: string;
|
|
265
|
-
dir: LanguageDirectionalityOutput;
|
|
266
|
-
name: string;
|
|
267
|
-
nativeName: string;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// @public (undocumented)
|
|
271
|
-
export interface LookupDictionaryEntries {
|
|
272
|
-
post(options: LookupDictionaryEntriesParameters): StreamableMethod<LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse>;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// @public (undocumented)
|
|
276
|
-
export interface LookupDictionaryEntries200Headers {
|
|
277
|
-
"x-requestid": string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// @public
|
|
281
|
-
export interface LookupDictionaryEntries200Response extends HttpResponse {
|
|
282
|
-
// (undocumented)
|
|
283
|
-
body: Array<DictionaryLookupItemOutput>;
|
|
284
|
-
// (undocumented)
|
|
285
|
-
headers: RawHttpHeaders & LookupDictionaryEntries200Headers;
|
|
286
|
-
// (undocumented)
|
|
287
|
-
status: "200";
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// @public (undocumented)
|
|
291
|
-
export interface LookupDictionaryEntriesBodyParam {
|
|
292
|
-
body: Array<InputTextItem>;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// @public (undocumented)
|
|
296
|
-
export interface LookupDictionaryEntriesDefaultHeaders {
|
|
297
|
-
"x-requestid": string;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
// @public (undocumented)
|
|
301
|
-
export interface LookupDictionaryEntriesDefaultResponse extends HttpResponse {
|
|
302
|
-
// (undocumented)
|
|
303
|
-
body: ErrorResponseOutput;
|
|
304
|
-
// (undocumented)
|
|
305
|
-
headers: RawHttpHeaders & LookupDictionaryEntriesDefaultHeaders;
|
|
306
|
-
// (undocumented)
|
|
307
|
-
status: string;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// @public (undocumented)
|
|
311
|
-
export interface LookupDictionaryEntriesHeaderParam {
|
|
312
|
-
// (undocumented)
|
|
313
|
-
headers?: RawHttpHeadersInput & LookupDictionaryEntriesHeaders;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
// @public (undocumented)
|
|
317
|
-
export interface LookupDictionaryEntriesHeaders {
|
|
318
|
-
"X-ClientTraceId"?: string;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// @public (undocumented)
|
|
322
|
-
export type LookupDictionaryEntriesParameters = LookupDictionaryEntriesQueryParam & LookupDictionaryEntriesHeaderParam & LookupDictionaryEntriesBodyParam & RequestParameters;
|
|
323
|
-
|
|
324
|
-
// @public (undocumented)
|
|
325
|
-
export interface LookupDictionaryEntriesQueryParam {
|
|
326
|
-
// (undocumented)
|
|
327
|
-
queryParameters: LookupDictionaryEntriesQueryParamProperties;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
// @public (undocumented)
|
|
331
|
-
export interface LookupDictionaryEntriesQueryParamProperties {
|
|
332
|
-
from: string;
|
|
333
|
-
to: string;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// @public (undocumented)
|
|
337
|
-
export interface LookupDictionaryExamples {
|
|
338
|
-
post(options: LookupDictionaryExamplesParameters): StreamableMethod<LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse>;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
// @public (undocumented)
|
|
342
|
-
export interface LookupDictionaryExamples200Headers {
|
|
343
|
-
"x-requestid": string;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// @public
|
|
347
|
-
export interface LookupDictionaryExamples200Response extends HttpResponse {
|
|
348
|
-
// (undocumented)
|
|
349
|
-
body: Array<DictionaryExampleItemOutput>;
|
|
350
|
-
// (undocumented)
|
|
351
|
-
headers: RawHttpHeaders & LookupDictionaryExamples200Headers;
|
|
352
|
-
// (undocumented)
|
|
353
|
-
status: "200";
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// @public (undocumented)
|
|
357
|
-
export interface LookupDictionaryExamplesBodyParam {
|
|
358
|
-
body: Array<DictionaryExampleTextItem>;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
// @public (undocumented)
|
|
362
|
-
export interface LookupDictionaryExamplesDefaultHeaders {
|
|
363
|
-
"x-requestid": string;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// @public (undocumented)
|
|
367
|
-
export interface LookupDictionaryExamplesDefaultResponse extends HttpResponse {
|
|
368
|
-
// (undocumented)
|
|
369
|
-
body: ErrorResponseOutput;
|
|
370
|
-
// (undocumented)
|
|
371
|
-
headers: RawHttpHeaders & LookupDictionaryExamplesDefaultHeaders;
|
|
372
|
-
// (undocumented)
|
|
373
|
-
status: string;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
// @public (undocumented)
|
|
377
|
-
export interface LookupDictionaryExamplesHeaderParam {
|
|
378
|
-
// (undocumented)
|
|
379
|
-
headers?: RawHttpHeadersInput & LookupDictionaryExamplesHeaders;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
// @public (undocumented)
|
|
383
|
-
export interface LookupDictionaryExamplesHeaders {
|
|
384
|
-
"X-ClientTraceId"?: string;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// @public (undocumented)
|
|
388
|
-
export type LookupDictionaryExamplesParameters = LookupDictionaryExamplesQueryParam & LookupDictionaryExamplesHeaderParam & LookupDictionaryExamplesBodyParam & RequestParameters;
|
|
389
|
-
|
|
390
|
-
// @public (undocumented)
|
|
391
|
-
export interface LookupDictionaryExamplesQueryParam {
|
|
392
|
-
// (undocumented)
|
|
393
|
-
queryParameters: LookupDictionaryExamplesQueryParamProperties;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
// @public (undocumented)
|
|
397
|
-
export interface LookupDictionaryExamplesQueryParamProperties {
|
|
398
|
-
from: string;
|
|
399
|
-
to: string;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// @public
|
|
403
|
-
export type ProfanityAction = "NoAction" | "Marked" | "Deleted";
|
|
404
|
-
|
|
405
|
-
// @public
|
|
406
|
-
export type ProfanityMarker = "Asterisk" | "Tag";
|
|
407
|
-
|
|
408
|
-
// @public (undocumented)
|
|
409
|
-
export interface Routes {
|
|
410
|
-
(path: "/languages"): GetSupportedLanguages;
|
|
411
|
-
(path: "/translate"): Translate;
|
|
412
|
-
(path: "/transliterate"): Transliterate;
|
|
413
|
-
(path: "/breaksentence"): FindSentenceBoundaries;
|
|
414
|
-
(path: "/dictionary/lookup"): LookupDictionaryEntries;
|
|
415
|
-
(path: "/dictionary/examples"): LookupDictionaryExamples;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// @public
|
|
419
|
-
export interface SentenceBoundariesOutput {
|
|
420
|
-
srcSentLen: number[];
|
|
421
|
-
transSentLen: number[];
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// @public
|
|
425
|
-
export interface SourceDictionaryLanguageOutput {
|
|
426
|
-
dir: LanguageDirectionalityOutput;
|
|
427
|
-
name: string;
|
|
428
|
-
nativeName: string;
|
|
429
|
-
translations: Array<TargetDictionaryLanguageOutput>;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
// @public
|
|
433
|
-
export interface SourceTextOutput {
|
|
434
|
-
text: string;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
// @public
|
|
438
|
-
export interface TargetDictionaryLanguageOutput {
|
|
439
|
-
code: string;
|
|
440
|
-
dir: LanguageDirectionalityOutput;
|
|
441
|
-
name: string;
|
|
442
|
-
nativeName: string;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// @public (undocumented)
|
|
446
|
-
export type TextTranslationClient = Client & {
|
|
447
|
-
path: Routes;
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
// @public
|
|
451
|
-
export type TextType = string;
|
|
452
|
-
|
|
453
|
-
// @public (undocumented)
|
|
454
|
-
export interface Translate {
|
|
455
|
-
post(options: TranslateParameters): StreamableMethod<Translate200Response | TranslateDefaultResponse>;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
// @public (undocumented)
|
|
459
|
-
export interface Translate200Headers {
|
|
460
|
-
"x-metered-usage": number;
|
|
461
|
-
"x-mt-system": string;
|
|
462
|
-
"x-requestid": string;
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
// @public
|
|
466
|
-
export interface Translate200Response extends HttpResponse {
|
|
467
|
-
// (undocumented)
|
|
468
|
-
body: Array<TranslatedTextItemOutput>;
|
|
469
|
-
// (undocumented)
|
|
470
|
-
headers: RawHttpHeaders & Translate200Headers;
|
|
471
|
-
// (undocumented)
|
|
472
|
-
status: "200";
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// @public (undocumented)
|
|
476
|
-
export interface TranslateBodyParam {
|
|
477
|
-
body: Array<InputTextItem>;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
// @public (undocumented)
|
|
481
|
-
export interface TranslateDefaultHeaders {
|
|
482
|
-
"x-requestid": string;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
// @public (undocumented)
|
|
486
|
-
export interface TranslateDefaultResponse extends HttpResponse {
|
|
487
|
-
// (undocumented)
|
|
488
|
-
body: ErrorResponseOutput;
|
|
489
|
-
// (undocumented)
|
|
490
|
-
headers: RawHttpHeaders & TranslateDefaultHeaders;
|
|
491
|
-
// (undocumented)
|
|
492
|
-
status: string;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
// @public
|
|
496
|
-
export interface TranslatedTextAlignmentOutput {
|
|
497
|
-
proj: string;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// @public
|
|
501
|
-
export interface TranslatedTextItemOutput {
|
|
502
|
-
detectedLanguage?: DetectedLanguageOutput;
|
|
503
|
-
sourceText?: SourceTextOutput;
|
|
504
|
-
translations: Array<TranslationTextOutput>;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
// @public (undocumented)
|
|
508
|
-
export interface TranslateHeaderParam {
|
|
509
|
-
// (undocumented)
|
|
510
|
-
headers?: RawHttpHeadersInput & TranslateHeaders;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
// @public (undocumented)
|
|
514
|
-
export interface TranslateHeaders {
|
|
515
|
-
"X-ClientTraceId"?: string;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// @public (undocumented)
|
|
519
|
-
export type TranslateParameters = TranslateQueryParam & TranslateHeaderParam & TranslateBodyParam & RequestParameters;
|
|
520
|
-
|
|
521
|
-
// @public (undocumented)
|
|
522
|
-
export interface TranslateQueryParam {
|
|
523
|
-
// (undocumented)
|
|
524
|
-
queryParameters: TranslateQueryParamProperties;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
// @public (undocumented)
|
|
528
|
-
export interface TranslateQueryParamProperties {
|
|
529
|
-
allowFallback?: boolean;
|
|
530
|
-
category?: string;
|
|
531
|
-
from?: string;
|
|
532
|
-
fromScript?: string;
|
|
533
|
-
includeAlignment?: boolean;
|
|
534
|
-
includeSentenceLength?: boolean;
|
|
535
|
-
profanityAction?: ProfanityAction;
|
|
536
|
-
profanityMarker?: ProfanityMarker;
|
|
537
|
-
suggestedFrom?: string;
|
|
538
|
-
textType?: TextType;
|
|
539
|
-
to: string;
|
|
540
|
-
toScript?: string;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// @public
|
|
544
|
-
export interface TranslationLanguageOutput {
|
|
545
|
-
dir: LanguageDirectionalityOutput;
|
|
546
|
-
name: string;
|
|
547
|
-
nativeName: string;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
// @public
|
|
551
|
-
export interface TranslationTextOutput {
|
|
552
|
-
alignment?: TranslatedTextAlignmentOutput;
|
|
553
|
-
sentLen?: SentenceBoundariesOutput;
|
|
554
|
-
text: string;
|
|
555
|
-
to: string;
|
|
556
|
-
transliteration?: TransliteratedTextOutput;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// @public (undocumented)
|
|
560
|
-
export interface TranslatorCredential {
|
|
561
|
-
// (undocumented)
|
|
562
|
-
key: string;
|
|
563
|
-
// (undocumented)
|
|
564
|
-
region: string;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
// @public (undocumented)
|
|
568
|
-
export interface TranslatorTokenCredential {
|
|
569
|
-
// (undocumented)
|
|
570
|
-
azureResourceId: string;
|
|
571
|
-
// (undocumented)
|
|
572
|
-
region: string;
|
|
573
|
-
// (undocumented)
|
|
574
|
-
tokenCredential: TokenCredential;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
// @public
|
|
578
|
-
export interface TransliterableScriptOutput extends LanguageScriptOutput {
|
|
579
|
-
toScripts: Array<LanguageScriptOutput>;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
// @public (undocumented)
|
|
583
|
-
export interface Transliterate {
|
|
584
|
-
post(options: TransliterateParameters): StreamableMethod<Transliterate200Response | TransliterateDefaultResponse>;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
// @public (undocumented)
|
|
588
|
-
export interface Transliterate200Headers {
|
|
589
|
-
"x-requestid": string;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
// @public
|
|
593
|
-
export interface Transliterate200Response extends HttpResponse {
|
|
594
|
-
// (undocumented)
|
|
595
|
-
body: Array<TransliteratedTextOutput>;
|
|
596
|
-
// (undocumented)
|
|
597
|
-
headers: RawHttpHeaders & Transliterate200Headers;
|
|
598
|
-
// (undocumented)
|
|
599
|
-
status: "200";
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
// @public (undocumented)
|
|
603
|
-
export interface TransliterateBodyParam {
|
|
604
|
-
body: Array<InputTextItem>;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
// @public (undocumented)
|
|
608
|
-
export interface TransliterateDefaultHeaders {
|
|
609
|
-
"x-requestid": string;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
// @public (undocumented)
|
|
613
|
-
export interface TransliterateDefaultResponse extends HttpResponse {
|
|
614
|
-
// (undocumented)
|
|
615
|
-
body: ErrorResponseOutput;
|
|
616
|
-
// (undocumented)
|
|
617
|
-
headers: RawHttpHeaders & TransliterateDefaultHeaders;
|
|
618
|
-
// (undocumented)
|
|
619
|
-
status: string;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
// @public
|
|
623
|
-
export interface TransliteratedTextOutput {
|
|
624
|
-
script: string;
|
|
625
|
-
text: string;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// @public (undocumented)
|
|
629
|
-
export interface TransliterateHeaderParam {
|
|
630
|
-
// (undocumented)
|
|
631
|
-
headers?: RawHttpHeadersInput & TransliterateHeaders;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
// @public (undocumented)
|
|
635
|
-
export interface TransliterateHeaders {
|
|
636
|
-
"X-ClientTraceId"?: string;
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
// @public (undocumented)
|
|
640
|
-
export type TransliterateParameters = TransliterateQueryParam & TransliterateHeaderParam & TransliterateBodyParam & RequestParameters;
|
|
641
|
-
|
|
642
|
-
// @public (undocumented)
|
|
643
|
-
export interface TransliterateQueryParam {
|
|
644
|
-
// (undocumented)
|
|
645
|
-
queryParameters: TransliterateQueryParamProperties;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
// @public (undocumented)
|
|
649
|
-
export interface TransliterateQueryParamProperties {
|
|
650
|
-
fromScript: string;
|
|
651
|
-
language: string;
|
|
652
|
-
toScript: string;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
// @public
|
|
656
|
-
export interface TransliterationLanguageOutput {
|
|
657
|
-
name: string;
|
|
658
|
-
nativeName: string;
|
|
659
|
-
scripts: Array<TransliterableScriptOutput>;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
// (No @packageDocumentation comment for this package)
|
|
663
|
-
|
|
664
|
-
```
|
|
1
|
+
## API Report File for "@azure-rest/ai-translation-text"
|
|
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 { Client } from '@azure-rest/core-client';
|
|
8
|
+
import type { ClientOptions } from '@azure-rest/core-client';
|
|
9
|
+
import type { HttpResponse } from '@azure-rest/core-client';
|
|
10
|
+
import type { KeyCredential } from '@azure/core-auth';
|
|
11
|
+
import type { RawHttpHeaders } from '@azure/core-rest-pipeline';
|
|
12
|
+
import type { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
|
|
13
|
+
import type { RequestParameters } from '@azure-rest/core-client';
|
|
14
|
+
import type { StreamableMethod } from '@azure-rest/core-client';
|
|
15
|
+
import type { TokenCredential } from '@azure/core-auth';
|
|
16
|
+
|
|
17
|
+
// @public
|
|
18
|
+
export interface BackTranslationOutput {
|
|
19
|
+
displayText: string;
|
|
20
|
+
frequencyCount: number;
|
|
21
|
+
normalizedText: string;
|
|
22
|
+
numExamples: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// @public
|
|
26
|
+
export interface BreakSentenceItemOutput {
|
|
27
|
+
detectedLanguage?: DetectedLanguageOutput;
|
|
28
|
+
sentLen: number[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public (undocumented)
|
|
32
|
+
export function buildMultiCollection(items: string[], parameterName: string): string;
|
|
33
|
+
|
|
34
|
+
// @public
|
|
35
|
+
function createClient(credential: TranslatorCredential | TranslatorTokenCredential | KeyCredential | TokenCredential, options?: ClientOptions): TextTranslationClient;
|
|
36
|
+
|
|
37
|
+
// @public
|
|
38
|
+
function createClient(endpoint: string, options?: ClientOptions): TextTranslationClient;
|
|
39
|
+
|
|
40
|
+
// @public
|
|
41
|
+
function createClient(endpoint: string, credential: TranslatorCredential | TranslatorTokenCredential | KeyCredential | TokenCredential, options?: ClientOptions): TextTranslationClient;
|
|
42
|
+
export default createClient;
|
|
43
|
+
|
|
44
|
+
// @public
|
|
45
|
+
export interface DetectedLanguageOutput {
|
|
46
|
+
language: string;
|
|
47
|
+
score: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public
|
|
51
|
+
export interface DictionaryExampleItemOutput {
|
|
52
|
+
examples: Array<DictionaryExampleOutput>;
|
|
53
|
+
normalizedSource: string;
|
|
54
|
+
normalizedTarget: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// @public
|
|
58
|
+
export interface DictionaryExampleOutput {
|
|
59
|
+
sourcePrefix: string;
|
|
60
|
+
sourceSuffix: string;
|
|
61
|
+
sourceTerm: string;
|
|
62
|
+
targetPrefix: string;
|
|
63
|
+
targetSuffix: string;
|
|
64
|
+
targetTerm: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public
|
|
68
|
+
export interface DictionaryExampleTextItem extends InputTextItem {
|
|
69
|
+
translation: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// @public
|
|
73
|
+
export interface DictionaryLookupItemOutput {
|
|
74
|
+
displaySource: string;
|
|
75
|
+
normalizedSource: string;
|
|
76
|
+
translations: Array<DictionaryTranslationOutput>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// @public
|
|
80
|
+
export interface DictionaryTranslationOutput {
|
|
81
|
+
backTranslations: Array<BackTranslationOutput>;
|
|
82
|
+
confidence: number;
|
|
83
|
+
displayTarget: string;
|
|
84
|
+
normalizedTarget: string;
|
|
85
|
+
posTag: string;
|
|
86
|
+
prefixWord: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// @public
|
|
90
|
+
export interface ErrorDetailsOutput {
|
|
91
|
+
code: number;
|
|
92
|
+
message: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @public
|
|
96
|
+
export interface ErrorResponseOutput {
|
|
97
|
+
error: ErrorDetailsOutput;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// @public (undocumented)
|
|
101
|
+
export interface FindSentenceBoundaries {
|
|
102
|
+
post(options: FindSentenceBoundariesParameters): StreamableMethod<FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// @public (undocumented)
|
|
106
|
+
export interface FindSentenceBoundaries200Headers {
|
|
107
|
+
"x-requestid": string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// @public
|
|
111
|
+
export interface FindSentenceBoundaries200Response extends HttpResponse {
|
|
112
|
+
// (undocumented)
|
|
113
|
+
body: Array<BreakSentenceItemOutput>;
|
|
114
|
+
// (undocumented)
|
|
115
|
+
headers: RawHttpHeaders & FindSentenceBoundaries200Headers;
|
|
116
|
+
// (undocumented)
|
|
117
|
+
status: "200";
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// @public (undocumented)
|
|
121
|
+
export interface FindSentenceBoundariesBodyParam {
|
|
122
|
+
body: Array<InputTextItem>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// @public (undocumented)
|
|
126
|
+
export interface FindSentenceBoundariesDefaultHeaders {
|
|
127
|
+
"x-requestid": string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// @public (undocumented)
|
|
131
|
+
export interface FindSentenceBoundariesDefaultResponse extends HttpResponse {
|
|
132
|
+
// (undocumented)
|
|
133
|
+
body: ErrorResponseOutput;
|
|
134
|
+
// (undocumented)
|
|
135
|
+
headers: RawHttpHeaders & FindSentenceBoundariesDefaultHeaders;
|
|
136
|
+
// (undocumented)
|
|
137
|
+
status: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// @public (undocumented)
|
|
141
|
+
export interface FindSentenceBoundariesHeaderParam {
|
|
142
|
+
// (undocumented)
|
|
143
|
+
headers?: RawHttpHeadersInput & FindSentenceBoundariesHeaders;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// @public (undocumented)
|
|
147
|
+
export interface FindSentenceBoundariesHeaders {
|
|
148
|
+
"X-ClientTraceId"?: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// @public (undocumented)
|
|
152
|
+
export type FindSentenceBoundariesParameters = FindSentenceBoundariesQueryParam & FindSentenceBoundariesHeaderParam & FindSentenceBoundariesBodyParam & RequestParameters;
|
|
153
|
+
|
|
154
|
+
// @public (undocumented)
|
|
155
|
+
export interface FindSentenceBoundariesQueryParam {
|
|
156
|
+
// (undocumented)
|
|
157
|
+
queryParameters?: FindSentenceBoundariesQueryParamProperties;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// @public (undocumented)
|
|
161
|
+
export interface FindSentenceBoundariesQueryParamProperties {
|
|
162
|
+
language?: string;
|
|
163
|
+
script?: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// @public (undocumented)
|
|
167
|
+
export interface GetSupportedLanguages {
|
|
168
|
+
get(options?: GetSupportedLanguagesParameters): StreamableMethod<GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse>;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// @public (undocumented)
|
|
172
|
+
export interface GetSupportedLanguages200Headers {
|
|
173
|
+
"x-requestid": string;
|
|
174
|
+
etag: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// @public
|
|
178
|
+
export interface GetSupportedLanguages200Response extends HttpResponse {
|
|
179
|
+
// (undocumented)
|
|
180
|
+
body: GetSupportedLanguagesResultOutput;
|
|
181
|
+
// (undocumented)
|
|
182
|
+
headers: RawHttpHeaders & GetSupportedLanguages200Headers;
|
|
183
|
+
// (undocumented)
|
|
184
|
+
status: "200";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// @public (undocumented)
|
|
188
|
+
export interface GetSupportedLanguagesDefaultHeaders {
|
|
189
|
+
"x-requestid": string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// @public (undocumented)
|
|
193
|
+
export interface GetSupportedLanguagesDefaultResponse extends HttpResponse {
|
|
194
|
+
// (undocumented)
|
|
195
|
+
body: ErrorResponseOutput;
|
|
196
|
+
// (undocumented)
|
|
197
|
+
headers: RawHttpHeaders & GetSupportedLanguagesDefaultHeaders;
|
|
198
|
+
// (undocumented)
|
|
199
|
+
status: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// @public (undocumented)
|
|
203
|
+
export interface GetSupportedLanguagesHeaderParam {
|
|
204
|
+
// (undocumented)
|
|
205
|
+
headers?: RawHttpHeadersInput & GetSupportedLanguagesHeaders;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// @public (undocumented)
|
|
209
|
+
export interface GetSupportedLanguagesHeaders {
|
|
210
|
+
"Accept-Language"?: string;
|
|
211
|
+
"If-None-Match"?: string;
|
|
212
|
+
"X-ClientTraceId"?: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// @public (undocumented)
|
|
216
|
+
export type GetSupportedLanguagesParameters = GetSupportedLanguagesQueryParam & GetSupportedLanguagesHeaderParam & RequestParameters;
|
|
217
|
+
|
|
218
|
+
// @public (undocumented)
|
|
219
|
+
export interface GetSupportedLanguagesQueryParam {
|
|
220
|
+
// (undocumented)
|
|
221
|
+
queryParameters?: GetSupportedLanguagesQueryParamProperties;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// @public (undocumented)
|
|
225
|
+
export interface GetSupportedLanguagesQueryParamProperties {
|
|
226
|
+
scope?: string;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// @public
|
|
230
|
+
export interface GetSupportedLanguagesResultOutput {
|
|
231
|
+
dictionary?: Record<string, SourceDictionaryLanguageOutput>;
|
|
232
|
+
translation?: Record<string, TranslationLanguageOutput>;
|
|
233
|
+
transliteration?: Record<string, TransliterationLanguageOutput>;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// @public
|
|
237
|
+
export interface InputTextItem {
|
|
238
|
+
text: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// @public (undocumented)
|
|
242
|
+
export function isUnexpected(response: GetSupportedLanguages200Response | GetSupportedLanguagesDefaultResponse): response is GetSupportedLanguagesDefaultResponse;
|
|
243
|
+
|
|
244
|
+
// @public (undocumented)
|
|
245
|
+
export function isUnexpected(response: Translate200Response | TranslateDefaultResponse): response is TranslateDefaultResponse;
|
|
246
|
+
|
|
247
|
+
// @public (undocumented)
|
|
248
|
+
export function isUnexpected(response: Transliterate200Response | TransliterateDefaultResponse): response is TransliterateDefaultResponse;
|
|
249
|
+
|
|
250
|
+
// @public (undocumented)
|
|
251
|
+
export function isUnexpected(response: FindSentenceBoundaries200Response | FindSentenceBoundariesDefaultResponse): response is FindSentenceBoundariesDefaultResponse;
|
|
252
|
+
|
|
253
|
+
// @public (undocumented)
|
|
254
|
+
export function isUnexpected(response: LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse): response is LookupDictionaryEntriesDefaultResponse;
|
|
255
|
+
|
|
256
|
+
// @public (undocumented)
|
|
257
|
+
export function isUnexpected(response: LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse): response is LookupDictionaryExamplesDefaultResponse;
|
|
258
|
+
|
|
259
|
+
// @public
|
|
260
|
+
export type LanguageDirectionalityOutput = "ltr" | "rtl";
|
|
261
|
+
|
|
262
|
+
// @public
|
|
263
|
+
export interface LanguageScriptOutput {
|
|
264
|
+
code: string;
|
|
265
|
+
dir: LanguageDirectionalityOutput;
|
|
266
|
+
name: string;
|
|
267
|
+
nativeName: string;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// @public (undocumented)
|
|
271
|
+
export interface LookupDictionaryEntries {
|
|
272
|
+
post(options: LookupDictionaryEntriesParameters): StreamableMethod<LookupDictionaryEntries200Response | LookupDictionaryEntriesDefaultResponse>;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// @public (undocumented)
|
|
276
|
+
export interface LookupDictionaryEntries200Headers {
|
|
277
|
+
"x-requestid": string;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// @public
|
|
281
|
+
export interface LookupDictionaryEntries200Response extends HttpResponse {
|
|
282
|
+
// (undocumented)
|
|
283
|
+
body: Array<DictionaryLookupItemOutput>;
|
|
284
|
+
// (undocumented)
|
|
285
|
+
headers: RawHttpHeaders & LookupDictionaryEntries200Headers;
|
|
286
|
+
// (undocumented)
|
|
287
|
+
status: "200";
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// @public (undocumented)
|
|
291
|
+
export interface LookupDictionaryEntriesBodyParam {
|
|
292
|
+
body: Array<InputTextItem>;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// @public (undocumented)
|
|
296
|
+
export interface LookupDictionaryEntriesDefaultHeaders {
|
|
297
|
+
"x-requestid": string;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// @public (undocumented)
|
|
301
|
+
export interface LookupDictionaryEntriesDefaultResponse extends HttpResponse {
|
|
302
|
+
// (undocumented)
|
|
303
|
+
body: ErrorResponseOutput;
|
|
304
|
+
// (undocumented)
|
|
305
|
+
headers: RawHttpHeaders & LookupDictionaryEntriesDefaultHeaders;
|
|
306
|
+
// (undocumented)
|
|
307
|
+
status: string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// @public (undocumented)
|
|
311
|
+
export interface LookupDictionaryEntriesHeaderParam {
|
|
312
|
+
// (undocumented)
|
|
313
|
+
headers?: RawHttpHeadersInput & LookupDictionaryEntriesHeaders;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// @public (undocumented)
|
|
317
|
+
export interface LookupDictionaryEntriesHeaders {
|
|
318
|
+
"X-ClientTraceId"?: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// @public (undocumented)
|
|
322
|
+
export type LookupDictionaryEntriesParameters = LookupDictionaryEntriesQueryParam & LookupDictionaryEntriesHeaderParam & LookupDictionaryEntriesBodyParam & RequestParameters;
|
|
323
|
+
|
|
324
|
+
// @public (undocumented)
|
|
325
|
+
export interface LookupDictionaryEntriesQueryParam {
|
|
326
|
+
// (undocumented)
|
|
327
|
+
queryParameters: LookupDictionaryEntriesQueryParamProperties;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// @public (undocumented)
|
|
331
|
+
export interface LookupDictionaryEntriesQueryParamProperties {
|
|
332
|
+
from: string;
|
|
333
|
+
to: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// @public (undocumented)
|
|
337
|
+
export interface LookupDictionaryExamples {
|
|
338
|
+
post(options: LookupDictionaryExamplesParameters): StreamableMethod<LookupDictionaryExamples200Response | LookupDictionaryExamplesDefaultResponse>;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// @public (undocumented)
|
|
342
|
+
export interface LookupDictionaryExamples200Headers {
|
|
343
|
+
"x-requestid": string;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// @public
|
|
347
|
+
export interface LookupDictionaryExamples200Response extends HttpResponse {
|
|
348
|
+
// (undocumented)
|
|
349
|
+
body: Array<DictionaryExampleItemOutput>;
|
|
350
|
+
// (undocumented)
|
|
351
|
+
headers: RawHttpHeaders & LookupDictionaryExamples200Headers;
|
|
352
|
+
// (undocumented)
|
|
353
|
+
status: "200";
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// @public (undocumented)
|
|
357
|
+
export interface LookupDictionaryExamplesBodyParam {
|
|
358
|
+
body: Array<DictionaryExampleTextItem>;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// @public (undocumented)
|
|
362
|
+
export interface LookupDictionaryExamplesDefaultHeaders {
|
|
363
|
+
"x-requestid": string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// @public (undocumented)
|
|
367
|
+
export interface LookupDictionaryExamplesDefaultResponse extends HttpResponse {
|
|
368
|
+
// (undocumented)
|
|
369
|
+
body: ErrorResponseOutput;
|
|
370
|
+
// (undocumented)
|
|
371
|
+
headers: RawHttpHeaders & LookupDictionaryExamplesDefaultHeaders;
|
|
372
|
+
// (undocumented)
|
|
373
|
+
status: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// @public (undocumented)
|
|
377
|
+
export interface LookupDictionaryExamplesHeaderParam {
|
|
378
|
+
// (undocumented)
|
|
379
|
+
headers?: RawHttpHeadersInput & LookupDictionaryExamplesHeaders;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// @public (undocumented)
|
|
383
|
+
export interface LookupDictionaryExamplesHeaders {
|
|
384
|
+
"X-ClientTraceId"?: string;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// @public (undocumented)
|
|
388
|
+
export type LookupDictionaryExamplesParameters = LookupDictionaryExamplesQueryParam & LookupDictionaryExamplesHeaderParam & LookupDictionaryExamplesBodyParam & RequestParameters;
|
|
389
|
+
|
|
390
|
+
// @public (undocumented)
|
|
391
|
+
export interface LookupDictionaryExamplesQueryParam {
|
|
392
|
+
// (undocumented)
|
|
393
|
+
queryParameters: LookupDictionaryExamplesQueryParamProperties;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// @public (undocumented)
|
|
397
|
+
export interface LookupDictionaryExamplesQueryParamProperties {
|
|
398
|
+
from: string;
|
|
399
|
+
to: string;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// @public
|
|
403
|
+
export type ProfanityAction = "NoAction" | "Marked" | "Deleted";
|
|
404
|
+
|
|
405
|
+
// @public
|
|
406
|
+
export type ProfanityMarker = "Asterisk" | "Tag";
|
|
407
|
+
|
|
408
|
+
// @public (undocumented)
|
|
409
|
+
export interface Routes {
|
|
410
|
+
(path: "/languages"): GetSupportedLanguages;
|
|
411
|
+
(path: "/translate"): Translate;
|
|
412
|
+
(path: "/transliterate"): Transliterate;
|
|
413
|
+
(path: "/breaksentence"): FindSentenceBoundaries;
|
|
414
|
+
(path: "/dictionary/lookup"): LookupDictionaryEntries;
|
|
415
|
+
(path: "/dictionary/examples"): LookupDictionaryExamples;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// @public
|
|
419
|
+
export interface SentenceBoundariesOutput {
|
|
420
|
+
srcSentLen: number[];
|
|
421
|
+
transSentLen: number[];
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// @public
|
|
425
|
+
export interface SourceDictionaryLanguageOutput {
|
|
426
|
+
dir: LanguageDirectionalityOutput;
|
|
427
|
+
name: string;
|
|
428
|
+
nativeName: string;
|
|
429
|
+
translations: Array<TargetDictionaryLanguageOutput>;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
// @public
|
|
433
|
+
export interface SourceTextOutput {
|
|
434
|
+
text: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// @public
|
|
438
|
+
export interface TargetDictionaryLanguageOutput {
|
|
439
|
+
code: string;
|
|
440
|
+
dir: LanguageDirectionalityOutput;
|
|
441
|
+
name: string;
|
|
442
|
+
nativeName: string;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// @public (undocumented)
|
|
446
|
+
export type TextTranslationClient = Client & {
|
|
447
|
+
path: Routes;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
// @public
|
|
451
|
+
export type TextType = string;
|
|
452
|
+
|
|
453
|
+
// @public (undocumented)
|
|
454
|
+
export interface Translate {
|
|
455
|
+
post(options: TranslateParameters): StreamableMethod<Translate200Response | TranslateDefaultResponse>;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// @public (undocumented)
|
|
459
|
+
export interface Translate200Headers {
|
|
460
|
+
"x-metered-usage": number;
|
|
461
|
+
"x-mt-system": string;
|
|
462
|
+
"x-requestid": string;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// @public
|
|
466
|
+
export interface Translate200Response extends HttpResponse {
|
|
467
|
+
// (undocumented)
|
|
468
|
+
body: Array<TranslatedTextItemOutput>;
|
|
469
|
+
// (undocumented)
|
|
470
|
+
headers: RawHttpHeaders & Translate200Headers;
|
|
471
|
+
// (undocumented)
|
|
472
|
+
status: "200";
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// @public (undocumented)
|
|
476
|
+
export interface TranslateBodyParam {
|
|
477
|
+
body: Array<InputTextItem>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// @public (undocumented)
|
|
481
|
+
export interface TranslateDefaultHeaders {
|
|
482
|
+
"x-requestid": string;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// @public (undocumented)
|
|
486
|
+
export interface TranslateDefaultResponse extends HttpResponse {
|
|
487
|
+
// (undocumented)
|
|
488
|
+
body: ErrorResponseOutput;
|
|
489
|
+
// (undocumented)
|
|
490
|
+
headers: RawHttpHeaders & TranslateDefaultHeaders;
|
|
491
|
+
// (undocumented)
|
|
492
|
+
status: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// @public
|
|
496
|
+
export interface TranslatedTextAlignmentOutput {
|
|
497
|
+
proj: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// @public
|
|
501
|
+
export interface TranslatedTextItemOutput {
|
|
502
|
+
detectedLanguage?: DetectedLanguageOutput;
|
|
503
|
+
sourceText?: SourceTextOutput;
|
|
504
|
+
translations: Array<TranslationTextOutput>;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// @public (undocumented)
|
|
508
|
+
export interface TranslateHeaderParam {
|
|
509
|
+
// (undocumented)
|
|
510
|
+
headers?: RawHttpHeadersInput & TranslateHeaders;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// @public (undocumented)
|
|
514
|
+
export interface TranslateHeaders {
|
|
515
|
+
"X-ClientTraceId"?: string;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// @public (undocumented)
|
|
519
|
+
export type TranslateParameters = TranslateQueryParam & TranslateHeaderParam & TranslateBodyParam & RequestParameters;
|
|
520
|
+
|
|
521
|
+
// @public (undocumented)
|
|
522
|
+
export interface TranslateQueryParam {
|
|
523
|
+
// (undocumented)
|
|
524
|
+
queryParameters: TranslateQueryParamProperties;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// @public (undocumented)
|
|
528
|
+
export interface TranslateQueryParamProperties {
|
|
529
|
+
allowFallback?: boolean;
|
|
530
|
+
category?: string;
|
|
531
|
+
from?: string;
|
|
532
|
+
fromScript?: string;
|
|
533
|
+
includeAlignment?: boolean;
|
|
534
|
+
includeSentenceLength?: boolean;
|
|
535
|
+
profanityAction?: ProfanityAction;
|
|
536
|
+
profanityMarker?: ProfanityMarker;
|
|
537
|
+
suggestedFrom?: string;
|
|
538
|
+
textType?: TextType;
|
|
539
|
+
to: string;
|
|
540
|
+
toScript?: string;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// @public
|
|
544
|
+
export interface TranslationLanguageOutput {
|
|
545
|
+
dir: LanguageDirectionalityOutput;
|
|
546
|
+
name: string;
|
|
547
|
+
nativeName: string;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// @public
|
|
551
|
+
export interface TranslationTextOutput {
|
|
552
|
+
alignment?: TranslatedTextAlignmentOutput;
|
|
553
|
+
sentLen?: SentenceBoundariesOutput;
|
|
554
|
+
text: string;
|
|
555
|
+
to: string;
|
|
556
|
+
transliteration?: TransliteratedTextOutput;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// @public (undocumented)
|
|
560
|
+
export interface TranslatorCredential {
|
|
561
|
+
// (undocumented)
|
|
562
|
+
key: string;
|
|
563
|
+
// (undocumented)
|
|
564
|
+
region: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
// @public (undocumented)
|
|
568
|
+
export interface TranslatorTokenCredential {
|
|
569
|
+
// (undocumented)
|
|
570
|
+
azureResourceId: string;
|
|
571
|
+
// (undocumented)
|
|
572
|
+
region: string;
|
|
573
|
+
// (undocumented)
|
|
574
|
+
tokenCredential: TokenCredential;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
// @public
|
|
578
|
+
export interface TransliterableScriptOutput extends LanguageScriptOutput {
|
|
579
|
+
toScripts: Array<LanguageScriptOutput>;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// @public (undocumented)
|
|
583
|
+
export interface Transliterate {
|
|
584
|
+
post(options: TransliterateParameters): StreamableMethod<Transliterate200Response | TransliterateDefaultResponse>;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// @public (undocumented)
|
|
588
|
+
export interface Transliterate200Headers {
|
|
589
|
+
"x-requestid": string;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// @public
|
|
593
|
+
export interface Transliterate200Response extends HttpResponse {
|
|
594
|
+
// (undocumented)
|
|
595
|
+
body: Array<TransliteratedTextOutput>;
|
|
596
|
+
// (undocumented)
|
|
597
|
+
headers: RawHttpHeaders & Transliterate200Headers;
|
|
598
|
+
// (undocumented)
|
|
599
|
+
status: "200";
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// @public (undocumented)
|
|
603
|
+
export interface TransliterateBodyParam {
|
|
604
|
+
body: Array<InputTextItem>;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// @public (undocumented)
|
|
608
|
+
export interface TransliterateDefaultHeaders {
|
|
609
|
+
"x-requestid": string;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
// @public (undocumented)
|
|
613
|
+
export interface TransliterateDefaultResponse extends HttpResponse {
|
|
614
|
+
// (undocumented)
|
|
615
|
+
body: ErrorResponseOutput;
|
|
616
|
+
// (undocumented)
|
|
617
|
+
headers: RawHttpHeaders & TransliterateDefaultHeaders;
|
|
618
|
+
// (undocumented)
|
|
619
|
+
status: string;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// @public
|
|
623
|
+
export interface TransliteratedTextOutput {
|
|
624
|
+
script: string;
|
|
625
|
+
text: string;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
// @public (undocumented)
|
|
629
|
+
export interface TransliterateHeaderParam {
|
|
630
|
+
// (undocumented)
|
|
631
|
+
headers?: RawHttpHeadersInput & TransliterateHeaders;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
// @public (undocumented)
|
|
635
|
+
export interface TransliterateHeaders {
|
|
636
|
+
"X-ClientTraceId"?: string;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// @public (undocumented)
|
|
640
|
+
export type TransliterateParameters = TransliterateQueryParam & TransliterateHeaderParam & TransliterateBodyParam & RequestParameters;
|
|
641
|
+
|
|
642
|
+
// @public (undocumented)
|
|
643
|
+
export interface TransliterateQueryParam {
|
|
644
|
+
// (undocumented)
|
|
645
|
+
queryParameters: TransliterateQueryParamProperties;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// @public (undocumented)
|
|
649
|
+
export interface TransliterateQueryParamProperties {
|
|
650
|
+
fromScript: string;
|
|
651
|
+
language: string;
|
|
652
|
+
toScript: string;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// @public
|
|
656
|
+
export interface TransliterationLanguageOutput {
|
|
657
|
+
name: string;
|
|
658
|
+
nativeName: string;
|
|
659
|
+
scripts: Array<TransliterableScriptOutput>;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
// (No @packageDocumentation comment for this package)
|
|
663
|
+
|
|
664
|
+
```
|