@azure/ai-form-recognizer 5.0.0 → 5.1.0

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 (849) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +322 -340
  3. package/dist/browser/azureKeyCredentialPolicy.d.ts +8 -0
  4. package/dist/browser/azureKeyCredentialPolicy.d.ts.map +1 -0
  5. package/{dist-esm/src → dist/browser}/azureKeyCredentialPolicy.js +1 -1
  6. package/dist/browser/azureKeyCredentialPolicy.js.map +1 -0
  7. package/dist/browser/bin/defaultFields.d.ts +14 -0
  8. package/dist/browser/bin/defaultFields.d.ts.map +1 -0
  9. package/dist/browser/bin/defaultFields.js +83 -0
  10. package/dist/browser/bin/defaultFields.js.map +1 -0
  11. package/dist/browser/bin/gen-model.d.ts +3 -0
  12. package/dist/browser/bin/gen-model.d.ts.map +1 -0
  13. package/dist/browser/bin/gen-model.js +101 -0
  14. package/dist/browser/bin/gen-model.js.map +1 -0
  15. package/dist/browser/bin/utils.d.ts +22 -0
  16. package/dist/browser/bin/utils.d.ts.map +1 -0
  17. package/dist/browser/bin/utils.js +21 -0
  18. package/dist/browser/bin/utils.js.map +1 -0
  19. package/dist/browser/bin/writeModelCode.d.ts +9 -0
  20. package/dist/browser/bin/writeModelCode.d.ts.map +1 -0
  21. package/dist/browser/bin/writeModelCode.js +323 -0
  22. package/dist/browser/bin/writeModelCode.js.map +1 -0
  23. package/dist/browser/constants.d.ts +29 -0
  24. package/dist/browser/constants.d.ts.map +1 -0
  25. package/dist/browser/constants.js +32 -0
  26. package/dist/browser/constants.js.map +1 -0
  27. package/dist/browser/documentAnalysisClient.d.ts +485 -0
  28. package/dist/browser/documentAnalysisClient.d.ts.map +1 -0
  29. package/{dist-esm/src → dist/browser}/documentAnalysisClient.js +85 -47
  30. package/dist/browser/documentAnalysisClient.js.map +1 -0
  31. package/dist/browser/documentModel.d.ts +34 -0
  32. package/dist/browser/documentModel.d.ts.map +1 -0
  33. package/{dist-esm/src → dist/browser}/documentModel.js +3 -3
  34. package/dist/browser/documentModel.js.map +1 -0
  35. package/dist/browser/documentModelAdministrationClient.d.ts +792 -0
  36. package/dist/browser/documentModelAdministrationClient.d.ts.map +1 -0
  37. package/{dist-esm/src → dist/browser}/documentModelAdministrationClient.js +202 -92
  38. package/dist/browser/documentModelAdministrationClient.js.map +1 -0
  39. package/dist/browser/error.d.ts +31 -0
  40. package/dist/browser/error.d.ts.map +1 -0
  41. package/{dist-esm/src → dist/browser}/error.js +1 -1
  42. package/dist/browser/error.js.map +1 -0
  43. package/dist/browser/generated/generatedClient.d.ts +21 -0
  44. package/dist/browser/generated/generatedClient.d.ts.map +1 -0
  45. package/{dist-esm/src → dist/browser}/generated/generatedClient.js +2 -2
  46. package/dist/browser/generated/generatedClient.js.map +1 -0
  47. package/dist/browser/generated/index.d.ts +4 -0
  48. package/dist/browser/generated/index.d.ts.map +1 -0
  49. package/{dist-esm/src → dist/browser}/generated/index.js +3 -3
  50. package/dist/browser/generated/index.js.map +1 -0
  51. package/dist/browser/generated/models/index.d.ts +1208 -0
  52. package/dist/browser/generated/models/index.d.ts.map +1 -0
  53. package/dist/browser/generated/models/mappers.d.ts +67 -0
  54. package/dist/browser/generated/models/mappers.d.ts.map +1 -0
  55. package/dist/browser/generated/models/parameters.d.ts +31 -0
  56. package/dist/browser/generated/models/parameters.d.ts.map +1 -0
  57. package/{dist-esm/src → dist/browser}/generated/models/parameters.js +1 -1
  58. package/dist/browser/generated/models/parameters.js.map +1 -0
  59. package/dist/browser/generated/operations/documentClassifiers.d.ts +78 -0
  60. package/dist/browser/generated/operations/documentClassifiers.d.ts.map +1 -0
  61. package/{dist-esm/src → dist/browser}/generated/operations/documentClassifiers.js +5 -10
  62. package/dist/browser/generated/operations/documentClassifiers.js.map +1 -0
  63. package/dist/browser/generated/operations/documentModels.d.ts +98 -0
  64. package/dist/browser/generated/operations/documentModels.d.ts.map +1 -0
  65. package/{dist-esm/src → dist/browser}/generated/operations/documentModels.js +5 -10
  66. package/dist/browser/generated/operations/documentModels.js.map +1 -0
  67. package/dist/browser/generated/operations/index.d.ts +4 -0
  68. package/dist/browser/generated/operations/index.d.ts.map +1 -0
  69. package/{dist-esm/src/generated/operationsInterfaces → dist/browser/generated/operations}/index.js +3 -3
  70. package/{dist-esm/src → dist/browser}/generated/operations/index.js.map +1 -1
  71. package/dist/browser/generated/operations/miscellaneous.d.ts +43 -0
  72. package/dist/browser/generated/operations/miscellaneous.d.ts.map +1 -0
  73. package/{dist-esm/src → dist/browser}/generated/operations/miscellaneous.js +5 -10
  74. package/dist/browser/generated/operations/miscellaneous.js.map +1 -0
  75. package/dist/browser/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
  76. package/dist/browser/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
  77. package/dist/browser/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
  78. package/dist/browser/generated/operationsInterfaces/documentModels.d.ts +69 -0
  79. package/dist/browser/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
  80. package/dist/browser/generated/operationsInterfaces/documentModels.js.map +1 -0
  81. package/dist/browser/generated/operationsInterfaces/index.d.ts +4 -0
  82. package/dist/browser/generated/operationsInterfaces/index.d.ts.map +1 -0
  83. package/dist/browser/generated/operationsInterfaces/index.js +11 -0
  84. package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/index.js.map +1 -1
  85. package/dist/browser/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
  86. package/dist/browser/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
  87. package/dist/browser/generated/operationsInterfaces/miscellaneous.js.map +1 -0
  88. package/dist/browser/index.d.ts +18 -0
  89. package/dist/browser/index.d.ts.map +1 -0
  90. package/{dist-esm/src → dist/browser}/index.js +8 -7
  91. package/dist/browser/index.js.map +1 -0
  92. package/dist/browser/lro/administration.d.ts +101 -0
  93. package/dist/browser/lro/administration.d.ts.map +1 -0
  94. package/{dist-esm/src → dist/browser}/lro/administration.js +2 -2
  95. package/dist/browser/lro/administration.js.map +1 -0
  96. package/dist/browser/lro/analysis.d.ts +210 -0
  97. package/dist/browser/lro/analysis.d.ts.map +1 -0
  98. package/{dist-esm/src → dist/browser}/lro/analysis.js +5 -5
  99. package/dist/browser/lro/analysis.js.map +1 -0
  100. package/dist/browser/lro/util/delayMs.d.ts +32 -0
  101. package/dist/browser/lro/util/delayMs.d.ts.map +1 -0
  102. package/{dist-esm/src → dist/browser}/lro/util/delayMs.js +3 -3
  103. package/dist/browser/lro/util/delayMs.js.map +1 -0
  104. package/dist/browser/lro/util/poller.d.ts +41 -0
  105. package/dist/browser/lro/util/poller.d.ts.map +1 -0
  106. package/{dist-esm/src → dist/browser}/lro/util/poller.js +2 -2
  107. package/dist/browser/lro/util/poller.js.map +1 -0
  108. package/dist/browser/models/contentSource.d.ts +56 -0
  109. package/dist/browser/models/contentSource.d.ts.map +1 -0
  110. package/dist/browser/models/contentSource.js +4 -0
  111. package/dist/browser/models/contentSource.js.map +1 -0
  112. package/dist/browser/models/documentElements.d.ts +210 -0
  113. package/dist/browser/models/documentElements.d.ts.map +1 -0
  114. package/dist/browser/models/documentElements.js +4 -0
  115. package/dist/browser/models/documentElements.js.map +1 -0
  116. package/dist/browser/models/fields.d.ts +205 -0
  117. package/dist/browser/models/fields.d.ts.map +1 -0
  118. package/{dist-esm/src → dist/browser}/models/fields.js +3 -3
  119. package/{dist-esm/src → dist/browser}/models/fields.js.map +1 -1
  120. package/dist/browser/models/index.d.ts +4 -0
  121. package/dist/browser/models/index.d.ts.map +1 -0
  122. package/dist/browser/models/index.js +4 -0
  123. package/dist/browser/models/index.js.map +1 -0
  124. package/dist/browser/options/AnalyzeDocumentOptions.d.ts +69 -0
  125. package/dist/browser/options/AnalyzeDocumentOptions.d.ts.map +1 -0
  126. package/{dist-esm/src → dist/browser}/options/AnalyzeDocumentOptions.js +1 -1
  127. package/dist/browser/options/AnalyzeDocumentOptions.js.map +1 -0
  128. package/dist/browser/options/BeginCopyModelOptions.d.ts +9 -0
  129. package/dist/browser/options/BeginCopyModelOptions.d.ts.map +1 -0
  130. package/dist/browser/options/BeginCopyModelOptions.js +4 -0
  131. package/dist/browser/options/BeginCopyModelOptions.js.map +1 -0
  132. package/dist/browser/options/BuildDocumentClassifierOptions.d.ts +13 -0
  133. package/dist/browser/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
  134. package/dist/browser/options/BuildDocumentClassifierOptions.js +4 -0
  135. package/dist/browser/options/BuildDocumentClassifierOptions.js.map +1 -0
  136. package/dist/browser/options/BuildModelOptions.d.ts +61 -0
  137. package/dist/browser/options/BuildModelOptions.d.ts.map +1 -0
  138. package/{dist-esm/src → dist/browser}/options/BuildModelOptions.js +1 -1
  139. package/dist/browser/options/BuildModelOptions.js.map +1 -0
  140. package/dist/browser/options/ClassifyDocumentOptions.d.ts +9 -0
  141. package/dist/browser/options/ClassifyDocumentOptions.d.ts.map +1 -0
  142. package/dist/browser/options/ClassifyDocumentOptions.js +4 -0
  143. package/dist/browser/options/ClassifyDocumentOptions.js.map +1 -0
  144. package/dist/browser/options/DeleteModelOptions.d.ts +7 -0
  145. package/dist/browser/options/DeleteModelOptions.d.ts.map +1 -0
  146. package/dist/browser/options/DeleteModelOptions.js +4 -0
  147. package/dist/browser/options/DeleteModelOptions.js.map +1 -0
  148. package/dist/browser/options/FormRecognizerClientOptions.d.ts +70 -0
  149. package/dist/browser/options/FormRecognizerClientOptions.d.ts.map +1 -0
  150. package/{dist-esm/src → dist/browser}/options/FormRecognizerClientOptions.js +1 -1
  151. package/dist/browser/options/FormRecognizerClientOptions.js.map +1 -0
  152. package/dist/browser/options/GetCopyAuthorizationOptions.d.ts +8 -0
  153. package/dist/browser/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
  154. package/dist/browser/options/GetCopyAuthorizationOptions.js +4 -0
  155. package/dist/browser/options/GetCopyAuthorizationOptions.js.map +1 -0
  156. package/dist/browser/options/GetModelOptions.d.ts +7 -0
  157. package/dist/browser/options/GetModelOptions.d.ts.map +1 -0
  158. package/dist/browser/options/GetModelOptions.js +4 -0
  159. package/dist/browser/options/GetModelOptions.js.map +1 -0
  160. package/dist/browser/options/GetOperationOptions.d.ts +7 -0
  161. package/dist/browser/options/GetOperationOptions.d.ts.map +1 -0
  162. package/dist/browser/options/GetOperationOptions.js +4 -0
  163. package/dist/browser/options/GetOperationOptions.js.map +1 -0
  164. package/dist/browser/options/GetResourceDetailsOptions.d.ts +7 -0
  165. package/dist/browser/options/GetResourceDetailsOptions.d.ts.map +1 -0
  166. package/dist/browser/options/GetResourceDetailsOptions.js +4 -0
  167. package/{dist-esm/src → dist/browser}/options/GetResourceDetailsOptions.js.map +1 -1
  168. package/dist/browser/options/ListModelsOptions.d.ts +7 -0
  169. package/dist/browser/options/ListModelsOptions.d.ts.map +1 -0
  170. package/dist/browser/options/ListModelsOptions.js +4 -0
  171. package/dist/browser/options/ListModelsOptions.js.map +1 -0
  172. package/dist/browser/options/ListOperationsOptions.d.ts +7 -0
  173. package/dist/browser/options/ListOperationsOptions.d.ts.map +1 -0
  174. package/dist/browser/options/ListOperationsOptions.js +4 -0
  175. package/{dist-esm/src → dist/browser}/options/ListOperationsOptions.js.map +1 -1
  176. package/dist/browser/options/PollerOptions.d.ts +22 -0
  177. package/dist/browser/options/PollerOptions.d.ts.map +1 -0
  178. package/dist/browser/options/PollerOptions.js +4 -0
  179. package/dist/browser/options/PollerOptions.js.map +1 -0
  180. package/dist/browser/options/index.d.ts +16 -0
  181. package/dist/browser/options/index.d.ts.map +1 -0
  182. package/dist/browser/options/index.js +7 -0
  183. package/dist/browser/options/index.js.map +1 -0
  184. package/dist/browser/package.json +3 -0
  185. package/dist/browser/transforms/polygon.d.ts +20 -0
  186. package/dist/browser/transforms/polygon.d.ts.map +1 -0
  187. package/{dist-esm/src → dist/browser}/transforms/polygon.js +1 -1
  188. package/dist/browser/transforms/polygon.js.map +1 -0
  189. package/dist/browser/util.d.ts +33 -0
  190. package/dist/browser/util.d.ts.map +1 -0
  191. package/{dist-esm/src → dist/browser}/util.js +12 -7
  192. package/dist/browser/util.js.map +1 -0
  193. package/dist/commonjs/azureKeyCredentialPolicy.d.ts +8 -0
  194. package/dist/commonjs/azureKeyCredentialPolicy.d.ts.map +1 -0
  195. package/dist/commonjs/azureKeyCredentialPolicy.js +20 -0
  196. package/dist/commonjs/azureKeyCredentialPolicy.js.map +1 -0
  197. package/dist/commonjs/bin/defaultFields.d.ts +14 -0
  198. package/dist/commonjs/bin/defaultFields.d.ts.map +1 -0
  199. package/dist/commonjs/bin/defaultFields.js +87 -0
  200. package/dist/commonjs/bin/defaultFields.js.map +1 -0
  201. package/dist/commonjs/bin/gen-model.d.ts +3 -0
  202. package/dist/commonjs/bin/gen-model.d.ts.map +1 -0
  203. package/dist/commonjs/bin/gen-model.js +103 -0
  204. package/dist/commonjs/bin/gen-model.js.map +1 -0
  205. package/dist/commonjs/bin/utils.d.ts +22 -0
  206. package/dist/commonjs/bin/utils.d.ts.map +1 -0
  207. package/dist/commonjs/bin/utils.js +26 -0
  208. package/dist/commonjs/bin/utils.js.map +1 -0
  209. package/dist/commonjs/bin/writeModelCode.d.ts +9 -0
  210. package/dist/commonjs/bin/writeModelCode.d.ts.map +1 -0
  211. package/dist/commonjs/bin/writeModelCode.js +326 -0
  212. package/dist/commonjs/bin/writeModelCode.js.map +1 -0
  213. package/dist/commonjs/constants.d.ts +29 -0
  214. package/dist/commonjs/constants.d.ts.map +1 -0
  215. package/dist/commonjs/constants.js +35 -0
  216. package/dist/commonjs/constants.js.map +1 -0
  217. package/dist/commonjs/documentAnalysisClient.d.ts +485 -0
  218. package/dist/commonjs/documentAnalysisClient.d.ts.map +1 -0
  219. package/dist/commonjs/documentAnalysisClient.js +351 -0
  220. package/dist/commonjs/documentAnalysisClient.js.map +1 -0
  221. package/dist/commonjs/documentModel.d.ts +34 -0
  222. package/dist/commonjs/documentModel.d.ts.map +1 -0
  223. package/dist/commonjs/documentModel.js +76 -0
  224. package/dist/commonjs/documentModel.js.map +1 -0
  225. package/dist/commonjs/documentModelAdministrationClient.d.ts +792 -0
  226. package/dist/commonjs/documentModelAdministrationClient.d.ts.map +1 -0
  227. package/dist/commonjs/documentModelAdministrationClient.js +763 -0
  228. package/dist/commonjs/documentModelAdministrationClient.js.map +1 -0
  229. package/dist/commonjs/error.d.ts +31 -0
  230. package/dist/commonjs/error.d.ts.map +1 -0
  231. package/dist/commonjs/error.js +43 -0
  232. package/dist/commonjs/error.js.map +1 -0
  233. package/dist/commonjs/generated/generatedClient.d.ts +21 -0
  234. package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
  235. package/dist/commonjs/generated/generatedClient.js +94 -0
  236. package/dist/commonjs/generated/generatedClient.js.map +1 -0
  237. package/dist/commonjs/generated/index.d.ts +4 -0
  238. package/dist/commonjs/generated/index.d.ts.map +1 -0
  239. package/dist/commonjs/generated/index.js +17 -0
  240. package/dist/commonjs/generated/index.js.map +1 -0
  241. package/dist/commonjs/generated/models/index.d.ts +1208 -0
  242. package/dist/commonjs/generated/models/index.d.ts.map +1 -0
  243. package/dist/commonjs/generated/models/index.js +207 -0
  244. package/dist/commonjs/generated/models/index.js.map +1 -0
  245. package/dist/commonjs/generated/models/mappers.d.ts +67 -0
  246. package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
  247. package/dist/commonjs/generated/models/mappers.js +2505 -0
  248. package/dist/commonjs/generated/models/mappers.js.map +1 -0
  249. package/dist/commonjs/generated/models/parameters.d.ts +31 -0
  250. package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
  251. package/dist/commonjs/generated/models/parameters.js +294 -0
  252. package/dist/commonjs/generated/models/parameters.js.map +1 -0
  253. package/dist/commonjs/generated/operations/documentClassifiers.d.ts +78 -0
  254. package/dist/commonjs/generated/operations/documentClassifiers.d.ts.map +1 -0
  255. package/dist/commonjs/generated/operations/documentClassifiers.js +334 -0
  256. package/dist/commonjs/generated/operations/documentClassifiers.js.map +1 -0
  257. package/dist/commonjs/generated/operations/documentModels.d.ts +98 -0
  258. package/dist/commonjs/generated/operations/documentModels.d.ts.map +1 -0
  259. package/dist/commonjs/generated/operations/documentModels.js +428 -0
  260. package/dist/commonjs/generated/operations/documentModels.js.map +1 -0
  261. package/dist/commonjs/generated/operations/index.d.ts +4 -0
  262. package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
  263. package/dist/commonjs/generated/operations/index.js +14 -0
  264. package/dist/commonjs/generated/operations/index.js.map +1 -0
  265. package/dist/commonjs/generated/operations/miscellaneous.d.ts +43 -0
  266. package/dist/commonjs/generated/operations/miscellaneous.d.ts.map +1 -0
  267. package/dist/commonjs/generated/operations/miscellaneous.js +173 -0
  268. package/dist/commonjs/generated/operations/miscellaneous.js.map +1 -0
  269. package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
  270. package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
  271. package/{dist-esm/src/generated/operations/index.js → dist/commonjs/generated/operationsInterfaces/documentClassifiers.js} +3 -4
  272. package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
  273. package/dist/commonjs/generated/operationsInterfaces/documentModels.d.ts +69 -0
  274. package/dist/commonjs/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
  275. package/dist/commonjs/generated/operationsInterfaces/documentModels.js +10 -0
  276. package/dist/commonjs/generated/operationsInterfaces/documentModels.js.map +1 -0
  277. package/dist/commonjs/generated/operationsInterfaces/index.d.ts +4 -0
  278. package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
  279. package/dist/commonjs/generated/operationsInterfaces/index.js +14 -0
  280. package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
  281. package/dist/commonjs/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
  282. package/dist/commonjs/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
  283. package/dist/commonjs/generated/operationsInterfaces/miscellaneous.js +10 -0
  284. package/dist/commonjs/generated/operationsInterfaces/miscellaneous.js.map +1 -0
  285. package/dist/commonjs/index.d.ts +18 -0
  286. package/dist/commonjs/index.d.ts.map +1 -0
  287. package/dist/commonjs/index.js +38 -0
  288. package/dist/commonjs/index.js.map +1 -0
  289. package/dist/commonjs/lro/administration.d.ts +101 -0
  290. package/dist/commonjs/lro/administration.d.ts.map +1 -0
  291. package/dist/commonjs/lro/administration.js +32 -0
  292. package/dist/commonjs/lro/administration.js.map +1 -0
  293. package/dist/commonjs/lro/analysis.d.ts +210 -0
  294. package/dist/commonjs/lro/analysis.d.ts.map +1 -0
  295. package/dist/commonjs/lro/analysis.js +186 -0
  296. package/dist/commonjs/lro/analysis.js.map +1 -0
  297. package/dist/commonjs/lro/util/delayMs.d.ts +32 -0
  298. package/dist/commonjs/lro/util/delayMs.d.ts.map +1 -0
  299. package/dist/commonjs/lro/util/delayMs.js +55 -0
  300. package/dist/commonjs/lro/util/delayMs.js.map +1 -0
  301. package/dist/commonjs/lro/util/poller.d.ts +41 -0
  302. package/dist/commonjs/lro/util/poller.d.ts.map +1 -0
  303. package/dist/commonjs/lro/util/poller.js +87 -0
  304. package/dist/commonjs/lro/util/poller.js.map +1 -0
  305. package/dist/commonjs/models/contentSource.d.ts +56 -0
  306. package/dist/commonjs/models/contentSource.d.ts.map +1 -0
  307. package/dist/commonjs/models/contentSource.js +5 -0
  308. package/dist/commonjs/models/contentSource.js.map +1 -0
  309. package/dist/commonjs/models/documentElements.d.ts +210 -0
  310. package/dist/commonjs/models/documentElements.d.ts.map +1 -0
  311. package/dist/commonjs/models/documentElements.js +5 -0
  312. package/dist/commonjs/models/documentElements.js.map +1 -0
  313. package/dist/commonjs/models/fields.d.ts +205 -0
  314. package/dist/commonjs/models/fields.d.ts.map +1 -0
  315. package/dist/commonjs/models/fields.js +59 -0
  316. package/dist/commonjs/models/fields.js.map +1 -0
  317. package/dist/commonjs/models/index.d.ts +4 -0
  318. package/dist/commonjs/models/index.d.ts.map +1 -0
  319. package/dist/commonjs/models/index.js +5 -0
  320. package/dist/commonjs/models/index.js.map +1 -0
  321. package/dist/commonjs/options/AnalyzeDocumentOptions.d.ts +69 -0
  322. package/dist/commonjs/options/AnalyzeDocumentOptions.d.ts.map +1 -0
  323. package/dist/commonjs/options/AnalyzeDocumentOptions.js +36 -0
  324. package/dist/commonjs/options/AnalyzeDocumentOptions.js.map +1 -0
  325. package/dist/commonjs/options/BeginCopyModelOptions.d.ts +9 -0
  326. package/dist/commonjs/options/BeginCopyModelOptions.d.ts.map +1 -0
  327. package/dist/commonjs/options/BeginCopyModelOptions.js +5 -0
  328. package/dist/commonjs/options/BeginCopyModelOptions.js.map +1 -0
  329. package/dist/commonjs/options/BuildDocumentClassifierOptions.d.ts +13 -0
  330. package/dist/commonjs/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
  331. package/dist/commonjs/options/BuildDocumentClassifierOptions.js +5 -0
  332. package/dist/commonjs/options/BuildDocumentClassifierOptions.js.map +1 -0
  333. package/dist/commonjs/options/BuildModelOptions.d.ts +61 -0
  334. package/dist/commonjs/options/BuildModelOptions.d.ts.map +1 -0
  335. package/dist/commonjs/options/BuildModelOptions.js +22 -0
  336. package/dist/commonjs/options/BuildModelOptions.js.map +1 -0
  337. package/dist/commonjs/options/ClassifyDocumentOptions.d.ts +9 -0
  338. package/dist/commonjs/options/ClassifyDocumentOptions.d.ts.map +1 -0
  339. package/dist/commonjs/options/ClassifyDocumentOptions.js +5 -0
  340. package/dist/commonjs/options/ClassifyDocumentOptions.js.map +1 -0
  341. package/dist/commonjs/options/DeleteModelOptions.d.ts +7 -0
  342. package/dist/commonjs/options/DeleteModelOptions.d.ts.map +1 -0
  343. package/dist/commonjs/options/DeleteModelOptions.js +5 -0
  344. package/dist/commonjs/options/DeleteModelOptions.js.map +1 -0
  345. package/dist/commonjs/options/FormRecognizerClientOptions.d.ts +70 -0
  346. package/dist/commonjs/options/FormRecognizerClientOptions.d.ts.map +1 -0
  347. package/dist/commonjs/options/FormRecognizerClientOptions.js +28 -0
  348. package/dist/commonjs/options/FormRecognizerClientOptions.js.map +1 -0
  349. package/dist/commonjs/options/GetCopyAuthorizationOptions.d.ts +8 -0
  350. package/dist/commonjs/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
  351. package/dist/commonjs/options/GetCopyAuthorizationOptions.js +5 -0
  352. package/dist/commonjs/options/GetCopyAuthorizationOptions.js.map +1 -0
  353. package/dist/commonjs/options/GetModelOptions.d.ts +7 -0
  354. package/dist/commonjs/options/GetModelOptions.d.ts.map +1 -0
  355. package/dist/commonjs/options/GetModelOptions.js +5 -0
  356. package/dist/commonjs/options/GetModelOptions.js.map +1 -0
  357. package/dist/commonjs/options/GetOperationOptions.d.ts +7 -0
  358. package/dist/commonjs/options/GetOperationOptions.d.ts.map +1 -0
  359. package/dist/commonjs/options/GetOperationOptions.js +5 -0
  360. package/dist/commonjs/options/GetOperationOptions.js.map +1 -0
  361. package/dist/commonjs/options/GetResourceDetailsOptions.d.ts +7 -0
  362. package/dist/commonjs/options/GetResourceDetailsOptions.d.ts.map +1 -0
  363. package/dist/commonjs/options/GetResourceDetailsOptions.js +5 -0
  364. package/dist/commonjs/options/GetResourceDetailsOptions.js.map +1 -0
  365. package/dist/commonjs/options/ListModelsOptions.d.ts +7 -0
  366. package/dist/commonjs/options/ListModelsOptions.d.ts.map +1 -0
  367. package/dist/commonjs/options/ListModelsOptions.js +5 -0
  368. package/dist/commonjs/options/ListModelsOptions.js.map +1 -0
  369. package/dist/commonjs/options/ListOperationsOptions.d.ts +7 -0
  370. package/dist/commonjs/options/ListOperationsOptions.d.ts.map +1 -0
  371. package/dist/commonjs/options/ListOperationsOptions.js +5 -0
  372. package/dist/commonjs/options/ListOperationsOptions.js.map +1 -0
  373. package/dist/commonjs/options/PollerOptions.d.ts +22 -0
  374. package/dist/commonjs/options/PollerOptions.d.ts.map +1 -0
  375. package/dist/commonjs/options/PollerOptions.js +5 -0
  376. package/dist/commonjs/options/PollerOptions.js.map +1 -0
  377. package/dist/commonjs/options/index.d.ts +16 -0
  378. package/dist/commonjs/options/index.d.ts.map +1 -0
  379. package/dist/commonjs/options/index.js +12 -0
  380. package/dist/commonjs/options/index.js.map +1 -0
  381. package/dist/commonjs/package.json +3 -0
  382. package/dist/commonjs/transforms/polygon.d.ts +20 -0
  383. package/dist/commonjs/transforms/polygon.d.ts.map +1 -0
  384. package/dist/commonjs/transforms/polygon.js +32 -0
  385. package/dist/commonjs/transforms/polygon.js.map +1 -0
  386. package/dist/commonjs/tsdoc-metadata.json +11 -0
  387. package/dist/commonjs/util.d.ts +33 -0
  388. package/dist/commonjs/util.d.ts.map +1 -0
  389. package/dist/commonjs/util.js +65 -0
  390. package/dist/commonjs/util.js.map +1 -0
  391. package/dist/esm/azureKeyCredentialPolicy.d.ts +8 -0
  392. package/dist/esm/azureKeyCredentialPolicy.d.ts.map +1 -0
  393. package/dist/esm/azureKeyCredentialPolicy.js +17 -0
  394. package/dist/esm/azureKeyCredentialPolicy.js.map +1 -0
  395. package/dist/esm/bin/defaultFields.d.ts +14 -0
  396. package/dist/esm/bin/defaultFields.d.ts.map +1 -0
  397. package/dist/esm/bin/defaultFields.js +83 -0
  398. package/dist/esm/bin/defaultFields.js.map +1 -0
  399. package/dist/esm/bin/gen-model.d.ts +3 -0
  400. package/dist/esm/bin/gen-model.d.ts.map +1 -0
  401. package/dist/esm/bin/gen-model.js +101 -0
  402. package/dist/esm/bin/gen-model.js.map +1 -0
  403. package/dist/esm/bin/utils.d.ts +22 -0
  404. package/dist/esm/bin/utils.d.ts.map +1 -0
  405. package/dist/esm/bin/utils.js +21 -0
  406. package/dist/esm/bin/utils.js.map +1 -0
  407. package/dist/esm/bin/writeModelCode.d.ts +9 -0
  408. package/dist/esm/bin/writeModelCode.d.ts.map +1 -0
  409. package/dist/esm/bin/writeModelCode.js +323 -0
  410. package/dist/esm/bin/writeModelCode.js.map +1 -0
  411. package/dist/esm/constants.d.ts +29 -0
  412. package/dist/esm/constants.d.ts.map +1 -0
  413. package/dist/esm/constants.js +32 -0
  414. package/dist/esm/constants.js.map +1 -0
  415. package/dist/esm/documentAnalysisClient.d.ts +485 -0
  416. package/dist/esm/documentAnalysisClient.d.ts.map +1 -0
  417. package/dist/esm/documentAnalysisClient.js +347 -0
  418. package/dist/esm/documentAnalysisClient.js.map +1 -0
  419. package/dist/esm/documentModel.d.ts +34 -0
  420. package/dist/esm/documentModel.d.ts.map +1 -0
  421. package/dist/esm/documentModel.js +73 -0
  422. package/dist/esm/documentModel.js.map +1 -0
  423. package/dist/esm/documentModelAdministrationClient.d.ts +792 -0
  424. package/dist/esm/documentModelAdministrationClient.d.ts.map +1 -0
  425. package/dist/esm/documentModelAdministrationClient.js +759 -0
  426. package/dist/esm/documentModelAdministrationClient.js.map +1 -0
  427. package/dist/esm/error.d.ts +31 -0
  428. package/dist/esm/error.d.ts.map +1 -0
  429. package/dist/esm/error.js +39 -0
  430. package/dist/esm/error.js.map +1 -0
  431. package/dist/esm/generated/generatedClient.d.ts +21 -0
  432. package/dist/esm/generated/generatedClient.d.ts.map +1 -0
  433. package/dist/esm/generated/generatedClient.js +89 -0
  434. package/dist/esm/generated/generatedClient.js.map +1 -0
  435. package/dist/esm/generated/index.d.ts +4 -0
  436. package/dist/esm/generated/index.d.ts.map +1 -0
  437. package/dist/esm/generated/index.js +12 -0
  438. package/dist/esm/generated/index.js.map +1 -0
  439. package/dist/esm/generated/models/index.d.ts +1208 -0
  440. package/dist/esm/generated/models/index.d.ts.map +1 -0
  441. package/dist/esm/generated/models/index.js +204 -0
  442. package/dist/esm/generated/models/index.js.map +1 -0
  443. package/dist/esm/generated/models/mappers.d.ts +67 -0
  444. package/dist/esm/generated/models/mappers.d.ts.map +1 -0
  445. package/dist/esm/generated/models/mappers.js +2501 -0
  446. package/dist/esm/generated/models/mappers.js.map +1 -0
  447. package/dist/esm/generated/models/parameters.d.ts +31 -0
  448. package/dist/esm/generated/models/parameters.d.ts.map +1 -0
  449. package/dist/esm/generated/models/parameters.js +291 -0
  450. package/dist/esm/generated/models/parameters.js.map +1 -0
  451. package/dist/esm/generated/operations/documentClassifiers.d.ts +78 -0
  452. package/dist/esm/generated/operations/documentClassifiers.d.ts.map +1 -0
  453. package/dist/esm/generated/operations/documentClassifiers.js +330 -0
  454. package/dist/esm/generated/operations/documentClassifiers.js.map +1 -0
  455. package/dist/esm/generated/operations/documentModels.d.ts +98 -0
  456. package/dist/esm/generated/operations/documentModels.d.ts.map +1 -0
  457. package/dist/esm/generated/operations/documentModels.js +424 -0
  458. package/dist/esm/generated/operations/documentModels.js.map +1 -0
  459. package/dist/esm/generated/operations/index.d.ts +4 -0
  460. package/dist/esm/generated/operations/index.d.ts.map +1 -0
  461. package/dist/esm/generated/operations/index.js +11 -0
  462. package/dist/esm/generated/operations/index.js.map +1 -0
  463. package/dist/esm/generated/operations/miscellaneous.d.ts +43 -0
  464. package/dist/esm/generated/operations/miscellaneous.d.ts.map +1 -0
  465. package/dist/esm/generated/operations/miscellaneous.js +169 -0
  466. package/dist/esm/generated/operations/miscellaneous.js.map +1 -0
  467. package/dist/esm/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
  468. package/dist/esm/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
  469. package/dist/esm/generated/operationsInterfaces/documentClassifiers.js +9 -0
  470. package/dist/esm/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
  471. package/dist/esm/generated/operationsInterfaces/documentModels.d.ts +69 -0
  472. package/dist/esm/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
  473. package/dist/esm/generated/operationsInterfaces/documentModels.js +9 -0
  474. package/dist/esm/generated/operationsInterfaces/documentModels.js.map +1 -0
  475. package/dist/esm/generated/operationsInterfaces/index.d.ts +4 -0
  476. package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
  477. package/dist/esm/generated/operationsInterfaces/index.js +11 -0
  478. package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
  479. package/dist/esm/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
  480. package/dist/esm/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
  481. package/dist/esm/generated/operationsInterfaces/miscellaneous.js +9 -0
  482. package/dist/esm/generated/operationsInterfaces/miscellaneous.js.map +1 -0
  483. package/dist/esm/index.d.ts +18 -0
  484. package/dist/esm/index.d.ts.map +1 -0
  485. package/dist/esm/index.js +19 -0
  486. package/dist/esm/index.js.map +1 -0
  487. package/dist/esm/lro/administration.d.ts +101 -0
  488. package/dist/esm/lro/administration.d.ts.map +1 -0
  489. package/dist/esm/lro/administration.js +29 -0
  490. package/dist/esm/lro/administration.js.map +1 -0
  491. package/dist/esm/lro/analysis.d.ts +210 -0
  492. package/dist/esm/lro/analysis.d.ts.map +1 -0
  493. package/dist/esm/lro/analysis.js +175 -0
  494. package/dist/esm/lro/analysis.js.map +1 -0
  495. package/dist/esm/lro/util/delayMs.d.ts +32 -0
  496. package/dist/esm/lro/util/delayMs.d.ts.map +1 -0
  497. package/dist/esm/lro/util/delayMs.js +52 -0
  498. package/dist/esm/lro/util/delayMs.js.map +1 -0
  499. package/dist/esm/lro/util/poller.d.ts +41 -0
  500. package/dist/esm/lro/util/poller.d.ts.map +1 -0
  501. package/dist/esm/lro/util/poller.js +84 -0
  502. package/dist/esm/lro/util/poller.js.map +1 -0
  503. package/dist/esm/models/contentSource.d.ts +56 -0
  504. package/dist/esm/models/contentSource.d.ts.map +1 -0
  505. package/dist/esm/models/contentSource.js +4 -0
  506. package/dist/esm/models/contentSource.js.map +1 -0
  507. package/dist/esm/models/documentElements.d.ts +210 -0
  508. package/dist/esm/models/documentElements.d.ts.map +1 -0
  509. package/dist/esm/models/documentElements.js +4 -0
  510. package/dist/esm/models/documentElements.js.map +1 -0
  511. package/dist/esm/models/fields.d.ts +205 -0
  512. package/dist/esm/models/fields.d.ts.map +1 -0
  513. package/dist/esm/models/fields.js +55 -0
  514. package/dist/esm/models/fields.js.map +1 -0
  515. package/dist/esm/models/index.d.ts +4 -0
  516. package/dist/esm/models/index.d.ts.map +1 -0
  517. package/dist/esm/models/index.js +4 -0
  518. package/dist/esm/models/index.js.map +1 -0
  519. package/dist/esm/options/AnalyzeDocumentOptions.d.ts +69 -0
  520. package/dist/esm/options/AnalyzeDocumentOptions.d.ts.map +1 -0
  521. package/dist/esm/options/AnalyzeDocumentOptions.js +33 -0
  522. package/dist/esm/options/AnalyzeDocumentOptions.js.map +1 -0
  523. package/dist/esm/options/BeginCopyModelOptions.d.ts +9 -0
  524. package/dist/esm/options/BeginCopyModelOptions.d.ts.map +1 -0
  525. package/dist/esm/options/BeginCopyModelOptions.js +4 -0
  526. package/dist/esm/options/BeginCopyModelOptions.js.map +1 -0
  527. package/dist/esm/options/BuildDocumentClassifierOptions.d.ts +13 -0
  528. package/dist/esm/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
  529. package/dist/esm/options/BuildDocumentClassifierOptions.js +4 -0
  530. package/dist/esm/options/BuildDocumentClassifierOptions.js.map +1 -0
  531. package/dist/esm/options/BuildModelOptions.d.ts +61 -0
  532. package/dist/esm/options/BuildModelOptions.d.ts.map +1 -0
  533. package/dist/esm/options/BuildModelOptions.js +19 -0
  534. package/dist/esm/options/BuildModelOptions.js.map +1 -0
  535. package/dist/esm/options/ClassifyDocumentOptions.d.ts +9 -0
  536. package/dist/esm/options/ClassifyDocumentOptions.d.ts.map +1 -0
  537. package/dist/esm/options/ClassifyDocumentOptions.js +4 -0
  538. package/dist/esm/options/ClassifyDocumentOptions.js.map +1 -0
  539. package/dist/esm/options/DeleteModelOptions.d.ts +7 -0
  540. package/dist/esm/options/DeleteModelOptions.d.ts.map +1 -0
  541. package/dist/esm/options/DeleteModelOptions.js +4 -0
  542. package/dist/esm/options/DeleteModelOptions.js.map +1 -0
  543. package/dist/esm/options/FormRecognizerClientOptions.d.ts +70 -0
  544. package/dist/esm/options/FormRecognizerClientOptions.d.ts.map +1 -0
  545. package/dist/esm/options/FormRecognizerClientOptions.js +25 -0
  546. package/dist/esm/options/FormRecognizerClientOptions.js.map +1 -0
  547. package/dist/esm/options/GetCopyAuthorizationOptions.d.ts +8 -0
  548. package/dist/esm/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
  549. package/dist/esm/options/GetCopyAuthorizationOptions.js +4 -0
  550. package/dist/esm/options/GetCopyAuthorizationOptions.js.map +1 -0
  551. package/dist/esm/options/GetModelOptions.d.ts +7 -0
  552. package/dist/esm/options/GetModelOptions.d.ts.map +1 -0
  553. package/dist/esm/options/GetModelOptions.js +4 -0
  554. package/dist/esm/options/GetModelOptions.js.map +1 -0
  555. package/dist/esm/options/GetOperationOptions.d.ts +7 -0
  556. package/dist/esm/options/GetOperationOptions.d.ts.map +1 -0
  557. package/dist/esm/options/GetOperationOptions.js +4 -0
  558. package/dist/esm/options/GetOperationOptions.js.map +1 -0
  559. package/dist/esm/options/GetResourceDetailsOptions.d.ts +7 -0
  560. package/dist/esm/options/GetResourceDetailsOptions.d.ts.map +1 -0
  561. package/dist/esm/options/GetResourceDetailsOptions.js +4 -0
  562. package/dist/esm/options/GetResourceDetailsOptions.js.map +1 -0
  563. package/dist/esm/options/ListModelsOptions.d.ts +7 -0
  564. package/dist/esm/options/ListModelsOptions.d.ts.map +1 -0
  565. package/dist/esm/options/ListModelsOptions.js +4 -0
  566. package/dist/esm/options/ListModelsOptions.js.map +1 -0
  567. package/dist/esm/options/ListOperationsOptions.d.ts +7 -0
  568. package/dist/esm/options/ListOperationsOptions.d.ts.map +1 -0
  569. package/dist/esm/options/ListOperationsOptions.js +4 -0
  570. package/dist/esm/options/ListOperationsOptions.js.map +1 -0
  571. package/dist/esm/options/PollerOptions.d.ts +22 -0
  572. package/dist/esm/options/PollerOptions.d.ts.map +1 -0
  573. package/dist/esm/options/PollerOptions.js +4 -0
  574. package/dist/esm/options/PollerOptions.js.map +1 -0
  575. package/dist/esm/options/index.d.ts +16 -0
  576. package/dist/esm/options/index.d.ts.map +1 -0
  577. package/dist/esm/options/index.js +7 -0
  578. package/dist/esm/options/index.js.map +1 -0
  579. package/dist/esm/package.json +3 -0
  580. package/dist/esm/transforms/polygon.d.ts +20 -0
  581. package/dist/esm/transforms/polygon.d.ts.map +1 -0
  582. package/dist/esm/transforms/polygon.js +26 -0
  583. package/dist/esm/transforms/polygon.js.map +1 -0
  584. package/dist/esm/util.d.ts +33 -0
  585. package/dist/esm/util.d.ts.map +1 -0
  586. package/dist/esm/util.js +56 -0
  587. package/dist/esm/util.js.map +1 -0
  588. package/dist/react-native/azureKeyCredentialPolicy.d.ts +8 -0
  589. package/dist/react-native/azureKeyCredentialPolicy.d.ts.map +1 -0
  590. package/dist/react-native/azureKeyCredentialPolicy.js +17 -0
  591. package/dist/react-native/azureKeyCredentialPolicy.js.map +1 -0
  592. package/dist/react-native/bin/defaultFields.d.ts +14 -0
  593. package/dist/react-native/bin/defaultFields.d.ts.map +1 -0
  594. package/dist/react-native/bin/defaultFields.js +83 -0
  595. package/dist/react-native/bin/defaultFields.js.map +1 -0
  596. package/dist/react-native/bin/gen-model.d.ts +3 -0
  597. package/dist/react-native/bin/gen-model.d.ts.map +1 -0
  598. package/dist/react-native/bin/gen-model.js +101 -0
  599. package/dist/react-native/bin/gen-model.js.map +1 -0
  600. package/dist/react-native/bin/utils.d.ts +22 -0
  601. package/dist/react-native/bin/utils.d.ts.map +1 -0
  602. package/dist/react-native/bin/utils.js +21 -0
  603. package/dist/react-native/bin/utils.js.map +1 -0
  604. package/dist/react-native/bin/writeModelCode.d.ts +9 -0
  605. package/dist/react-native/bin/writeModelCode.d.ts.map +1 -0
  606. package/dist/react-native/bin/writeModelCode.js +323 -0
  607. package/dist/react-native/bin/writeModelCode.js.map +1 -0
  608. package/dist/react-native/constants.d.ts +29 -0
  609. package/dist/react-native/constants.d.ts.map +1 -0
  610. package/dist/react-native/constants.js +32 -0
  611. package/dist/react-native/constants.js.map +1 -0
  612. package/dist/react-native/documentAnalysisClient.d.ts +485 -0
  613. package/dist/react-native/documentAnalysisClient.d.ts.map +1 -0
  614. package/dist/react-native/documentAnalysisClient.js +347 -0
  615. package/dist/react-native/documentAnalysisClient.js.map +1 -0
  616. package/dist/react-native/documentModel.d.ts +34 -0
  617. package/dist/react-native/documentModel.d.ts.map +1 -0
  618. package/dist/react-native/documentModel.js +73 -0
  619. package/dist/react-native/documentModel.js.map +1 -0
  620. package/dist/react-native/documentModelAdministrationClient.d.ts +792 -0
  621. package/dist/react-native/documentModelAdministrationClient.d.ts.map +1 -0
  622. package/dist/react-native/documentModelAdministrationClient.js +759 -0
  623. package/dist/react-native/documentModelAdministrationClient.js.map +1 -0
  624. package/dist/react-native/error.d.ts +31 -0
  625. package/dist/react-native/error.d.ts.map +1 -0
  626. package/dist/react-native/error.js +39 -0
  627. package/dist/react-native/error.js.map +1 -0
  628. package/dist/react-native/generated/generatedClient.d.ts +21 -0
  629. package/dist/react-native/generated/generatedClient.d.ts.map +1 -0
  630. package/dist/react-native/generated/generatedClient.js +89 -0
  631. package/dist/react-native/generated/generatedClient.js.map +1 -0
  632. package/dist/react-native/generated/index.d.ts +4 -0
  633. package/dist/react-native/generated/index.d.ts.map +1 -0
  634. package/dist/react-native/generated/index.js +12 -0
  635. package/dist/react-native/generated/index.js.map +1 -0
  636. package/dist/react-native/generated/models/index.d.ts +1208 -0
  637. package/dist/react-native/generated/models/index.d.ts.map +1 -0
  638. package/dist/react-native/generated/models/index.js +204 -0
  639. package/dist/react-native/generated/models/index.js.map +1 -0
  640. package/dist/react-native/generated/models/mappers.d.ts +67 -0
  641. package/dist/react-native/generated/models/mappers.d.ts.map +1 -0
  642. package/dist/react-native/generated/models/mappers.js +2501 -0
  643. package/dist/react-native/generated/models/mappers.js.map +1 -0
  644. package/dist/react-native/generated/models/parameters.d.ts +31 -0
  645. package/dist/react-native/generated/models/parameters.d.ts.map +1 -0
  646. package/dist/react-native/generated/models/parameters.js +291 -0
  647. package/dist/react-native/generated/models/parameters.js.map +1 -0
  648. package/dist/react-native/generated/operations/documentClassifiers.d.ts +78 -0
  649. package/dist/react-native/generated/operations/documentClassifiers.d.ts.map +1 -0
  650. package/dist/react-native/generated/operations/documentClassifiers.js +330 -0
  651. package/dist/react-native/generated/operations/documentClassifiers.js.map +1 -0
  652. package/dist/react-native/generated/operations/documentModels.d.ts +98 -0
  653. package/dist/react-native/generated/operations/documentModels.d.ts.map +1 -0
  654. package/dist/react-native/generated/operations/documentModels.js +424 -0
  655. package/dist/react-native/generated/operations/documentModels.js.map +1 -0
  656. package/dist/react-native/generated/operations/index.d.ts +4 -0
  657. package/dist/react-native/generated/operations/index.d.ts.map +1 -0
  658. package/dist/react-native/generated/operations/index.js +11 -0
  659. package/dist/react-native/generated/operations/index.js.map +1 -0
  660. package/dist/react-native/generated/operations/miscellaneous.d.ts +43 -0
  661. package/dist/react-native/generated/operations/miscellaneous.d.ts.map +1 -0
  662. package/dist/react-native/generated/operations/miscellaneous.js +169 -0
  663. package/dist/react-native/generated/operations/miscellaneous.js.map +1 -0
  664. package/dist/react-native/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
  665. package/dist/react-native/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
  666. package/dist/react-native/generated/operationsInterfaces/documentClassifiers.js +9 -0
  667. package/dist/react-native/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
  668. package/dist/react-native/generated/operationsInterfaces/documentModels.d.ts +69 -0
  669. package/dist/react-native/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
  670. package/dist/react-native/generated/operationsInterfaces/documentModels.js +9 -0
  671. package/dist/react-native/generated/operationsInterfaces/documentModels.js.map +1 -0
  672. package/dist/react-native/generated/operationsInterfaces/index.d.ts +4 -0
  673. package/dist/react-native/generated/operationsInterfaces/index.d.ts.map +1 -0
  674. package/dist/react-native/generated/operationsInterfaces/index.js +11 -0
  675. package/dist/react-native/generated/operationsInterfaces/index.js.map +1 -0
  676. package/dist/react-native/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
  677. package/dist/react-native/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
  678. package/dist/react-native/generated/operationsInterfaces/miscellaneous.js +9 -0
  679. package/dist/react-native/generated/operationsInterfaces/miscellaneous.js.map +1 -0
  680. package/dist/react-native/index.d.ts +18 -0
  681. package/dist/react-native/index.d.ts.map +1 -0
  682. package/dist/react-native/index.js +19 -0
  683. package/dist/react-native/index.js.map +1 -0
  684. package/dist/react-native/lro/administration.d.ts +101 -0
  685. package/dist/react-native/lro/administration.d.ts.map +1 -0
  686. package/dist/react-native/lro/administration.js +29 -0
  687. package/dist/react-native/lro/administration.js.map +1 -0
  688. package/dist/react-native/lro/analysis.d.ts +210 -0
  689. package/dist/react-native/lro/analysis.d.ts.map +1 -0
  690. package/dist/react-native/lro/analysis.js +175 -0
  691. package/dist/react-native/lro/analysis.js.map +1 -0
  692. package/dist/react-native/lro/util/delayMs.d.ts +32 -0
  693. package/dist/react-native/lro/util/delayMs.d.ts.map +1 -0
  694. package/dist/react-native/lro/util/delayMs.js +52 -0
  695. package/dist/react-native/lro/util/delayMs.js.map +1 -0
  696. package/dist/react-native/lro/util/poller.d.ts +41 -0
  697. package/dist/react-native/lro/util/poller.d.ts.map +1 -0
  698. package/dist/react-native/lro/util/poller.js +84 -0
  699. package/dist/react-native/lro/util/poller.js.map +1 -0
  700. package/dist/react-native/models/contentSource.d.ts +56 -0
  701. package/dist/react-native/models/contentSource.d.ts.map +1 -0
  702. package/dist/react-native/models/contentSource.js +4 -0
  703. package/dist/react-native/models/contentSource.js.map +1 -0
  704. package/dist/react-native/models/documentElements.d.ts +210 -0
  705. package/dist/react-native/models/documentElements.d.ts.map +1 -0
  706. package/dist/react-native/models/documentElements.js +4 -0
  707. package/dist/react-native/models/documentElements.js.map +1 -0
  708. package/dist/react-native/models/fields.d.ts +205 -0
  709. package/dist/react-native/models/fields.d.ts.map +1 -0
  710. package/dist/react-native/models/fields.js +55 -0
  711. package/dist/react-native/models/fields.js.map +1 -0
  712. package/dist/react-native/models/index.d.ts +4 -0
  713. package/dist/react-native/models/index.d.ts.map +1 -0
  714. package/dist/react-native/models/index.js +4 -0
  715. package/dist/react-native/models/index.js.map +1 -0
  716. package/dist/react-native/options/AnalyzeDocumentOptions.d.ts +69 -0
  717. package/dist/react-native/options/AnalyzeDocumentOptions.d.ts.map +1 -0
  718. package/dist/react-native/options/AnalyzeDocumentOptions.js +33 -0
  719. package/dist/react-native/options/AnalyzeDocumentOptions.js.map +1 -0
  720. package/dist/react-native/options/BeginCopyModelOptions.d.ts +9 -0
  721. package/dist/react-native/options/BeginCopyModelOptions.d.ts.map +1 -0
  722. package/dist/react-native/options/BeginCopyModelOptions.js +4 -0
  723. package/dist/react-native/options/BeginCopyModelOptions.js.map +1 -0
  724. package/dist/react-native/options/BuildDocumentClassifierOptions.d.ts +13 -0
  725. package/dist/react-native/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
  726. package/dist/react-native/options/BuildDocumentClassifierOptions.js +4 -0
  727. package/dist/react-native/options/BuildDocumentClassifierOptions.js.map +1 -0
  728. package/dist/react-native/options/BuildModelOptions.d.ts +61 -0
  729. package/dist/react-native/options/BuildModelOptions.d.ts.map +1 -0
  730. package/dist/react-native/options/BuildModelOptions.js +19 -0
  731. package/dist/react-native/options/BuildModelOptions.js.map +1 -0
  732. package/dist/react-native/options/ClassifyDocumentOptions.d.ts +9 -0
  733. package/dist/react-native/options/ClassifyDocumentOptions.d.ts.map +1 -0
  734. package/dist/react-native/options/ClassifyDocumentOptions.js +4 -0
  735. package/dist/react-native/options/ClassifyDocumentOptions.js.map +1 -0
  736. package/dist/react-native/options/DeleteModelOptions.d.ts +7 -0
  737. package/dist/react-native/options/DeleteModelOptions.d.ts.map +1 -0
  738. package/dist/react-native/options/DeleteModelOptions.js +4 -0
  739. package/dist/react-native/options/DeleteModelOptions.js.map +1 -0
  740. package/dist/react-native/options/FormRecognizerClientOptions.d.ts +70 -0
  741. package/dist/react-native/options/FormRecognizerClientOptions.d.ts.map +1 -0
  742. package/dist/react-native/options/FormRecognizerClientOptions.js +25 -0
  743. package/dist/react-native/options/FormRecognizerClientOptions.js.map +1 -0
  744. package/dist/react-native/options/GetCopyAuthorizationOptions.d.ts +8 -0
  745. package/dist/react-native/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
  746. package/dist/react-native/options/GetCopyAuthorizationOptions.js +4 -0
  747. package/dist/react-native/options/GetCopyAuthorizationOptions.js.map +1 -0
  748. package/dist/react-native/options/GetModelOptions.d.ts +7 -0
  749. package/dist/react-native/options/GetModelOptions.d.ts.map +1 -0
  750. package/dist/react-native/options/GetModelOptions.js +4 -0
  751. package/dist/react-native/options/GetModelOptions.js.map +1 -0
  752. package/dist/react-native/options/GetOperationOptions.d.ts +7 -0
  753. package/dist/react-native/options/GetOperationOptions.d.ts.map +1 -0
  754. package/dist/react-native/options/GetOperationOptions.js +4 -0
  755. package/dist/react-native/options/GetOperationOptions.js.map +1 -0
  756. package/dist/react-native/options/GetResourceDetailsOptions.d.ts +7 -0
  757. package/dist/react-native/options/GetResourceDetailsOptions.d.ts.map +1 -0
  758. package/dist/react-native/options/GetResourceDetailsOptions.js +4 -0
  759. package/dist/react-native/options/GetResourceDetailsOptions.js.map +1 -0
  760. package/dist/react-native/options/ListModelsOptions.d.ts +7 -0
  761. package/dist/react-native/options/ListModelsOptions.d.ts.map +1 -0
  762. package/dist/react-native/options/ListModelsOptions.js +4 -0
  763. package/dist/react-native/options/ListModelsOptions.js.map +1 -0
  764. package/dist/react-native/options/ListOperationsOptions.d.ts +7 -0
  765. package/dist/react-native/options/ListOperationsOptions.d.ts.map +1 -0
  766. package/dist/react-native/options/ListOperationsOptions.js +4 -0
  767. package/dist/react-native/options/ListOperationsOptions.js.map +1 -0
  768. package/dist/react-native/options/PollerOptions.d.ts +22 -0
  769. package/dist/react-native/options/PollerOptions.d.ts.map +1 -0
  770. package/dist/react-native/options/PollerOptions.js +4 -0
  771. package/dist/react-native/options/PollerOptions.js.map +1 -0
  772. package/dist/react-native/options/index.d.ts +16 -0
  773. package/dist/react-native/options/index.d.ts.map +1 -0
  774. package/dist/react-native/options/index.js +7 -0
  775. package/dist/react-native/options/index.js.map +1 -0
  776. package/dist/react-native/package.json +3 -0
  777. package/dist/react-native/transforms/polygon.d.ts +20 -0
  778. package/dist/react-native/transforms/polygon.d.ts.map +1 -0
  779. package/dist/react-native/transforms/polygon.js +26 -0
  780. package/dist/react-native/transforms/polygon.js.map +1 -0
  781. package/dist/react-native/util.d.ts +33 -0
  782. package/dist/react-native/util.d.ts.map +1 -0
  783. package/dist/react-native/util.js +56 -0
  784. package/dist/react-native/util.js.map +1 -0
  785. package/package.json +85 -74
  786. package/dist/index.js +0 -5721
  787. package/dist/index.js.map +0 -1
  788. package/dist-esm/src/azureKeyCredentialPolicy.js.map +0 -1
  789. package/dist-esm/src/constants.js +0 -13
  790. package/dist-esm/src/constants.js.map +0 -1
  791. package/dist-esm/src/documentAnalysisClient.js.map +0 -1
  792. package/dist-esm/src/documentModel.js.map +0 -1
  793. package/dist-esm/src/documentModelAdministrationClient.js.map +0 -1
  794. package/dist-esm/src/error.js.map +0 -1
  795. package/dist-esm/src/generated/generatedClient.js.map +0 -1
  796. package/dist-esm/src/generated/index.js.map +0 -1
  797. package/dist-esm/src/generated/models/parameters.js.map +0 -1
  798. package/dist-esm/src/generated/operations/documentClassifiers.js.map +0 -1
  799. package/dist-esm/src/generated/operations/documentModels.js.map +0 -1
  800. package/dist-esm/src/generated/operations/miscellaneous.js.map +0 -1
  801. package/dist-esm/src/generated/operationsInterfaces/documentClassifiers.js.map +0 -1
  802. package/dist-esm/src/generated/operationsInterfaces/documentModels.js.map +0 -1
  803. package/dist-esm/src/generated/operationsInterfaces/miscellaneous.js.map +0 -1
  804. package/dist-esm/src/index.js.map +0 -1
  805. package/dist-esm/src/lro/administration.js.map +0 -1
  806. package/dist-esm/src/lro/analysis.js.map +0 -1
  807. package/dist-esm/src/lro/util/delayMs.js.map +0 -1
  808. package/dist-esm/src/lro/util/poller.js.map +0 -1
  809. package/dist-esm/src/models/contentSource.js +0 -4
  810. package/dist-esm/src/models/contentSource.js.map +0 -1
  811. package/dist-esm/src/models/documentElements.js +0 -4
  812. package/dist-esm/src/models/documentElements.js.map +0 -1
  813. package/dist-esm/src/models/index.js +0 -4
  814. package/dist-esm/src/models/index.js.map +0 -1
  815. package/dist-esm/src/options/AnalyzeDocumentOptions.js.map +0 -1
  816. package/dist-esm/src/options/BeginCopyModelOptions.js +0 -4
  817. package/dist-esm/src/options/BeginCopyModelOptions.js.map +0 -1
  818. package/dist-esm/src/options/BuildDocumentClassifierOptions.js +0 -4
  819. package/dist-esm/src/options/BuildDocumentClassifierOptions.js.map +0 -1
  820. package/dist-esm/src/options/BuildModelOptions.js.map +0 -1
  821. package/dist-esm/src/options/ClassifyDocumentOptions.js +0 -4
  822. package/dist-esm/src/options/ClassifyDocumentOptions.js.map +0 -1
  823. package/dist-esm/src/options/DeleteModelOptions.js +0 -4
  824. package/dist-esm/src/options/DeleteModelOptions.js.map +0 -1
  825. package/dist-esm/src/options/FormRecognizerClientOptions.js.map +0 -1
  826. package/dist-esm/src/options/GetCopyAuthorizationOptions.js +0 -4
  827. package/dist-esm/src/options/GetCopyAuthorizationOptions.js.map +0 -1
  828. package/dist-esm/src/options/GetModelOptions.js +0 -4
  829. package/dist-esm/src/options/GetModelOptions.js.map +0 -1
  830. package/dist-esm/src/options/GetOperationOptions.js +0 -4
  831. package/dist-esm/src/options/GetOperationOptions.js.map +0 -1
  832. package/dist-esm/src/options/GetResourceDetailsOptions.js +0 -4
  833. package/dist-esm/src/options/ListModelsOptions.js +0 -4
  834. package/dist-esm/src/options/ListModelsOptions.js.map +0 -1
  835. package/dist-esm/src/options/ListOperationsOptions.js +0 -4
  836. package/dist-esm/src/options/PollerOptions.js +0 -4
  837. package/dist-esm/src/options/PollerOptions.js.map +0 -1
  838. package/dist-esm/src/options/index.js +0 -7
  839. package/dist-esm/src/options/index.js.map +0 -1
  840. package/dist-esm/src/transforms/polygon.js.map +0 -1
  841. package/dist-esm/src/util.js.map +0 -1
  842. package/types/ai-form-recognizer.d.ts +0 -2670
  843. /package/{dist-esm/src → dist/browser}/generated/models/index.js +0 -0
  844. /package/{dist-esm/src → dist/browser}/generated/models/index.js.map +0 -0
  845. /package/{dist-esm/src → dist/browser}/generated/models/mappers.js +0 -0
  846. /package/{dist-esm/src → dist/browser}/generated/models/mappers.js.map +0 -0
  847. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/documentClassifiers.js +0 -0
  848. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/documentModels.js +0 -0
  849. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/miscellaneous.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureKeyCredentialPolicy.js","sourceRoot":"","sources":["../../src/azureKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,MAAM,4BAA4B,GAAG,2BAA2B,CAAC;AAEjE;;;GAGG;AACH,MAAM,UAAU,4CAA4C,CAC1D,UAAyB;IAEzB,OAAO;QACL,IAAI,EAAE,sDAAsD;QAC5D,WAAW,CAAC,OAAO,EAAE,IAAI;YACvB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { PipelinePolicy, PipelineResponse } from \"@azure/core-rest-pipeline\";\n\nconst APIM_SUBSCRIPTION_KEY_HEADER = \"Ocp-Apim-Subscription-Key\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request using an `AzureKeyCredential` for Azure Form Recognizer\n * @internal\n */\nexport function createFormRecognizerAzureKeyCredentialPolicy(\n credential: KeyCredential\n): PipelinePolicy {\n return {\n name: \"cognitiveServicesApimSubscriptionKeyCredentialPolicy\",\n sendRequest(request, next): Promise<PipelineResponse> {\n request.headers.set(APIM_SUBSCRIPTION_KEY_HEADER, credential.key);\n return next(request);\n },\n };\n}\n"]}
@@ -1,13 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- /**
4
- * The default AAD permissions scope for Cognitive Services.
5
- * @internal
6
- */
7
- export const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
8
- /**
9
- * @internal
10
- */
11
- export const SDK_VERSION = "5.0.0";
12
- export const FORM_RECOGNIZER_API_VERSION = "2023-07-31";
13
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The default AAD permissions scope for Cognitive Services.\n * @internal\n */\nexport const DEFAULT_COGNITIVE_SCOPE = \"https://cognitiveservices.azure.com/.default\";\n\n/**\n * @internal\n */\nexport const SDK_VERSION = \"5.0.0\";\n\nexport const FORM_RECOGNIZER_API_VERSION = \"2023-07-31\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentAnalysisClient.js","sourceRoot":"","sources":["../../src/documentAnalysisClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAOvE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAML,4BAA4B,EAC5B,oCAAoC,G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AAC,CAAC;QAC9D,OAAO,CAAC,CAAC;YACP,MAAM,SAAS,GAAU,KAAK,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,wCAAwC,SAAS,EAAE,CAAC,CAAC;SACtE;KACF;AACH,CAAC;AAED;;GAEG;AACH,uFAAuF;AAEvF,SAAS,MAAM,CACb,IAAO,EACP,KAA2F;IAE3F,OAAO;QACL,IAAI;QACJ,CAAC,IAAI,CAAC,EAAE,KAAK;KACe,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { createTracingClient } from \"@azure/core-tracing\";\nimport { TracingClient } from \"@azure/core-tracing\";\nimport { FORM_RECOGNIZER_API_VERSION, SDK_VERSION } from \"./constants\";\nimport {\n AnalyzeDocumentRequest,\n AnalyzeResultOperation,\n ContentType,\n GeneratedClient,\n} from \"./generated\";\nimport { accept1 } from \"./generated/models/parameters\";\nimport {\n AnalysisOperationDefinition,\n AnalysisPoller,\n AnalyzeResult,\n DocumentAnalysisPollOperationState,\n FormRecognizerRequestBody,\n toAnalyzeResultFromGenerated,\n toDocumentAnalysisPollOperationState,\n} from \"./lro/analysis\";\nimport { OperationContext, lro } from \"./lro/util/poller\";\nimport { AnalyzeDocumentOptions } from \"./options/AnalyzeDocumentOptions\";\nimport { DocumentAnalysisClientOptions } from \"./options/FormRecognizerClientOptions\";\nimport { DocumentModel } from \"./documentModel\";\nimport { makeServiceClient, Mappers, SERIALIZER } from \"./util\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { ClassifyDocumentOptions } from \"./options/ClassifyDocumentOptions\";\n\n/**\n * A client for interacting with the Form Recognizer service's analysis features.\n *\n * ### Examples:\n *\n * The Form Recognizer service and clients support two means of authentication:\n *\n * #### Azure Active Directory\n *\n * ```javascript\n * import { DocumentAnalysisClient } from \"@azure/ai-form-recognizer\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new DefaultAzureCredential();\n *\n * const client = new DocumentAnalysisClient(endpoint, credential);\n * ```\n *\n * #### API Key (Subscription Key)\n *\n * ```javascript\n * import { DocumentAnalysisClient, AzureKeyCredential } from \"@azure/ai-form-recognizer\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new AzureKeyCredential(\"<api key>\");\n *\n * const client = new DocumentAnalysisClient(endpoint, credential);\n * ```\n */\nexport class DocumentAnalysisClient {\n private _restClient: GeneratedClient;\n private _tracing: TracingClient;\n\n /**\n * Create a `DocumentAnalysisClient` instance from a resource endpoint and a an Azure Identity `TokenCredential`.\n *\n * See the [`@azure/identity`](https://npmjs.com/package/\\@azure/identity) package for more information about\n * authenticating with Azure Active Directory.\n *\n * ### Example:\n *\n * ```javascript\n * import { DocumentAnalysisClient } from \"@azure/ai-form-recognizer\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new DefaultAzureCredential();\n *\n * const client = new DocumentAnalysisClient(endpoint, credential);\n * ```\n *\n * @param endpoint - the endpoint URL of an Azure Cognitive Services instance\n * @param credential - a TokenCredential instance from the `@azure/identity` package\n * @param options - optional settings for configuring all methods in the client\n */\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: DocumentAnalysisClientOptions\n );\n /**\n * Create a `DocumentAnalysisClient` instance from a resource endpoint and a static API key (`KeyCredential`),\n *\n * ### Example:\n *\n * ```javascript\n * import { DocumentAnalysisClient, AzureKeyCredential } from \"@azure/ai-form-recognizer\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new AzureKeyCredential(\"<api key>\");\n *\n * const client = new DocumentAnalysisClient(endpoint, credential);\n * ```\n *\n * @param endpoint - the endpoint URL of an Azure Cognitive Services instance\n * @param credential - a KeyCredential containing the Cognitive Services instance subscription key\n * @param options - optional settings for configuring all methods in the client\n */\n public constructor(\n endpoint: string,\n credential: KeyCredential,\n options?: DocumentAnalysisClientOptions\n );\n /**\n * @hidden\n */\n public constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: DocumentAnalysisClientOptions\n );\n public constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: DocumentAnalysisClientOptions = {}\n ) {\n this._restClient = makeServiceClient(endpoint, credential, options);\n this._tracing = createTracingClient({\n packageName: \"@azure/ai-form-recognizer\",\n packageVersion: SDK_VERSION,\n namespace: \"Microsoft.CognitiveServices\",\n });\n }\n\n // #region Analysis\n\n /**\n * Extract data from an input using a model given by its unique ID.\n *\n * This operation supports custom as well as prebuilt models. For example, to use the prebuilt invoice model, provide\n * the model ID \"prebuilt-invoice\", or to use the simpler prebuilt layout model, provide the model ID\n * \"prebuilt-layout\".\n *\n * The fields produced in the `AnalyzeResult` depend on the model that is used for analysis, and the values in any\n * extracted documents' fields depend on the document types in the model (if any) and their corresponding field\n * schemas.\n *\n * ### Examples\n *\n * This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`\n * objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.\n *\n * ```javascript\n * import * as fs from \"fs\";\n *\n * const file = fs.createReadStream(\"path/to/receipt.pdf\");\n *\n * // The model that is passed to the following function call determines the type of the eventual result. In the\n * // example, we will use the prebuilt receipt model, but you could use a custom model ID/name instead.\n * const poller = await client.beginAnalyzeDocument(\"prebuilt-receipt\", file);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain lines and words\n * tables, // extracted tables, organized into cells that contain their contents\n * styles, // text styles (ex. handwriting) that were observed in the document\n * keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)\n * entities, // extracted entities in the input's content, which are categorized (ex. \"Location\" or \"Organization\")\n * documents // extracted documents (instances of one of the model's document types and its field schema)\n * } = await poller.pollUntilDone();\n *\n * // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model\n * const [{ fields: receipt }] = documents;\n *\n * // The fields correspond to the model's document types and their field schemas. Refer to the Form Recognizer\n * // documentation for information about the document types and field schemas within a model, or use the `getModel`\n * // operation to view this information programmatically.\n * console.log(\"The type of this receipt is:\", receipt?.[\"ReceiptType\"]?.value);\n * ```\n *\n *\n * @param modelId - the unique ID (name) of the model within this client's resource\n * @param document - a {@link FormRecognizerRequestBody} that will be uploaded with the request\n * @param options - optional settings for the analysis operation and poller\n * @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`\n */\n public async beginAnalyzeDocument(\n modelId: string,\n document: FormRecognizerRequestBody,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options?: AnalyzeDocumentOptions\n ): Promise<AnalysisPoller>;\n /**\n * Extract data from an input using a model that has a known, strongly-typed document schema (a {@link DocumentModel}).\n *\n * The fields produced in the `AnalyzeResult` depend on the model that is used for analysis. In TypeScript, the type\n * of the result for this method overload is inferred from the type of the input `DocumentModel`.\n *\n * ### Examples\n *\n * This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`\n * objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.\n *\n * If the input provided is a string, it will be treated as a URL to the location of a document to be analyzed. See the\n * {@link beginAnalyzeDocumentFromUrl} method for more information. Use of that method is preferred when using URLs,\n * and URL support is only provided in this method for backwards compatibility.\n *\n * ```typescript\n * import * as fs from \"fs\";\n *\n * // See the `prebuilt` folder in the SDK samples (http://aka.ms/azsdk/formrecognizer/js/samples) for examples of\n * // DocumentModels for known prebuilts.\n * import { PrebuiltReceiptModel } from \"./prebuilt-receipt.ts\";\n *\n * const file = fs.createReadStream(\"path/to/receipt.pdf\");\n *\n * // The model that is passed to the following function call determines the type of the eventual result. In the\n * // example, we will use the prebuilt receipt model.\n * const poller = await client.beginAnalyzeDocument(PrebuiltReceiptModel, file);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain lines and words\n * tables, // extracted tables, organized into cells that contain their contents\n * styles, // text styles (ex. handwriting) that were observed in the document\n * keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)\n *\n * documents // extracted documents (instances of one of the model's document types and its field schema)\n * } = await poller.pollUntilDone();\n *\n * // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model\n * const [{ fields: receipt }] = documents;\n *\n * // Since we used the strongly-typed PrebuiltReceiptModel object instead of the \"prebuilt-receipt\" model ID\n * // string, the fields of the receipt are strongly-typed and have camelCase names (as opposed to PascalCase).\n * console.log(\"The type of this receipt is:\", receipt.receiptType?.value);\n * ```\n *\n * @param model - a {@link DocumentModel} representing the model to use for analysis and the expected output type\n * @param document - a {@link FormRecognizerRequestBody} that will be uploaded with the request\n * @param options - optional settings for the analysis operation and poller\n * @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult` with documents that have\n * the result type associated with the input model\n */\n public async beginAnalyzeDocument<Result>(\n model: DocumentModel<Result>,\n document: FormRecognizerRequestBody,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options?: AnalyzeDocumentOptions<Result>\n ): Promise<AnalysisPoller<Result>>;\n public async beginAnalyzeDocument(\n model: string | DocumentModel<unknown>,\n document: FormRecognizerRequestBody,\n options: AnalyzeDocumentOptions<unknown> = {}\n ): Promise<AnalysisPoller<unknown>> {\n return this._tracing.withSpan(\n \"DocumentAnalysisClient.beginAnalyzeDocument\",\n options,\n // In the first version of the SDK, the document input was treated as a URL if it was a string, and we preserve\n // this behavior to avoid introducing a breaking change.\n this.analyze.bind(\n this,\n model,\n typeof document === \"string\" ? source(\"url\", document) : source(\"body\", document)\n )\n );\n }\n\n /**\n * Extract data from an input using a model given by its unique ID.\n *\n * This operation supports custom as well as prebuilt models. For example, to use the prebuilt invoice model, provide\n * the model ID \"prebuilt-invoice\", or to use the simpler prebuilt layout model, provide the model ID\n * \"prebuilt-layout\".\n *\n * The fields produced in the `AnalyzeResult` depend on the model that is used for analysis, and the values in any\n * extracted documents' fields depend on the document types in the model (if any) and their corresponding field\n * schemas.\n *\n * ### Examples\n *\n * This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to\n * download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS\n * token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to\n * request the file.\n *\n * ```javascript\n * // the URL must be publicly accessible\n * const url = \"<receipt document url>\";\n *\n * // The model that is passed to the following function call determines the type of the eventual result. In the\n * // example, we will use the prebuilt receipt model, but you could use a custom model ID/name instead.\n * const poller = await client.beginAnalyzeDocument(\"prebuilt-receipt\", url);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain lines and words\n * tables, // extracted tables, organized into cells that contain their contents\n * styles, // text styles (ex. handwriting) that were observed in the document\n * keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)\n *\n * documents // extracted documents (instances of one of the model's document types and its field schema)\n * } = await poller.pollUntilDone();\n *\n * // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model\n * const [{ fields: receipt }] = documents;\n *\n * // The fields correspond to the model's document types and their field schemas. Refer to the Form Recognizer\n * // documentation for information about the document types and field schemas within a model, or use the `getModel`\n * // operation to view this information programmatically.\n * console.log(\"The type of this receipt is:\", receipt?.[\"ReceiptType\"]?.value);\n * ```\n *\n * @param modelId - the unique ID (name) of the model within this client's resource\n * @param documentUrl - a URL (string) to an input document accessible from the public internet\n * @param options - optional settings for the analysis operation and poller\n * @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`\n */\n public async beginAnalyzeDocumentFromUrl(\n modelId: string,\n documentUrl: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options?: AnalyzeDocumentOptions\n ): Promise<AnalysisPoller>;\n /**\n * Extract data from an input using a model that has a known, strongly-typed document schema (a {@link DocumentModel}).\n *\n * The fields produced in the `AnalyzeResult` depend on the model that is used for analysis. In TypeScript, the type\n * of the result for this method overload is inferred from the type of the input `DocumentModel`.\n *\n * ### Examples\n *\n * This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to\n * download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS\n * token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to\n * request the file.\n *\n * ```typescript\n * // See the `prebuilt` folder in the SDK samples (http://aka.ms/azsdk/formrecognizer/js/samples) for examples of\n * // DocumentModels for known prebuilts.\n * import { PrebuiltReceiptModel } from \"./prebuilt-receipt.ts\";\n *\n * // the URL must be publicly accessible\n * const url = \"<receipt document url>\";\n *\n * // The model that is passed to the following function call determines the type of the eventual result. In the\n * // example, we will use the prebuilt receipt model.\n * const poller = await client.beginAnalyzeDocument(PrebuiltReceiptModel, url);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain lines and words\n * tables, // extracted tables, organized into cells that contain their contents\n * styles, // text styles (ex. handwriting) that were observed in the document\n * keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)\n *\n * documents // extracted documents (instances of one of the model's document types and its field schema)\n * } = await poller.pollUntilDone();\n *\n * // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model\n * const [{ fields: receipt }] = documents;\n *\n * // Since we used the strongly-typed PrebuiltReceiptModel object instead of the \"prebuilt-receipt\" model ID\n * // string, the fields of the receipt are strongly-typed and have camelCase names (as opposed to PascalCase).\n * console.log(\"The type of this receipt is:\", receipt.receiptType?.value);\n * ```\n *\n * @param model - a {@link DocumentModel} representing the model to use for analysis and the expected output type\n * @param documentUrl - a URL (string) to an input document accessible from the public internet\n * @param options - optional settings for the analysis operation and poller\n * @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`\n */\n public async beginAnalyzeDocumentFromUrl<Result>(\n model: DocumentModel<Result>,\n documentUrl: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options?: AnalyzeDocumentOptions<Result>\n ): Promise<AnalysisPoller<Result>>;\n public async beginAnalyzeDocumentFromUrl(\n model: string | DocumentModel<unknown>,\n documentUrl: string,\n options: AnalyzeDocumentOptions<unknown> = {}\n ): Promise<AnalysisPoller<unknown>> {\n return this._tracing.withSpan(\n \"DocumentAnalysisClient.beginAnalyzeDocumentFromUrl\",\n options,\n this.analyze.bind(this, model, source(\"url\", documentUrl))\n );\n }\n\n /**\n * A helper method for running analysis polymorphically.\n *\n * @param model - the model ID or DocumentModel to use for analysis\n * @param input - the string URL or request body to use\n * @param options - analysis options\n * @returns - an analysis poller\n */\n private analyze(\n model: string | DocumentModel<unknown>,\n input: DocumentSource,\n options: AnalyzeDocumentOptions<unknown>\n ) {\n const {\n modelId: initialModelId,\n apiVersion: requestApiVersion,\n transformResult,\n } = typeof model === \"string\"\n ? { modelId: model, apiVersion: undefined, transformResult: (v: AnalyzeResult) => v }\n : model;\n\n if (requestApiVersion && requestApiVersion !== FORM_RECOGNIZER_API_VERSION) {\n throw new Error(\n [\n `API Version mismatch: the provided model wants version: ${requestApiVersion},`,\n `but the client is using ${FORM_RECOGNIZER_API_VERSION}.`,\n \"The API version of the model must match the client's API version.\",\n ].join(\" \")\n );\n }\n\n return this.createUnifiedPoller<unknown>(\n (abortSignal) => {\n const [contentType, analyzeRequest] = toAnalyzeRequest(input);\n\n return this._restClient.documentModels.analyzeDocument(initialModelId, contentType as any, {\n ...options,\n abortSignal,\n analyzeRequest,\n });\n },\n {\n initialModelId,\n options,\n transformResult: (result) => transformResult(toAnalyzeResultFromGenerated(result)),\n }\n );\n }\n\n /**\n * Classify a document using a custom classifier given by its ID.\n *\n * This method produces a long-running operation (poller) that will eventually produce an `AnalyzeResult`. This is the\n * same type as `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`, but the result will only contain a small\n * subset of its fields. Only the `documents` field and `pages` field will be populated, and only minimal page\n * information will be returned. The `documents` field will contain information about all the identified documents and\n * the `docType` that they were classified as.\n *\n * ### Example\n *\n * This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`\n * objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.\n *\n * ```typescript\n * import * as fs from \"fs\";\n *\n * const file = fs.createReadStream(\"path/to/file.pdf\");\n *\n * const poller = await client.beginClassifyDocument(\"<classifier ID>\", file);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain only basic information for classifiers\n * documents // extracted documents and their types\n * } = await poller.pollUntilDone();\n *\n * // We'll print the documents and their types\n * for (const { docType } of documents) {\n * console.log(\"The type of this document is:\", docType);\n * }\n * ```\n *\n * @param classifierId - the ID of the custom classifier to use for analysis\n * @param document - the document to classify\n * @param options - options for the classification operation\n * @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`\n */\n public async beginClassifyDocument(\n classifierId: string,\n document: FormRecognizerRequestBody,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ClassifyDocumentOptions = {}\n ): Promise<AnalysisPoller> {\n return this._tracing.withSpan(\n \"DocumentAnalysisClient.beginClassifyDocument\",\n options,\n this.classify.bind(this, classifierId, source(\"body\", document))\n );\n }\n\n /**\n * Classify a document from a URL using a custom classifier given by its ID.\n *\n * This method produces a long-running operation (poller) that will eventually produce an `AnalyzeResult`. This is the\n * same type as `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`, but the result will only contain a small\n * subset of its fields. Only the `documents` field and `pages` field will be populated, and only minimal page\n * information will be returned. The `documents` field will contain information about all the identified documents and\n * the `docType` that they were classified as.\n *\n * ### Example\n *\n * This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to\n * download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS\n * token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to\n * request the file.\n *\n * ```typescript\n * // the URL must be publicly accessible\n * const url = \"<file url>\";\n *\n * const poller = await client.beginClassifyDocument(\"<classifier ID>\", url);\n *\n * // The result is a long-running operation (poller), which must itself be polled until the operation completes\n * const {\n * pages, // pages extracted from the document, which contain only basic information for classifiers\n * documents // extracted documents and their types\n * } = await poller.pollUntilDone();\n *\n * // We'll print the documents and their types\n * for (const { docType } of documents) {\n * console.log(\"The type of this document is:\", docType);\n * }\n * ```\n * @param classifierId - the ID of the custom classifier to use for analysis\n * @param documentUrl - the URL of the document to classify\n * @param options -\n * @returns\n */\n public async beginClassifyDocumentFromUrl(\n classifierId: string,\n documentUrl: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ClassifyDocumentOptions = {}\n ): Promise<AnalysisPoller> {\n return this._tracing.withSpan(\n \"DocumentAnalysisClient.beginClassifyDocumentFromUrl\",\n options,\n this.classify.bind(this, classifierId, source(\"url\", documentUrl))\n );\n }\n\n /**\n * A helper method for running classification polymorphically.\n * @param classifierId - the ID of the classifier to use\n * @param input - the string URL or request body to use\n * @param options - analysis options\n * @returns an analysis poller\n */\n private classify(\n classifierId: string,\n input: DocumentSource,\n options: ClassifyDocumentOptions\n ): Promise<AnalysisPoller> {\n return this.createUnifiedPoller(\n async (abortSignal) => {\n const [contentType, classifyRequest] = toAnalyzeRequest(input);\n\n return this._restClient.documentClassifiers.classifyDocument(\n classifierId,\n contentType as any,\n {\n ...options,\n abortSignal,\n classifyRequest,\n }\n );\n },\n {\n initialModelId: classifierId,\n options,\n transformResult: toAnalyzeResultFromGenerated,\n }\n );\n }\n\n /**\n * Create an LRO poller that handles analysis operations.\n *\n * This is the meat of all analysis polling operations.\n *\n * @param startOperation - function that starts the operation and returns the operation location\n * @param definition - operation definition (initial model ID, operation transforms, request options)\n * @returns - an analysis poller that produces the given return types according to the operation spec\n */\n private async createUnifiedPoller<Result>(\n startOperation: (\n abortSignal: AbortSignalLike | undefined\n ) => Promise<{ operationLocation?: string }>,\n definition: AnalysisOperationDefinition<Result>\n ): Promise<AnalysisPoller<Result>> {\n const { resumeFrom } = definition.options;\n\n // TODO: what should we do if resumeFrom.modelId is different from initialModelId?\n // And what do we do with the redundant input??\n\n const getAnalyzeResult = (\n ctx: OperationContext,\n operationLocation: string\n ): Promise<AnalyzeResultOperation> =>\n this._tracing.withSpan(\n \"DocumentAnalysisClient.createAnalysisPoller-getAnalyzeResult\",\n definition.options,\n (finalOptions) =>\n this._restClient.sendOperationRequest<AnalyzeResultOperation>(\n {\n options: {\n onResponse: async (rawResponse, ...args) => {\n // Capture the `Retry-After` header if it was sent.\n const retryAfterHeader = rawResponse.headers.get(\"retry-after\");\n // Convert the header value to milliseconds. If the header is not a valid number, then it is an HTTP\n // date.\n if (retryAfterHeader) {\n const retryAfterMs = Number(retryAfterHeader) * 1000;\n if (!Number.isNaN(retryAfterMs)) {\n ctx.updateDelay(retryAfterMs);\n } else {\n ctx.updateDelay(Date.parse(retryAfterHeader) - Date.now());\n }\n } else {\n ctx.updateDelay(undefined);\n }\n\n // Forward the `onResponse` callback if it was provided.\n return finalOptions.onResponse?.(rawResponse, ...args);\n },\n ...finalOptions,\n // We need to pass the abort signal from the context rather than from the options, since the user could\n // poll the LRO with a different AbortSignal than it was instantiated with.\n abortSignal: ctx.abortSignal,\n },\n },\n {\n path: operationLocation,\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResultOperation,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n // URL is fully-formed, so we don't need any query parameters\n headerParameters: [accept1],\n serializer: SERIALIZER,\n }\n )\n );\n\n const toInit =\n // If the user gave us a stored token, we'll poll it again\n resumeFrom !== undefined\n ? async (ctx: OperationContext) =>\n this._tracing.withSpan(\n \"DocumentAnalysisClient.createAnalysisPoller-resume\",\n definition.options,\n async () => {\n const { clientVersion, operationLocation, modelId } = JSON.parse(resumeFrom) as {\n clientVersion?: string;\n operationLocation: string;\n modelId: string;\n };\n\n if (!clientVersion || clientVersion !== SDK_VERSION) {\n throw new Error(\n [\n \"Cannot restore poller from a serialized state from a different version of the client\",\n `library (restoreFrom: '${clientVersion}', current: '${SDK_VERSION}').`,\n ].join(\" \")\n );\n }\n\n const result = await getAnalyzeResult(ctx, operationLocation);\n\n return toDocumentAnalysisPollOperationState(\n definition,\n modelId,\n operationLocation,\n result\n );\n }\n )\n : // Otherwise, we'll start a new operation from the initialModelId\n async (ctx: OperationContext) =>\n this._tracing.withSpan(\n \"DocumentAnalysisClient.createAnalysisPoller-start\",\n definition.options,\n async () => {\n const { operationLocation } = await startOperation(ctx.abortSignal);\n\n if (operationLocation === undefined) {\n throw new Error(\n \"Unable to start analysis operation: no Operation-Location received.\"\n );\n }\n\n const result = await getAnalyzeResult(ctx, operationLocation);\n\n return toDocumentAnalysisPollOperationState(\n definition,\n definition.initialModelId,\n operationLocation,\n result\n );\n }\n );\n\n const poller = await lro<Result, DocumentAnalysisPollOperationState<Result>>(\n {\n init: toInit,\n poll: async (ctx, { operationLocation, modelId }) =>\n this._tracing.withSpan(\n \"DocumentAnalysisClient.createAnalysisPoller-poll\",\n {},\n async () => {\n const result = await getAnalyzeResult(ctx, operationLocation);\n\n return toDocumentAnalysisPollOperationState(\n definition,\n modelId,\n operationLocation,\n result\n );\n }\n ),\n serialize: ({ operationLocation, modelId }) =>\n JSON.stringify({ clientVersion: SDK_VERSION, id: modelId, operationLocation }),\n },\n definition.options.updateIntervalInMs,\n definition.options.abortSignal\n );\n\n if (definition.options.onProgress !== undefined) {\n poller.onProgress(definition.options.onProgress);\n definition.options.onProgress(poller.getOperationState());\n }\n\n return poller;\n }\n\n // #endregion\n}\n\n/**\n * Produce an appropriate pair of content-type and analyzeRequest value for the analysis request.\n * @internal\n */\nfunction toAnalyzeRequest(\n input: DocumentSource\n): [\"application/json\", AnalyzeDocumentRequest] | [ContentType, FormRecognizerRequestBody] {\n switch (input.kind) {\n case \"body\":\n return [\"application/octet-stream\", input.body];\n case \"url\":\n return [\"application/json\", { urlSource: input.url }];\n case \"base64\":\n return [\"application/json\", { base64Source: input.base64 }];\n default: {\n const __exhaust: never = input;\n throw new Error(`Unreachable 'toAnalyzeRequest' case: ${__exhaust}`);\n }\n }\n}\n\n/**\n * The input to a document analysis operation.\n */\n// type DocumentSource = DocumentBodySource | DocumentUrlSource | DocumentBase64Source;\n\nfunction source<K extends DocumentSource[\"kind\"]>(\n kind: K,\n value: Extract<DocumentSource, { kind: K }>[K & keyof Extract<DocumentSource, { kind: K }>]\n): DocumentSource {\n return {\n kind,\n [kind]: value,\n } as unknown as DocumentSource;\n}\n\n/**\n * The input to a document analysis operation.\n *\n * @internal\n */\ntype DocumentSource = {\n [K in keyof DocumentSourceTypes]: {\n /** The input kind. */\n kind: K;\n } & { [_ in K]: DocumentSourceTypes[K] };\n}[keyof DocumentSourceTypes];\n\n/**\n * A map of input discriminants to concrete input types.\n *\n * @internal\n */\ninterface DocumentSourceTypes {\n /**\n * A document buffer or stream to be uploaded in the request body.\n */\n body: FormRecognizerRequestBody;\n\n /**\n * A URL to a document to be analyzed.\n */\n url: string;\n\n /**\n * The data of a document to be analyzed. This is NOT base64-encoded, but will\n * be base64-encoded by the client before uploading.\n *\n * NOTE: This is never used by the client because it is inefficient compared to direct uploads and does not currently\n * support any features that `body` does not.\n */\n base64: Uint8Array;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentModel.js","sourceRoot":"","sources":["../../src/documentModel.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAuBnD;;;;;;;GAOG;AACH,SAAS,YAAY,CACnB,SAAiB,EACjB,MAA2B,EAC3B,KAAoB;IAEpB,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE;QAC9B,MAAM,IAAI,KAAK,CACb,qBAAqB,SAAS,cAAc,KAAK,CAAC,IAAI,oBAAoB,MAAM,CAAC,IAAI,GAAG,CACzF,CAAC;KACH;IAED,kFAAkF;IAClF,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE;QAC3B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Schema, DocumentModelDetails } from \"./generated\";\nimport { AnalyzedDocument, AnalyzeResult } from \"./lro/analysis\";\nimport { DocumentField } from \"./models/fields\";\nimport { isAcronymic, uncapitalize } from \"./util\";\n\n/**\n * A well-known model specification that supports extracting structured documents.\n *\n * See the `beginAnalyzeDocument` method of {@link DocumentAnalysisClient}, which supports consuming these\n * `DocumentModel` objects instead of model ID strings to provide stronger result types.\n */\nexport interface DocumentModel<Result> {\n /**\n * The unique ID of this model.\n */\n modelId: string;\n /**\n * The API version of the model.\n */\n apiVersion?: string;\n /**\n * An associated transformation that is used to conver the base (weak) Result type to the strong version.\n */\n transformResult: (input: AnalyzeResult) => Result;\n}\n\n/**\n * Checks a field value against a schema and converts it into a strong idiomatic DocumentField,\n * @internal\n * @param fieldName - the name of the field (used in diagnostics)\n * @param schema - the field's schema\n * @param field - the raw DocumentField value\n * @returns\n */\nfunction extractField(\n fieldName: string,\n schema: DocumentFieldSchema,\n field: DocumentField\n): DocumentField {\n if (schema.type !== field.kind) {\n throw new Error(\n `Schema violation: ${fieldName} had type \"${field.kind}\", but expected \"${schema.type}\"`\n );\n }\n\n // Objects need to be handled specially, so that we can camelCase the field names.\n if (field.kind === \"object\") {\n const result: any = {};\n\n for (const [subFieldName, subFieldSchema] of Object.entries(schema.properties!)) {\n if (field.properties[subFieldName] !== undefined && field.properties[subFieldName] !== null) {\n const trueFieldName = (\n isAcronymic(subFieldName) ? subFieldName : uncapitalize(subFieldName)\n ).replace(/\\s/g, \"\");\n\n result[trueFieldName] = extractField(\n fieldName + \".\" + subFieldName,\n subFieldSchema,\n field.properties[subFieldName]!\n );\n }\n }\n\n return {\n ...field,\n properties: result,\n };\n } else if (field.kind === \"array\") {\n return {\n ...field,\n values: field.values.map((val, idx) =>\n extractField(fieldName + \"[\" + idx + \"]\", schema.items!, val)\n ),\n };\n } else return field;\n}\n\n/**\n * Create a DocumentModel that performs analysis using the given schema.\n *\n * The types of `documents` are created from the schema, so they are `unknown` unless they are asserted to be a\n * different type.\n *\n * @hidden\n * @param schema - model schema contents\n * @returns - a DocumentModel that encodes the schema\n */\nexport function createModelFromSchema(\n schema: Omit<DocumentModelDetails, \"createdOn\">\n): DocumentModel<AnalyzeResult<unknown>> {\n return {\n modelId: schema.modelId,\n apiVersion: schema.apiVersion,\n transformResult(baseResult: AnalyzeResult): AnalyzeResult<unknown> {\n const hasDocuments = Object.entries(schema.docTypes ?? {}).length > 0;\n\n return {\n ...baseResult,\n documents: hasDocuments\n ? baseResult.documents?.map(toDocument)\n : baseResult.documents ?? [],\n };\n\n function toDocument(document: AnalyzedDocument): unknown {\n const result: Record<string, unknown> = {};\n const model = schema.docTypes?.[document.docType];\n\n if (model === undefined) {\n throw new Error(\n `Unexpected document type \"${document.docType}\" in result using model \"${schema.modelId}\"`\n );\n }\n for (const [fieldName, fieldSchema] of Object.entries(model.fieldSchema)) {\n if (\n document.fields &&\n document.fields[fieldName] !== undefined &&\n document.fields[fieldName] !== null\n ) {\n const trueFieldName = (\n isAcronymic(fieldName) ? fieldName : uncapitalize(fieldName)\n ).replace(/\\s/g, \"\");\n result[trueFieldName] = extractField(\n fieldName,\n fieldSchema,\n document.fields[fieldName]\n );\n }\n }\n\n return {\n ...document,\n fields: result,\n };\n }\n },\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentModelAdministrationClient.js","sourceRoot":"","sources":["../../src/documentModelAdministrationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAW1C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAIL,4BAA4B,GAK7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAoB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAmB1D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,E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,QAAQ,CAAC,QAAQ,CAC3B,gDAAgD,EAChD,OAAO,EACP,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,YAAY,CAAC,WAAW,EAAE,YAAY,CAAC,CACzF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsCG;IACI,cAAc,CACnB,UAAiC,EAAE;QAEnC,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC;CAGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { TracingClient, createTracingClient } from \"@azure/core-tracing\";\nimport { SDK_VERSION } from \"./constants\";\nimport {\n CopyAuthorization,\n GeneratedClient,\n ResourceDetails,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationDetails,\n DocumentClassifierDetails,\n} from \"./generated\";\nimport { accept1 } from \"./generated/models/parameters\";\nimport {\n TrainingOperationDefinition,\n DocumentModelOperationState,\n DocumentModelPoller,\n toTrainingPollOperationState,\n DocumentModelBuildResponse,\n AdministrationOperationState,\n DocumentClassifierPoller,\n DocumentClassifierOperationState,\n} from \"./lro/administration\";\nimport { OperationContext, lro } from \"./lro/util/poller\";\nimport {\n BeginCopyModelOptions,\n DeleteDocumentModelOptions,\n DocumentModelAdministrationClientOptions,\n GetCopyAuthorizationOptions,\n GetResourceDetailsOptions,\n GetModelOptions,\n GetOperationOptions,\n ListModelsOptions,\n ListOperationsOptions,\n PollerOptions,\n} from \"./options\";\nimport { BeginBuildDocumentClassifierOptions } from \"./options/BuildDocumentClassifierOptions\";\nimport {\n BeginBuildDocumentModelOptions,\n BeginComposeDocumentModelOptions,\n DocumentModelBuildMode,\n} from \"./options/BuildModelOptions\";\nimport { Mappers, SERIALIZER, makeServiceClient } from \"./util\";\nimport { FullOperationResponse, OperationOptions } from \"@azure/core-client\";\nimport {\n DocumentModelSource,\n DocumentClassifierDocumentTypeSources,\n AzureBlobSource,\n} from \"./models\";\n\n/**\n * A client for interacting with the Form Recognizer service's model management features, such as creating, reading,\n * listing, deleting, and copying models.\n *\n * ### Examples:\n *\n * #### Azure Active Directory\n *\n * ```typescript\n * import { DocumentModelAdministrationClient } from \"@azure/ai-form-recognizer\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new DefaultAzureCredential();\n *\n * const client = new DocumentModelAdministrationClient(endpoint, credential);\n * ```\n *\n * #### API Key (Subscription Key)\n *\n * ```typescript\n * import { DocumentModelAdministrationClient, AzureKeyCredential } from \"@azure/ai-form-recognizer\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new AzureKeyCredential(\"<api key>\");\n *\n * const client = new DocumentModelAdministrationClient(endpoint, credential);\n * ```\n */\nexport class DocumentModelAdministrationClient {\n private _restClient: GeneratedClient;\n private _tracing: TracingClient;\n\n /**\n * Create a DocumentModelAdministrationClient instance from a resource endpoint and a an Azure Identity `TokenCredential`.\n *\n * See the [`@azure/identity`](https://npmjs.com/package/\\@azure/identity) package for more information about\n * authenticating with Azure Active Directory.\n *\n * ### Example:\n *\n * ```javascript\n * import { DocumentModelAdministrationClient } from \"@azure/ai-form-recognizer\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new DefaultAzureCredential();\n *\n * const client = new DocumentModelAdministrationClient(endpoint, credential);\n * ```\n *\n * @param endpoint - the endpoint URL of an Azure Cognitive Services instance\n * @param credential - a TokenCredential instance from the `@azure/identity` package\n * @param options - optional settings for configuring all methods in the client\n */\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: DocumentModelAdministrationClientOptions\n );\n /**\n * Create a DocumentModelAdministrationClient instance from a resource endpoint and a static API key\n * (`KeyCredential`),\n *\n * ### Example:\n *\n * ```javascript\n * import { DocumentModelAdministrationClient, AzureKeyCredential } from \"@azure/ai-form-recognizer\";\n *\n * const endpoint = \"https://<resource name>.cognitiveservices.azure.com\";\n * const credential = new AzureKeyCredential(\"<api key>\");\n *\n * const client = new DocumentModelAdministrationClient(endpoint, credential);\n * ```\n *\n * @param endpoint - the endpoint URL of an Azure Cognitive Services instance\n * @param credential - a KeyCredential containing the Cognitive Services instance subscription key\n * @param options - optional settings for configuring all methods in the client\n */\n public constructor(\n endpoint: string,\n credential: KeyCredential,\n options?: DocumentModelAdministrationClientOptions\n );\n /**\n * @hidden\n */\n public constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: DocumentModelAdministrationClientOptions\n );\n public constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: DocumentModelAdministrationClientOptions = {}\n ) {\n this._restClient = makeServiceClient(endpoint, credential, options);\n this._tracing = createTracingClient({\n packageName: \"@azure/ai-form-recognizer\",\n packageVersion: SDK_VERSION,\n namespace: \"Microsoft.CognitiveServices\",\n });\n }\n\n // #region Model Creation\n\n /**\n * Build a new model with a given ID from a set of input documents and labeled fields.\n *\n * The Model ID can consist of any text, so long as it does not begin with \"prebuilt-\" (as these models refer to\n * prebuilt Form Recognizer models that are common to all resources), and so long as it does not already exist within\n * the resource.\n *\n * The Form Recognizer service reads the training data set from an Azure Storage container, given as a URL to the\n * container with a SAS token that allows the service backend to communicate with the container. At a minimum, the\n * \"read\" and \"list\" permissions are required. In addition, the data in the given container must be organized\n * according to a particular convention, which is documented in [the service's documentation for building custom\n * models](https://aka.ms/form-recognizer/custom).\n *\n * ### Example\n *\n * ```javascript\n * const modelId = \"aNewModel\";\n * const containerUrl = \"<training data container SAS URL>\";\n *\n * const poller = await client.beginBuildDocumentModel(modelId, containerUrl, {\n * // Optionally, a text description may be attached to the model\n * description: \"This is an example model!\"\n * });\n *\n * // Model building, like all other model creation operations, returns a poller that eventually produces a ModelDetails\n * // object\n * const modelDetails = await poller.pollUntilDone();\n *\n * const {\n * modelId, // identical to the modelId given when creating the model\n * description, // identical to the description given when creating the model\n * createdOn, // the Date (timestamp) that the model was created\n * docTypes // information about the document types in the model and their field schemas\n * } = modelDetails;\n * ```\n *\n * @param modelId - the unique ID of the model to create\n * @param containerUrl - SAS-encoded URL to an Azure Storage container holding the training data set\n * @param buildMode - the mode to use when building the model (see `DocumentModelBuildMode`)\n * @param options - optional settings for the model build operation\n * @returns a long-running operation (poller) that will eventually produce the created model information or an error\n */\n public async beginBuildDocumentModel(\n modelId: string,\n containerUrl: string,\n buildMode: DocumentModelBuildMode,\n options?: BeginBuildDocumentModelOptions\n ): Promise<DocumentModelPoller>;\n\n /**\n * Build a new model with a given ID from a model content source.\n *\n * The Model ID can consist of any text, so long as it does not begin with \"prebuilt-\" (as these models refer to\n * prebuilt Form Recognizer models that are common to all resources), and so long as it does not already exist within\n * the resource.\n *\n * The content source describes the mechanism the service will use to read the input training data. See the\n * {@link DocumentModelContentSource} type for more information.\n *\n * ### Example\n *\n * ```javascript\n * const modelId = \"aNewModel\";\n *\n * const poller = await client.beginBuildDocumentModel(modelId, { containerUrl: \"<SAS-encoded blob container URL>\" }, {\n * // Optionally, a text description may be attached to the model\n * description: \"This is an example model!\"\n * });\n *\n * // Model building, like all other model creation operations, returns a poller that eventually produces a ModelDetails\n * // object\n * const modelDetails = await poller.pollUntilDone();\n *\n * const {\n * modelId, // identical to the modelId given when creating the model\n * description, // identical to the description given when creating the model\n * createdOn, // the Date (timestamp) that the model was created\n * docTypes // information about the document types in the model and their field schemas\n * } = modelDetails;\n * ```\n *\n * @param modelId - the unique ID of the model to create\n * @param contentSource - a content source that provides the training data for this model\n * @param buildMode - the mode to use when building the model (see `DocumentModelBuildMode`)\n * @param options - optional settings for the model build operation\n * @returns a long-running operation (poller) that will eventually produce the created model information or an error\n */\n public async beginBuildDocumentModel(\n modelId: string,\n contentSource: DocumentModelSource,\n buildMode: DocumentModelBuildMode,\n options?: BeginBuildDocumentModelOptions\n ): Promise<DocumentModelPoller>;\n\n public async beginBuildDocumentModel(\n modelId: string,\n urlOrSource: string | DocumentModelSource,\n buildMode: DocumentModelBuildMode,\n options: BeginBuildDocumentModelOptions = {}\n ): Promise<DocumentModelPoller> {\n const sourceInfo =\n typeof urlOrSource === \"string\"\n ? ({\n azureBlobSource: {\n containerUrl: urlOrSource,\n },\n } as AzureBlobSource)\n : urlOrSource;\n\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.beginBuildDocumentModel\",\n options,\n (finalOptions) =>\n this.createAdministrationPoller({\n options: finalOptions,\n start: (ctx) =>\n this._restClient.documentModels.buildModel(\n {\n modelId,\n description: finalOptions.description,\n ...sourceInfo,\n buildMode,\n },\n {\n ...finalOptions,\n abortSignal: ctx.abortSignal,\n }\n ),\n })\n );\n }\n\n /**\n * Creates a single composed model from several pre-existing submodels.\n *\n * The resulting composed model combines the document types of its component models, and inserts a classification step\n * into the extraction pipeline to determine which of its component submodels is most appropriate for the given input.\n *\n * ### Example\n *\n * ```javascript\n * const modelId = \"aNewComposedModel\";\n * const subModelIds = [\n * \"documentType1Model\",\n * \"documentType2Model\",\n * \"documentType3Model\"\n * ];\n *\n * // The resulting composed model can classify and extract data from documents\n * // conforming to any of the above document types\n * const poller = await client.beginComposeDocumentModel(modelId, subModelIds, {\n * description: \"This is a composed model that can handle several document types.\"\n * });\n *\n * // Model composition, like all other model creation operations, returns a poller that eventually produces a\n * // ModelDetails object\n * const modelDetails = await poller.pollUntilDone();\n *\n * const {\n * modelId, // identical to the modelId given when creating the model\n * description, // identical to the description given when creating the model\n * createdOn, // the Date (timestamp) that the model was created\n * docTypes // information about the document types of the composed submodels\n * } = modelDetails;\n * ```\n *\n * @param modelId - the unique ID of the model to create\n * @param componentModelIds - an Iterable of strings representing the unique model IDs of the models to compose\n * @param options - optional settings for model creation\n * @returns a long-running operation (poller) that will eventually produce the created model information or an error\n */\n public async beginComposeDocumentModel(\n modelId: string,\n componentModelIds: Iterable<string>,\n options: BeginComposeDocumentModelOptions = {}\n ): Promise<DocumentModelPoller> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.beginComposeDocumentModel\",\n options,\n (finalOptions) =>\n this.createAdministrationPoller({\n options: finalOptions,\n start: (ctx) =>\n this._restClient.documentModels.composeModel(\n {\n modelId,\n componentModels: [...componentModelIds].map((submodelId) => ({\n modelId: submodelId,\n })),\n description: finalOptions.description,\n tags: finalOptions.tags,\n },\n {\n ...finalOptions,\n abortSignal: ctx.abortSignal,\n }\n ),\n })\n );\n }\n\n /**\n * Creates an authorization to copy a model into the resource, used with the `beginCopyModelTo` method.\n *\n * The `CopyAuthorization` grants another cognitive service resource the right to create a model in this client's\n * resource with the model ID and optional description that are encoded into the authorization.\n *\n * ### Example\n *\n * ```javascript\n * // The copyAuthorization data structure stored below grants any cognitive services resource the right to copy a\n * // model into the client's resource with the given destination model ID.\n * const copyAuthorization = await client.getCopyAuthorization(\"<destination model ID>\");\n * ```\n *\n * @param destinationModelId - the unique ID of the destination model (the ID to copy the model into)\n * @param options - optional settings for creating the copy authorization\n * @returns a copy authorization that encodes the given modelId and optional description\n */\n public async getCopyAuthorization(\n destinationModelId: string,\n options: GetCopyAuthorizationOptions = {}\n ): Promise<CopyAuthorization> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.getCopyAuthorization\",\n options,\n (finalOptions) =>\n this._restClient.documentModels.authorizeModelCopy(\n {\n modelId: destinationModelId,\n description: finalOptions.description,\n tags: finalOptions.tags,\n },\n finalOptions\n )\n );\n }\n\n /**\n * Copies a model with the given ID into the resource and model ID encoded by a given copy authorization.\n *\n * See {@link CopyAuthorization} and {@link getCopyAuthorization}.\n *\n * ### Example\n *\n * ```javascript\n * // We need a client for the source model's resource\n * const sourceEndpoint = \"https://<source resource name>.cognitiveservices.azure.com\";\n * const sourceCredential = new AzureKeyCredential(\"<source api key>\");\n * const sourceClient = new DocumentModelAdministrationClient(sourceEndpoint, sourceCredential);\n *\n * // We create the copy authorization using a client authenticated with the destination resource. Note that these two\n * // resources can be the same (you can copy a model to a new ID in the same resource).\n * const copyAuthorization = await client.getCopyAuthorization(\"<destination model ID>\");\n *\n * // Finally, use the _source_ client to copy the model and await the copy operation\n * const poller = await sourceClient.beginCopyModelTo(\"<source model ID>\");\n *\n * // Model copying, like all other model creation operations, returns a poller that eventually produces a ModelDetails\n * // object\n * const modelDetails = await poller.pollUntilDone();\n *\n * const {\n * modelId, // identical to the modelId given when creating the copy authorization\n * description, // identical to the description given when creating the copy authorization\n * createdOn, // the Date (timestamp) that the model was created\n * docTypes // information about the document types of the model (identical to the original, source model)\n * } = modelDetails;\n * ```\n *\n * @param sourceModelId - the unique ID of the source model that will be copied\n * @param authorization - an authorization to copy the model, created using the {@link getCopyAuthorization}\n * @param options - optional settings for\n * @returns a long-running operation (poller) that will eventually produce the copied model information or an error\n */\n public async beginCopyModelTo(\n sourceModelId: string,\n authorization: CopyAuthorization,\n options: BeginCopyModelOptions = {}\n ): Promise<DocumentModelPoller> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.beginCopyModel\",\n options,\n (finalOptions) =>\n this.createAdministrationPoller({\n options: finalOptions,\n start: () =>\n this._restClient.documentModels.copyModelTo(sourceModelId, authorization, finalOptions),\n })\n );\n }\n\n // #endregion\n\n // #region Document Classifiers\n\n /**\n * Build a new document classifier with the given classifier ID and document types.\n *\n * The classifier ID must be unique among classifiers within the resource.\n *\n * The document types are given as an object that maps the name of the document type to the training data set for that\n * document type. Two training data input methods are supported:\n *\n * - `azureBlobSource`, which trains a classifier using the data in the given Azure Blob Storage container.\n * - `azureBlobFileListSource`, which is similar to `azureBlobSource` but allows for more fine-grained control over\n * the files that are included in the training data set by using a JSONL-formatted file list.\n *\n * The Form Recognizer service reads the training data set from an Azure Storage container, given as a URL to the\n * container with a SAS token that allows the service backend to communicate with the container. At a minimum, the\n * \"read\" and \"list\" permissions are required. In addition, the data in the given container must be organized\n * according to a particular convention, which is documented in [the service's documentation for building custom\n * document classifiers](https://aka.ms/azsdk/formrecognizer/buildclassifiermodel).\n *\n * ### Example\n *\n * ```javascript\n * const classifierId = \"aNewClassifier\";\n * const containerUrl1 = \"<training data container SAS URL 1>\";\n * const containerUrl2 = \"<training data container SAS URL 2>\";\n *\n * const poller = await client.beginBuildDocumentClassifier(\n * classifierId,\n * {\n * // The document types. Each entry in this object should map a document type name to a\n * // `ClassifierDocumentTypeDetails` object\n * \"formX\": {\n * azureBlobSource: {\n * containerUrl: containerUrl1,\n * }\n * },\n * \"formY\": {\n * azureBlobFileListSource: {\n * containerUrl: containerUrl2,\n * fileList: \"path/to/fileList.jsonl\"\n * }\n * },\n * },\n * {\n * // Optionally, a text description may be attached to the classifier\n * description: \"This is an example classifier!\"\n * }\n * );\n *\n * // Classifier building, like model creation operations, returns a poller that eventually produces a\n * // DocumentClassifierDetails object\n * const classifierDetails = await poller.pollUntilDone();\n *\n * const {\n * classifierId, // identical to the classifierId given when creating the classifier\n * description, // identical to the description given when creating the classifier (if any)\n * createdOn, // the Date (timestamp) that the classifier was created\n * docTypes // information about the document types in the classifier and their details\n * } = classifierDetails;\n * ```\n *\n * @param classifierId - the unique ID of the classifier to create\n * @param docTypeSources - the document types to include in the classifier and their sources (a map of document type\n * names to `ClassifierDocumentTypeDetails`)\n * @param options - optional settings for the classifier build operation\n * @returns a long-running operation (poller) that will eventually produce the created classifier details or an error\n */\n public async beginBuildDocumentClassifier(\n classifierId: string,\n docTypeSources: DocumentClassifierDocumentTypeSources,\n options: BeginBuildDocumentClassifierOptions = {}\n ): Promise<DocumentClassifierPoller> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.beginBuildDocumentClassifier\",\n options,\n (finalOptions) =>\n this.createAdministrationPoller<DocumentClassifierOperationState>({\n options: finalOptions,\n start: () =>\n this._restClient.documentClassifiers.buildClassifier(\n {\n classifierId,\n description: finalOptions.description,\n docTypes: docTypeSources,\n },\n finalOptions\n ),\n })\n );\n }\n\n // #endregion\n\n /**\n * Create an LRO poller that handles model creation operations.\n *\n * This is the meat of the above model creation operations.\n *\n * @param definition - operation definition (start operation method, request options)\n * @returns a model poller (produces a ModelDetails)\n */\n private async createAdministrationPoller<State extends AdministrationOperationState>(\n definition: TrainingOperationDefinition<State>\n ): Promise<\n State extends DocumentModelOperationState ? DocumentModelPoller : DocumentClassifierPoller\n > {\n const { resumeFrom } = definition.options;\n\n const toInit =\n resumeFrom === undefined\n ? (ctx: OperationContext) =>\n this._tracing.withSpan(\n \"DocumentModelAdministrationClient.createDocumentModelPoller-start\",\n definition.options,\n async (options) => {\n const { operationLocation } = await definition.start(ctx);\n\n if (operationLocation === undefined) {\n throw new Error(\n \"Unable to start model creation operation: no Operation-Location received.\"\n );\n }\n\n return this._restClient.sendOperationRequest(\n {\n options: {\n onResponse: (rawResponse, ...args) => {\n return captureRetryAfter(rawResponse, ctx, options, args);\n },\n ...options,\n abortSignal: ctx.abortSignal,\n },\n },\n {\n path: operationLocation,\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n headerParameters: [accept1],\n serializer: SERIALIZER,\n }\n ) as Promise<OperationDetails>;\n }\n )\n : (ctx: OperationContext) =>\n this._tracing.withSpan(\n \"DocumentModelAdministrationClient.createDocumentModelPoller-resume\",\n definition.options,\n (options) => {\n const { operationId } = JSON.parse(resumeFrom) as { operationId: string };\n\n return this._restClient.miscellaneous.getOperation(operationId, {\n onResponse: (rawResponse, ...args) => {\n return captureRetryAfter(rawResponse, ctx, options, args);\n },\n ...options,\n });\n }\n );\n\n const poller = await lro<\n DocumentModelDetails | DocumentClassifierDetails,\n AdministrationOperationState\n >(\n {\n init: async (ctx) => toTrainingPollOperationState(await toInit(ctx)),\n poll: async (ctx, { operationId }) =>\n this._tracing.withSpan(\n \"DocumentModelAdminstrationClient.createDocumentModelPoller-poll\",\n definition.options,\n async (options) => {\n const res = await this._restClient.miscellaneous.getOperation(operationId, {\n onResponse: (rawResponse, ...args) => {\n // Capture the `Retry-After` header if it was sent.\n return captureRetryAfter(rawResponse, ctx, options, args);\n },\n ...options,\n abortSignal: ctx.abortSignal,\n });\n\n return toTrainingPollOperationState(res as DocumentModelBuildResponse);\n }\n ),\n serialize: ({ operationId }) => JSON.stringify({ operationId }),\n },\n definition.options.updateIntervalInMs,\n definition.options.abortSignal\n );\n\n if (definition.options.onProgress !== undefined) {\n poller.onProgress(definition.options.onProgress as () => unknown);\n definition.options.onProgress(poller.getOperationState() as State);\n }\n\n // Need this assertion. The poller above is dynamic, and we can't infer the conditional return type of this method.\n return poller as never;\n\n /**\n * An inline helper for capturing the value of the `Retry-After` header if it was sent.\n * @param rawResponse - the raw response from the service\n * @param ctx - the operation context\n * @param options - the operation options\n * @param args - the arguments passed to the response handler\n * @returns\n */\n function captureRetryAfter(\n rawResponse: FullOperationResponse,\n ctx: OperationContext,\n options: PollerOptions<State> & OperationOptions,\n args: [flatResponse: unknown, error?: unknown]\n ) {\n const retryAfterHeader = rawResponse.headers.get(\"retry-after\");\n // Convert the header value to milliseconds. If the header is not a valid number, then it is an HTTP\n // date.\n if (retryAfterHeader) {\n const retryAfterMs = Number(retryAfterHeader) * 1000;\n if (!Number.isNaN(retryAfterMs)) {\n ctx.updateDelay(retryAfterMs);\n } else {\n ctx.updateDelay(Date.parse(retryAfterHeader) - Date.now());\n }\n } else {\n ctx.updateDelay(undefined);\n }\n\n // Forward the `onResponse` callback if it was provided.\n return options.onResponse?.(rawResponse, ...args);\n }\n }\n\n // #region Model Management\n\n /**\n * Retrieve basic information about this client's resource.\n *\n * ### Example\n *\n * ```javascript\n * const {\n * // Information about the custom models in the current resource\n * customDocumentModelDetails: {\n * // The number of custom models in the current resource\n * count,\n * // The maximum number of models that the current resource can support\n * limit\n * }\n * } = await client.getResourceDetails();\n * ```\n *\n * @param options - optional settings for the request\n * @returns basic information about this client's resource\n */\n public getResourceDetails(options: GetResourceDetailsOptions = {}): Promise<ResourceDetails> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.getResourceDetails\",\n options,\n (finalOptions) => this._restClient.miscellaneous.getResourceInfo(finalOptions)\n );\n }\n\n /**\n * Retrieves information about a model ({@link DocumentModelDetails}) by ID.\n *\n * This method can retrieve information about custom as well as prebuilt models.\n *\n * ### **Breaking Change**\n *\n * In previous versions of the Form Recognizer REST API and SDK, the `getModel` method could return any model, even\n * one that failed to create due to errors. In the new service versions, `getDocumentModel` and `listDocumentModels`\n * _only produce successfully created models_ (i.e. models that are \"ready\" for use). Failed models are now retrieved\n * through the \"operations\" APIs, see {@link getOperation} and {@link listOperations}.\n *\n * ### Example\n *\n * ```javascript\n * // The ID of the prebuilt business card model\n * const modelId = \"prebuilt-businessCard\";\n *\n * const {\n * modelId, // identical to the modelId given when calling `getDocumentModel`\n * description, // a textual description of the model, if provided during model creation\n * createdOn, // the Date (timestamp) that the model was created\n * // information about the document types in the model and their field schemas\n * docTypes: {\n * // the document type of the prebuilt business card model\n * \"prebuilt:businesscard\": {\n * // an optional, textual description of this document type\n * description,\n * // the schema of the fields in this document type, see the FieldSchema type\n * fieldSchema,\n * // the service's confidences in the fields (an object with field names as properties and numeric confidence\n * // values)\n * fieldConfidence\n * }\n * }\n * } = await client.getDocumentModel(modelId);\n * ```\n *\n * @param modelId - the unique ID of the model to query\n * @param options - optional settings for the request\n * @returns information about the model with the given ID\n */\n public getDocumentModel(\n modelId: string,\n options: GetModelOptions = {}\n ): Promise<DocumentModelDetails> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.getDocumentModel\",\n options,\n (finalOptions) => this._restClient.documentModels.getModel(modelId, finalOptions)\n );\n }\n\n /**\n * List summaries of models in the resource. Custom as well as prebuilt models will be included. This operation\n * supports paging.\n *\n * The model summary ({@link DocumentModelSummary}) includes only the basic information about the model, and does not include\n * information about the document types in the model (such as the field schemas and confidence values).\n *\n * To access the full information about the model, use {@link getDocumentModel}.\n *\n * ### **Breaking Change**\n *\n * In previous versions of the Form Recognizer REST API and SDK, the `listModels` method would return all models, even\n * those that failed to create due to errors. In the new service versions, `listDocumentModels` and `getDocumentModel`\n * _only produce successfully created models_ (i.e. models that are \"ready\" for use). Failed models are now retrieved\n * through the \"operations\" APIs, see {@link getOperation} and {@link listOperations}.\n *\n * ### Examples\n *\n * #### Async Iteration\n *\n * ```javascript\n * for await (const summary of client.listDocumentModels()) {\n * const {\n * modelId, // The model's unique ID\n * description, // a textual description of the model, if provided during model creation\n * } = summary;\n *\n * // You can get the full model info using `getDocumentModel`\n * const model = await client.getDocumentModel(modelId);\n * }\n * ```\n *\n * #### By Page\n *\n * ```javascript\n * // The listDocumentModels method is paged, and you can iterate by page using the `byPage` method.\n * const pages = client.listDocumentModels().byPage();\n *\n * for await (const page of pages) {\n * // Each page is an array of models and can be iterated synchronously\n * for (const model of page) {\n * const {\n * modelId, // The model's unique ID\n * description, // a textual description of the model, if provided during model creation\n * } = summary;\n *\n * // You can get the full model info using `getDocumentModel`\n * const model = await client.getDocumentModel(modelId);\n * }\n * }\n * ```\n *\n * @param options - optional settings for the model requests\n * @returns an async iterable of model summaries that supports paging\n */\n public listDocumentModels(\n options: ListModelsOptions = {}\n ): PagedAsyncIterableIterator<DocumentModelSummary> {\n return this._restClient.documentModels.listModels(options);\n }\n\n /**\n * Deletes a model with the given ID from the client's resource, if it exists. This operation CANNOT be reverted.\n *\n * ### Example\n *\n * ```javascript\n * await client.deleteDocumentModel(\"<model ID to delete>\"));\n * ```\n *\n * @param modelId - the unique ID of the model to delete from the resource\n * @param options - optional settings for the request\n */\n public deleteDocumentModel(\n modelId: string,\n options: DeleteDocumentModelOptions = {}\n ): Promise<void> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.deleteDocumentModel\",\n options,\n (finalOptions) => this._restClient.documentModels.deleteModel(modelId, finalOptions)\n );\n }\n\n // #endregion\n\n // #region Classifier Management\n\n /**\n * Retrieves information about a classifier ({@link DocumentClassifierDetails}) by ID.\n *\n * ### Example\n *\n * ```javascript\n * const classifierId = \"<classifier ID\";\n *\n * const {\n * classifierId, // identical to the ID given when calling `getDocumentClassifier`\n * description, // a textual description of the classifier, if provided during classifier creation\n * createdOn, // the Date (timestamp) that the classifier was created\n * // information about the document types in the classifier and their corresponding traning data\n * docTypes\n * } = await client.getDocumentClassifier(classifierId);\n *\n * // The `docTypes` property is a map of document type names to information about the training data\n * // for that document type.\n * for (const [docTypeName, classifierDocTypeDetails] of Object.entries(docTypes)) {\n * console.log(`- '${docTypeName}': `, classifierDocTypeDetails);\n * }\n * ```\n *\n * @param classifierId - the unique ID of the classifier to query\n * @param options - optional settings for the request\n * @returns information about the classifier with the given ID\n */\n public getDocumentClassifier(\n classifierId: string,\n options: OperationOptions = {}\n ): Promise<DocumentClassifierDetails> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.getDocumentClassifier\",\n options,\n (finalOptions) =>\n this._restClient.documentClassifiers.getClassifier(classifierId, finalOptions)\n );\n }\n\n /**\n * List details about classifiers in the resource. This operation supports paging.\n *\n * ### Examples\n *\n * #### Async Iteration\n *\n * ```javascript\n * for await (const details of client.listDocumentClassifiers()) {\n * const {\n * classifierId, // The classifier's unique ID\n * description, // a textual description of the classifier, if provided during creation\n * docTypes, // information about the document types in the classifier and their corresponding traning data\n * } = details;\n * }\n * ```\n *\n * #### By Page\n *\n * ```javascript\n * // The listDocumentClassifiers method is paged, and you can iterate by page using the `byPage` method.\n * const pages = client.listDocumentClassifiers().byPage();\n *\n * for await (const page of pages) {\n * // Each page is an array of classifiers and can be iterated synchronously\n * for (const details of page) {\n * const {\n * classifierId, // The classifier's unique ID\n * description, // a textual description of the classifier, if provided during creation\n * docTypes, // information about the document types in the classifier and their corresponding traning data\n * } = details;\n * }\n * }\n * ```\n *\n * @param options - optional settings for the classifier requests\n * @returns an async iterable of classifier details that supports paging\n */\n public listDocumentClassifiers(\n options: ListModelsOptions = {}\n ): PagedAsyncIterableIterator<DocumentClassifierDetails> {\n return this._restClient.documentClassifiers.listClassifiers(options);\n }\n\n /**\n * Deletes a classifier with the given ID from the client's resource, if it exists. This operation CANNOT be reverted.\n *\n * ### Example\n *\n * ```javascript\n * await client.deleteDocumentClassifier(\"<classifier ID to delete>\"));\n * ```\n *\n * @param classifierId - the unique ID of the classifier to delete from the resource\n * @param options - optional settings for the request\n */\n public deleteDocumentClassifier(\n classifierId: string,\n options: OperationOptions = {}\n ): Promise<void> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.deleteDocumentClassifier\",\n options,\n (finalOptions) =>\n this._restClient.documentClassifiers.deleteClassifier(classifierId, finalOptions)\n );\n }\n\n // #endregion\n\n // #region Operations\n\n /**\n * Retrieves information about an operation (`OperationDetails`) by its ID.\n *\n * Operations represent non-analysis tasks, such as building, composing, or copying a model.\n *\n * @param operationId - the ID of the operation to query\n * @param options - optional settings for the request\n * @returns information about the operation with the given ID\n *\n * ### Example\n *\n * ```javascript\n * // The ID of the operation, which should be a GUID\n * const operationId = \"<operation GUID>\";\n *\n * const {\n * operationId, // identical to the operationId given when calling `getOperation`\n * kind, // the operation kind, one of \"documentModelBuild\", \"documentModelCompose\", or \"documentModelCopyTo\"\n * status, // the status of the operation, one of \"notStarted\", \"running\", \"failed\", \"succeeded\", or \"canceled\"\n * percentCompleted, // a number between 0 and 100 representing the progress of the operation\n * createdOn, // a Date object that reflects the time when the operation was started\n * lastUpdatedOn, // a Date object that reflects the time when the operation state was last modified\n * } = await client.getOperation(operationId);\n * ```\n */\n public getOperation(\n operationId: string,\n options: GetOperationOptions = {}\n ): Promise<OperationDetails> {\n return this._tracing.withSpan(\n \"DocumentModelAdministrationClient.getOperation\",\n options,\n (finalOptions) => this._restClient.miscellaneous.getOperation(operationId, finalOptions)\n );\n }\n\n /**\n * List model creation operations in the resource. This will produce all operations, including operations that failed\n * to create models successfully. This operation supports paging.\n *\n * ### Examples\n *\n * #### Async Iteration\n *\n * ```javascript\n * for await (const operation of client.listOperations()) {\n * const {\n * operationId, // the operation's GUID\n * status, // the operation status, one of \"notStarted\", \"running\", \"succeeded\", \"failed\", or \"canceled\"\n * percentCompleted // the progress of the operation, from 0 to 100\n * } = operation;\n * }\n * ```\n *\n * #### By Page\n *\n * ```javascript\n * // The listOperations method is paged, and you can iterate by page using the `byPage` method.\n * const pages = client.listOperations().byPage();\n *\n * for await (const page of pages) {\n * // Each page is an array of operation info objects and can be iterated synchronously\n * for (const operation of page) {\n * const {\n * operationId, // the operation's GUID\n * status, // the operation status, one of \"notStarted\", \"running\", \"succeeded\", \"failed\", or \"canceled\"\n * percentCompleted // the progress of the operation, from 0 to 100\n * } = operation;\n * }\n * }\n * ```\n *\n * @param options - optional settings for the operation requests\n * @returns an async iterable of operation information objects that supports paging\n */\n public listOperations(\n options: ListOperationsOptions = {}\n ): PagedAsyncIterableIterator<OperationSummary> {\n return this._restClient.miscellaneous.listOperations(options);\n }\n\n // #endregion\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;;;;GAMG;AACH,SAAS,MAAM,CAAC,KAA8B;IAC5C,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,KAAK,SAAS,EAAE;QAC5E,OAAO,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KACjC;IAED,OAAO,KAAmB,CAAC;AAC7B,CAAC;AAED;;;;;;GAMG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAkB5C;;;;OAIG;IACH,YAAY,mBAA+B;;QACzC,wEAAwE;QACxE,MAAM,CAAC,GAAG,MAAM,CAAC,mBAAmB,CAAC,CAAC;QACtC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAEjB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,MAAA,CAAC,CAAC,OAAO,mCAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ErrorModel, InnerError } from \"./generated\";\n\n/**\n * Returns the innermost error that has a message field.\n *\n * @internal\n * @param error - the error to unwrap\n * @returns - the innermost populated error\n */\nfunction unwrap(error: ErrorModel | InnerError): ErrorModel {\n if (error.innererror !== undefined && error.innererror.message !== undefined) {\n return unwrap(error.innererror);\n }\n\n return error as ErrorModel;\n}\n\n/**\n * A class representing an Error from the Form Recognizer Service.\n *\n * For information about the error codes the service produces, refer to the service's error documentation:\n *\n * https://aka.ms/azsdk/formrecognizer/errors\n */\nexport class FormRecognizerError extends Error {\n /**\n * The error code.\n *\n * Example: `InternalServerError`\n */\n public code: string;\n\n /**\n * A list of detailed errors that are related to this error.\n */\n public details: ErrorModel[];\n\n /**\n * The target of the error (the component or resource that the error refers to).\n */\n public target?: string;\n\n /**\n * Create a FormRecognizerError from a generated ErrorModel.\n * @internal\n * @hidden\n */\n constructor(formRecognizerError: ErrorModel) {\n // TODO: We used to unwrap FR errors this way, but is it still necessary\n const e = unwrap(formRecognizerError);\n super(e.message);\n\n this.code = e.code;\n this.details = e.details ?? [];\n this.target = e.target;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAM9D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,cAAc,CAAC;AAQtB,MAAM,OAAO,eAAgB,SAAQ,UAAU,CAAC,aAAa;IAK3D;;;;;OAKG;IACH,YA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AAC;yBACb;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACpD;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAKF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n DocumentModelsImpl,\n MiscellaneousImpl,\n DocumentClassifiersImpl\n} from \"./operations\";\nimport {\n DocumentModels,\n Miscellaneous,\n DocumentClassifiers\n} from \"./operationsInterfaces\";\nimport { StringIndexType, GeneratedClientOptionalParams } from \"./models\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n stringIndexType?: StringIndexType;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for\n * example: https://westus2.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-form-recognizer/5.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri:\n options.endpoint ?? options.baseUri ?? \"{endpoint}/formrecognizer\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-07-31\";\n this.documentModels = new DocumentModelsImpl(this);\n this.miscellaneous = new MiscellaneousImpl(this);\n this.documentClassifiers = new DocumentClassifiersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n documentModels: DocumentModels;\n miscellaneous: Miscellaneous;\n documentClassifiers: DocumentClassifiers;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,wBAAwB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\n/// <reference lib=\"esnext.asynciterable\" />\nexport * from \"./models\";\nexport { GeneratedClient } from \"./generatedClient\";\nexport * from \"./operationsInterfaces\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,sBAAsB,IAAI,4BAA4B,EACtD,yBAAyB,IAAI,+BAA+B,EAC5D,2BAA2B,IAAI,iCAAiC,EAChE,oBAAoB,IAAI,0BAA0B,EAClD,iBAAiB,IAAI,uBAAuB,EAC5C,8BAA8B,IAAI,oCAAoC,EACtE,uBAAuB,IAAI,6BAA6B,EACzD,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE;QACN,cAAc,EAAE,cAAc;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,aAAa,EAAE;gBACb,0BAA0B;gBAC1B,iBAAiB;gBACjB,2EAA2E;gBAC3E,mEAAmE;gBACnE,yEAAyE;gBACzE,WAAW;gBACX,YAAY;gBACZ,YAAY;gBACZ,WAAW;gBACX,Y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Ac,EAAE,cAAc;QAC9B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD,aAAa,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC;IAC7C,MAAM,EAAE;QACN,cAAc,EAAE,iBAAiB;QACjC,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAuB;IAClD,aAAa,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC;IAC7C,MAAM,EAAE;QACN,cAAc,EAAE,iBAAiB;QACjC,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAuB;IAClD,aAAa,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC;IAC7C,MAAM,EAAE,6BAA6B;CACtC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n AnalyzeDocumentRequest as AnalyzeDocumentRequestMapper,\n BuildDocumentModelRequest as BuildDocumentModelRequestMapper,\n ComposeDocumentModelRequest as ComposeDocumentModelRequestMapper,\n AuthorizeCopyRequest as AuthorizeCopyRequestMapper,\n CopyAuthorization as CopyAuthorizationMapper,\n BuildDocumentClassifierRequest as BuildDocumentClassifierRequestMapper,\n ClassifyDocumentRequest as ClassifyDocumentRequestMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: \"contentType\",\n mapper: {\n serializedName: \"Content-Type\",\n required: true,\n type: {\n name: \"Enum\",\n allowedValues: [\n \"application/octet-stream\",\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\n \"image/bmp\",\n \"image/heif\",\n \"image/jpeg\",\n \"image/png\",\n \"image/tiff\"\n ]\n }\n }\n};\n\nexport const analyzeRequest: OperationParameter = {\n parameterPath: [\"options\", \"analyzeRequest\"],\n mapper: {\n serializedName: \"analyzeRequest\",\n type: {\n name: \"Stream\"\n }\n }\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType1: OperationParameter = {\n parameterPath: \"contentType\",\n mapper: {\n defaultValue: \"text/html\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const analyzeRequest1: OperationParameter = {\n parameterPath: [\"options\", \"analyzeRequest\"],\n mapper: {\n serializedName: \"analyzeRequest\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const accept1: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType2: OperationParameter = {\n parameterPath: \"contentType\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const analyzeRequest2: OperationParameter = {\n parameterPath: [\"options\", \"analyzeRequest\"],\n mapper: AnalyzeDocumentRequestMapper\n};\n\nexport const accept2: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const modelId: OperationURLParameter = {\n parameterPath: \"modelId\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$\"),\n MaxLength: 64\n },\n serializedName: \"modelId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const pages: OperationQueryParameter = {\n parameterPath: [\"options\", \"pages\"],\n mapper: {\n constraints: {\n Pattern: new RegExp(\"^(\\\\d+(-\\\\d+)?)(,\\\\s*(\\\\d+(-\\\\d+)?))*$\")\n },\n serializedName: \"pages\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const locale: OperationQueryParameter = {\n parameterPath: [\"options\", \"locale\"],\n mapper: {\n serializedName: \"locale\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const stringIndexType: OperationQueryParameter = {\n parameterPath: \"stringIndexType\",\n mapper: {\n serializedName: \"stringIndexType\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2023-07-31\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const features: OperationQueryParameter = {\n parameterPath: [\"options\", \"features\"],\n mapper: {\n serializedName: \"features\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n collectionFormat: \"CSV\"\n};\n\nexport const resultId: OperationURLParameter = {\n parameterPath: \"resultId\",\n mapper: {\n serializedName: \"resultId\",\n required: true,\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const contentType3: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const buildRequest: OperationParameter = {\n parameterPath: \"buildRequest\",\n mapper: BuildDocumentModelRequestMapper\n};\n\nexport const composeRequest: OperationParameter = {\n parameterPath: \"composeRequest\",\n mapper: ComposeDocumentModelRequestMapper\n};\n\nexport const authorizeCopyRequest: OperationParameter = {\n parameterPath: \"authorizeCopyRequest\",\n mapper: AuthorizeCopyRequestMapper\n};\n\nexport const copyToRequest: OperationParameter = {\n parameterPath: \"copyToRequest\",\n mapper: CopyAuthorizationMapper\n};\n\nexport const nextLink: OperationURLParameter = {\n parameterPath: \"nextLink\",\n mapper: {\n serializedName: \"nextLink\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const operationId: OperationURLParameter = {\n parameterPath: \"operationId\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\n \"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\"\n ),\n MaxLength: 36\n },\n serializedName: \"operationId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const buildRequest1: OperationParameter = {\n parameterPath: \"buildRequest\",\n mapper: BuildDocumentClassifierRequestMapper\n};\n\nexport const classifierId: OperationURLParameter = {\n parameterPath: \"classifierId\",\n mapper: {\n constraints: {\n Pattern: new RegExp(\"^[a-zA-Z0-9][a-zA-Z0-9._~-]{1,63}$\"),\n MaxLength: 64\n },\n serializedName: \"classifierId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const classifyRequest: OperationParameter = {\n parameterPath: [\"options\", \"classifyRequest\"],\n mapper: {\n serializedName: \"classifyRequest\",\n type: {\n name: \"Stream\"\n }\n }\n};\n\nexport const classifyRequest1: OperationParameter = {\n parameterPath: [\"options\", \"classifyRequest\"],\n mapper: {\n serializedName: \"classifyRequest\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const classifyRequest2: OperationParameter = {\n parameterPath: [\"options\", \"classifyRequest\"],\n mapper: ClassifyDocumentRequestMapper\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentClassifiers.js","sourceRoot":"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,CAAC,YAAY,CAAC;IAC7D,gBAAgB,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,OAAO,CAAC;IAC/D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,8BAA8B,GAA6B;IAC/D,IAAI,EAAE,+DAA+D;IACrE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC;AACF,MAAM,gCAAgC,GAA6B;IACjE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { DocumentClassifiers } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n DocumentClassifierDetails,\n DocumentClassifiersListClassifiersNextOptionalParams,\n DocumentClassifiersListClassifiersOptionalParams,\n BuildDocumentClassifierRequest,\n DocumentClassifiersBuildClassifierOptionalParams,\n DocumentClassifiersBuildClassifierResponse,\n DocumentClassifiersListClassifiersResponse,\n DocumentClassifiersGetClassifierOptionalParams,\n DocumentClassifiersGetClassifierResponse,\n DocumentClassifiersDeleteClassifierOptionalParams,\n ContentType,\n DocumentClassifiersClassifyDocument$binaryOptionalParams,\n DocumentClassifiersClassifyDocument$textOptionalParams,\n DocumentClassifiersClassifyDocument$jsonOptionalParams,\n DocumentClassifiersClassifyDocumentResponse,\n DocumentClassifiersGetClassifyResultOptionalParams,\n DocumentClassifiersGetClassifyResultResponse,\n DocumentClassifiersListClassifiersNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DocumentClassifiers operations. */\nexport class DocumentClassifiersImpl implements DocumentClassifiers {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class DocumentClassifiers class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * List all document classifiers.\n * @param options The options parameters.\n */\n public listClassifiers(\n options?: DocumentClassifiersListClassifiersOptionalParams\n ): PagedAsyncIterableIterator<DocumentClassifierDetails> {\n const iter = this.listClassifiersPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listClassifiersPagingPage(options);\n }\n };\n }\n\n private async *listClassifiersPagingPage(\n options?: DocumentClassifiersListClassifiersOptionalParams\n ): AsyncIterableIterator<DocumentClassifierDetails[]> {\n let result = await this._listClassifiers(options);\n yield result.value || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._listClassifiersNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.value || [];\n }\n }\n\n private async *listClassifiersPagingAll(\n options?: DocumentClassifiersListClassifiersOptionalParams\n ): AsyncIterableIterator<DocumentClassifierDetails> {\n for await (const page of this.listClassifiersPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Builds a custom document classifier.\n * @param buildRequest Building request parameters.\n * @param options The options parameters.\n */\n buildClassifier(\n buildRequest: BuildDocumentClassifierRequest,\n options?: DocumentClassifiersBuildClassifierOptionalParams\n ): Promise<DocumentClassifiersBuildClassifierResponse> {\n return this.client.sendOperationRequest(\n { buildRequest, options },\n buildClassifierOperationSpec\n );\n }\n\n /**\n * List all document classifiers.\n * @param options The options parameters.\n */\n private _listClassifiers(\n options?: DocumentClassifiersListClassifiersOptionalParams\n ): Promise<DocumentClassifiersListClassifiersResponse> {\n return this.client.sendOperationRequest(\n { options },\n listClassifiersOperationSpec\n );\n }\n\n /**\n * Gets detailed document classifier information.\n * @param classifierId Unique document classifier name.\n * @param options The options parameters.\n */\n getClassifier(\n classifierId: string,\n options?: DocumentClassifiersGetClassifierOptionalParams\n ): Promise<DocumentClassifiersGetClassifierResponse> {\n return this.client.sendOperationRequest(\n { classifierId, options },\n getClassifierOperationSpec\n );\n }\n\n /**\n * Deletes document classifier.\n * @param classifierId Unique document classifier name.\n * @param options The options parameters.\n */\n deleteClassifier(\n classifierId: string,\n options?: DocumentClassifiersDeleteClassifierOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { classifierId, options },\n deleteClassifierOperationSpec\n );\n }\n\n /**\n * Classifies document with document classifier.\n * @param classifierId Unique document classifier name.\n * @param contentType Upload file type\n * @param options The options parameters.\n */\n classifyDocument(\n classifierId: string,\n contentType: ContentType,\n options?: DocumentClassifiersClassifyDocument$binaryOptionalParams\n ): Promise<DocumentClassifiersClassifyDocumentResponse>;\n /**\n * Classifies document with document classifier.\n * @param classifierId Unique document classifier name.\n * @param contentType Upload file type\n * @param options The options parameters.\n */\n classifyDocument(\n classifierId: string,\n contentType: \"text/html\",\n options?: DocumentClassifiersClassifyDocument$textOptionalParams\n ): Promise<DocumentClassifiersClassifyDocumentResponse>;\n /**\n * Classifies document with document classifier.\n * @param classifierId Unique document classifier name.\n * @param contentType Body Parameter content-type\n * @param options The options parameters.\n */\n classifyDocument(\n classifierId: string,\n contentType: \"application/json\",\n options?: DocumentClassifiersClassifyDocument$jsonOptionalParams\n ): Promise<DocumentClassifiersClassifyDocumentResponse>;\n /**\n * Classifies document with document classifier.\n * @param args Includes all the parameters for this operation.\n */\n classifyDocument(\n ...args:\n | [\n string,\n ContentType,\n DocumentClassifiersClassifyDocument$binaryOptionalParams?\n ]\n | [\n string,\n \"text/html\",\n DocumentClassifiersClassifyDocument$textOptionalParams?\n ]\n | [\n string,\n \"application/json\",\n DocumentClassifiersClassifyDocument$jsonOptionalParams?\n ]\n ): Promise<DocumentClassifiersClassifyDocumentResponse> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[1] === \"application/octet-stream\" ||\n args[1] === \"application/pdf\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" ||\n args[1] === \"image/bmp\" ||\n args[1] === \"image/heif\" ||\n args[1] === \"image/jpeg\" ||\n args[1] === \"image/png\" ||\n args[1] === \"image/tiff\"\n ) {\n operationSpec = classifyDocument$binaryOperationSpec;\n operationArguments = {\n classifierId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else if (args[1] === \"text/html\") {\n operationSpec = classifyDocument$textOperationSpec;\n operationArguments = {\n classifierId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else if (args[1] === \"application/json\") {\n operationSpec = classifyDocument$jsonOperationSpec;\n operationArguments = {\n classifierId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[1]}\".`\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Gets the result of document classifier.\n * @param classifierId Unique document classifier name.\n * @param resultId Analyze operation result ID.\n * @param options The options parameters.\n */\n getClassifyResult(\n classifierId: string,\n resultId: string,\n options?: DocumentClassifiersGetClassifyResultOptionalParams\n ): Promise<DocumentClassifiersGetClassifyResultResponse> {\n return this.client.sendOperationRequest(\n { classifierId, resultId, options },\n getClassifyResultOperationSpec\n );\n }\n\n /**\n * ListClassifiersNext\n * @param nextLink The nextLink from the previous successful call to the ListClassifiers method.\n * @param options The options parameters.\n */\n private _listClassifiersNext(\n nextLink: string,\n options?: DocumentClassifiersListClassifiersNextOptionalParams\n ): Promise<DocumentClassifiersListClassifiersNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listClassifiersNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst buildClassifierOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers:build\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentClassifiersBuildClassifierHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.buildRequest1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2, Parameters.contentType3],\n mediaType: \"json\",\n serializer\n};\nconst listClassifiersOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetDocumentClassifiersResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst getClassifierOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DocumentClassifierDetails\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.classifierId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst deleteClassifierOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.classifierId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst classifyDocument$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentClassifiersClassifyDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.classifyRequest,\n queryParameters: [Parameters.stringIndexType, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.classifierId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"binary\",\n serializer\n};\nconst classifyDocument$textOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentClassifiersClassifyDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.classifyRequest1,\n queryParameters: [Parameters.stringIndexType, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.classifierId],\n headerParameters: [Parameters.contentType1, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\nconst classifyDocument$jsonOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentClassifiersClassifyDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.classifyRequest2,\n queryParameters: [Parameters.stringIndexType, Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.classifierId],\n headerParameters: [Parameters.contentType2, Parameters.accept2],\n mediaType: \"json\",\n serializer\n};\nconst getClassifyResultOperationSpec: coreClient.OperationSpec = {\n path: \"/documentClassifiers/{classifierId}/analyzeResults/{resultId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResultOperation\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.resultId,\n Parameters.classifierId\n ],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst listClassifiersNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetDocumentClassifiersResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept2],\n serializer\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentModels.js","sourceRoot":"","sources":["../../../../src/generated/operations/documentModels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAgCnD,4CAA4C;AAC5C,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,UAAU,CACf,OAAgD;QAEhD,MAAM,I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AG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { DocumentModels } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n DocumentModelSummary,\n DocumentModelsListModelsNextOptionalParams,\n DocumentModelsListModelsOptionalParams,\n ContentType,\n DocumentModelsAnalyzeDocument$binaryOptionalParams,\n DocumentModelsAnalyzeDocument$textOptionalParams,\n DocumentModelsAnalyzeDocument$jsonOptionalParams,\n DocumentModelsAnalyzeDocumentResponse,\n DocumentModelsGetAnalyzeResultOptionalParams,\n DocumentModelsGetAnalyzeResultResponse,\n BuildDocumentModelRequest,\n DocumentModelsBuildModelOptionalParams,\n DocumentModelsBuildModelResponse,\n ComposeDocumentModelRequest,\n DocumentModelsComposeModelOptionalParams,\n DocumentModelsComposeModelResponse,\n AuthorizeCopyRequest,\n DocumentModelsAuthorizeModelCopyOptionalParams,\n DocumentModelsAuthorizeModelCopyResponse,\n CopyAuthorization,\n DocumentModelsCopyModelToOptionalParams,\n DocumentModelsCopyModelToResponse,\n DocumentModelsListModelsResponse,\n DocumentModelsGetModelOptionalParams,\n DocumentModelsGetModelResponse,\n DocumentModelsDeleteModelOptionalParams,\n DocumentModelsListModelsNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing DocumentModels operations. */\nexport class DocumentModelsImpl implements DocumentModels {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class DocumentModels class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * List all document models\n * @param options The options parameters.\n */\n public listModels(\n options?: DocumentModelsListModelsOptionalParams\n ): PagedAsyncIterableIterator<DocumentModelSummary> {\n const iter = this.listModelsPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listModelsPagingPage(options);\n }\n };\n }\n\n private async *listModelsPagingPage(\n options?: DocumentModelsListModelsOptionalParams\n ): AsyncIterableIterator<DocumentModelSummary[]> {\n let result = await this._listModels(options);\n yield result.value || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._listModelsNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.value || [];\n }\n }\n\n private async *listModelsPagingAll(\n options?: DocumentModelsListModelsOptionalParams\n ): AsyncIterableIterator<DocumentModelSummary> {\n for await (const page of this.listModelsPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Analyzes document with document model.\n * @param modelId Unique document model name.\n * @param contentType Upload file type\n * @param options The options parameters.\n */\n analyzeDocument(\n modelId: string,\n contentType: ContentType,\n options?: DocumentModelsAnalyzeDocument$binaryOptionalParams\n ): Promise<DocumentModelsAnalyzeDocumentResponse>;\n /**\n * Analyzes document with document model.\n * @param modelId Unique document model name.\n * @param contentType Upload file type\n * @param options The options parameters.\n */\n analyzeDocument(\n modelId: string,\n contentType: \"text/html\",\n options?: DocumentModelsAnalyzeDocument$textOptionalParams\n ): Promise<DocumentModelsAnalyzeDocumentResponse>;\n /**\n * Analyzes document with document model.\n * @param modelId Unique document model name.\n * @param contentType Body Parameter content-type\n * @param options The options parameters.\n */\n analyzeDocument(\n modelId: string,\n contentType: \"application/json\",\n options?: DocumentModelsAnalyzeDocument$jsonOptionalParams\n ): Promise<DocumentModelsAnalyzeDocumentResponse>;\n /**\n * Analyzes document with document model.\n * @param args Includes all the parameters for this operation.\n */\n analyzeDocument(\n ...args:\n | [\n string,\n ContentType,\n DocumentModelsAnalyzeDocument$binaryOptionalParams?\n ]\n | [string, \"text/html\", DocumentModelsAnalyzeDocument$textOptionalParams?]\n | [\n string,\n \"application/json\",\n DocumentModelsAnalyzeDocument$jsonOptionalParams?\n ]\n ): Promise<DocumentModelsAnalyzeDocumentResponse> {\n let operationSpec: coreClient.OperationSpec;\n let operationArguments: coreClient.OperationArguments;\n let options;\n if (\n args[1] === \"application/octet-stream\" ||\n args[1] === \"application/pdf\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.presentationml.presentation\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\" ||\n args[1] ===\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" ||\n args[1] === \"image/bmp\" ||\n args[1] === \"image/heif\" ||\n args[1] === \"image/jpeg\" ||\n args[1] === \"image/png\" ||\n args[1] === \"image/tiff\"\n ) {\n operationSpec = analyzeDocument$binaryOperationSpec;\n operationArguments = {\n modelId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else if (args[1] === \"text/html\") {\n operationSpec = analyzeDocument$textOperationSpec;\n operationArguments = {\n modelId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else if (args[1] === \"application/json\") {\n operationSpec = analyzeDocument$jsonOperationSpec;\n operationArguments = {\n modelId: args[0],\n contentType: args[1],\n options: args[2]\n };\n options = args[2];\n } else {\n throw new TypeError(\n `\"contentType\" must be a valid value but instead was \"${args[1]}\".`\n );\n }\n operationArguments.options = options || {};\n return this.client.sendOperationRequest(operationArguments, operationSpec);\n }\n\n /**\n * Gets the result of document analysis.\n * @param modelId Unique document model name.\n * @param resultId Analyze operation result ID.\n * @param options The options parameters.\n */\n getAnalyzeResult(\n modelId: string,\n resultId: string,\n options?: DocumentModelsGetAnalyzeResultOptionalParams\n ): Promise<DocumentModelsGetAnalyzeResultResponse> {\n return this.client.sendOperationRequest(\n { modelId, resultId, options },\n getAnalyzeResultOperationSpec\n );\n }\n\n /**\n * Builds a custom document analysis model.\n * @param buildRequest Building request parameters.\n * @param options The options parameters.\n */\n buildModel(\n buildRequest: BuildDocumentModelRequest,\n options?: DocumentModelsBuildModelOptionalParams\n ): Promise<DocumentModelsBuildModelResponse> {\n return this.client.sendOperationRequest(\n { buildRequest, options },\n buildModelOperationSpec\n );\n }\n\n /**\n * Creates a new document model from document types of existing document models.\n * @param composeRequest Compose request parameters.\n * @param options The options parameters.\n */\n composeModel(\n composeRequest: ComposeDocumentModelRequest,\n options?: DocumentModelsComposeModelOptionalParams\n ): Promise<DocumentModelsComposeModelResponse> {\n return this.client.sendOperationRequest(\n { composeRequest, options },\n composeModelOperationSpec\n );\n }\n\n /**\n * Generates authorization to copy a document model to this location with specified modelId and\n * optional description.\n * @param authorizeCopyRequest Authorize copy request parameters.\n * @param options The options parameters.\n */\n authorizeModelCopy(\n authorizeCopyRequest: AuthorizeCopyRequest,\n options?: DocumentModelsAuthorizeModelCopyOptionalParams\n ): Promise<DocumentModelsAuthorizeModelCopyResponse> {\n return this.client.sendOperationRequest(\n { authorizeCopyRequest, options },\n authorizeModelCopyOperationSpec\n );\n }\n\n /**\n * Copies document model to the target resource, region, and modelId.\n * @param modelId Unique document model name.\n * @param copyToRequest Copy to request parameters.\n * @param options The options parameters.\n */\n copyModelTo(\n modelId: string,\n copyToRequest: CopyAuthorization,\n options?: DocumentModelsCopyModelToOptionalParams\n ): Promise<DocumentModelsCopyModelToResponse> {\n return this.client.sendOperationRequest(\n { modelId, copyToRequest, options },\n copyModelToOperationSpec\n );\n }\n\n /**\n * List all document models\n * @param options The options parameters.\n */\n private _listModels(\n options?: DocumentModelsListModelsOptionalParams\n ): Promise<DocumentModelsListModelsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listModelsOperationSpec\n );\n }\n\n /**\n * Gets detailed document model information.\n * @param modelId Unique document model name.\n * @param options The options parameters.\n */\n getModel(\n modelId: string,\n options?: DocumentModelsGetModelOptionalParams\n ): Promise<DocumentModelsGetModelResponse> {\n return this.client.sendOperationRequest(\n { modelId, options },\n getModelOperationSpec\n );\n }\n\n /**\n * Deletes document model.\n * @param modelId Unique document model name.\n * @param options The options parameters.\n */\n deleteModel(\n modelId: string,\n options?: DocumentModelsDeleteModelOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { modelId, options },\n deleteModelOperationSpec\n );\n }\n\n /**\n * ListModelsNext\n * @param nextLink The nextLink from the previous successful call to the ListModels method.\n * @param options The options parameters.\n */\n private _listModelsNext(\n nextLink: string,\n options?: DocumentModelsListModelsNextOptionalParams\n ): Promise<DocumentModelsListModelsNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listModelsNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst analyzeDocument$binaryOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsAnalyzeDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.analyzeRequest,\n queryParameters: [\n Parameters.pages,\n Parameters.locale,\n Parameters.stringIndexType,\n Parameters.apiVersion,\n Parameters.features\n ],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"binary\",\n serializer\n};\nconst analyzeDocument$textOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsAnalyzeDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.analyzeRequest1,\n queryParameters: [\n Parameters.pages,\n Parameters.locale,\n Parameters.stringIndexType,\n Parameters.apiVersion,\n Parameters.features\n ],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.contentType1, Parameters.accept1],\n mediaType: \"text\",\n serializer\n};\nconst analyzeDocument$jsonOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}:analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsAnalyzeDocumentHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.analyzeRequest2,\n queryParameters: [\n Parameters.pages,\n Parameters.locale,\n Parameters.stringIndexType,\n Parameters.apiVersion,\n Parameters.features\n ],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.contentType2, Parameters.accept2],\n mediaType: \"json\",\n serializer\n};\nconst getAnalyzeResultOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}/analyzeResults/{resultId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResultOperation\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.modelId, Parameters.resultId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst buildModelOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels:build\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsBuildModelHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.buildRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2, Parameters.contentType3],\n mediaType: \"json\",\n serializer\n};\nconst composeModelOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels:compose\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsComposeModelHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.composeRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2, Parameters.contentType3],\n mediaType: \"json\",\n serializer\n};\nconst authorizeModelCopyOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels:authorizeCopy\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CopyAuthorization\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.authorizeCopyRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2, Parameters.contentType3],\n mediaType: \"json\",\n serializer\n};\nconst copyModelToOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}:copyTo\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.DocumentModelsCopyModelToHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.copyToRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.accept2, Parameters.contentType3],\n mediaType: \"json\",\n serializer\n};\nconst listModelsOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetDocumentModelsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst getModelOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.DocumentModelDetails\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst deleteModelOperationSpec: coreClient.OperationSpec = {\n path: \"/documentModels/{modelId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.modelId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst listModelsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetDocumentModelsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept2],\n serializer\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../../../src/generated/operations/miscellaneous.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAcnD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAM,OAAO,iBAAiB;IAG5B;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,cAAc,CACnB,OAAmD;QAEnD,MAAM,IAAI,GAAG,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;QACnD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,GAAG,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EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC;AACF,MAAM,+BAA+B,GAA6B;IAChE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { Miscellaneous } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { GeneratedClient } from \"../generatedClient\";\nimport {\n OperationSummary,\n MiscellaneousListOperationsNextOptionalParams,\n MiscellaneousListOperationsOptionalParams,\n MiscellaneousListOperationsResponse,\n MiscellaneousGetOperationOptionalParams,\n MiscellaneousGetOperationResponse,\n MiscellaneousGetResourceInfoOptionalParams,\n MiscellaneousGetResourceInfoResponse,\n MiscellaneousListOperationsNextResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Miscellaneous operations. */\nexport class MiscellaneousImpl implements Miscellaneous {\n private readonly client: GeneratedClient;\n\n /**\n * Initialize a new instance of the class Miscellaneous class.\n * @param client Reference to the service client\n */\n constructor(client: GeneratedClient) {\n this.client = client;\n }\n\n /**\n * Lists all operations.\n * @param options The options parameters.\n */\n public listOperations(\n options?: MiscellaneousListOperationsOptionalParams\n ): PagedAsyncIterableIterator<OperationSummary> {\n const iter = this.listOperationsPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: () => {\n return this.listOperationsPagingPage(options);\n }\n };\n }\n\n private async *listOperationsPagingPage(\n options?: MiscellaneousListOperationsOptionalParams\n ): AsyncIterableIterator<OperationSummary[]> {\n let result = await this._listOperations(options);\n yield result.value || [];\n let continuationToken = result.nextLink;\n while (continuationToken) {\n result = await this._listOperationsNext(continuationToken, options);\n continuationToken = result.nextLink;\n yield result.value || [];\n }\n }\n\n private async *listOperationsPagingAll(\n options?: MiscellaneousListOperationsOptionalParams\n ): AsyncIterableIterator<OperationSummary> {\n for await (const page of this.listOperationsPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all operations.\n * @param options The options parameters.\n */\n private _listOperations(\n options?: MiscellaneousListOperationsOptionalParams\n ): Promise<MiscellaneousListOperationsResponse> {\n return this.client.sendOperationRequest(\n { options },\n listOperationsOperationSpec\n );\n }\n\n /**\n * Gets operation info.\n * @param operationId Unique operation ID.\n * @param options The options parameters.\n */\n getOperation(\n operationId: string,\n options?: MiscellaneousGetOperationOptionalParams\n ): Promise<MiscellaneousGetOperationResponse> {\n return this.client.sendOperationRequest(\n { operationId, options },\n getOperationOperationSpec\n );\n }\n\n /**\n * Return information about the current resource.\n * @param options The options parameters.\n */\n getResourceInfo(\n options?: MiscellaneousGetResourceInfoOptionalParams\n ): Promise<MiscellaneousGetResourceInfoResponse> {\n return this.client.sendOperationRequest(\n { options },\n getResourceInfoOperationSpec\n );\n }\n\n /**\n * ListOperationsNext\n * @param nextLink The nextLink from the previous successful call to the ListOperations method.\n * @param options The options parameters.\n */\n private _listOperationsNext(\n nextLink: string,\n options?: MiscellaneousListOperationsNextOptionalParams\n ): Promise<MiscellaneousListOperationsNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listOperationsNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetOperationsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst getOperationOperationSpec: coreClient.OperationSpec = {\n path: \"/operations/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationDetails\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.operationId],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst getResourceInfoOperationSpec: coreClient.OperationSpec = {\n path: \"/info\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ResourceDetails\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept2],\n serializer\n};\nconst listOperationsNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetOperationsResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.nextLink],\n headerParameters: [Parameters.accept2],\n serializer\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentClassifiers.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/documentClassifiers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n DocumentClassifierDetails,\n DocumentClassifiersListClassifiersOptionalParams,\n BuildDocumentClassifierRequest,\n DocumentClassifiersBuildClassifierOptionalParams,\n DocumentClassifiersBuildClassifierResponse,\n DocumentClassifiersGetClassifierOptionalParams,\n DocumentClassifiersGetClassifierResponse,\n DocumentClassifiersDeleteClassifierOptionalParams,\n ContentType,\n DocumentClassifiersClassifyDocument$binaryOptionalParams,\n DocumentClassifiersClassifyDocument$textOptionalParams,\n DocumentClassifiersClassifyDocument$jsonOptionalParams,\n DocumentClassifiersClassifyDocumentResponse,\n DocumentClassifiersGetClassifyResultOptionalParams,\n DocumentClassifiersGetClassifyResultResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a DocumentClassifiers. */\nexport interface DocumentClassifiers {\n /**\n * List all document classifiers.\n * @param options The options parameters.\n */\n listClassifiers(\n options?: DocumentClassifiersListClassifiersOptionalParams\n ): PagedAsyncIterableIterator<DocumentClassifierDetails>;\n /**\n * Builds a custom document classifier.\n * @param buildRequest Building request parameters.\n * @param options The options parameters.\n */\n buildClassifier(\n buildRequest: BuildDocumentClassifierRequest,\n options?: DocumentClassifiersBuildClassifierOptionalParams\n ): Promise<DocumentClassifiersBuildClassifierResponse>;\n /**\n * Gets detailed document classifier information.\n * @param classifierId Unique document classifier name.\n * @param options The options parameters.\n */\n getClassifier(\n classifierId: string,\n options?: DocumentClassifiersGetClassifierOptionalParams\n ): Promise<DocumentClassifiersGetClassifierResponse>;\n /**\n * Deletes document classifier.\n * @param classifierId Unique document classifier name.\n * @param options The options parameters.\n */\n deleteClassifier(\n classifierId: string,\n options?: DocumentClassifiersDeleteClassifierOptionalParams\n ): Promise<void>;\n /**\n * Classifies document with document classifier.\n * @param args Includes all the parameters for this operation.\n */\n classifyDocument(\n ...args:\n | [\n string,\n ContentType,\n DocumentClassifiersClassifyDocument$binaryOptionalParams?\n ]\n | [\n string,\n \"text/html\",\n DocumentClassifiersClassifyDocument$textOptionalParams?\n ]\n | [\n string,\n \"application/json\",\n DocumentClassifiersClassifyDocument$jsonOptionalParams?\n ]\n ): Promise<DocumentClassifiersClassifyDocumentResponse>;\n /**\n * Gets the result of document classifier.\n * @param classifierId Unique document classifier name.\n * @param resultId Analyze operation result ID.\n * @param options The options parameters.\n */\n getClassifyResult(\n classifierId: string,\n resultId: string,\n options?: DocumentClassifiersGetClassifyResultOptionalParams\n ): Promise<DocumentClassifiersGetClassifyResultResponse>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"documentModels.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/documentModels.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n DocumentModelSummary,\n DocumentModelsListModelsOptionalParams,\n ContentType,\n DocumentModelsAnalyzeDocument$binaryOptionalParams,\n DocumentModelsAnalyzeDocument$textOptionalParams,\n DocumentModelsAnalyzeDocument$jsonOptionalParams,\n DocumentModelsAnalyzeDocumentResponse,\n DocumentModelsGetAnalyzeResultOptionalParams,\n DocumentModelsGetAnalyzeResultResponse,\n BuildDocumentModelRequest,\n DocumentModelsBuildModelOptionalParams,\n DocumentModelsBuildModelResponse,\n ComposeDocumentModelRequest,\n DocumentModelsComposeModelOptionalParams,\n DocumentModelsComposeModelResponse,\n AuthorizeCopyRequest,\n DocumentModelsAuthorizeModelCopyOptionalParams,\n DocumentModelsAuthorizeModelCopyResponse,\n CopyAuthorization,\n DocumentModelsCopyModelToOptionalParams,\n DocumentModelsCopyModelToResponse,\n DocumentModelsGetModelOptionalParams,\n DocumentModelsGetModelResponse,\n DocumentModelsDeleteModelOptionalParams\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a DocumentModels. */\nexport interface DocumentModels {\n /**\n * List all document models\n * @param options The options parameters.\n */\n listModels(\n options?: DocumentModelsListModelsOptionalParams\n ): PagedAsyncIterableIterator<DocumentModelSummary>;\n /**\n * Analyzes document with document model.\n * @param args Includes all the parameters for this operation.\n */\n analyzeDocument(\n ...args:\n | [\n string,\n ContentType,\n DocumentModelsAnalyzeDocument$binaryOptionalParams?\n ]\n | [string, \"text/html\", DocumentModelsAnalyzeDocument$textOptionalParams?]\n | [\n string,\n \"application/json\",\n DocumentModelsAnalyzeDocument$jsonOptionalParams?\n ]\n ): Promise<DocumentModelsAnalyzeDocumentResponse>;\n /**\n * Gets the result of document analysis.\n * @param modelId Unique document model name.\n * @param resultId Analyze operation result ID.\n * @param options The options parameters.\n */\n getAnalyzeResult(\n modelId: string,\n resultId: string,\n options?: DocumentModelsGetAnalyzeResultOptionalParams\n ): Promise<DocumentModelsGetAnalyzeResultResponse>;\n /**\n * Builds a custom document analysis model.\n * @param buildRequest Building request parameters.\n * @param options The options parameters.\n */\n buildModel(\n buildRequest: BuildDocumentModelRequest,\n options?: DocumentModelsBuildModelOptionalParams\n ): Promise<DocumentModelsBuildModelResponse>;\n /**\n * Creates a new document model from document types of existing document models.\n * @param composeRequest Compose request parameters.\n * @param options The options parameters.\n */\n composeModel(\n composeRequest: ComposeDocumentModelRequest,\n options?: DocumentModelsComposeModelOptionalParams\n ): Promise<DocumentModelsComposeModelResponse>;\n /**\n * Generates authorization to copy a document model to this location with specified modelId and\n * optional description.\n * @param authorizeCopyRequest Authorize copy request parameters.\n * @param options The options parameters.\n */\n authorizeModelCopy(\n authorizeCopyRequest: AuthorizeCopyRequest,\n options?: DocumentModelsAuthorizeModelCopyOptionalParams\n ): Promise<DocumentModelsAuthorizeModelCopyResponse>;\n /**\n * Copies document model to the target resource, region, and modelId.\n * @param modelId Unique document model name.\n * @param copyToRequest Copy to request parameters.\n * @param options The options parameters.\n */\n copyModelTo(\n modelId: string,\n copyToRequest: CopyAuthorization,\n options?: DocumentModelsCopyModelToOptionalParams\n ): Promise<DocumentModelsCopyModelToResponse>;\n /**\n * Gets detailed document model information.\n * @param modelId Unique document model name.\n * @param options The options parameters.\n */\n getModel(\n modelId: string,\n options?: DocumentModelsGetModelOptionalParams\n ): Promise<DocumentModelsGetModelResponse>;\n /**\n * Deletes document model.\n * @param modelId Unique document model name.\n * @param options The options parameters.\n */\n deleteModel(\n modelId: string,\n options?: DocumentModelsDeleteModelOptionalParams\n ): Promise<void>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/miscellaneous.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n OperationSummary,\n MiscellaneousListOperationsOptionalParams,\n MiscellaneousGetOperationOptionalParams,\n MiscellaneousGetOperationResponse,\n MiscellaneousGetResourceInfoOptionalParams,\n MiscellaneousGetResourceInfoResponse\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a Miscellaneous. */\nexport interface Miscellaneous {\n /**\n * Lists all operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: MiscellaneousListOperationsOptionalParams\n ): PagedAsyncIterableIterator<OperationSummary>;\n /**\n * Gets operation info.\n * @param operationId Unique operation ID.\n * @param options The options parameters.\n */\n getOperation(\n operationId: string,\n options?: MiscellaneousGetOperationOptionalParams\n ): Promise<MiscellaneousGetOperationResponse>;\n /**\n * Return information about the current resource.\n * @param options The options parameters.\n */\n getResourceInfo(\n options?: MiscellaneousGetResourceInfoOptionalParams\n ): Promise<MiscellaneousGetResourceInfoResponse>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO;AAwCL,iBAAiB;AACjB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAgBrB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)\n * uses cloud-based machine learning to extract structured data from form documents.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { DocumentAnalysisClient } from \"./documentAnalysisClient\";\nexport { DocumentModelAdministrationClient } from \"./documentModelAdministrationClient\";\nexport {\n // Generated types used verbatim\n AddressValue,\n CopyAuthorization,\n CurrencyValue,\n DocumentTypeDetails,\n DocumentBuildMode,\n DocumentFieldSchema,\n DocumentFieldType,\n DocumentSignatureType,\n DocumentSpan,\n DocumentLanguage,\n DocumentStyle,\n FontStyle,\n FontWeight,\n DocumentTableCellKind,\n LengthUnit,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationKind,\n OperationStatus,\n ResourceDetails,\n CustomDocumentModelsDetails,\n AnalyzeResultOperationStatus,\n SelectionMarkState,\n ParagraphRole,\n OperationDetails,\n ErrorModel,\n InnerError,\n OperationDetailsUnion,\n DocumentModelBuildOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentClassifierBuildOperationDetails,\n DocumentClassifierDetails,\n ClassifierDocumentTypeDetails,\n DocumentBarcodeKind,\n DocumentFormulaKind,\n QuotaDetails,\n // KnownXYZ enums\n KnownDocumentBuildMode,\n KnownDocumentFieldType,\n KnownDocumentBarcodeKind,\n KnownDocumentFormulaKind,\n KnownDocumentSignatureType,\n KnownDocumentTableCellKind,\n KnownFontStyle,\n KnownFontWeight,\n KnownLengthUnit,\n KnownOperationKind,\n KnownParagraphRole,\n KnownSelectionMarkState,\n} from \"./generated\";\nexport {\n AnalysisPoller,\n AnalyzeResult,\n AnalyzeResultCommon,\n DocumentAnalysisPollOperationState,\n AnalyzedDocument,\n FormRecognizerRequestBody,\n} from \"./lro/analysis\";\nexport {\n DocumentModelPoller,\n DocumentClassifierPoller,\n DocumentModelOperationState,\n DocumentClassifierOperationState,\n ModelAdministrationOperationStateCommon,\n} from \"./lro/administration\";\nexport * from \"./models\";\nexport * from \"./options\";\nexport * from \"./documentModel\";\nexport { Point2D } from \"./transforms/polygon\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"administration.js","sourceRoot":"","sources":["../../../src/lro/administration.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA2F/C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,QAA6C;;IAE7C,OAAO;QACL,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,UAAU,EAAE,QAAQ,CAAC,UAAU;QAC/B,gBAAgB,EAAE,MAAA,QAAQ,CAAC,gBAAgB,mCAAI,CAAC;QAChD,aAAa,EAAE,QAAQ,CAAC,aAAa;QACrC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAChE,WAAW,EAAE,QAAQ,CAAC,MAAM,KAAK,UAAU;QAC3C,WAAW,EAAE,QAAQ,CAAC,MAAM,KAAK,WAAW;QAC5C,SAAS,EAAE,QAAQ,CAAC,MAAM,KAAK,YAAY;QAC3C,IAAI,EAAE,QAAQ,CAAC,IAAI;QAEnB,oFAAoF;QACpF,wGAAwG;QACxG,mHAAmH;QACnH,gEAAgE;QAChE,MAAM,EAAE,QAAQ,CAAC,MAAM;KAC0C,CAAC;AACtE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { FormRecognizerError } from \"../error\";\nimport {\n DocumentModelDetails,\n OperationStatus,\n DocumentModelBuildOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentClassifierDetails,\n DocumentClassifierBuildOperationDetails,\n} from \"../generated\";\nimport { PollerOptions } from \"../options/PollerOptions\";\nimport { OperationContext } from \"./util/poller\";\n\n/**\n * The possible types of all administration operation states.\n * @internal\n */\nexport type AdministrationOperationState =\n | DocumentModelOperationState\n | DocumentClassifierOperationState;\n\n/**\n * The set of fields common to all administration operations.\n */\nexport interface ModelAdministrationOperationStateCommon {\n /**\n * The status of the operation. One of:\n *\n * - \"notStarted\"\n * - \"running\"\n * - \"succeeded\"\n * - \"failed\"\n * - \"canceled\"\n */\n status: OperationStatus;\n\n /**\n * The API version used to train this model.\n */\n apiVersion?: string;\n\n /**\n * The unique ID of this operation.\n */\n operationId: string;\n\n /**\n * A number between 0 and 100 representing the progress of the operation.\n */\n percentCompleted: number;\n\n /**\n * The Date and Time that the operation was created.\n */\n createdOn: Date;\n\n /**\n * The date & time that the operation state was last modified.\n */\n lastUpdatedOn: Date;\n\n /**\n * Additional, user-defined key-value pairs associated with the model as metadata.\n */\n tags?: Record<string, string>;\n}\n\n/**\n * The state of a model creation operation.\n */\nexport interface DocumentModelOperationState\n extends PollOperationState<DocumentModelDetails>,\n ModelAdministrationOperationStateCommon {}\n\n/**\n * The respones of a model creation operation.\n * @internal\n */\nexport type DocumentModelBuildResponse =\n | DocumentModelBuildOperationDetails\n | DocumentModelCopyToOperationDetails\n | DocumentModelComposeOperationDetails;\n\n/**\n * The possible responses of an administration operation.\n * @internal\n */\nexport type DocumentModelAdministrationResponse =\n | DocumentModelBuildResponse\n | DocumentClassifierBuildOperationDetails;\n\n/**\n * Convert an operation result into a training poller state.\n * @internal\n */\nexport async function toTrainingPollOperationState(\n response: DocumentModelAdministrationResponse\n): Promise<DocumentModelOperationState | DocumentClassifierOperationState> {\n return {\n operationId: response.operationId,\n status: response.status,\n apiVersion: response.apiVersion,\n percentCompleted: response.percentCompleted ?? 0,\n lastUpdatedOn: response.lastUpdatedOn,\n createdOn: response.createdOn,\n error: response.error && new FormRecognizerError(response.error),\n isCancelled: response.status === \"canceled\",\n isCompleted: response.status === \"succeeded\",\n isStarted: response.status !== \"notStarted\",\n tags: response.tags,\n\n // The following assertion is required. Technically the type of `response.result` is\n // `DocumentModelDetails | DocumentClassifierDetails | undefined`, which isn't assignable to the type of\n // either operation state's result. We would need some kind of dependent typing to express how the type of `result`\n // actually _determines_ the type of the resulting return value.\n result: response.result,\n } as DocumentModelOperationState | DocumentClassifierOperationState;\n}\n\n/**\n * A long-running operation (poller) that tracks the state of a model creation operation, eventually producing a\n * {@link DocumentModelDetails}.\n */\nexport type DocumentModelPoller = PollerLike<DocumentModelOperationState, DocumentModelDetails>;\n\n/**\n * Defines a training operation.\n * @internal\n */\nexport interface TrainingOperationDefinition<State extends AdministrationOperationState> {\n /**\n * A function to start the operation, producing an operationLocation.\n */\n start: (ctx: OperationContext) => Promise<{ operationLocation?: string }>;\n /**\n * Options for the poller and requests.\n */\n options: PollerOptions<State> & OperationOptions;\n}\n\n/**\n * A long-running operation (poller) that tracks the state of a custom classifier creation operation, eventually\n * producing a {@link DocumentClassifierDetails}.\n */\nexport type DocumentClassifierPoller = PollerLike<\n DocumentClassifierOperationState,\n DocumentClassifierDetails\n>;\n\n/**\n * The state of a model creation operation.\n */\nexport interface DocumentClassifierOperationState\n extends PollOperationState<DocumentClassifierDetails>,\n ModelAdministrationOperationStateCommon {}\n"]}