@azure-rest/purview-scanning 1.0.0-beta.2 → 1.0.0-beta.3

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 (200) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +14 -15
  3. package/dist/browser/clientDefinitions.d.ts +277 -0
  4. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  5. package/dist/browser/clientDefinitions.js +4 -0
  6. package/dist/browser/clientDefinitions.js.map +1 -0
  7. package/dist/browser/index.d.ts +12 -0
  8. package/dist/browser/index.d.ts.map +1 -0
  9. package/dist/browser/index.js +14 -0
  10. package/dist/browser/index.js.map +1 -0
  11. package/dist/browser/isUnexpected.d.ts +60 -0
  12. package/dist/browser/isUnexpected.d.ts.map +1 -0
  13. package/dist/browser/isUnexpected.js +136 -0
  14. package/dist/browser/isUnexpected.js.map +1 -0
  15. package/dist/browser/logger.d.ts +2 -0
  16. package/dist/browser/logger.d.ts.map +1 -0
  17. package/dist/browser/logger.js +5 -0
  18. package/dist/browser/logger.js.map +1 -0
  19. package/dist/browser/models.d.ts +1978 -0
  20. package/dist/browser/models.d.ts.map +1 -0
  21. package/dist/browser/models.js +4 -0
  22. package/dist/browser/models.js.map +1 -0
  23. package/dist/browser/outputModels.d.ts +2269 -0
  24. package/dist/browser/outputModels.d.ts.map +1 -0
  25. package/dist/browser/outputModels.js +4 -0
  26. package/dist/browser/outputModels.js.map +1 -0
  27. package/dist/browser/package.json +3 -0
  28. package/dist/browser/paginateHelper.d.ts +68 -0
  29. package/dist/browser/paginateHelper.d.ts.map +1 -0
  30. package/dist/browser/paginateHelper.js +167 -0
  31. package/dist/browser/paginateHelper.js.map +1 -0
  32. package/dist/browser/parameters.d.ts +202 -0
  33. package/dist/browser/parameters.d.ts.map +1 -0
  34. package/dist/browser/parameters.js +4 -0
  35. package/dist/browser/parameters.js.map +1 -0
  36. package/dist/browser/pollingHelper.d.ts +76 -0
  37. package/dist/browser/pollingHelper.d.ts.map +1 -0
  38. package/dist/browser/pollingHelper.js +104 -0
  39. package/dist/browser/pollingHelper.js.map +1 -0
  40. package/dist/browser/purviewScanningRestClient.d.ts +16 -0
  41. package/dist/browser/purviewScanningRestClient.d.ts.map +1 -0
  42. package/dist/browser/purviewScanningRestClient.js +43 -0
  43. package/dist/browser/purviewScanningRestClient.js.map +1 -0
  44. package/dist/browser/responses.d.ts +940 -0
  45. package/dist/browser/responses.d.ts.map +1 -0
  46. package/dist/browser/responses.js +4 -0
  47. package/dist/browser/responses.js.map +1 -0
  48. package/dist/commonjs/clientDefinitions.d.ts +277 -0
  49. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  50. package/dist/commonjs/clientDefinitions.js +5 -0
  51. package/dist/commonjs/clientDefinitions.js.map +1 -0
  52. package/dist/commonjs/index.d.ts +12 -0
  53. package/dist/commonjs/index.d.ts.map +1 -0
  54. package/dist/commonjs/index.js +17 -0
  55. package/dist/commonjs/index.js.map +1 -0
  56. package/dist/commonjs/isUnexpected.d.ts +60 -0
  57. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  58. package/dist/commonjs/isUnexpected.js +139 -0
  59. package/dist/commonjs/isUnexpected.js.map +1 -0
  60. package/dist/commonjs/logger.d.ts +2 -0
  61. package/dist/commonjs/logger.d.ts.map +1 -0
  62. package/dist/commonjs/logger.js +8 -0
  63. package/dist/commonjs/logger.js.map +1 -0
  64. package/dist/commonjs/models.d.ts +1978 -0
  65. package/dist/commonjs/models.d.ts.map +1 -0
  66. package/dist/commonjs/models.js +5 -0
  67. package/dist/commonjs/models.js.map +1 -0
  68. package/dist/commonjs/outputModels.d.ts +2269 -0
  69. package/dist/commonjs/outputModels.d.ts.map +1 -0
  70. package/dist/commonjs/outputModels.js +5 -0
  71. package/dist/commonjs/outputModels.js.map +1 -0
  72. package/dist/commonjs/package.json +3 -0
  73. package/dist/commonjs/paginateHelper.d.ts +68 -0
  74. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  75. package/dist/commonjs/paginateHelper.js +170 -0
  76. package/dist/commonjs/paginateHelper.js.map +1 -0
  77. package/dist/commonjs/parameters.d.ts +202 -0
  78. package/dist/commonjs/parameters.d.ts.map +1 -0
  79. package/dist/commonjs/parameters.js +5 -0
  80. package/dist/commonjs/parameters.js.map +1 -0
  81. package/dist/commonjs/pollingHelper.d.ts +76 -0
  82. package/dist/commonjs/pollingHelper.d.ts.map +1 -0
  83. package/dist/commonjs/pollingHelper.js +107 -0
  84. package/dist/commonjs/pollingHelper.js.map +1 -0
  85. package/dist/commonjs/purviewScanningRestClient.d.ts +16 -0
  86. package/dist/commonjs/purviewScanningRestClient.d.ts.map +1 -0
  87. package/dist/commonjs/purviewScanningRestClient.js +46 -0
  88. package/dist/commonjs/purviewScanningRestClient.js.map +1 -0
  89. package/dist/commonjs/responses.d.ts +940 -0
  90. package/dist/commonjs/responses.d.ts.map +1 -0
  91. package/dist/commonjs/responses.js +5 -0
  92. package/dist/commonjs/responses.js.map +1 -0
  93. package/dist/commonjs/tsdoc-metadata.json +11 -0
  94. package/dist/esm/clientDefinitions.d.ts +277 -0
  95. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  96. package/dist/esm/clientDefinitions.js +4 -0
  97. package/dist/esm/clientDefinitions.js.map +1 -0
  98. package/dist/esm/index.d.ts +12 -0
  99. package/dist/esm/index.d.ts.map +1 -0
  100. package/dist/esm/index.js +14 -0
  101. package/dist/esm/index.js.map +1 -0
  102. package/dist/esm/isUnexpected.d.ts +60 -0
  103. package/dist/esm/isUnexpected.d.ts.map +1 -0
  104. package/dist/esm/isUnexpected.js +136 -0
  105. package/dist/esm/isUnexpected.js.map +1 -0
  106. package/dist/esm/logger.d.ts +2 -0
  107. package/dist/esm/logger.d.ts.map +1 -0
  108. package/dist/esm/logger.js +5 -0
  109. package/dist/esm/logger.js.map +1 -0
  110. package/dist/esm/models.d.ts +1978 -0
  111. package/dist/esm/models.d.ts.map +1 -0
  112. package/dist/esm/models.js +4 -0
  113. package/dist/esm/models.js.map +1 -0
  114. package/dist/esm/outputModels.d.ts +2269 -0
  115. package/dist/esm/outputModels.d.ts.map +1 -0
  116. package/dist/esm/outputModels.js +4 -0
  117. package/dist/esm/outputModels.js.map +1 -0
  118. package/dist/esm/package.json +3 -0
  119. package/dist/esm/paginateHelper.d.ts +68 -0
  120. package/dist/esm/paginateHelper.d.ts.map +1 -0
  121. package/dist/esm/paginateHelper.js +167 -0
  122. package/dist/esm/paginateHelper.js.map +1 -0
  123. package/dist/esm/parameters.d.ts +202 -0
  124. package/dist/esm/parameters.d.ts.map +1 -0
  125. package/dist/esm/parameters.js +4 -0
  126. package/dist/esm/parameters.js.map +1 -0
  127. package/dist/esm/pollingHelper.d.ts +76 -0
  128. package/dist/esm/pollingHelper.d.ts.map +1 -0
  129. package/dist/esm/pollingHelper.js +104 -0
  130. package/dist/esm/pollingHelper.js.map +1 -0
  131. package/dist/esm/purviewScanningRestClient.d.ts +16 -0
  132. package/dist/esm/purviewScanningRestClient.d.ts.map +1 -0
  133. package/dist/esm/purviewScanningRestClient.js +43 -0
  134. package/dist/esm/purviewScanningRestClient.js.map +1 -0
  135. package/dist/esm/responses.d.ts +940 -0
  136. package/dist/esm/responses.d.ts.map +1 -0
  137. package/dist/esm/responses.js +4 -0
  138. package/dist/esm/responses.js.map +1 -0
  139. package/dist/react-native/clientDefinitions.d.ts +277 -0
  140. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  141. package/dist/react-native/clientDefinitions.js +4 -0
  142. package/dist/react-native/clientDefinitions.js.map +1 -0
  143. package/dist/react-native/index.d.ts +12 -0
  144. package/dist/react-native/index.d.ts.map +1 -0
  145. package/dist/react-native/index.js +14 -0
  146. package/dist/react-native/index.js.map +1 -0
  147. package/dist/react-native/isUnexpected.d.ts +60 -0
  148. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  149. package/dist/react-native/isUnexpected.js +136 -0
  150. package/dist/react-native/isUnexpected.js.map +1 -0
  151. package/dist/react-native/logger.d.ts +2 -0
  152. package/dist/react-native/logger.d.ts.map +1 -0
  153. package/dist/react-native/logger.js +5 -0
  154. package/dist/react-native/logger.js.map +1 -0
  155. package/dist/react-native/models.d.ts +1978 -0
  156. package/dist/react-native/models.d.ts.map +1 -0
  157. package/dist/react-native/models.js +4 -0
  158. package/dist/react-native/models.js.map +1 -0
  159. package/dist/react-native/outputModels.d.ts +2269 -0
  160. package/dist/react-native/outputModels.d.ts.map +1 -0
  161. package/dist/react-native/outputModels.js +4 -0
  162. package/dist/react-native/outputModels.js.map +1 -0
  163. package/dist/react-native/package.json +3 -0
  164. package/dist/react-native/paginateHelper.d.ts +68 -0
  165. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  166. package/dist/react-native/paginateHelper.js +167 -0
  167. package/dist/react-native/paginateHelper.js.map +1 -0
  168. package/dist/react-native/parameters.d.ts +202 -0
  169. package/dist/react-native/parameters.d.ts.map +1 -0
  170. package/dist/react-native/parameters.js +4 -0
  171. package/dist/react-native/parameters.js.map +1 -0
  172. package/dist/react-native/pollingHelper.d.ts +76 -0
  173. package/dist/react-native/pollingHelper.d.ts.map +1 -0
  174. package/dist/react-native/pollingHelper.js +104 -0
  175. package/dist/react-native/pollingHelper.js.map +1 -0
  176. package/dist/react-native/purviewScanningRestClient.d.ts +16 -0
  177. package/dist/react-native/purviewScanningRestClient.d.ts.map +1 -0
  178. package/dist/react-native/purviewScanningRestClient.js +43 -0
  179. package/dist/react-native/purviewScanningRestClient.js.map +1 -0
  180. package/dist/react-native/responses.d.ts +940 -0
  181. package/dist/react-native/responses.d.ts.map +1 -0
  182. package/dist/react-native/responses.js +4 -0
  183. package/dist/react-native/responses.js.map +1 -0
  184. package/package.json +86 -71
  185. package/CHANGELOG.md +0 -10
  186. package/dist/index.js +0 -90
  187. package/dist/index.js.map +0 -1
  188. package/dist-esm/src/index.js +0 -10
  189. package/dist-esm/src/index.js.map +0 -1
  190. package/dist-esm/src/models.js +0 -4
  191. package/dist-esm/src/models.js.map +0 -1
  192. package/dist-esm/src/paginateHelper.js +0 -70
  193. package/dist-esm/src/paginateHelper.js.map +0 -1
  194. package/dist-esm/src/parameters.js +0 -4
  195. package/dist-esm/src/parameters.js.map +0 -1
  196. package/dist-esm/src/purviewScanning.js +0 -13
  197. package/dist-esm/src/purviewScanning.js.map +0 -1
  198. package/dist-esm/src/responses.js +0 -4
  199. package/dist-esm/src/responses.js.map +0 -1
  200. package/types/purview-scanning-rest.d.ts +0 -2681
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.paginate = paginate;
6
+ const tslib_1 = require("tslib");
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ /**
9
+ * returns an async iterator that iterates over results. It also has a `byPage`
10
+ * method that returns pages of items at once.
11
+ *
12
+ * @param pagedResult - an object that specifies how to get pages.
13
+ * @returns a paged async iterator that iterates over results.
14
+ */
15
+ function getPagedAsyncIterator(pagedResult) {
16
+ var _a;
17
+ const iter = getItemAsyncIterator(pagedResult);
18
+ return {
19
+ next() {
20
+ return iter.next();
21
+ },
22
+ [Symbol.asyncIterator]() {
23
+ return this;
24
+ },
25
+ byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
26
+ const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
27
+ return getPageAsyncIterator(pagedResult, {
28
+ pageLink: continuationToken,
29
+ });
30
+ }),
31
+ };
32
+ }
33
+ function getItemAsyncIterator(pagedResult) {
34
+ return tslib_1.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
35
+ var _a, e_1, _b, _c, _d, e_2, _e, _f;
36
+ const pages = getPageAsyncIterator(pagedResult);
37
+ const firstVal = yield tslib_1.__await(pages.next());
38
+ // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
39
+ if (!Array.isArray(firstVal.value)) {
40
+ // can extract elements from this page
41
+ const { toElements } = pagedResult;
42
+ if (toElements) {
43
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(toElements(firstVal.value))));
44
+ try {
45
+ for (var _g = true, pages_1 = tslib_1.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib_1.__await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {
46
+ _c = pages_1_1.value;
47
+ _g = false;
48
+ const page = _c;
49
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(toElements(page))));
50
+ }
51
+ }
52
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
53
+ finally {
54
+ try {
55
+ if (!_g && !_a && (_b = pages_1.return)) yield tslib_1.__await(_b.call(pages_1));
56
+ }
57
+ finally { if (e_1) throw e_1.error; }
58
+ }
59
+ }
60
+ else {
61
+ yield yield tslib_1.__await(firstVal.value);
62
+ // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
63
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(pages)));
64
+ }
65
+ }
66
+ else {
67
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(firstVal.value)));
68
+ try {
69
+ for (var _h = true, pages_2 = tslib_1.__asyncValues(pages), pages_2_1; pages_2_1 = yield tslib_1.__await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {
70
+ _f = pages_2_1.value;
71
+ _h = false;
72
+ const page = _f;
73
+ // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
74
+ // it must be the case that `TPage = TElement[]`
75
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
76
+ }
77
+ }
78
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
79
+ finally {
80
+ try {
81
+ if (!_h && !_d && (_e = pages_2.return)) yield tslib_1.__await(_e.call(pages_2));
82
+ }
83
+ finally { if (e_2) throw e_2.error; }
84
+ }
85
+ }
86
+ });
87
+ }
88
+ function getPageAsyncIterator(pagedResult_1) {
89
+ return tslib_1.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
90
+ const { pageLink } = options;
91
+ let response = yield tslib_1.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
92
+ if (!response) {
93
+ return yield tslib_1.__await(void 0);
94
+ }
95
+ yield yield tslib_1.__await(response.page);
96
+ while (response.nextPageLink) {
97
+ response = yield tslib_1.__await(pagedResult.getPage(response.nextPageLink));
98
+ if (!response) {
99
+ return yield tslib_1.__await(void 0);
100
+ }
101
+ yield yield tslib_1.__await(response.page);
102
+ }
103
+ });
104
+ }
105
+ /**
106
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
107
+ * @param client - Client to use for sending the next page requests
108
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
109
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
110
+ * @returns - PagedAsyncIterableIterator to iterate the elements
111
+ */
112
+ function paginate(client, initialResponse, options = {}) {
113
+ let firstRun = true;
114
+ const itemName = "value";
115
+ const nextLinkName = "nextLink";
116
+ const { customGetPage } = options;
117
+ const pagedResult = {
118
+ firstPageLink: "",
119
+ getPage: typeof customGetPage === "function"
120
+ ? customGetPage
121
+ : async (pageLink) => {
122
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
123
+ firstRun = false;
124
+ checkPagingRequest(result);
125
+ const nextLink = getNextLink(result.body, nextLinkName);
126
+ const values = getElements(result.body, itemName);
127
+ return {
128
+ page: values,
129
+ nextPageLink: nextLink,
130
+ };
131
+ },
132
+ };
133
+ return getPagedAsyncIterator(pagedResult);
134
+ }
135
+ /**
136
+ * Gets for the value of nextLink in the body
137
+ */
138
+ function getNextLink(body, nextLinkName) {
139
+ if (!nextLinkName) {
140
+ return undefined;
141
+ }
142
+ const nextLink = body[nextLinkName];
143
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
144
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
145
+ }
146
+ return nextLink;
147
+ }
148
+ /**
149
+ * Gets the elements of the current request in the body.
150
+ */
151
+ function getElements(body, itemName) {
152
+ const value = body[itemName];
153
+ // value has to be an array according to the x-ms-pageable extension.
154
+ // The fact that this must be an array is used above to calculate the
155
+ // type of elements in the page in PaginateReturn
156
+ if (!Array.isArray(value)) {
157
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
158
+ }
159
+ return value !== null && value !== void 0 ? value : [];
160
+ }
161
+ /**
162
+ * Checks if a request failed
163
+ */
164
+ function checkPagingRequest(response) {
165
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
166
+ if (!Http2xxStatusCodes.includes(response.status)) {
167
+ throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
168
+ }
169
+ }
170
+ //# sourceMappingURL=paginateHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA2LlC,4BA8BC;;AAtND,yDAA0D;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,CAAC,CAAC,QAAuB,EAAE,EAAE;YAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,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ACrB,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,IAAA,6BAAe,EACnB,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"]}
@@ -0,0 +1,202 @@
1
+ import type { RequestParameters } from "@azure-rest/core-client";
2
+ import type { AzureKeyVault, ClassificationRule, Credential, DataSource, Filter, IntegrationRuntime, IntegrationRuntimeRegenerateKeyParameters, EnableInteractiveQueryForIntegrationRuntimeRequest, ManagedVirtualNetwork, ManagedPrivateEndpoint, Scan, ScanRuleset, Trigger } from "./models.js";
3
+ export type KeyVaultConnectionsGetParameters = RequestParameters;
4
+ export interface KeyVaultConnectionsCreateOrReplaceBodyParam {
5
+ /** The Azure Key Vault connection definition. */
6
+ body: AzureKeyVault;
7
+ }
8
+ export interface KeyVaultConnectionsCreateOrReplaceMediaTypesParam {
9
+ /** Request content type */
10
+ contentType?: "application/json";
11
+ }
12
+ export type KeyVaultConnectionsCreateOrReplaceParameters = KeyVaultConnectionsCreateOrReplaceMediaTypesParam & KeyVaultConnectionsCreateOrReplaceBodyParam & RequestParameters;
13
+ export type KeyVaultConnectionsDeleteParameters = RequestParameters;
14
+ export type KeyVaultConnectionsListParameters = RequestParameters;
15
+ export type ClassificationRulesGetParameters = RequestParameters;
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";
23
+ }
24
+ export type ClassificationRulesCreateOrReplaceParameters = ClassificationRulesCreateOrReplaceMediaTypesParam & ClassificationRulesCreateOrReplaceBodyParam & RequestParameters;
25
+ export type ClassificationRulesDeleteParameters = RequestParameters;
26
+ export type ClassificationRulesListParameters = RequestParameters;
27
+ export type ClassificationRulesListVersionsByRuleNameParameters = RequestParameters;
28
+ export interface ClassificationRulesTagClassificationVersionQueryParamProperties {
29
+ /** The action of classification rule. */
30
+ action: "Keep" | "Delete";
31
+ }
32
+ export interface ClassificationRulesTagClassificationVersionQueryParam {
33
+ queryParameters: ClassificationRulesTagClassificationVersionQueryParamProperties;
34
+ }
35
+ export type ClassificationRulesTagClassificationVersionParameters = ClassificationRulesTagClassificationVersionQueryParam & 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;
57
+ export type DataSourcesGetParameters = RequestParameters;
58
+ export type DataSourcesDeleteParameters = RequestParameters;
59
+ export type DataSourcesListParameters = RequestParameters;
60
+ export type FiltersGetParameters = RequestParameters;
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. */
128
+ body: Scan;
129
+ }
130
+ export interface ScansCreateOrReplaceMediaTypesParam {
131
+ /** Request content type */
132
+ contentType?: "application/json";
133
+ }
134
+ export type ScansCreateOrReplaceParameters = ScansCreateOrReplaceMediaTypesParam & ScansCreateOrReplaceBodyParam & RequestParameters;
135
+ export type ScansGetParameters = RequestParameters;
136
+ export type ScansDeleteParameters = RequestParameters;
137
+ export type ScansListByDataSourceParameters = RequestParameters;
138
+ export type ScanResultGetScanStatusParameters = RequestParameters;
139
+ export interface ScanResultRunScanQueryParamProperties {
140
+ /** The scan run id. */
141
+ runId: string;
142
+ /** The scan level. */
143
+ scanLevel?: "Full" | "Incremental";
144
+ }
145
+ export interface ScanResultRunScanQueryParam {
146
+ queryParameters: ScanResultRunScanQueryParamProperties;
147
+ }
148
+ export type ScanResultRunScanParameters = ScanResultRunScanQueryParam & RequestParameters;
149
+ export type ScanResultCancelScanParameters = RequestParameters;
150
+ export type ScanResultListScanHistoryParameters = RequestParameters;
151
+ export type ScanRulesetsGetParameters = RequestParameters;
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";
159
+ }
160
+ export type ScanRulesetsCreateOrReplaceParameters = ScanRulesetsCreateOrReplaceMediaTypesParam & ScanRulesetsCreateOrReplaceBodyParam & RequestParameters;
161
+ export type ScanRulesetsDeleteParameters = RequestParameters;
162
+ export type ScanRulesetsListParameters = RequestParameters;
163
+ export type SystemScanRulesetsListParameters = RequestParameters;
164
+ export type SystemScanRulesetsGetParameters = RequestParameters;
165
+ export interface SystemScanRulesetsGetByVersionQueryParamProperties {
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";
168
+ }
169
+ export interface SystemScanRulesetsGetByVersionQueryParam {
170
+ queryParameters?: SystemScanRulesetsGetByVersionQueryParamProperties;
171
+ }
172
+ export type SystemScanRulesetsGetByVersionParameters = SystemScanRulesetsGetByVersionQueryParam & RequestParameters;
173
+ export interface SystemScanRulesetsGetLatestQueryParamProperties {
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";
176
+ }
177
+ export interface SystemScanRulesetsGetLatestQueryParam {
178
+ queryParameters?: SystemScanRulesetsGetLatestQueryParamProperties;
179
+ }
180
+ export type SystemScanRulesetsGetLatestParameters = SystemScanRulesetsGetLatestQueryParam & RequestParameters;
181
+ export interface SystemScanRulesetsListVersionsByDataSourceQueryParamProperties {
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";
184
+ }
185
+ export interface SystemScanRulesetsListVersionsByDataSourceQueryParam {
186
+ queryParameters?: SystemScanRulesetsListVersionsByDataSourceQueryParamProperties;
187
+ }
188
+ export type SystemScanRulesetsListVersionsByDataSourceParameters = SystemScanRulesetsListVersionsByDataSourceQueryParam & RequestParameters;
189
+ export type TriggersGetParameters = RequestParameters;
190
+ export interface TriggersCreateOrReplaceBodyParam {
191
+ /** The trigger definition. */
192
+ body: Trigger;
193
+ }
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;
202
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +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,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,yCAAyC,EACzC,kDAAkD,EAClD,qBAAqB,EACrB,sBAAsB,EACtB,IAAI,EACJ,WAAW,EACX,OAAO,EACR,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;AAEjE,MAAM,WAAW,2CAA2C;IAC1D,iDAAiD;IACjD,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,iDAAiD;IAChE,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,4CAA4C,GACtD,iDAAiD,GAC/C,2CAA2C,GAC3C,iBAAiB,CAAC;AACtB,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;AACpE,MAAM,MAAM,iCAAiC,GAAG,iBAAiB,CAAC;AAClE,MAAM,MAAM,gCAAgC,GAAG,iBAAiB,CAAC;AAEjE,MAAM,WAAW,2CAA2C;IAC1D,0CAA0C;IAC1C,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,MAAM,WAAW,iDAAiD;IAChE,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,4CAA4C,GACtD,iDAAiD,GAC/C,2CAA2C,GAC3C,iBAAiB,CAAC;AACtB,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC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B,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"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +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 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;I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