@azure-rest/ai-document-intelligence 1.0.0-beta.3 → 1.1.0-alpha.20250513.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/LICENSE +4 -4
  3. package/README.md +274 -75
  4. package/dist/browser/audience.d.ts +19 -0
  5. package/dist/browser/audience.d.ts.map +1 -0
  6. package/dist/browser/audience.js +22 -0
  7. package/dist/browser/audience.js.map +1 -0
  8. package/dist/browser/clientDefinitions.d.ts +18 -8
  9. package/dist/browser/clientDefinitions.d.ts.map +1 -1
  10. package/dist/browser/clientDefinitions.js +1 -1
  11. package/dist/browser/clientDefinitions.js.map +1 -1
  12. package/dist/browser/documentIntelligence.d.ts +3 -3
  13. package/dist/browser/documentIntelligence.d.ts.map +1 -1
  14. package/dist/browser/documentIntelligence.js +9 -4
  15. package/dist/browser/documentIntelligence.js.map +1 -1
  16. package/dist/browser/index.d.ts +2 -0
  17. package/dist/browser/index.d.ts.map +1 -1
  18. package/dist/browser/index.js +3 -1
  19. package/dist/browser/index.js.map +1 -1
  20. package/dist/browser/isUnexpected.d.ts +5 -2
  21. package/dist/browser/isUnexpected.d.ts.map +1 -1
  22. package/dist/browser/isUnexpected.js +4 -1
  23. package/dist/browser/isUnexpected.js.map +1 -1
  24. package/dist/browser/logger.js +1 -1
  25. package/dist/browser/logger.js.map +1 -1
  26. package/dist/browser/models.d.ts +5 -5
  27. package/dist/browser/models.d.ts.map +1 -1
  28. package/dist/browser/models.js +1 -1
  29. package/dist/browser/models.js.map +1 -1
  30. package/dist/browser/outputModels.d.ts +85 -58
  31. package/dist/browser/outputModels.d.ts.map +1 -1
  32. package/dist/browser/outputModels.js +1 -1
  33. package/dist/browser/outputModels.js.map +1 -1
  34. package/dist/browser/paginateHelper.d.ts +28 -3
  35. package/dist/browser/paginateHelper.d.ts.map +1 -1
  36. package/dist/browser/paginateHelper.js +99 -2
  37. package/dist/browser/paginateHelper.js.map +1 -1
  38. package/dist/browser/parameters.d.ts +108 -24
  39. package/dist/browser/parameters.d.ts.map +1 -1
  40. package/dist/browser/parameters.js +1 -1
  41. package/dist/browser/parameters.js.map +1 -1
  42. package/dist/browser/pollingHelper.d.ts +25 -73
  43. package/dist/browser/pollingHelper.d.ts.map +1 -1
  44. package/dist/browser/pollingHelper.js +13 -51
  45. package/dist/browser/pollingHelper.js.map +1 -1
  46. package/dist/browser/responses.d.ts +68 -43
  47. package/dist/browser/responses.d.ts.map +1 -1
  48. package/dist/browser/responses.js +1 -1
  49. package/dist/browser/responses.js.map +1 -1
  50. package/dist/browser/utils.d.ts +5 -0
  51. package/dist/browser/utils.d.ts.map +1 -0
  52. package/dist/browser/utils.js +33 -0
  53. package/dist/browser/utils.js.map +1 -0
  54. package/dist/commonjs/audience.d.ts +19 -0
  55. package/dist/commonjs/audience.d.ts.map +1 -0
  56. package/dist/commonjs/audience.js +25 -0
  57. package/dist/commonjs/audience.js.map +1 -0
  58. package/dist/commonjs/clientDefinitions.d.ts +18 -8
  59. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  60. package/dist/commonjs/clientDefinitions.js +1 -1
  61. package/dist/commonjs/clientDefinitions.js.map +1 -1
  62. package/dist/commonjs/documentIntelligence.d.ts +3 -3
  63. package/dist/commonjs/documentIntelligence.d.ts.map +1 -1
  64. package/dist/commonjs/documentIntelligence.js +9 -4
  65. package/dist/commonjs/documentIntelligence.js.map +1 -1
  66. package/dist/commonjs/index.d.ts +2 -0
  67. package/dist/commonjs/index.d.ts.map +1 -1
  68. package/dist/commonjs/index.js +5 -1
  69. package/dist/commonjs/index.js.map +1 -1
  70. package/dist/commonjs/isUnexpected.d.ts +5 -2
  71. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  72. package/dist/commonjs/isUnexpected.js +4 -1
  73. package/dist/commonjs/isUnexpected.js.map +1 -1
  74. package/dist/commonjs/logger.js +1 -1
  75. package/dist/commonjs/logger.js.map +1 -1
  76. package/dist/commonjs/models.d.ts +5 -5
  77. package/dist/commonjs/models.d.ts.map +1 -1
  78. package/dist/commonjs/models.js +1 -1
  79. package/dist/commonjs/models.js.map +1 -1
  80. package/dist/commonjs/outputModels.d.ts +85 -58
  81. package/dist/commonjs/outputModels.d.ts.map +1 -1
  82. package/dist/commonjs/outputModels.js +1 -1
  83. package/dist/commonjs/outputModels.js.map +1 -1
  84. package/dist/commonjs/paginateHelper.d.ts +28 -3
  85. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  86. package/dist/commonjs/paginateHelper.js +100 -3
  87. package/dist/commonjs/paginateHelper.js.map +1 -1
  88. package/dist/commonjs/parameters.d.ts +108 -24
  89. package/dist/commonjs/parameters.d.ts.map +1 -1
  90. package/dist/commonjs/parameters.js +1 -1
  91. package/dist/commonjs/parameters.js.map +1 -1
  92. package/dist/commonjs/pollingHelper.d.ts +25 -73
  93. package/dist/commonjs/pollingHelper.d.ts.map +1 -1
  94. package/dist/commonjs/pollingHelper.js +13 -50
  95. package/dist/commonjs/pollingHelper.js.map +1 -1
  96. package/dist/commonjs/responses.d.ts +68 -43
  97. package/dist/commonjs/responses.d.ts.map +1 -1
  98. package/dist/commonjs/responses.js +1 -1
  99. package/dist/commonjs/responses.js.map +1 -1
  100. package/dist/commonjs/tsdoc-metadata.json +1 -1
  101. package/dist/commonjs/utils.d.ts +5 -0
  102. package/dist/commonjs/utils.d.ts.map +1 -0
  103. package/dist/commonjs/utils.js +36 -0
  104. package/dist/commonjs/utils.js.map +1 -0
  105. package/dist/esm/audience.d.ts +19 -0
  106. package/dist/esm/audience.d.ts.map +1 -0
  107. package/dist/esm/audience.js +22 -0
  108. package/dist/esm/audience.js.map +1 -0
  109. package/dist/esm/clientDefinitions.d.ts +18 -8
  110. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  111. package/dist/esm/clientDefinitions.js +1 -1
  112. package/dist/esm/clientDefinitions.js.map +1 -1
  113. package/dist/esm/documentIntelligence.d.ts +3 -3
  114. package/dist/esm/documentIntelligence.d.ts.map +1 -1
  115. package/dist/esm/documentIntelligence.js +9 -4
  116. package/dist/esm/documentIntelligence.js.map +1 -1
  117. package/dist/esm/index.d.ts +2 -0
  118. package/dist/esm/index.d.ts.map +1 -1
  119. package/dist/esm/index.js +3 -1
  120. package/dist/esm/index.js.map +1 -1
  121. package/dist/esm/isUnexpected.d.ts +5 -2
  122. package/dist/esm/isUnexpected.d.ts.map +1 -1
  123. package/dist/esm/isUnexpected.js +4 -1
  124. package/dist/esm/isUnexpected.js.map +1 -1
  125. package/dist/esm/logger.js +1 -1
  126. package/dist/esm/logger.js.map +1 -1
  127. package/dist/esm/models.d.ts +5 -5
  128. package/dist/esm/models.d.ts.map +1 -1
  129. package/dist/esm/models.js +1 -1
  130. package/dist/esm/models.js.map +1 -1
  131. package/dist/esm/outputModels.d.ts +85 -58
  132. package/dist/esm/outputModels.d.ts.map +1 -1
  133. package/dist/esm/outputModels.js +1 -1
  134. package/dist/esm/outputModels.js.map +1 -1
  135. package/dist/esm/paginateHelper.d.ts +28 -3
  136. package/dist/esm/paginateHelper.d.ts.map +1 -1
  137. package/dist/esm/paginateHelper.js +99 -2
  138. package/dist/esm/paginateHelper.js.map +1 -1
  139. package/dist/esm/parameters.d.ts +108 -24
  140. package/dist/esm/parameters.d.ts.map +1 -1
  141. package/dist/esm/parameters.js +1 -1
  142. package/dist/esm/parameters.js.map +1 -1
  143. package/dist/esm/pollingHelper.d.ts +25 -73
  144. package/dist/esm/pollingHelper.d.ts.map +1 -1
  145. package/dist/esm/pollingHelper.js +13 -51
  146. package/dist/esm/pollingHelper.js.map +1 -1
  147. package/dist/esm/responses.d.ts +68 -43
  148. package/dist/esm/responses.d.ts.map +1 -1
  149. package/dist/esm/responses.js +1 -1
  150. package/dist/esm/responses.js.map +1 -1
  151. package/dist/esm/utils.d.ts +5 -0
  152. package/dist/esm/utils.d.ts.map +1 -0
  153. package/dist/esm/utils.js +33 -0
  154. package/dist/esm/utils.js.map +1 -0
  155. package/dist/react-native/audience.d.ts +19 -0
  156. package/dist/react-native/audience.d.ts.map +1 -0
  157. package/dist/react-native/audience.js +22 -0
  158. package/dist/react-native/audience.js.map +1 -0
  159. package/dist/react-native/clientDefinitions.d.ts +18 -8
  160. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  161. package/dist/react-native/clientDefinitions.js +1 -1
  162. package/dist/react-native/clientDefinitions.js.map +1 -1
  163. package/dist/react-native/documentIntelligence.d.ts +3 -3
  164. package/dist/react-native/documentIntelligence.d.ts.map +1 -1
  165. package/dist/react-native/documentIntelligence.js +9 -4
  166. package/dist/react-native/documentIntelligence.js.map +1 -1
  167. package/dist/react-native/index.d.ts +2 -0
  168. package/dist/react-native/index.d.ts.map +1 -1
  169. package/dist/react-native/index.js +3 -1
  170. package/dist/react-native/index.js.map +1 -1
  171. package/dist/react-native/isUnexpected.d.ts +5 -2
  172. package/dist/react-native/isUnexpected.d.ts.map +1 -1
  173. package/dist/react-native/isUnexpected.js +4 -1
  174. package/dist/react-native/isUnexpected.js.map +1 -1
  175. package/dist/react-native/logger.js +1 -1
  176. package/dist/react-native/logger.js.map +1 -1
  177. package/dist/react-native/models.d.ts +5 -5
  178. package/dist/react-native/models.d.ts.map +1 -1
  179. package/dist/react-native/models.js +1 -1
  180. package/dist/react-native/models.js.map +1 -1
  181. package/dist/react-native/outputModels.d.ts +85 -58
  182. package/dist/react-native/outputModels.d.ts.map +1 -1
  183. package/dist/react-native/outputModels.js +1 -1
  184. package/dist/react-native/outputModels.js.map +1 -1
  185. package/dist/react-native/paginateHelper.d.ts +28 -3
  186. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  187. package/dist/react-native/paginateHelper.js +99 -2
  188. package/dist/react-native/paginateHelper.js.map +1 -1
  189. package/dist/react-native/parameters.d.ts +108 -24
  190. package/dist/react-native/parameters.d.ts.map +1 -1
  191. package/dist/react-native/parameters.js +1 -1
  192. package/dist/react-native/parameters.js.map +1 -1
  193. package/dist/react-native/pollingHelper.d.ts +25 -73
  194. package/dist/react-native/pollingHelper.d.ts.map +1 -1
  195. package/dist/react-native/pollingHelper.js +13 -51
  196. package/dist/react-native/pollingHelper.js.map +1 -1
  197. package/dist/react-native/responses.d.ts +68 -43
  198. package/dist/react-native/responses.d.ts.map +1 -1
  199. package/dist/react-native/responses.js +1 -1
  200. package/dist/react-native/responses.js.map +1 -1
  201. package/dist/react-native/utils.d.ts +5 -0
  202. package/dist/react-native/utils.d.ts.map +1 -0
  203. package/dist/react-native/utils.js +33 -0
  204. package/dist/react-native/utils.js.map +1 -0
  205. package/package.json +44 -58
  206. package/review/ai-document-intelligence.api.md +380 -221
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,mBAAmB,EACnB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,SAAS,EACT,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;CACvD;AAED,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG,iBAAiB,CAAC;AAErF,MAAM,WAAW,qCAAqC;IACpD,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,yCAAyC;IACxD,OAAO,CAAC,EAAE,mBAAmB,GAAG,qCAAqC,CAAC;C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E,oCAAoC,CAAC;CACxD;AAED,MAAM,WAAW,+BAA+B;IAC9C,yBAAyB;IACzB,WAAW,EAAE,kBAAkB,CAAC;CACjC;AAED,MAAM,MAAM,0BAA0B,GAAG,0BAA0B,GACjE,+BAA+B,GAC/B,yBAAyB,GACzB,iBAAiB,CAAC;AACpB,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,WAAW,gCAAgC;IAC/C,yCAAyC;IACzC,IAAI,EAAE,8BAA8B,CAAC;CACtC;AAED,MAAM,MAAM,iCAAiC,GAAG,gCAAgC,GAC9E,iBAAiB,CAAC;AAEpB,MAAM,WAAW,yBAAyB;IACxC,kCAAkC;IAClC,IAAI,EAAE,2BAA2B,CAAC;CACnC;AAED,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,GAAG,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=parameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n StringIndexType,\n DocumentAnalysisFeature,\n ContentFormat,\n AnalyzeOutputOption,\n AnalyzeDocumentRequest,\n AnalyzeBatchDocumentsRequest,\n BuildDocumentModelRequest,\n ComposeDocumentModelRequest,\n AuthorizeCopyRequest,\n CopyAuthorization,\n BuildDocumentClassifierRequest,\n SplitMode,\n ClassifyDocumentRequest,\n AuthorizeClassifierCopyRequest,\n ClassifierCopyAuthorization,\n} from \"./models.js\";\n\nexport interface ListOperationsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListOperationsHeaderParam {\n headers?: RawHttpHeadersInput & ListOperationsHeaders;\n}\n\nexport type ListOperationsParameters = ListOperationsHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelBuildOperationHeaders;\n}\n\nexport type GetDocumentModelBuildOperationParameters = GetDocumentModelBuildOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentModelComposeOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelComposeOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelComposeOperationHeaders;\n}\n\nexport type GetDocumentModelComposeOperationParameters =\n GetDocumentModelComposeOperationHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelCopyToOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelCopyToOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelCopyToOperationHeaders;\n}\n\nexport type GetDocumentModelCopyToOperationParameters = GetDocumentModelCopyToOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentClassifierCopyToOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentClassifierCopyToOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentClassifierCopyToOperationHeaders;\n}\n\nexport type GetDocumentClassifierCopyToOperationParameters =\n GetDocumentClassifierCopyToOperationHeaderParam & RequestParameters;\n\nexport interface GetDocumentClassifierBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentClassifierBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentClassifierBuildOperationHeaders;\n}\n\nexport type GetDocumentClassifierBuildOperationParameters =\n GetDocumentClassifierBuildOperationHeaderParam & RequestParameters;\n\nexport interface GetOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetOperationHeaders;\n}\n\nexport type GetOperationParameters = GetOperationHeaderParam & RequestParameters;\nexport type GetResourceInfoParameters = RequestParameters;\nexport type GetAnalyzeResultParameters = RequestParameters;\nexport type GetAnalyzeResultPdfParameters = RequestParameters;\nexport type GetAnalyzeResultFigureParameters = RequestParameters;\n\nexport interface AnalyzeDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: ContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[];\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParam {\n queryParameters?: AnalyzeDocumentFromStreamQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type AnalyzeDocumentFromStreamParameters = AnalyzeDocumentFromStreamQueryParam &\n AnalyzeDocumentFromStreamMediaTypesParam &\n AnalyzeDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface AnalyzeDocumentBodyParam {\n /** Analyze request parameters. */\n body?: AnalyzeDocumentRequest;\n}\n\nexport interface AnalyzeDocumentQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: ContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[];\n}\n\nexport interface AnalyzeDocumentQueryParam {\n queryParameters?: AnalyzeDocumentQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentMediaTypesParam {\n /** Input content type. */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeDocumentParameters = AnalyzeDocumentQueryParam &\n AnalyzeDocumentMediaTypesParam &\n AnalyzeDocumentBodyParam &\n RequestParameters;\nexport type GetAnalyzeBatchResultParameters = RequestParameters;\n\nexport interface AnalyzeBatchDocumentsBodyParam {\n /** Analyze batch request parameters. */\n body?: AnalyzeBatchDocumentsRequest;\n}\n\nexport interface AnalyzeBatchDocumentsQueryParamProperties {\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[];\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[];\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: ContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[];\n}\n\nexport interface AnalyzeBatchDocumentsQueryParam {\n queryParameters?: AnalyzeBatchDocumentsQueryParamProperties;\n}\n\nexport interface AnalyzeBatchDocumentsMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeBatchDocumentsParameters = AnalyzeBatchDocumentsQueryParam &\n AnalyzeBatchDocumentsMediaTypesParam &\n AnalyzeBatchDocumentsBodyParam &\n RequestParameters;\n\nexport interface GetModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetModelHeaderParam {\n headers?: RawHttpHeadersInput & GetModelHeaders;\n}\n\nexport type GetModelParameters = GetModelHeaderParam & RequestParameters;\n\nexport interface BuildModelBodyParam {\n /** Build request parameters. */\n body: BuildDocumentModelRequest;\n}\n\nexport type BuildModelParameters = BuildModelBodyParam & RequestParameters;\n\nexport interface ComposeModelBodyParam {\n /** Compose request parameters. */\n body: ComposeDocumentModelRequest;\n}\n\nexport type ComposeModelParameters = ComposeModelBodyParam & RequestParameters;\n\nexport interface AuthorizeModelCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeCopyRequest;\n}\n\nexport type AuthorizeModelCopyParameters = AuthorizeModelCopyBodyParam & RequestParameters;\n\nexport interface CopyModelToBodyParam {\n /** Copy to request parameters. */\n body: CopyAuthorization;\n}\n\nexport type CopyModelToParameters = CopyModelToBodyParam & RequestParameters;\n\nexport interface ListModelsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListModelsHeaderParam {\n headers?: RawHttpHeadersInput & ListModelsHeaders;\n}\n\nexport type ListModelsParameters = ListModelsHeaderParam & RequestParameters;\n\nexport interface DeleteModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteModelHeaderParam {\n headers?: RawHttpHeadersInput & DeleteModelHeaders;\n}\n\nexport type DeleteModelParameters = DeleteModelHeaderParam & RequestParameters;\n\nexport interface BuildClassifierBodyParam {\n /** Build request parameters. */\n body: BuildDocumentClassifierRequest;\n}\n\nexport type BuildClassifierParameters = BuildClassifierBodyParam & RequestParameters;\n\nexport interface ListClassifiersHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListClassifiersHeaderParam {\n headers?: RawHttpHeadersInput & ListClassifiersHeaders;\n}\n\nexport type ListClassifiersParameters = ListClassifiersHeaderParam & RequestParameters;\n\nexport interface GetClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetClassifierHeaderParam {\n headers?: RawHttpHeadersInput & GetClassifierHeaders;\n}\n\nexport type GetClassifierParameters = GetClassifierHeaderParam & RequestParameters;\n\nexport interface DeleteClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteClassifierHeaderParam {\n headers?: RawHttpHeadersInput & DeleteClassifierHeaders;\n}\n\nexport type DeleteClassifierParameters = DeleteClassifierHeaderParam & RequestParameters;\n\nexport interface ClassifyDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: SplitMode;\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParam {\n queryParameters?: ClassifyDocumentFromStreamQueryParamProperties;\n}\n\nexport interface ClassifyDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type ClassifyDocumentFromStreamParameters = ClassifyDocumentFromStreamQueryParam &\n ClassifyDocumentFromStreamMediaTypesParam &\n ClassifyDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface ClassifyDocumentBodyParam {\n /** Classify request parameters. */\n body: ClassifyDocumentRequest;\n}\n\nexport interface ClassifyDocumentQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: SplitMode;\n /** List of 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n}\n\nexport interface ClassifyDocumentQueryParam {\n queryParameters?: ClassifyDocumentQueryParamProperties;\n}\n\nexport interface ClassifyDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type ClassifyDocumentParameters = ClassifyDocumentQueryParam &\n ClassifyDocumentMediaTypesParam &\n ClassifyDocumentBodyParam &\n RequestParameters;\nexport type GetClassifyResultParameters = RequestParameters;\n\nexport interface AuthorizeClassifierCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeClassifierCopyRequest;\n}\n\nexport type AuthorizeClassifierCopyParameters = AuthorizeClassifierCopyBodyParam &\n RequestParameters;\n\nexport interface CopyClassifierToBodyParam {\n /** Copy to request parameters. */\n body: ClassifierCopyAuthorization;\n}\n\nexport type CopyClassifierToParameters = CopyClassifierToBodyParam & RequestParameters;\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n StringIndexType,\n DocumentAnalysisFeature,\n DocumentContentFormat,\n AnalyzeOutputOption,\n AnalyzeDocumentRequest,\n AnalyzeBatchDocumentsRequest,\n BuildDocumentModelRequest,\n ComposeDocumentModelRequest,\n AuthorizeCopyRequest,\n ModelCopyAuthorization,\n BuildDocumentClassifierRequest,\n SplitMode,\n ClassifyDocumentRequest,\n AuthorizeClassifierCopyRequest,\n ClassifierCopyAuthorization,\n} from \"./models.js\";\n\nexport interface ListOperationsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListOperationsHeaderParam {\n headers?: RawHttpHeadersInput & ListOperationsHeaders;\n}\n\nexport type ListOperationsParameters = ListOperationsHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelBuildOperationHeaders;\n}\n\nexport type GetDocumentModelBuildOperationParameters = GetDocumentModelBuildOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentModelComposeOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelComposeOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelComposeOperationHeaders;\n}\n\nexport type GetDocumentModelComposeOperationParameters =\n GetDocumentModelComposeOperationHeaderParam & RequestParameters;\n\nexport interface GetDocumentModelCopyToOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentModelCopyToOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentModelCopyToOperationHeaders;\n}\n\nexport type GetDocumentModelCopyToOperationParameters = GetDocumentModelCopyToOperationHeaderParam &\n RequestParameters;\n\nexport interface GetDocumentClassifierCopyToOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentClassifierCopyToOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentClassifierCopyToOperationHeaders;\n}\n\nexport type GetDocumentClassifierCopyToOperationParameters =\n GetDocumentClassifierCopyToOperationHeaderParam & RequestParameters;\n\nexport interface GetDocumentClassifierBuildOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetDocumentClassifierBuildOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetDocumentClassifierBuildOperationHeaders;\n}\n\nexport type GetDocumentClassifierBuildOperationParameters =\n GetDocumentClassifierBuildOperationHeaderParam & RequestParameters;\n\nexport interface GetOperationHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetOperationHeaderParam {\n headers?: RawHttpHeadersInput & GetOperationHeaders;\n}\n\nexport type GetOperationParameters = GetOperationHeaderParam & RequestParameters;\nexport type GetResourceDetailsParameters = RequestParameters;\nexport type GetAnalyzeResultParameters = RequestParameters;\nexport type GetAnalyzeResultPdfParameters = RequestParameters;\nexport type GetAnalyzeResultFigureParameters = RequestParameters;\nexport type DeleteAnalyzeResultParameters = RequestParameters;\n\nexport interface AnalyzeDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body:\n | string\n | Uint8Array\n // eslint-disable-next-line n/no-unsupported-features/node-builtins\n | ReadableStream<Uint8Array>\n | NodeJS.ReadableStream;\n}\n\n/** This is the wrapper object for the parameter `features` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentFromStreamFeaturesQueryParam {\n /** Value of the parameter */\n value: DocumentAnalysisFeature[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `queryFields` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentFromStreamQueryFieldsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `output` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentFromStreamOutputQueryParam {\n /** Value of the parameter */\n value: AnalyzeOutputOption[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParamProperties {\n /** 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[] | AnalyzeDocumentFromStreamFeaturesQueryParam;\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[] | AnalyzeDocumentFromStreamQueryFieldsQueryParam;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: DocumentContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[] | AnalyzeDocumentFromStreamOutputQueryParam;\n}\n\nexport interface AnalyzeDocumentFromStreamQueryParam {\n queryParameters?: AnalyzeDocumentFromStreamQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type AnalyzeDocumentFromStreamParameters = AnalyzeDocumentFromStreamQueryParam &\n AnalyzeDocumentFromStreamMediaTypesParam &\n AnalyzeDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface AnalyzeDocumentBodyParam {\n /** Analyze request parameters. */\n body: AnalyzeDocumentRequest;\n}\n\n/** This is the wrapper object for the parameter `features` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentFeaturesQueryParam {\n /** Value of the parameter */\n value: DocumentAnalysisFeature[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `queryFields` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentQueryFieldsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `output` with explode set to false and style set to form. */\nexport interface AnalyzeDocumentOutputQueryParam {\n /** Value of the parameter */\n value: AnalyzeOutputOption[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface AnalyzeDocumentQueryParamProperties {\n /** 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[] | AnalyzeDocumentFeaturesQueryParam;\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[] | AnalyzeDocumentQueryFieldsQueryParam;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: DocumentContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[] | AnalyzeDocumentOutputQueryParam;\n}\n\nexport interface AnalyzeDocumentQueryParam {\n queryParameters?: AnalyzeDocumentQueryParamProperties;\n}\n\nexport interface AnalyzeDocumentMediaTypesParam {\n /** Input content type. */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeDocumentParameters = AnalyzeDocumentQueryParam &\n AnalyzeDocumentMediaTypesParam &\n AnalyzeDocumentBodyParam &\n RequestParameters;\nexport type GetAnalyzeBatchResultParameters = RequestParameters;\n\nexport interface AnalyzeBatchDocumentsBodyParam {\n /** Analyze batch request parameters. */\n body: AnalyzeBatchDocumentsRequest;\n}\n\n/** This is the wrapper object for the parameter `features` with explode set to false and style set to form. */\nexport interface AnalyzeBatchDocumentsFeaturesQueryParam {\n /** Value of the parameter */\n value: DocumentAnalysisFeature[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `queryFields` with explode set to false and style set to form. */\nexport interface AnalyzeBatchDocumentsQueryFieldsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `output` with explode set to false and style set to form. */\nexport interface AnalyzeBatchDocumentsOutputQueryParam {\n /** Value of the parameter */\n value: AnalyzeOutputOption[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface AnalyzeBatchDocumentsQueryParamProperties {\n /** 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n /**\n * Locale hint for text recognition and document analysis. Value may contain only\n * the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").\n */\n locale?: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /** List of optional analysis features. */\n features?: DocumentAnalysisFeature[] | AnalyzeBatchDocumentsFeaturesQueryParam;\n /** List of additional fields to extract. Ex. \"NumberOfGuests,StoreNumber\" */\n queryFields?: string[] | AnalyzeBatchDocumentsQueryFieldsQueryParam;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n outputContentFormat?: DocumentContentFormat;\n /** Additional outputs to generate during analysis. */\n output?: AnalyzeOutputOption[] | AnalyzeBatchDocumentsOutputQueryParam;\n}\n\nexport interface AnalyzeBatchDocumentsQueryParam {\n queryParameters?: AnalyzeBatchDocumentsQueryParamProperties;\n}\n\nexport interface AnalyzeBatchDocumentsMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type AnalyzeBatchDocumentsParameters = AnalyzeBatchDocumentsQueryParam &\n AnalyzeBatchDocumentsMediaTypesParam &\n AnalyzeBatchDocumentsBodyParam &\n RequestParameters;\nexport type ListAnalyzeBatchResultsParameters = RequestParameters;\nexport type DeleteAnalyzeBatchResultParameters = RequestParameters;\n\nexport interface GetModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetModelHeaderParam {\n headers?: RawHttpHeadersInput & GetModelHeaders;\n}\n\nexport type GetModelParameters = GetModelHeaderParam & RequestParameters;\n\nexport interface BuildModelBodyParam {\n /** Build request parameters. */\n body: BuildDocumentModelRequest;\n}\n\nexport type BuildModelParameters = BuildModelBodyParam & RequestParameters;\n\nexport interface ComposeModelBodyParam {\n /** Compose request parameters. */\n body: ComposeDocumentModelRequest;\n}\n\nexport type ComposeModelParameters = ComposeModelBodyParam & RequestParameters;\n\nexport interface AuthorizeModelCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeCopyRequest;\n}\n\nexport type AuthorizeModelCopyParameters = AuthorizeModelCopyBodyParam & RequestParameters;\n\nexport interface CopyModelToBodyParam {\n /** Copy to request parameters. */\n body: ModelCopyAuthorization;\n}\n\nexport type CopyModelToParameters = CopyModelToBodyParam & RequestParameters;\n\nexport interface ListModelsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListModelsHeaderParam {\n headers?: RawHttpHeadersInput & ListModelsHeaders;\n}\n\nexport type ListModelsParameters = ListModelsHeaderParam & RequestParameters;\n\nexport interface DeleteModelHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteModelHeaderParam {\n headers?: RawHttpHeadersInput & DeleteModelHeaders;\n}\n\nexport type DeleteModelParameters = DeleteModelHeaderParam & RequestParameters;\n\nexport interface BuildClassifierBodyParam {\n /** Build request parameters. */\n body: BuildDocumentClassifierRequest;\n}\n\nexport type BuildClassifierParameters = BuildClassifierBodyParam & RequestParameters;\n\nexport interface ListClassifiersHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListClassifiersHeaderParam {\n headers?: RawHttpHeadersInput & ListClassifiersHeaders;\n}\n\nexport type ListClassifiersParameters = ListClassifiersHeaderParam & RequestParameters;\n\nexport interface GetClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetClassifierHeaderParam {\n headers?: RawHttpHeadersInput & GetClassifierHeaders;\n}\n\nexport type GetClassifierParameters = GetClassifierHeaderParam & RequestParameters;\n\nexport interface DeleteClassifierHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteClassifierHeaderParam {\n headers?: RawHttpHeadersInput & DeleteClassifierHeaders;\n}\n\nexport type DeleteClassifierParameters = DeleteClassifierHeaderParam & RequestParameters;\n\nexport interface ClassifyDocumentFromStreamBodyParam {\n /**\n * Input content.\n *\n * Value may contain any sequence of octets\n */\n body:\n | string\n | Uint8Array\n // eslint-disable-next-line n/no-unsupported-features/node-builtins\n | ReadableStream<Uint8Array>\n | NodeJS.ReadableStream;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: SplitMode;\n /** 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n}\n\nexport interface ClassifyDocumentFromStreamQueryParam {\n queryParameters?: ClassifyDocumentFromStreamQueryParamProperties;\n}\n\nexport interface ClassifyDocumentFromStreamMediaTypesParam {\n /** Input content type. */\n contentType:\n | \"application/octet-stream\"\n | \"application/pdf\"\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/heif\"\n | \"text/html\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n}\n\nexport type ClassifyDocumentFromStreamParameters = ClassifyDocumentFromStreamQueryParam &\n ClassifyDocumentFromStreamMediaTypesParam &\n ClassifyDocumentFromStreamBodyParam &\n RequestParameters;\n\nexport interface ClassifyDocumentBodyParam {\n /** Classify request parameters. */\n body: ClassifyDocumentRequest;\n}\n\nexport interface ClassifyDocumentQueryParamProperties {\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * Document splitting mode.\n *\n * Possible values: \"auto\", \"none\", \"perPage\"\n */\n split?: SplitMode;\n /** 1-based page numbers to analyze. Ex. \"1-3,5,7-9\" */\n pages?: string;\n}\n\nexport interface ClassifyDocumentQueryParam {\n queryParameters?: ClassifyDocumentQueryParamProperties;\n}\n\nexport interface ClassifyDocumentMediaTypesParam {\n /** Input content type */\n contentType: \"application/json\";\n}\n\nexport type ClassifyDocumentParameters = ClassifyDocumentQueryParam &\n ClassifyDocumentMediaTypesParam &\n ClassifyDocumentBodyParam &\n RequestParameters;\nexport type GetClassifyResultParameters = RequestParameters;\n\nexport interface AuthorizeClassifierCopyBodyParam {\n /** Authorize copy request parameters. */\n body: AuthorizeClassifierCopyRequest;\n}\n\nexport type AuthorizeClassifierCopyParameters = AuthorizeClassifierCopyBodyParam &\n RequestParameters;\n\nexport interface CopyClassifierToBodyParam {\n /** Copy to request parameters. */\n body: ClassifierCopyAuthorization;\n}\n\nexport type CopyClassifierToParameters = CopyClassifierToBodyParam & RequestParameters;\n"]}
@@ -1,74 +1,18 @@
1
- import { Client } from "@azure-rest/core-client";
2
- import { AbortSignalLike } from "@azure/abort-controller";
3
- import { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
4
- import { AnalyzeDocumentFromStream202Response, AnalyzeDocumentFromStreamDefaultResponse, AnalyzeDocumentFromStreamLogicalResponse, AnalyzeBatchDocuments202Response, AnalyzeBatchDocumentsDefaultResponse, AnalyzeBatchDocumentsLogicalResponse, BuildModel202Response, BuildModelDefaultResponse, BuildModelLogicalResponse, ComposeModel202Response, ComposeModelDefaultResponse, ComposeModelLogicalResponse, CopyModelTo202Response, CopyModelToDefaultResponse, CopyModelToLogicalResponse, BuildClassifier202Response, BuildClassifierDefaultResponse, BuildClassifierLogicalResponse, ClassifyDocumentFromStream202Response, ClassifyDocumentFromStreamDefaultResponse, ClassifyDocumentFromStreamLogicalResponse, CopyClassifierTo202Response, CopyClassifierToDefaultResponse, CopyClassifierToLogicalResponse } from "./responses.js";
1
+ import type { Client } from "@azure-rest/core-client";
2
+ import type { OperationState, PollerLike } from "@azure/core-lro";
3
+ import type { AnalyzeDocumentFromStream202Response, AnalyzeDocumentFromStreamDefaultResponse, AnalyzeDocumentFromStreamLogicalResponse, AnalyzeBatchDocuments202Response, AnalyzeBatchDocumentsDefaultResponse, AnalyzeBatchDocumentsLogicalResponse, BuildModel202Response, BuildModelDefaultResponse, BuildModelLogicalResponse, ComposeModel202Response, ComposeModelDefaultResponse, ComposeModelLogicalResponse, CopyModelTo202Response, CopyModelToDefaultResponse, CopyModelToLogicalResponse, BuildClassifier202Response, BuildClassifierDefaultResponse, BuildClassifierLogicalResponse, ClassifyDocumentFromStream202Response, ClassifyDocumentFromStreamDefaultResponse, ClassifyDocumentFromStreamLogicalResponse, CopyClassifierTo202Response, CopyClassifierToDefaultResponse, CopyClassifierToLogicalResponse } from "./responses.js";
5
4
  /**
6
- * A simple poller that can be used to poll a long running operation.
5
+ * Options for `getLongRunningPoller`.
7
6
  */
8
- export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
7
+ export interface GetLongRunningPollerOptions {
9
8
  /**
10
- * Returns true if the poller has finished polling.
9
+ * Defines how much time the poller is going to wait before making a new request to the service.
11
10
  */
12
- isDone(): boolean;
11
+ intervalInMs?: number;
13
12
  /**
14
- * Returns the state of the operation.
13
+ * A serialized poller which can be used to resume an existing paused Long-Running-Operation.
15
14
  */
16
- getOperationState(): TState;
17
- /**
18
- * Returns the id of the operation.
19
- */
20
- getOperationId(): string;
21
- /**
22
- * Returns the result value of the operation,
23
- * regardless of the state of the poller.
24
- * It can return undefined or an incomplete form of the final TResult value
25
- * depending on the implementation.
26
- */
27
- getResult(): TResult | undefined;
28
- /**
29
- * Returns a promise that will resolve once a single polling request finishes.
30
- * It does this by calling the update method of the Poller's operation.
31
- */
32
- poll(options?: {
33
- abortSignal?: AbortSignalLike;
34
- }): Promise<TState>;
35
- /**
36
- * Returns a promise that will resolve once the underlying operation is completed.
37
- */
38
- pollUntilDone(pollOptions?: {
39
- abortSignal?: AbortSignalLike;
40
- }): Promise<TResult>;
41
- /**
42
- * Invokes the provided callback after each polling is completed,
43
- * sending the current state of the poller's operation.
44
- *
45
- * It returns a method that can be used to stop receiving updates on the given callback function.
46
- */
47
- onProgress(callback: (state: TState) => void): CancelOnProgress;
48
- /**
49
- * Returns a promise that could be used for serialized version of the poller's operation
50
- * by invoking the operation's serialize method.
51
- */
52
- serialize(): Promise<string>;
53
- /**
54
- * Wait the poller to be submitted.
55
- */
56
- submitted(): Promise<void>;
57
- /**
58
- * Returns a string representation of the poller's operation. Similar to serialize but returns a string.
59
- * @deprecated Use serialize() instead.
60
- */
61
- toString(): string;
62
- /**
63
- * Stops the poller from continuing to poll. Please note this will only stop the client-side polling
64
- * @deprecated Use abortSignal to stop polling instead.
65
- */
66
- stopPolling(): void;
67
- /**
68
- * Returns true if the poller is stopped.
69
- * @deprecated Use abortSignal status to track this instead.
70
- */
71
- isStopped(): boolean;
15
+ restoreFrom?: string;
72
16
  }
73
17
  /**
74
18
  * Helper function that builds a Poller object to help polling a long running operation.
@@ -77,12 +21,20 @@ export interface SimplePollerLike<TState extends OperationState<TResult>, TResul
77
21
  * @param options - Options to set a resume state or custom polling interval.
78
22
  * @returns - A poller object to poll for operation state updates and eventually get the final response.
79
23
  */
80
- export declare function getLongRunningPoller<TResult extends AnalyzeBatchDocumentsLogicalResponse | AnalyzeBatchDocumentsDefaultResponse>(client: Client, initialResponse: AnalyzeBatchDocuments202Response | AnalyzeBatchDocumentsDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
81
- export declare function getLongRunningPoller<TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse>(client: Client, initialResponse: BuildModel202Response | BuildModelDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
82
- export declare function getLongRunningPoller<TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse>(client: Client, initialResponse: ComposeModel202Response | ComposeModelDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
83
- export declare function getLongRunningPoller<TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse>(client: Client, initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
84
- export declare function getLongRunningPoller<TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse>(client: Client, initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
85
- export declare function getLongRunningPoller<TResult extends CopyClassifierToLogicalResponse | CopyClassifierToDefaultResponse>(client: Client, initialResponse: CopyClassifierTo202Response | CopyClassifierToDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
86
- export declare function getLongRunningPoller<TResult extends AnalyzeDocumentFromStreamLogicalResponse | AnalyzeDocumentFromStreamDefaultResponse>(client: Client, initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
87
- export declare function getLongRunningPoller<TResult extends ClassifyDocumentFromStreamLogicalResponse | ClassifyDocumentFromStreamDefaultResponse>(client: Client, initialResponse: ClassifyDocumentFromStream202Response | ClassifyDocumentFromStreamDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
24
+ export declare function getLongRunningPoller<TResult extends AnalyzeBatchDocumentsLogicalResponse | AnalyzeBatchDocumentsDefaultResponse>(client: Client, initialResponse: AnalyzeBatchDocuments202Response | AnalyzeBatchDocumentsDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
25
+ export declare function getLongRunningPoller<TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse>(client: Client, initialResponse: BuildModel202Response | BuildModelDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
26
+ export declare function getLongRunningPoller<TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse>(client: Client, initialResponse: ComposeModel202Response | ComposeModelDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
27
+ export declare function getLongRunningPoller<TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse>(client: Client, initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
28
+ export declare function getLongRunningPoller<TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse>(client: Client, initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
29
+ export declare function getLongRunningPoller<TResult extends CopyClassifierToLogicalResponse | CopyClassifierToDefaultResponse>(client: Client, initialResponse: CopyClassifierTo202Response | CopyClassifierToDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
30
+ export declare function getLongRunningPoller<TResult extends AnalyzeDocumentFromStreamLogicalResponse | AnalyzeDocumentFromStreamDefaultResponse>(client: Client, initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
31
+ export declare function getLongRunningPoller<TResult extends ClassifyDocumentFromStreamLogicalResponse | ClassifyDocumentFromStreamDefaultResponse>(client: Client, initialResponse: ClassifyDocumentFromStream202Response | ClassifyDocumentFromStreamDefaultResponse, options?: GetLongRunningPollerOptions): PollerLike<OperationState<TResult>, TResult>;
32
+ /**
33
+ * Returns the operation-id from the initialResponse header
34
+ */
35
+ export declare function parseResultIdFromResponse(initialResponse: {
36
+ headers: {
37
+ "operation-location": string;
38
+ };
39
+ }): string;
88
40
  //# sourceMappingURL=pollingHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EAGvB,cAAc,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oCAAoC,EACpC,wCAAwC,EACxC,wCAAwC,EACxC,gCAAgC,EAChC,oCAAoC,EACpC,oCAAoC,EACpC,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,s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BAAoB,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C,GAAG,MAAM,CAGT"}
@@ -1,8 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { createHttpPoller, } from "@azure/core-lro";
4
- export async function getLongRunningPoller(client, initialResponse, options = {}) {
5
- var _a;
2
+ // Licensed under the MIT License.
3
+ import { createHttpPoller } from "@azure/core-lro";
4
+ export function getLongRunningPoller(client, initialResponse, options = {}) {
6
5
  const abortController = new AbortController();
7
6
  const poller = {
8
7
  sendInitialRequest: async () => {
@@ -43,64 +42,27 @@ export async function getLongRunningPoller(client, initialResponse, options = {}
43
42
  return lroResponse;
44
43
  },
45
44
  };
46
- options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
47
- const httpPoller = createHttpPoller(poller, Object.assign(Object.assign({}, options), { updateState: (state, response) => {
48
- const flatResponse = response.flatResponse;
49
- if (!("body" in flatResponse))
50
- return;
51
- const flatResponseBody = flatResponse.body;
52
- if (!("status" in flatResponseBody && flatResponseBody.status === "completed"))
53
- return;
54
- state.status = "succeeded";
55
- } }));
56
- const simplePoller = {
57
- isDone() {
58
- return httpPoller.isDone;
59
- },
60
- isStopped() {
61
- return abortController.signal.aborted;
62
- },
63
- getOperationState() {
64
- if (!httpPoller.operationState) {
65
- throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
66
- }
67
- return httpPoller.operationState;
68
- },
69
- getResult() {
70
- return httpPoller.result;
71
- },
72
- toString() {
73
- if (!httpPoller.operationState) {
74
- throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
75
- }
76
- return JSON.stringify({
77
- state: httpPoller.operationState,
78
- });
79
- },
80
- stopPolling() {
81
- abortController.abort();
82
- },
83
- onProgress: httpPoller.onProgress,
84
- poll: httpPoller.poll,
85
- pollUntilDone: httpPoller.pollUntilDone,
86
- serialize: httpPoller.serialize,
87
- submitted: httpPoller.submitted,
88
- getOperationId: () => parseOperationId(initialResponse.headers["operation-location"]),
89
- };
90
- return simplePoller;
45
+ return createHttpPoller(poller, options);
91
46
  }
92
47
  /**
93
48
  * Returns the operation-id from the operation-location header
94
49
  */
95
- function parseOperationId(operationLocationHeader) {
50
+ function parseResultId(operationLocationHeader) {
96
51
  // regex to extract the operation id from the operation-location header with the regex "[^:]+://[^/]+/documentintelligence/.+/([^?/]+)"
97
52
  const regex = /[^:]+:\/\/[^/]+\/documentintelligence\/.+\/([^?/]+)/;
98
53
  const match = operationLocationHeader.match(regex);
99
54
  if (!match) {
100
- throw new Error(`Failed to parse operation id from the operation-location header: ${operationLocationHeader}`);
55
+ throw new Error(`Failed to parse result id from the operation-location header: ${operationLocationHeader}`);
101
56
  }
102
57
  return match[1];
103
58
  }
59
+ /**
60
+ * Returns the operation-id from the initialResponse header
61
+ */
62
+ export function parseResultIdFromResponse(initialResponse) {
63
+ const operationLocationHeader = initialResponse.headers["operation-location"];
64
+ return parseResultId(operationLocationHeader);
65
+ }
104
66
  /**
105
67
  * Converts a Rest Client response to a response that the LRO implementation understands
106
68
  * @param response - a rest client http response
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAwKzB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAY,EAAE,WAA+C,EAAE,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CAAC,SAAS;QAC/B,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,cAAc,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;KACtF,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,uBAA+B;IACvD,uIAAuI;IACvI,MAAM,KAAK,GAAG,qDAAqD,CAAC;IACpE,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,oEAAoE,uBAAuB,EAAE,CAC9F,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocumentFromStreamDefaultResponse,\n AnalyzeDocumentFromStreamLogicalResponse,\n AnalyzeBatchDocuments202Response,\n AnalyzeBatchDocumentsDefaultResponse,\n AnalyzeBatchDocumentsLogicalResponse,\n BuildModel202Response,\n BuildModelDefaultResponse,\n BuildModelLogicalResponse,\n ComposeModel202Response,\n ComposeModelDefaultResponse,\n ComposeModelLogicalResponse,\n CopyModelTo202Response,\n CopyModelToDefaultResponse,\n CopyModelToLogicalResponse,\n BuildClassifier202Response,\n BuildClassifierDefaultResponse,\n BuildClassifierLogicalResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocumentFromStreamDefaultResponse,\n ClassifyDocumentFromStreamLogicalResponse,\n CopyClassifierTo202Response,\n CopyClassifierToDefaultResponse,\n CopyClassifierToLogicalResponse,\n} from \"./responses.js\";\nimport { AnalyzeBatchResultOperationOutput } from \"./outputModels.js\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the id of the operation.\n */\n getOperationId(): string;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends AnalyzeBatchDocumentsLogicalResponse | AnalyzeBatchDocumentsDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeBatchDocuments202Response | AnalyzeBatchDocumentsDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildModel202Response | BuildModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n>(\n client: Client,\n initialResponse: ComposeModel202Response | ComposeModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends CopyClassifierToLogicalResponse | CopyClassifierToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyClassifierTo202Response | CopyClassifierToDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n\n const httpPoller = createHttpPoller(poller, {\n ...options,\n updateState: (state, response) => {\n const flatResponse = <HttpResponse>response.flatResponse;\n if (!(\"body\" in flatResponse)) return;\n const flatResponseBody = <AnalyzeBatchResultOperationOutput>flatResponse.body;\n if (!(\"status\" in flatResponseBody && flatResponseBody.status === \"completed\")) return;\n state.status = \"succeeded\";\n },\n });\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState,\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted,\n getOperationId: () => parseOperationId(initialResponse.headers[\"operation-location\"]),\n };\n return simplePoller;\n}\n\n/**\n * Returns the operation-id from the operation-location header\n */\nfunction parseOperationId(operationLocationHeader: string): string {\n // regex to extract the operation id from the operation-location header with the regex \"[^:]+://[^/]+/documentintelligence/.+/([^?/]+)\"\n const regex = /[^:]+:\\/\\/[^/]+\\/documentintelligence\\/.+\\/([^?/]+)/;\n const match = operationLocationHeader.match(regex);\n if (!match) {\n throw new Error(\n `Failed to parse operation id from the operation-location header: ${operationLocationHeader}`,\n );\n }\n return match[1];\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
1
+ {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA+GnD,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,eAAwB,EACxB,UAAuC,EAAE;IAEzC,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAY,EAAE,WAA+C,EAAE,EAAE;YACvF,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,SAA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AAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,iEAAiE,uBAAuB,EAAE,CAC3F,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,eAEzC;IACC,MAAM,uBAAuB,GAAG,eAAe,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC9E,OAAO,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n RunningOperation,\n OperationResponse,\n OperationState,\n PollerLike,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport type {\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocumentFromStreamDefaultResponse,\n AnalyzeDocumentFromStreamLogicalResponse,\n AnalyzeBatchDocuments202Response,\n AnalyzeBatchDocumentsDefaultResponse,\n AnalyzeBatchDocumentsLogicalResponse,\n BuildModel202Response,\n BuildModelDefaultResponse,\n BuildModelLogicalResponse,\n ComposeModel202Response,\n ComposeModelDefaultResponse,\n ComposeModelLogicalResponse,\n CopyModelTo202Response,\n CopyModelToDefaultResponse,\n CopyModelToLogicalResponse,\n BuildClassifier202Response,\n BuildClassifierDefaultResponse,\n BuildClassifierLogicalResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocumentFromStreamDefaultResponse,\n ClassifyDocumentFromStreamLogicalResponse,\n CopyClassifierTo202Response,\n CopyClassifierToDefaultResponse,\n CopyClassifierToLogicalResponse,\n} from \"./responses.js\";\n\n/**\n * Options for `getLongRunningPoller`.\n */\nexport interface GetLongRunningPollerOptions {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n intervalInMs?: number;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n}\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<\n TResult extends AnalyzeBatchDocumentsLogicalResponse | AnalyzeBatchDocumentsDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeBatchDocuments202Response | AnalyzeBatchDocumentsDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildModel202Response | BuildModelDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n>(\n client: Client,\n initialResponse: ComposeModel202Response | ComposeModelDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends CopyClassifierToLogicalResponse | CopyClassifierToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyClassifierTo202Response | CopyClassifierToDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<\n TResult extends\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocumentFromStreamDefaultResponse,\n options?: GetLongRunningPollerOptions,\n): PollerLike<OperationState<TResult>, TResult>;\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: GetLongRunningPollerOptions = {},\n): PollerLike<OperationState<TResult>, TResult> {\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n return createHttpPoller(poller, options);\n}\n\n/**\n * Returns the operation-id from the operation-location header\n */\nfunction parseResultId(operationLocationHeader: string): string {\n // regex to extract the operation id from the operation-location header with the regex \"[^:]+://[^/]+/documentintelligence/.+/([^?/]+)\"\n const regex = /[^:]+:\\/\\/[^/]+\\/documentintelligence\\/.+\\/([^?/]+)/;\n const match = operationLocationHeader.match(regex);\n if (!match) {\n throw new Error(\n `Failed to parse result id from the operation-location header: ${operationLocationHeader}`,\n );\n }\n return match[1];\n}\n\n/**\n * Returns the operation-id from the initialResponse header\n */\nexport function parseResultIdFromResponse(initialResponse: {\n headers: { \"operation-location\": string };\n}): string {\n const operationLocationHeader = initialResponse.headers[\"operation-location\"];\n return parseResultId(operationLocationHeader);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}