@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,oCAAoC,EACpC,2BAA2B,EAC3B,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAC5B,gCAAgC,EAChC,yBAAyB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C/C,+EAA+E;IAC/E,CAAC,IAAI,EAAE,kBAAkB,GAAG,eAAe,CAAC;IAC5C,sFAAsF;IACtF,CAAC,IAAI,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;IAC/C,kGAAkG;IAClG,CAAC,IAAI,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,GAAG,cAAc,CAAC;IACnF,0GAA0G;IAC1G,CAAC,IAAI,EAAE,2CAA2C,EAAE,aAAa,EAAE,MAAM,GAAG,UAAU,CAAC;IACvF,yGAAyG;IACzG,CAAC,IAAI,EAAE,0CAA0C,EAAE,aAAa,EAAE,MAAM,GAAG,oBAAoB,CAAC;IAChG,wFAAwF;IACxF,CAAC,IAAI,EAAE,2BAA2B,GAAG,qBAAqB,CAAC;IAC3D,yEAAyE;IACzE,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,mGAAmG;IACnG,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;CAC3D;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
3
+ // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetConstitutionParameters,\n ListConsortiumMembersParameters,\n GetEnclaveQuotesParameters,\n ListCollectionsParameters,\n ListLedgerEntriesParameters,\n CreateLedgerEntryParameters,\n GetLedgerEntryParameters,\n GetReceiptParameters,\n GetTransactionStatusParameters,\n GetCurrentLedgerEntryParameters,\n ListUsersParameters,\n DeleteUserParameters,\n GetUserParameters,\n CreateOrUpdateUserParameters,\n} from \"./parameters.js\";\nimport {\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 DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetConstitution {\n /** The constitution is a script that assesses and applies proposals from consortium members. */\n get(\n options?: GetConstitutionParameters,\n ): StreamableMethod<GetConstitution200Response | GetConstitutionDefaultResponse>;\n}\n\nexport interface ListConsortiumMembers {\n /** Consortium members can manage the Confidential Ledger. */\n get(\n options?: ListConsortiumMembersParameters,\n ): StreamableMethod<ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse>;\n}\n\nexport interface GetEnclaveQuotes {\n /** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */\n get(\n options?: GetEnclaveQuotesParameters,\n ): StreamableMethod<GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse>;\n}\n\nexport interface ListCollections {\n /** Collection ids are user-created collections of ledger entries */\n get(\n options?: ListCollectionsParameters,\n ): StreamableMethod<ListCollections200Response | ListCollectionsDefaultResponse>;\n}\n\nexport interface ListLedgerEntries {\n /** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */\n get(\n options?: ListLedgerEntriesParameters,\n ): StreamableMethod<ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse>;\n /** A collection id may optionally be specified. */\n post(\n options: CreateLedgerEntryParameters,\n ): StreamableMethod<CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse>;\n}\n\nexport interface GetLedgerEntry {\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. */\n get(\n options?: GetLedgerEntryParameters,\n ): StreamableMethod<GetLedgerEntry200Response | GetLedgerEntryDefaultResponse>;\n}\n\nexport interface GetReceipt {\n /** Gets a receipt certifying ledger contents at a particular transaction id. */\n get(\n options?: GetReceiptParameters,\n ): StreamableMethod<GetReceipt200Response | GetReceiptDefaultResponse>;\n}\n\nexport interface GetTransactionStatus {\n /** Gets the status of an entry identified by a transaction id. */\n get(\n options?: GetTransactionStatusParameters,\n ): StreamableMethod<GetTransactionStatus200Response | GetTransactionStatusDefaultResponse>;\n}\n\nexport interface GetCurrentLedgerEntry {\n /** A collection id may optionally be specified. */\n get(\n options?: GetCurrentLedgerEntryParameters,\n ): StreamableMethod<GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse>;\n}\n\nexport interface ListUsers {\n /** All users' object IDs and roles will be returned. */\n get(\n options?: ListUsersParameters,\n ): StreamableMethod<ListUsers200Response | ListUsersDefaultResponse>;\n}\n\nexport interface DeleteUser {\n /** Deletes a user from the Confidential Ledger. */\n delete(\n options?: DeleteUserParameters,\n ): StreamableMethod<DeleteUser204Response | DeleteUserDefaultResponse>;\n /** Gets a user. */\n get(options?: GetUserParameters): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;\n /** A JSON merge patch is applied for existing users */\n patch(\n options: CreateOrUpdateUserParameters,\n ): StreamableMethod<CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/app/governance/constitution' has methods for the following verbs: get */\n (path: \"/app/governance/constitution\"): GetConstitution;\n /** Resource for '/app/governance/members' has methods for the following verbs: get */\n (path: \"/app/governance/members\"): ListConsortiumMembers;\n /** Resource for '/app/enclaveQuotes' has methods for the following verbs: get */\n (path: \"/app/enclaveQuotes\"): GetEnclaveQuotes;\n /** Resource for '/app/collections' has methods for the following verbs: get */\n (path: \"/app/collections\"): ListCollections;\n /** Resource for '/app/transactions' has methods for the following verbs: get, post */\n (path: \"/app/transactions\"): ListLedgerEntries;\n /** Resource for '/app/transactions/\\{transactionId\\}' has methods for the following verbs: get */\n (path: \"/app/transactions/{transactionId}\", transactionId: string): GetLedgerEntry;\n /** Resource for '/app/transactions/\\{transactionId\\}/receipt' has methods for the following verbs: get */\n (path: \"/app/transactions/{transactionId}/receipt\", transactionId: string): GetReceipt;\n /** Resource for '/app/transactions/\\{transactionId\\}/status' has methods for the following verbs: get */\n (path: \"/app/transactions/{transactionId}/status\", transactionId: string): GetTransactionStatus;\n /** Resource for '/app/transactions/current' has methods for the following verbs: get */\n (path: \"/app/transactions/current\"): GetCurrentLedgerEntry;\n /** Resource for '/app/users' has methods for the following verbs: get */\n (path: \"/app/users\"): ListUsers;\n /** Resource for '/app/users/\\{userId\\}' has methods for the following verbs: delete, get, patch */\n (path: \"/app/users/{userId}\", userId: string): DeleteUser;\n}\n\nexport type ConfidentialLedgerClient = Client & {\n path: Routes;\n};\n"]}
@@ -1,6 +1,16 @@
1
- import type { TokenCredential } from "@azure/core-auth";
2
- import type { ClientOptions } from "@azure-rest/core-client";
3
- import type { ConfidentialLedgerClient } from "./generated/src/clientDefinitions.js";
4
- export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, options?: ClientOptions): ConfidentialLedgerClient;
5
- export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { TokenCredential } from "@azure/core-auth";
3
+ import { ConfidentialLedgerClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface ConfidentialLedgerClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `ConfidentialLedgerClient`
11
+ * @param endpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ export default function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: ConfidentialLedgerClientOptions): ConfidentialLedgerClient;
6
16
  //# sourceMappingURL=confidentialLedger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confidentialLedger.d.ts","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGrF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC;AAC5B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,WAAW,EAAE,eAAe,EAC5B,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC"}
1
+ {"version":3,"file":"confidentialLedger.d.ts","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,6CAA6C;AAC7C,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,eAAe,EAC5B,EAAE,UAAiC,EAAE,GAAG,OAAO,EAAE,GAAE,+BAAoC,GACtF,wBAAwB,CAuC1B"}
@@ -2,24 +2,45 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.default = ConfidentialLedger;
5
+ exports.default = createClient;
6
6
  const tslib_1 = require("tslib");
7
- const core_auth_1 = require("@azure/core-auth");
8
- const confidentialLedger_js_1 = tslib_1.__importDefault(require("./generated/src/confidentialLedger.js"));
9
- function ConfidentialLedger(ledgerEndpoint, ledgerIdentityCertificate, credentialsOrOptions, opts) {
10
- var _a;
11
- let credentials;
12
- let options;
13
- if ((0, core_auth_1.isTokenCredential)(credentialsOrOptions)) {
14
- credentials = credentialsOrOptions;
15
- options = opts !== null && opts !== void 0 ? opts : {};
16
- }
17
- else {
18
- options = credentialsOrOptions !== null && credentialsOrOptions !== void 0 ? credentialsOrOptions : {};
19
- }
20
- const tlsOptions = (_a = options === null || options === void 0 ? void 0 : options.tlsOptions) !== null && _a !== void 0 ? _a : {};
21
- tlsOptions.ca = ledgerIdentityCertificate;
22
- const confidentialLedger = (0, confidentialLedger_js_1.default)(ledgerEndpoint, credentials, Object.assign(Object.assign({}, options), { tlsOptions }));
23
- return confidentialLedger;
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ const logger_js_1 = require("./logger.js");
9
+ /**
10
+ * Initialize a new instance of `ConfidentialLedgerClient`
11
+ * @param endpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ function createClient(endpoint, credentials, _a = {}) {
16
+ var _b, _c, _d, _e, _f, _g;
17
+ var { apiVersion = "2024-01-26-preview" } = _a, options = tslib_1.__rest(_a, ["apiVersion"]);
18
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpoint}`;
19
+ const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.1.0-beta.1`;
20
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
21
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
22
+ : `${userAgentInfo}`;
23
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
24
+ userAgentPrefix,
25
+ }, loggingOptions: {
26
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger_js_1.logger.info,
27
+ }, credentials: {
28
+ scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://confidential-ledger.azure.com/.default"],
29
+ } });
30
+ const client = (0, core_client_1.getClient)(endpointUrl, credentials, options);
31
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
32
+ client.pipeline.addPolicy({
33
+ name: "ClientApiVersionPolicy",
34
+ sendRequest: (req, next) => {
35
+ // Use the apiVersion defined in request url directly
36
+ // Append one if there is no apiVersion and we have one at client options
37
+ const url = new URL(req.url);
38
+ if (!url.searchParams.get("api-version") && apiVersion) {
39
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
40
+ }
41
+ return next(req);
42
+ },
43
+ });
44
+ return client;
24
45
  }
25
46
  //# sourceMappingURL=confidentialLedger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,qCAuBC;;AAxCD,gDAAqD;AAIrD,0GAAgF;AAahF,SAAwB,kBAAkB,CACxC,cAAsB,EACtB,yBAAiC,EACjC,oBAAsD,EACtD,IAAoB;;IAEpB,IAAI,WAAwC,CAAC;IAC7C,IAAI,OAAsB,CAAC;IAE3B,IAAI,IAAA,6BAAiB,EAAC,oBAAoB,CAAC,EAAE,CAAC;QAC5C,WAAW,GAAG,oBAAoB,CAAC;QACnC,OAAO,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,GAAG,yBAAyB,CAAC;IAC1C,MAAM,kBAAkB,GAAG,IAAA,+BAA2B,EAAC,cAAc,EAAE,WAAY,kCAC9E,OAAO,KACV,UAAU,IACV,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { ConfidentialLedgerClient } from \"./generated/src/clientDefinitions.js\";\nimport GeneratedConfidentialLedger from \"./generated/src/confidentialLedger.js\";\n\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentials: TokenCredential,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentialsOrOptions?: TokenCredential | ClientOptions,\n opts?: ClientOptions,\n): ConfidentialLedgerClient {\n let credentials: TokenCredential | undefined;\n let options: ClientOptions;\n\n if (isTokenCredential(credentialsOrOptions)) {\n credentials = credentialsOrOptions;\n options = opts ?? {};\n } else {\n options = credentialsOrOptions ?? {};\n }\n\n const tlsOptions = options?.tlsOptions ?? {};\n tlsOptions.ca = ledgerIdentityCertificate;\n const confidentialLedger = GeneratedConfidentialLedger(ledgerEndpoint, credentials!, {\n ...options,\n tlsOptions,\n });\n return confidentialLedger;\n}\n"]}
1
+ {"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../src/confidentialLedger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmBlC,+BA2CC;;AA5DD,yDAAmE;AACnE,2CAAqC;AAUrC;;;;;GAKG;AACH,SAAwB,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,KAAqF,EAAE;;QAAvF,EAAE,UAAU,GAAG,oBAAoB,OAAoD,EAA/C,OAAO,sBAA/C,cAAiD,CAAF;IAE/C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACzE,MAAM,aAAa,GAAG,gDAAgD,CAAC;IACvE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,gDAAgD,CAAC;SAC1F,GACF,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAA6B,CAAC;IAExF,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { ConfidentialLedgerClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface ConfidentialLedgerClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `ConfidentialLedgerClient`\n * @param endpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential,\n { apiVersion = \"2024-01-26-preview\", ...options }: ConfidentialLedgerClientOptions = {},\n): ConfidentialLedgerClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`;\n const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.1.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://confidential-ledger.azure.com/.default\"],\n },\n };\n const client = getClient(endpointUrl, credentials, options) as ConfidentialLedgerClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import type { TokenCredential } from "@azure/core-auth";
2
+ import type { ClientOptions } from "@azure-rest/core-client";
3
+ import type { ConfidentialLedgerClient } from "./clientDefinitions.js";
4
+ export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, options?: ClientOptions): ConfidentialLedgerClient;
5
+ export default function ConfidentialLedger(ledgerEndpoint: string, ledgerIdentityCertificate: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
6
+ //# sourceMappingURL=confidentialLedgerCustomized.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialLedgerCustomized.d.ts","sourceRoot":"","sources":["../../src/confidentialLedgerCustomized.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGvE,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC;AAC5B,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,cAAc,EAAE,MAAM,EACtB,yBAAyB,EAAE,MAAM,EACjC,WAAW,EAAE,eAAe,EAC5B,OAAO,CAAC,EAAE,aAAa,GACtB,wBAAwB,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = ConfidentialLedger;
6
+ const tslib_1 = require("tslib");
7
+ const core_auth_1 = require("@azure/core-auth");
8
+ const confidentialLedger_js_1 = tslib_1.__importDefault(require("./confidentialLedger.js"));
9
+ function ConfidentialLedger(ledgerEndpoint, ledgerIdentityCertificate, credentialsOrOptions, opts) {
10
+ var _a;
11
+ let credentials;
12
+ let options;
13
+ if ((0, core_auth_1.isTokenCredential)(credentialsOrOptions)) {
14
+ credentials = credentialsOrOptions;
15
+ options = opts !== null && opts !== void 0 ? opts : {};
16
+ }
17
+ else {
18
+ options = credentialsOrOptions !== null && credentialsOrOptions !== void 0 ? credentialsOrOptions : {};
19
+ }
20
+ const tlsOptions = (_a = options === null || options === void 0 ? void 0 : options.tlsOptions) !== null && _a !== void 0 ? _a : {};
21
+ tlsOptions.ca = ledgerIdentityCertificate;
22
+ const confidentialLedger = (0, confidentialLedger_js_1.default)(ledgerEndpoint, credentials, Object.assign(Object.assign({}, options), { tlsOptions }));
23
+ return confidentialLedger;
24
+ }
25
+ //# sourceMappingURL=confidentialLedgerCustomized.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialLedgerCustomized.js","sourceRoot":"","sources":["../../src/confidentialLedgerCustomized.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,qCAuBC;;AAxCD,gDAAqD;AAIrD,4FAAkE;AAalE,SAAwB,kBAAkB,CACxC,cAAsB,EACtB,yBAAiC,EACjC,oBAAsD,EACtD,IAAoB;;IAEpB,IAAI,WAAwC,CAAC;IAC7C,IAAI,OAAsB,CAAC;IAE3B,IAAI,IAAA,6BAAiB,EAAC,oBAAoB,CAAC,EAAE,CAAC;QAC5C,WAAW,GAAG,oBAAoB,CAAC;QACnC,OAAO,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,UAAU,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,mCAAI,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,GAAG,yBAAyB,CAAC;IAC1C,MAAM,kBAAkB,GAAG,IAAA,+BAA2B,EAAC,cAAc,EAAE,WAAY,kCAC9E,OAAO,KACV,UAAU,IACV,CAAC;IACH,OAAO,kBAAkB,CAAC;AAC5B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { ConfidentialLedgerClient } from \"./clientDefinitions.js\";\nimport GeneratedConfidentialLedger from \"./confidentialLedger.js\";\n\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentials: TokenCredential,\n options?: ClientOptions,\n): ConfidentialLedgerClient;\nexport default function ConfidentialLedger(\n ledgerEndpoint: string,\n ledgerIdentityCertificate: string,\n credentialsOrOptions?: TokenCredential | ClientOptions,\n opts?: ClientOptions,\n): ConfidentialLedgerClient {\n let credentials: TokenCredential | undefined;\n let options: ClientOptions;\n\n if (isTokenCredential(credentialsOrOptions)) {\n credentials = credentialsOrOptions;\n options = opts ?? {};\n } else {\n options = credentialsOrOptions ?? {};\n }\n\n const tlsOptions = options?.tlsOptions ?? {};\n tlsOptions.ca = ledgerIdentityCertificate;\n const confidentialLedger = GeneratedConfidentialLedger(ledgerEndpoint, credentials!, {\n ...options,\n tlsOptions,\n });\n return confidentialLedger;\n}\n"]}
@@ -1,12 +1,12 @@
1
- import ConfidentialLedger from "./confidentialLedger.js";
2
- export * from "./generated/src/confidentialLedger.js";
3
- export * from "./generated/src/models.js";
4
- export * from "./generated/src/parameters.js";
5
- export * from "./generated/src/responses.js";
6
- export * from "./generated/src/clientDefinitions.js";
7
- export * from "./generated/src/isUnexpected.js";
8
- export * from "./generated/src/outputModels.js";
9
- export * from "./generated/src/paginateHelper.js";
1
+ import ConfidentialLedger from "./confidentialLedgerCustomized.js";
2
+ export * from "./confidentialLedger.js";
3
+ export * from "./models.js";
4
+ export * from "./parameters.js";
5
+ export * from "./responses.js";
6
+ export * from "./clientDefinitions.js";
7
+ export * from "./isUnexpected.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./paginateHelper.js";
10
10
  export { LedgerIdentity, getLedgerIdentity } from "./getLedgerIdentity.js";
11
11
  export default ConfidentialLedger;
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,mCAAmC,CAAC;AACnE,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,eAAe,kBAAkB,CAAC"}
@@ -4,16 +4,16 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.getLedgerIdentity = void 0;
6
6
  const tslib_1 = require("tslib");
7
- const confidentialLedger_js_1 = tslib_1.__importDefault(require("./confidentialLedger.js"));
8
- tslib_1.__exportStar(require("./generated/src/confidentialLedger.js"), exports);
9
- tslib_1.__exportStar(require("./generated/src/models.js"), exports);
10
- tslib_1.__exportStar(require("./generated/src/parameters.js"), exports);
11
- tslib_1.__exportStar(require("./generated/src/responses.js"), exports);
12
- tslib_1.__exportStar(require("./generated/src/clientDefinitions.js"), exports);
13
- tslib_1.__exportStar(require("./generated/src/isUnexpected.js"), exports);
14
- tslib_1.__exportStar(require("./generated/src/outputModels.js"), exports);
15
- tslib_1.__exportStar(require("./generated/src/paginateHelper.js"), exports);
7
+ const confidentialLedgerCustomized_js_1 = tslib_1.__importDefault(require("./confidentialLedgerCustomized.js"));
8
+ tslib_1.__exportStar(require("./confidentialLedger.js"), exports);
9
+ tslib_1.__exportStar(require("./models.js"), exports);
10
+ tslib_1.__exportStar(require("./parameters.js"), exports);
11
+ tslib_1.__exportStar(require("./responses.js"), exports);
12
+ tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
13
+ tslib_1.__exportStar(require("./isUnexpected.js"), exports);
14
+ tslib_1.__exportStar(require("./outputModels.js"), exports);
15
+ tslib_1.__exportStar(require("./paginateHelper.js"), exports);
16
16
  var getLedgerIdentity_js_1 = require("./getLedgerIdentity.js");
17
17
  Object.defineProperty(exports, "getLedgerIdentity", { enumerable: true, get: function () { return getLedgerIdentity_js_1.getLedgerIdentity; } });
18
- exports.default = confidentialLedger_js_1.default;
18
+ exports.default = confidentialLedgerCustomized_js_1.default;
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,4FAAyD;AACzD,gFAAsD;AACtD,oEAA0C;AAC1C,wEAA8C;AAC9C,uEAA6C;AAC7C,+EAAqD;AACrD,0EAAgD;AAChD,0EAAgD;AAChD,4EAAkD;AAClD,+DAA2E;AAAlD,yHAAA,iBAAiB,OAAA;AAC1C,kBAAe,+BAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport ConfidentialLedger from \"./confidentialLedger.js\";\nexport * from \"./generated/src/confidentialLedger.js\";\nexport * from \"./generated/src/models.js\";\nexport * from \"./generated/src/parameters.js\";\nexport * from \"./generated/src/responses.js\";\nexport * from \"./generated/src/clientDefinitions.js\";\nexport * from \"./generated/src/isUnexpected.js\";\nexport * from \"./generated/src/outputModels.js\";\nexport * from \"./generated/src/paginateHelper.js\";\nexport { LedgerIdentity, getLedgerIdentity } from \"./getLedgerIdentity.js\";\nexport default ConfidentialLedger;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,gHAAmE;AACnE,kEAAwC;AACxC,sDAA4B;AAC5B,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,4DAAkC;AAClC,8DAAoC;AACpC,+DAA2E;AAAlD,yHAAA,iBAAiB,OAAA;AAC1C,kBAAe,yCAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport ConfidentialLedger from \"./confidentialLedgerCustomized.js\";\nexport * from \"./confidentialLedger.js\";\nexport * from \"./models.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\nexport { LedgerIdentity, getLedgerIdentity } from \"./getLedgerIdentity.js\";\nexport default ConfidentialLedger;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,gCAAgC,EAChC,oCAAoC,EACpC,2BAA2B,EAC3B,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAC5B,gCAAgC,EAChC,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,mCAAmC,EACnC,gC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BAAwB,CAAC;AACxC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,qBAAqB,GAAG,yBAAyB,GAC1D,QAAQ,IAAI,yBAAyB,CAAC;AACzC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,kBAAkB,GAAG,sBAAsB,GACpD,QAAQ,IAAI,sBAAsB,CAAC;AACtC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
3
+ // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.isUnexpected = isUnexpected;
6
6
  const responseMap = {
@@ -17,7 +17,7 @@ const responseMap = {
17
17
  "GET /app/users": ["200"],
18
18
  "DELETE /app/users/{userId}": ["204"],
19
19
  "GET /app/users/{userId}": ["200"],
20
- "PATCH /app/users/{userId}": ["200"]
20
+ "PATCH /app/users/{userId}": ["200"],
21
21
  };
22
22
  function isUnexpected(response) {
23
23
  const lroOriginal = response.headers["x-ms-original-url"];
@@ -49,8 +49,7 @@ function getParametrizedPathSuccess(method, path) {
49
49
  // track if we have found a match to return the values found.
50
50
  let found = true;
51
51
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
52
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
53
- ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
52
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
54
53
  const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
55
54
  // If the current part of the candidate is a "template" part
56
55
  // Try to use the suffix of p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GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\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 DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse,\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 \"DELETE /app/users/{userId}\": [\"204\"],\n \"GET /app/users/{userId}\": [\"200\"],\n \"PATCH /app/users/{userId}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetConstitution200Response | GetConstitutionDefaultResponse,\n): response is GetConstitutionDefaultResponse;\nexport function isUnexpected(\n response: ListConsortiumMembers200Response | 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: GetTransactionStatus200Response | GetTransactionStatusDefaultResponse,\n): response is GetTransactionStatusDefaultResponse;\nexport function isUnexpected(\n response: GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse,\n): response is GetCurrentLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: ListUsers200Response | ListUsersDefaultResponse,\n): response is ListUsersDefaultResponse;\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:\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 | DeleteUser204Response\n | DeleteUserDefaultResponse\n | GetUser200Response\n | GetUserDefaultResponse\n | CreateOrUpdateUser200Response\n | CreateOrUpdateUserDefaultResponse,\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 | DeleteUserDefaultResponse\n | GetUserDefaultResponse\n | CreateOrUpdateUserDefaultResponse {\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 (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\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(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\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 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA4C,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
3
+ // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.logger = void 0;
6
6
  const logger_1 = require("@azure/logger");
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/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 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/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"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
3
+ // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/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"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/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,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,CAAC,oBAAoB,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,8DAA8D;AAC9D,MAAM,WAAW,uBAAuB;IACtC,+CAA+C;IAC/C,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,mJAAmJ;IACnJ,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACtC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gDAAgD;AAChD,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,YAAY,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,CAAC;IACzD,kGAAkG;IAClG,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
3
+ // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  //# sourceMappingURL=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/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"]}
@@ -1,5 +1,30 @@
1
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
1
  import { 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
+ }
3
28
  /**
4
29
  * Helper type to extract the type of an array
5
30
  */
@@ -7,7 +32,7 @@ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
7
32
  /**
8
33
  * The type of a custom function that defines how to get a page and a link to the next one if any.
9
34
  */
10
- export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
35
+ export type GetPage<TPage> = (pageLink: string) => Promise<{
11
36
  page: TPage;
12
37
  nextPageLink?: string;
13
38
  }>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAmB,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAsFzF;;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,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACrF;;OAEG;IACH,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,aAAa,KAAK,qBAAqB,CAAC,KAAK,CAAC,CAAC;CACpE;AAyBD;;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,IAAI,EAAE,KAAK,CA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