@azure-rest/ai-translation-document 1.0.0-alpha.20250226.1 → 1.0.0-alpha.20250228.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.
Files changed (190) hide show
  1. package/README.md +227 -167
  2. package/dist/browser/clientDefinitions.d.ts +191 -0
  3. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  4. package/dist/browser/documentTranslationClient.d.ts +16 -0
  5. package/dist/browser/documentTranslationClient.d.ts.map +1 -0
  6. package/{dist-esm/src → dist/browser}/documentTranslationClient.js +1 -1
  7. package/dist/browser/documentTranslationClient.js.map +1 -0
  8. package/dist/browser/index.d.ts +12 -0
  9. package/dist/browser/index.d.ts.map +1 -0
  10. package/dist/browser/index.js +14 -0
  11. package/dist/browser/index.js.map +1 -0
  12. package/dist/browser/isUnexpected.d.ts +10 -0
  13. package/dist/browser/isUnexpected.d.ts.map +1 -0
  14. package/dist/browser/logger.d.ts +2 -0
  15. package/dist/browser/logger.d.ts.map +1 -0
  16. package/dist/browser/models.d.ts +112 -0
  17. package/dist/browser/models.d.ts.map +1 -0
  18. package/dist/browser/outputModels.d.ts +166 -0
  19. package/dist/browser/outputModels.d.ts.map +1 -0
  20. package/dist/browser/package.json +3 -0
  21. package/dist/browser/paginateHelper.d.ts +43 -0
  22. package/dist/browser/paginateHelper.d.ts.map +1 -0
  23. package/dist/browser/parameters.d.ts +184 -0
  24. package/dist/browser/parameters.d.ts.map +1 -0
  25. package/dist/browser/pollingHelper.d.ts +77 -0
  26. package/dist/browser/pollingHelper.d.ts.map +1 -0
  27. package/dist/browser/responses.d.ts +132 -0
  28. package/dist/browser/responses.d.ts.map +1 -0
  29. package/dist/commonjs/clientDefinitions.d.ts +191 -0
  30. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  31. package/dist/commonjs/clientDefinitions.js +3 -0
  32. package/dist/commonjs/clientDefinitions.js.map +1 -0
  33. package/dist/commonjs/documentTranslationClient.d.ts +16 -0
  34. package/dist/commonjs/documentTranslationClient.d.ts.map +1 -0
  35. package/dist/commonjs/documentTranslationClient.js +45 -0
  36. package/dist/commonjs/documentTranslationClient.js.map +1 -0
  37. package/dist/commonjs/index.d.ts +12 -0
  38. package/dist/commonjs/index.d.ts.map +1 -0
  39. package/dist/commonjs/index.js +17 -0
  40. package/dist/commonjs/index.js.map +1 -0
  41. package/dist/commonjs/isUnexpected.d.ts +10 -0
  42. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  43. package/dist/commonjs/isUnexpected.js +78 -0
  44. package/dist/commonjs/isUnexpected.js.map +1 -0
  45. package/dist/commonjs/logger.d.ts +2 -0
  46. package/dist/commonjs/logger.d.ts.map +1 -0
  47. package/dist/commonjs/logger.js +8 -0
  48. package/dist/commonjs/logger.js.map +1 -0
  49. package/dist/commonjs/models.d.ts +112 -0
  50. package/dist/commonjs/models.d.ts.map +1 -0
  51. package/dist/commonjs/models.js +5 -0
  52. package/dist/commonjs/models.js.map +1 -0
  53. package/dist/commonjs/outputModels.d.ts +166 -0
  54. package/dist/commonjs/outputModels.d.ts.map +1 -0
  55. package/dist/commonjs/outputModels.js +5 -0
  56. package/dist/commonjs/outputModels.js.map +1 -0
  57. package/dist/commonjs/package.json +3 -0
  58. package/dist/commonjs/paginateHelper.d.ts +43 -0
  59. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  60. package/dist/commonjs/paginateHelper.js +71 -0
  61. package/dist/commonjs/paginateHelper.js.map +1 -0
  62. package/dist/commonjs/parameters.d.ts +184 -0
  63. package/dist/commonjs/parameters.d.ts.map +1 -0
  64. package/dist/commonjs/parameters.js +3 -0
  65. package/dist/commonjs/parameters.js.map +1 -0
  66. package/dist/commonjs/pollingHelper.d.ts +77 -0
  67. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  68. package/dist/commonjs/pollingHelper.js +98 -0
  69. package/dist/commonjs/pollingHelper.js.map +1 -0
  70. package/dist/commonjs/responses.d.ts +132 -0
  71. package/dist/commonjs/responses.d.ts.map +1 -0
  72. package/dist/commonjs/responses.js +3 -0
  73. package/dist/commonjs/responses.js.map +1 -0
  74. package/dist/commonjs/tsdoc-metadata.json +11 -0
  75. package/dist/esm/clientDefinitions.d.ts +191 -0
  76. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  77. package/dist/esm/clientDefinitions.js +2 -0
  78. package/dist/esm/clientDefinitions.js.map +1 -0
  79. package/dist/esm/documentTranslationClient.d.ts +16 -0
  80. package/dist/esm/documentTranslationClient.d.ts.map +1 -0
  81. package/dist/esm/documentTranslationClient.js +42 -0
  82. package/dist/esm/documentTranslationClient.js.map +1 -0
  83. package/dist/esm/index.d.ts +12 -0
  84. package/dist/esm/index.d.ts.map +1 -0
  85. package/dist/esm/index.js +14 -0
  86. package/dist/esm/index.js.map +1 -0
  87. package/dist/esm/isUnexpected.d.ts +10 -0
  88. package/dist/esm/isUnexpected.d.ts.map +1 -0
  89. package/dist/esm/isUnexpected.js +75 -0
  90. package/dist/esm/isUnexpected.js.map +1 -0
  91. package/dist/esm/logger.d.ts +2 -0
  92. package/dist/esm/logger.d.ts.map +1 -0
  93. package/dist/esm/logger.js +5 -0
  94. package/dist/esm/logger.js.map +1 -0
  95. package/dist/esm/models.d.ts +112 -0
  96. package/dist/esm/models.d.ts.map +1 -0
  97. package/dist/esm/models.js +4 -0
  98. package/dist/esm/models.js.map +1 -0
  99. package/dist/esm/outputModels.d.ts +166 -0
  100. package/dist/esm/outputModels.d.ts.map +1 -0
  101. package/dist/esm/outputModels.js +4 -0
  102. package/dist/esm/outputModels.js.map +1 -0
  103. package/dist/esm/package.json +3 -0
  104. package/dist/esm/paginateHelper.d.ts +43 -0
  105. package/dist/esm/paginateHelper.d.ts.map +1 -0
  106. package/dist/esm/paginateHelper.js +68 -0
  107. package/dist/esm/paginateHelper.js.map +1 -0
  108. package/dist/esm/parameters.d.ts +184 -0
  109. package/dist/esm/parameters.d.ts.map +1 -0
  110. package/dist/esm/parameters.js +2 -0
  111. package/dist/esm/parameters.js.map +1 -0
  112. package/dist/esm/pollingHelper.d.ts +77 -0
  113. package/dist/esm/pollingHelper.d.ts.map +1 -0
  114. package/dist/esm/pollingHelper.js +95 -0
  115. package/dist/esm/pollingHelper.js.map +1 -0
  116. package/dist/esm/responses.d.ts +132 -0
  117. package/dist/esm/responses.d.ts.map +1 -0
  118. package/dist/esm/responses.js +2 -0
  119. package/dist/esm/responses.js.map +1 -0
  120. package/dist/react-native/clientDefinitions.d.ts +191 -0
  121. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  122. package/dist/react-native/clientDefinitions.js +2 -0
  123. package/dist/react-native/clientDefinitions.js.map +1 -0
  124. package/dist/react-native/documentTranslationClient.d.ts +16 -0
  125. package/dist/react-native/documentTranslationClient.d.ts.map +1 -0
  126. package/dist/react-native/documentTranslationClient.js +42 -0
  127. package/dist/react-native/documentTranslationClient.js.map +1 -0
  128. package/dist/react-native/index.d.ts +12 -0
  129. package/dist/react-native/index.d.ts.map +1 -0
  130. package/dist/react-native/index.js +14 -0
  131. package/dist/react-native/index.js.map +1 -0
  132. package/dist/react-native/isUnexpected.d.ts +10 -0
  133. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  134. package/dist/react-native/isUnexpected.js +75 -0
  135. package/dist/react-native/isUnexpected.js.map +1 -0
  136. package/dist/react-native/logger.d.ts +2 -0
  137. package/dist/react-native/logger.d.ts.map +1 -0
  138. package/dist/react-native/logger.js +5 -0
  139. package/dist/react-native/logger.js.map +1 -0
  140. package/dist/react-native/models.d.ts +112 -0
  141. package/dist/react-native/models.d.ts.map +1 -0
  142. package/dist/react-native/models.js +4 -0
  143. package/dist/react-native/models.js.map +1 -0
  144. package/dist/react-native/outputModels.d.ts +166 -0
  145. package/dist/react-native/outputModels.d.ts.map +1 -0
  146. package/dist/react-native/outputModels.js +4 -0
  147. package/dist/react-native/outputModels.js.map +1 -0
  148. package/dist/react-native/package.json +3 -0
  149. package/dist/react-native/paginateHelper.d.ts +43 -0
  150. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  151. package/dist/react-native/paginateHelper.js +68 -0
  152. package/dist/react-native/paginateHelper.js.map +1 -0
  153. package/dist/react-native/parameters.d.ts +184 -0
  154. package/dist/react-native/parameters.d.ts.map +1 -0
  155. package/dist/react-native/parameters.js +2 -0
  156. package/dist/react-native/parameters.js.map +1 -0
  157. package/dist/react-native/pollingHelper.d.ts +77 -0
  158. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  159. package/dist/react-native/pollingHelper.js +95 -0
  160. package/dist/react-native/pollingHelper.js.map +1 -0
  161. package/dist/react-native/responses.d.ts +132 -0
  162. package/dist/react-native/responses.d.ts.map +1 -0
  163. package/dist/react-native/responses.js +2 -0
  164. package/dist/react-native/responses.js.map +1 -0
  165. package/package.json +68 -43
  166. package/CHANGELOG.md +0 -34
  167. package/dist/index.js +0 -293
  168. package/dist/index.js.map +0 -1
  169. package/dist-esm/src/documentTranslationClient.js.map +0 -1
  170. package/dist-esm/src/index.js +0 -14
  171. package/dist-esm/src/index.js.map +0 -1
  172. package/types/ai-translation-document.d.ts +0 -1018
  173. /package/{dist-esm/src → dist/browser}/clientDefinitions.js +0 -0
  174. /package/{dist-esm/src → dist/browser}/clientDefinitions.js.map +0 -0
  175. /package/{dist-esm/src → dist/browser}/isUnexpected.js +0 -0
  176. /package/{dist-esm/src → dist/browser}/isUnexpected.js.map +0 -0
  177. /package/{dist-esm/src → dist/browser}/logger.js +0 -0
  178. /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
  179. /package/{dist-esm/src → dist/browser}/models.js +0 -0
  180. /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
  181. /package/{dist-esm/src → dist/browser}/outputModels.js +0 -0
  182. /package/{dist-esm/src → dist/browser}/outputModels.js.map +0 -0
  183. /package/{dist-esm/src → dist/browser}/paginateHelper.js +0 -0
  184. /package/{dist-esm/src → dist/browser}/paginateHelper.js.map +0 -0
  185. /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
  186. /package/{dist-esm/src → dist/browser}/parameters.js.map +0 -0
  187. /package/{dist-esm/src → dist/browser}/pollingHelper.js +0 -0
  188. /package/{dist-esm/src → dist/browser}/pollingHelper.js.map +0 -0
  189. /package/{dist-esm/src → dist/browser}/responses.js +0 -0
  190. /package/{dist-esm/src → dist/browser}/responses.js.map +0 -0
@@ -0,0 +1,184 @@
1
+ import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
2
+ import type { RequestParameters } from "@azure-rest/core-client";
3
+ import type { DocumentTranslateContent, StartTranslationDetails, FileFormatType } from "./models.js";
4
+ export interface DocumentTranslateHeaders {
5
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
6
+ "x-ms-client-request-id"?: string;
7
+ }
8
+ export interface DocumentTranslateBodyParam {
9
+ /** Document Translate Request Content */
10
+ body: DocumentTranslateContent;
11
+ }
12
+ export interface DocumentTranslateQueryParamProperties {
13
+ /**
14
+ * Specifies source language of the input document.
15
+ * If this parameter isn't specified, automatic language detection is applied to determine the source language.
16
+ * For example if the source document is written in English, then use sourceLanguage=en
17
+ */
18
+ sourceLanguage?: string;
19
+ /**
20
+ * Specifies the language of the output document.
21
+ * The target language must be one of the supported languages included in the translation scope.
22
+ * For example if you want to translate the document in German language, then use targetLanguage=de
23
+ */
24
+ targetLanguage: string;
25
+ /**
26
+ * A string specifying the category (domain) of the translation. This parameter is used to get translations
27
+ * from a customized system built with Custom Translator. Add the Category ID from your Custom Translator
28
+ * project details to this parameter to use your deployed customized system. Default value is: general.
29
+ */
30
+ category?: string;
31
+ /**
32
+ * Specifies that the service is allowed to fall back to a general system when a custom system doesn't exist.
33
+ * Possible values are: true (default) or false.
34
+ */
35
+ allowFallback?: boolean;
36
+ }
37
+ export interface DocumentTranslateQueryParam {
38
+ queryParameters: DocumentTranslateQueryParamProperties;
39
+ }
40
+ export interface DocumentTranslateHeaderParam {
41
+ headers?: RawHttpHeadersInput & DocumentTranslateHeaders;
42
+ }
43
+ export interface DocumentTranslateMediaTypesParam {
44
+ /** Content Type as multipart/form-data */
45
+ contentType: "multipart/form-data";
46
+ }
47
+ export type DocumentTranslateParameters = DocumentTranslateQueryParam & DocumentTranslateHeaderParam & DocumentTranslateMediaTypesParam & DocumentTranslateBodyParam & RequestParameters;
48
+ export interface StartTranslationBodyParam {
49
+ /** Translation job submission batch request */
50
+ body: StartTranslationDetails;
51
+ }
52
+ export type StartTranslationParameters = StartTranslationBodyParam & RequestParameters;
53
+ export interface GetTranslationsStatusQueryParamProperties {
54
+ /**
55
+ * top indicates the total number of records the user wants to be returned across
56
+ * all pages.
57
+ *
58
+ * Clients MAY use top and skip query parameters to
59
+ * specify a number of results to return and an offset into the collection.
60
+ * When
61
+ * both top and skip are given by a client, the server SHOULD first apply skip
62
+ * and then top on the collection.
63
+ *
64
+ * Note: If the server can't honor
65
+ * top and/or skip, the server MUST return an error to the client informing
66
+ * about it instead of just ignoring the query options.
67
+ */
68
+ top?: number;
69
+ /**
70
+ * skip indicates the number of records to skip from the list of records held by
71
+ * the server based on the sorting method specified. By default, we sort by
72
+ * descending start time.
73
+ *
74
+ * Clients MAY use top and skip query
75
+ * parameters to specify a number of results to return and an offset into the
76
+ * collection.
77
+ * When both top and skip are given by a client, the server SHOULD
78
+ * first apply skip and then top on the collection.
79
+ *
80
+ * Note: If the
81
+ * server can't honor top and/or skip, the server MUST return an error to the
82
+ * client informing about it instead of just ignoring the query options.
83
+ */
84
+ skip?: number;
85
+ /**
86
+ * maxpagesize is the maximum items returned in a page. If more items are
87
+ * requested via top (or top is not specified and there are more items to be
88
+ * returned), @nextLink will contain the link to the next page.
89
+ *
90
+ *
91
+ * Clients MAY request server-driven paging with a specific page size by
92
+ * specifying a maxpagesize preference. The server SHOULD honor this preference
93
+ * if the specified page size is smaller than the server's default page size.
94
+ */
95
+ maxpagesize?: number;
96
+ /** Ids to use in filtering */
97
+ ids?: string[];
98
+ /** Statuses to use in filtering */
99
+ statuses?: string[];
100
+ /** the start datetime to get items after */
101
+ createdDateTimeUtcStart?: Date | string;
102
+ /** the end datetime to get items before */
103
+ createdDateTimeUtcEnd?: Date | string;
104
+ /** the sorting query for the collection (ex: 'CreatedDateTimeUtc asc','CreatedDateTimeUtc desc') */
105
+ orderby?: string[];
106
+ }
107
+ export interface GetTranslationsStatusQueryParam {
108
+ queryParameters?: GetTranslationsStatusQueryParamProperties;
109
+ }
110
+ export type GetTranslationsStatusParameters = GetTranslationsStatusQueryParam & RequestParameters;
111
+ export type GetDocumentStatusParameters = RequestParameters;
112
+ export type GetTranslationStatusParameters = RequestParameters;
113
+ export type CancelTranslationParameters = RequestParameters;
114
+ export interface GetDocumentsStatusQueryParamProperties {
115
+ /**
116
+ * top indicates the total number of records the user wants to be returned across
117
+ * all pages.
118
+ *
119
+ * Clients MAY use top and skip query parameters to
120
+ * specify a number of results to return and an offset into the collection.
121
+ * When
122
+ * both top and skip are given by a client, the server SHOULD first apply skip
123
+ * and then top on the collection.
124
+ *
125
+ * Note: If the server can't honor
126
+ * top and/or skip, the server MUST return an error to the client informing
127
+ * about it instead of just ignoring the query options.
128
+ */
129
+ top?: number;
130
+ /**
131
+ * skip indicates the number of records to skip from the list of records held by
132
+ * the server based on the sorting method specified. By default, we sort by
133
+ * descending start time.
134
+ *
135
+ * Clients MAY use top and skip query
136
+ * parameters to specify a number of results to return and an offset into the
137
+ * collection.
138
+ * When both top and skip are given by a client, the server SHOULD
139
+ * first apply skip and then top on the collection.
140
+ *
141
+ * Note: If the
142
+ * server can't honor top and/or skip, the server MUST return an error to the
143
+ * client informing about it instead of just ignoring the query options.
144
+ */
145
+ skip?: number;
146
+ /**
147
+ * maxpagesize is the maximum items returned in a page. If more items are
148
+ * requested via top (or top is not specified and there are more items to be
149
+ * returned), @nextLink will contain the link to the next page.
150
+ *
151
+ *
152
+ * Clients MAY request server-driven paging with a specific page size by
153
+ * specifying a maxpagesize preference. The server SHOULD honor this preference
154
+ * if the specified page size is smaller than the server's default page size.
155
+ */
156
+ maxpagesize?: number;
157
+ /** Ids to use in filtering */
158
+ ids?: string[];
159
+ /** Statuses to use in filtering */
160
+ statuses?: string[];
161
+ /** the start datetime to get items after */
162
+ createdDateTimeUtcStart?: Date | string;
163
+ /** the end datetime to get items before */
164
+ createdDateTimeUtcEnd?: Date | string;
165
+ /** the sorting query for the collection (ex: 'CreatedDateTimeUtc asc','CreatedDateTimeUtc desc') */
166
+ orderby?: string[];
167
+ }
168
+ export interface GetDocumentsStatusQueryParam {
169
+ queryParameters?: GetDocumentsStatusQueryParamProperties;
170
+ }
171
+ export type GetDocumentsStatusParameters = GetDocumentsStatusQueryParam & RequestParameters;
172
+ export interface GetSupportedFormatsQueryParamProperties {
173
+ /**
174
+ * the type of format like document or glossary
175
+ *
176
+ * Possible values: "document", "glossary"
177
+ */
178
+ type?: FileFormatType;
179
+ }
180
+ export interface GetSupportedFormatsQueryParam {
181
+ queryParameters?: GetSupportedFormatsQueryParamProperties;
182
+ }
183
+ export type GetSupportedFormatsParameters = GetSupportedFormatsQueryParam & RequestParameters;
184
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,EACf,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAwB;IACvC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,0BAA0B;IACzC,yCAAyC;IACzC,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,MAAM,WAAW,qCAAqC;IACpD;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IAC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M,2BAA2B,GAAG,iBAAiB,CAAC;AAC5D,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAC/D,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,WAAW,sCAAsC;IACrD;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,4CAA4C;IAC5C,uBAAuB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxC,2CAA2C;IAC3C,qBAAqB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtC,oGAAoG;IACpG,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,sCAAsC,CAAC;CAC1D;AAED,MAAM,MAAM,4BAA4B,GAAG,4BAA4B,GAAG,iBAAiB,CAAC;AAE5F,MAAM,WAAW,uCAAuC;IACtD;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,CAAC,EAAE,uCAAuC,CAAC;CAC3D;AAED,MAAM,MAAM,6BAA6B,GAAG,6BAA6B,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import type { Client } from "@azure-rest/core-client";
2
+ import type { AbortSignalLike } from "@azure/abort-controller";
3
+ import type { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
4
+ import type { StartTranslation202Response, StartTranslationDefaultResponse, StartTranslationLogicalResponse } from "./responses.js";
5
+ /**
6
+ * A simple poller that can be used to poll a long running operation.
7
+ */
8
+ export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
9
+ /**
10
+ * Returns true if the poller has finished polling.
11
+ */
12
+ isDone(): boolean;
13
+ /**
14
+ * Returns the state of the operation.
15
+ */
16
+ getOperationState(): TState;
17
+ /**
18
+ * Returns the result value of the operation,
19
+ * regardless of the state of the poller.
20
+ * It can return undefined or an incomplete form of the final TResult value
21
+ * depending on the implementation.
22
+ */
23
+ getResult(): TResult | undefined;
24
+ /**
25
+ * Returns a promise that will resolve once a single polling request finishes.
26
+ * It does this by calling the update method of the Poller's operation.
27
+ */
28
+ poll(options?: {
29
+ abortSignal?: AbortSignalLike;
30
+ }): Promise<TState>;
31
+ /**
32
+ * Returns a promise that will resolve once the underlying operation is completed.
33
+ */
34
+ pollUntilDone(pollOptions?: {
35
+ abortSignal?: AbortSignalLike;
36
+ }): Promise<TResult>;
37
+ /**
38
+ * Invokes the provided callback after each polling is completed,
39
+ * sending the current state of the poller's operation.
40
+ *
41
+ * It returns a method that can be used to stop receiving updates on the given callback function.
42
+ */
43
+ onProgress(callback: (state: TState) => void): CancelOnProgress;
44
+ /**
45
+ * Returns a promise that could be used for serialized version of the poller's operation
46
+ * by invoking the operation's serialize method.
47
+ */
48
+ serialize(): Promise<string>;
49
+ /**
50
+ * Wait the poller to be submitted.
51
+ */
52
+ submitted(): Promise<void>;
53
+ /**
54
+ * Returns a string representation of the poller's operation. Similar to serialize but returns a string.
55
+ * @deprecated Use serialize() instead.
56
+ */
57
+ toString(): string;
58
+ /**
59
+ * Stops the poller from continuing to poll. Please note this will only stop the client-side polling
60
+ * @deprecated Use abortSignal to stop polling instead.
61
+ */
62
+ stopPolling(): void;
63
+ /**
64
+ * Returns true if the poller is stopped.
65
+ * @deprecated Use abortSignal status to track this instead.
66
+ */
67
+ isStopped(): boolean;
68
+ }
69
+ /**
70
+ * Helper function that builds a Poller object to help polling a long running operation.
71
+ * @param client - Client to use for sending the request to get additional pages.
72
+ * @param initialResponse - The initial response.
73
+ * @param options - Options to set a resume state or custom polling interval.
74
+ * @returns - A poller object to poll for operation state updates and eventually get the final response.
75
+ */
76
+ export declare function getLongRunningPoller<TResult extends StartTranslationLogicalResponse | StartTranslationDefaultResponse>(client: Client, initialResponse: StartTranslation202Response | StartTranslationDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
77
+ //# sourceMappingURL=pollingHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EAGvB,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO;IAC/E;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,IAAI,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,SAAS,IAAI,OAAO,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE;;OAEG;IACH,aAAa,CAAC,WAAW,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjF;;;;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAAC;IAEhE;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,QAAQ,IAAI,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,SAAS,+BAA+B,GAAG,+BAA+B,EAEjF,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,2BAA2B,GAAG,+BAA+B,EAC9E,OAAO,CAAC,EAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,GAClE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -0,0 +1,132 @@
1
+ import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
+ import type { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
3
+ import type { TranslationsStatusOutput, DocumentStatusOutput, TranslationStatusOutput, DocumentsStatusOutput, SupportedFileFormatsOutput } from "./outputModels.js";
4
+ export interface DocumentTranslate200Headers {
5
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
6
+ "x-ms-client-request-id"?: string;
7
+ /** response content type */
8
+ "content-type": "application/octet-stream";
9
+ }
10
+ /** The request has succeeded. */
11
+ export interface DocumentTranslate200Response extends HttpResponse {
12
+ status: "200";
13
+ /** Value may contain any sequence of octets */
14
+ body: Uint8Array;
15
+ headers: RawHttpHeaders & DocumentTranslate200Headers;
16
+ }
17
+ export interface DocumentTranslateDefaultHeaders {
18
+ /** String error code indicating what went wrong. */
19
+ "x-ms-error-code"?: string;
20
+ }
21
+ export interface DocumentTranslateDefaultResponse extends HttpResponse {
22
+ status: string;
23
+ body: ErrorResponse;
24
+ headers: RawHttpHeaders & DocumentTranslateDefaultHeaders;
25
+ }
26
+ export interface StartTranslation202Headers {
27
+ /** Link to the translation operation status */
28
+ "operation-location": string;
29
+ }
30
+ /** The request has been accepted for processing, but processing has not yet completed. */
31
+ export interface StartTranslation202Response extends HttpResponse {
32
+ status: "202";
33
+ headers: RawHttpHeaders & StartTranslation202Headers;
34
+ }
35
+ export interface StartTranslationDefaultHeaders {
36
+ /** String error code indicating what went wrong. */
37
+ "x-ms-error-code"?: string;
38
+ }
39
+ export interface StartTranslationDefaultResponse extends HttpResponse {
40
+ status: string;
41
+ body: ErrorResponse;
42
+ headers: RawHttpHeaders & StartTranslationDefaultHeaders;
43
+ }
44
+ /** The final response for long-running startTranslation operation */
45
+ export interface StartTranslationLogicalResponse extends HttpResponse {
46
+ status: "200";
47
+ }
48
+ /** The request has succeeded. */
49
+ export interface GetTranslationsStatus200Response extends HttpResponse {
50
+ status: "200";
51
+ body: TranslationsStatusOutput;
52
+ }
53
+ export interface GetTranslationsStatusDefaultHeaders {
54
+ /** String error code indicating what went wrong. */
55
+ "x-ms-error-code"?: string;
56
+ }
57
+ export interface GetTranslationsStatusDefaultResponse extends HttpResponse {
58
+ status: string;
59
+ body: ErrorResponse;
60
+ headers: RawHttpHeaders & GetTranslationsStatusDefaultHeaders;
61
+ }
62
+ /** The request has succeeded. */
63
+ export interface GetDocumentStatus200Response extends HttpResponse {
64
+ status: "200";
65
+ body: DocumentStatusOutput;
66
+ }
67
+ export interface GetDocumentStatusDefaultHeaders {
68
+ /** String error code indicating what went wrong. */
69
+ "x-ms-error-code"?: string;
70
+ }
71
+ export interface GetDocumentStatusDefaultResponse extends HttpResponse {
72
+ status: string;
73
+ body: ErrorResponse;
74
+ headers: RawHttpHeaders & GetDocumentStatusDefaultHeaders;
75
+ }
76
+ /** The request has succeeded. */
77
+ export interface GetTranslationStatus200Response extends HttpResponse {
78
+ status: "200";
79
+ body: TranslationStatusOutput;
80
+ }
81
+ export interface GetTranslationStatusDefaultHeaders {
82
+ /** String error code indicating what went wrong. */
83
+ "x-ms-error-code"?: string;
84
+ }
85
+ export interface GetTranslationStatusDefaultResponse extends HttpResponse {
86
+ status: string;
87
+ body: ErrorResponse;
88
+ headers: RawHttpHeaders & GetTranslationStatusDefaultHeaders;
89
+ }
90
+ /** The request has succeeded. */
91
+ export interface CancelTranslation200Response extends HttpResponse {
92
+ status: "200";
93
+ body: TranslationStatusOutput;
94
+ }
95
+ export interface CancelTranslationDefaultHeaders {
96
+ /** String error code indicating what went wrong. */
97
+ "x-ms-error-code"?: string;
98
+ }
99
+ export interface CancelTranslationDefaultResponse extends HttpResponse {
100
+ status: string;
101
+ body: ErrorResponse;
102
+ headers: RawHttpHeaders & CancelTranslationDefaultHeaders;
103
+ }
104
+ /** The request has succeeded. */
105
+ export interface GetDocumentsStatus200Response extends HttpResponse {
106
+ status: "200";
107
+ body: DocumentsStatusOutput;
108
+ }
109
+ export interface GetDocumentsStatusDefaultHeaders {
110
+ /** String error code indicating what went wrong. */
111
+ "x-ms-error-code"?: string;
112
+ }
113
+ export interface GetDocumentsStatusDefaultResponse extends HttpResponse {
114
+ status: string;
115
+ body: ErrorResponse;
116
+ headers: RawHttpHeaders & GetDocumentsStatusDefaultHeaders;
117
+ }
118
+ /** The request has succeeded. */
119
+ export interface GetSupportedFormats200Response extends HttpResponse {
120
+ status: "200";
121
+ body: SupportedFileFormatsOutput;
122
+ }
123
+ export interface GetSupportedFormatsDefaultHeaders {
124
+ /** String error code indicating what went wrong. */
125
+ "x-ms-error-code"?: string;
126
+ }
127
+ export interface GetSupportedFormatsDefaultResponse extends HttpResponse {
128
+ status: string;
129
+ body: ErrorResponse;
130
+ headers: RawHttpHeaders & GetSupportedFormatsDefaultHeaders;
131
+ }
132
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK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AC;IACd,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,+BAA+B;IAC9C,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,gCAAiC,SAAQ,YAAY;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,+BAA+B,CAAC;CAC3D;AAED,iCAAiC;AACjC,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IACjE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAED,MAAM,WAAW,gCAAgC;IAC/C,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iCAAkC,SAAQ,YAAY;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,gCAAgC,CAAC;CAC5D;AAED,iCAAiC;AACjC,MAAM,WAAW,8BAA+B,SAAQ,YAAY;IAClE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,0BAA0B,CAAC;CAClC;AAED,MAAM,WAAW,iCAAiC;IAChD,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,kCAAmC,SAAQ,YAAY;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,iCAAiC,CAAC;CAC7D"}
@@ -0,0 +1,191 @@
1
+ import type { DocumentTranslateParameters, StartTranslationParameters, GetTranslationsStatusParameters, GetDocumentStatusParameters, GetTranslationStatusParameters, CancelTranslationParameters, GetDocumentsStatusParameters, GetSupportedFormatsParameters } from "./parameters.js";
2
+ import type { DocumentTranslate200Response, DocumentTranslateDefaultResponse, StartTranslation202Response, StartTranslationDefaultResponse, GetTranslationsStatus200Response, GetTranslationsStatusDefaultResponse, GetDocumentStatus200Response, GetDocumentStatusDefaultResponse, GetTranslationStatus200Response, GetTranslationStatusDefaultResponse, CancelTranslation200Response, CancelTranslationDefaultResponse, GetDocumentsStatus200Response, GetDocumentsStatusDefaultResponse, GetSupportedFormats200Response, GetSupportedFormatsDefaultResponse } from "./responses.js";
3
+ import type { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface DocumentTranslate {
5
+ /** Use this API to submit a single translation request to the Document Translation Service. */
6
+ post(options: DocumentTranslateParameters): StreamableMethod<DocumentTranslate200Response | DocumentTranslateDefaultResponse>;
7
+ }
8
+ export interface StartTranslation {
9
+ /**
10
+ * Use this API to submit a bulk (batch) translation request to the Document
11
+ * Translation service.
12
+ * Each request can contain multiple documents and must
13
+ * contain a source and destination container for each document.
14
+ *
15
+ * The
16
+ * prefix and suffix filter (if supplied) are used to filter folders. The prefix
17
+ * is applied to the subpath after the container name.
18
+ *
19
+ * Glossaries /
20
+ * Translation memory can be included in the request and are applied by the
21
+ * service when the document is translated.
22
+ *
23
+ * If the glossary is
24
+ * invalid or unreachable during translation, an error is indicated in the
25
+ * document status.
26
+ * If a file with the same name already exists at the
27
+ * destination, it will be overwritten. The targetUrl for each target language
28
+ * must be unique.
29
+ */
30
+ post(options: StartTranslationParameters): StreamableMethod<StartTranslation202Response | StartTranslationDefaultResponse>;
31
+ /**
32
+ * Returns a list of batch requests submitted and the status for each
33
+ * request.
34
+ * This list only contains batch requests submitted by the user (based on
35
+ * the resource).
36
+ *
37
+ * If the number of requests exceeds our paging limit,
38
+ * server-side paging is used. Paginated responses indicate a partial result and
39
+ * include a continuation token in the response.
40
+ * The absence of a continuation
41
+ * token means that no additional pages are available.
42
+ *
43
+ * top, skip
44
+ * and maxpagesize query parameters can be used to specify a number of results to
45
+ * return and an offset for the collection.
46
+ *
47
+ * top indicates the total
48
+ * number of records the user wants to be returned across all pages.
49
+ * skip
50
+ * indicates the number of records to skip from the list of batches based on the
51
+ * sorting method specified. By default, we sort by descending start
52
+ * time.
53
+ * maxpagesize is the maximum items returned in a page. If more items are
54
+ * requested via top (or top is not specified and there are more items to be
55
+ * returned), @nextLink will contain the link to the next page.
56
+ *
57
+ *
58
+ * orderby query parameter can be used to sort the returned list (ex
59
+ * "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc
60
+ * desc").
61
+ * The default sorting is descending by createdDateTimeUtc.
62
+ * Some query
63
+ * parameters can be used to filter the returned list (ex:
64
+ * "status=Succeeded,Cancelled") will only return succeeded and cancelled
65
+ * operations.
66
+ * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used
67
+ * combined or separately to specify a range of datetime to filter the returned
68
+ * list by.
69
+ * The supported filtering query parameters are (status, ids,
70
+ * createdDateTimeUtcStart, createdDateTimeUtcEnd).
71
+ *
72
+ * The server honors
73
+ * the values specified by the client. However, clients must be prepared to handle
74
+ * responses that contain a different page size or contain a continuation token.
75
+ *
76
+ *
77
+ * When both top and skip are included, the server should first apply
78
+ * skip and then top on the collection.
79
+ * Note: If the server can't honor top
80
+ * and/or skip, the server must return an error to the client informing about it
81
+ * instead of just ignoring the query options.
82
+ * This reduces the risk of the client
83
+ * making assumptions about the data returned.
84
+ */
85
+ get(options?: GetTranslationsStatusParameters): StreamableMethod<GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse>;
86
+ }
87
+ export interface GetDocumentStatus {
88
+ /**
89
+ * Returns the translation status for a specific document based on the request Id
90
+ * and document Id.
91
+ */
92
+ get(options?: GetDocumentStatusParameters): StreamableMethod<GetDocumentStatus200Response | GetDocumentStatusDefaultResponse>;
93
+ }
94
+ export interface GetTranslationStatus {
95
+ /**
96
+ * Returns the status for a document translation request.
97
+ * The status includes the
98
+ * overall request status, as well as the status for documents that are being
99
+ * translated as part of that request.
100
+ */
101
+ get(options?: GetTranslationStatusParameters): StreamableMethod<GetTranslationStatus200Response | GetTranslationStatusDefaultResponse>;
102
+ /**
103
+ * Cancel a currently processing or queued translation.
104
+ * A translation will not be
105
+ * cancelled if it is already completed or failed or cancelling. A bad request
106
+ * will be returned.
107
+ * All documents that have completed translation will not be
108
+ * cancelled and will be charged.
109
+ * All pending documents will be cancelled if
110
+ * possible.
111
+ */
112
+ delete(options?: CancelTranslationParameters): StreamableMethod<CancelTranslation200Response | CancelTranslationDefaultResponse>;
113
+ }
114
+ export interface GetDocumentsStatus {
115
+ /**
116
+ * Returns the status for all documents in a batch document translation request.
117
+ *
118
+ *
119
+ * If the number of documents in the response exceeds our paging limit,
120
+ * server-side paging is used.
121
+ * Paginated responses indicate a partial result and
122
+ * include a continuation token in the response. The absence of a continuation
123
+ * token means that no additional pages are available.
124
+ *
125
+ * top, skip
126
+ * and maxpagesize query parameters can be used to specify a number of results to
127
+ * return and an offset for the collection.
128
+ *
129
+ * top indicates the total
130
+ * number of records the user wants to be returned across all pages.
131
+ * skip
132
+ * indicates the number of records to skip from the list of document status held
133
+ * by the server based on the sorting method specified. By default, we sort by
134
+ * descending start time.
135
+ * maxpagesize is the maximum items returned in a page.
136
+ * If more items are requested via top (or top is not specified and there are
137
+ * more items to be returned), @nextLink will contain the link to the next page.
138
+ *
139
+ *
140
+ * orderby query parameter can be used to sort the returned list (ex
141
+ * "orderby=createdDateTimeUtc asc" or "orderby=createdDateTimeUtc
142
+ * desc").
143
+ * The default sorting is descending by createdDateTimeUtc.
144
+ * Some query
145
+ * parameters can be used to filter the returned list (ex:
146
+ * "status=Succeeded,Cancelled") will only return succeeded and cancelled
147
+ * documents.
148
+ * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used
149
+ * combined or separately to specify a range of datetime to filter the returned
150
+ * list by.
151
+ * The supported filtering query parameters are (status, ids,
152
+ * createdDateTimeUtcStart, createdDateTimeUtcEnd).
153
+ *
154
+ * When both top
155
+ * and skip are included, the server should first apply skip and then top on
156
+ * the collection.
157
+ * Note: If the server can't honor top and/or skip, the server
158
+ * must return an error to the client informing about it instead of just ignoring
159
+ * the query options.
160
+ * This reduces the risk of the client making assumptions about
161
+ * the data returned.
162
+ */
163
+ get(options?: GetDocumentsStatusParameters): StreamableMethod<GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse>;
164
+ }
165
+ export interface GetSupportedFormats {
166
+ /**
167
+ * The list of supported formats supported by the Document Translation
168
+ * service.
169
+ * The list includes the common file extension, as well as the
170
+ * content-type if using the upload API.
171
+ */
172
+ get(options?: GetSupportedFormatsParameters): StreamableMethod<GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse>;
173
+ }
174
+ export interface Routes {
175
+ /** Resource for '/document:translate' has methods for the following verbs: post */
176
+ (path: "/document:translate"): DocumentTranslate;
177
+ /** Resource for '/document/batches' has methods for the following verbs: post, get */
178
+ (path: "/document/batches"): StartTranslation;
179
+ /** Resource for '/document/batches/\{id\}/documents/\{documentId\}' has methods for the following verbs: get */
180
+ (path: "/document/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus;
181
+ /** Resource for '/document/batches/\{id\}' has methods for the following verbs: get, delete */
182
+ (path: "/document/batches/{id}", id: string): GetTranslationStatus;
183
+ /** Resource for '/document/batches/\{id\}/documents' has methods for the following verbs: get */
184
+ (path: "/document/batches/{id}/documents", id: string): GetDocumentsStatus;
185
+ /** Resource for '/document/formats' has methods for the following verbs: get */
186
+ (path: "/document/formats"): GetSupportedFormats;
187
+ }
188
+ export type DocumentTranslationClient = Client & {
189
+ path: Routes;
190
+ };
191
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,4BAA4B,EAC5B,gCAAgC,EAChC,2B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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+CG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,4BAA4B,GACrC,gBAAgB,CAAC,6BAA6B,GAAG,iCAAiC,CAAC,CAAC;CACxF;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,6BAA6B,GACtC,gBAAgB,CAAC,8BAA8B,GAAG,kCAAkC,CAAC,CAAC;CAC1F;AAED,MAAM,WAAW,MAAM;IACrB,mFAAmF;IACnF,CAAC,IAAI,EAAE,qBAAqB,GAAG,iBAAiB,CAAC;IACjD,sFAAsF;IACtF,CAAC,IAAI,EAAE,mBAAmB,GAAG,gBAAgB,CAAC;IAC9C,gHAAgH;IAChH,CACE,IAAI,EAAE,+CAA+C,EACrD,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,GACjB,iBAAiB,CAAC;IACrB,+FAA+F;IAC/F,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,GAAG,oBAAoB,CAAC;IACnE,iGAAiG;IACjG,CAAC,IAAI,EAAE,kCAAkC,EAAE,EAAE,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAC3E,gFAAgF;IAChF,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAAC;CAClD;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type {\n DocumentTranslateParameters,\n StartTranslationParameters,\n GetTranslationsStatusParameters,\n GetDocumentStatusParameters,\n GetTranslationStatusParameters,\n CancelTranslationParameters,\n GetDocumentsStatusParameters,\n GetSupportedFormatsParameters,\n} from \"./parameters.js\";\nimport type {\n DocumentTranslate200Response,\n DocumentTranslateDefaultResponse,\n StartTranslation202Response,\n StartTranslationDefaultResponse,\n GetTranslationsStatus200Response,\n GetTranslationsStatusDefaultResponse,\n GetDocumentStatus200Response,\n GetDocumentStatusDefaultResponse,\n GetTranslationStatus200Response,\n GetTranslationStatusDefaultResponse,\n CancelTranslation200Response,\n CancelTranslationDefaultResponse,\n GetDocumentsStatus200Response,\n GetDocumentsStatusDefaultResponse,\n GetSupportedFormats200Response,\n GetSupportedFormatsDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface DocumentTranslate {\n /** Use this API to submit a single translation request to the Document Translation Service. */\n post(\n options: DocumentTranslateParameters,\n ): StreamableMethod<DocumentTranslate200Response | DocumentTranslateDefaultResponse>;\n}\n\nexport interface StartTranslation {\n /**\n * Use this API to submit a bulk (batch) translation request to the Document\n * Translation service.\n * Each request can contain multiple documents and must\n * contain a source and destination container for each document.\n *\n * The\n * prefix and suffix filter (if supplied) are used to filter folders. The prefix\n * is applied to the subpath after the container name.\n *\n * Glossaries /\n * Translation memory can be included in the request and are applied by the\n * service when the document is translated.\n *\n * If the glossary is\n * invalid or unreachable during translation, an error is indicated in the\n * document status.\n * If a file with the same name already exists at the\n * destination, it will be overwritten. The targetUrl for each target language\n * must be unique.\n */\n post(\n options: StartTranslationParameters,\n ): StreamableMethod<StartTranslation202Response | StartTranslationDefaultResponse>;\n /**\n * Returns a list of batch requests submitted and the status for each\n * request.\n * This list only contains batch requests submitted by the user (based on\n * the resource).\n *\n * If the number of requests exceeds our paging limit,\n * server-side paging is used. Paginated responses indicate a partial result and\n * include a continuation token in the response.\n * The absence of a continuation\n * token means that no additional pages are available.\n *\n * top, skip\n * and maxpagesize query parameters can be used to specify a number of results to\n * return and an offset for the collection.\n *\n * top indicates the total\n * number of records the user wants to be returned across all pages.\n * skip\n * indicates the number of records to skip from the list of batches based on the\n * sorting method specified. By default, we sort by descending start\n * time.\n * maxpagesize is the maximum items returned in a page. If more items are\n * requested via top (or top is not specified and there are more items to be\n * returned), @nextLink will contain the link to the next page.\n *\n *\n * orderby query parameter can be used to sort the returned list (ex\n * \"orderby=createdDateTimeUtc asc\" or \"orderby=createdDateTimeUtc\n * desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query\n * parameters can be used to filter the returned list (ex:\n * \"status=Succeeded,Cancelled\") will only return succeeded and cancelled\n * operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used\n * combined or separately to specify a range of datetime to filter the returned\n * list by.\n * The supported filtering query parameters are (status, ids,\n * createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors\n * the values specified by the client. However, clients must be prepared to handle\n * responses that contain a different page size or contain a continuation token.\n *\n *\n * When both top and skip are included, the server should first apply\n * skip and then top on the collection.\n * Note: If the server can't honor top\n * and/or skip, the server must return an error to the client informing about it\n * instead of just ignoring the query options.\n * This reduces the risk of the client\n * making assumptions about the data returned.\n */\n get(\n options?: GetTranslationsStatusParameters,\n ): StreamableMethod<GetTranslationsStatus200Response | GetTranslationsStatusDefaultResponse>;\n}\n\nexport interface GetDocumentStatus {\n /**\n * Returns the translation status for a specific document based on the request Id\n * and document Id.\n */\n get(\n options?: GetDocumentStatusParameters,\n ): StreamableMethod<GetDocumentStatus200Response | GetDocumentStatusDefaultResponse>;\n}\n\nexport interface GetTranslationStatus {\n /**\n * Returns the status for a document translation request.\n * The status includes the\n * overall request status, as well as the status for documents that are being\n * translated as part of that request.\n */\n get(\n options?: GetTranslationStatusParameters,\n ): StreamableMethod<GetTranslationStatus200Response | GetTranslationStatusDefaultResponse>;\n /**\n * Cancel a currently processing or queued translation.\n * A translation will not be\n * cancelled if it is already completed or failed or cancelling. A bad request\n * will be returned.\n * All documents that have completed translation will not be\n * cancelled and will be charged.\n * All pending documents will be cancelled if\n * possible.\n */\n delete(\n options?: CancelTranslationParameters,\n ): StreamableMethod<CancelTranslation200Response | CancelTranslationDefaultResponse>;\n}\n\nexport interface GetDocumentsStatus {\n /**\n * Returns the status for all documents in a batch document translation request.\n *\n *\n * If the number of documents in the response exceeds our paging limit,\n * server-side paging is used.\n * Paginated responses indicate a partial result and\n * include a continuation token in the response. The absence of a continuation\n * token means that no additional pages are available.\n *\n * top, skip\n * and maxpagesize query parameters can be used to specify a number of results to\n * return and an offset for the collection.\n *\n * top indicates the total\n * number of records the user wants to be returned across all pages.\n * skip\n * indicates the number of records to skip from the list of document status held\n * by the server based on the sorting method specified. By default, we sort by\n * descending start time.\n * maxpagesize is the maximum items returned in a page.\n * If more items are requested via top (or top is not specified and there are\n * more items to be returned), @nextLink will contain the link to the next page.\n *\n *\n * orderby query parameter can be used to sort the returned list (ex\n * \"orderby=createdDateTimeUtc asc\" or \"orderby=createdDateTimeUtc\n * desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query\n * parameters can be used to filter the returned list (ex:\n * \"status=Succeeded,Cancelled\") will only return succeeded and cancelled\n * documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used\n * combined or separately to specify a range of datetime to filter the returned\n * list by.\n * The supported filtering query parameters are (status, ids,\n * createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both top\n * and skip are included, the server should first apply skip and then top on\n * the collection.\n * Note: If the server can't honor top and/or skip, the server\n * must return an error to the client informing about it instead of just ignoring\n * the query options.\n * This reduces the risk of the client making assumptions about\n * the data returned.\n */\n get(\n options?: GetDocumentsStatusParameters,\n ): StreamableMethod<GetDocumentsStatus200Response | GetDocumentsStatusDefaultResponse>;\n}\n\nexport interface GetSupportedFormats {\n /**\n * The list of supported formats supported by the Document Translation\n * service.\n * The list includes the common file extension, as well as the\n * content-type if using the upload API.\n */\n get(\n options?: GetSupportedFormatsParameters,\n ): StreamableMethod<GetSupportedFormats200Response | GetSupportedFormatsDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/document:translate' has methods for the following verbs: post */\n (path: \"/document:translate\"): DocumentTranslate;\n /** Resource for '/document/batches' has methods for the following verbs: post, get */\n (path: \"/document/batches\"): StartTranslation;\n /** Resource for '/document/batches/\\{id\\}/documents/\\{documentId\\}' has methods for the following verbs: get */\n (\n path: \"/document/batches/{id}/documents/{documentId}\",\n id: string,\n documentId: string,\n ): GetDocumentStatus;\n /** Resource for '/document/batches/\\{id\\}' has methods for the following verbs: get, delete */\n (path: \"/document/batches/{id}\", id: string): GetTranslationStatus;\n /** Resource for '/document/batches/\\{id\\}/documents' has methods for the following verbs: get */\n (path: \"/document/batches/{id}/documents\", id: string): GetDocumentsStatus;\n /** Resource for '/document/formats' has methods for the following verbs: get */\n (path: \"/document/formats\"): GetSupportedFormats;\n}\n\nexport type DocumentTranslationClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,16 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { TokenCredential, KeyCredential } from "@azure/core-auth";
3
+ import type { DocumentTranslationClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface DocumentTranslationClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `DocumentTranslationClient`
11
+ * @param endpointParam - Supported document Translation endpoint, protocol and hostname, for example: https://{TranslatorResourceName}.cognitiveservices.azure.com/translator.
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ export default function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, { apiVersion, ...options }?: DocumentTranslationClientOptions): DocumentTranslationClient;
16
+ //# sourceMappingURL=documentTranslationClient.d.ts.map