@azure-rest/confidential-ledger 1.1.0-alpha.20241218.1 → 1.1.0-alpha.20241220.2

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 (144) hide show
  1. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  2. package/dist/commonjs/{generated/src/clientDefinitions.js → clientDefinitions.js} +1 -1
  3. package/dist/commonjs/clientDefinitions.js.map +1 -0
  4. package/dist/commonjs/confidentialLedger.d.ts +15 -5
  5. package/dist/commonjs/confidentialLedger.d.ts.map +1 -1
  6. package/dist/commonjs/confidentialLedger.js +39 -18
  7. package/dist/commonjs/confidentialLedger.js.map +1 -1
  8. package/dist/commonjs/confidentialLedgerCustomized.d.ts +6 -0
  9. package/dist/commonjs/confidentialLedgerCustomized.d.ts.map +1 -0
  10. package/dist/commonjs/confidentialLedgerCustomized.js +25 -0
  11. package/dist/commonjs/confidentialLedgerCustomized.js.map +1 -0
  12. package/dist/commonjs/index.d.ts +9 -9
  13. package/dist/commonjs/index.d.ts.map +1 -1
  14. package/dist/commonjs/index.js +10 -10
  15. package/dist/commonjs/index.js.map +1 -1
  16. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  17. package/dist/commonjs/{generated/src/isUnexpected.js → isUnexpected.js} +3 -4
  18. package/dist/commonjs/isUnexpected.js.map +1 -0
  19. package/dist/commonjs/logger.d.ts.map +1 -0
  20. package/dist/commonjs/{generated/src/logger.js → logger.js} +1 -1
  21. package/dist/commonjs/logger.js.map +1 -0
  22. package/dist/commonjs/models.d.ts.map +1 -0
  23. package/dist/commonjs/{generated/src/models.js → models.js} +1 -1
  24. package/dist/commonjs/models.js.map +1 -0
  25. package/dist/commonjs/outputModels.d.ts.map +1 -0
  26. package/dist/commonjs/{generated/src/outputModels.js → outputModels.js} +1 -1
  27. package/dist/commonjs/outputModels.js.map +1 -0
  28. package/dist/{esm/generated/src → commonjs}/paginateHelper.d.ts +27 -2
  29. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  30. package/dist/commonjs/paginateHelper.js +203 -0
  31. package/dist/commonjs/paginateHelper.js.map +1 -0
  32. package/dist/commonjs/parameters.d.ts.map +1 -0
  33. package/dist/commonjs/{generated/src/parameters.js → parameters.js} +1 -1
  34. package/dist/commonjs/parameters.js.map +1 -0
  35. package/dist/commonjs/responses.d.ts.map +1 -0
  36. package/dist/commonjs/{generated/src/responses.js → responses.js} +1 -1
  37. package/dist/commonjs/responses.js.map +1 -0
  38. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  39. package/dist/esm/clientDefinitions.js +4 -0
  40. package/dist/esm/clientDefinitions.js.map +1 -0
  41. package/dist/esm/confidentialLedger.d.ts +15 -5
  42. package/dist/esm/confidentialLedger.d.ts.map +1 -1
  43. package/dist/esm/confidentialLedger.js +39 -17
  44. package/dist/esm/confidentialLedger.js.map +1 -1
  45. package/dist/esm/confidentialLedgerCustomized.d.ts +6 -0
  46. package/dist/esm/confidentialLedgerCustomized.d.ts.map +1 -0
  47. package/dist/esm/confidentialLedgerCustomized.js +21 -0
  48. package/dist/esm/confidentialLedgerCustomized.js.map +1 -0
  49. package/dist/esm/index.d.ts +9 -9
  50. package/dist/esm/index.d.ts.map +1 -1
  51. package/dist/esm/index.js +9 -9
  52. package/dist/esm/index.js.map +1 -1
  53. package/dist/esm/isUnexpected.d.ts.map +1 -0
  54. package/dist/esm/{generated/src/isUnexpected.js → isUnexpected.js} +3 -4
  55. package/dist/esm/isUnexpected.js.map +1 -0
  56. package/dist/esm/logger.d.ts.map +1 -0
  57. package/dist/esm/{generated/src/logger.js → logger.js} +1 -1
  58. package/dist/esm/logger.js.map +1 -0
  59. package/dist/esm/models.d.ts.map +1 -0
  60. package/dist/esm/models.js +4 -0
  61. package/dist/esm/models.js.map +1 -0
  62. package/dist/esm/outputModels.d.ts.map +1 -0
  63. package/dist/esm/outputModels.js +4 -0
  64. package/dist/esm/outputModels.js.map +1 -0
  65. package/dist/{commonjs/generated/src → esm}/paginateHelper.d.ts +27 -2
  66. package/dist/esm/paginateHelper.d.ts.map +1 -0
  67. package/dist/esm/paginateHelper.js +200 -0
  68. package/dist/esm/paginateHelper.js.map +1 -0
  69. package/dist/esm/parameters.d.ts.map +1 -0
  70. package/dist/esm/parameters.js +4 -0
  71. package/dist/esm/parameters.js.map +1 -0
  72. package/dist/esm/responses.d.ts.map +1 -0
  73. package/dist/esm/responses.js +4 -0
  74. package/dist/esm/responses.js.map +1 -0
  75. package/package.json +2 -3
  76. package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +0 -1
  77. package/dist/commonjs/generated/src/clientDefinitions.js.map +0 -1
  78. package/dist/commonjs/generated/src/confidentialLedger.d.ts +0 -11
  79. package/dist/commonjs/generated/src/confidentialLedger.d.ts.map +0 -1
  80. package/dist/commonjs/generated/src/confidentialLedger.js +0 -35
  81. package/dist/commonjs/generated/src/confidentialLedger.js.map +0 -1
  82. package/dist/commonjs/generated/src/index.d.ts +0 -11
  83. package/dist/commonjs/generated/src/index.d.ts.map +0 -1
  84. package/dist/commonjs/generated/src/index.js +0 -16
  85. package/dist/commonjs/generated/src/index.js.map +0 -1
  86. package/dist/commonjs/generated/src/isUnexpected.d.ts.map +0 -1
  87. package/dist/commonjs/generated/src/isUnexpected.js.map +0 -1
  88. package/dist/commonjs/generated/src/logger.d.ts.map +0 -1
  89. package/dist/commonjs/generated/src/logger.js.map +0 -1
  90. package/dist/commonjs/generated/src/models.d.ts.map +0 -1
  91. package/dist/commonjs/generated/src/models.js.map +0 -1
  92. package/dist/commonjs/generated/src/outputModels.d.ts.map +0 -1
  93. package/dist/commonjs/generated/src/outputModels.js.map +0 -1
  94. package/dist/commonjs/generated/src/paginateHelper.d.ts.map +0 -1
  95. package/dist/commonjs/generated/src/paginateHelper.js +0 -125
  96. package/dist/commonjs/generated/src/paginateHelper.js.map +0 -1
  97. package/dist/commonjs/generated/src/parameters.d.ts.map +0 -1
  98. package/dist/commonjs/generated/src/parameters.js.map +0 -1
  99. package/dist/commonjs/generated/src/responses.d.ts.map +0 -1
  100. package/dist/commonjs/generated/src/responses.js.map +0 -1
  101. package/dist/esm/generated/src/clientDefinitions.d.ts.map +0 -1
  102. package/dist/esm/generated/src/clientDefinitions.js +0 -4
  103. package/dist/esm/generated/src/clientDefinitions.js.map +0 -1
  104. package/dist/esm/generated/src/confidentialLedger.d.ts +0 -11
  105. package/dist/esm/generated/src/confidentialLedger.d.ts.map +0 -1
  106. package/dist/esm/generated/src/confidentialLedger.js +0 -32
  107. package/dist/esm/generated/src/confidentialLedger.js.map +0 -1
  108. package/dist/esm/generated/src/index.d.ts +0 -11
  109. package/dist/esm/generated/src/index.d.ts.map +0 -1
  110. package/dist/esm/generated/src/index.js +0 -13
  111. package/dist/esm/generated/src/index.js.map +0 -1
  112. package/dist/esm/generated/src/isUnexpected.d.ts.map +0 -1
  113. package/dist/esm/generated/src/isUnexpected.js.map +0 -1
  114. package/dist/esm/generated/src/logger.d.ts.map +0 -1
  115. package/dist/esm/generated/src/logger.js.map +0 -1
  116. package/dist/esm/generated/src/models.d.ts.map +0 -1
  117. package/dist/esm/generated/src/models.js +0 -4
  118. package/dist/esm/generated/src/models.js.map +0 -1
  119. package/dist/esm/generated/src/outputModels.d.ts.map +0 -1
  120. package/dist/esm/generated/src/outputModels.js +0 -4
  121. package/dist/esm/generated/src/outputModels.js.map +0 -1
  122. package/dist/esm/generated/src/paginateHelper.d.ts.map +0 -1
  123. package/dist/esm/generated/src/paginateHelper.js +0 -122
  124. package/dist/esm/generated/src/paginateHelper.js.map +0 -1
  125. package/dist/esm/generated/src/parameters.d.ts.map +0 -1
  126. package/dist/esm/generated/src/parameters.js +0 -4
  127. package/dist/esm/generated/src/parameters.js.map +0 -1
  128. package/dist/esm/generated/src/responses.d.ts.map +0 -1
  129. package/dist/esm/generated/src/responses.js +0 -4
  130. package/dist/esm/generated/src/responses.js.map +0 -1
  131. /package/dist/commonjs/{generated/src/clientDefinitions.d.ts → clientDefinitions.d.ts} +0 -0
  132. /package/dist/commonjs/{generated/src/isUnexpected.d.ts → isUnexpected.d.ts} +0 -0
  133. /package/dist/commonjs/{generated/src/logger.d.ts → logger.d.ts} +0 -0
  134. /package/dist/commonjs/{generated/src/models.d.ts → models.d.ts} +0 -0
  135. /package/dist/commonjs/{generated/src/outputModels.d.ts → outputModels.d.ts} +0 -0
  136. /package/dist/commonjs/{generated/src/parameters.d.ts → parameters.d.ts} +0 -0
  137. /package/dist/commonjs/{generated/src/responses.d.ts → responses.d.ts} +0 -0
  138. /package/dist/esm/{generated/src/clientDefinitions.d.ts → clientDefinitions.d.ts} +0 -0
  139. /package/dist/esm/{generated/src/isUnexpected.d.ts → isUnexpected.d.ts} +0 -0
  140. /package/dist/esm/{generated/src/logger.d.ts → logger.d.ts} +0 -0
  141. /package/dist/esm/{generated/src/models.d.ts → models.d.ts} +0 -0
  142. /package/dist/esm/{generated/src/outputModels.d.ts → outputModels.d.ts} +0 -0
  143. /package/dist/esm/{generated/src/parameters.d.ts → parameters.d.ts} +0 -0
  144. /package/dist/esm/{generated/src/responses.d.ts → responses.d.ts} +0 -0
@@ -1,122 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getPagedAsyncIterator } from "@azure/core-paging";
4
- import { createRestError } from "@azure-rest/core-client";
5
- /**
6
- * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
7
- * @param client - Client to use for sending the next page requests
8
- * @param initialResponse - Initial response containing the nextLink and current page of elements
9
- * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
10
- * @returns - PagedAsyncIterableIterator to iterate the elements
11
- */
12
- export function paginate(client, initialResponse, options = {}) {
13
- let firstRun = true;
14
- // We need to check the response for success before trying to inspect it looking for
15
- // the properties to use for nextLink and itemName
16
- checkPagingRequest(initialResponse);
17
- const { itemName, nextLinkName } = getPaginationProperties(initialResponse);
18
- const { customGetPage } = options;
19
- const pagedResult = {
20
- firstPageLink: "",
21
- getPage: typeof customGetPage === "function"
22
- ? customGetPage
23
- : async (pageLink) => {
24
- const result = firstRun
25
- ? initialResponse
26
- : await client.pathUnchecked(pageLink).get();
27
- firstRun = false;
28
- checkPagingRequest(result);
29
- const nextLink = getNextLink(result.body, nextLinkName);
30
- const values = getElements(result.body, itemName);
31
- return {
32
- page: values,
33
- nextPageLink: nextLink
34
- };
35
- }
36
- };
37
- return getPagedAsyncIterator(pagedResult);
38
- }
39
- /**
40
- * Gets for the value of nextLink in the body
41
- */
42
- function getNextLink(body, nextLinkName) {
43
- if (!nextLinkName) {
44
- return undefined;
45
- }
46
- const nextLink = body[nextLinkName];
47
- if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
48
- throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
49
- }
50
- return nextLink;
51
- }
52
- /**
53
- * Gets the elements of the current request in the body.
54
- */
55
- function getElements(body, itemName) {
56
- const value = body[itemName];
57
- // value has to be an array according to the x-ms-pageable extension.
58
- // The fact that this must be an array is used above to calculate the
59
- // type of elements in the page in PaginateReturn
60
- if (!Array.isArray(value)) {
61
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
62
- }
63
- return value !== null && value !== void 0 ? value : [];
64
- }
65
- /**
66
- * Checks if a request failed
67
- */
68
- function checkPagingRequest(response) {
69
- const Http2xxStatusCodes = [
70
- "200",
71
- "201",
72
- "202",
73
- "203",
74
- "204",
75
- "205",
76
- "206",
77
- "207",
78
- "208",
79
- "226"
80
- ];
81
- if (!Http2xxStatusCodes.includes(response.status)) {
82
- throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
83
- }
84
- }
85
- /**
86
- * Extracts the itemName and nextLinkName from the initial response to use them for pagination
87
- */
88
- function getPaginationProperties(initialResponse) {
89
- // Build a set with the passed custom nextLinkNames
90
- const nextLinkNames = new Set(["nextLink", "@nextLink"]);
91
- // Build a set with the passed custom set of itemNames
92
- const itemNames = new Set([
93
- "value",
94
- "members",
95
- "collections",
96
- "entries",
97
- "ledgerUsers"
98
- ]);
99
- let nextLinkName;
100
- let itemName;
101
- for (const name of nextLinkNames) {
102
- const nextLink = initialResponse.body[name];
103
- if (nextLink) {
104
- nextLinkName = name;
105
- break;
106
- }
107
- }
108
- for (const name of itemNames) {
109
- const item = initialResponse.body[name];
110
- if (item) {
111
- itemName = name;
112
- break;
113
- }
114
- }
115
- if (!itemName) {
116
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${[
117
- ...itemNames
118
- ].join(" OR ")}`);
119
- }
120
- return { itemName, nextLinkName };
121
- }
122
- //# sourceMappingURL=paginateHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../../src/generated/src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,qBAAqB,EAGtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,eAAe,EAEhB,MAAM,yBAAyB,CAAC;AAsDjC;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,oFAAoF;IACpF,kDAAkD;IAClD,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC;IAC5E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ;oBACrB,CAAC,CAAC,eAAe;oBACjB,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GA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,YAAY,EAAE,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n getPagedAsyncIterator,\n PagedAsyncIterableIterator,\n PagedResult\n} from \"@azure/core-paging\";\nimport {\n Client,\n createRestError,\n PathUncheckedResponse\n} from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends\n | {\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 ? 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 ]);\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 +0,0 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,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;CAC1B;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,qCAAqC,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AAM,WAAW,2BAA2B;IAC1C,gDAAgD;IAChD,IAAI,EAAE,+BAA+B,CAAC;CACvC;AAED,MAAM,WAAW,iCAAiC;IAChD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,8BAA8B,CAAC;CAC9C;AAED,MAAM,MAAM,4BAA4B,GAAG,iCAAiC,GAC1E,2BAA2B,GAC3B,iBAAiB,CAAC"}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=parameters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { LedgerEntry, LedgerUser } 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}\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}\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 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;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,gBAAgB,EAChB,gCAAgC,EAChC,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAw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IACpE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,mDAAmD;AACnD,MAAM,WAAW,oCAAqC,SAAQ,YAAY;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,6BAA6B,CAAC;CACrC;AAED,wDAAwD;AACxD,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,wDAAwD;AACxD,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,6BAA6B,CAAC;CACrC;AAED,mDAAmD;AACnD,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,MAAM,EAAE,KAAK,CAAC;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,yBAA0B,SAAQ,YAAY;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,6BAA6B,CAAC;CACrC;AAED,mBAAmB;AACnB,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,mBAAmB;AACnB,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,6BAA6B,CAAC;CACrC;AAED,uDAAuD;AACvD,MAAM,WAAW,6BAA8B,SAAQ,YAAY;IACjE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,uDAAuD;AACvD,MAAM,WAAW,iCAAkC,SAAQ,YAAY;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,6BAA6B,CAAC;CACrC"}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=responses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../../src/generated/src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n ConstitutionOutput,\n ConfidentialLedgerErrorOutput,\n ConsortiumOutput,\n ConfidentialLedgerEnclavesOutput,\n PagedCollectionsOutput,\n PagedLedgerEntriesOutput,\n LedgerWriteResultOutput,\n LedgerQueryResultOutput,\n TransactionReceiptOutput,\n TransactionStatusOutput,\n LedgerEntryOutput,\n PagedUsersOutput,\n LedgerUserOutput\n} from \"./outputModels.js\";\n\n/** The constitution is a script that assesses and applies proposals from consortium members. */\nexport interface GetConstitution200Response extends HttpResponse {\n status: \"200\";\n body: ConstitutionOutput;\n}\n\n/** The constitution is a script that assesses and applies proposals from consortium members. */\nexport interface GetConstitutionDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Consortium members can manage the Confidential Ledger. */\nexport interface ListConsortiumMembers200Response extends HttpResponse {\n status: \"200\";\n body: ConsortiumOutput;\n}\n\n/** Consortium members can manage the Confidential Ledger. */\nexport interface ListConsortiumMembersDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */\nexport interface GetEnclaveQuotes200Response extends HttpResponse {\n status: \"200\";\n body: ConfidentialLedgerEnclavesOutput;\n}\n\n/** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */\nexport interface GetEnclaveQuotesDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Collection ids are user-created collections of ledger entries */\nexport interface ListCollections200Response extends HttpResponse {\n status: \"200\";\n body: PagedCollectionsOutput;\n}\n\n/** Collection ids are user-created collections of ledger entries */\nexport interface ListCollectionsDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */\nexport interface ListLedgerEntries200Response extends HttpResponse {\n status: \"200\";\n body: PagedLedgerEntriesOutput;\n}\n\n/** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */\nexport interface ListLedgerEntriesDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\nexport interface CreateLedgerEntry200Headers {\n /** The transaction id at which this write will become durable. */\n \"x-ms-ccf-transaction-id\"?: string;\n}\n\n/** A collection id may optionally be specified. */\nexport interface CreateLedgerEntry200Response extends HttpResponse {\n status: \"200\";\n body: LedgerWriteResultOutput;\n headers: RawHttpHeaders & CreateLedgerEntry200Headers;\n}\n\n/** A collection id may optionally be specified. */\nexport interface CreateLedgerEntryDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. */\nexport interface GetLedgerEntry200Response extends HttpResponse {\n status: \"200\";\n body: LedgerQueryResultOutput;\n}\n\n/** To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the response, or if the loading is still ongoing. */\nexport interface GetLedgerEntryDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Gets a receipt certifying ledger contents at a particular transaction id. */\nexport interface GetReceipt200Response extends HttpResponse {\n status: \"200\";\n body: TransactionReceiptOutput;\n}\n\n/** Gets a receipt certifying ledger contents at a particular transaction id. */\nexport interface GetReceiptDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Gets the status of an entry identified by a transaction id. */\nexport interface GetTransactionStatus200Response extends HttpResponse {\n status: \"200\";\n body: TransactionStatusOutput;\n}\n\n/** Gets the status of an entry identified by a transaction id. */\nexport interface GetTransactionStatusDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** A collection id may optionally be specified. */\nexport interface GetCurrentLedgerEntry200Response extends HttpResponse {\n status: \"200\";\n body: LedgerEntryOutput;\n}\n\n/** A collection id may optionally be specified. */\nexport interface GetCurrentLedgerEntryDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** All users' object IDs and roles will be returned. */\nexport interface ListUsers200Response extends HttpResponse {\n status: \"200\";\n body: PagedUsersOutput;\n}\n\n/** All users' object IDs and roles will be returned. */\nexport interface ListUsersDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Deletes a user from the Confidential Ledger. */\nexport interface DeleteUser204Response extends HttpResponse {\n status: \"204\";\n}\n\n/** Deletes a user from the Confidential Ledger. */\nexport interface DeleteUserDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** Gets a user. */\nexport interface GetUser200Response extends HttpResponse {\n status: \"200\";\n body: LedgerUserOutput;\n}\n\n/** Gets a user. */\nexport interface GetUserDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n\n/** A JSON merge patch is applied for existing users */\nexport interface CreateOrUpdateUser200Response extends HttpResponse {\n status: \"200\";\n body: LedgerUserOutput;\n}\n\n/** A JSON merge patch is applied for existing users */\nexport interface CreateOrUpdateUserDefaultResponse extends HttpResponse {\n status: string;\n body: ConfidentialLedgerErrorOutput;\n}\n"]}