@azure-rest/ai-document-translator 1.0.0-alpha.20241120.1 → 1.0.0-alpha.20241122.2
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/README.md +1 -1
- package/dist/browser/constants.d.ts +5 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/documentTranslator.d.ts +130 -0
- package/dist/browser/documentTranslator.d.ts.map +1 -0
- package/dist/browser/documentTranslator.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/models.d.ts +189 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/parameters.d.ts +93 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/responses.d.ts +725 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/constants.d.ts +5 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +10 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/documentTranslator.d.ts +130 -0
- package/dist/commonjs/documentTranslator.d.ts.map +1 -0
- package/dist/{index.js → commonjs/documentTranslator.js} +6 -17
- package/dist/commonjs/documentTranslator.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/models.d.ts +189 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/parameters.d.ts +93 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/responses.d.ts +725 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/constants.d.ts +5 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +7 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/documentTranslator.d.ts +130 -0
- package/dist/esm/documentTranslator.d.ts.map +1 -0
- package/dist/esm/documentTranslator.js +13 -0
- package/dist/esm/documentTranslator.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models.d.ts +189 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/parameters.d.ts +93 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/responses.d.ts +725 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/react-native/constants.d.ts +5 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +7 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/documentTranslator.d.ts +130 -0
- package/dist/react-native/documentTranslator.d.ts.map +1 -0
- package/dist/react-native/documentTranslator.js +13 -0
- package/dist/react-native/documentTranslator.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +14 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/models.d.ts +189 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/parameters.d.ts +93 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/responses.d.ts +725 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/package.json +66 -44
- package/dist/index.js.map +0 -1
- package/dist-esm/src/documentTranslator.js.map +0 -1
- package/dist-esm/src/index.js +0 -13
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/responses.js.map +0 -1
- /package/{types → dist}/ai-document-translator.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/documentTranslator.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
- /package/{dist-esm/src → dist/browser}/responses.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,WAAW,0BAA0B;IACzC,sCAAsC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA4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sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n TranslationErrorResponse,\n TranslationsStatus,\n DocumentStatus,\n TranslationStatus,\n DocumentsStatus,\n SupportedFileFormats,\n SupportedStorageSources,\n} from \"./models.js\";\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\n\nexport interface StartTranslation202Headers {\n /** Location of batch the operation */\n \"operation-location\"?: string;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation202Response extends HttpResponse {\n status: \"202\";\n headers: RawHttpHeaders & StartTranslation202Headers;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation400Response extends HttpResponse {\n status: \"400\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\nexport interface StartTranslation503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetTranslationsStatus200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */\n etag?: string;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus200Response extends HttpResponse {\n status: \"200\";\n body: TranslationsStatus;\n headers: RawHttpHeaders & GetTranslationsStatus200Headers;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus400Response extends HttpResponse {\n status: \"400\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetTranslationsStatus503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetDocumentStatus200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */\n etag?: string;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus200Response extends HttpResponse {\n status: \"200\";\n body: DocumentStatus;\n headers: RawHttpHeaders & GetDocumentStatus200Headers;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus404Response extends HttpResponse {\n status: \"404\";\n body: TranslationErrorResponse;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/** Returns the translation status for a specific document based on the request Id and document Id. */\nexport interface GetDocumentStatus503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetTranslationStatus200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */\n etag?: string;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus200Response extends HttpResponse {\n status: \"200\";\n body: TranslationStatus;\n headers: RawHttpHeaders & GetTranslationStatus200Headers;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus404Response extends HttpResponse {\n status: \"404\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\nexport interface GetTranslationStatus503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation200Response extends HttpResponse {\n status: \"200\";\n body: TranslationStatus;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation404Response extends HttpResponse {\n status: \"404\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\nexport interface CancelTranslation503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetDocumentsStatus200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n /** The ETag response-header field provides the current value of the entity tag for the requested variant. Used with If-Match, If-None-Match and If-Range to implement optimistic concurrency control. */\n etag?: string;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus200Response extends HttpResponse {\n status: \"200\";\n body: DocumentsStatus;\n headers: RawHttpHeaders & GetDocumentsStatus200Headers;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus400Response extends HttpResponse {\n status: \"400\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus401Response extends HttpResponse {\n status: \"401\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus404Response extends HttpResponse {\n status: \"404\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\nexport interface GetDocumentsStatus503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetSupportedDocumentFormats200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n}\n\n/**\n * The list of supported document formats supported by the Document Translation service.\n * The list includes the common file extension, as well as the content-type if using the upload API.\n */\nexport interface GetSupportedDocumentFormats200Response extends HttpResponse {\n status: \"200\";\n body: SupportedFileFormats;\n headers: RawHttpHeaders & GetSupportedDocumentFormats200Headers;\n}\n\n/**\n * The list of supported document formats supported by the Document Translation service.\n * The list includes the common file extension, as well as the content-type if using the upload API.\n */\nexport interface GetSupportedDocumentFormats429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * The list of supported document formats supported by the Document Translation service.\n * The list includes the common file extension, as well as the content-type if using the upload API.\n */\nexport interface GetSupportedDocumentFormats500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * The list of supported document formats supported by the Document Translation service.\n * The list includes the common file extension, as well as the content-type if using the upload API.\n */\nexport interface GetSupportedDocumentFormats503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetSupportedGlossaryFormats200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n}\n\n/**\n * The list of supported glossary formats supported by the Document Translation service.\n * The list includes the common file extension used.\n */\nexport interface GetSupportedGlossaryFormats200Response extends HttpResponse {\n status: \"200\";\n body: SupportedFileFormats;\n headers: RawHttpHeaders & GetSupportedGlossaryFormats200Headers;\n}\n\n/**\n * The list of supported glossary formats supported by the Document Translation service.\n * The list includes the common file extension used.\n */\nexport interface GetSupportedGlossaryFormats429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/**\n * The list of supported glossary formats supported by the Document Translation service.\n * The list includes the common file extension used.\n */\nexport interface GetSupportedGlossaryFormats500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/**\n * The list of supported glossary formats supported by the Document Translation service.\n * The list includes the common file extension used.\n */\nexport interface GetSupportedGlossaryFormats503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n\nexport interface GetSupportedStorageSources200Headers {\n /** Indicates how long to wait before making a new request. */\n \"retry-after\"?: string;\n}\n\n/** Returns a list of storage sources/options supported by the Document Translation service. */\nexport interface GetSupportedStorageSources200Response extends HttpResponse {\n status: \"200\";\n body: SupportedStorageSources;\n headers: RawHttpHeaders & GetSupportedStorageSources200Headers;\n}\n\n/** Returns a list of storage sources/options supported by the Document Translation service. */\nexport interface GetSupportedStorageSources429Response extends HttpResponse {\n status: \"429\";\n body: TranslationErrorResponse;\n}\n\n/** Returns a list of storage sources/options supported by the Document Translation service. */\nexport interface GetSupportedStorageSources500Response extends HttpResponse {\n status: \"500\";\n body: TranslationErrorResponse;\n}\n\n/** Returns a list of storage sources/options supported by the Document Translation service. */\nexport interface GetSupportedStorageSources503Response extends HttpResponse {\n status: \"503\";\n body: TranslationErrorResponse;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SDK_VERSION = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
exports.SDK_VERSION = "1.0.0-beta.2";
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;GAEG;AACU,QAAA,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * @internal\n */\nexport const SDK_VERSION: string = \"1.0.0-beta.2\";\n"]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { CancelTranslation200Response, CancelTranslation401Response, CancelTranslation404Response, CancelTranslation429Response, CancelTranslation500Response, CancelTranslation503Response, GetDocumentStatus200Response, GetDocumentStatus401Response, GetDocumentStatus404Response, GetDocumentStatus429Response, GetDocumentStatus500Response, GetDocumentStatus503Response, GetDocumentsStatus200Response, GetDocumentsStatus400Response, GetDocumentsStatus401Response, GetDocumentsStatus404Response, GetDocumentsStatus429Response, GetDocumentsStatus500Response, GetDocumentsStatus503Response, GetSupportedDocumentFormats200Response, GetSupportedDocumentFormats429Response, GetSupportedDocumentFormats500Response, GetSupportedDocumentFormats503Response, GetSupportedGlossaryFormats200Response, GetSupportedGlossaryFormats429Response, GetSupportedGlossaryFormats500Response, GetSupportedGlossaryFormats503Response, GetSupportedStorageSources200Response, GetSupportedStorageSources429Response, GetSupportedStorageSources500Response, GetSupportedStorageSources503Response, GetTranslationStatus200Response, GetTranslationStatus401Response, GetTranslationStatus404Response, GetTranslationStatus429Response, GetTranslationStatus500Response, GetTranslationStatus503Response, GetTranslationsStatus200Response, GetTranslationsStatus400Response, GetTranslationsStatus401Response, GetTranslationsStatus429Response, GetTranslationsStatus500Response, GetTranslationsStatus503Response, StartTranslation202Response, StartTranslation400Response, StartTranslation401Response, StartTranslation429Response, StartTranslation500Response, StartTranslation503Response } from "./responses.js";
|
|
2
|
+
import type { CancelTranslationParameters, GetDocumentStatusParameters, GetDocumentsStatusParameters, GetSupportedDocumentFormatsParameters, GetSupportedGlossaryFormatsParameters, GetSupportedStorageSourcesParameters, GetTranslationStatusParameters, GetTranslationsStatusParameters, StartTranslationParameters } from "./parameters.js";
|
|
3
|
+
import type { Client, ClientOptions } from "@azure-rest/core-client";
|
|
4
|
+
import type { KeyCredential, TokenCredential } from "@azure/core-auth";
|
|
5
|
+
export interface GetTranslationsStatus {
|
|
6
|
+
/**
|
|
7
|
+
* Use this API to submit a bulk (batch) translation request to the Document Translation service.
|
|
8
|
+
* Each request can contain multiple documents and must contain a source and destination container for each document.
|
|
9
|
+
*
|
|
10
|
+
* The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.
|
|
11
|
+
*
|
|
12
|
+
* Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.
|
|
13
|
+
*
|
|
14
|
+
* If the glossary is invalid or unreachable during translation, an error is indicated in the document status.
|
|
15
|
+
* If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.
|
|
16
|
+
*/
|
|
17
|
+
post(options: StartTranslationParameters): Promise<StartTranslation202Response | StartTranslation400Response | StartTranslation401Response | StartTranslation429Response | StartTranslation500Response | StartTranslation503Response>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a list of batch requests submitted and the status for each request.
|
|
20
|
+
* This list only contains batch requests submitted by the user (based on the resource).
|
|
21
|
+
*
|
|
22
|
+
* If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.
|
|
23
|
+
* The absence of a continuation token means that no additional pages are available.
|
|
24
|
+
*
|
|
25
|
+
* $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
|
|
26
|
+
*
|
|
27
|
+
* $top indicates the total number of records the user wants to be returned across all pages.
|
|
28
|
+
* $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.
|
|
29
|
+
* $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page.
|
|
30
|
+
*
|
|
31
|
+
* $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc").
|
|
32
|
+
* The default sorting is descending by createdDateTimeUtc.
|
|
33
|
+
* Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled operations.
|
|
34
|
+
* createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.
|
|
35
|
+
* The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
|
|
36
|
+
*
|
|
37
|
+
* The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.
|
|
38
|
+
*
|
|
39
|
+
* When both $top and $skip are included, the server should first apply $skip and then $top on the collection.
|
|
40
|
+
* Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.
|
|
41
|
+
* This reduces the risk of the client making assumptions about the data returned.
|
|
42
|
+
*/
|
|
43
|
+
get(options?: GetTranslationsStatusParameters): Promise<GetTranslationsStatus200Response | GetTranslationsStatus400Response | GetTranslationsStatus401Response | GetTranslationsStatus429Response | GetTranslationsStatus500Response | GetTranslationsStatus503Response>;
|
|
44
|
+
}
|
|
45
|
+
export interface GetDocumentStatus {
|
|
46
|
+
/** Returns the translation status for a specific document based on the request Id and document Id. */
|
|
47
|
+
get(options?: GetDocumentStatusParameters): Promise<GetDocumentStatus200Response | GetDocumentStatus401Response | GetDocumentStatus404Response | GetDocumentStatus429Response | GetDocumentStatus500Response | GetDocumentStatus503Response>;
|
|
48
|
+
}
|
|
49
|
+
export interface CancelTranslation {
|
|
50
|
+
/**
|
|
51
|
+
* Returns the status for a document translation request.
|
|
52
|
+
* The status includes the overall request status, as well as the status for documents that are being translated as part of that request.
|
|
53
|
+
*/
|
|
54
|
+
get(options?: GetTranslationStatusParameters): Promise<GetTranslationStatus200Response | GetTranslationStatus401Response | GetTranslationStatus404Response | GetTranslationStatus429Response | GetTranslationStatus500Response | GetTranslationStatus503Response>;
|
|
55
|
+
/**
|
|
56
|
+
* Cancel a currently processing or queued translation.
|
|
57
|
+
* Cancel a currently processing or queued translation.
|
|
58
|
+
* A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.
|
|
59
|
+
* All documents that have completed translation will not be cancelled and will be charged.
|
|
60
|
+
* All pending documents will be cancelled if possible.
|
|
61
|
+
*/
|
|
62
|
+
delete(options?: CancelTranslationParameters): Promise<CancelTranslation200Response | CancelTranslation401Response | CancelTranslation404Response | CancelTranslation429Response | CancelTranslation500Response | CancelTranslation503Response>;
|
|
63
|
+
}
|
|
64
|
+
export interface GetDocumentsStatus {
|
|
65
|
+
/**
|
|
66
|
+
* Returns the status for all documents in a batch document translation request.
|
|
67
|
+
*
|
|
68
|
+
* If the number of documents in the response exceeds our paging limit, server-side paging is used.
|
|
69
|
+
* Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.
|
|
70
|
+
*
|
|
71
|
+
* $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.
|
|
72
|
+
*
|
|
73
|
+
* $top indicates the total number of records the user wants to be returned across all pages.
|
|
74
|
+
* $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.
|
|
75
|
+
* $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \@nextLink will contain the link to the next page.
|
|
76
|
+
*
|
|
77
|
+
* $orderBy query parameter can be used to sort the returned list (ex "$orderBy=createdDateTimeUtc asc" or "$orderBy=createdDateTimeUtc desc").
|
|
78
|
+
* The default sorting is descending by createdDateTimeUtc.
|
|
79
|
+
* Some query parameters can be used to filter the returned list (ex: "status=Succeeded,Cancelled") will only return succeeded and cancelled documents.
|
|
80
|
+
* createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.
|
|
81
|
+
* The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).
|
|
82
|
+
*
|
|
83
|
+
* When both $top and $skip are included, the server should first apply $skip and then $top on the collection.
|
|
84
|
+
* Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.
|
|
85
|
+
* This reduces the risk of the client making assumptions about the data returned.
|
|
86
|
+
*/
|
|
87
|
+
get(options?: GetDocumentsStatusParameters): Promise<GetDocumentsStatus200Response | GetDocumentsStatus400Response | GetDocumentsStatus401Response | GetDocumentsStatus404Response | GetDocumentsStatus429Response | GetDocumentsStatus500Response | GetDocumentsStatus503Response>;
|
|
88
|
+
}
|
|
89
|
+
export interface GetSupportedDocumentFormats {
|
|
90
|
+
/**
|
|
91
|
+
* The list of supported document formats supported by the Document Translation service.
|
|
92
|
+
* The list includes the common file extension, as well as the content-type if using the upload API.
|
|
93
|
+
*/
|
|
94
|
+
get(options?: GetSupportedDocumentFormatsParameters): Promise<GetSupportedDocumentFormats200Response | GetSupportedDocumentFormats429Response | GetSupportedDocumentFormats500Response | GetSupportedDocumentFormats503Response>;
|
|
95
|
+
}
|
|
96
|
+
export interface GetSupportedGlossaryFormats {
|
|
97
|
+
/**
|
|
98
|
+
* The list of supported glossary formats supported by the Document Translation service.
|
|
99
|
+
* The list includes the common file extension used.
|
|
100
|
+
*/
|
|
101
|
+
get(options?: GetSupportedGlossaryFormatsParameters): Promise<GetSupportedGlossaryFormats200Response | GetSupportedGlossaryFormats429Response | GetSupportedGlossaryFormats500Response | GetSupportedGlossaryFormats503Response>;
|
|
102
|
+
}
|
|
103
|
+
export interface GetSupportedStorageSources {
|
|
104
|
+
/** Returns a list of storage sources/options supported by the Document Translation service. */
|
|
105
|
+
get(options?: GetSupportedStorageSourcesParameters): Promise<GetSupportedStorageSources200Response | GetSupportedStorageSources429Response | GetSupportedStorageSources500Response | GetSupportedStorageSources503Response>;
|
|
106
|
+
}
|
|
107
|
+
export interface Routes {
|
|
108
|
+
/** Resource for '/batches' has methods for the following verbs: post, get */
|
|
109
|
+
(path: "/batches"): GetTranslationsStatus;
|
|
110
|
+
/** Resource for '/batches/\{id\}/documents/\{documentId\}' has methods for the following verbs: get */
|
|
111
|
+
(path: "/batches/{id}/documents/{documentId}", id: string, documentId: string): GetDocumentStatus;
|
|
112
|
+
/** Resource for '/batches/\{id\}' has methods for the following verbs: get, delete */
|
|
113
|
+
(path: "/batches/{id}", id: string): CancelTranslation;
|
|
114
|
+
/** Resource for '/batches/\{id\}/documents' has methods for the following verbs: get */
|
|
115
|
+
(path: "/batches/{id}/documents", id: string): GetDocumentsStatus;
|
|
116
|
+
/** Resource for '/documents/formats' has methods for the following verbs: get */
|
|
117
|
+
(path: "/documents/formats"): GetSupportedDocumentFormats;
|
|
118
|
+
/** Resource for '/glossaries/formats' has methods for the following verbs: get */
|
|
119
|
+
(path: "/glossaries/formats"): GetSupportedGlossaryFormats;
|
|
120
|
+
/** Resource for '/storagesources' has methods for the following verbs: get */
|
|
121
|
+
(path: "/storagesources"): GetSupportedStorageSources;
|
|
122
|
+
}
|
|
123
|
+
export type DocumentTranslatorClient = Client & {
|
|
124
|
+
path: Routes;
|
|
125
|
+
};
|
|
126
|
+
export interface DocumentTranslatorFactory {
|
|
127
|
+
(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): void;
|
|
128
|
+
}
|
|
129
|
+
export default function DocumentTranslator(endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): DocumentTranslatorClient;
|
|
130
|
+
//# sourceMappingURL=documentTranslator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentTranslator.d.ts","sourceRoot":"","sources":["../../src/documentTranslator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4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-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var coreClient = require('@azure-rest/core-client');
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
7
2
|
// Copyright (c) Microsoft Corporation.
|
|
8
3
|
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.default = DocumentTranslator;
|
|
6
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
9
7
|
function DocumentTranslator(endpoint, credentials, options = {}) {
|
|
10
8
|
var _a;
|
|
11
9
|
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/translator/text/batch/v1.0`;
|
|
@@ -13,15 +11,6 @@ function DocumentTranslator(endpoint, credentials, options = {}) {
|
|
|
13
11
|
scopes: ["https://cognitiveservices.azure.com/.default"],
|
|
14
12
|
apiKeyHeaderName: "Ocp-Apim-Subscription-Key",
|
|
15
13
|
} });
|
|
16
|
-
return
|
|
14
|
+
return (0, core_client_1.getClient)(baseUrl, credentials, options);
|
|
17
15
|
}
|
|
18
|
-
|
|
19
|
-
// Copyright (c) Microsoft Corporation.
|
|
20
|
-
// Licensed under the MIT License.
|
|
21
|
-
/**
|
|
22
|
-
* A rest library for working with the Azure Document Translator service.
|
|
23
|
-
* @packageDocumentation
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
exports.default = DocumentTranslator;
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
16
|
+
//# sourceMappingURL=documentTranslator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentTranslator.js","sourceRoot":"","sources":["../../src/documentTranslator.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsRlC,qCAeC;AApOD,yDAAoD;AAqNpD,SAAwB,kBAAkB,CACxC,QAAgB,EAChB,WAA4C,EAC5C,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,6BAA6B,CAAC;IAC5E,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,8CAA8C,CAAC;YACxD,gBAAgB,EAAE,2BAA2B;SAC9C,GACF,CAAC;IAEF,OAAO,IAAA,uBAAS,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA6B,CAAC;AAC9E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CancelTranslation200Response,\n CancelTranslation401Response,\n CancelTranslation404Response,\n CancelTranslation429Response,\n CancelTranslation500Response,\n CancelTranslation503Response,\n GetDocumentStatus200Response,\n GetDocumentStatus401Response,\n GetDocumentStatus404Response,\n GetDocumentStatus429Response,\n GetDocumentStatus500Response,\n GetDocumentStatus503Response,\n GetDocumentsStatus200Response,\n GetDocumentsStatus400Response,\n GetDocumentsStatus401Response,\n GetDocumentsStatus404Response,\n GetDocumentsStatus429Response,\n GetDocumentsStatus500Response,\n GetDocumentsStatus503Response,\n GetSupportedDocumentFormats200Response,\n GetSupportedDocumentFormats429Response,\n GetSupportedDocumentFormats500Response,\n GetSupportedDocumentFormats503Response,\n GetSupportedGlossaryFormats200Response,\n GetSupportedGlossaryFormats429Response,\n GetSupportedGlossaryFormats500Response,\n GetSupportedGlossaryFormats503Response,\n GetSupportedStorageSources200Response,\n GetSupportedStorageSources429Response,\n GetSupportedStorageSources500Response,\n GetSupportedStorageSources503Response,\n GetTranslationStatus200Response,\n GetTranslationStatus401Response,\n GetTranslationStatus404Response,\n GetTranslationStatus429Response,\n GetTranslationStatus500Response,\n GetTranslationStatus503Response,\n GetTranslationsStatus200Response,\n GetTranslationsStatus400Response,\n GetTranslationsStatus401Response,\n GetTranslationsStatus429Response,\n GetTranslationsStatus500Response,\n GetTranslationsStatus503Response,\n StartTranslation202Response,\n StartTranslation400Response,\n StartTranslation401Response,\n StartTranslation429Response,\n StartTranslation500Response,\n StartTranslation503Response,\n} from \"./responses.js\";\nimport type {\n CancelTranslationParameters,\n GetDocumentStatusParameters,\n GetDocumentsStatusParameters,\n GetSupportedDocumentFormatsParameters,\n GetSupportedGlossaryFormatsParameters,\n GetSupportedStorageSourcesParameters,\n GetTranslationStatusParameters,\n GetTranslationsStatusParameters,\n StartTranslationParameters,\n} from \"./parameters.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\n\nexport interface GetTranslationsStatus {\n /**\n * Use this API to submit a bulk (batch) translation request to the Document Translation service.\n * Each request can contain multiple documents and must contain a source and destination container for each document.\n *\n * The prefix and suffix filter (if supplied) are used to filter folders. The prefix is applied to the subpath after the container name.\n *\n * Glossaries / Translation memory can be included in the request and are applied by the service when the document is translated.\n *\n * If the glossary is invalid or unreachable during translation, an error is indicated in the document status.\n * If a file with the same name already exists at the destination, it will be overwritten. The targetUrl for each target language must be unique.\n */\n post(\n options: StartTranslationParameters,\n ): Promise<\n | StartTranslation202Response\n | StartTranslation400Response\n | StartTranslation401Response\n | StartTranslation429Response\n | StartTranslation500Response\n | StartTranslation503Response\n >;\n /**\n * Returns a list of batch requests submitted and the status for each request.\n * This list only contains batch requests submitted by the user (based on the resource).\n *\n * If the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\n * The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * The server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\n get(\n options?: GetTranslationsStatusParameters,\n ): Promise<\n | GetTranslationsStatus200Response\n | GetTranslationsStatus400Response\n | GetTranslationsStatus401Response\n | GetTranslationsStatus429Response\n | GetTranslationsStatus500Response\n | GetTranslationsStatus503Response\n >;\n}\n\nexport interface GetDocumentStatus {\n /** Returns the translation status for a specific document based on the request Id and document Id. */\n get(\n options?: GetDocumentStatusParameters,\n ): Promise<\n | GetDocumentStatus200Response\n | GetDocumentStatus401Response\n | GetDocumentStatus404Response\n | GetDocumentStatus429Response\n | GetDocumentStatus500Response\n | GetDocumentStatus503Response\n >;\n}\n\nexport interface CancelTranslation {\n /**\n * Returns the status for a document translation request.\n * The status includes the overall request status, as well as the status for documents that are being translated as part of that request.\n */\n get(\n options?: GetTranslationStatusParameters,\n ): Promise<\n | GetTranslationStatus200Response\n | GetTranslationStatus401Response\n | GetTranslationStatus404Response\n | GetTranslationStatus429Response\n | GetTranslationStatus500Response\n | GetTranslationStatus503Response\n >;\n /**\n * Cancel a currently processing or queued translation.\n * Cancel a currently processing or queued translation.\n * A translation will not be cancelled if it is already completed or failed or cancelling. A bad request will be returned.\n * All documents that have completed translation will not be cancelled and will be charged.\n * All pending documents will be cancelled if possible.\n */\n delete(\n options?: CancelTranslationParameters,\n ): Promise<\n | CancelTranslation200Response\n | CancelTranslation401Response\n | CancelTranslation404Response\n | CancelTranslation429Response\n | CancelTranslation500Response\n | CancelTranslation503Response\n >;\n}\n\nexport interface GetDocumentsStatus {\n /**\n * Returns the status for all documents in a batch document translation request.\n *\n * If the number of documents in the response exceeds our paging limit, server-side paging is used.\n * Paginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\n *\n * $top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\n *\n * $top indicates the total number of records the user wants to be returned across all pages.\n * $skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\n * $maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), \\@nextLink will contain the link to the next page.\n *\n * $orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\n * The default sorting is descending by createdDateTimeUtc.\n * Some query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\n * createdDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\n * The supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\n *\n * When both $top and $skip are included, the server should first apply $skip and then $top on the collection.\n * Note: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\n * This reduces the risk of the client making assumptions about the data returned.\n */\n get(\n options?: GetDocumentsStatusParameters,\n ): Promise<\n | GetDocumentsStatus200Response\n | GetDocumentsStatus400Response\n | GetDocumentsStatus401Response\n | GetDocumentsStatus404Response\n | GetDocumentsStatus429Response\n | GetDocumentsStatus500Response\n | GetDocumentsStatus503Response\n >;\n}\n\nexport interface GetSupportedDocumentFormats {\n /**\n * The list of supported document formats supported by the Document Translation service.\n * The list includes the common file extension, as well as the content-type if using the upload API.\n */\n get(\n options?: GetSupportedDocumentFormatsParameters,\n ): Promise<\n | GetSupportedDocumentFormats200Response\n | GetSupportedDocumentFormats429Response\n | GetSupportedDocumentFormats500Response\n | GetSupportedDocumentFormats503Response\n >;\n}\n\nexport interface GetSupportedGlossaryFormats {\n /**\n * The list of supported glossary formats supported by the Document Translation service.\n * The list includes the common file extension used.\n */\n get(\n options?: GetSupportedGlossaryFormatsParameters,\n ): Promise<\n | GetSupportedGlossaryFormats200Response\n | GetSupportedGlossaryFormats429Response\n | GetSupportedGlossaryFormats500Response\n | GetSupportedGlossaryFormats503Response\n >;\n}\n\nexport interface GetSupportedStorageSources {\n /** Returns a list of storage sources/options supported by the Document Translation service. */\n get(\n options?: GetSupportedStorageSourcesParameters,\n ): Promise<\n | GetSupportedStorageSources200Response\n | GetSupportedStorageSources429Response\n | GetSupportedStorageSources500Response\n | GetSupportedStorageSources503Response\n >;\n}\n\nexport interface Routes {\n /** Resource for '/batches' has methods for the following verbs: post, get */\n (path: \"/batches\"): GetTranslationsStatus;\n /** Resource for '/batches/\\{id\\}/documents/\\{documentId\\}' has methods for the following verbs: get */\n (path: \"/batches/{id}/documents/{documentId}\", id: string, documentId: string): GetDocumentStatus;\n /** Resource for '/batches/\\{id\\}' has methods for the following verbs: get, delete */\n (path: \"/batches/{id}\", id: string): CancelTranslation;\n /** Resource for '/batches/\\{id\\}/documents' has methods for the following verbs: get */\n (path: \"/batches/{id}/documents\", id: string): GetDocumentsStatus;\n /** Resource for '/documents/formats' has methods for the following verbs: get */\n (path: \"/documents/formats\"): GetSupportedDocumentFormats;\n /** Resource for '/glossaries/formats' has methods for the following verbs: get */\n (path: \"/glossaries/formats\"): GetSupportedGlossaryFormats;\n /** Resource for '/storagesources' has methods for the following verbs: get */\n (path: \"/storagesources\"): GetSupportedStorageSources;\n}\n\nexport type DocumentTranslatorClient = Client & {\n path: Routes;\n};\n\nexport interface DocumentTranslatorFactory {\n (endpoint: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): void;\n}\n\nexport default function DocumentTranslator(\n endpoint: string,\n credentials: TokenCredential | KeyCredential,\n options: ClientOptions = {},\n): DocumentTranslatorClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/translator/text/batch/v1.0`;\n options = {\n ...options,\n credentials: {\n scopes: [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n return getClient(baseUrl, credentials, options) as DocumentTranslatorClient;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A rest library for working with the Azure Document Translator service.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
import DocumentTranslator from "./documentTranslator.js";
|
|
6
|
+
export * from "./documentTranslator.js";
|
|
7
|
+
export * from "./models.js";
|
|
8
|
+
export * from "./parameters.js";
|
|
9
|
+
export * from "./responses.js";
|
|
10
|
+
export default DocumentTranslator;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;GAGG;AAEH,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
/**
|
|
7
|
+
* A rest library for working with the Azure Document Translator service.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
const documentTranslator_js_1 = tslib_1.__importDefault(require("./documentTranslator.js"));
|
|
11
|
+
tslib_1.__exportStar(require("./documentTranslator.js"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./models.js"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./parameters.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./responses.js"), exports);
|
|
15
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
|
|
16
|
+
exports.default = documentTranslator_js_1.default;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;GAGG;AAEH,4FAAyD;AACzD,kEAAwC;AACxC,sDAA4B;AAC5B,0DAAgC;AAChC,yDAA+B;AAC/B,kEAAkE;AAClE,kBAAe,+BAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * A rest library for working with the Azure Document Translator service.\n * @packageDocumentation\n */\n\nimport DocumentTranslator from \"./documentTranslator.js\";\nexport * from \"./documentTranslator.js\";\nexport * from \"./models.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default DocumentTranslator;\n"]}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export interface StartTranslationDetails {
|
|
2
|
+
/** The input list of documents or folders containing documents */
|
|
3
|
+
inputs: BatchRequest[];
|
|
4
|
+
}
|
|
5
|
+
export interface BatchRequest {
|
|
6
|
+
/** Source of the input documents */
|
|
7
|
+
source: SourceInput;
|
|
8
|
+
/** Location of the destination for the output */
|
|
9
|
+
targets: TargetInput[];
|
|
10
|
+
/** Storage type of the input documents source string */
|
|
11
|
+
storageType?: StorageInputType;
|
|
12
|
+
}
|
|
13
|
+
export interface SourceInput {
|
|
14
|
+
/** Location of the folder / container or single file with your documents */
|
|
15
|
+
sourceUrl: string;
|
|
16
|
+
/** */
|
|
17
|
+
filter?: DocumentFilter;
|
|
18
|
+
/**
|
|
19
|
+
* Language code
|
|
20
|
+
* If none is specified, we will perform auto detect on the document
|
|
21
|
+
*/
|
|
22
|
+
language?: string;
|
|
23
|
+
/** Storage Source */
|
|
24
|
+
storageSource?: StorageSource;
|
|
25
|
+
}
|
|
26
|
+
export interface DocumentFilter {
|
|
27
|
+
/**
|
|
28
|
+
* A case-sensitive prefix string to filter documents in the source path for translation.
|
|
29
|
+
* For example, when using a Azure storage blob Uri, use the prefix to restrict sub folders for translation.
|
|
30
|
+
*/
|
|
31
|
+
prefix?: string;
|
|
32
|
+
/**
|
|
33
|
+
* A case-sensitive suffix string to filter documents in the source path for translation.
|
|
34
|
+
* This is most often use for file extensions
|
|
35
|
+
*/
|
|
36
|
+
suffix?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface TargetInput {
|
|
39
|
+
/** Location of the folder / container with your documents */
|
|
40
|
+
targetUrl: string;
|
|
41
|
+
/** Category / custom system for translation request */
|
|
42
|
+
category?: string;
|
|
43
|
+
/** Target Language */
|
|
44
|
+
language: string;
|
|
45
|
+
/** List of Glossary */
|
|
46
|
+
glossaries?: Glossary[];
|
|
47
|
+
/** Storage Source */
|
|
48
|
+
storageSource?: StorageSource;
|
|
49
|
+
}
|
|
50
|
+
export interface Glossary {
|
|
51
|
+
/**
|
|
52
|
+
* Location of the glossary.
|
|
53
|
+
* We will use the file extension to extract the formatting if the format parameter is not supplied.
|
|
54
|
+
*
|
|
55
|
+
* If the translation language pair is not present in the glossary, it will not be applied
|
|
56
|
+
*/
|
|
57
|
+
glossaryUrl: string;
|
|
58
|
+
/** Format */
|
|
59
|
+
format: string;
|
|
60
|
+
/** Optional Version. If not specified, default is used. */
|
|
61
|
+
version?: string;
|
|
62
|
+
/** Storage Source */
|
|
63
|
+
storageSource?: StorageSource;
|
|
64
|
+
}
|
|
65
|
+
export interface TranslationErrorResponse {
|
|
66
|
+
/** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */
|
|
67
|
+
error?: TranslationError;
|
|
68
|
+
}
|
|
69
|
+
export interface TranslationError {
|
|
70
|
+
/** Enums containing high level error codes. */
|
|
71
|
+
code: TranslationErrorCode;
|
|
72
|
+
/** Gets high level error message. */
|
|
73
|
+
message: string;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the source of the error.
|
|
76
|
+
* For example it would be "documents" or "document id" in case of invalid document.
|
|
77
|
+
*/
|
|
78
|
+
target?: string;
|
|
79
|
+
/**
|
|
80
|
+
* New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow.
|
|
81
|
+
* This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested).
|
|
82
|
+
*/
|
|
83
|
+
innerError?: InnerTranslationError;
|
|
84
|
+
}
|
|
85
|
+
export interface InnerTranslationError {
|
|
86
|
+
/** Gets code error string. */
|
|
87
|
+
code: string;
|
|
88
|
+
/** Gets high level error message. */
|
|
89
|
+
message: string;
|
|
90
|
+
/**
|
|
91
|
+
* Gets the source of the error.
|
|
92
|
+
* For example it would be "documents" or "document id" in case of invalid document.
|
|
93
|
+
*/
|
|
94
|
+
target?: string;
|
|
95
|
+
/**
|
|
96
|
+
* New Inner Error format which conforms to Cognitive Services API Guidelines which is available at https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow.
|
|
97
|
+
* This contains required properties ErrorCode, message and optional properties target, details(key value pair), inner error(this can be nested).
|
|
98
|
+
*/
|
|
99
|
+
innerError?: InnerTranslationError;
|
|
100
|
+
}
|
|
101
|
+
export interface TranslationsStatus {
|
|
102
|
+
/** The summary status of individual operation */
|
|
103
|
+
value: TranslationStatus[];
|
|
104
|
+
/** Url for the next page. Null if no more pages available */
|
|
105
|
+
nextLink?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface TranslationStatus {
|
|
108
|
+
/** Id of the operation. */
|
|
109
|
+
id: string;
|
|
110
|
+
/** Operation created date time */
|
|
111
|
+
createdDateTimeUtc: Date;
|
|
112
|
+
/** Date time in which the operation's status has been updated */
|
|
113
|
+
lastActionDateTimeUtc: Date;
|
|
114
|
+
/** List of possible statuses for job or document */
|
|
115
|
+
status: Status;
|
|
116
|
+
/** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */
|
|
117
|
+
error?: TranslationError;
|
|
118
|
+
/** */
|
|
119
|
+
summary: StatusSummary;
|
|
120
|
+
}
|
|
121
|
+
export interface StatusSummary {
|
|
122
|
+
/** Total count */
|
|
123
|
+
total: number;
|
|
124
|
+
/** Failed count */
|
|
125
|
+
failed: number;
|
|
126
|
+
/** Number of Success */
|
|
127
|
+
success: number;
|
|
128
|
+
/** Number of in progress */
|
|
129
|
+
inProgress: number;
|
|
130
|
+
/** Count of not yet started */
|
|
131
|
+
notYetStarted: number;
|
|
132
|
+
/** Number of cancelled */
|
|
133
|
+
cancelled: number;
|
|
134
|
+
/** Total characters charged by the API */
|
|
135
|
+
totalCharacterCharged: number;
|
|
136
|
+
}
|
|
137
|
+
export interface DocumentStatus {
|
|
138
|
+
/** Location of the document or folder */
|
|
139
|
+
path?: string;
|
|
140
|
+
/** Location of the source document */
|
|
141
|
+
sourcePath: string;
|
|
142
|
+
/** Operation created date time */
|
|
143
|
+
createdDateTimeUtc: Date;
|
|
144
|
+
/** Date time in which the operation's status has been updated */
|
|
145
|
+
lastActionDateTimeUtc: Date;
|
|
146
|
+
/** List of possible statuses for job or document */
|
|
147
|
+
status: Status;
|
|
148
|
+
/** To language */
|
|
149
|
+
to: string;
|
|
150
|
+
/** This contains an outer error with error code, message, details, target and an inner error with more descriptive details. */
|
|
151
|
+
error?: TranslationError;
|
|
152
|
+
/** Progress of the translation if available */
|
|
153
|
+
progress: number;
|
|
154
|
+
/** Document Id */
|
|
155
|
+
id: string;
|
|
156
|
+
/** Character charged by the API */
|
|
157
|
+
characterCharged?: number;
|
|
158
|
+
}
|
|
159
|
+
export interface DocumentsStatus {
|
|
160
|
+
/** The detail status of individual documents */
|
|
161
|
+
value: DocumentStatus[];
|
|
162
|
+
/** Url for the next page. Null if no more pages available */
|
|
163
|
+
nextLink?: string;
|
|
164
|
+
}
|
|
165
|
+
export interface SupportedFileFormats {
|
|
166
|
+
/** list of objects */
|
|
167
|
+
value: FileFormat[];
|
|
168
|
+
}
|
|
169
|
+
export interface FileFormat {
|
|
170
|
+
/** Name of the format */
|
|
171
|
+
format: string;
|
|
172
|
+
/** Supported file extension for this format */
|
|
173
|
+
fileExtensions: string[];
|
|
174
|
+
/** Supported Content-Types for this format */
|
|
175
|
+
contentTypes: string[];
|
|
176
|
+
/** Default version if none is specified */
|
|
177
|
+
defaultVersion?: string;
|
|
178
|
+
/** Supported Version */
|
|
179
|
+
versions?: string[];
|
|
180
|
+
}
|
|
181
|
+
export interface SupportedStorageSources {
|
|
182
|
+
/** list of objects */
|
|
183
|
+
value: "AzureBlob"[];
|
|
184
|
+
}
|
|
185
|
+
export type StorageSource = "AzureBlob";
|
|
186
|
+
export type StorageInputType = "Folder" | "File";
|
|
187
|
+
export type TranslationErrorCode = "InvalidRequest" | "InvalidArgument" | "InternalServerError" | "ServiceUnavailable" | "ResourceNotFound" | "Unauthorized" | "RequestRateTooHigh";
|
|
188
|
+
export type Status = "NotStarted" | "Running" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "ValidationFailed";
|
|
189
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACtC,kEAAkE;IAClE,MAAM,EAAE,YAAY,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,MAAM,EAAE,WAAW,CAAC;IACpB,iDAAiD;IACjD,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,wDAAwD;IACxD,WAA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