@azure-rest/health-deidentification 1.0.0-beta.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +153 -35
  3. package/dist/browser/clientDefinitions.d.ts +7 -7
  4. package/dist/browser/clientDefinitions.d.ts.map +1 -1
  5. package/dist/browser/clientDefinitions.js +1 -1
  6. package/dist/browser/clientDefinitions.js.map +1 -1
  7. package/dist/browser/deidentificationClient.d.ts +3 -3
  8. package/dist/browser/deidentificationClient.d.ts.map +1 -1
  9. package/dist/browser/deidentificationClient.js +3 -3
  10. package/dist/browser/deidentificationClient.js.map +1 -1
  11. package/dist/browser/index.js +1 -1
  12. package/dist/browser/index.js.map +1 -1
  13. package/dist/browser/isUnexpected.d.ts +3 -3
  14. package/dist/browser/isUnexpected.d.ts.map +1 -1
  15. package/dist/browser/isUnexpected.js +1 -1
  16. package/dist/browser/isUnexpected.js.map +1 -1
  17. package/dist/browser/logger.js +1 -1
  18. package/dist/browser/logger.js.map +1 -1
  19. package/dist/browser/models.d.ts +45 -28
  20. package/dist/browser/models.d.ts.map +1 -1
  21. package/dist/browser/models.js +1 -1
  22. package/dist/browser/models.js.map +1 -1
  23. package/dist/browser/outputModels.d.ts +56 -40
  24. package/dist/browser/outputModels.d.ts.map +1 -1
  25. package/dist/browser/outputModels.js +1 -1
  26. package/dist/browser/outputModels.js.map +1 -1
  27. package/dist/browser/paginateHelper.d.ts +28 -3
  28. package/dist/browser/paginateHelper.d.ts.map +1 -1
  29. package/dist/browser/paginateHelper.js +99 -2
  30. package/dist/browser/paginateHelper.js.map +1 -1
  31. package/dist/browser/parameters.d.ts +17 -10
  32. package/dist/browser/parameters.d.ts.map +1 -1
  33. package/dist/browser/parameters.js +1 -1
  34. package/dist/browser/parameters.js.map +1 -1
  35. package/dist/browser/pollingHelper.d.ts +5 -5
  36. package/dist/browser/pollingHelper.d.ts.map +1 -1
  37. package/dist/browser/pollingHelper.js +2 -2
  38. package/dist/browser/pollingHelper.js.map +1 -1
  39. package/dist/browser/responses.d.ts +24 -19
  40. package/dist/browser/responses.d.ts.map +1 -1
  41. package/dist/browser/responses.js +1 -1
  42. package/dist/browser/responses.js.map +1 -1
  43. package/dist/commonjs/clientDefinitions.d.ts +7 -7
  44. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  45. package/dist/commonjs/clientDefinitions.js +1 -1
  46. package/dist/commonjs/clientDefinitions.js.map +1 -1
  47. package/dist/commonjs/deidentificationClient.d.ts +3 -3
  48. package/dist/commonjs/deidentificationClient.d.ts.map +1 -1
  49. package/dist/commonjs/deidentificationClient.js +3 -3
  50. package/dist/commonjs/deidentificationClient.js.map +1 -1
  51. package/dist/commonjs/index.js +1 -1
  52. package/dist/commonjs/index.js.map +1 -1
  53. package/dist/commonjs/isUnexpected.d.ts +3 -3
  54. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  55. package/dist/commonjs/isUnexpected.js +1 -1
  56. package/dist/commonjs/isUnexpected.js.map +1 -1
  57. package/dist/commonjs/logger.js +1 -1
  58. package/dist/commonjs/logger.js.map +1 -1
  59. package/dist/commonjs/models.d.ts +45 -28
  60. package/dist/commonjs/models.d.ts.map +1 -1
  61. package/dist/commonjs/models.js +1 -1
  62. package/dist/commonjs/models.js.map +1 -1
  63. package/dist/commonjs/outputModels.d.ts +56 -40
  64. package/dist/commonjs/outputModels.d.ts.map +1 -1
  65. package/dist/commonjs/outputModels.js +1 -1
  66. package/dist/commonjs/outputModels.js.map +1 -1
  67. package/dist/commonjs/paginateHelper.d.ts +28 -3
  68. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  69. package/dist/commonjs/paginateHelper.js +100 -3
  70. package/dist/commonjs/paginateHelper.js.map +1 -1
  71. package/dist/commonjs/parameters.d.ts +17 -10
  72. package/dist/commonjs/parameters.d.ts.map +1 -1
  73. package/dist/commonjs/parameters.js +1 -1
  74. package/dist/commonjs/parameters.js.map +1 -1
  75. package/dist/commonjs/pollingHelper.d.ts +5 -5
  76. package/dist/commonjs/pollingHelper.d.ts.map +1 -1
  77. package/dist/commonjs/pollingHelper.js +1 -1
  78. package/dist/commonjs/pollingHelper.js.map +1 -1
  79. package/dist/commonjs/responses.d.ts +24 -19
  80. package/dist/commonjs/responses.d.ts.map +1 -1
  81. package/dist/commonjs/responses.js +1 -1
  82. package/dist/commonjs/responses.js.map +1 -1
  83. package/dist/commonjs/tsdoc-metadata.json +1 -1
  84. package/dist/esm/clientDefinitions.d.ts +7 -7
  85. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  86. package/dist/esm/clientDefinitions.js +1 -1
  87. package/dist/esm/clientDefinitions.js.map +1 -1
  88. package/dist/esm/deidentificationClient.d.ts +3 -3
  89. package/dist/esm/deidentificationClient.d.ts.map +1 -1
  90. package/dist/esm/deidentificationClient.js +3 -3
  91. package/dist/esm/deidentificationClient.js.map +1 -1
  92. package/dist/esm/index.js +1 -1
  93. package/dist/esm/index.js.map +1 -1
  94. package/dist/esm/isUnexpected.d.ts +3 -3
  95. package/dist/esm/isUnexpected.d.ts.map +1 -1
  96. package/dist/esm/isUnexpected.js +1 -1
  97. package/dist/esm/isUnexpected.js.map +1 -1
  98. package/dist/esm/logger.js +1 -1
  99. package/dist/esm/logger.js.map +1 -1
  100. package/dist/esm/models.d.ts +45 -28
  101. package/dist/esm/models.d.ts.map +1 -1
  102. package/dist/esm/models.js +1 -1
  103. package/dist/esm/models.js.map +1 -1
  104. package/dist/esm/outputModels.d.ts +56 -40
  105. package/dist/esm/outputModels.d.ts.map +1 -1
  106. package/dist/esm/outputModels.js +1 -1
  107. package/dist/esm/outputModels.js.map +1 -1
  108. package/dist/esm/paginateHelper.d.ts +28 -3
  109. package/dist/esm/paginateHelper.d.ts.map +1 -1
  110. package/dist/esm/paginateHelper.js +99 -2
  111. package/dist/esm/paginateHelper.js.map +1 -1
  112. package/dist/esm/parameters.d.ts +17 -10
  113. package/dist/esm/parameters.d.ts.map +1 -1
  114. package/dist/esm/parameters.js +1 -1
  115. package/dist/esm/parameters.js.map +1 -1
  116. package/dist/esm/pollingHelper.d.ts +5 -5
  117. package/dist/esm/pollingHelper.d.ts.map +1 -1
  118. package/dist/esm/pollingHelper.js +2 -2
  119. package/dist/esm/pollingHelper.js.map +1 -1
  120. package/dist/esm/responses.d.ts +24 -19
  121. package/dist/esm/responses.d.ts.map +1 -1
  122. package/dist/esm/responses.js +1 -1
  123. package/dist/esm/responses.js.map +1 -1
  124. package/dist/react-native/clientDefinitions.d.ts +7 -7
  125. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  126. package/dist/react-native/clientDefinitions.js +1 -1
  127. package/dist/react-native/clientDefinitions.js.map +1 -1
  128. package/dist/react-native/deidentificationClient.d.ts +3 -3
  129. package/dist/react-native/deidentificationClient.d.ts.map +1 -1
  130. package/dist/react-native/deidentificationClient.js +3 -3
  131. package/dist/react-native/deidentificationClient.js.map +1 -1
  132. package/dist/react-native/index.js +1 -1
  133. package/dist/react-native/index.js.map +1 -1
  134. package/dist/react-native/isUnexpected.d.ts +3 -3
  135. package/dist/react-native/isUnexpected.d.ts.map +1 -1
  136. package/dist/react-native/isUnexpected.js +1 -1
  137. package/dist/react-native/isUnexpected.js.map +1 -1
  138. package/dist/react-native/logger.js +1 -1
  139. package/dist/react-native/logger.js.map +1 -1
  140. package/dist/react-native/models.d.ts +45 -28
  141. package/dist/react-native/models.d.ts.map +1 -1
  142. package/dist/react-native/models.js +1 -1
  143. package/dist/react-native/models.js.map +1 -1
  144. package/dist/react-native/outputModels.d.ts +56 -40
  145. package/dist/react-native/outputModels.d.ts.map +1 -1
  146. package/dist/react-native/outputModels.js +1 -1
  147. package/dist/react-native/outputModels.js.map +1 -1
  148. package/dist/react-native/paginateHelper.d.ts +28 -3
  149. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  150. package/dist/react-native/paginateHelper.js +99 -2
  151. package/dist/react-native/paginateHelper.js.map +1 -1
  152. package/dist/react-native/parameters.d.ts +17 -10
  153. package/dist/react-native/parameters.d.ts.map +1 -1
  154. package/dist/react-native/parameters.js +1 -1
  155. package/dist/react-native/parameters.js.map +1 -1
  156. package/dist/react-native/pollingHelper.d.ts +5 -5
  157. package/dist/react-native/pollingHelper.d.ts.map +1 -1
  158. package/dist/react-native/pollingHelper.js +2 -2
  159. package/dist/react-native/pollingHelper.js.map +1 -1
  160. package/dist/react-native/responses.d.ts +24 -19
  161. package/dist/react-native/responses.d.ts.map +1 -1
  162. package/dist/react-native/responses.js +1 -1
  163. package/dist/react-native/responses.js.map +1 -1
  164. package/package.json +45 -51
  165. package/review/health-deidentification.api.md +0 -645
@@ -1 +1 @@
1
- {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqBlC,MAAM,WAAW,GAA6B;IAC5C,kBAAkB,EAAE,CAAC,KAAK,CAAC;IAC3B,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAClC,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,WAAW,EAAE,CAAC,KAAK,CAAC;IACpB,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,0BAA0B,EAAE,CAAC,KAAK,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,CAAC;CACtB,CAAC;AA2BF,MAAM,UAAU,YAAY,CAC1B,QAgB6B;IAS7B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAA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MAAK,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob200Response,\n CreateJob201Response,\n CreateJobLogicalResponse,\n CreateJobDefaultResponse,\n DeleteJob204Response,\n DeleteJobDefaultResponse,\n ListJobs200Response,\n ListJobsDefaultResponse,\n ListJobDocuments200Response,\n ListJobDocumentsDefaultResponse,\n CancelJob200Response,\n CancelJobDefaultResponse,\n Deidentify200Response,\n DeidentifyDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /jobs/{name}\": [\"200\"],\n \"PUT /jobs/{name}\": [\"200\", \"201\"],\n \"DELETE /jobs/{name}\": [\"204\"],\n \"GET /jobs\": [\"200\"],\n \"GET /jobs/{name}/documents\": [\"200\"],\n \"POST /jobs/{name}:cancel\": [\"200\"],\n \"POST /deid\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\nexport function isUnexpected(\n response: DeleteJob204Response | DeleteJobDefaultResponse,\n): response is DeleteJobDefaultResponse;\nexport function isUnexpected(\n response: ListJobs200Response | ListJobsDefaultResponse,\n): response is ListJobsDefaultResponse;\nexport function isUnexpected(\n response: ListJobDocuments200Response | ListJobDocumentsDefaultResponse,\n): response is ListJobDocumentsDefaultResponse;\nexport function isUnexpected(\n response: CancelJob200Response | CancelJobDefaultResponse,\n): response is CancelJobDefaultResponse;\nexport function isUnexpected(\n response: Deidentify200Response | DeidentifyDefaultResponse,\n): response is DeidentifyDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse\n | DeleteJob204Response\n | DeleteJobDefaultResponse\n | ListJobs200Response\n | ListJobsDefaultResponse\n | ListJobDocuments200Response\n | ListJobDocumentsDefaultResponse\n | CancelJob200Response\n | CancelJobDefaultResponse\n | Deidentify200Response\n | DeidentifyDefaultResponse,\n): response is\n | GetJobDefaultResponse\n | CreateJobDefaultResponse\n | DeleteJobDefaultResponse\n | ListJobsDefaultResponse\n | ListJobDocumentsDefaultResponse\n | CancelJobDefaultResponse\n | DeidentifyDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAqBlC,MAAM,WAAW,GAA6B;IAC5C,kBAAkB,EAAE,CAAC,KAAK,CAAC;IAC3B,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAClC,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,WAAW,EAAE,CAAC,KAAK,CAAC;IACpB,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,0BAA0B,EAAE,CAAC,KAAK,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,CAAC;CACtB,CAAC;AA2BF,MAAM,UAAU,YAAY,CAC1B,QAgBiC;IASjC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,0BAA0B,CAAC,MA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6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n GetJob200Response,\n GetJobDefaultResponse,\n DeidentifyDocuments200Response,\n DeidentifyDocuments201Response,\n DeidentifyDocumentsLogicalResponse,\n DeidentifyDocumentsDefaultResponse,\n DeleteJob204Response,\n DeleteJobDefaultResponse,\n ListJobs200Response,\n ListJobsDefaultResponse,\n ListJobDocuments200Response,\n ListJobDocumentsDefaultResponse,\n CancelJob200Response,\n CancelJobDefaultResponse,\n DeidentifyText200Response,\n DeidentifyTextDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /jobs/{name}\": [\"200\"],\n \"PUT /jobs/{name}\": [\"200\", \"201\"],\n \"DELETE /jobs/{name}\": [\"204\"],\n \"GET /jobs\": [\"200\"],\n \"GET /jobs/{name}/documents\": [\"200\"],\n \"POST /jobs/{name}:cancel\": [\"200\"],\n \"POST /deid\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response:\n | DeidentifyDocuments200Response\n | DeidentifyDocuments201Response\n | DeidentifyDocumentsLogicalResponse\n | DeidentifyDocumentsDefaultResponse,\n): response is DeidentifyDocumentsDefaultResponse;\nexport function isUnexpected(\n response: DeleteJob204Response | DeleteJobDefaultResponse,\n): response is DeleteJobDefaultResponse;\nexport function isUnexpected(\n response: ListJobs200Response | ListJobsDefaultResponse,\n): response is ListJobsDefaultResponse;\nexport function isUnexpected(\n response: ListJobDocuments200Response | ListJobDocumentsDefaultResponse,\n): response is ListJobDocumentsDefaultResponse;\nexport function isUnexpected(\n response: CancelJob200Response | CancelJobDefaultResponse,\n): response is CancelJobDefaultResponse;\nexport function isUnexpected(\n response: DeidentifyText200Response | DeidentifyTextDefaultResponse,\n): response is DeidentifyTextDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | DeidentifyDocuments200Response\n | DeidentifyDocuments201Response\n | DeidentifyDocumentsLogicalResponse\n | DeidentifyDocumentsDefaultResponse\n | DeleteJob204Response\n | DeleteJobDefaultResponse\n | ListJobs200Response\n | ListJobsDefaultResponse\n | ListJobDocuments200Response\n | ListJobDocumentsDefaultResponse\n | CancelJob200Response\n | CancelJobDefaultResponse\n | DeidentifyText200Response\n | DeidentifyTextDefaultResponse,\n): response is\n | GetJobDefaultResponse\n | DeidentifyDocumentsDefaultResponse\n | DeleteJobDefaultResponse\n | ListJobsDefaultResponse\n | ListJobDocumentsDefaultResponse\n | CancelJobDefaultResponse\n | DeidentifyTextDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createClientLogger } from "@azure/logger";
4
4
  export const logger = createClientLogger("health-deidentification");
5
5
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,yBAAyB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-deidentification\");\n"]}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,yBAAyB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-deidentification\");\n"]}
@@ -1,23 +1,17 @@
1
1
  /** A job containing a batch of documents to de-identify. */
2
2
  export interface DeidentificationJob {
3
- /** Storage location to perform the operation on. */
4
- sourceLocation: SourceStorageLocation;
5
- /** Target location to store output of operation. */
6
- targetLocation: TargetStorageLocation;
7
3
  /**
8
4
  * Operation to perform on the input documents.
9
5
  *
10
6
  * Possible values: "Redact", "Surrogate", "Tag"
11
7
  */
12
- operation?: OperationType;
13
- /**
14
- * Data type of the input documents.
15
- *
16
- * Possible values: "Plaintext"
17
- */
18
- dataType?: DocumentDataType;
19
- /** Format of the redacted output. Only valid when Operation is Redact. */
20
- redactionFormat?: string;
8
+ operation?: DeidentificationOperationType;
9
+ /** Storage location to perform the operation on. */
10
+ sourceLocation: SourceStorageLocation;
11
+ /** Target location to store output of operation. */
12
+ targetLocation: TargetStorageLocation;
13
+ /** Customization parameters to override default service behaviors. */
14
+ customizations?: DeidentificationJobCustomizationOptions;
21
15
  }
22
16
  /** Storage location. */
23
17
  export interface SourceStorageLocation {
@@ -32,11 +26,32 @@ export interface SourceStorageLocation {
32
26
  export interface TargetStorageLocation {
33
27
  /** URL to storage location. */
34
28
  location: string;
35
- /** Prefix to filter path by. */
29
+ /**
30
+ * Replaces the input prefix of a file path with the output prefix, preserving the rest of the path structure.
31
+ *
32
+ * Example:
33
+ * File full path: documents/user/note.txt
34
+ * Input Prefix: "documents/user/"
35
+ * Output Prefix: "output_docs/"
36
+ *
37
+ * Output file: "output_docs/note.txt"
38
+ */
36
39
  prefix: string;
40
+ /** When set to true during a job, the service will overwrite the output location if it already exists. */
41
+ overwrite?: boolean;
42
+ }
43
+ /** Customizations options to override default service behaviors for job usage. */
44
+ export interface DeidentificationJobCustomizationOptions {
45
+ /**
46
+ * Format of the redacted output. Only valid when Operation is Redact.
47
+ * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.
48
+ */
49
+ redactionFormat?: string;
50
+ /** Locale in which the output surrogates are written. */
51
+ surrogateLocale?: string;
37
52
  }
38
53
  /** Summary metrics of a job. */
39
- export interface JobSummary {
54
+ export interface DeidentificationJobSummary {
40
55
  /** Number of documents that have completed. */
41
56
  successful: number;
42
57
  /** Number of documents that have failed. */
@@ -53,24 +68,26 @@ export interface DeidentificationContent {
53
68
  /** Input text to de-identify. */
54
69
  inputText: string;
55
70
  /**
56
- * Operation to perform on the input.
71
+ * Operation to perform on the input documents.
57
72
  *
58
73
  * Possible values: "Redact", "Surrogate", "Tag"
59
74
  */
60
- operation?: OperationType;
75
+ operation?: DeidentificationOperationType;
76
+ /** Customization parameters to override default service behaviors. */
77
+ customizations?: DeidentificationCustomizationOptions;
78
+ }
79
+ /** Customizations options to override default service behaviors for synchronous usage. */
80
+ export interface DeidentificationCustomizationOptions {
61
81
  /**
62
- * Data type of the input.
63
- *
64
- * Possible values: "Plaintext"
82
+ * Format of the redacted output. Only valid when Operation is Redact.
83
+ * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.
65
84
  */
66
- dataType?: DocumentDataType;
67
- /** Format of the redacted output. Only valid when OperationType is "Redact". */
68
85
  redactionFormat?: string;
86
+ /** Locale in which the output surrogates are written. */
87
+ surrogateLocale?: string;
69
88
  }
70
- /** Alias for OperationType */
71
- export type OperationType = string;
72
- /** Alias for DocumentDataType */
73
- export type DocumentDataType = string;
74
- /** Alias for JobStatus */
75
- export type JobStatus = string;
89
+ /** Alias for DeidentificationOperationType */
90
+ export type DeidentificationOperationType = string;
91
+ /** Alias for OperationState */
92
+ export type OperationState = string;
76
93
  //# sourceMappingURL=models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,cAAc,EAAE,qBAAqB,CAAC;IACtC,oDAAoD;IACpD,cAAc,EAAE,qBAAqB,CAAC;IACtC;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAwB;AACxB,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,w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under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** A job containing a batch of documents to de-identify. */\nexport interface DeidentificationJob {\n /** Storage location to perform the operation on. */\n sourceLocation: SourceStorageLocation;\n /** Target location to store output of operation. */\n targetLocation: TargetStorageLocation;\n /**\n * Operation to perform on the input documents.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: OperationType;\n /**\n * Data type of the input documents.\n *\n * Possible values: \"Plaintext\"\n */\n dataType?: DocumentDataType;\n /** Format of the redacted output. Only valid when Operation is Redact. */\n redactionFormat?: string;\n}\n\n/** Storage location. */\nexport interface SourceStorageLocation {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n /** List of extensions to filter path by. */\n extensions?: string[];\n}\n\n/** Storage location. */\nexport interface TargetStorageLocation {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n}\n\n/** Summary metrics of a job. */\nexport interface JobSummary {\n /** Number of documents that have completed. */\n successful: number;\n /** Number of documents that have failed. */\n failed: number;\n /** Number of documents that have been canceled. */\n canceled: number;\n /** Number of documents total. */\n total: number;\n /** Number of bytes processed. */\n bytesProcessed: number;\n}\n\n/** Request body for de-identification operation. */\nexport interface DeidentificationContent {\n /** Input text to de-identify. */\n inputText: string;\n /**\n * Operation to perform on the input.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: OperationType;\n /**\n * Data type of the input.\n *\n * Possible values: \"Plaintext\"\n */\n dataType?: DocumentDataType;\n /** Format of the redacted output. Only valid when OperationType is \"Redact\". */\n redactionFormat?: string;\n}\n\n/** Alias for OperationType */\nexport type OperationType = string;\n/** Alias for DocumentDataType */\nexport type DocumentDataType = string;\n/** Alias for JobStatus */\nexport type JobStatus = string;\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A job containing a batch of documents to de-identify. */\nexport interface DeidentificationJob {\n /**\n * Operation to perform on the input documents.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: DeidentificationOperationType;\n /** Storage location to perform the operation on. */\n sourceLocation: SourceStorageLocation;\n /** Target location to store output of operation. */\n targetLocation: TargetStorageLocation;\n /** Customization parameters to override default service behaviors. */\n customizations?: DeidentificationJobCustomizationOptions;\n}\n\n/** Storage location. */\nexport interface SourceStorageLocation {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n /** List of extensions to filter path by. */\n extensions?: string[];\n}\n\n/** Storage location. */\nexport interface TargetStorageLocation {\n /** URL to storage location. */\n location: string;\n /**\n * Replaces the input prefix of a file path with the output prefix, preserving the rest of the path structure.\n *\n * Example:\n * File full path: documents/user/note.txt\n * Input Prefix: \"documents/user/\"\n * Output Prefix: \"output_docs/\"\n *\n * Output file: \"output_docs/note.txt\"\n */\n prefix: string;\n /** When set to true during a job, the service will overwrite the output location if it already exists. */\n overwrite?: boolean;\n}\n\n/** Customizations options to override default service behaviors for job usage. */\nexport interface DeidentificationJobCustomizationOptions {\n /**\n * Format of the redacted output. Only valid when Operation is Redact.\n * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.\n */\n redactionFormat?: string;\n /** Locale in which the output surrogates are written. */\n surrogateLocale?: string;\n}\n\n/** Summary metrics of a job. */\nexport interface DeidentificationJobSummary {\n /** Number of documents that have completed. */\n successful: number;\n /** Number of documents that have failed. */\n failed: number;\n /** Number of documents that have been canceled. */\n canceled: number;\n /** Number of documents total. */\n total: number;\n /** Number of bytes processed. */\n bytesProcessed: number;\n}\n\n/** Request body for de-identification operation. */\nexport interface DeidentificationContent {\n /** Input text to de-identify. */\n inputText: string;\n /**\n * Operation to perform on the input documents.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: DeidentificationOperationType;\n /** Customization parameters to override default service behaviors. */\n customizations?: DeidentificationCustomizationOptions;\n}\n\n/** Customizations options to override default service behaviors for synchronous usage. */\nexport interface DeidentificationCustomizationOptions {\n /**\n * Format of the redacted output. Only valid when Operation is Redact.\n * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.\n */\n redactionFormat?: string;\n /** Locale in which the output surrogates are written. */\n surrogateLocale?: string;\n}\n\n/** Alias for DeidentificationOperationType */\nexport type DeidentificationOperationType = string;\n/** Alias for OperationState */\nexport type OperationState = string;\n"]}
@@ -1,33 +1,26 @@
1
- import { Paged } from "@azure/core-paging";
2
- import { ErrorModel } from "@azure-rest/core-client";
1
+ import type { ErrorModel } from "@azure-rest/core-client";
3
2
  /** A job containing a batch of documents to de-identify. */
4
3
  export interface DeidentificationJobOutput {
5
4
  /** The name of a job. */
6
5
  readonly name: string;
7
- /** Storage location to perform the operation on. */
8
- sourceLocation: SourceStorageLocationOutput;
9
- /** Target location to store output of operation. */
10
- targetLocation: TargetStorageLocationOutput;
11
6
  /**
12
7
  * Operation to perform on the input documents.
13
8
  *
14
9
  * Possible values: "Redact", "Surrogate", "Tag"
15
10
  */
16
- operation?: OperationTypeOutput;
17
- /**
18
- * Data type of the input documents.
19
- *
20
- * Possible values: "Plaintext"
21
- */
22
- dataType?: DocumentDataTypeOutput;
23
- /** Format of the redacted output. Only valid when Operation is Redact. */
24
- redactionFormat?: string;
11
+ operation?: DeidentificationOperationTypeOutput;
12
+ /** Storage location to perform the operation on. */
13
+ sourceLocation: SourceStorageLocationOutput;
14
+ /** Target location to store output of operation. */
15
+ targetLocation: TargetStorageLocationOutput;
16
+ /** Customization parameters to override default service behaviors. */
17
+ customizations?: DeidentificationJobCustomizationOptionsOutput;
25
18
  /**
26
19
  * Current status of a job.
27
20
  *
28
- * Possible values: "NotStarted", "Running", "Succeeded", "PartialFailed", "Failed", "Canceled"
21
+ * Possible values: "NotStarted", "Running", "Succeeded", "Failed", "Canceled"
29
22
  */
30
- readonly status: JobStatusOutput;
23
+ readonly status: OperationStateOutput;
31
24
  /** Error when job fails in it's entirety. */
32
25
  readonly error?: ErrorModel;
33
26
  /**
@@ -43,7 +36,7 @@ export interface DeidentificationJobOutput {
43
36
  /** Date and time when the job was started. */
44
37
  readonly startedAt?: string;
45
38
  /** Summary of a job. Exists only when the job is completed. */
46
- readonly summary?: JobSummaryOutput;
39
+ readonly summary?: DeidentificationJobSummaryOutput;
47
40
  }
48
41
  /** Storage location. */
49
42
  export interface SourceStorageLocationOutput {
@@ -58,11 +51,32 @@ export interface SourceStorageLocationOutput {
58
51
  export interface TargetStorageLocationOutput {
59
52
  /** URL to storage location. */
60
53
  location: string;
61
- /** Prefix to filter path by. */
54
+ /**
55
+ * Replaces the input prefix of a file path with the output prefix, preserving the rest of the path structure.
56
+ *
57
+ * Example:
58
+ * File full path: documents/user/note.txt
59
+ * Input Prefix: "documents/user/"
60
+ * Output Prefix: "output_docs/"
61
+ *
62
+ * Output file: "output_docs/note.txt"
63
+ */
62
64
  prefix: string;
65
+ /** When set to true during a job, the service will overwrite the output location if it already exists. */
66
+ overwrite?: boolean;
67
+ }
68
+ /** Customizations options to override default service behaviors for job usage. */
69
+ export interface DeidentificationJobCustomizationOptionsOutput {
70
+ /**
71
+ * Format of the redacted output. Only valid when Operation is Redact.
72
+ * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.
73
+ */
74
+ redactionFormat?: string;
75
+ /** Locale in which the output surrogates are written. */
76
+ surrogateLocale?: string;
63
77
  }
64
78
  /** Summary metrics of a job. */
65
- export interface JobSummaryOutput {
79
+ export interface DeidentificationJobSummaryOutput {
66
80
  /** Number of documents that have completed. */
67
81
  successful: number;
68
82
  /** Number of documents that have failed. */
@@ -74,14 +88,28 @@ export interface JobSummaryOutput {
74
88
  /** Number of bytes processed. */
75
89
  bytesProcessed: number;
76
90
  }
91
+ /** Paged collection of DeidentificationJob items */
92
+ export interface PagedDeidentificationJobOutput {
93
+ /** The DeidentificationJob items on this page */
94
+ value: Array<DeidentificationJobOutput>;
95
+ /** The link to the next page of items */
96
+ nextLink?: string;
97
+ }
98
+ /** Paged collection of DeidentificationDocumentDetails items */
99
+ export interface PagedDeidentificationDocumentDetailsOutput {
100
+ /** The DeidentificationDocumentDetails items on this page */
101
+ value: Array<DeidentificationDocumentDetailsOutput>;
102
+ /** The link to the next page of items */
103
+ nextLink?: string;
104
+ }
77
105
  /** Details of a single document in a job. */
78
- export interface DocumentDetailsOutput {
106
+ export interface DeidentificationDocumentDetailsOutput {
79
107
  /** Id of the document details. */
80
108
  readonly id: string;
81
109
  /** Location for the input. */
82
- input: DocumentLocationOutput;
110
+ input: DeidentificationDocumentLocationOutput;
83
111
  /** Location for the output. */
84
- output?: DocumentLocationOutput;
112
+ output?: DeidentificationDocumentLocationOutput;
85
113
  /**
86
114
  * Status of the document.
87
115
  *
@@ -92,9 +120,9 @@ export interface DocumentDetailsOutput {
92
120
  error?: ErrorModel;
93
121
  }
94
122
  /** Location of a document. */
95
- export interface DocumentLocationOutput {
96
- /** Path of document in storage. */
97
- path: string;
123
+ export interface DeidentificationDocumentLocationOutput {
124
+ /** Location of document in storage. */
125
+ location: string;
98
126
  /** The entity tag for this resource. */
99
127
  readonly etag: string;
100
128
  }
@@ -109,10 +137,6 @@ export interface DeidentificationResultOutput {
109
137
  export interface PhiTaggerResultOutput {
110
138
  /** List of entities detected in the input. */
111
139
  entities: Array<PhiEntityOutput>;
112
- /** Path to the document in storage. */
113
- path?: string;
114
- /** The entity tag for this resource. */
115
- etag?: string;
116
140
  }
117
141
  /** PHI Entity tag in the input. */
118
142
  export interface PhiEntityOutput {
@@ -148,16 +172,8 @@ export interface StringIndexOutput {
148
172
  */
149
173
  codePoint: number;
150
174
  }
151
- /** Alias for OperationTypeOutput */
152
- export type OperationTypeOutput = string;
153
- /** Alias for DocumentDataTypeOutput */
154
- export type DocumentDataTypeOutput = string;
155
- /** Alias for JobStatusOutput */
156
- export type JobStatusOutput = string;
157
- /** Paged collection of DeidentificationJob items */
158
- export type PagedDeidentificationJobOutput = Paged<DeidentificationJobOutput>;
159
- /** Paged collection of DocumentDetails items */
160
- export type PagedDocumentDetailsOutput = Paged<DocumentDetailsOutput>;
175
+ /** Alias for DeidentificationOperationTypeOutput */
176
+ export type DeidentificationOperationTypeOutput = string;
161
177
  /** Alias for OperationStateOutput */
162
178
  export type OperationStateOutput = string;
163
179
  /** Alias for PhiCategoryOutput */
@@ -1 +1 @@
1
- {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,yBAAyB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,cAAc,EAAE,2BAA2B,CAAC;IAC5C,oDAAoD;IACpD,cAAc,EAAE,2BAA2B,CAAC;IAC5C;;;;OAIG;IACH,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,0EAA0E;IAC1E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,8CAA8C;IAC9C,QAAQ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ACvB;AAED,qDAAqD;AACrD,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAED,qCAAqC;AACrC,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAClC;AAED,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,iEAAiE;IACjE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gCAAgC;IAChC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,mCAAmC;AACnC,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oDAAoD;AACpD,MAAM,MAAM,mCAAmC,GAAG,MAAM,CAAC;AACzD,qCAAqC;AACrC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAC1C,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=outputModels.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Paged } from \"@azure/core-paging\";\nimport { ErrorModel } from \"@azure-rest/core-client\";\n\n/** A job containing a batch of documents to de-identify. */\nexport interface DeidentificationJobOutput {\n /** The name of a job. */\n readonly name: string;\n /** Storage location to perform the operation on. */\n sourceLocation: SourceStorageLocationOutput;\n /** Target location to store output of operation. */\n targetLocation: TargetStorageLocationOutput;\n /**\n * Operation to perform on the input documents.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: OperationTypeOutput;\n /**\n * Data type of the input documents.\n *\n * Possible values: \"Plaintext\"\n */\n dataType?: DocumentDataTypeOutput;\n /** Format of the redacted output. Only valid when Operation is Redact. */\n redactionFormat?: string;\n /**\n * Current status of a job.\n *\n * Possible values: \"NotStarted\", \"Running\", \"Succeeded\", \"PartialFailed\", \"Failed\", \"Canceled\"\n */\n readonly status: JobStatusOutput;\n /** Error when job fails in it's entirety. */\n readonly error?: ErrorModel;\n /**\n * Date and time when the job was completed.\n *\n * If the job is canceled, this is the time when the job was canceled.\n *\n * If the job failed, this is the time when the job failed.\n */\n readonly lastUpdatedAt: string;\n /** Date and time when the job was created. */\n readonly createdAt: string;\n /** Date and time when the job was started. */\n readonly startedAt?: string;\n /** Summary of a job. Exists only when the job is completed. */\n readonly summary?: JobSummaryOutput;\n}\n\n/** Storage location. */\nexport interface SourceStorageLocationOutput {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n /** List of extensions to filter path by. */\n extensions?: string[];\n}\n\n/** Storage location. */\nexport interface TargetStorageLocationOutput {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n}\n\n/** Summary metrics of a job. */\nexport interface JobSummaryOutput {\n /** Number of documents that have completed. */\n successful: number;\n /** Number of documents that have failed. */\n failed: number;\n /** Number of documents that have been canceled. */\n canceled: number;\n /** Number of documents total. */\n total: number;\n /** Number of bytes processed. */\n bytesProcessed: number;\n}\n\n/** Details of a single document in a job. */\nexport interface DocumentDetailsOutput {\n /** Id of the document details. */\n readonly id: string;\n /** Location for the input. */\n input: DocumentLocationOutput;\n /** Location for the output. */\n output?: DocumentLocationOutput;\n /**\n * Status of the document.\n *\n * Possible values: \"NotStarted\", \"Running\", \"Succeeded\", \"Failed\", \"Canceled\"\n */\n status: OperationStateOutput;\n /** Error when document fails. */\n error?: ErrorModel;\n}\n\n/** Location of a document. */\nexport interface DocumentLocationOutput {\n /** Path of document in storage. */\n path: string;\n /** The entity tag for this resource. */\n readonly etag: string;\n}\n\n/** Response body for de-identification operation. */\nexport interface DeidentificationResultOutput {\n /** Output text after de-identification. Not available for \"Tag\" operation. */\n outputText?: string;\n /** Result of the \"Tag\" operation. Only available for \"Tag\" Operation. */\n taggerResult?: PhiTaggerResultOutput;\n}\n\n/** Result of the \"Tag\" operation. */\nexport interface PhiTaggerResultOutput {\n /** List of entities detected in the input. */\n entities: Array<PhiEntityOutput>;\n /** Path to the document in storage. */\n path?: string;\n /** The entity tag for this resource. */\n etag?: string;\n}\n\n/** PHI Entity tag in the input. */\nexport interface PhiEntityOutput {\n /**\n * PHI Category of the entity.\n *\n * Possible values: \"Unknown\", \"Account\", \"Age\", \"BioID\", \"City\", \"CountryOrRegion\", \"Date\", \"Device\", \"Doctor\", \"Email\", \"Fax\", \"HealthPlan\", \"Hospital\", \"IDNum\", \"IPAddress\", \"License\", \"LocationOther\", \"MedicalRecord\", \"Organization\", \"Patient\", \"Phone\", \"Profession\", \"SocialSecurity\", \"State\", \"Street\", \"Url\", \"Username\", \"Vehicle\", \"Zip\"\n */\n category: PhiCategoryOutput;\n /** Starting index of the location from within the input text. */\n offset: StringIndexOutput;\n /** Length of the input text. */\n length: StringIndexOutput;\n /** Text of the entity. */\n text?: string;\n /** Confidence score of the category match. */\n confidenceScore?: number;\n}\n\n/** String index encoding model. */\nexport interface StringIndexOutput {\n /** The offset or length of the substring in UTF-8 encoding */\n utf8: number;\n /**\n * The offset or length of the substring in UTF-16 encoding.\n *\n * Primary encoding used by .NET, Java, and JavaScript.\n */\n utf16: number;\n /**\n * The offset or length of the substring in CodePoint encoding.\n *\n * Primary encoding used by Python.\n */\n codePoint: number;\n}\n\n/** Alias for OperationTypeOutput */\nexport type OperationTypeOutput = string;\n/** Alias for DocumentDataTypeOutput */\nexport type DocumentDataTypeOutput = string;\n/** Alias for JobStatusOutput */\nexport type JobStatusOutput = string;\n/** Paged collection of DeidentificationJob items */\nexport type PagedDeidentificationJobOutput = Paged<DeidentificationJobOutput>;\n/** Paged collection of DocumentDetails items */\nexport type PagedDocumentDetailsOutput = Paged<DocumentDetailsOutput>;\n/** Alias for OperationStateOutput */\nexport type OperationStateOutput = string;\n/** Alias for PhiCategoryOutput */\nexport type PhiCategoryOutput = string;\n"]}
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ErrorModel } from \"@azure-rest/core-client\";\n\n/** A job containing a batch of documents to de-identify. */\nexport interface DeidentificationJobOutput {\n /** The name of a job. */\n readonly name: string;\n /**\n * Operation to perform on the input documents.\n *\n * Possible values: \"Redact\", \"Surrogate\", \"Tag\"\n */\n operation?: DeidentificationOperationTypeOutput;\n /** Storage location to perform the operation on. */\n sourceLocation: SourceStorageLocationOutput;\n /** Target location to store output of operation. */\n targetLocation: TargetStorageLocationOutput;\n /** Customization parameters to override default service behaviors. */\n customizations?: DeidentificationJobCustomizationOptionsOutput;\n /**\n * Current status of a job.\n *\n * Possible values: \"NotStarted\", \"Running\", \"Succeeded\", \"Failed\", \"Canceled\"\n */\n readonly status: OperationStateOutput;\n /** Error when job fails in it's entirety. */\n readonly error?: ErrorModel;\n /**\n * Date and time when the job was completed.\n *\n * If the job is canceled, this is the time when the job was canceled.\n *\n * If the job failed, this is the time when the job failed.\n */\n readonly lastUpdatedAt: string;\n /** Date and time when the job was created. */\n readonly createdAt: string;\n /** Date and time when the job was started. */\n readonly startedAt?: string;\n /** Summary of a job. Exists only when the job is completed. */\n readonly summary?: DeidentificationJobSummaryOutput;\n}\n\n/** Storage location. */\nexport interface SourceStorageLocationOutput {\n /** URL to storage location. */\n location: string;\n /** Prefix to filter path by. */\n prefix: string;\n /** List of extensions to filter path by. */\n extensions?: string[];\n}\n\n/** Storage location. */\nexport interface TargetStorageLocationOutput {\n /** URL to storage location. */\n location: string;\n /**\n * Replaces the input prefix of a file path with the output prefix, preserving the rest of the path structure.\n *\n * Example:\n * File full path: documents/user/note.txt\n * Input Prefix: \"documents/user/\"\n * Output Prefix: \"output_docs/\"\n *\n * Output file: \"output_docs/note.txt\"\n */\n prefix: string;\n /** When set to true during a job, the service will overwrite the output location if it already exists. */\n overwrite?: boolean;\n}\n\n/** Customizations options to override default service behaviors for job usage. */\nexport interface DeidentificationJobCustomizationOptionsOutput {\n /**\n * Format of the redacted output. Only valid when Operation is Redact.\n * Please refer to https://learn.microsoft.com/en-us/azure/healthcare-apis/deidentification/redaction-format for more details.\n */\n redactionFormat?: string;\n /** Locale in which the output surrogates are written. */\n surrogateLocale?: string;\n}\n\n/** Summary metrics of a job. */\nexport interface DeidentificationJobSummaryOutput {\n /** Number of documents that have completed. */\n successful: number;\n /** Number of documents that have failed. */\n failed: number;\n /** Number of documents that have been canceled. */\n canceled: number;\n /** Number of documents total. */\n total: number;\n /** Number of bytes processed. */\n bytesProcessed: number;\n}\n\n/** Paged collection of DeidentificationJob items */\nexport interface PagedDeidentificationJobOutput {\n /** The DeidentificationJob items on this page */\n value: Array<DeidentificationJobOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Paged collection of DeidentificationDocumentDetails items */\nexport interface PagedDeidentificationDocumentDetailsOutput {\n /** The DeidentificationDocumentDetails items on this page */\n value: Array<DeidentificationDocumentDetailsOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Details of a single document in a job. */\nexport interface DeidentificationDocumentDetailsOutput {\n /** Id of the document details. */\n readonly id: string;\n /** Location for the input. */\n input: DeidentificationDocumentLocationOutput;\n /** Location for the output. */\n output?: DeidentificationDocumentLocationOutput;\n /**\n * Status of the document.\n *\n * Possible values: \"NotStarted\", \"Running\", \"Succeeded\", \"Failed\", \"Canceled\"\n */\n status: OperationStateOutput;\n /** Error when document fails. */\n error?: ErrorModel;\n}\n\n/** Location of a document. */\nexport interface DeidentificationDocumentLocationOutput {\n /** Location of document in storage. */\n location: string;\n /** The entity tag for this resource. */\n readonly etag: string;\n}\n\n/** Response body for de-identification operation. */\nexport interface DeidentificationResultOutput {\n /** Output text after de-identification. Not available for \"Tag\" operation. */\n outputText?: string;\n /** Result of the \"Tag\" operation. Only available for \"Tag\" Operation. */\n taggerResult?: PhiTaggerResultOutput;\n}\n\n/** Result of the \"Tag\" operation. */\nexport interface PhiTaggerResultOutput {\n /** List of entities detected in the input. */\n entities: Array<PhiEntityOutput>;\n}\n\n/** PHI Entity tag in the input. */\nexport interface PhiEntityOutput {\n /**\n * PHI Category of the entity.\n *\n * Possible values: \"Unknown\", \"Account\", \"Age\", \"BioID\", \"City\", \"CountryOrRegion\", \"Date\", \"Device\", \"Doctor\", \"Email\", \"Fax\", \"HealthPlan\", \"Hospital\", \"IDNum\", \"IPAddress\", \"License\", \"LocationOther\", \"MedicalRecord\", \"Organization\", \"Patient\", \"Phone\", \"Profession\", \"SocialSecurity\", \"State\", \"Street\", \"Url\", \"Username\", \"Vehicle\", \"Zip\"\n */\n category: PhiCategoryOutput;\n /** Starting index of the location from within the input text. */\n offset: StringIndexOutput;\n /** Length of the input text. */\n length: StringIndexOutput;\n /** Text of the entity. */\n text?: string;\n /** Confidence score of the category match. */\n confidenceScore?: number;\n}\n\n/** String index encoding model. */\nexport interface StringIndexOutput {\n /** The offset or length of the substring in UTF-8 encoding */\n utf8: number;\n /**\n * The offset or length of the substring in UTF-16 encoding.\n *\n * Primary encoding used by .NET, Java, and JavaScript.\n */\n utf16: number;\n /**\n * The offset or length of the substring in CodePoint encoding.\n *\n * Primary encoding used by Python.\n */\n codePoint: number;\n}\n\n/** Alias for DeidentificationOperationTypeOutput */\nexport type DeidentificationOperationTypeOutput = string;\n/** Alias for OperationStateOutput */\nexport type OperationStateOutput = string;\n/** Alias for PhiCategoryOutput */\nexport type PhiCategoryOutput = string;\n"]}
@@ -1,5 +1,30 @@
1
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
- import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
+ /**
3
+ * An interface that tracks the settings for paged iteration
4
+ */
5
+ export interface PageSettings {
6
+ /**
7
+ * The token that keeps track of where to continue the iterator
8
+ */
9
+ continuationToken?: string;
10
+ }
11
+ /**
12
+ * An interface that allows async iterable iteration both to completion and by page.
13
+ */
14
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings = PageSettings> {
15
+ /**
16
+ * The next method, part of the iteration protocol
17
+ */
18
+ next(): Promise<IteratorResult<TElement>>;
19
+ /**
20
+ * The connection to the async iterator, part of the iteration protocol
21
+ */
22
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
23
+ /**
24
+ * Return an AsyncIterableIterator that works a page at a time
25
+ */
26
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
27
+ }
3
28
  /**
4
29
  * Helper type to extract the type of an array
5
30
  */
@@ -7,7 +32,7 @@ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
7
32
  /**
8
33
  * The type of a custom function that defines how to get a page and a link to the next one if any.
9
34
  */
10
- export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
35
+ export type GetPage<TPage> = (pageLink: string) => Promise<{
11
36
  page: TPage;
12
37
  nextPageLink?: string;
13
38
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,0BAA0B,EAAe,MAAM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,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA0BvD"}
@@ -1,7 +1,104 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getPagedAsyncIterator } from "@azure/core-paging";
2
+ // Licensed under the MIT License.
3
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
4
4
  import { createRestError } from "@azure-rest/core-client";
5
+ /**
6
+ * returns an async iterator that iterates over results. It also has a `byPage`
7
+ * method that returns pages of items at once.
8
+ *
9
+ * @param pagedResult - an object that specifies how to get pages.
10
+ * @returns a paged async iterator that iterates over results.
11
+ */
12
+ function getPagedAsyncIterator(pagedResult) {
13
+ var _a;
14
+ const iter = getItemAsyncIterator(pagedResult);
15
+ return {
16
+ next() {
17
+ return iter.next();
18
+ },
19
+ [Symbol.asyncIterator]() {
20
+ return this;
21
+ },
22
+ byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
23
+ const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
24
+ return getPageAsyncIterator(pagedResult, {
25
+ pageLink: continuationToken,
26
+ });
27
+ }),
28
+ };
29
+ }
30
+ function getItemAsyncIterator(pagedResult) {
31
+ return __asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
32
+ var _a, e_1, _b, _c, _d, e_2, _e, _f;
33
+ const pages = getPageAsyncIterator(pagedResult);
34
+ const firstVal = yield __await(pages.next());
35
+ // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
36
+ if (!Array.isArray(firstVal.value)) {
37
+ // can extract elements from this page
38
+ const { toElements } = pagedResult;
39
+ if (toElements) {
40
+ yield __await(yield* __asyncDelegator(__asyncValues(toElements(firstVal.value))));
41
+ try {
42
+ for (var _g = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {
43
+ _c = pages_1_1.value;
44
+ _g = false;
45
+ const page = _c;
46
+ yield __await(yield* __asyncDelegator(__asyncValues(toElements(page))));
47
+ }
48
+ }
49
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
50
+ finally {
51
+ try {
52
+ if (!_g && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));
53
+ }
54
+ finally { if (e_1) throw e_1.error; }
55
+ }
56
+ }
57
+ else {
58
+ yield yield __await(firstVal.value);
59
+ // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
60
+ yield __await(yield* __asyncDelegator(__asyncValues(pages)));
61
+ }
62
+ }
63
+ else {
64
+ yield __await(yield* __asyncDelegator(__asyncValues(firstVal.value)));
65
+ try {
66
+ for (var _h = true, pages_2 = __asyncValues(pages), pages_2_1; pages_2_1 = yield __await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {
67
+ _f = pages_2_1.value;
68
+ _h = false;
69
+ const page = _f;
70
+ // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
71
+ // it must be the case that `TPage = TElement[]`
72
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
+ }
74
+ }
75
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
76
+ finally {
77
+ try {
78
+ if (!_h && !_d && (_e = pages_2.return)) yield __await(_e.call(pages_2));
79
+ }
80
+ finally { if (e_2) throw e_2.error; }
81
+ }
82
+ }
83
+ });
84
+ }
85
+ function getPageAsyncIterator(pagedResult_1) {
86
+ return __asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
87
+ const { pageLink } = options;
88
+ let response = yield __await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
89
+ if (!response) {
90
+ return yield __await(void 0);
91
+ }
92
+ yield yield __await(response.page);
93
+ while (response.nextPageLink) {
94
+ response = yield __await(pagedResult.getPage(response.nextPageLink));
95
+ if (!response) {
96
+ return yield __await(void 0);
97
+ }
98
+ yield yield __await(response.page);
99
+ }
100
+ });
101
+ }
5
102
  /**
6
103
  * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
7
104
  * @param client - Client to use for sending the next page requests