@azure-rest/confidential-ledger 1.1.0-alpha.20250117.1 → 1.1.2-alpha.20250120.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/commonjs/clientDefinitions.d.ts +11 -3
  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 +3 -3
  5. package/dist/commonjs/confidentialLedger.d.ts.map +1 -1
  6. package/dist/commonjs/confidentialLedger.js.map +1 -1
  7. package/dist/commonjs/generated/clientDefinitions.d.ts +131 -0
  8. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  9. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  10. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  11. package/dist/commonjs/generated/confidentialLedger.d.ts +16 -0
  12. package/dist/commonjs/generated/confidentialLedger.d.ts.map +1 -0
  13. package/dist/commonjs/generated/confidentialLedger.js +48 -0
  14. package/dist/commonjs/generated/confidentialLedger.js.map +1 -0
  15. package/dist/commonjs/generated/index.d.ts +11 -0
  16. package/dist/commonjs/generated/index.d.ts.map +1 -0
  17. package/dist/commonjs/generated/index.js +16 -0
  18. package/dist/commonjs/generated/index.js.map +1 -0
  19. package/dist/commonjs/generated/isUnexpected.d.ts +29 -0
  20. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  21. package/dist/commonjs/generated/isUnexpected.js +100 -0
  22. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  23. package/dist/commonjs/generated/logger.d.ts +2 -0
  24. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  25. package/dist/commonjs/generated/logger.js +8 -0
  26. package/dist/commonjs/generated/logger.js.map +1 -0
  27. package/dist/commonjs/generated/models.d.ts +62 -0
  28. package/dist/commonjs/generated/models.d.ts.map +1 -0
  29. package/dist/commonjs/generated/models.js +5 -0
  30. package/dist/commonjs/generated/models.js.map +1 -0
  31. package/dist/commonjs/generated/outputModels.d.ts +228 -0
  32. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  33. package/dist/commonjs/generated/outputModels.js +5 -0
  34. package/dist/commonjs/generated/outputModels.js.map +1 -0
  35. package/dist/commonjs/generated/paginateHelper.d.ts +84 -0
  36. package/dist/commonjs/generated/paginateHelper.d.ts.map +1 -0
  37. package/dist/commonjs/generated/paginateHelper.js +222 -0
  38. package/dist/commonjs/generated/paginateHelper.js.map +1 -0
  39. package/dist/commonjs/generated/parameters.d.ts +143 -0
  40. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  41. package/dist/commonjs/generated/parameters.js +5 -0
  42. package/dist/commonjs/generated/parameters.js.map +1 -0
  43. package/dist/commonjs/generated/responses.d.ts +273 -0
  44. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  45. package/dist/commonjs/generated/responses.js +5 -0
  46. package/dist/commonjs/generated/responses.js.map +1 -0
  47. package/dist/commonjs/isUnexpected.d.ts +1 -1
  48. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  49. package/dist/commonjs/isUnexpected.js.map +1 -1
  50. package/dist/commonjs/models.d.ts +31 -0
  51. package/dist/commonjs/models.d.ts.map +1 -1
  52. package/dist/commonjs/models.js.map +1 -1
  53. package/dist/commonjs/outputModels.d.ts +31 -0
  54. package/dist/commonjs/outputModels.d.ts.map +1 -1
  55. package/dist/commonjs/outputModels.js.map +1 -1
  56. package/dist/commonjs/paginateHelper.d.ts +1 -1
  57. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  58. package/dist/commonjs/paginateHelper.js.map +1 -1
  59. package/dist/commonjs/parameters.d.ts +12 -2
  60. package/dist/commonjs/parameters.d.ts.map +1 -1
  61. package/dist/commonjs/parameters.js.map +1 -1
  62. package/dist/commonjs/responses.d.ts +22 -3
  63. package/dist/commonjs/responses.d.ts.map +1 -1
  64. package/dist/commonjs/responses.js.map +1 -1
  65. package/dist/esm/clientDefinitions.d.ts +11 -3
  66. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  67. package/dist/esm/clientDefinitions.js.map +1 -1
  68. package/dist/esm/confidentialLedger.d.ts +3 -3
  69. package/dist/esm/confidentialLedger.d.ts.map +1 -1
  70. package/dist/esm/confidentialLedger.js.map +1 -1
  71. package/dist/esm/generated/clientDefinitions.d.ts +131 -0
  72. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  73. package/dist/esm/generated/clientDefinitions.js +4 -0
  74. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  75. package/dist/esm/generated/confidentialLedger.d.ts +16 -0
  76. package/dist/esm/generated/confidentialLedger.d.ts.map +1 -0
  77. package/dist/esm/generated/confidentialLedger.js +45 -0
  78. package/dist/esm/generated/confidentialLedger.js.map +1 -0
  79. package/dist/esm/generated/index.d.ts +11 -0
  80. package/dist/esm/generated/index.d.ts.map +1 -0
  81. package/dist/esm/generated/index.js +13 -0
  82. package/dist/esm/generated/index.js.map +1 -0
  83. package/dist/esm/generated/isUnexpected.d.ts +29 -0
  84. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  85. package/dist/esm/generated/isUnexpected.js +97 -0
  86. package/dist/esm/generated/isUnexpected.js.map +1 -0
  87. package/dist/esm/generated/logger.d.ts +2 -0
  88. package/dist/esm/generated/logger.d.ts.map +1 -0
  89. package/dist/esm/generated/logger.js +5 -0
  90. package/dist/esm/generated/logger.js.map +1 -0
  91. package/dist/esm/generated/models.d.ts +62 -0
  92. package/dist/esm/generated/models.d.ts.map +1 -0
  93. package/dist/esm/generated/models.js +4 -0
  94. package/dist/esm/generated/models.js.map +1 -0
  95. package/dist/esm/generated/outputModels.d.ts +228 -0
  96. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  97. package/dist/esm/generated/outputModels.js +4 -0
  98. package/dist/esm/generated/outputModels.js.map +1 -0
  99. package/dist/esm/generated/paginateHelper.d.ts +84 -0
  100. package/dist/esm/generated/paginateHelper.d.ts.map +1 -0
  101. package/dist/esm/generated/paginateHelper.js +219 -0
  102. package/dist/esm/generated/paginateHelper.js.map +1 -0
  103. package/dist/esm/generated/parameters.d.ts +143 -0
  104. package/dist/esm/generated/parameters.d.ts.map +1 -0
  105. package/dist/esm/generated/parameters.js +4 -0
  106. package/dist/esm/generated/parameters.js.map +1 -0
  107. package/dist/esm/generated/responses.d.ts +273 -0
  108. package/dist/esm/generated/responses.d.ts.map +1 -0
  109. package/dist/esm/generated/responses.js +4 -0
  110. package/dist/esm/generated/responses.js.map +1 -0
  111. package/dist/esm/isUnexpected.d.ts +1 -1
  112. package/dist/esm/isUnexpected.d.ts.map +1 -1
  113. package/dist/esm/isUnexpected.js.map +1 -1
  114. package/dist/esm/models.d.ts +31 -0
  115. package/dist/esm/models.d.ts.map +1 -1
  116. package/dist/esm/models.js.map +1 -1
  117. package/dist/esm/outputModels.d.ts +31 -0
  118. package/dist/esm/outputModels.d.ts.map +1 -1
  119. package/dist/esm/outputModels.js.map +1 -1
  120. package/dist/esm/paginateHelper.d.ts +1 -1
  121. package/dist/esm/paginateHelper.d.ts.map +1 -1
  122. package/dist/esm/paginateHelper.js.map +1 -1
  123. package/dist/esm/parameters.d.ts +12 -2
  124. package/dist/esm/parameters.d.ts.map +1 -1
  125. package/dist/esm/parameters.js.map +1 -1
  126. package/dist/esm/responses.d.ts +22 -3
  127. package/dist/esm/responses.d.ts.map +1 -1
  128. package/dist/esm/responses.js.map +1 -1
  129. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAgMlC,oCA4FC;AAjOD,MAAM,WAAW,GAA6B;IAC5C,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,sBAAsB,EAAE,CAAC,KAAK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Licensed under the MIT License.\n\nimport type {\n GetConstitution200Response,\n GetConstitutionDefaultResponse,\n ListConsortiumMembers200Response,\n ListConsortiumMembersDefaultResponse,\n GetEnclaveQuotes200Response,\n GetEnclaveQuotesDefaultResponse,\n ListCollections200Response,\n ListCollectionsDefaultResponse,\n ListLedgerEntries200Response,\n ListLedgerEntriesDefaultResponse,\n CreateLedgerEntry200Response,\n CreateLedgerEntryDefaultResponse,\n GetLedgerEntry200Response,\n GetLedgerEntryDefaultResponse,\n GetReceipt200Response,\n GetReceiptDefaultResponse,\n GetTransactionStatus200Response,\n GetTransactionStatusDefaultResponse,\n GetCurrentLedgerEntry200Response,\n GetCurrentLedgerEntryDefaultResponse,\n ListUsers200Response,\n ListUsersDefaultResponse,\n ListLedgerUsers200Response,\n ListLedgerUsersDefaultResponse,\n DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse,\n DeleteLedgerUser204Response,\n DeleteLedgerUserDefaultResponse,\n GetLedgerUser200Response,\n GetLedgerUserDefaultResponse,\n CreateOrUpdateLedgerUser200Response,\n CreateOrUpdateLedgerUserDefaultResponse,\n GetUserDefinedEndpoint200Response,\n GetUserDefinedEndpointDefaultResponse,\n CreateUserDefinedEndpoint201Response,\n CreateUserDefinedEndpointDefaultResponse,\n GetRuntimeOptions200Response,\n GetRuntimeOptionsDefaultResponse,\n UpdateRuntimeOptions200Response,\n UpdateRuntimeOptionsDefaultResponse,\n GetUserDefinedEndpointsModule200Response,\n GetUserDefinedEndpointsModuleDefaultResponse,\n GetUserDefinedRole200Response,\n GetUserDefinedRoleDefaultResponse,\n CreateUserDefinedRole200Response,\n CreateUserDefinedRoleDefaultResponse,\n UpdateUserDefinedRole200Response,\n UpdateUserDefinedRoleDefaultResponse,\n DeleteUserDefinedRole200Response,\n DeleteUserDefinedRoleDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /app/governance/constitution\": [\"200\"],\n \"GET /app/governance/members\": [\"200\"],\n \"GET /app/enclaveQuotes\": [\"200\"],\n \"GET /app/collections\": [\"200\"],\n \"GET /app/transactions\": [\"200\"],\n \"POST /app/transactions\": [\"200\"],\n \"GET /app/transactions/{transactionId}\": [\"200\"],\n \"GET /app/transactions/{transactionId}/receipt\": [\"200\"],\n \"GET /app/transactions/{transactionId}/status\": [\"200\"],\n \"GET /app/transactions/current\": [\"200\"],\n \"GET /app/users\": [\"200\"],\n \"GET /app/ledgerUsers\": [\"200\"],\n \"DELETE /app/users/{userId}\": [\"204\"],\n \"GET /app/users/{userId}\": [\"200\"],\n \"PATCH /app/users/{userId}\": [\"200\"],\n \"DELETE /app/ledgerUsers/{userId}\": [\"204\"],\n \"GET /app/ledgerUsers/{userId}\": [\"200\"],\n \"PATCH /app/ledgerUsers/{userId}\": [\"200\"],\n \"GET /app/userDefinedEndpoints\": [\"200\"],\n \"PUT /app/userDefinedEndpoints\": [\"201\"],\n \"GET /app/userDefinedEndpoints/runTimeOptions\": [\"200\"],\n \"PATCH /app/userDefinedEndpoints/runTimeOptions\": [\"200\"],\n \"GET /app/userDefinedEndpoints/modules\": [\"200\"],\n \"GET /app/roles\": [\"200\"],\n \"PUT /app/roles\": [\"200\"],\n \"PATCH /app/roles\": [\"200\"],\n \"DELETE /app/roles\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetConstitution200Response | GetConstitutionDefaultResponse,\n): response is GetConstitutionDefaultResponse;\nexport function isUnexpected(\n response:\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse,\n): response is ListConsortiumMembersDefaultResponse;\nexport function isUnexpected(\n response: GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse,\n): response is GetEnclaveQuotesDefaultResponse;\nexport function isUnexpected(\n response: ListCollections200Response | ListCollectionsDefaultResponse,\n): response is ListCollectionsDefaultResponse;\nexport function isUnexpected(\n response: ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse,\n): response is ListLedgerEntriesDefaultResponse;\nexport function isUnexpected(\n response: CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse,\n): response is CreateLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetLedgerEntry200Response | GetLedgerEntryDefaultResponse,\n): response is GetLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetReceipt200Response | GetReceiptDefaultResponse,\n): response is GetReceiptDefaultResponse;\nexport function isUnexpected(\n response:\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse,\n): response is GetTransactionStatusDefaultResponse;\nexport function isUnexpected(\n response:\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse,\n): response is GetCurrentLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: ListUsers200Response | ListUsersDefaultResponse,\n): response is ListUsersDefaultResponse;\nexport function isUnexpected(\n response: ListLedgerUsers200Response | ListLedgerUsersDefaultResponse,\n): response is ListLedgerUsersDefaultResponse;\nexport function isUnexpected(\n response: DeleteUser204Response | DeleteUserDefaultResponse,\n): response is DeleteUserDefaultResponse;\nexport function isUnexpected(\n response: GetUser200Response | GetUserDefaultResponse,\n): response is GetUserDefaultResponse;\nexport function isUnexpected(\n response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse,\n): response is CreateOrUpdateUserDefaultResponse;\nexport function isUnexpected(\n response: DeleteLedgerUser204Response | DeleteLedgerUserDefaultResponse,\n): response is DeleteLedgerUserDefaultResponse;\nexport function isUnexpected(\n response: GetLedgerUser200Response | GetLedgerUserDefaultResponse,\n): response is GetLedgerUserDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateOrUpdateLedgerUser200Response\n | CreateOrUpdateLedgerUserDefaultResponse,\n): response is CreateOrUpdateLedgerUserDefaultResponse;\nexport function isUnexpected(\n response:\n | GetUserDefinedEndpoint200Response\n | GetUserDefinedEndpointDefaultResponse,\n): response is GetUserDefinedEndpointDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateUserDefinedEndpoint201Response\n | CreateUserDefinedEndpointDefaultResponse,\n): response is CreateUserDefinedEndpointDefaultResponse;\nexport function isUnexpected(\n response: GetRuntimeOptions200Response | GetRuntimeOptionsDefaultResponse,\n): response is GetRuntimeOptionsDefaultResponse;\nexport function isUnexpected(\n response:\n | UpdateRuntimeOptions200Response\n | UpdateRuntimeOptionsDefaultResponse,\n): response is UpdateRuntimeOptionsDefaultResponse;\nexport function isUnexpected(\n response:\n | GetUserDefinedEndpointsModule200Response\n | GetUserDefinedEndpointsModuleDefaultResponse,\n): response is GetUserDefinedEndpointsModuleDefaultResponse;\nexport function isUnexpected(\n response: GetUserDefinedRole200Response | GetUserDefinedRoleDefaultResponse,\n): response is GetUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateUserDefinedRole200Response\n | CreateUserDefinedRoleDefaultResponse,\n): response is CreateUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | UpdateUserDefinedRole200Response\n | UpdateUserDefinedRoleDefaultResponse,\n): response is UpdateUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | DeleteUserDefinedRole200Response\n | DeleteUserDefinedRoleDefaultResponse,\n): response is DeleteUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | GetConstitution200Response\n | GetConstitutionDefaultResponse\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotes200Response\n | GetEnclaveQuotesDefaultResponse\n | ListCollections200Response\n | ListCollectionsDefaultResponse\n | ListLedgerEntries200Response\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntry200Response\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntry200Response\n | GetLedgerEntryDefaultResponse\n | GetReceipt200Response\n | GetReceiptDefaultResponse\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse\n | ListUsers200Response\n | ListUsersDefaultResponse\n | ListLedgerUsers200Response\n | ListLedgerUsersDefaultResponse\n | DeleteUser204Response\n | DeleteUserDefaultResponse\n | GetUser200Response\n | GetUserDefaultResponse\n | CreateOrUpdateUser200Response\n | CreateOrUpdateUserDefaultResponse\n | DeleteLedgerUser204Response\n | DeleteLedgerUserDefaultResponse\n | GetLedgerUser200Response\n | GetLedgerUserDefaultResponse\n | CreateOrUpdateLedgerUser200Response\n | CreateOrUpdateLedgerUserDefaultResponse\n | GetUserDefinedEndpoint200Response\n | GetUserDefinedEndpointDefaultResponse\n | CreateUserDefinedEndpoint201Response\n | CreateUserDefinedEndpointDefaultResponse\n | GetRuntimeOptions200Response\n | GetRuntimeOptionsDefaultResponse\n | UpdateRuntimeOptions200Response\n | UpdateRuntimeOptionsDefaultResponse\n | GetUserDefinedEndpointsModule200Response\n | GetUserDefinedEndpointsModuleDefaultResponse\n | GetUserDefinedRole200Response\n | GetUserDefinedRoleDefaultResponse\n | CreateUserDefinedRole200Response\n | CreateUserDefinedRoleDefaultResponse\n | UpdateUserDefinedRole200Response\n | UpdateUserDefinedRoleDefaultResponse\n | DeleteUserDefinedRole200Response\n | DeleteUserDefinedRoleDefaultResponse,\n): response is\n | GetConstitutionDefaultResponse\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotesDefaultResponse\n | ListCollectionsDefaultResponse\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntryDefaultResponse\n | GetReceiptDefaultResponse\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntryDefaultResponse\n | ListUsersDefaultResponse\n | ListLedgerUsersDefaultResponse\n | DeleteUserDefaultResponse\n | GetUserDefaultResponse\n | CreateOrUpdateUserDefaultResponse\n | DeleteLedgerUserDefaultResponse\n | GetLedgerUserDefaultResponse\n | CreateOrUpdateLedgerUserDefaultResponse\n | GetUserDefinedEndpointDefaultResponse\n | CreateUserDefinedEndpointDefaultResponse\n | GetRuntimeOptionsDefaultResponse\n | UpdateRuntimeOptionsDefaultResponse\n | GetUserDefinedEndpointsModuleDefaultResponse\n | GetUserDefinedRoleDefaultResponse\n | CreateUserDefinedRoleDefaultResponse\n | UpdateUserDefinedRoleDefaultResponse\n | DeleteUserDefinedRoleDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA4C,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ exports.logger = (0, logger_1.createClientLogger)("confidential-ledger");
8
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"confidential-ledger\");\n"]}
@@ -0,0 +1,62 @@
1
+ /** An entry in the ledger. */
2
+ export interface LedgerEntry {
3
+ /** Contents of the ledger entry. */
4
+ contents: string;
5
+ }
6
+ /** Details about a Confidential Ledger user. */
7
+ export interface LedgerUser {
8
+ /** Represents an assignable role. */
9
+ assignedRole: "Administrator" | "Contributor" | "Reader";
10
+ }
11
+ /** Details about a Confidential Ledger user. */
12
+ export interface LedgerUserMultipleRoles {
13
+ /** Represents an assignable role. */
14
+ assignedRoles: Array<"Administrator" | "Contributor" | "Reader">;
15
+ }
16
+ /** bundle for the user defined endpoints */
17
+ export interface Bundle {
18
+ metadata: Metadata;
19
+ /** Any object */
20
+ modules: Record<string, unknown>;
21
+ }
22
+ export interface Metadata {
23
+ /** A map of path to method endpoints for the path */
24
+ endpoints: Record<string, MethodToEndpointProperties>;
25
+ }
26
+ export interface MethodToEndpointProperties {
27
+ get?: EndpointProperties;
28
+ put?: EndpointProperties;
29
+ patch?: EndpointProperties;
30
+ delete?: EndpointProperties;
31
+ }
32
+ export interface EndpointProperties {
33
+ authn_policies: Array<any>;
34
+ forwarding_required: "sometimes" | "always" | "never";
35
+ interpreter_reuse?: InterpreterReusePolicy;
36
+ js_function?: string;
37
+ js_module?: string;
38
+ mode?: "readwrite" | "readonly" | "historical";
39
+ /** Anything */
40
+ openapi?: any;
41
+ openapi_hidden?: boolean;
42
+ redirection_strategy?: "none" | "to_primary" | "to_backup";
43
+ }
44
+ export interface InterpreterReusePolicy {
45
+ key: string;
46
+ }
47
+ /** JS runtime options for user defined endpoints */
48
+ export interface JSRuntimeOptions {
49
+ log_exception_details?: boolean;
50
+ max_cached_interpreters?: number;
51
+ max_execution_time_ms?: number;
52
+ max_heap_bytes?: number;
53
+ max_stack_bytes?: number;
54
+ return_exception_details?: boolean;
55
+ }
56
+ /** Definition for roles */
57
+ export interface Role {
58
+ /** name of the user defined role */
59
+ roleName?: string;
60
+ roleActions?: Array<string>;
61
+ }
62
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAGA,8BAA8B;AAC9B,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,YAAY,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,CAAC;CAC1D;AAED,gDAAgD;AAChD,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AAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,2BAA2B;AAC3B,MAAM,WAAW,IAAI;IACnB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B"}
@@ -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=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** An entry in the ledger. */\nexport interface LedgerEntry {\n /** Contents of the ledger entry. */\n contents: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUser {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserMultipleRoles {\n /** Represents an assignable role. */\n assignedRoles: Array<\"Administrator\" | \"Contributor\" | \"Reader\">;\n}\n\n/** bundle for the user defined endpoints */\nexport interface Bundle {\n metadata: Metadata;\n /** Any object */\n modules: Record<string, unknown>;\n}\n\nexport interface Metadata {\n /** A map of path to method endpoints for the path */\n endpoints: Record<string, MethodToEndpointProperties>;\n}\n\nexport interface MethodToEndpointProperties {\n get?: EndpointProperties;\n put?: EndpointProperties;\n patch?: EndpointProperties;\n delete?: EndpointProperties;\n}\n\nexport interface EndpointProperties {\n authn_policies: Array<any>;\n forwarding_required: \"sometimes\" | \"always\" | \"never\";\n interpreter_reuse?: InterpreterReusePolicy;\n js_function?: string;\n js_module?: string;\n mode?: \"readwrite\" | \"readonly\" | \"historical\";\n /** Anything */\n openapi?: any;\n openapi_hidden?: boolean;\n redirection_strategy?: \"none\" | \"to_primary\" | \"to_backup\";\n}\n\nexport interface InterpreterReusePolicy {\n key: string;\n}\n\n/** JS runtime options for user defined endpoints */\nexport interface JSRuntimeOptions {\n log_exception_details?: boolean;\n max_cached_interpreters?: number;\n max_execution_time_ms?: number;\n max_heap_bytes?: number;\n max_stack_bytes?: number;\n return_exception_details?: boolean;\n}\n\n/** Definition for roles */\nexport interface Role {\n /** name of the user defined role */\n roleName?: string;\n roleActions?: Array<string>;\n}\n"]}
@@ -0,0 +1,228 @@
1
+ /** The governance script for the application. */
2
+ export interface ConstitutionOutput {
3
+ /** SHA256 digest of the constitution script. */
4
+ digest: string;
5
+ /** Contents of the constitution. */
6
+ script: string;
7
+ }
8
+ /** An error response from Confidential Ledger. */
9
+ export interface ConfidentialLedgerErrorOutput {
10
+ /** An error response from Confidential Ledger. */
11
+ readonly error?: ConfidentialLedgerErrorBodyOutput;
12
+ }
13
+ /** An error response from Confidential Ledger. */
14
+ export interface ConfidentialLedgerErrorBodyOutput {
15
+ /** The error code. */
16
+ readonly code?: string;
17
+ /** The error message. */
18
+ readonly message?: string;
19
+ }
20
+ /** List of members in the consortium. */
21
+ export interface ConsortiumOutput {
22
+ members: Array<ConsortiumMemberOutput>;
23
+ /** Path from which to retrieve the next page of results. */
24
+ nextLink?: string;
25
+ }
26
+ /** Describes a member of the consortium. */
27
+ export interface ConsortiumMemberOutput {
28
+ /** PEM-encoded certificate associated with the member. */
29
+ certificate: string;
30
+ /** Identifier assigned to the member. */
31
+ id: string;
32
+ }
33
+ /** Information about the enclaves running the Confidential Ledger. */
34
+ export interface ConfidentialLedgerEnclavesOutput {
35
+ /** Id of the Confidential Ledger node responding to the request. */
36
+ currentNodeId: string;
37
+ /** Dictionary of enclave quotes, indexed by node id. */
38
+ enclaveQuotes: Record<string, EnclaveQuoteOutput>;
39
+ }
40
+ /** Contains the enclave quote. */
41
+ export interface EnclaveQuoteOutput {
42
+ /** ID assigned to this node. */
43
+ nodeId: string;
44
+ /** MRENCLAVE value of the code running in the enclave. */
45
+ mrenclave?: string;
46
+ /** Version of the quote presented. */
47
+ quoteVersion: string;
48
+ /** Raw SGX quote, parsable by tools like Open Enclave's oeverify. */
49
+ raw: string;
50
+ }
51
+ /** Paginated collections returned in response to a query. */
52
+ export interface PagedCollectionsOutput {
53
+ collections: Array<CollectionOutput>;
54
+ /** Path from which to retrieve the next page of results. */
55
+ nextLink?: string;
56
+ }
57
+ /** Identifier for collections. */
58
+ export interface CollectionOutput {
59
+ collectionId: string;
60
+ }
61
+ /** Paginated ledger entries returned in response to a query. */
62
+ export interface PagedLedgerEntriesOutput {
63
+ /** State of a ledger query. */
64
+ state: "Loading" | "Ready";
65
+ /** Path from which to retrieve the next page of results. */
66
+ nextLink?: string;
67
+ /** Array of ledger entries. */
68
+ entries: Array<LedgerEntryOutput>;
69
+ }
70
+ /** An entry in the ledger. */
71
+ export interface LedgerEntryOutput {
72
+ /** Contents of the ledger entry. */
73
+ contents: string;
74
+ readonly collectionId?: string;
75
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
76
+ readonly transactionId?: string;
77
+ }
78
+ /** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */
79
+ export interface LedgerWriteResultOutput {
80
+ collectionId: string;
81
+ }
82
+ /** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */
83
+ export interface LedgerQueryResultOutput {
84
+ /** State of a ledger query. */
85
+ state: "Loading" | "Ready";
86
+ /** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */
87
+ entry?: LedgerEntryOutput;
88
+ }
89
+ /** A receipt certifying the transaction at the specified id. */
90
+ export interface TransactionReceiptOutput {
91
+ /** List of application claims. */
92
+ applicationClaims?: Array<ApplicationClaimOutput>;
93
+ receipt?: ReceiptContentsOutput;
94
+ /** State of a ledger query. */
95
+ state: "Loading" | "Ready";
96
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
97
+ transactionId: string;
98
+ }
99
+ /** A claim of a ledger application. */
100
+ export interface ApplicationClaimOutput {
101
+ /** An application claim in digested form. */
102
+ digest?: ClaimDigestOutput;
103
+ /** Represents the kind of an application claim. */
104
+ kind: "LedgerEntry" | "ClaimDigest";
105
+ /** An application claim derived from ledger entry data. */
106
+ ledgerEntry?: LedgerEntryClaimOutput;
107
+ }
108
+ /** An application claim in digested form. */
109
+ export interface ClaimDigestOutput {
110
+ /** The digest of the application claim, in hexadecimal form. */
111
+ value?: string;
112
+ /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */
113
+ protocol: "LedgerEntryV1";
114
+ }
115
+ /** An application claim derived from ledger entry data. */
116
+ export interface LedgerEntryClaimOutput {
117
+ /** Identifier of a collection. */
118
+ collectionId?: string;
119
+ /** Contents of a ledger entry. */
120
+ contents?: string;
121
+ /** Base64-encoded secret key. */
122
+ secretKey?: string;
123
+ /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */
124
+ protocol: "LedgerEntryV1";
125
+ }
126
+ export interface ReceiptContentsOutput {
127
+ cert?: string;
128
+ leaf?: string;
129
+ leafComponents?: ReceiptLeafComponentsOutput;
130
+ nodeId: string;
131
+ proof: Array<ReceiptElementOutput>;
132
+ root?: string;
133
+ serviceEndorsements?: Array<string>;
134
+ signature: string;
135
+ }
136
+ export interface ReceiptLeafComponentsOutput {
137
+ claimsDigest?: string;
138
+ commitEvidence?: string;
139
+ writeSetDigest?: string;
140
+ }
141
+ export interface ReceiptElementOutput {
142
+ left?: string;
143
+ right?: string;
144
+ }
145
+ /** Response returned to a query for the transaction status */
146
+ export interface TransactionStatusOutput {
147
+ /** Represents the state of the transaction. */
148
+ state: "Committed" | "Pending";
149
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
150
+ transactionId: string;
151
+ }
152
+ /** Paginated users returned in response to a query. */
153
+ export interface PagedUsersOutput {
154
+ ledgerUsers?: Array<LedgerUserOutput>;
155
+ /** Path from which to retrieve the next page of results. */
156
+ nextLink?: string;
157
+ }
158
+ /** Details about a Confidential Ledger user. */
159
+ export interface LedgerUserOutput {
160
+ /** Represents an assignable role. */
161
+ assignedRole: "Administrator" | "Contributor" | "Reader";
162
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
163
+ readonly userId?: string;
164
+ }
165
+ /** Paginated users returned in response to a query. */
166
+ export interface PagedLedgerUsersOutput {
167
+ ledgerUsers?: Array<LedgerUserMultipleRolesOutput>;
168
+ /** Path from which to retrieve the next page of results. */
169
+ nextLink?: string;
170
+ }
171
+ /** Details about a Confidential Ledger user. */
172
+ export interface LedgerUserMultipleRolesOutput {
173
+ /** Represents an assignable role. */
174
+ assignedRoles: Array<"Administrator" | "Contributor" | "Reader">;
175
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
176
+ readonly userId?: string;
177
+ }
178
+ /** bundle for the user defined endpoints */
179
+ export interface BundleOutput {
180
+ metadata: MetadataOutput;
181
+ /** Any object */
182
+ modules: Record<string, unknown>;
183
+ }
184
+ export interface MetadataOutput {
185
+ /** A map of path to method endpoints for the path */
186
+ endpoints: Record<string, MethodToEndpointPropertiesOutput>;
187
+ }
188
+ export interface MethodToEndpointPropertiesOutput {
189
+ get?: EndpointPropertiesOutput;
190
+ put?: EndpointPropertiesOutput;
191
+ patch?: EndpointPropertiesOutput;
192
+ delete?: EndpointPropertiesOutput;
193
+ }
194
+ export interface EndpointPropertiesOutput {
195
+ authn_policies: Array<any>;
196
+ forwarding_required: "sometimes" | "always" | "never";
197
+ interpreter_reuse?: InterpreterReusePolicyOutput;
198
+ js_function?: string;
199
+ js_module?: string;
200
+ mode?: "readwrite" | "readonly" | "historical";
201
+ /** Anything */
202
+ openapi?: any;
203
+ openapi_hidden?: boolean;
204
+ redirection_strategy?: "none" | "to_primary" | "to_backup";
205
+ }
206
+ export interface InterpreterReusePolicyOutput {
207
+ key: string;
208
+ }
209
+ /** JS runtime options for user defined endpoints */
210
+ export interface JSRuntimeOptionsOutput {
211
+ log_exception_details?: boolean;
212
+ max_cached_interpreters?: number;
213
+ max_execution_time_ms?: number;
214
+ max_heap_bytes?: number;
215
+ max_stack_bytes?: number;
216
+ return_exception_details?: boolean;
217
+ }
218
+ export interface ModuleDefOutput {
219
+ module: string;
220
+ name: string;
221
+ }
222
+ /** Definition for roles */
223
+ export interface RoleOutput {
224
+ /** name of the user defined role */
225
+ roleName?: string;
226
+ roleActions?: Array<string>;
227
+ }
228
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kDAAkD;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,iCAAiC,CAAC;CACpD;AAED,kDAAkD;AAClD,MAAM,WAAW,iCAAiC;IAChD,sBAAsB;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACvC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,sEAA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3B,MAAM,WAAW,UAAU;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B"}
@@ -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=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The governance script for the application. */\nexport interface ConstitutionOutput {\n /** SHA256 digest of the constitution script. */\n digest: string;\n /** Contents of the constitution. */\n script: string;\n}\n\n/** An error response from Confidential Ledger. */\nexport interface ConfidentialLedgerErrorOutput {\n /** An error response from Confidential Ledger. */\n readonly error?: ConfidentialLedgerErrorBodyOutput;\n}\n\n/** An error response from Confidential Ledger. */\nexport interface ConfidentialLedgerErrorBodyOutput {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n}\n\n/** List of members in the consortium. */\nexport interface ConsortiumOutput {\n members: Array<ConsortiumMemberOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Describes a member of the consortium. */\nexport interface ConsortiumMemberOutput {\n /** PEM-encoded certificate associated with the member. */\n certificate: string;\n /** Identifier assigned to the member. */\n id: string;\n}\n\n/** Information about the enclaves running the Confidential Ledger. */\nexport interface ConfidentialLedgerEnclavesOutput {\n /** Id of the Confidential Ledger node responding to the request. */\n currentNodeId: string;\n /** Dictionary of enclave quotes, indexed by node id. */\n enclaveQuotes: Record<string, EnclaveQuoteOutput>;\n}\n\n/** Contains the enclave quote. */\nexport interface EnclaveQuoteOutput {\n /** ID assigned to this node. */\n nodeId: string;\n /** MRENCLAVE value of the code running in the enclave. */\n mrenclave?: string;\n /** Version of the quote presented. */\n quoteVersion: string;\n /** Raw SGX quote, parsable by tools like Open Enclave's oeverify. */\n raw: string;\n}\n\n/** Paginated collections returned in response to a query. */\nexport interface PagedCollectionsOutput {\n collections: Array<CollectionOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Identifier for collections. */\nexport interface CollectionOutput {\n collectionId: string;\n}\n\n/** Paginated ledger entries returned in response to a query. */\nexport interface PagedLedgerEntriesOutput {\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n /** Array of ledger entries. */\n entries: Array<LedgerEntryOutput>;\n}\n\n/** An entry in the ledger. */\nexport interface LedgerEntryOutput {\n /** Contents of the ledger entry. */\n contents: string;\n readonly collectionId?: string;\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n readonly transactionId?: string;\n}\n\n/** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */\nexport interface LedgerWriteResultOutput {\n collectionId: string;\n}\n\n/** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */\nexport interface LedgerQueryResultOutput {\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */\n entry?: LedgerEntryOutput;\n}\n\n/** A receipt certifying the transaction at the specified id. */\nexport interface TransactionReceiptOutput {\n /** List of application claims. */\n applicationClaims?: Array<ApplicationClaimOutput>;\n receipt?: ReceiptContentsOutput;\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\n/** A claim of a ledger application. */\nexport interface ApplicationClaimOutput {\n /** An application claim in digested form. */\n digest?: ClaimDigestOutput;\n /** Represents the kind of an application claim. */\n kind: \"LedgerEntry\" | \"ClaimDigest\";\n /** An application claim derived from ledger entry data. */\n ledgerEntry?: LedgerEntryClaimOutput;\n}\n\n/** An application claim in digested form. */\nexport interface ClaimDigestOutput {\n /** The digest of the application claim, in hexadecimal form. */\n value?: string;\n /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */\n protocol: \"LedgerEntryV1\";\n}\n\n/** An application claim derived from ledger entry data. */\nexport interface LedgerEntryClaimOutput {\n /** Identifier of a collection. */\n collectionId?: string;\n /** Contents of a ledger entry. */\n contents?: string;\n /** Base64-encoded secret key. */\n secretKey?: string;\n /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */\n protocol: \"LedgerEntryV1\";\n}\n\nexport interface ReceiptContentsOutput {\n cert?: string;\n leaf?: string;\n leafComponents?: ReceiptLeafComponentsOutput;\n nodeId: string;\n proof: Array<ReceiptElementOutput>;\n root?: string;\n serviceEndorsements?: Array<string>;\n signature: string;\n}\n\nexport interface ReceiptLeafComponentsOutput {\n claimsDigest?: string;\n commitEvidence?: string;\n writeSetDigest?: string;\n}\n\nexport interface ReceiptElementOutput {\n left?: string;\n right?: string;\n}\n\n/** Response returned to a query for the transaction status */\nexport interface TransactionStatusOutput {\n /** Represents the state of the transaction. */\n state: \"Committed\" | \"Pending\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\n/** Paginated users returned in response to a query. */\nexport interface PagedUsersOutput {\n ledgerUsers?: Array<LedgerUserOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserOutput {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */\n readonly userId?: string;\n}\n\n/** Paginated users returned in response to a query. */\nexport interface PagedLedgerUsersOutput {\n ledgerUsers?: Array<LedgerUserMultipleRolesOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserMultipleRolesOutput {\n /** Represents an assignable role. */\n assignedRoles: Array<\"Administrator\" | \"Contributor\" | \"Reader\">;\n /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */\n readonly userId?: string;\n}\n\n/** bundle for the user defined endpoints */\nexport interface BundleOutput {\n metadata: MetadataOutput;\n /** Any object */\n modules: Record<string, unknown>;\n}\n\nexport interface MetadataOutput {\n /** A map of path to method endpoints for the path */\n endpoints: Record<string, MethodToEndpointPropertiesOutput>;\n}\n\nexport interface MethodToEndpointPropertiesOutput {\n get?: EndpointPropertiesOutput;\n put?: EndpointPropertiesOutput;\n patch?: EndpointPropertiesOutput;\n delete?: EndpointPropertiesOutput;\n}\n\nexport interface EndpointPropertiesOutput {\n authn_policies: Array<any>;\n forwarding_required: \"sometimes\" | \"always\" | \"never\";\n interpreter_reuse?: InterpreterReusePolicyOutput;\n js_function?: string;\n js_module?: string;\n mode?: \"readwrite\" | \"readonly\" | \"historical\";\n /** Anything */\n openapi?: any;\n openapi_hidden?: boolean;\n redirection_strategy?: \"none\" | \"to_primary\" | \"to_backup\";\n}\n\nexport interface InterpreterReusePolicyOutput {\n key: string;\n}\n\n/** JS runtime options for user defined endpoints */\nexport interface JSRuntimeOptionsOutput {\n log_exception_details?: boolean;\n max_cached_interpreters?: number;\n max_execution_time_ms?: number;\n max_heap_bytes?: number;\n max_stack_bytes?: number;\n return_exception_details?: boolean;\n}\n\nexport interface ModuleDefOutput {\n module: string;\n name: string;\n}\n\n/** Definition for roles */\nexport interface RoleOutput {\n /** name of the user defined role */\n roleName?: string;\n roleActions?: Array<string>;\n}\n"]}
@@ -0,0 +1,84 @@
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
+ /**
3
+ * An interface that tracks the settings for paged iteration
4
+ */
5
+ export interface PageSettings {
6
+ /**
7
+ * The token that keeps track of where to continue the iterator
8
+ */
9
+ continuationToken?: string;
10
+ }
11
+ /**
12
+ * An interface that allows async iterable iteration both to completion and by page.
13
+ */
14
+ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings = PageSettings> {
15
+ /**
16
+ * The next method, part of the iteration protocol
17
+ */
18
+ next(): Promise<IteratorResult<TElement>>;
19
+ /**
20
+ * The connection to the async iterator, part of the iteration protocol
21
+ */
22
+ [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
23
+ /**
24
+ * Return an AsyncIterableIterator that works a page at a time
25
+ */
26
+ byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;
27
+ }
28
+ /**
29
+ * Helper type to extract the type of an array
30
+ */
31
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
32
+ /**
33
+ * The type of a custom function that defines how to get a page and a link to the next one if any.
34
+ */
35
+ export type GetPage<TPage> = (pageLink: string) => Promise<{
36
+ page: TPage;
37
+ nextPageLink?: string;
38
+ }>;
39
+ /**
40
+ * Options for the paging helper
41
+ */
42
+ export interface PagingOptions<TResponse> {
43
+ /**
44
+ * Custom function to extract pagination details for crating the PagedAsyncIterableIterator
45
+ */
46
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
47
+ }
48
+ /**
49
+ * Helper type to infer the Type of the paged elements from the response type
50
+ * This type is generated based on the swagger information for x-ms-pageable
51
+ * specifically on the itemName property which indicates the property of the response
52
+ * where the page items are found. The default value is `value`.
53
+ * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
54
+ */
55
+ export type PaginateReturn<TResult> = TResult extends {
56
+ body: {
57
+ value?: infer TPage;
58
+ };
59
+ } | {
60
+ body: {
61
+ members?: infer TPage;
62
+ };
63
+ } | {
64
+ body: {
65
+ collections?: infer TPage;
66
+ };
67
+ } | {
68
+ body: {
69
+ entries?: infer TPage;
70
+ };
71
+ } | {
72
+ body: {
73
+ ledgerUsers?: infer TPage;
74
+ };
75
+ } ? GetArrayType<TPage> : Array<unknown>;
76
+ /**
77
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
78
+ * @param client - Client to use for sending the next page requests
79
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
80
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
81
+ * @returns - PagedAsyncIterableIterator to iterate the elements
82
+ */
83
+ export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
84
+ //# sourceMappingURL=paginateHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../../src/generated/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AA6F7E;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B,CACzC,QAAQ,EACR,KAAK,GAAG,QAAQ,EAAE,EAClB,aAAa,GAAG,YAAY;IAE5B;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1C;;OAEG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,0BAA0B,CAClD,QAAQ,EACR,KAAK,EACL,aAAa,CACd,CAAC;IACF;;OAEG;IACH,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,aAAa,KAAK,qBAAqB,CAAC,KAAK,CAAC,CAAC;CACpE;AA2BD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,I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