@azure/ai-form-recognizer 5.1.0-alpha.20250619.1 → 5.1.0-alpha.20250718.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/dist/browser/bin/defaultFields.js +14 -13
  2. package/dist/browser/bin/defaultFields.js.map +1 -1
  3. package/dist/browser/bin/writeModelCode.js +19 -19
  4. package/dist/browser/bin/writeModelCode.js.map +1 -1
  5. package/dist/browser/documentAnalysisClient.js +29 -13
  6. package/dist/browser/documentAnalysisClient.js.map +1 -1
  7. package/dist/browser/documentModel.js +20 -10
  8. package/dist/browser/documentModel.js.map +1 -1
  9. package/dist/browser/documentModelAdministrationClient.js +33 -10
  10. package/dist/browser/documentModelAdministrationClient.js.map +1 -1
  11. package/dist/browser/error.js +15 -2
  12. package/dist/browser/error.js.map +1 -1
  13. package/dist/browser/generated/generatedClient.js +14 -4
  14. package/dist/browser/generated/generatedClient.js.map +1 -1
  15. package/dist/browser/generated/models/mappers.js +20 -8
  16. package/dist/browser/generated/models/mappers.js.map +1 -1
  17. package/dist/browser/generated/operations/documentClassifiers.js +14 -31
  18. package/dist/browser/generated/operations/documentClassifiers.js.map +1 -1
  19. package/dist/browser/generated/operations/documentModels.js +14 -31
  20. package/dist/browser/generated/operations/documentModels.js.map +1 -1
  21. package/dist/browser/generated/operations/miscellaneous.js +14 -31
  22. package/dist/browser/generated/operations/miscellaneous.js.map +1 -1
  23. package/dist/browser/lro/administration.js +1 -2
  24. package/dist/browser/lro/administration.js.map +1 -1
  25. package/dist/browser/lro/analysis.js +37 -17
  26. package/dist/browser/lro/analysis.js.map +1 -1
  27. package/dist/browser/lro/util/delayMs.js +3 -3
  28. package/dist/browser/lro/util/delayMs.js.map +1 -1
  29. package/dist/browser/lro/util/poller.js +7 -7
  30. package/dist/browser/lro/util/poller.js.map +1 -1
  31. package/dist/browser/models/fields.js +11 -5
  32. package/dist/browser/models/fields.js.map +1 -1
  33. package/dist/browser/transforms/polygon.js +16 -5
  34. package/dist/browser/transforms/polygon.js.map +1 -1
  35. package/dist/browser/util.js +6 -3
  36. package/dist/browser/util.js.map +1 -1
  37. package/dist/commonjs/bin/defaultFields.js +14 -13
  38. package/dist/commonjs/bin/defaultFields.js.map +1 -1
  39. package/dist/commonjs/bin/writeModelCode.js +19 -19
  40. package/dist/commonjs/bin/writeModelCode.js.map +1 -1
  41. package/dist/commonjs/documentAnalysisClient.js +29 -13
  42. package/dist/commonjs/documentAnalysisClient.js.map +1 -1
  43. package/dist/commonjs/documentModel.js +20 -10
  44. package/dist/commonjs/documentModel.js.map +1 -1
  45. package/dist/commonjs/documentModelAdministrationClient.js +33 -10
  46. package/dist/commonjs/documentModelAdministrationClient.js.map +1 -1
  47. package/dist/commonjs/error.js +15 -2
  48. package/dist/commonjs/error.js.map +1 -1
  49. package/dist/commonjs/generated/generatedClient.js +14 -4
  50. package/dist/commonjs/generated/generatedClient.js.map +1 -1
  51. package/dist/commonjs/generated/models/mappers.js +20 -8
  52. package/dist/commonjs/generated/models/mappers.js.map +1 -1
  53. package/dist/commonjs/generated/operations/documentClassifiers.js +14 -30
  54. package/dist/commonjs/generated/operations/documentClassifiers.js.map +1 -1
  55. package/dist/commonjs/generated/operations/documentModels.js +14 -30
  56. package/dist/commonjs/generated/operations/documentModels.js.map +1 -1
  57. package/dist/commonjs/generated/operations/miscellaneous.js +14 -30
  58. package/dist/commonjs/generated/operations/miscellaneous.js.map +1 -1
  59. package/dist/commonjs/lro/administration.js +1 -2
  60. package/dist/commonjs/lro/administration.js.map +1 -1
  61. package/dist/commonjs/lro/analysis.js +37 -17
  62. package/dist/commonjs/lro/analysis.js.map +1 -1
  63. package/dist/commonjs/lro/util/delayMs.js +3 -3
  64. package/dist/commonjs/lro/util/delayMs.js.map +1 -1
  65. package/dist/commonjs/lro/util/poller.js +7 -7
  66. package/dist/commonjs/lro/util/poller.js.map +1 -1
  67. package/dist/commonjs/models/fields.js +11 -5
  68. package/dist/commonjs/models/fields.js.map +1 -1
  69. package/dist/commonjs/transforms/polygon.js +16 -5
  70. package/dist/commonjs/transforms/polygon.js.map +1 -1
  71. package/dist/commonjs/tsdoc-metadata.json +11 -11
  72. package/dist/commonjs/util.js +6 -3
  73. package/dist/commonjs/util.js.map +1 -1
  74. package/dist/esm/bin/defaultFields.js +14 -13
  75. package/dist/esm/bin/defaultFields.js.map +1 -1
  76. package/dist/esm/bin/writeModelCode.js +19 -19
  77. package/dist/esm/bin/writeModelCode.js.map +1 -1
  78. package/dist/esm/documentAnalysisClient.js +29 -13
  79. package/dist/esm/documentAnalysisClient.js.map +1 -1
  80. package/dist/esm/documentModel.js +20 -10
  81. package/dist/esm/documentModel.js.map +1 -1
  82. package/dist/esm/documentModelAdministrationClient.js +33 -10
  83. package/dist/esm/documentModelAdministrationClient.js.map +1 -1
  84. package/dist/esm/error.js +15 -2
  85. package/dist/esm/error.js.map +1 -1
  86. package/dist/esm/generated/generatedClient.js +14 -4
  87. package/dist/esm/generated/generatedClient.js.map +1 -1
  88. package/dist/esm/generated/models/mappers.js +20 -8
  89. package/dist/esm/generated/models/mappers.js.map +1 -1
  90. package/dist/esm/generated/operations/documentClassifiers.js +14 -31
  91. package/dist/esm/generated/operations/documentClassifiers.js.map +1 -1
  92. package/dist/esm/generated/operations/documentModels.js +14 -31
  93. package/dist/esm/generated/operations/documentModels.js.map +1 -1
  94. package/dist/esm/generated/operations/miscellaneous.js +14 -31
  95. package/dist/esm/generated/operations/miscellaneous.js.map +1 -1
  96. package/dist/esm/lro/administration.js +1 -2
  97. package/dist/esm/lro/administration.js.map +1 -1
  98. package/dist/esm/lro/analysis.js +37 -17
  99. package/dist/esm/lro/analysis.js.map +1 -1
  100. package/dist/esm/lro/util/delayMs.js +3 -3
  101. package/dist/esm/lro/util/delayMs.js.map +1 -1
  102. package/dist/esm/lro/util/poller.js +7 -7
  103. package/dist/esm/lro/util/poller.js.map +1 -1
  104. package/dist/esm/models/fields.js +11 -5
  105. package/dist/esm/models/fields.js.map +1 -1
  106. package/dist/esm/transforms/polygon.js +16 -5
  107. package/dist/esm/transforms/polygon.js.map +1 -1
  108. package/dist/esm/util.js +6 -3
  109. package/dist/esm/util.js.map +1 -1
  110. package/dist/react-native/bin/defaultFields.js +14 -13
  111. package/dist/react-native/bin/defaultFields.js.map +1 -1
  112. package/dist/react-native/bin/writeModelCode.js +19 -19
  113. package/dist/react-native/bin/writeModelCode.js.map +1 -1
  114. package/dist/react-native/documentAnalysisClient.js +29 -13
  115. package/dist/react-native/documentAnalysisClient.js.map +1 -1
  116. package/dist/react-native/documentModel.js +20 -10
  117. package/dist/react-native/documentModel.js.map +1 -1
  118. package/dist/react-native/documentModelAdministrationClient.js +33 -10
  119. package/dist/react-native/documentModelAdministrationClient.js.map +1 -1
  120. package/dist/react-native/error.js +15 -2
  121. package/dist/react-native/error.js.map +1 -1
  122. package/dist/react-native/generated/generatedClient.js +14 -4
  123. package/dist/react-native/generated/generatedClient.js.map +1 -1
  124. package/dist/react-native/generated/models/mappers.js +20 -8
  125. package/dist/react-native/generated/models/mappers.js.map +1 -1
  126. package/dist/react-native/generated/operations/documentClassifiers.js +14 -31
  127. package/dist/react-native/generated/operations/documentClassifiers.js.map +1 -1
  128. package/dist/react-native/generated/operations/documentModels.js +14 -31
  129. package/dist/react-native/generated/operations/documentModels.js.map +1 -1
  130. package/dist/react-native/generated/operations/miscellaneous.js +14 -31
  131. package/dist/react-native/generated/operations/miscellaneous.js.map +1 -1
  132. package/dist/react-native/lro/administration.js +1 -2
  133. package/dist/react-native/lro/administration.js.map +1 -1
  134. package/dist/react-native/lro/analysis.js +37 -17
  135. package/dist/react-native/lro/analysis.js.map +1 -1
  136. package/dist/react-native/lro/util/delayMs.js +3 -3
  137. package/dist/react-native/lro/util/delayMs.js.map +1 -1
  138. package/dist/react-native/lro/util/poller.js +7 -7
  139. package/dist/react-native/lro/util/poller.js.map +1 -1
  140. package/dist/react-native/models/fields.js +11 -5
  141. package/dist/react-native/models/fields.js.map +1 -1
  142. package/dist/react-native/transforms/polygon.js +16 -5
  143. package/dist/react-native/transforms/polygon.js.map +1 -1
  144. package/dist/react-native/util.js +6 -3
  145. package/dist/react-native/util.js.map +1 -1
  146. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"documentClassifiers.js","sourceRoot":"","sources":["../../../../src/generated/operations/documentClassifiers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAuBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAa,uBAAuB;IAGlC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,eAAe,CACpB,OAA0D;QAE1D,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACpD,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,EAAE;gBACX,OAAO,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;YACjD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,yBAAyB,CACtC,OAA0D;;YAE1D,IAAI,MAAM,GAAG,sBAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA,CAAC;YAClD,4BAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;YACzB,IAAI,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;YACxC,OAAO,iBAAiB,EAAE,CAAC;gBACzB,MAAM,GAAG,sBAAM,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA,CAAC;gBACrE,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;gBACpC,4BAAM,MA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ed 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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\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/index.js\";\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
+ {"version":3,"file":"documentClassifiers.js","sourceRoot":"","sources":["../../../../src/generated/operations/documentClassifiers.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAuBtD,4CAA4C;AAC5C,uDAAuD;AACvD,MAAa,uBAAuB;IACjB,MAAM,CAAkB;IAEzC;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D,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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\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/index.js\";\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"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing DocumentModels operations. */
17
17
  class DocumentModelsImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class DocumentModels class.
20
21
  * @param client Reference to the service client
@@ -40,37 +41,20 @@ class DocumentModelsImpl {
40
41
  }
41
42
  };
42
43
  }
43
- listModelsPagingPage(options) {
44
- return tslib_1.__asyncGenerator(this, arguments, function* listModelsPagingPage_1() {
45
- let result = yield tslib_1.__await(this._listModels(options));
46
- yield yield tslib_1.__await(result.value || []);
47
- let continuationToken = result.nextLink;
48
- while (continuationToken) {
49
- result = yield tslib_1.__await(this._listModelsNext(continuationToken, options));
50
- continuationToken = result.nextLink;
51
- yield yield tslib_1.__await(result.value || []);
52
- }
53
- });
44
+ async *listModelsPagingPage(options) {
45
+ let result = await this._listModels(options);
46
+ yield result.value || [];
47
+ let continuationToken = result.nextLink;
48
+ while (continuationToken) {
49
+ result = await this._listModelsNext(continuationToken, options);
50
+ continuationToken = result.nextLink;
51
+ yield result.value || [];
52
+ }
54
53
  }
55
- listModelsPagingAll(options) {
56
- return tslib_1.__asyncGenerator(this, arguments, function* listModelsPagingAll_1() {
57
- var _a, e_1, _b, _c;
58
- try {
59
- for (var _d = true, _e = tslib_1.__asyncValues(this.listModelsPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
60
- _c = _f.value;
61
- _d = false;
62
- const page = _c;
63
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
64
- }
65
- }
66
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
- finally {
68
- try {
69
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
70
- }
71
- finally { if (e_1) throw e_1.error; }
72
- }
73
- });
54
+ async *listModelsPagingAll(options) {
55
+ for await (const page of this.listModelsPagingPage(options)) {
56
+ yield* page;
57
+ }
74
58
  }
75
59
  /**
76
60
  * Analyzes document with document model.
@@ -1 +1 @@
1
- {"version":3,"file":"documentModels.js","sourceRoot":"","sources":["../../../../src/generated/operations/documentModels.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgCtD,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,UAAU,CACf,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC/C,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,EAAE;gBACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;IACJ,CAAC;IAEc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AC;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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\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/index.js\";\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
+ {"version":3,"file":"documentModels.js","sourceRoot":"","sources":["../../../../src/generated/operations/documentModels.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAgCtD,4CAA4C;AAC5C,kDAAkD;AAClD,MAAa,kBAAkB;IACZ,MAAM,CAAkB;IAEzC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,UAAU,CACf,OAAgD;QAEhD,MAAM,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC/C,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,EAAE;gBACX,OAAO,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAC5C,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,oBAAoB,CACjC,OAAgD;QAEhD,IAAI,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;QACzB,IAAI,iBAAiB,GAAG,MAAM,CAAC,QAAQ,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AE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC;IACxD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC;AACF,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,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,OAAO,CAAC;IACxD,gBAAgB,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;IACtC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\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/index.js\";\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"]}
@@ -15,6 +15,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
15
15
  /// <reference lib="esnext.asynciterable" />
16
16
  /** Class containing Miscellaneous operations. */
17
17
  class MiscellaneousImpl {
18
+ client;
18
19
  /**
19
20
  * Initialize a new instance of the class Miscellaneous class.
20
21
  * @param client Reference to the service client
@@ -40,37 +41,20 @@ class MiscellaneousImpl {
40
41
  }
41
42
  };
42
43
  }
43
- listOperationsPagingPage(options) {
44
- return tslib_1.__asyncGenerator(this, arguments, function* listOperationsPagingPage_1() {
45
- let result = yield tslib_1.__await(this._listOperations(options));
46
- yield yield tslib_1.__await(result.value || []);
47
- let continuationToken = result.nextLink;
48
- while (continuationToken) {
49
- result = yield tslib_1.__await(this._listOperationsNext(continuationToken, options));
50
- continuationToken = result.nextLink;
51
- yield yield tslib_1.__await(result.value || []);
52
- }
53
- });
44
+ async *listOperationsPagingPage(options) {
45
+ let result = await this._listOperations(options);
46
+ yield result.value || [];
47
+ let continuationToken = result.nextLink;
48
+ while (continuationToken) {
49
+ result = await this._listOperationsNext(continuationToken, options);
50
+ continuationToken = result.nextLink;
51
+ yield result.value || [];
52
+ }
54
53
  }
55
- listOperationsPagingAll(options) {
56
- return tslib_1.__asyncGenerator(this, arguments, function* listOperationsPagingAll_1() {
57
- var _a, e_1, _b, _c;
58
- try {
59
- for (var _d = true, _e = tslib_1.__asyncValues(this.listOperationsPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
60
- _c = _f.value;
61
- _d = false;
62
- const page = _c;
63
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
64
- }
65
- }
66
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
67
- finally {
68
- try {
69
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
70
- }
71
- finally { if (e_1) throw e_1.error; }
72
- }
73
- });
54
+ async *listOperationsPagingAll(options) {
55
+ for await (const page of this.listOperationsPagingPage(options)) {
56
+ yield* page;
57
+ }
74
58
  }
75
59
  /**
76
60
  * Lists all operations.
@@ -1 +1 @@
1
- {"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../../../src/generated/operations/miscellaneous.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,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,EAAE;gBACX,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,wBAAwB,CACrC,OAAmD;;YAEnD,IAAI,MAAM,GAAG,sBAAM,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA,CAAC;YACjD,4BAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;YACzB,IAAI,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;YACxC,OAAO,iBAAiB,EAAE,CAAC;gBACzB,MAAM,GAAG,sBAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA,CAAC;gBACpE,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC;gBACpC,4BAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;YAC3B,CAAC;QACH,CAAC;KAAA;IAEc,uBAAuB,CACpC,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e,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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n OperationSummary,\n MiscellaneousListOperationsNextOptionalParams,\n MiscellaneousListOperationsOptionalParams,\n MiscellaneousListOperationsResponse,\n MiscellaneousGetOperationOptionalParams,\n MiscellaneousGetOperationResponse,\n MiscellaneousGetResourceInfoOptionalParams,\n MiscellaneousGetResourceInfoResponse,\n MiscellaneousListOperationsNextResponse\n} from \"../models/index.js\";\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
+ {"version":3,"file":"miscellaneous.js","sourceRoot":"","sources":["../../../../src/generated/operations/miscellaneous.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAa,iBAAiB;IACX,MAAM,CAAkB;IAEzC;;;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;YAC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,OAAO;IACb,UAAU,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/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { GeneratedClient } from \"../generatedClient.js\";\nimport {\n OperationSummary,\n MiscellaneousListOperationsNextOptionalParams,\n MiscellaneousListOperationsOptionalParams,\n MiscellaneousListOperationsResponse,\n MiscellaneousGetOperationOptionalParams,\n MiscellaneousGetOperationResponse,\n MiscellaneousGetResourceInfoOptionalParams,\n MiscellaneousGetResourceInfoResponse,\n MiscellaneousListOperationsNextResponse\n} from \"../models/index.js\";\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"]}
@@ -9,12 +9,11 @@ const error_js_1 = require("../error.js");
9
9
  * @internal
10
10
  */
11
11
  async function toTrainingPollOperationState(response) {
12
- var _a;
13
12
  return {
14
13
  operationId: response.operationId,
15
14
  status: response.status,
16
15
  apiVersion: response.apiVersion,
17
- percentCompleted: (_a = response.percentCompleted) !== null && _a !== void 0 ? _a : 0,
16
+ percentCompleted: response.percentCompleted ?? 0,
18
17
  lastUpdatedOn: response.lastUpdatedOn,
19
18
  createdOn: response.createdOn,
20
19
  error: response.error && new error_js_1.FormRecognizerError(response.error),
@@ -1 +1 @@
1
- {"version":3,"file":"administration.js","sourceRoot":"","sources":["../../../src/lro/administration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmGlC,oEAsBC;AArHD,0CAAkD;AA2FlD;;;GAGG;AACI,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,8BAAmB,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 type { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport { FormRecognizerError } from \"../error.js\";\nimport type {\n DocumentModelDetails,\n OperationStatus,\n DocumentModelBuildOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentClassifierDetails,\n DocumentClassifierBuildOperationDetails,\n} from \"../generated/index.js\";\nimport type { PollerOptions } from \"../options/PollerOptions.js\";\nimport type { OperationContext } from \"./util/poller.js\";\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"]}
1
+ {"version":3,"file":"administration.js","sourceRoot":"","sources":["../../../src/lro/administration.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmGlC,oEAsBC;AArHD,0CAAkD;AA2FlD;;;GAGG;AACI,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,QAAQ,CAAC,gBAAgB,IAAI,CAAC;QAChD,aAAa,EAAE,QAAQ,CAAC,aAAa;QACrC,SAAS,EAAE,QAAQ,CAAC,SAAS;QAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI,8BAAmB,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 type { PollOperationState, PollerLike } from \"@azure/core-lro\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport { FormRecognizerError } from \"../error.js\";\nimport type {\n DocumentModelDetails,\n OperationStatus,\n DocumentModelBuildOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentClassifierDetails,\n DocumentClassifierBuildOperationDetails,\n} from \"../generated/index.js\";\nimport type { PollerOptions } from \"../options/PollerOptions.js\";\nimport type { OperationContext } from \"./util/poller.js\";\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"]}
@@ -22,8 +22,11 @@ const polygon_js_1 = require("../transforms/polygon.js");
22
22
  * @returns an AnalyzedDocument (which has had its fields mapped to stronger DocumentField types)
23
23
  */
24
24
  function toAnalyzedDocumentFromGenerated(document) {
25
- var _a;
26
- return Object.assign(Object.assign({}, document), { boundingRegions: (0, polygon_js_1.toBoundingRegions)(document.boundingRegions), fields: (0, fields_js_1.toAnalyzedDocumentFieldsFromGenerated)((_a = document.fields) !== null && _a !== void 0 ? _a : {}) });
25
+ return {
26
+ ...document,
27
+ boundingRegions: (0, polygon_js_1.toBoundingRegions)(document.boundingRegions),
28
+ fields: (0, fields_js_1.toAnalyzedDocumentFieldsFromGenerated)(document.fields ?? {}),
29
+ };
27
30
  }
28
31
  /**
29
32
  * Tests if one span contains another, by testing that the outer span starts before or at the same character as the
@@ -57,12 +60,9 @@ function* iterFrom(items, idx) {
57
60
  }
58
61
  }
59
62
  function toDocumentLineFromGenerated(generated, page) {
60
- generated.words = () => {
61
- var _a, _b;
62
- return fastGetChildren(iterFrom(generated.spans, 0), (_b = (_a = page.words) === null || _a === void 0 ? void 0 : _a.map((word) => {
63
- return Object.assign(Object.assign({}, word), { polygon: (0, polygon_js_1.toBoundingPolygon)(word.polygon) });
64
- })) !== null && _b !== void 0 ? _b : []);
65
- };
63
+ generated.words = () => fastGetChildren(iterFrom(generated.spans, 0), page.words?.map((word) => {
64
+ return { ...word, polygon: (0, polygon_js_1.toBoundingPolygon)(word.polygon) };
65
+ }) ?? []);
66
66
  generated.polygon = (0, polygon_js_1.toBoundingPolygon)(generated.polygon);
67
67
  Object.defineProperty(generated, "words", {
68
68
  enumerable: false,
@@ -70,8 +70,26 @@ function toDocumentLineFromGenerated(generated, page) {
70
70
  return generated;
71
71
  }
72
72
  function toDocumentPageFromGenerated(generated) {
73
- var _a, _b, _c, _d, _e;
74
- return Object.assign(Object.assign({}, generated), { lines: (_a = generated.lines) === null || _a === void 0 ? void 0 : _a.map((line) => toDocumentLineFromGenerated(line, generated)), selectionMarks: (_b = generated.selectionMarks) === null || _b === void 0 ? void 0 : _b.map((mark) => (Object.assign(Object.assign({}, mark), { polygon: (0, polygon_js_1.toBoundingPolygon)(mark.polygon) }))), words: (_c = generated.words) === null || _c === void 0 ? void 0 : _c.map((word) => (Object.assign(Object.assign({}, word), { polygon: (0, polygon_js_1.toBoundingPolygon)(word.polygon) }))), barcodes: (_d = generated.barcodes) === null || _d === void 0 ? void 0 : _d.map((barcode) => (Object.assign(Object.assign({}, barcode), { polygon: (0, polygon_js_1.toBoundingPolygon)(barcode.polygon) }))), formulas: (_e = generated.formulas) === null || _e === void 0 ? void 0 : _e.map((formula) => (Object.assign(Object.assign({}, formula), { polygon: (0, polygon_js_1.toBoundingPolygon)(formula.polygon) }))) });
73
+ return {
74
+ ...generated,
75
+ lines: generated.lines?.map((line) => toDocumentLineFromGenerated(line, generated)),
76
+ selectionMarks: generated.selectionMarks?.map((mark) => ({
77
+ ...mark,
78
+ polygon: (0, polygon_js_1.toBoundingPolygon)(mark.polygon),
79
+ })),
80
+ words: generated.words?.map((word) => ({
81
+ ...word,
82
+ polygon: (0, polygon_js_1.toBoundingPolygon)(word.polygon),
83
+ })),
84
+ barcodes: generated.barcodes?.map((barcode) => ({
85
+ ...barcode,
86
+ polygon: (0, polygon_js_1.toBoundingPolygon)(barcode.polygon),
87
+ })),
88
+ formulas: generated.formulas?.map((formula) => ({
89
+ ...formula,
90
+ polygon: (0, polygon_js_1.toBoundingPolygon)(formula.polygon),
91
+ })),
92
+ };
75
93
  }
76
94
  /**
77
95
  * Binary search through an array of items to find the first item that could possibly be contained by the given span,
@@ -90,10 +108,10 @@ function iteratorFromFirstMatchBinarySearch(span, items) {
90
108
  let prevIdx = idx;
91
109
  let min = 0;
92
110
  let max = items.length;
93
- const found = () => { var _a, _b, _c;
111
+ const found = () =>
94
112
  // The item is found if it starts after the current span and the item before it does not. That means it is the first
95
113
  // item in the array that could be a child if the spans are sorted.
96
- return items[idx].span.offset >= span.offset && ((_c = (_b = (_a = items[idx - 1]) === null || _a === void 0 ? void 0 : _a.span) === null || _b === void 0 ? void 0 : _b.offset) !== null && _c !== void 0 ? _c : -1) < span.offset; };
114
+ items[idx].span.offset >= span.offset && (items[idx - 1]?.span?.offset ?? -1) < span.offset;
97
115
  // Binary search to find the first element that could be a child
98
116
  do {
99
117
  if (found()) {
@@ -151,18 +169,20 @@ function* fastGetChildren(spans, childrenArray) {
151
169
  * @internal
152
170
  */
153
171
  function toAnalyzeResultFromGenerated(result) {
154
- var _a, _b, _c, _d;
155
172
  return {
156
173
  apiVersion: result.apiVersion,
157
174
  modelId: result.modelId,
158
175
  content: result.content,
159
176
  pages: result.pages.map((page) => toDocumentPageFromGenerated(page)),
160
- tables: (_a = result.tables) === null || _a === void 0 ? void 0 : _a.map((table) => (0, polygon_js_1.toDocumentTableFromGenerated)(table)),
161
- keyValuePairs: (_b = result.keyValuePairs) === null || _b === void 0 ? void 0 : _b.map((pair) => (0, polygon_js_1.toKeyValuePairFromGenerated)(pair)),
177
+ tables: result.tables?.map((table) => (0, polygon_js_1.toDocumentTableFromGenerated)(table)),
178
+ keyValuePairs: result.keyValuePairs?.map((pair) => (0, polygon_js_1.toKeyValuePairFromGenerated)(pair)),
162
179
  languages: result.languages,
163
180
  styles: result.styles,
164
- paragraphs: (_c = result.paragraphs) === null || _c === void 0 ? void 0 : _c.map((para) => (Object.assign(Object.assign({}, para), { boundingRegions: (0, polygon_js_1.toBoundingRegions)(para.boundingRegions) }))),
165
- documents: (_d = result.documents) === null || _d === void 0 ? void 0 : _d.map(toAnalyzedDocumentFromGenerated),
181
+ paragraphs: result.paragraphs?.map((para) => ({
182
+ ...para,
183
+ boundingRegions: (0, polygon_js_1.toBoundingRegions)(para.boundingRegions),
184
+ })),
185
+ documents: result.documents?.map(toAnalyzedDocumentFromGenerated),
166
186
  };
167
187
  }
168
188
  /**