@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":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,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K,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"paginateH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CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
2
- import { RequestParameters } from "@azure-rest/core-client";
3
- import { DeidentificationJob, DeidentificationContent } from "./models.js";
1
+ import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
2
+ import type { RequestParameters } from "@azure-rest/core-client";
3
+ import type { DeidentificationJob, DeidentificationContent } from "./models.js";
4
4
  export interface GetJobHeaders {
5
5
  /** An opaque, globally-unique, client-generated string identifier for the request. */
6
6
  "x-ms-client-request-id"?: string;
@@ -9,18 +9,18 @@ export interface GetJobHeaderParam {
9
9
  headers?: RawHttpHeadersInput & GetJobHeaders;
10
10
  }
11
11
  export type GetJobParameters = GetJobHeaderParam & RequestParameters;
12
- export interface CreateJobHeaders {
12
+ export interface DeidentifyDocumentsHeaders {
13
13
  /** An opaque, globally-unique, client-generated string identifier for the request. */
14
14
  "x-ms-client-request-id"?: string;
15
15
  }
16
- export interface CreateJobBodyParam {
16
+ export interface DeidentifyDocumentsBodyParam {
17
17
  /** The resource instance. */
18
18
  body: DeidentificationJob;
19
19
  }
20
- export interface CreateJobHeaderParam {
21
- headers?: RawHttpHeadersInput & CreateJobHeaders;
20
+ export interface DeidentifyDocumentsHeaderParam {
21
+ headers?: RawHttpHeadersInput & DeidentifyDocumentsHeaders;
22
22
  }
23
- export type CreateJobParameters = CreateJobHeaderParam & CreateJobBodyParam & RequestParameters;
23
+ export type DeidentifyDocumentsParameters = DeidentifyDocumentsHeaderParam & DeidentifyDocumentsBodyParam & RequestParameters;
24
24
  export interface ListJobsHeaders {
25
25
  /** An opaque, globally-unique, client-generated string identifier for the request. */
26
26
  "x-ms-client-request-id"?: string;
@@ -71,9 +71,16 @@ export interface DeleteJobHeaderParam {
71
71
  headers?: RawHttpHeadersInput & DeleteJobHeaders;
72
72
  }
73
73
  export type DeleteJobParameters = DeleteJobHeaderParam & RequestParameters;
74
- export interface DeidentifyBodyParam {
74
+ export interface DeidentifyTextHeaders {
75
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
76
+ "x-ms-client-request-id"?: string;
77
+ }
78
+ export interface DeidentifyTextBodyParam {
75
79
  /** Request body for de-identification operation. */
76
80
  body: DeidentificationContent;
77
81
  }
78
- export type DeidentifyParameters = DeidentifyBodyParam & RequestParameters;
82
+ export interface DeidentifyTextHeaderParam {
83
+ headers?: RawHttpHeadersInput & DeidentifyTextHeaders;
84
+ }
85
+ export type DeidentifyTextParameters = DeidentifyTextHeaderParam & DeidentifyTextBodyParam & RequestParameters;
79
86
  //# sourceMappingURL=parameters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,WAAW,aAAa;IAC5B,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,mBAAmB,GAAG,aAAa,CAAC;CAC/C;AAED,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAErE,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,wBAAwB,CAA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mB,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAE3E,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,mBAAmB,GAAG,gBAAgB,CAAC;CAClD;AAED,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACpC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;CACvD;AAED,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAC9D,uBAAuB,GACvB,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=parameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { DeidentificationJob, DeidentificationContent } from \"./models.js\";\n\nexport interface GetJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetJobHeaderParam {\n headers?: RawHttpHeadersInput & GetJobHeaders;\n}\n\nexport type GetJobParameters = GetJobHeaderParam & RequestParameters;\n\nexport interface CreateJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface CreateJobBodyParam {\n /** The resource instance. */\n body: DeidentificationJob;\n}\n\nexport interface CreateJobHeaderParam {\n headers?: RawHttpHeadersInput & CreateJobHeaders;\n}\n\nexport type CreateJobParameters = CreateJobHeaderParam & CreateJobBodyParam & RequestParameters;\n\nexport interface ListJobsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListJobsQueryParamProperties {\n /** The maximum number of result items per page. */\n maxpagesize?: number;\n /** Token to continue a previous query. */\n continuationToken?: string;\n}\n\nexport interface ListJobsQueryParam {\n queryParameters?: ListJobsQueryParamProperties;\n}\n\nexport interface ListJobsHeaderParam {\n headers?: RawHttpHeadersInput & ListJobsHeaders;\n}\n\nexport type ListJobsParameters = ListJobsQueryParam & ListJobsHeaderParam & RequestParameters;\n\nexport interface ListJobDocumentsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListJobDocumentsQueryParamProperties {\n /** The maximum number of result items per page. */\n maxpagesize?: number;\n /** Token to continue a previous query. */\n continuationToken?: string;\n}\n\nexport interface ListJobDocumentsQueryParam {\n queryParameters?: ListJobDocumentsQueryParamProperties;\n}\n\nexport interface ListJobDocumentsHeaderParam {\n headers?: RawHttpHeadersInput & ListJobDocumentsHeaders;\n}\n\nexport type ListJobDocumentsParameters = ListJobDocumentsQueryParam &\n ListJobDocumentsHeaderParam &\n RequestParameters;\n\nexport interface CancelJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface CancelJobHeaderParam {\n headers?: RawHttpHeadersInput & CancelJobHeaders;\n}\n\nexport type CancelJobParameters = CancelJobHeaderParam & RequestParameters;\n\nexport interface DeleteJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteJobHeaderParam {\n headers?: RawHttpHeadersInput & DeleteJobHeaders;\n}\n\nexport type DeleteJobParameters = DeleteJobHeaderParam & RequestParameters;\n\nexport interface DeidentifyBodyParam {\n /** Request body for de-identification operation. */\n body: DeidentificationContent;\n}\n\nexport type DeidentifyParameters = DeidentifyBodyParam & RequestParameters;\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { DeidentificationJob, DeidentificationContent } from \"./models.js\";\n\nexport interface GetJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetJobHeaderParam {\n headers?: RawHttpHeadersInput & GetJobHeaders;\n}\n\nexport type GetJobParameters = GetJobHeaderParam & RequestParameters;\n\nexport interface DeidentifyDocumentsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeidentifyDocumentsBodyParam {\n /** The resource instance. */\n body: DeidentificationJob;\n}\n\nexport interface DeidentifyDocumentsHeaderParam {\n headers?: RawHttpHeadersInput & DeidentifyDocumentsHeaders;\n}\n\nexport type DeidentifyDocumentsParameters = DeidentifyDocumentsHeaderParam &\n DeidentifyDocumentsBodyParam &\n RequestParameters;\n\nexport interface ListJobsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListJobsQueryParamProperties {\n /** The maximum number of result items per page. */\n maxpagesize?: number;\n /** Token to continue a previous query. */\n continuationToken?: string;\n}\n\nexport interface ListJobsQueryParam {\n queryParameters?: ListJobsQueryParamProperties;\n}\n\nexport interface ListJobsHeaderParam {\n headers?: RawHttpHeadersInput & ListJobsHeaders;\n}\n\nexport type ListJobsParameters = ListJobsQueryParam & ListJobsHeaderParam & RequestParameters;\n\nexport interface ListJobDocumentsHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListJobDocumentsQueryParamProperties {\n /** The maximum number of result items per page. */\n maxpagesize?: number;\n /** Token to continue a previous query. */\n continuationToken?: string;\n}\n\nexport interface ListJobDocumentsQueryParam {\n queryParameters?: ListJobDocumentsQueryParamProperties;\n}\n\nexport interface ListJobDocumentsHeaderParam {\n headers?: RawHttpHeadersInput & ListJobDocumentsHeaders;\n}\n\nexport type ListJobDocumentsParameters = ListJobDocumentsQueryParam &\n ListJobDocumentsHeaderParam &\n RequestParameters;\n\nexport interface CancelJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface CancelJobHeaderParam {\n headers?: RawHttpHeadersInput & CancelJobHeaders;\n}\n\nexport type CancelJobParameters = CancelJobHeaderParam & RequestParameters;\n\nexport interface DeleteJobHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeleteJobHeaderParam {\n headers?: RawHttpHeadersInput & DeleteJobHeaders;\n}\n\nexport type DeleteJobParameters = DeleteJobHeaderParam & RequestParameters;\n\nexport interface DeidentifyTextHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface DeidentifyTextBodyParam {\n /** Request body for de-identification operation. */\n body: DeidentificationContent;\n}\n\nexport interface DeidentifyTextHeaderParam {\n headers?: RawHttpHeadersInput & DeidentifyTextHeaders;\n}\n\nexport type DeidentifyTextParameters = DeidentifyTextHeaderParam &\n DeidentifyTextBodyParam &\n RequestParameters;\n"]}
@@ -1,7 +1,7 @@
1
- import { Client } from "@azure-rest/core-client";
2
- import { AbortSignalLike } from "@azure/abort-controller";
3
- import { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
4
- import { CreateJob200Response, CreateJob201Response, CreateJobDefaultResponse, CreateJobLogicalResponse } from "./responses.js";
1
+ import type { Client } from "@azure-rest/core-client";
2
+ import type { AbortSignalLike } from "@azure/abort-controller";
3
+ import type { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
4
+ import type { DeidentifyDocuments200Response, DeidentifyDocuments201Response, DeidentifyDocumentsDefaultResponse, DeidentifyDocumentsLogicalResponse } from "./responses.js";
5
5
  /**
6
6
  * A simple poller that can be used to poll a long running operation.
7
7
  */
@@ -73,5 +73,5 @@ export interface SimplePollerLike<TState extends OperationState<TResult>, TResul
73
73
  * @param options - Options to set a resume state or custom polling interval.
74
74
  * @returns - A poller object to poll for operation state updates and eventually get the final response.
75
75
  */
76
- export declare function getLongRunningPoller<TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse>(client: Client, initialResponse: CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
76
+ export declare function getLongRunningPoller<TResult extends DeidentifyDocumentsLogicalResponse | DeidentifyDocumentsDefaultResponse>(client: Client, initialResponse: DeidentifyDocuments200Response | DeidentifyDocuments201Response | DeidentifyDocumentsDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
77
77
  //# sourceMappingURL=pollingHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EAGvB,cAAc,EAEf,MAAM,iBAAiB,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W,IAAI,IAAI,CAAC;IAEpB;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,SAAS,kCAAkC,GAAG,kCAAkC,EAEvF,MAAM,EAAE,MAAM,EACd,eAAe,EACX,8BAA8B,GAC9B,8BAA8B,GAC9B,kCAAkC,EACtC,OAAO,CAAC,EAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,GAClE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { createHttpPoller, } from "@azure/core-lro";
2
+ // Licensed under the MIT License.
3
+ import { createHttpPoller } from "@azure/core-lro";
4
4
  export async function getLongRunningPoller(client, initialResponse, options = {}) {
5
5
  var _a;
6
6
  const abortController = new AbortController();
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAwFzB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAY,EAAE,WAA+C,EAAE,EAAE;YACvF,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,SAAS,aAAa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IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses.js\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse,\n>(\n client: Client,\n initialResponse: CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n const httpPoller = createHttpPoller(poller, options);\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState,\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted,\n };\n return simplePoller;\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
1
+ {"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA2FnD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;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CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport type {\n DeidentifyDocuments200Response,\n DeidentifyDocuments201Response,\n DeidentifyDocumentsDefaultResponse,\n DeidentifyDocumentsLogicalResponse,\n} from \"./responses.js\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends DeidentifyDocumentsLogicalResponse | DeidentifyDocumentsDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | DeidentifyDocuments200Response\n | DeidentifyDocuments201Response\n | DeidentifyDocumentsDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n const httpPoller = createHttpPoller(poller, options);\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState,\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted,\n };\n return simplePoller;\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
- import { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
3
- import { DeidentificationJobOutput, PagedDeidentificationJobOutput, PagedDocumentDetailsOutput, DeidentificationResultOutput } from "./outputModels.js";
1
+ import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
+ import type { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
3
+ import type { DeidentificationJobOutput, PagedDeidentificationJobOutput, PagedDeidentificationDocumentDetailsOutput, DeidentificationResultOutput } from "./outputModels.js";
4
4
  export interface GetJob200Headers {
5
5
  /** An opaque, globally-unique, client-generated string identifier for the request. */
6
6
  "x-ms-client-request-id"?: string;
@@ -20,41 +20,41 @@ export interface GetJobDefaultResponse extends HttpResponse {
20
20
  body: ErrorResponse;
21
21
  headers: RawHttpHeaders & GetJobDefaultHeaders;
22
22
  }
23
- export interface CreateJob200Headers {
23
+ export interface DeidentifyDocuments200Headers {
24
24
  /** An opaque, globally-unique, client-generated string identifier for the request. */
25
25
  "x-ms-client-request-id"?: string;
26
26
  /** The location for monitoring the operation state. */
27
27
  "operation-location": string;
28
28
  }
29
29
  /** The request has succeeded. */
30
- export interface CreateJob200Response extends HttpResponse {
30
+ export interface DeidentifyDocuments200Response extends HttpResponse {
31
31
  status: "200";
32
32
  body: DeidentificationJobOutput;
33
- headers: RawHttpHeaders & CreateJob200Headers;
33
+ headers: RawHttpHeaders & DeidentifyDocuments200Headers;
34
34
  }
35
- export interface CreateJob201Headers {
35
+ export interface DeidentifyDocuments201Headers {
36
36
  /** An opaque, globally-unique, client-generated string identifier for the request. */
37
37
  "x-ms-client-request-id"?: string;
38
38
  /** The location for monitoring the operation state. */
39
39
  "operation-location": string;
40
40
  }
41
41
  /** The request has succeeded and a new resource has been created as a result. */
42
- export interface CreateJob201Response extends HttpResponse {
42
+ export interface DeidentifyDocuments201Response extends HttpResponse {
43
43
  status: "201";
44
44
  body: DeidentificationJobOutput;
45
- headers: RawHttpHeaders & CreateJob201Headers;
45
+ headers: RawHttpHeaders & DeidentifyDocuments201Headers;
46
46
  }
47
- export interface CreateJobDefaultHeaders {
47
+ export interface DeidentifyDocumentsDefaultHeaders {
48
48
  /** String error code indicating what went wrong. */
49
49
  "x-ms-error-code"?: string;
50
50
  }
51
- export interface CreateJobDefaultResponse extends HttpResponse {
51
+ export interface DeidentifyDocumentsDefaultResponse extends HttpResponse {
52
52
  status: string;
53
53
  body: ErrorResponse;
54
- headers: RawHttpHeaders & CreateJobDefaultHeaders;
54
+ headers: RawHttpHeaders & DeidentifyDocumentsDefaultHeaders;
55
55
  }
56
- /** The final response for long-running createJob operation */
57
- export interface CreateJobLogicalResponse extends HttpResponse {
56
+ /** The final response for long-running deidentifyDocuments operation */
57
+ export interface DeidentifyDocumentsLogicalResponse extends HttpResponse {
58
58
  status: "200";
59
59
  body: DeidentificationJobOutput;
60
60
  }
@@ -84,7 +84,7 @@ export interface ListJobDocuments200Headers {
84
84
  /** The request has succeeded. */
85
85
  export interface ListJobDocuments200Response extends HttpResponse {
86
86
  status: "200";
87
- body: PagedDocumentDetailsOutput;
87
+ body: PagedDeidentificationDocumentDetailsOutput;
88
88
  headers: RawHttpHeaders & ListJobDocuments200Headers;
89
89
  }
90
90
  export interface ListJobDocumentsDefaultHeaders {
@@ -133,18 +133,23 @@ export interface DeleteJobDefaultResponse extends HttpResponse {
133
133
  body: ErrorResponse;
134
134
  headers: RawHttpHeaders & DeleteJobDefaultHeaders;
135
135
  }
136
+ export interface DeidentifyText200Headers {
137
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
138
+ "x-ms-client-request-id"?: string;
139
+ }
136
140
  /** The request has succeeded. */
137
- export interface Deidentify200Response extends HttpResponse {
141
+ export interface DeidentifyText200Response extends HttpResponse {
138
142
  status: "200";
139
143
  body: DeidentificationResultOutput;
144
+ headers: RawHttpHeaders & DeidentifyText200Headers;
140
145
  }
141
- export interface DeidentifyDefaultHeaders {
146
+ export interface DeidentifyTextDefaultHeaders {
142
147
  /** String error code indicating what went wrong. */
143
148
  "x-ms-error-code"?: string;
144
149
  }
145
- export interface DeidentifyDefaultResponse extends HttpResponse {
150
+ export interface DeidentifyTextDefaultResponse extends HttpResponse {
146
151
  status: string;
147
152
  body: ErrorResponse;
148
- headers: RawHttpHeaders & DeidentifyDefaultHeaders;
153
+ headers: RawHttpHeaders & DeidentifyTextDefaultHeaders;
149
154
  }
150
155
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,gBAAgB;IAC/B,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,iCAAiC;AACjC,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,yBAAyB,CAAC;IAChC,OAAO,EAAE,cAAc,GAAG,gBAAgB,CAAC;CAC5C;AAED,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,oBAAoB,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,uDAAuD;IACvD,o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C5B;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC;CACnD;AAED,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,mFAAmF;AACnF,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,OAAO,EAAE,cAAc,GAAG,mBAAmB,CAAC;CAC/C;AAED,MAAM,WAAW,uBAAuB;IACtC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC;CACnD;AAED,MAAM,WAAW,wBAAwB;IACvC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,iCAAiC;AACjC,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,cAAc,GAAG,wBAAwB,CAAC;CACpD;AAED,MAAM,WAAW,4BAA4B;IAC3C,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IACjE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,4BAA4B,CAAC;CACxD"}
@@ -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=responses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport {\n DeidentificationJobOutput,\n PagedDeidentificationJobOutput,\n PagedDocumentDetailsOutput,\n DeidentificationResultOutput,\n} from \"./outputModels.js\";\n\nexport interface GetJob200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetJob200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & GetJob200Headers;\n}\n\nexport interface GetJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetJobDefaultHeaders;\n}\n\nexport interface CreateJob200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded. */\nexport interface CreateJob200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & CreateJob200Headers;\n}\n\nexport interface CreateJob201Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface CreateJob201Response extends HttpResponse {\n status: \"201\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & CreateJob201Headers;\n}\n\nexport interface CreateJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CreateJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CreateJobDefaultHeaders;\n}\n\n/** The final response for long-running createJob operation */\nexport interface CreateJobLogicalResponse extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n}\n\nexport interface ListJobs200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListJobs200Response extends HttpResponse {\n status: \"200\";\n body: PagedDeidentificationJobOutput;\n headers: RawHttpHeaders & ListJobs200Headers;\n}\n\nexport interface ListJobsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListJobsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListJobsDefaultHeaders;\n}\n\nexport interface ListJobDocuments200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListJobDocuments200Response extends HttpResponse {\n status: \"200\";\n body: PagedDocumentDetailsOutput;\n headers: RawHttpHeaders & ListJobDocuments200Headers;\n}\n\nexport interface ListJobDocumentsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListJobDocumentsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListJobDocumentsDefaultHeaders;\n}\n\nexport interface CancelJob200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface CancelJob200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & CancelJob200Headers;\n}\n\nexport interface CancelJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CancelJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CancelJobDefaultHeaders;\n}\n\nexport interface DeleteJob204Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteJob204Response extends HttpResponse {\n status: \"204\";\n headers: RawHttpHeaders & DeleteJob204Headers;\n}\n\nexport interface DeleteJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteJobDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Deidentify200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationResultOutput;\n}\n\nexport interface DeidentifyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeidentifyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeidentifyDefaultHeaders;\n}\n"]}
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport type {\n DeidentificationJobOutput,\n PagedDeidentificationJobOutput,\n PagedDeidentificationDocumentDetailsOutput,\n DeidentificationResultOutput,\n} from \"./outputModels.js\";\n\nexport interface GetJob200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetJob200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & GetJob200Headers;\n}\n\nexport interface GetJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetJobDefaultHeaders;\n}\n\nexport interface DeidentifyDocuments200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded. */\nexport interface DeidentifyDocuments200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & DeidentifyDocuments200Headers;\n}\n\nexport interface DeidentifyDocuments201Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n /** The location for monitoring the operation state. */\n \"operation-location\": string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface DeidentifyDocuments201Response extends HttpResponse {\n status: \"201\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & DeidentifyDocuments201Headers;\n}\n\nexport interface DeidentifyDocumentsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeidentifyDocumentsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeidentifyDocumentsDefaultHeaders;\n}\n\n/** The final response for long-running deidentifyDocuments operation */\nexport interface DeidentifyDocumentsLogicalResponse extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n}\n\nexport interface ListJobs200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListJobs200Response extends HttpResponse {\n status: \"200\";\n body: PagedDeidentificationJobOutput;\n headers: RawHttpHeaders & ListJobs200Headers;\n}\n\nexport interface ListJobsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListJobsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListJobsDefaultHeaders;\n}\n\nexport interface ListJobDocuments200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListJobDocuments200Response extends HttpResponse {\n status: \"200\";\n body: PagedDeidentificationDocumentDetailsOutput;\n headers: RawHttpHeaders & ListJobDocuments200Headers;\n}\n\nexport interface ListJobDocumentsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListJobDocumentsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListJobDocumentsDefaultHeaders;\n}\n\nexport interface CancelJob200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface CancelJob200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationJobOutput;\n headers: RawHttpHeaders & CancelJob200Headers;\n}\n\nexport interface CancelJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CancelJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CancelJobDefaultHeaders;\n}\n\nexport interface DeleteJob204Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteJob204Response extends HttpResponse {\n status: \"204\";\n headers: RawHttpHeaders & DeleteJob204Headers;\n}\n\nexport interface DeleteJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteJobDefaultHeaders;\n}\n\nexport interface DeidentifyText200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface DeidentifyText200Response extends HttpResponse {\n status: \"200\";\n body: DeidentificationResultOutput;\n headers: RawHttpHeaders & DeidentifyText200Headers;\n}\n\nexport interface DeidentifyTextDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeidentifyTextDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeidentifyTextDefaultHeaders;\n}\n"]}
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@azure-rest/health-deidentification",
3
- "version": "1.0.0-beta.1",
4
- "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthdataaiservices/azure-health-deidentification",
5
- "description": "Health Deidentification Service",
3
+ "version": "1.0.0",
4
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthdataaiservices/health-deidentification-rest",
5
+ "description": "Azure Health Data Services de-identification service",
6
6
  "engines": {
7
- "node": ">=18.0.0"
7
+ "node": ">=20.0.0"
8
8
  },
9
9
  "sideEffects": false,
10
10
  "autoPublish": false,
11
11
  "tshy": {
12
+ "project": "./tsconfig.src.json",
12
13
  "exports": {
13
14
  "./package.json": "./package.json",
14
15
  ".": "./src/index.ts"
@@ -35,10 +36,9 @@
35
36
  "author": "Microsoft Corporation",
36
37
  "license": "MIT",
37
38
  "files": [
38
- "dist",
39
+ "dist/",
39
40
  "README.md",
40
- "LICENSE",
41
- "review/*"
41
+ "LICENSE"
42
42
  ],
43
43
  "sdk-type": "client",
44
44
  "repository": "github:Azure/azure-sdk-for-js",
@@ -58,89 +58,81 @@
58
58
  "disableDocsMs": true,
59
59
  "productName": "Health Deidentification Service",
60
60
  "productSlugs": [],
61
- "apiRefLink": "https://docs.microsoft.com/javascript/api/",
61
+ "apiRefLink": "https://learn.microsoft.com/javascript/api/",
62
62
  "requiredResources": {
63
- "De-identification Service": "https://docs.microsoft.com/javascript/api/"
63
+ "De-identification Service": "https://learn.microsoft.com/javascript/api/"
64
64
  }
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
- "dotenv": "^16.0.0",
69
68
  "@azure-rest/core-client": "^2.2.0",
70
- "@azure/core-auth": "^1.6.0",
71
- "@azure/core-rest-pipeline": "^1.5.0",
72
- "@azure/identity": "^4.4.0",
73
- "@azure/logger": "^1.0.0",
74
- "tslib": "^2.6.2",
69
+ "@azure/abort-controller": "^2.1.2",
70
+ "@azure/core-auth": "^1.9.0",
75
71
  "@azure/core-lro": "^3.0.0",
76
- "@azure/abort-controller": "^2.0.0",
77
- "@azure/core-paging": "^1.6.2"
72
+ "@azure/core-paging": "^1.6.2",
73
+ "@azure/core-rest-pipeline": "^1.18.2",
74
+ "@azure/identity": "^4.4.0",
75
+ "@azure/logger": "^1.1.4",
76
+ "dotenv": "^16.0.0",
77
+ "tslib": "^2.8.1"
78
78
  },
79
79
  "devDependencies": {
80
- "@azure-tools/test-utils": "^1.0.3",
81
- "loupe": "~3.1.1",
82
- "@microsoft/api-extractor": "^7.40.3",
83
- "@types/node": "^18.0.0",
84
- "eslint": "^8.55.0",
85
- "rimraf": "^5.0.5",
86
- "mkdirp": "^3.0.1",
87
- "typescript": "~5.4.5",
88
- "tshy": "^1.15.1",
89
- "@azure/core-util": "^1.9.0",
90
- "@azure-tools/test-credential": "^2.1.0",
80
+ "@azure-tools/test-credential": "^2.0.0",
91
81
  "@azure-tools/test-recorder": "^4.1.0",
92
- "@vitest/browser": "^1.6.0",
93
- "@vitest/coverage-istanbul": "^1.3.1",
94
- "playwright": "^1.41.2",
95
- "vitest": "^1.6.0",
82
+ "@azure-tools/test-utils-vitest": "^1.0.0",
83
+ "@azure/core-util": "^1.11.0",
96
84
  "@azure/dev-tool": "^1.0.0",
97
- "@azure/eslint-plugin-azure-sdk": "^3.0.0"
85
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0",
86
+ "@types/node": "^20.0.0",
87
+ "@vitest/browser": "^3.0.9",
88
+ "@vitest/coverage-istanbul": "^3.0.9",
89
+ "eslint": "^9.9.0",
90
+ "loupe": "~3.1.1",
91
+ "playwright": "^1.50.1",
92
+ "typescript": "~5.8.2",
93
+ "vitest": "^3.0.9"
98
94
  },
99
95
  "scripts": {
100
- "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
101
- "build:node": "tshy",
96
+ "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
102
97
  "build:samples": "echo Obsolete.",
103
- "build:test": "echo skipped. actual commands inlined in browser test scripts",
104
- "build": "npm run clean && tshy && dev-tool run extract-api",
98
+ "build:test": "npm run clean && dev-tool run build-package && dev-tool run build-test",
105
99
  "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\" \"samples-dev/**/*.ts\"",
106
- "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
100
+ "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
107
101
  "execute:samples": "dev-tool samples run samples-dev",
108
- "extract-api": "tshy && dev-tool run extract-api",
102
+ "extract-api": "dev-tool run build-package && dev-tool run extract-api",
109
103
  "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\" \"samples-dev/**/*.ts\"",
110
104
  "generate:client": "autorest --typescript ./swagger/README.md",
111
- "integration-test:browser": "tshy && dev-tool run build-test && dev-tool run test:vitest --browser",
112
- "integration-test:node": "tshy && dev-tool run build-test && dev-tool run test:vitest",
113
105
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
114
- "lint": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts",
115
- "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --ext .cts --ext .mts --fix --fix-type [problem,suggestion]",
106
+ "integration-test:browser": "dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
107
+ "integration-test:node": "dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest",
108
+ "lint": "eslint package.json api-extractor.json src test",
109
+ "lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
116
110
  "pack": "npm pack 2>&1",
111
+ "test": "npm run clean && dev-tool run build-package && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser",
117
112
  "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
118
- "test:node": "npm run clean && tshy && npm run unit-test:node",
119
- "test": "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser",
113
+ "test:node": "npm run clean && dev-tool run build-package && npm run unit-test:node",
114
+ "test:node:esm": "dev-tool run test:vitest --esm",
115
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
120
116
  "unit-test:browser": "npm run integration-test:browser",
121
117
  "unit-test:node": "npm run integration-test:node",
122
- "unit-test": "npm run unit-test:node && npm run unit-test:browser"
118
+ "update-snippets": "dev-tool run update-snippets"
123
119
  },
124
120
  "exports": {
125
121
  "./package.json": "./package.json",
126
122
  ".": {
127
123
  "browser": {
128
- "source": "./src/index.ts",
129
124
  "types": "./dist/browser/index.d.ts",
130
125
  "default": "./dist/browser/index.js"
131
126
  },
132
127
  "react-native": {
133
- "source": "./src/index.ts",
134
128
  "types": "./dist/react-native/index.d.ts",
135
129
  "default": "./dist/react-native/index.js"
136
130
  },
137
131
  "import": {
138
- "source": "./src/index.ts",
139
132
  "types": "./dist/esm/index.d.ts",
140
133
  "default": "./dist/esm/index.js"
141
134
  },
142
135
  "require": {
143
- "source": "./src/index.ts",
144
136
  "types": "./dist/commonjs/index.d.ts",
145
137
  "default": "./dist/commonjs/index.js"
146
138
  }
@@ -148,5 +140,7 @@
148
140
  },
149
141
  "main": "./dist/commonjs/index.js",
150
142
  "types": "./dist/commonjs/index.d.ts",
151
- "module": "./dist/esm/index.js"
143
+ "module": "./dist/esm/index.js",
144
+ "browser": "./dist/browser/index.js",
145
+ "react-native": "./dist/react-native/index.js"
152
146
  }