@azure-rest/purview-scanning 1.0.0-alpha.20250115.1 → 1.0.0-alpha.20250121.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +8 -11
  2. package/dist/browser/clientDefinitions.d.ts +277 -0
  3. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  4. package/dist/browser/clientDefinitions.js +4 -0
  5. package/dist/browser/clientDefinitions.js.map +1 -0
  6. package/dist/browser/index.d.ts +8 -4
  7. package/dist/browser/index.d.ts.map +1 -1
  8. package/dist/browser/index.js +8 -5
  9. package/dist/browser/index.js.map +1 -1
  10. package/dist/browser/isUnexpected.d.ts +60 -0
  11. package/dist/browser/isUnexpected.d.ts.map +1 -0
  12. package/dist/browser/isUnexpected.js +136 -0
  13. package/dist/browser/isUnexpected.js.map +1 -0
  14. package/dist/browser/logger.d.ts +2 -0
  15. package/dist/browser/logger.d.ts.map +1 -0
  16. package/dist/browser/logger.js +5 -0
  17. package/dist/browser/logger.js.map +1 -0
  18. package/dist/browser/models.d.ts +1347 -752
  19. package/dist/browser/models.d.ts.map +1 -1
  20. package/dist/browser/models.js.map +1 -1
  21. package/dist/browser/outputModels.d.ts +2269 -0
  22. package/dist/browser/outputModels.d.ts.map +1 -0
  23. package/dist/browser/outputModels.js +4 -0
  24. package/dist/browser/outputModels.js.map +1 -0
  25. package/dist/browser/paginateHelper.d.ts +27 -2
  26. package/dist/browser/paginateHelper.d.ts.map +1 -1
  27. package/dist/browser/paginateHelper.js +98 -1
  28. package/dist/browser/paginateHelper.js.map +1 -1
  29. package/dist/browser/parameters.d.ts +146 -33
  30. package/dist/browser/parameters.d.ts.map +1 -1
  31. package/dist/browser/parameters.js.map +1 -1
  32. package/dist/browser/pollingHelper.d.ts +76 -0
  33. package/dist/browser/pollingHelper.d.ts.map +1 -0
  34. package/dist/browser/pollingHelper.js +104 -0
  35. package/dist/browser/pollingHelper.js.map +1 -0
  36. package/dist/browser/purviewScanningRestClient.d.ts +16 -0
  37. package/dist/browser/purviewScanningRestClient.d.ts.map +1 -0
  38. package/dist/browser/purviewScanningRestClient.js +43 -0
  39. package/dist/browser/purviewScanningRestClient.js.map +1 -0
  40. package/dist/browser/responses.d.ts +793 -266
  41. package/dist/browser/responses.d.ts.map +1 -1
  42. package/dist/browser/responses.js.map +1 -1
  43. package/dist/commonjs/clientDefinitions.d.ts +277 -0
  44. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  45. package/dist/commonjs/clientDefinitions.js +5 -0
  46. package/dist/commonjs/clientDefinitions.js.map +1 -0
  47. package/dist/commonjs/index.d.ts +8 -4
  48. package/dist/commonjs/index.d.ts.map +1 -1
  49. package/dist/commonjs/index.js +8 -5
  50. package/dist/commonjs/index.js.map +1 -1
  51. package/dist/commonjs/isUnexpected.d.ts +60 -0
  52. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  53. package/dist/commonjs/isUnexpected.js +139 -0
  54. package/dist/commonjs/isUnexpected.js.map +1 -0
  55. package/dist/commonjs/logger.d.ts +2 -0
  56. package/dist/commonjs/logger.d.ts.map +1 -0
  57. package/dist/commonjs/logger.js +8 -0
  58. package/dist/commonjs/logger.js.map +1 -0
  59. package/dist/commonjs/models.d.ts +1347 -752
  60. package/dist/commonjs/models.d.ts.map +1 -1
  61. package/dist/commonjs/models.js.map +1 -1
  62. package/dist/commonjs/outputModels.d.ts +2269 -0
  63. package/dist/commonjs/outputModels.d.ts.map +1 -0
  64. package/dist/commonjs/outputModels.js +5 -0
  65. package/dist/commonjs/outputModels.js.map +1 -0
  66. package/dist/commonjs/paginateHelper.d.ts +27 -2
  67. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  68. package/dist/commonjs/paginateHelper.js +99 -2
  69. package/dist/commonjs/paginateHelper.js.map +1 -1
  70. package/dist/commonjs/parameters.d.ts +146 -33
  71. package/dist/commonjs/parameters.d.ts.map +1 -1
  72. package/dist/commonjs/parameters.js.map +1 -1
  73. package/dist/commonjs/pollingHelper.d.ts +76 -0
  74. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  75. package/dist/commonjs/pollingHelper.js +107 -0
  76. package/dist/commonjs/pollingHelper.js.map +1 -0
  77. package/dist/commonjs/purviewScanningRestClient.d.ts +16 -0
  78. package/dist/commonjs/purviewScanningRestClient.d.ts.map +1 -0
  79. package/dist/commonjs/purviewScanningRestClient.js +46 -0
  80. package/dist/commonjs/purviewScanningRestClient.js.map +1 -0
  81. package/dist/commonjs/responses.d.ts +793 -266
  82. package/dist/commonjs/responses.d.ts.map +1 -1
  83. package/dist/commonjs/responses.js.map +1 -1
  84. package/dist/esm/clientDefinitions.d.ts +277 -0
  85. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  86. package/dist/esm/clientDefinitions.js +4 -0
  87. package/dist/esm/clientDefinitions.js.map +1 -0
  88. package/dist/esm/index.d.ts +8 -4
  89. package/dist/esm/index.d.ts.map +1 -1
  90. package/dist/esm/index.js +8 -5
  91. package/dist/esm/index.js.map +1 -1
  92. package/dist/esm/isUnexpected.d.ts +60 -0
  93. package/dist/esm/isUnexpected.d.ts.map +1 -0
  94. package/dist/esm/isUnexpected.js +136 -0
  95. package/dist/esm/isUnexpected.js.map +1 -0
  96. package/dist/esm/logger.d.ts +2 -0
  97. package/dist/esm/logger.d.ts.map +1 -0
  98. package/dist/esm/logger.js +5 -0
  99. package/dist/esm/logger.js.map +1 -0
  100. package/dist/esm/models.d.ts +1347 -752
  101. package/dist/esm/models.d.ts.map +1 -1
  102. package/dist/esm/models.js.map +1 -1
  103. package/dist/esm/outputModels.d.ts +2269 -0
  104. package/dist/esm/outputModels.d.ts.map +1 -0
  105. package/dist/esm/outputModels.js +4 -0
  106. package/dist/esm/outputModels.js.map +1 -0
  107. package/dist/esm/paginateHelper.d.ts +27 -2
  108. package/dist/esm/paginateHelper.d.ts.map +1 -1
  109. package/dist/esm/paginateHelper.js +98 -1
  110. package/dist/esm/paginateHelper.js.map +1 -1
  111. package/dist/esm/parameters.d.ts +146 -33
  112. package/dist/esm/parameters.d.ts.map +1 -1
  113. package/dist/esm/parameters.js.map +1 -1
  114. package/dist/esm/pollingHelper.d.ts +76 -0
  115. package/dist/esm/pollingHelper.d.ts.map +1 -0
  116. package/dist/esm/pollingHelper.js +104 -0
  117. package/dist/esm/pollingHelper.js.map +1 -0
  118. package/dist/esm/purviewScanningRestClient.d.ts +16 -0
  119. package/dist/esm/purviewScanningRestClient.d.ts.map +1 -0
  120. package/dist/esm/purviewScanningRestClient.js +43 -0
  121. package/dist/esm/purviewScanningRestClient.js.map +1 -0
  122. package/dist/esm/responses.d.ts +793 -266
  123. package/dist/esm/responses.d.ts.map +1 -1
  124. package/dist/esm/responses.js.map +1 -1
  125. package/dist/react-native/clientDefinitions.d.ts +277 -0
  126. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  127. package/dist/react-native/clientDefinitions.js +4 -0
  128. package/dist/react-native/clientDefinitions.js.map +1 -0
  129. package/dist/react-native/index.d.ts +8 -4
  130. package/dist/react-native/index.d.ts.map +1 -1
  131. package/dist/react-native/index.js +8 -5
  132. package/dist/react-native/index.js.map +1 -1
  133. package/dist/react-native/isUnexpected.d.ts +60 -0
  134. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  135. package/dist/react-native/isUnexpected.js +136 -0
  136. package/dist/react-native/isUnexpected.js.map +1 -0
  137. package/dist/react-native/logger.d.ts +2 -0
  138. package/dist/react-native/logger.d.ts.map +1 -0
  139. package/dist/react-native/logger.js +5 -0
  140. package/dist/react-native/logger.js.map +1 -0
  141. package/dist/react-native/models.d.ts +1347 -752
  142. package/dist/react-native/models.d.ts.map +1 -1
  143. package/dist/react-native/models.js.map +1 -1
  144. package/dist/react-native/outputModels.d.ts +2269 -0
  145. package/dist/react-native/outputModels.d.ts.map +1 -0
  146. package/dist/react-native/outputModels.js +4 -0
  147. package/dist/react-native/outputModels.js.map +1 -0
  148. package/dist/react-native/paginateHelper.d.ts +27 -2
  149. package/dist/react-native/paginateHelper.d.ts.map +1 -1
  150. package/dist/react-native/paginateHelper.js +98 -1
  151. package/dist/react-native/paginateHelper.js.map +1 -1
  152. package/dist/react-native/parameters.d.ts +146 -33
  153. package/dist/react-native/parameters.d.ts.map +1 -1
  154. package/dist/react-native/parameters.js.map +1 -1
  155. package/dist/react-native/pollingHelper.d.ts +76 -0
  156. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  157. package/dist/react-native/pollingHelper.js +104 -0
  158. package/dist/react-native/pollingHelper.js.map +1 -0
  159. package/dist/react-native/purviewScanningRestClient.d.ts +16 -0
  160. package/dist/react-native/purviewScanningRestClient.d.ts.map +1 -0
  161. package/dist/react-native/purviewScanningRestClient.js +43 -0
  162. package/dist/react-native/purviewScanningRestClient.js.map +1 -0
  163. package/dist/react-native/responses.d.ts +793 -266
  164. package/dist/react-native/responses.d.ts.map +1 -1
  165. package/dist/react-native/responses.js.map +1 -1
  166. package/package.json +12 -10
  167. package/dist/browser/purviewScanning.d.ts +0 -169
  168. package/dist/browser/purviewScanning.d.ts.map +0 -1
  169. package/dist/browser/purviewScanning.js +0 -13
  170. package/dist/browser/purviewScanning.js.map +0 -1
  171. package/dist/commonjs/purviewScanning.d.ts +0 -169
  172. package/dist/commonjs/purviewScanning.d.ts.map +0 -1
  173. package/dist/commonjs/purviewScanning.js +0 -16
  174. package/dist/commonjs/purviewScanning.js.map +0 -1
  175. package/dist/esm/purviewScanning.d.ts +0 -169
  176. package/dist/esm/purviewScanning.d.ts.map +0 -1
  177. package/dist/esm/purviewScanning.js +0 -13
  178. package/dist/esm/purviewScanning.js.map +0 -1
  179. package/dist/react-native/purviewScanning.d.ts +0 -169
  180. package/dist/react-native/purviewScanning.d.ts.map +0 -1
  181. package/dist/react-native/purviewScanning.js +0 -13
  182. package/dist/react-native/purviewScanning.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCA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AC,YAAY,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 { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } 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":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAAwC,WAAW,CAAC,CAAC;IACtF,OAAO;QACL,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,EACJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,mCAClB,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AkF,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,89 +1,202 @@
1
1
  import type { RequestParameters } from "@azure-rest/core-client";
2
- import type { AzureKeyVault, ClassificationRule, DataSource, Filter, Scan, ScanRuleset, Trigger } from "./models.js";
2
+ import type { AzureKeyVault, ClassificationRule, Credential, DataSource, Filter, IntegrationRuntime, IntegrationRuntimeRegenerateKeyParameters, EnableInteractiveQueryForIntegrationRuntimeRequest, ManagedVirtualNetwork, ManagedPrivateEndpoint, Scan, ScanRuleset, Trigger } from "./models.js";
3
3
  export type KeyVaultConnectionsGetParameters = RequestParameters;
4
- export interface KeyVaultConnectionsCreateBodyParam {
4
+ export interface KeyVaultConnectionsCreateOrReplaceBodyParam {
5
+ /** The Azure Key Vault connection definition. */
5
6
  body: AzureKeyVault;
6
7
  }
7
- export type KeyVaultConnectionsCreateParameters = KeyVaultConnectionsCreateBodyParam & RequestParameters;
8
+ export interface KeyVaultConnectionsCreateOrReplaceMediaTypesParam {
9
+ /** Request content type */
10
+ contentType?: "application/json";
11
+ }
12
+ export type KeyVaultConnectionsCreateOrReplaceParameters = KeyVaultConnectionsCreateOrReplaceMediaTypesParam & KeyVaultConnectionsCreateOrReplaceBodyParam & RequestParameters;
8
13
  export type KeyVaultConnectionsDeleteParameters = RequestParameters;
9
- export type KeyVaultConnectionsListAllParameters = RequestParameters;
14
+ export type KeyVaultConnectionsListParameters = RequestParameters;
10
15
  export type ClassificationRulesGetParameters = RequestParameters;
11
- export interface ClassificationRulesCreateOrUpdateBodyParam {
12
- body?: ClassificationRule;
16
+ export interface ClassificationRulesCreateOrReplaceBodyParam {
17
+ /** The classification rule definition. */
18
+ body: ClassificationRule;
19
+ }
20
+ export interface ClassificationRulesCreateOrReplaceMediaTypesParam {
21
+ /** Request content type */
22
+ contentType?: "application/json";
13
23
  }
14
- export type ClassificationRulesCreateOrUpdateParameters = ClassificationRulesCreateOrUpdateBodyParam & RequestParameters;
24
+ export type ClassificationRulesCreateOrReplaceParameters = ClassificationRulesCreateOrReplaceMediaTypesParam & ClassificationRulesCreateOrReplaceBodyParam & RequestParameters;
15
25
  export type ClassificationRulesDeleteParameters = RequestParameters;
16
- export type ClassificationRulesListAllParameters = RequestParameters;
17
- export type ClassificationRulesListVersionsByClassificationRuleNameParameters = RequestParameters;
26
+ export type ClassificationRulesListParameters = RequestParameters;
27
+ export type ClassificationRulesListVersionsByRuleNameParameters = RequestParameters;
18
28
  export interface ClassificationRulesTagClassificationVersionQueryParamProperties {
29
+ /** The action of classification rule. */
19
30
  action: "Keep" | "Delete";
20
31
  }
21
32
  export interface ClassificationRulesTagClassificationVersionQueryParam {
22
33
  queryParameters: ClassificationRulesTagClassificationVersionQueryParamProperties;
23
34
  }
24
35
  export type ClassificationRulesTagClassificationVersionParameters = ClassificationRulesTagClassificationVersionQueryParam & RequestParameters;
25
- export interface DataSourcesCreateOrUpdateBodyParam {
26
- body?: DataSource;
27
- }
28
- export type DataSourcesCreateOrUpdateParameters = DataSourcesCreateOrUpdateBodyParam & RequestParameters;
36
+ export type CredentialGetParameters = RequestParameters;
37
+ export interface CredentialCreateOrReplaceBodyParam {
38
+ /** The credential definition. */
39
+ body: Credential;
40
+ }
41
+ export interface CredentialCreateOrReplaceMediaTypesParam {
42
+ /** Request content type */
43
+ contentType?: "application/json";
44
+ }
45
+ export type CredentialCreateOrReplaceParameters = CredentialCreateOrReplaceMediaTypesParam & CredentialCreateOrReplaceBodyParam & RequestParameters;
46
+ export type CredentialDeleteParameters = RequestParameters;
47
+ export type CredentialListParameters = RequestParameters;
48
+ export interface DataSourcesCreateOrReplaceBodyParam {
49
+ /** The data source definition. */
50
+ body: DataSource;
51
+ }
52
+ export interface DataSourcesCreateOrReplaceMediaTypesParam {
53
+ /** Request content type */
54
+ contentType?: "application/json";
55
+ }
56
+ export type DataSourcesCreateOrReplaceParameters = DataSourcesCreateOrReplaceMediaTypesParam & DataSourcesCreateOrReplaceBodyParam & RequestParameters;
29
57
  export type DataSourcesGetParameters = RequestParameters;
30
58
  export type DataSourcesDeleteParameters = RequestParameters;
31
- export type DataSourcesListAllParameters = RequestParameters;
59
+ export type DataSourcesListParameters = RequestParameters;
32
60
  export type FiltersGetParameters = RequestParameters;
33
- export interface FiltersCreateOrUpdateBodyParam {
34
- body?: Filter;
35
- }
36
- export type FiltersCreateOrUpdateParameters = FiltersCreateOrUpdateBodyParam & RequestParameters;
37
- export interface ScansCreateOrUpdateBodyParam {
61
+ export interface FiltersCreateOrReplaceBodyParam {
62
+ /** The filter definition. */
63
+ body: Filter;
64
+ }
65
+ export interface FiltersCreateOrReplaceMediaTypesParam {
66
+ /** Request content type */
67
+ contentType?: "application/json";
68
+ }
69
+ export type FiltersCreateOrReplaceParameters = FiltersCreateOrReplaceMediaTypesParam & FiltersCreateOrReplaceBodyParam & RequestParameters;
70
+ export type IntegrationRuntimesListByAccountParameters = RequestParameters;
71
+ export type IntegrationRuntimesGetParameters = RequestParameters;
72
+ export type IntegrationRuntimesDeleteParameters = RequestParameters;
73
+ export interface IntegrationRuntimesCreateOrReplaceBodyParam {
74
+ /** The integration runtime definition. */
75
+ body: IntegrationRuntime;
76
+ }
77
+ export interface IntegrationRuntimesCreateOrReplaceMediaTypesParam {
78
+ /** Request content type */
79
+ contentType?: "application/json";
80
+ }
81
+ export type IntegrationRuntimesCreateOrReplaceParameters = IntegrationRuntimesCreateOrReplaceMediaTypesParam & IntegrationRuntimesCreateOrReplaceBodyParam & RequestParameters;
82
+ export type IntegrationRuntimesStatusParameters = RequestParameters;
83
+ export type IntegrationRuntimesListAuthKeysParameters = RequestParameters;
84
+ export interface IntegrationRuntimesRegenerateAuthKeyBodyParam {
85
+ /** The request of regenerating authentication key of an integration runtime. */
86
+ body: IntegrationRuntimeRegenerateKeyParameters;
87
+ }
88
+ export interface IntegrationRuntimesRegenerateAuthKeyMediaTypesParam {
89
+ /** Request content type */
90
+ contentType?: "application/json";
91
+ }
92
+ export type IntegrationRuntimesRegenerateAuthKeyParameters = IntegrationRuntimesRegenerateAuthKeyMediaTypesParam & IntegrationRuntimesRegenerateAuthKeyBodyParam & RequestParameters;
93
+ export type IntegrationRuntimesDisableInteractiveQueryParameters = RequestParameters;
94
+ export interface IntegrationRuntimesEnableInteractiveQueryBodyParam {
95
+ /** The request of enabling interactive query for integration runtime. */
96
+ body: EnableInteractiveQueryForIntegrationRuntimeRequest;
97
+ }
98
+ export interface IntegrationRuntimesEnableInteractiveQueryMediaTypesParam {
99
+ /** Request content type */
100
+ contentType?: "application/json";
101
+ }
102
+ export type IntegrationRuntimesEnableInteractiveQueryParameters = IntegrationRuntimesEnableInteractiveQueryMediaTypesParam & IntegrationRuntimesEnableInteractiveQueryBodyParam & RequestParameters;
103
+ export type ManagedVirtualNetworksListByAccountParameters = RequestParameters;
104
+ export type ManagedVirtualNetworksGetParameters = RequestParameters;
105
+ export interface ManagedVirtualNetworksCreateOrReplaceBodyParam {
106
+ /** The managed virtual network resource definition. */
107
+ body: ManagedVirtualNetwork;
108
+ }
109
+ export interface ManagedVirtualNetworksCreateOrReplaceMediaTypesParam {
110
+ /** Request content type */
111
+ contentType?: "application/json";
112
+ }
113
+ export type ManagedVirtualNetworksCreateOrReplaceParameters = ManagedVirtualNetworksCreateOrReplaceMediaTypesParam & ManagedVirtualNetworksCreateOrReplaceBodyParam & RequestParameters;
114
+ export type ManagedPrivateEndpointsListByAccountParameters = RequestParameters;
115
+ export type ManagedPrivateEndpointsGetParameters = RequestParameters;
116
+ export type ManagedPrivateEndpointsDeleteParameters = RequestParameters;
117
+ export interface ManagedPrivateEndpointsCreateOrReplaceBodyParam {
118
+ /** The managed private endpoint resource definition. */
119
+ body: ManagedPrivateEndpoint;
120
+ }
121
+ export interface ManagedPrivateEndpointsCreateOrReplaceMediaTypesParam {
122
+ /** Request content type */
123
+ contentType?: "application/json";
124
+ }
125
+ export type ManagedPrivateEndpointsCreateOrReplaceParameters = ManagedPrivateEndpointsCreateOrReplaceMediaTypesParam & ManagedPrivateEndpointsCreateOrReplaceBodyParam & RequestParameters;
126
+ export interface ScansCreateOrReplaceBodyParam {
127
+ /** The scan definition. */
38
128
  body: Scan;
39
129
  }
40
- export type ScansCreateOrUpdateParameters = ScansCreateOrUpdateBodyParam & RequestParameters;
130
+ export interface ScansCreateOrReplaceMediaTypesParam {
131
+ /** Request content type */
132
+ contentType?: "application/json";
133
+ }
134
+ export type ScansCreateOrReplaceParameters = ScansCreateOrReplaceMediaTypesParam & ScansCreateOrReplaceBodyParam & RequestParameters;
41
135
  export type ScansGetParameters = RequestParameters;
42
136
  export type ScansDeleteParameters = RequestParameters;
43
137
  export type ScansListByDataSourceParameters = RequestParameters;
138
+ export type ScanResultGetScanStatusParameters = RequestParameters;
44
139
  export interface ScanResultRunScanQueryParamProperties {
140
+ /** The scan run id. */
141
+ runId: string;
142
+ /** The scan level. */
45
143
  scanLevel?: "Full" | "Incremental";
46
144
  }
47
145
  export interface ScanResultRunScanQueryParam {
48
- queryParameters?: ScanResultRunScanQueryParamProperties;
146
+ queryParameters: ScanResultRunScanQueryParamProperties;
49
147
  }
50
148
  export type ScanResultRunScanParameters = ScanResultRunScanQueryParam & RequestParameters;
51
149
  export type ScanResultCancelScanParameters = RequestParameters;
52
150
  export type ScanResultListScanHistoryParameters = RequestParameters;
53
151
  export type ScanRulesetsGetParameters = RequestParameters;
54
- export interface ScanRulesetsCreateOrUpdateBodyParam {
55
- body?: ScanRuleset;
152
+ export interface ScanRulesetsCreateOrReplaceBodyParam {
153
+ /** The scan rule set definition. */
154
+ body: ScanRuleset;
155
+ }
156
+ export interface ScanRulesetsCreateOrReplaceMediaTypesParam {
157
+ /** Request content type */
158
+ contentType?: "application/json";
56
159
  }
57
- export type ScanRulesetsCreateOrUpdateParameters = ScanRulesetsCreateOrUpdateBodyParam & RequestParameters;
160
+ export type ScanRulesetsCreateOrReplaceParameters = ScanRulesetsCreateOrReplaceMediaTypesParam & ScanRulesetsCreateOrReplaceBodyParam & RequestParameters;
58
161
  export type ScanRulesetsDeleteParameters = RequestParameters;
59
- export type ScanRulesetsListAllParameters = RequestParameters;
60
- export type SystemScanRulesetsListAllParameters = RequestParameters;
162
+ export type ScanRulesetsListParameters = RequestParameters;
163
+ export type SystemScanRulesetsListParameters = RequestParameters;
61
164
  export type SystemScanRulesetsGetParameters = RequestParameters;
62
165
  export interface SystemScanRulesetsGetByVersionQueryParamProperties {
63
- dataSourceType?: "None" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "AmazonPostgreSql" | "AzurePostgreSql" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "AzureStorage" | "Teradata" | "Oracle" | "SapS4Hana" | "SapEcc" | "PowerBI";
166
+ /** The data source type. */
167
+ dataSourceType?: "None" | "Fabric" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "ArcEnabledSqlServer" | "AmazonPostgreSql" | "AzurePostgreSql" | "Databricks" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "Hdfs" | "TableauServer" | "AzureStorage" | "Teradata" | "Oracle" | "PostgreSql" | "AmazonRedShift" | "DatabricksHms" | "SapS4Hana" | "SapEcc" | "Snowflake" | "PowerBI" | "Trident" | "Dataverse" | "DatabricksUnityCatalog";
64
168
  }
65
169
  export interface SystemScanRulesetsGetByVersionQueryParam {
66
170
  queryParameters?: SystemScanRulesetsGetByVersionQueryParamProperties;
67
171
  }
68
172
  export type SystemScanRulesetsGetByVersionParameters = SystemScanRulesetsGetByVersionQueryParam & RequestParameters;
69
173
  export interface SystemScanRulesetsGetLatestQueryParamProperties {
70
- dataSourceType?: "None" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "AmazonPostgreSql" | "AzurePostgreSql" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "AzureStorage" | "Teradata" | "Oracle" | "SapS4Hana" | "SapEcc" | "PowerBI";
174
+ /** The data source type. */
175
+ dataSourceType?: "None" | "Fabric" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "ArcEnabledSqlServer" | "AmazonPostgreSql" | "AzurePostgreSql" | "Databricks" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "Hdfs" | "TableauServer" | "AzureStorage" | "Teradata" | "Oracle" | "PostgreSql" | "AmazonRedShift" | "DatabricksHms" | "SapS4Hana" | "SapEcc" | "Snowflake" | "PowerBI" | "Trident" | "Dataverse" | "DatabricksUnityCatalog";
71
176
  }
72
177
  export interface SystemScanRulesetsGetLatestQueryParam {
73
178
  queryParameters?: SystemScanRulesetsGetLatestQueryParamProperties;
74
179
  }
75
180
  export type SystemScanRulesetsGetLatestParameters = SystemScanRulesetsGetLatestQueryParam & RequestParameters;
76
181
  export interface SystemScanRulesetsListVersionsByDataSourceQueryParamProperties {
77
- dataSourceType?: "None" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "AmazonPostgreSql" | "AzurePostgreSql" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "AzureStorage" | "Teradata" | "Oracle" | "SapS4Hana" | "SapEcc" | "PowerBI";
182
+ /** The data source type. */
183
+ dataSourceType?: "None" | "Fabric" | "AzureSubscription" | "AzureResourceGroup" | "AzureSynapseWorkspace" | "AzureSynapse" | "AdlsGen1" | "AdlsGen2" | "AmazonAccount" | "AmazonS3" | "AmazonSql" | "AzureCosmosDb" | "AzureDataExplorer" | "AzureFileService" | "AzureSqlDatabase" | "ArcEnabledSqlServer" | "AmazonPostgreSql" | "AzurePostgreSql" | "Databricks" | "SqlServerDatabase" | "AzureSqlDatabaseManagedInstance" | "AzureSqlDataWarehouse" | "AzureMySql" | "Hdfs" | "TableauServer" | "AzureStorage" | "Teradata" | "Oracle" | "PostgreSql" | "AmazonRedShift" | "DatabricksHms" | "SapS4Hana" | "SapEcc" | "Snowflake" | "PowerBI" | "Trident" | "Dataverse" | "DatabricksUnityCatalog";
78
184
  }
79
185
  export interface SystemScanRulesetsListVersionsByDataSourceQueryParam {
80
186
  queryParameters?: SystemScanRulesetsListVersionsByDataSourceQueryParamProperties;
81
187
  }
82
188
  export type SystemScanRulesetsListVersionsByDataSourceParameters = SystemScanRulesetsListVersionsByDataSourceQueryParam & RequestParameters;
83
- export type TriggersGetTriggerParameters = RequestParameters;
84
- export interface TriggersCreateTriggerBodyParam {
189
+ export type TriggersGetParameters = RequestParameters;
190
+ export interface TriggersCreateOrReplaceBodyParam {
191
+ /** The trigger definition. */
85
192
  body: Trigger;
86
193
  }
87
- export type TriggersCreateTriggerParameters = TriggersCreateTriggerBodyParam & RequestParameters;
88
- export type TriggersDeleteTriggerParameters = RequestParameters;
194
+ export interface TriggersCreateOrReplaceMediaTypesParam {
195
+ /** Request content type */
196
+ contentType?: "application/json";
197
+ }
198
+ export type TriggersCreateOrReplaceParameters = TriggersCreateOrReplaceMediaTypesParam & TriggersCreateOrReplaceBodyParam & RequestParameters;
199
+ export type TriggersDeleteParameters = RequestParameters;
200
+ export type TriggersEnableParameters = RequestParameters;
201
+ export type TriggersDisableParameters = RequestParameters;
89
202
  //# sourceMappingURL=parameters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,MAAM,EACN,IAAI,EACJ,WAAW,EACX,OAAO,EACR,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;AAEjE,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,MAAM,mCAAmC,GAAG,kCAAkC,GAClF,iBAAiB,CAAC;AACpB,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;AACpE,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;AACrE,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;AAEjE,MAAM,WAAW,0CAA0C;IACzD,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,MAAM,2CAA2C,GACrD,0CAA0C,GAAG,iBAAiB,CAAC;AACjE,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;AACpE,MAAM,MAAM,oCAAoC,GAAG,iBAAiB,CAAC;AACrE,MAAM,MAAM,iEAAiE,GAAG,iBAAiB,CAAC;AAElG,MAAM,WAAW,+DAA+D;IAC9E,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC3B;AAED,MAAM,WAAW,qDAAqD;IACpE,eAAe,EAAE,+DAA+D,CAAC;CAClF;AAED,MAAM,MAAM,qDAAqD,GAC/D,qDAAqD,GAAG,iBAAiB,CAAC;AAE5E,MAAM,WAAW,kCAAkC;IACjD,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,MAAM,mCAAmC,GAAG,kCAAkC,GAClF,iBAAiB,CAAC;AACpB,MAAM,MAAM,wBAAwB,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ACR,mBAAmB,GACnB,oBAAoB,GACpB,uBAAuB,GACvB,cAAc,GACd,UAAU,GACV,UAAU,GACV,eAAe,GACf,UAAU,GACV,WAAW,GACX,eAAe,GACf,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,qBAAqB,GACrB,kBAAkB,GAClB,iBAAiB,GACjB,YAAY,GACZ,mBAAmB,GACnB,iCAAiC,GACjC,uBAAuB,GACvB,YAAY,GACZ,MAAM,GACN,eAAe,GACf,cAAc,GACd,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,gBAAgB,GAChB,eAAe,GACf,WAAW,GACX,QAAQ,GACR,WAAW,GACX,SAAS,GACT,SAAS,GACT,WAAW,GACX,wBAAwB,CAAC;CAC9B;AAED,MAAM,WAAW,oDAAoD;IACnE,eAAe,CAAC,EAAE,8DAA8D,CAAC;CAClF;AAED,MAAM,MAAM,oDAAoD,GAC9D,oDAAoD,GAAG,iBAAiB,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEtD,MAAM,WAAW,gCAAgC;IAC/C,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,sCAAsC;IACrD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,iCAAiC,GAAG,sCAAsC,GACpF,gCAAgC,GAChC,iBAAiB,CAAC;AACpB,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AACzD,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AACzD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC"}
@@ -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 type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n AzureKeyVault,\n ClassificationRule,\n DataSource,\n Filter,\n Scan,\n ScanRuleset,\n Trigger,\n} from \"./models.js\";\n\nexport type KeyVaultConnectionsGetParameters = RequestParameters;\n\nexport interface KeyVaultConnectionsCreateBodyParam {\n body: AzureKeyVault;\n}\n\nexport type KeyVaultConnectionsCreateParameters = KeyVaultConnectionsCreateBodyParam &\n RequestParameters;\nexport type KeyVaultConnectionsDeleteParameters = RequestParameters;\nexport type KeyVaultConnectionsListAllParameters = RequestParameters;\nexport type ClassificationRulesGetParameters = RequestParameters;\n\nexport interface ClassificationRulesCreateOrUpdateBodyParam {\n body?: ClassificationRule;\n}\n\nexport type ClassificationRulesCreateOrUpdateParameters =\n ClassificationRulesCreateOrUpdateBodyParam & RequestParameters;\nexport type ClassificationRulesDeleteParameters = RequestParameters;\nexport type ClassificationRulesListAllParameters = RequestParameters;\nexport type ClassificationRulesListVersionsByClassificationRuleNameParameters = RequestParameters;\n\nexport interface ClassificationRulesTagClassificationVersionQueryParamProperties {\n action: \"Keep\" | \"Delete\";\n}\n\nexport interface ClassificationRulesTagClassificationVersionQueryParam {\n queryParameters: ClassificationRulesTagClassificationVersionQueryParamProperties;\n}\n\nexport type ClassificationRulesTagClassificationVersionParameters =\n ClassificationRulesTagClassificationVersionQueryParam & RequestParameters;\n\nexport interface DataSourcesCreateOrUpdateBodyParam {\n body?: DataSource;\n}\n\nexport type DataSourcesCreateOrUpdateParameters = DataSourcesCreateOrUpdateBodyParam &\n RequestParameters;\nexport type DataSourcesGetParameters = RequestParameters;\nexport type DataSourcesDeleteParameters = RequestParameters;\nexport type DataSourcesListAllParameters = RequestParameters;\nexport type FiltersGetParameters = RequestParameters;\n\nexport interface FiltersCreateOrUpdateBodyParam {\n body?: Filter;\n}\n\nexport type FiltersCreateOrUpdateParameters = FiltersCreateOrUpdateBodyParam & RequestParameters;\n\nexport interface ScansCreateOrUpdateBodyParam {\n body: Scan;\n}\n\nexport type ScansCreateOrUpdateParameters = ScansCreateOrUpdateBodyParam & RequestParameters;\nexport type ScansGetParameters = RequestParameters;\nexport type ScansDeleteParameters = RequestParameters;\nexport type ScansListByDataSourceParameters = RequestParameters;\n\nexport interface ScanResultRunScanQueryParamProperties {\n scanLevel?: \"Full\" | \"Incremental\";\n}\n\nexport interface ScanResultRunScanQueryParam {\n queryParameters?: ScanResultRunScanQueryParamProperties;\n}\n\nexport type ScanResultRunScanParameters = ScanResultRunScanQueryParam & RequestParameters;\nexport type ScanResultCancelScanParameters = RequestParameters;\nexport type ScanResultListScanHistoryParameters = RequestParameters;\nexport type ScanRulesetsGetParameters = RequestParameters;\n\nexport interface ScanRulesetsCreateOrUpdateBodyParam {\n body?: ScanRuleset;\n}\n\nexport type ScanRulesetsCreateOrUpdateParameters = ScanRulesetsCreateOrUpdateBodyParam &\n RequestParameters;\nexport type ScanRulesetsDeleteParameters = RequestParameters;\nexport type ScanRulesetsListAllParameters = RequestParameters;\nexport type SystemScanRulesetsListAllParameters = RequestParameters;\nexport type SystemScanRulesetsGetParameters = RequestParameters;\n\nexport interface SystemScanRulesetsGetByVersionQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsGetByVersionQueryParam {\n queryParameters?: SystemScanRulesetsGetByVersionQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetByVersionParameters = SystemScanRulesetsGetByVersionQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsGetLatestQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsGetLatestQueryParam {\n queryParameters?: SystemScanRulesetsGetLatestQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetLatestParameters = SystemScanRulesetsGetLatestQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParamProperties {\n dataSourceType?:\n | \"None\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"PowerBI\";\n}\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParam {\n queryParameters?: SystemScanRulesetsListVersionsByDataSourceQueryParamProperties;\n}\n\nexport type SystemScanRulesetsListVersionsByDataSourceParameters =\n SystemScanRulesetsListVersionsByDataSourceQueryParam & RequestParameters;\nexport type TriggersGetTriggerParameters = RequestParameters;\n\nexport interface TriggersCreateTriggerBodyParam {\n body: Trigger;\n}\n\nexport type TriggersCreateTriggerParameters = TriggersCreateTriggerBodyParam & RequestParameters;\nexport type TriggersDeleteTriggerParameters = 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 { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n AzureKeyVault,\n ClassificationRule,\n Credential,\n DataSource,\n Filter,\n IntegrationRuntime,\n IntegrationRuntimeRegenerateKeyParameters,\n EnableInteractiveQueryForIntegrationRuntimeRequest,\n ManagedVirtualNetwork,\n ManagedPrivateEndpoint,\n Scan,\n ScanRuleset,\n Trigger,\n} from \"./models.js\";\n\nexport type KeyVaultConnectionsGetParameters = RequestParameters;\n\nexport interface KeyVaultConnectionsCreateOrReplaceBodyParam {\n /** The Azure Key Vault connection definition. */\n body: AzureKeyVault;\n}\n\nexport interface KeyVaultConnectionsCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type KeyVaultConnectionsCreateOrReplaceParameters =\n KeyVaultConnectionsCreateOrReplaceMediaTypesParam &\n KeyVaultConnectionsCreateOrReplaceBodyParam &\n RequestParameters;\nexport type KeyVaultConnectionsDeleteParameters = RequestParameters;\nexport type KeyVaultConnectionsListParameters = RequestParameters;\nexport type ClassificationRulesGetParameters = RequestParameters;\n\nexport interface ClassificationRulesCreateOrReplaceBodyParam {\n /** The classification rule definition. */\n body: ClassificationRule;\n}\n\nexport interface ClassificationRulesCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ClassificationRulesCreateOrReplaceParameters =\n ClassificationRulesCreateOrReplaceMediaTypesParam &\n ClassificationRulesCreateOrReplaceBodyParam &\n RequestParameters;\nexport type ClassificationRulesDeleteParameters = RequestParameters;\nexport type ClassificationRulesListParameters = RequestParameters;\nexport type ClassificationRulesListVersionsByRuleNameParameters = RequestParameters;\n\nexport interface ClassificationRulesTagClassificationVersionQueryParamProperties {\n /** The action of classification rule. */\n action: \"Keep\" | \"Delete\";\n}\n\nexport interface ClassificationRulesTagClassificationVersionQueryParam {\n queryParameters: ClassificationRulesTagClassificationVersionQueryParamProperties;\n}\n\nexport type ClassificationRulesTagClassificationVersionParameters =\n ClassificationRulesTagClassificationVersionQueryParam & RequestParameters;\nexport type CredentialGetParameters = RequestParameters;\n\nexport interface CredentialCreateOrReplaceBodyParam {\n /** The credential definition. */\n body: Credential;\n}\n\nexport interface CredentialCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CredentialCreateOrReplaceParameters = CredentialCreateOrReplaceMediaTypesParam &\n CredentialCreateOrReplaceBodyParam &\n RequestParameters;\nexport type CredentialDeleteParameters = RequestParameters;\nexport type CredentialListParameters = RequestParameters;\n\nexport interface DataSourcesCreateOrReplaceBodyParam {\n /** The data source definition. */\n body: DataSource;\n}\n\nexport interface DataSourcesCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DataSourcesCreateOrReplaceParameters = DataSourcesCreateOrReplaceMediaTypesParam &\n DataSourcesCreateOrReplaceBodyParam &\n RequestParameters;\nexport type DataSourcesGetParameters = RequestParameters;\nexport type DataSourcesDeleteParameters = RequestParameters;\nexport type DataSourcesListParameters = RequestParameters;\nexport type FiltersGetParameters = RequestParameters;\n\nexport interface FiltersCreateOrReplaceBodyParam {\n /** The filter definition. */\n body: Filter;\n}\n\nexport interface FiltersCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type FiltersCreateOrReplaceParameters = FiltersCreateOrReplaceMediaTypesParam &\n FiltersCreateOrReplaceBodyParam &\n RequestParameters;\nexport type IntegrationRuntimesListByAccountParameters = RequestParameters;\nexport type IntegrationRuntimesGetParameters = RequestParameters;\nexport type IntegrationRuntimesDeleteParameters = RequestParameters;\n\nexport interface IntegrationRuntimesCreateOrReplaceBodyParam {\n /** The integration runtime definition. */\n body: IntegrationRuntime;\n}\n\nexport interface IntegrationRuntimesCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type IntegrationRuntimesCreateOrReplaceParameters =\n IntegrationRuntimesCreateOrReplaceMediaTypesParam &\n IntegrationRuntimesCreateOrReplaceBodyParam &\n RequestParameters;\nexport type IntegrationRuntimesStatusParameters = RequestParameters;\nexport type IntegrationRuntimesListAuthKeysParameters = RequestParameters;\n\nexport interface IntegrationRuntimesRegenerateAuthKeyBodyParam {\n /** The request of regenerating authentication key of an integration runtime. */\n body: IntegrationRuntimeRegenerateKeyParameters;\n}\n\nexport interface IntegrationRuntimesRegenerateAuthKeyMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type IntegrationRuntimesRegenerateAuthKeyParameters =\n IntegrationRuntimesRegenerateAuthKeyMediaTypesParam &\n IntegrationRuntimesRegenerateAuthKeyBodyParam &\n RequestParameters;\nexport type IntegrationRuntimesDisableInteractiveQueryParameters = RequestParameters;\n\nexport interface IntegrationRuntimesEnableInteractiveQueryBodyParam {\n /** The request of enabling interactive query for integration runtime. */\n body: EnableInteractiveQueryForIntegrationRuntimeRequest;\n}\n\nexport interface IntegrationRuntimesEnableInteractiveQueryMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type IntegrationRuntimesEnableInteractiveQueryParameters =\n IntegrationRuntimesEnableInteractiveQueryMediaTypesParam &\n IntegrationRuntimesEnableInteractiveQueryBodyParam &\n RequestParameters;\nexport type ManagedVirtualNetworksListByAccountParameters = RequestParameters;\nexport type ManagedVirtualNetworksGetParameters = RequestParameters;\n\nexport interface ManagedVirtualNetworksCreateOrReplaceBodyParam {\n /** The managed virtual network resource definition. */\n body: ManagedVirtualNetwork;\n}\n\nexport interface ManagedVirtualNetworksCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ManagedVirtualNetworksCreateOrReplaceParameters =\n ManagedVirtualNetworksCreateOrReplaceMediaTypesParam &\n ManagedVirtualNetworksCreateOrReplaceBodyParam &\n RequestParameters;\nexport type ManagedPrivateEndpointsListByAccountParameters = RequestParameters;\nexport type ManagedPrivateEndpointsGetParameters = RequestParameters;\nexport type ManagedPrivateEndpointsDeleteParameters = RequestParameters;\n\nexport interface ManagedPrivateEndpointsCreateOrReplaceBodyParam {\n /** The managed private endpoint resource definition. */\n body: ManagedPrivateEndpoint;\n}\n\nexport interface ManagedPrivateEndpointsCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ManagedPrivateEndpointsCreateOrReplaceParameters =\n ManagedPrivateEndpointsCreateOrReplaceMediaTypesParam &\n ManagedPrivateEndpointsCreateOrReplaceBodyParam &\n RequestParameters;\n\nexport interface ScansCreateOrReplaceBodyParam {\n /** The scan definition. */\n body: Scan;\n}\n\nexport interface ScansCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ScansCreateOrReplaceParameters = ScansCreateOrReplaceMediaTypesParam &\n ScansCreateOrReplaceBodyParam &\n RequestParameters;\nexport type ScansGetParameters = RequestParameters;\nexport type ScansDeleteParameters = RequestParameters;\nexport type ScansListByDataSourceParameters = RequestParameters;\nexport type ScanResultGetScanStatusParameters = RequestParameters;\n\nexport interface ScanResultRunScanQueryParamProperties {\n /** The scan run id. */\n runId: string;\n /** The scan level. */\n scanLevel?: \"Full\" | \"Incremental\";\n}\n\nexport interface ScanResultRunScanQueryParam {\n queryParameters: ScanResultRunScanQueryParamProperties;\n}\n\nexport type ScanResultRunScanParameters = ScanResultRunScanQueryParam & RequestParameters;\nexport type ScanResultCancelScanParameters = RequestParameters;\nexport type ScanResultListScanHistoryParameters = RequestParameters;\nexport type ScanRulesetsGetParameters = RequestParameters;\n\nexport interface ScanRulesetsCreateOrReplaceBodyParam {\n /** The scan rule set definition. */\n body: ScanRuleset;\n}\n\nexport interface ScanRulesetsCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ScanRulesetsCreateOrReplaceParameters = ScanRulesetsCreateOrReplaceMediaTypesParam &\n ScanRulesetsCreateOrReplaceBodyParam &\n RequestParameters;\nexport type ScanRulesetsDeleteParameters = RequestParameters;\nexport type ScanRulesetsListParameters = RequestParameters;\nexport type SystemScanRulesetsListParameters = RequestParameters;\nexport type SystemScanRulesetsGetParameters = RequestParameters;\n\nexport interface SystemScanRulesetsGetByVersionQueryParamProperties {\n /** The data source type. */\n dataSourceType?:\n | \"None\"\n | \"Fabric\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"ArcEnabledSqlServer\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"Databricks\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"Hdfs\"\n | \"TableauServer\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"PostgreSql\"\n | \"AmazonRedShift\"\n | \"DatabricksHms\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"Snowflake\"\n | \"PowerBI\"\n | \"Trident\"\n | \"Dataverse\"\n | \"DatabricksUnityCatalog\";\n}\n\nexport interface SystemScanRulesetsGetByVersionQueryParam {\n queryParameters?: SystemScanRulesetsGetByVersionQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetByVersionParameters = SystemScanRulesetsGetByVersionQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsGetLatestQueryParamProperties {\n /** The data source type. */\n dataSourceType?:\n | \"None\"\n | \"Fabric\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"ArcEnabledSqlServer\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"Databricks\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"Hdfs\"\n | \"TableauServer\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"PostgreSql\"\n | \"AmazonRedShift\"\n | \"DatabricksHms\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"Snowflake\"\n | \"PowerBI\"\n | \"Trident\"\n | \"Dataverse\"\n | \"DatabricksUnityCatalog\";\n}\n\nexport interface SystemScanRulesetsGetLatestQueryParam {\n queryParameters?: SystemScanRulesetsGetLatestQueryParamProperties;\n}\n\nexport type SystemScanRulesetsGetLatestParameters = SystemScanRulesetsGetLatestQueryParam &\n RequestParameters;\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParamProperties {\n /** The data source type. */\n dataSourceType?:\n | \"None\"\n | \"Fabric\"\n | \"AzureSubscription\"\n | \"AzureResourceGroup\"\n | \"AzureSynapseWorkspace\"\n | \"AzureSynapse\"\n | \"AdlsGen1\"\n | \"AdlsGen2\"\n | \"AmazonAccount\"\n | \"AmazonS3\"\n | \"AmazonSql\"\n | \"AzureCosmosDb\"\n | \"AzureDataExplorer\"\n | \"AzureFileService\"\n | \"AzureSqlDatabase\"\n | \"ArcEnabledSqlServer\"\n | \"AmazonPostgreSql\"\n | \"AzurePostgreSql\"\n | \"Databricks\"\n | \"SqlServerDatabase\"\n | \"AzureSqlDatabaseManagedInstance\"\n | \"AzureSqlDataWarehouse\"\n | \"AzureMySql\"\n | \"Hdfs\"\n | \"TableauServer\"\n | \"AzureStorage\"\n | \"Teradata\"\n | \"Oracle\"\n | \"PostgreSql\"\n | \"AmazonRedShift\"\n | \"DatabricksHms\"\n | \"SapS4Hana\"\n | \"SapEcc\"\n | \"Snowflake\"\n | \"PowerBI\"\n | \"Trident\"\n | \"Dataverse\"\n | \"DatabricksUnityCatalog\";\n}\n\nexport interface SystemScanRulesetsListVersionsByDataSourceQueryParam {\n queryParameters?: SystemScanRulesetsListVersionsByDataSourceQueryParamProperties;\n}\n\nexport type SystemScanRulesetsListVersionsByDataSourceParameters =\n SystemScanRulesetsListVersionsByDataSourceQueryParam & RequestParameters;\nexport type TriggersGetParameters = RequestParameters;\n\nexport interface TriggersCreateOrReplaceBodyParam {\n /** The trigger definition. */\n body: Trigger;\n}\n\nexport interface TriggersCreateOrReplaceMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type TriggersCreateOrReplaceParameters = TriggersCreateOrReplaceMediaTypesParam &\n TriggersCreateOrReplaceBodyParam &\n RequestParameters;\nexport type TriggersDeleteParameters = RequestParameters;\nexport type TriggersEnableParameters = RequestParameters;\nexport type TriggersDisableParameters = RequestParameters;\n"]}
@@ -0,0 +1,76 @@
1
+ import type { Client, HttpResponse } from "@azure-rest/core-client";
2
+ import type { AbortSignalLike } from "@azure/abort-controller";
3
+ import type { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
4
+ /**
5
+ * A simple poller that can be used to poll a long running operation.
6
+ */
7
+ export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
8
+ /**
9
+ * Returns true if the poller has finished polling.
10
+ */
11
+ isDone(): boolean;
12
+ /**
13
+ * Returns the state of the operation.
14
+ */
15
+ getOperationState(): TState;
16
+ /**
17
+ * Returns the result value of the operation,
18
+ * regardless of the state of the poller.
19
+ * It can return undefined or an incomplete form of the final TResult value
20
+ * depending on the implementation.
21
+ */
22
+ getResult(): TResult | undefined;
23
+ /**
24
+ * Returns a promise that will resolve once a single polling request finishes.
25
+ * It does this by calling the update method of the Poller's operation.
26
+ */
27
+ poll(options?: {
28
+ abortSignal?: AbortSignalLike;
29
+ }): Promise<TState>;
30
+ /**
31
+ * Returns a promise that will resolve once the underlying operation is completed.
32
+ */
33
+ pollUntilDone(pollOptions?: {
34
+ abortSignal?: AbortSignalLike;
35
+ }): Promise<TResult>;
36
+ /**
37
+ * Invokes the provided callback after each polling is completed,
38
+ * sending the current state of the poller's operation.
39
+ *
40
+ * It returns a method that can be used to stop receiving updates on the given callback function.
41
+ */
42
+ onProgress(callback: (state: TState) => void): CancelOnProgress;
43
+ /**
44
+ * Returns a promise that could be used for serialized version of the poller's operation
45
+ * by invoking the operation's serialize method.
46
+ */
47
+ serialize(): Promise<string>;
48
+ /**
49
+ * Wait the poller to be submitted.
50
+ */
51
+ submitted(): Promise<void>;
52
+ /**
53
+ * Returns a string representation of the poller's operation. Similar to serialize but returns a string.
54
+ * @deprecated Use serialize() instead.
55
+ */
56
+ toString(): string;
57
+ /**
58
+ * Stops the poller from continuing to poll. Please note this will only stop the client-side polling
59
+ * @deprecated Use abortSignal to stop polling instead.
60
+ */
61
+ stopPolling(): void;
62
+ /**
63
+ * Returns true if the poller is stopped.
64
+ * @deprecated Use abortSignal status to track this instead.
65
+ */
66
+ isStopped(): boolean;
67
+ }
68
+ /**
69
+ * Helper function that builds a Poller object to help polling a long running operation.
70
+ * @param client - Client to use for sending the request to get additional pages.
71
+ * @param initialResponse - The initial response.
72
+ * @param options - Options to set a resume state or custom polling interval.
73
+ * @returns - A poller object to poll for operation state updates and eventually get the final response.
74
+ */
75
+ export declare function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
76
+ //# sourceMappingURL=pollingHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EAGvB,cAAc,EACf,MAAM,iBAAiB,CAAC;AAGzB;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,MAAM,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO;IAC/E;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC;IAClB;;OAEG;IACH,iBAAiB,IAAI,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,SAAS,IAAI,OAAO,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE;;OAEG;IACH,aAAa,CAAC,WAAW,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,eAAe,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACjF;;;;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,gBAAgB,CAAC;IAEhE;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE7B;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B;;;OAGG;IACH,QAAQ,IAAI,MAAM,CAAC;IAEnB;;;OAGG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,SAAS,YAAY,EACrE,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,OAAO,EACxB,OAAO,GAAE,uBAAuB,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAM,GACtE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAgF7D"}
@@ -0,0 +1,104 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createHttpPoller } from "@azure/core-lro";
4
+ /**
5
+ * Helper function that builds a Poller object to help polling a long running operation.
6
+ * @param client - Client to use for sending the request to get additional pages.
7
+ * @param initialResponse - The initial response.
8
+ * @param options - Options to set a resume state or custom polling interval.
9
+ * @returns - A poller object to poll for operation state updates and eventually get the final response.
10
+ */
11
+ export async function getLongRunningPoller(client, initialResponse, options = {}) {
12
+ var _a;
13
+ const abortController = new AbortController();
14
+ const poller = {
15
+ sendInitialRequest: async () => {
16
+ // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
17
+ // we are not triggering the initial request here, just extracting the information from the
18
+ // response we were provided.
19
+ return getLroResponse(initialResponse);
20
+ },
21
+ sendPollRequest: async (path, pollOptions) => {
22
+ // This is the callback that is going to be called to poll the service
23
+ // to get the latest status. We use the client provided and the polling path
24
+ // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
25
+ // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
26
+ function abortListener() {
27
+ abortController.abort();
28
+ }
29
+ const inputAbortSignal = pollOptions === null || pollOptions === void 0 ? void 0 : pollOptions.abortSignal;
30
+ const abortSignal = abortController.signal;
31
+ if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {
32
+ abortController.abort();
33
+ }
34
+ else if (!abortSignal.aborted) {
35
+ inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, {
36
+ once: true,
37
+ });
38
+ }
39
+ let response;
40
+ try {
41
+ response = await client
42
+ .pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url)
43
+ .get({ abortSignal });
44
+ }
45
+ finally {
46
+ inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener);
47
+ }
48
+ const lroResponse = getLroResponse(response);
49
+ lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
50
+ return lroResponse;
51
+ },
52
+ };
53
+ options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
54
+ const httpPoller = createHttpPoller(poller, options);
55
+ const simplePoller = {
56
+ isDone() {
57
+ return httpPoller.isDone;
58
+ },
59
+ isStopped() {
60
+ return abortController.signal.aborted;
61
+ },
62
+ getOperationState() {
63
+ if (!httpPoller.operationState) {
64
+ throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
65
+ }
66
+ return httpPoller.operationState;
67
+ },
68
+ getResult() {
69
+ return httpPoller.result;
70
+ },
71
+ toString() {
72
+ if (!httpPoller.operationState) {
73
+ throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
74
+ }
75
+ return JSON.stringify({
76
+ state: httpPoller.operationState,
77
+ });
78
+ },
79
+ stopPolling() {
80
+ abortController.abort();
81
+ },
82
+ onProgress: httpPoller.onProgress,
83
+ poll: httpPoller.poll,
84
+ pollUntilDone: httpPoller.pollUntilDone,
85
+ serialize: httpPoller.serialize,
86
+ submitted: httpPoller.submitted,
87
+ };
88
+ return simplePoller;
89
+ }
90
+ /**
91
+ * Converts a Rest Client response to a response that the LRO implementation understands
92
+ * @param response - a rest client http response
93
+ * @returns - An LRO response that the LRO implementation understands
94
+ */
95
+ function getLroResponse(response) {
96
+ if (Number.isNaN(response.status)) {
97
+ throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
98
+ }
99
+ return {
100
+ flatResponse: response,
101
+ rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
102
+ };
103
+ }
104
+ //# sourceMappingURL=pollingHelper.js.map
@@ -0,0 +1 @@
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;AAoEnD;;;;;;GAMG;AACH,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;gBACpB,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,CAAC;YACD,MAAM,gBAAgB,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;YAClD,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC;YAC3C,IAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,EAAE,CAAC;gBAC9B,eAA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CAAC,cAAc,CAAC;QACnC,CAAC;QACD,SAAS;YACP,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,CAAC;QACD,QAAQ;YACN,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,4IAA4I,CAC7I,CAAC;YACJ,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,cAAc;aACjC,CAAC,CAAC;QACL,CAAC;QACD,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;QACD,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,SAAS,EAAE,UAAU,CAAC,SAAS;KAChC,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\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<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"]}
@@ -0,0 +1,16 @@
1
+ import type { ClientOptions } from "@azure-rest/core-client";
2
+ import type { TokenCredential } from "@azure/core-auth";
3
+ import type { PurviewScanningRestClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface PurviewScanningRestClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `PurviewScanningRestClient`
11
+ * @param endpoint - The scanning endpoint of your purview account. Example: https://{accountName}.purview.azure.com.
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ export default function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewScanningRestClientOptions): PurviewScanningRestClient;
16
+ //# sourceMappingURL=purviewScanningRestClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purviewScanningRestClient.d.ts","sourceRoot":"","sources":["../../src/purviewScanningRestClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,6CAA6C;AAC7C,MAAM,WAAW,gCAAiC,SAAQ,aAAa;IACrE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,eAAe,EAC5B,EAAE,UAAyB,EAAE,GAAG,OAAO,EAAE,GAAE,gCAAqC,GAC/E,yBAAyB,CAuC3B"}