@azure-rest/confidential-ledger 1.1.2-beta.2 → 1.1.2-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 (138) hide show
  1. package/dist/commonjs/clientDefinitions.d.ts +10 -10
  2. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  3. package/dist/commonjs/clientDefinitions.js.map +1 -1
  4. package/dist/commonjs/confidentialLedger.d.ts +2 -2
  5. package/dist/commonjs/confidentialLedger.d.ts.map +1 -1
  6. package/dist/commonjs/confidentialLedger.js +5 -5
  7. package/dist/commonjs/confidentialLedger.js.map +1 -1
  8. package/dist/commonjs/isUnexpected.d.ts +19 -1
  9. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  10. package/dist/commonjs/isUnexpected.js +18 -0
  11. package/dist/commonjs/isUnexpected.js.map +1 -1
  12. package/dist/commonjs/models.d.ts +31 -31
  13. package/dist/commonjs/models.d.ts.map +1 -1
  14. package/dist/commonjs/models.js.map +1 -1
  15. package/dist/commonjs/outputModels.d.ts +25 -25
  16. package/dist/commonjs/outputModels.d.ts.map +1 -1
  17. package/dist/commonjs/outputModels.js.map +1 -1
  18. package/dist/commonjs/paginateHelper.d.ts +4 -0
  19. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  20. package/dist/commonjs/paginateHelper.js +8 -1
  21. package/dist/commonjs/paginateHelper.js.map +1 -1
  22. package/dist/commonjs/parameters.d.ts +44 -40
  23. package/dist/commonjs/parameters.d.ts.map +1 -1
  24. package/dist/commonjs/parameters.js.map +1 -1
  25. package/dist/commonjs/responses.d.ts +36 -36
  26. package/dist/commonjs/responses.d.ts.map +1 -1
  27. package/dist/commonjs/responses.js.map +1 -1
  28. package/dist/commonjs/tsdoc-metadata.json +1 -1
  29. package/dist/esm/clientDefinitions.d.ts +10 -10
  30. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  31. package/dist/esm/clientDefinitions.js.map +1 -1
  32. package/dist/esm/confidentialLedger.d.ts +2 -2
  33. package/dist/esm/confidentialLedger.d.ts.map +1 -1
  34. package/dist/esm/confidentialLedger.js +5 -5
  35. package/dist/esm/confidentialLedger.js.map +1 -1
  36. package/dist/esm/isUnexpected.d.ts +19 -1
  37. package/dist/esm/isUnexpected.d.ts.map +1 -1
  38. package/dist/esm/isUnexpected.js +18 -0
  39. package/dist/esm/isUnexpected.js.map +1 -1
  40. package/dist/esm/models.d.ts +31 -31
  41. package/dist/esm/models.d.ts.map +1 -1
  42. package/dist/esm/models.js.map +1 -1
  43. package/dist/esm/outputModels.d.ts +25 -25
  44. package/dist/esm/outputModels.d.ts.map +1 -1
  45. package/dist/esm/outputModels.js.map +1 -1
  46. package/dist/esm/paginateHelper.d.ts +4 -0
  47. package/dist/esm/paginateHelper.d.ts.map +1 -1
  48. package/dist/esm/paginateHelper.js +8 -1
  49. package/dist/esm/paginateHelper.js.map +1 -1
  50. package/dist/esm/parameters.d.ts +44 -40
  51. package/dist/esm/parameters.d.ts.map +1 -1
  52. package/dist/esm/parameters.js.map +1 -1
  53. package/dist/esm/responses.d.ts +36 -36
  54. package/dist/esm/responses.d.ts.map +1 -1
  55. package/dist/esm/responses.js.map +1 -1
  56. package/package.json +9 -17
  57. package/CHANGELOG.md +0 -28
  58. package/dist/commonjs/generated/clientDefinitions.d.ts +0 -153
  59. package/dist/commonjs/generated/clientDefinitions.d.ts.map +0 -1
  60. package/dist/commonjs/generated/clientDefinitions.js +0 -5
  61. package/dist/commonjs/generated/clientDefinitions.js.map +0 -1
  62. package/dist/commonjs/generated/confidentialLedger.d.ts +0 -16
  63. package/dist/commonjs/generated/confidentialLedger.d.ts.map +0 -1
  64. package/dist/commonjs/generated/confidentialLedger.js +0 -48
  65. package/dist/commonjs/generated/confidentialLedger.js.map +0 -1
  66. package/dist/commonjs/generated/index.d.ts +0 -11
  67. package/dist/commonjs/generated/index.d.ts.map +0 -1
  68. package/dist/commonjs/generated/index.js +0 -16
  69. package/dist/commonjs/generated/index.js.map +0 -1
  70. package/dist/commonjs/generated/isUnexpected.d.ts +0 -34
  71. package/dist/commonjs/generated/isUnexpected.d.ts.map +0 -1
  72. package/dist/commonjs/generated/isUnexpected.js +0 -105
  73. package/dist/commonjs/generated/isUnexpected.js.map +0 -1
  74. package/dist/commonjs/generated/logger.d.ts +0 -2
  75. package/dist/commonjs/generated/logger.d.ts.map +0 -1
  76. package/dist/commonjs/generated/logger.js +0 -8
  77. package/dist/commonjs/generated/logger.js.map +0 -1
  78. package/dist/commonjs/generated/models.d.ts +0 -87
  79. package/dist/commonjs/generated/models.d.ts.map +0 -1
  80. package/dist/commonjs/generated/models.js +0 -5
  81. package/dist/commonjs/generated/models.js.map +0 -1
  82. package/dist/commonjs/generated/outputModels.d.ts +0 -280
  83. package/dist/commonjs/generated/outputModels.d.ts.map +0 -1
  84. package/dist/commonjs/generated/outputModels.js +0 -5
  85. package/dist/commonjs/generated/outputModels.js.map +0 -1
  86. package/dist/commonjs/generated/paginateHelper.d.ts +0 -88
  87. package/dist/commonjs/generated/paginateHelper.d.ts.map +0 -1
  88. package/dist/commonjs/generated/paginateHelper.js +0 -223
  89. package/dist/commonjs/generated/paginateHelper.js.map +0 -1
  90. package/dist/commonjs/generated/parameters.d.ts +0 -168
  91. package/dist/commonjs/generated/parameters.d.ts.map +0 -1
  92. package/dist/commonjs/generated/parameters.js +0 -5
  93. package/dist/commonjs/generated/parameters.js.map +0 -1
  94. package/dist/commonjs/generated/responses.d.ts +0 -337
  95. package/dist/commonjs/generated/responses.d.ts.map +0 -1
  96. package/dist/commonjs/generated/responses.js +0 -5
  97. package/dist/commonjs/generated/responses.js.map +0 -1
  98. package/dist/esm/generated/clientDefinitions.d.ts +0 -153
  99. package/dist/esm/generated/clientDefinitions.d.ts.map +0 -1
  100. package/dist/esm/generated/clientDefinitions.js +0 -4
  101. package/dist/esm/generated/clientDefinitions.js.map +0 -1
  102. package/dist/esm/generated/confidentialLedger.d.ts +0 -16
  103. package/dist/esm/generated/confidentialLedger.d.ts.map +0 -1
  104. package/dist/esm/generated/confidentialLedger.js +0 -45
  105. package/dist/esm/generated/confidentialLedger.js.map +0 -1
  106. package/dist/esm/generated/index.d.ts +0 -11
  107. package/dist/esm/generated/index.d.ts.map +0 -1
  108. package/dist/esm/generated/index.js +0 -13
  109. package/dist/esm/generated/index.js.map +0 -1
  110. package/dist/esm/generated/isUnexpected.d.ts +0 -34
  111. package/dist/esm/generated/isUnexpected.d.ts.map +0 -1
  112. package/dist/esm/generated/isUnexpected.js +0 -102
  113. package/dist/esm/generated/isUnexpected.js.map +0 -1
  114. package/dist/esm/generated/logger.d.ts +0 -2
  115. package/dist/esm/generated/logger.d.ts.map +0 -1
  116. package/dist/esm/generated/logger.js +0 -5
  117. package/dist/esm/generated/logger.js.map +0 -1
  118. package/dist/esm/generated/models.d.ts +0 -87
  119. package/dist/esm/generated/models.d.ts.map +0 -1
  120. package/dist/esm/generated/models.js +0 -4
  121. package/dist/esm/generated/models.js.map +0 -1
  122. package/dist/esm/generated/outputModels.d.ts +0 -280
  123. package/dist/esm/generated/outputModels.d.ts.map +0 -1
  124. package/dist/esm/generated/outputModels.js +0 -4
  125. package/dist/esm/generated/outputModels.js.map +0 -1
  126. package/dist/esm/generated/paginateHelper.d.ts +0 -88
  127. package/dist/esm/generated/paginateHelper.d.ts.map +0 -1
  128. package/dist/esm/generated/paginateHelper.js +0 -220
  129. package/dist/esm/generated/paginateHelper.js.map +0 -1
  130. package/dist/esm/generated/parameters.d.ts +0 -168
  131. package/dist/esm/generated/parameters.d.ts.map +0 -1
  132. package/dist/esm/generated/parameters.js +0 -4
  133. package/dist/esm/generated/parameters.js.map +0 -1
  134. package/dist/esm/generated/responses.d.ts +0 -337
  135. package/dist/esm/generated/responses.d.ts.map +0 -1
  136. package/dist/esm/generated/responses.js +0 -4
  137. package/dist/esm/generated/responses.js.map +0 -1
  138. package/review/confidential-ledger.api.md +0 -1494
@@ -1,223 +0,0 @@
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
- // We need to check the response for success before trying to inspect it looking for
115
- // the properties to use for nextLink and itemName
116
- checkPagingRequest(initialResponse);
117
- const { itemName, nextLinkName } = getPaginationProperties(initialResponse);
118
- const { customGetPage } = options;
119
- const pagedResult = {
120
- firstPageLink: "",
121
- getPage: typeof customGetPage === "function"
122
- ? customGetPage
123
- : async (pageLink) => {
124
- const result = firstRun
125
- ? initialResponse
126
- : await client.pathUnchecked(pageLink).get();
127
- firstRun = false;
128
- checkPagingRequest(result);
129
- const nextLink = getNextLink(result.body, nextLinkName);
130
- const values = getElements(result.body, itemName);
131
- return {
132
- page: values,
133
- nextPageLink: nextLink,
134
- };
135
- },
136
- };
137
- return getPagedAsyncIterator(pagedResult);
138
- }
139
- /**
140
- * Gets for the value of nextLink in the body
141
- */
142
- function getNextLink(body, nextLinkName) {
143
- if (!nextLinkName) {
144
- return undefined;
145
- }
146
- const nextLink = body[nextLinkName];
147
- if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
148
- throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
149
- }
150
- return nextLink;
151
- }
152
- /**
153
- * Gets the elements of the current request in the body.
154
- */
155
- function getElements(body, itemName) {
156
- const value = body[itemName];
157
- // value has to be an array according to the x-ms-pageable extension.
158
- // The fact that this must be an array is used above to calculate the
159
- // type of elements in the page in PaginateReturn
160
- if (!Array.isArray(value)) {
161
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
162
- }
163
- return value !== null && value !== void 0 ? value : [];
164
- }
165
- /**
166
- * Checks if a request failed
167
- */
168
- function checkPagingRequest(response) {
169
- const Http2xxStatusCodes = [
170
- "200",
171
- "201",
172
- "202",
173
- "203",
174
- "204",
175
- "205",
176
- "206",
177
- "207",
178
- "208",
179
- "226",
180
- ];
181
- if (!Http2xxStatusCodes.includes(response.status)) {
182
- throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
183
- }
184
- }
185
- /**
186
- * Extracts the itemName and nextLinkName from the initial response to use them for pagination
187
- */
188
- function getPaginationProperties(initialResponse) {
189
- // Build a set with the passed custom nextLinkNames
190
- const nextLinkNames = new Set(["nextLink", "@nextLink"]);
191
- // Build a set with the passed custom set of itemNames
192
- const itemNames = new Set([
193
- "value",
194
- "members",
195
- "collections",
196
- "entries",
197
- "ledgerUsers",
198
- "functions",
199
- ]);
200
- let nextLinkName;
201
- let itemName;
202
- for (const name of nextLinkNames) {
203
- const nextLink = initialResponse.body[name];
204
- if (nextLink) {
205
- nextLinkName = name;
206
- break;
207
- }
208
- }
209
- for (const name of itemNames) {
210
- const item = initialResponse.body[name];
211
- if (item) {
212
- itemName = name;
213
- break;
214
- }
215
- }
216
- if (!itemName) {
217
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${[
218
- ...itemNames,
219
- ].join(" OR ")}`);
220
- }
221
- return { itemName, nextLinkName };
222
- }
223
- //# sourceMappingURL=paginateHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../src/generated/paginateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAuNlC,4BAkCC;;AAtPD,yDAA0D;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAC/B,WAAW,CACZ,CAAC;IACF,OAAO;QACL,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC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,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAI,eAAe,CAAC,IAAgC,CAC5D,IAAI,CACK,CAAC;QACZ,IAAI,IAAI,EAAE,CAAC;YACT,QAAQ,GAAG,IAAI,CAAC;YAChB,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,kFAAkF;YAChF,GAAG,SAAS;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACjB,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AACpC,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>(\n pagedResult,\n );\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 (\n settings?: TPageSettings,\n ) => 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(\n pageLink ?? pagedResult.firstPageLink,\n );\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<\n TElement,\n TPage,\n TPageSettings\n >;\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: (\n pageLink: TLink,\n ) => 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 | {\n body: { value?: infer TPage };\n }\n | {\n body: { members?: infer TPage };\n }\n | {\n body: { collections?: infer TPage };\n }\n | {\n body: { entries?: infer TPage };\n }\n | {\n body: { ledgerUsers?: infer TPage };\n }\n | {\n body: { functions?: 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 // We need to check the response for success before trying to inspect it looking for\n // the properties to use for nextLink and itemName\n checkPagingRequest(initialResponse);\n const { itemName, nextLinkName } = getPaginationProperties(initialResponse);\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\n ? initialResponse\n : 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(\n `Body Property ${nextLinkName} should be a string or undefined`,\n );\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 = [\n \"200\",\n \"201\",\n \"202\",\n \"203\",\n \"204\",\n \"205\",\n \"206\",\n \"207\",\n \"208\",\n \"226\",\n ];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n\n/**\n * Extracts the itemName and nextLinkName from the initial response to use them for pagination\n */\nfunction getPaginationProperties(initialResponse: PathUncheckedResponse) {\n // Build a set with the passed custom nextLinkNames\n const nextLinkNames = new Set([\"nextLink\", \"@nextLink\"]);\n\n // Build a set with the passed custom set of itemNames\n const itemNames = new Set([\n \"value\",\n \"members\",\n \"collections\",\n \"entries\",\n \"ledgerUsers\",\n \"functions\",\n ]);\n\n let nextLinkName: string | undefined;\n let itemName: string | undefined;\n\n for (const name of nextLinkNames) {\n const nextLink = (initialResponse.body as Record<string, unknown>)[\n name\n ] as string;\n if (nextLink) {\n nextLinkName = name;\n break;\n }\n }\n\n for (const name of itemNames) {\n const item = (initialResponse.body as Record<string, unknown>)[\n name\n ] as string;\n if (item) {\n itemName = name;\n break;\n }\n }\n\n if (!itemName) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${[\n ...itemNames,\n ].join(\" OR \")}`,\n );\n }\n\n return { itemName, nextLinkName };\n}\n"]}
@@ -1,168 +0,0 @@
1
- import type { RequestParameters } from "@azure-rest/core-client";
2
- import type { LedgerEntry, LedgerUser, LedgerUserMultipleRoles, Bundle, JSRuntimeOptions, UserDefinedFunction, UserDefinedFunctionExecutionProperties, Role } from "./models.js";
3
- export type GetConstitutionParameters = RequestParameters;
4
- export type ListConsortiumMembersParameters = RequestParameters;
5
- export type GetEnclaveQuotesParameters = RequestParameters;
6
- export type ListCollectionsParameters = RequestParameters;
7
- export interface ListLedgerEntriesQueryParamProperties {
8
- /** The collection id. */
9
- collectionId?: string;
10
- /** Specify the first transaction ID in a range. */
11
- fromTransactionId?: string;
12
- /** Specify the last transaction ID in a range. */
13
- toTransactionId?: string;
14
- /** Single tag. */
15
- tag?: string;
16
- }
17
- export interface ListLedgerEntriesQueryParam {
18
- queryParameters?: ListLedgerEntriesQueryParamProperties;
19
- }
20
- export type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam & RequestParameters;
21
- export interface CreateLedgerEntryBodyParam {
22
- /** Ledger entry. */
23
- body: LedgerEntry;
24
- }
25
- export interface CreateLedgerEntryQueryParamProperties {
26
- /** The collection id. */
27
- collectionId?: string;
28
- /** Comma separated tags. */
29
- tags?: string;
30
- }
31
- export interface CreateLedgerEntryQueryParam {
32
- queryParameters?: CreateLedgerEntryQueryParamProperties;
33
- }
34
- export interface CreateLedgerEntryMediaTypesParam {
35
- /** Request content type */
36
- contentType?: "application/json";
37
- }
38
- export type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam & CreateLedgerEntryMediaTypesParam & CreateLedgerEntryBodyParam & RequestParameters;
39
- export interface GetLedgerEntryQueryParamProperties {
40
- /** The collection id. */
41
- collectionId?: string;
42
- }
43
- export interface GetLedgerEntryQueryParam {
44
- queryParameters?: GetLedgerEntryQueryParamProperties;
45
- }
46
- export type GetLedgerEntryParameters = GetLedgerEntryQueryParam & RequestParameters;
47
- export type GetReceiptParameters = RequestParameters;
48
- export type GetTransactionStatusParameters = RequestParameters;
49
- export interface GetCurrentLedgerEntryQueryParamProperties {
50
- /** The collection id. */
51
- collectionId?: string;
52
- }
53
- export interface GetCurrentLedgerEntryQueryParam {
54
- queryParameters?: GetCurrentLedgerEntryQueryParamProperties;
55
- }
56
- export type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam & RequestParameters;
57
- export type ListUsersParameters = RequestParameters;
58
- export type ListLedgerUsersParameters = RequestParameters;
59
- export type DeleteUserParameters = RequestParameters;
60
- export type GetUserParameters = RequestParameters;
61
- /** Details about a Confidential Ledger user. */
62
- export type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;
63
- export interface CreateOrUpdateUserBodyParam {
64
- /** Details about a Confidential Ledger user. */
65
- body: LedgerUserResourceMergeAndPatch;
66
- }
67
- export interface CreateOrUpdateUserMediaTypesParam {
68
- /** Request content type */
69
- contentType?: "application/merge-patch+json";
70
- }
71
- export type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam & CreateOrUpdateUserBodyParam & RequestParameters;
72
- export type DeleteLedgerUserParameters = RequestParameters;
73
- export type GetLedgerUserParameters = RequestParameters;
74
- /** Details about a Confidential Ledger user with multiple roles. */
75
- export type LedgerUserMultipleRolesResourceMergeAndPatch = Partial<LedgerUserMultipleRoles>;
76
- export interface CreateOrUpdateLedgerUserBodyParam {
77
- /** Details about a Confidential Ledger user with multiple roles. */
78
- body: LedgerUserMultipleRolesResourceMergeAndPatch;
79
- }
80
- export interface CreateOrUpdateLedgerUserMediaTypesParam {
81
- /** Request content type */
82
- contentType?: "application/merge-patch+json";
83
- }
84
- export type CreateOrUpdateLedgerUserParameters = CreateOrUpdateLedgerUserMediaTypesParam & CreateOrUpdateLedgerUserBodyParam & RequestParameters;
85
- export type GetUserDefinedEndpointParameters = RequestParameters;
86
- export interface CreateUserDefinedEndpointBodyParam {
87
- /** bundle parameter description */
88
- body: Bundle;
89
- }
90
- export interface CreateUserDefinedEndpointMediaTypesParam {
91
- /** Request content type */
92
- contentType?: "application/json";
93
- }
94
- export type CreateUserDefinedEndpointParameters = CreateUserDefinedEndpointMediaTypesParam & CreateUserDefinedEndpointBodyParam & RequestParameters;
95
- export type GetRuntimeOptionsParameters = RequestParameters;
96
- export interface UpdateRuntimeOptionsBodyParam {
97
- /** JS runtime options */
98
- body: JSRuntimeOptions;
99
- }
100
- export interface UpdateRuntimeOptionsMediaTypesParam {
101
- /** Request content type */
102
- contentType?: "application/json";
103
- }
104
- export type UpdateRuntimeOptionsParameters = UpdateRuntimeOptionsMediaTypesParam & UpdateRuntimeOptionsBodyParam & RequestParameters;
105
- export interface GetUserDefinedEndpointsModuleQueryParamProperties {
106
- /** module name of the user defined endpoint */
107
- module_name: string;
108
- }
109
- export interface GetUserDefinedEndpointsModuleQueryParam {
110
- queryParameters: GetUserDefinedEndpointsModuleQueryParamProperties;
111
- }
112
- export type GetUserDefinedEndpointsModuleParameters = GetUserDefinedEndpointsModuleQueryParam & RequestParameters;
113
- export type ListUserDefinedFunctionsParameters = RequestParameters;
114
- export type DeleteUserDefinedFunctionParameters = RequestParameters;
115
- export type GetUserDefinedFunctionParameters = RequestParameters;
116
- export interface CreateUserDefinedFunctionBodyParam {
117
- /** Specify a user defined function of a Confidential Ledger. */
118
- body: UserDefinedFunction;
119
- }
120
- export interface CreateUserDefinedFunctionMediaTypesParam {
121
- /** Request content type */
122
- contentType?: "application/json";
123
- }
124
- export type CreateUserDefinedFunctionParameters = CreateUserDefinedFunctionMediaTypesParam & CreateUserDefinedFunctionBodyParam & RequestParameters;
125
- export interface ExecuteUserDefinedFunctionBodyParam {
126
- /** Specify user defined function execution properties. */
127
- body?: UserDefinedFunctionExecutionProperties;
128
- }
129
- export interface ExecuteUserDefinedFunctionMediaTypesParam {
130
- /** Request content type */
131
- contentType?: "application/json";
132
- }
133
- export type ExecuteUserDefinedFunctionParameters = ExecuteUserDefinedFunctionMediaTypesParam & ExecuteUserDefinedFunctionBodyParam & RequestParameters;
134
- export interface GetUserDefinedRoleQueryParamProperties {
135
- /** user defined role name */
136
- roleName: string;
137
- }
138
- export interface GetUserDefinedRoleQueryParam {
139
- queryParameters: GetUserDefinedRoleQueryParamProperties;
140
- }
141
- export type GetUserDefinedRoleParameters = GetUserDefinedRoleQueryParam & RequestParameters;
142
- export interface CreateUserDefinedRoleBodyParam {
143
- /** user defined role */
144
- body: Array<Role>;
145
- }
146
- export interface CreateUserDefinedRoleMediaTypesParam {
147
- /** Request content type */
148
- contentType?: "application/json";
149
- }
150
- export type CreateUserDefinedRoleParameters = CreateUserDefinedRoleMediaTypesParam & CreateUserDefinedRoleBodyParam & RequestParameters;
151
- export interface UpdateUserDefinedRoleBodyParam {
152
- /** user defined role */
153
- body: Array<Role>;
154
- }
155
- export interface UpdateUserDefinedRoleMediaTypesParam {
156
- /** Request content type */
157
- contentType?: "application/json";
158
- }
159
- export type UpdateUserDefinedRoleParameters = UpdateUserDefinedRoleMediaTypesParam & UpdateUserDefinedRoleBodyParam & RequestParameters;
160
- export interface DeleteUserDefinedRoleQueryParamProperties {
161
- /** user defined role name */
162
- roleName: string;
163
- }
164
- export interface DeleteUserDefinedRoleQueryParam {
165
- queryParameters: DeleteUserDefinedRoleQueryParamProperties;
166
- }
167
- export type DeleteUserDefinedRoleParameters = DeleteUserDefinedRoleQueryParam & RequestParameters;
168
- //# sourceMappingURL=parameters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/generated/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,MAAM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,sCAAsC,EACtC,IAAI,EACL,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC1D,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;AAChE,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAE1D,MAAM,WAAW,qCAAqC;IACpD,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,qCAAqC,CAAC;CACzD;AAED,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,GACnE,iBAAiB,CAAC;AAEpB,MAAM,WAAW,0BAA0B;IACzC,oBAAoB;IACpB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,qCAAqC;IACpD,yBAAyB;IACzB,YAAY,CAAC,EAAE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xB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,oCAAoC;IACnD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,+BAA+B,GACzC,oCAAoC,GAClC,8BAA8B,GAC9B,iBAAiB,CAAC;AAEtB,MAAM,WAAW,yCAAyC;IACxD,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,+BAA+B;IAC9C,eAAe,EAAE,yCAAyC,CAAC;CAC5D;AAED,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,GAC3E,iBAAiB,CAAC"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/generated/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 LedgerEntry,\n LedgerUser,\n LedgerUserMultipleRoles,\n Bundle,\n JSRuntimeOptions,\n UserDefinedFunction,\n UserDefinedFunctionExecutionProperties,\n Role,\n} from \"./models.js\";\n\nexport type GetConstitutionParameters = RequestParameters;\nexport type ListConsortiumMembersParameters = RequestParameters;\nexport type GetEnclaveQuotesParameters = RequestParameters;\nexport type ListCollectionsParameters = RequestParameters;\n\nexport interface ListLedgerEntriesQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n /** Specify the first transaction ID in a range. */\n fromTransactionId?: string;\n /** Specify the last transaction ID in a range. */\n toTransactionId?: string;\n /** Single tag. */\n tag?: string;\n}\n\nexport interface ListLedgerEntriesQueryParam {\n queryParameters?: ListLedgerEntriesQueryParamProperties;\n}\n\nexport type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam &\n RequestParameters;\n\nexport interface CreateLedgerEntryBodyParam {\n /** Ledger entry. */\n body: LedgerEntry;\n}\n\nexport interface CreateLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n /** Comma separated tags. */\n tags?: string;\n}\n\nexport interface CreateLedgerEntryQueryParam {\n queryParameters?: CreateLedgerEntryQueryParamProperties;\n}\n\nexport interface CreateLedgerEntryMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam &\n CreateLedgerEntryMediaTypesParam &\n CreateLedgerEntryBodyParam &\n RequestParameters;\n\nexport interface GetLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface GetLedgerEntryQueryParam {\n queryParameters?: GetLedgerEntryQueryParamProperties;\n}\n\nexport type GetLedgerEntryParameters = GetLedgerEntryQueryParam &\n RequestParameters;\nexport type GetReceiptParameters = RequestParameters;\nexport type GetTransactionStatusParameters = RequestParameters;\n\nexport interface GetCurrentLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface GetCurrentLedgerEntryQueryParam {\n queryParameters?: GetCurrentLedgerEntryQueryParamProperties;\n}\n\nexport type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam &\n RequestParameters;\nexport type ListUsersParameters = RequestParameters;\nexport type ListLedgerUsersParameters = RequestParameters;\nexport type DeleteUserParameters = RequestParameters;\nexport type GetUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user. */\nexport type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;\n\nexport interface CreateOrUpdateUserBodyParam {\n /** Details about a Confidential Ledger user. */\n body: LedgerUserResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam &\n CreateOrUpdateUserBodyParam &\n RequestParameters;\nexport type DeleteLedgerUserParameters = RequestParameters;\nexport type GetLedgerUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user with multiple roles. */\nexport type LedgerUserMultipleRolesResourceMergeAndPatch =\n Partial<LedgerUserMultipleRoles>;\n\nexport interface CreateOrUpdateLedgerUserBodyParam {\n /** Details about a Confidential Ledger user with multiple roles. */\n body: LedgerUserMultipleRolesResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateLedgerUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateLedgerUserParameters =\n CreateOrUpdateLedgerUserMediaTypesParam &\n CreateOrUpdateLedgerUserBodyParam &\n RequestParameters;\nexport type GetUserDefinedEndpointParameters = RequestParameters;\n\nexport interface CreateUserDefinedEndpointBodyParam {\n /** bundle parameter description */\n body: Bundle;\n}\n\nexport interface CreateUserDefinedEndpointMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedEndpointParameters =\n CreateUserDefinedEndpointMediaTypesParam &\n CreateUserDefinedEndpointBodyParam &\n RequestParameters;\nexport type GetRuntimeOptionsParameters = RequestParameters;\n\nexport interface UpdateRuntimeOptionsBodyParam {\n /** JS runtime options */\n body: JSRuntimeOptions;\n}\n\nexport interface UpdateRuntimeOptionsMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type UpdateRuntimeOptionsParameters =\n UpdateRuntimeOptionsMediaTypesParam &\n UpdateRuntimeOptionsBodyParam &\n RequestParameters;\n\nexport interface GetUserDefinedEndpointsModuleQueryParamProperties {\n /** module name of the user defined endpoint */\n module_name: string;\n}\n\nexport interface GetUserDefinedEndpointsModuleQueryParam {\n queryParameters: GetUserDefinedEndpointsModuleQueryParamProperties;\n}\n\nexport type GetUserDefinedEndpointsModuleParameters =\n GetUserDefinedEndpointsModuleQueryParam & RequestParameters;\nexport type ListUserDefinedFunctionsParameters = RequestParameters;\nexport type DeleteUserDefinedFunctionParameters = RequestParameters;\nexport type GetUserDefinedFunctionParameters = RequestParameters;\n\nexport interface CreateUserDefinedFunctionBodyParam {\n /** Specify a user defined function of a Confidential Ledger. */\n body: UserDefinedFunction;\n}\n\nexport interface CreateUserDefinedFunctionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedFunctionParameters =\n CreateUserDefinedFunctionMediaTypesParam &\n CreateUserDefinedFunctionBodyParam &\n RequestParameters;\n\nexport interface ExecuteUserDefinedFunctionBodyParam {\n /** Specify user defined function execution properties. */\n body?: UserDefinedFunctionExecutionProperties;\n}\n\nexport interface ExecuteUserDefinedFunctionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ExecuteUserDefinedFunctionParameters =\n ExecuteUserDefinedFunctionMediaTypesParam &\n ExecuteUserDefinedFunctionBodyParam &\n RequestParameters;\n\nexport interface GetUserDefinedRoleQueryParamProperties {\n /** user defined role name */\n roleName: string;\n}\n\nexport interface GetUserDefinedRoleQueryParam {\n queryParameters: GetUserDefinedRoleQueryParamProperties;\n}\n\nexport type GetUserDefinedRoleParameters = GetUserDefinedRoleQueryParam &\n RequestParameters;\n\nexport interface CreateUserDefinedRoleBodyParam {\n /** user defined role */\n body: Array<Role>;\n}\n\nexport interface CreateUserDefinedRoleMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedRoleParameters =\n CreateUserDefinedRoleMediaTypesParam &\n CreateUserDefinedRoleBodyParam &\n RequestParameters;\n\nexport interface UpdateUserDefinedRoleBodyParam {\n /** user defined role */\n body: Array<Role>;\n}\n\nexport interface UpdateUserDefinedRoleMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type UpdateUserDefinedRoleParameters =\n UpdateUserDefinedRoleMediaTypesParam &\n UpdateUserDefinedRoleBodyParam &\n RequestParameters;\n\nexport interface DeleteUserDefinedRoleQueryParamProperties {\n /** user defined role name */\n roleName: string;\n}\n\nexport interface DeleteUserDefinedRoleQueryParam {\n queryParameters: DeleteUserDefinedRoleQueryParamProperties;\n}\n\nexport type DeleteUserDefinedRoleParameters = DeleteUserDefinedRoleQueryParam &\n RequestParameters;\n"]}