@azure-rest/confidential-ledger 1.0.1-alpha.20241125.1 → 1.0.1-alpha.20241127.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 (121) hide show
  1. package/dist/commonjs/confidentialLedger.d.ts +6 -0
  2. package/dist/commonjs/confidentialLedger.d.ts.map +1 -0
  3. package/dist/commonjs/confidentialLedger.js +25 -0
  4. package/dist/commonjs/confidentialLedger.js.map +1 -0
  5. package/dist/commonjs/generated/src/clientDefinitions.d.ts +75 -0
  6. package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -0
  7. package/dist/commonjs/generated/src/clientDefinitions.js +5 -0
  8. package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -0
  9. package/dist/commonjs/generated/src/confidentialLedger.d.ts +11 -0
  10. package/dist/commonjs/generated/src/confidentialLedger.d.ts.map +1 -0
  11. package/dist/commonjs/generated/src/confidentialLedger.js +35 -0
  12. package/dist/commonjs/generated/src/confidentialLedger.js.map +1 -0
  13. package/dist/commonjs/generated/src/index.d.ts +11 -0
  14. package/dist/commonjs/generated/src/index.d.ts.map +1 -0
  15. package/dist/commonjs/generated/src/index.js +16 -0
  16. package/dist/commonjs/generated/src/index.js.map +1 -0
  17. package/dist/commonjs/generated/src/isUnexpected.d.ts +15 -0
  18. package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -0
  19. package/dist/commonjs/generated/src/isUnexpected.js +86 -0
  20. package/dist/commonjs/generated/src/isUnexpected.js.map +1 -0
  21. package/dist/commonjs/generated/src/logger.d.ts +2 -0
  22. package/dist/commonjs/generated/src/logger.d.ts.map +1 -0
  23. package/dist/commonjs/generated/src/logger.js +8 -0
  24. package/dist/commonjs/generated/src/logger.js.map +1 -0
  25. package/dist/commonjs/generated/src/models.d.ts +11 -0
  26. package/dist/commonjs/generated/src/models.d.ts.map +1 -0
  27. package/dist/commonjs/generated/src/models.js +5 -0
  28. package/dist/commonjs/generated/src/models.js.map +1 -0
  29. package/dist/commonjs/generated/src/outputModels.d.ts +130 -0
  30. package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -0
  31. package/dist/commonjs/generated/src/outputModels.js +5 -0
  32. package/dist/commonjs/generated/src/outputModels.js.map +1 -0
  33. package/dist/commonjs/generated/src/paginateHelper.d.ts +55 -0
  34. package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -0
  35. package/dist/commonjs/generated/src/paginateHelper.js +119 -0
  36. package/dist/commonjs/generated/src/paginateHelper.js.map +1 -0
  37. package/dist/commonjs/generated/src/parameters.d.ts +66 -0
  38. package/dist/commonjs/generated/src/parameters.d.ts.map +1 -0
  39. package/dist/commonjs/generated/src/parameters.js +5 -0
  40. package/dist/commonjs/generated/src/parameters.js.map +1 -0
  41. package/dist/commonjs/generated/src/responses.d.ts +138 -0
  42. package/dist/commonjs/generated/src/responses.d.ts.map +1 -0
  43. package/dist/commonjs/generated/src/responses.js +5 -0
  44. package/dist/commonjs/generated/src/responses.js.map +1 -0
  45. package/dist/commonjs/getLedgerIdentity.d.ts +6 -0
  46. package/dist/commonjs/getLedgerIdentity.d.ts.map +1 -0
  47. package/dist/commonjs/getLedgerIdentity.js +22 -0
  48. package/dist/commonjs/getLedgerIdentity.js.map +1 -0
  49. package/dist/commonjs/index.d.ts +12 -0
  50. package/dist/commonjs/index.d.ts.map +1 -0
  51. package/dist/commonjs/index.js +19 -0
  52. package/dist/commonjs/index.js.map +1 -0
  53. package/dist/commonjs/package.json +3 -0
  54. package/dist/commonjs/tsdoc-metadata.json +11 -0
  55. package/dist/esm/confidentialLedger.d.ts +6 -0
  56. package/dist/esm/confidentialLedger.d.ts.map +1 -0
  57. package/{dist-esm/src → dist/esm}/confidentialLedger.js +1 -1
  58. package/dist/esm/confidentialLedger.js.map +1 -0
  59. package/dist/esm/generated/src/clientDefinitions.d.ts +75 -0
  60. package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -0
  61. package/dist/esm/generated/src/clientDefinitions.js.map +1 -0
  62. package/dist/esm/generated/src/confidentialLedger.d.ts +11 -0
  63. package/dist/esm/generated/src/confidentialLedger.d.ts.map +1 -0
  64. package/{dist-esm/src → dist/esm}/generated/src/confidentialLedger.js +1 -1
  65. package/dist/esm/generated/src/confidentialLedger.js.map +1 -0
  66. package/dist/esm/generated/src/index.d.ts +11 -0
  67. package/dist/esm/generated/src/index.d.ts.map +1 -0
  68. package/dist/esm/generated/src/index.js +13 -0
  69. package/dist/esm/generated/src/index.js.map +1 -0
  70. package/dist/esm/generated/src/isUnexpected.d.ts +15 -0
  71. package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -0
  72. package/dist/esm/generated/src/isUnexpected.js.map +1 -0
  73. package/dist/esm/generated/src/logger.d.ts +2 -0
  74. package/dist/esm/generated/src/logger.d.ts.map +1 -0
  75. package/dist/esm/generated/src/models.d.ts +11 -0
  76. package/dist/esm/generated/src/models.d.ts.map +1 -0
  77. package/dist/esm/generated/src/outputModels.d.ts +130 -0
  78. package/dist/esm/generated/src/outputModels.d.ts.map +1 -0
  79. package/dist/esm/generated/src/paginateHelper.d.ts +55 -0
  80. package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -0
  81. package/dist/esm/generated/src/parameters.d.ts +66 -0
  82. package/dist/esm/generated/src/parameters.d.ts.map +1 -0
  83. package/dist/esm/generated/src/parameters.js.map +1 -0
  84. package/dist/esm/generated/src/responses.d.ts +138 -0
  85. package/dist/esm/generated/src/responses.d.ts.map +1 -0
  86. package/dist/esm/generated/src/responses.js.map +1 -0
  87. package/dist/esm/getLedgerIdentity.d.ts +6 -0
  88. package/dist/esm/getLedgerIdentity.d.ts.map +1 -0
  89. package/dist/esm/index.d.ts +12 -0
  90. package/dist/esm/index.d.ts.map +1 -0
  91. package/dist/esm/index.js +14 -0
  92. package/dist/esm/index.js.map +1 -0
  93. package/dist/esm/package.json +3 -0
  94. package/package.json +48 -30
  95. package/dist/index.js +0 -285
  96. package/dist/index.js.map +0 -1
  97. package/dist-esm/src/confidentialLedger.js.map +0 -1
  98. package/dist-esm/src/generated/src/clientDefinitions.js.map +0 -1
  99. package/dist-esm/src/generated/src/confidentialLedger.js.map +0 -1
  100. package/dist-esm/src/generated/src/index.js +0 -13
  101. package/dist-esm/src/generated/src/index.js.map +0 -1
  102. package/dist-esm/src/generated/src/isUnexpected.js.map +0 -1
  103. package/dist-esm/src/generated/src/parameters.js.map +0 -1
  104. package/dist-esm/src/generated/src/responses.js.map +0 -1
  105. package/dist-esm/src/index.js +0 -14
  106. package/dist-esm/src/index.js.map +0 -1
  107. package/types/confidential-ledger.d.ts +0 -599
  108. /package/{dist-esm/src → dist/esm}/generated/src/clientDefinitions.js +0 -0
  109. /package/{dist-esm/src → dist/esm}/generated/src/isUnexpected.js +0 -0
  110. /package/{dist-esm/src → dist/esm}/generated/src/logger.js +0 -0
  111. /package/{dist-esm/src → dist/esm}/generated/src/logger.js.map +0 -0
  112. /package/{dist-esm/src → dist/esm}/generated/src/models.js +0 -0
  113. /package/{dist-esm/src → dist/esm}/generated/src/models.js.map +0 -0
  114. /package/{dist-esm/src → dist/esm}/generated/src/outputModels.js +0 -0
  115. /package/{dist-esm/src → dist/esm}/generated/src/outputModels.js.map +0 -0
  116. /package/{dist-esm/src → dist/esm}/generated/src/paginateHelper.js +0 -0
  117. /package/{dist-esm/src → dist/esm}/generated/src/paginateHelper.js.map +0 -0
  118. /package/{dist-esm/src → dist/esm}/generated/src/parameters.js +0 -0
  119. /package/{dist-esm/src → dist/esm}/generated/src/responses.js +0 -0
  120. /package/{dist-esm/src → dist/esm}/getLedgerIdentity.js +0 -0
  121. /package/{dist-esm/src → dist/esm}/getLedgerIdentity.js.map +0 -0
@@ -0,0 +1,75 @@
1
+ import { GetConstitutionParameters, ListConsortiumMembersParameters, GetEnclaveQuotesParameters, ListCollectionsParameters, ListLedgerEntriesParameters, CreateLedgerEntryParameters, GetLedgerEntryParameters, GetReceiptParameters, GetTransactionStatusParameters, GetCurrentLedgerEntryParameters, DeleteUserParameters, GetUserParameters, CreateOrUpdateUserParameters } from "./parameters.js";
2
+ import { GetConstitution200Response, GetConstitutionDefaultResponse, ListConsortiumMembers200Response, ListConsortiumMembersDefaultResponse, GetEnclaveQuotes200Response, GetEnclaveQuotesDefaultResponse, ListCollections200Response, ListCollectionsDefaultResponse, ListLedgerEntries200Response, ListLedgerEntriesDefaultResponse, CreateLedgerEntry200Response, CreateLedgerEntryDefaultResponse, GetLedgerEntry200Response, GetLedgerEntryDefaultResponse, GetReceipt200Response, GetReceiptDefaultResponse, GetTransactionStatus200Response, GetTransactionStatusDefaultResponse, GetCurrentLedgerEntry200Response, GetCurrentLedgerEntryDefaultResponse, DeleteUser204Response, DeleteUserDefaultResponse, GetUser200Response, GetUserDefaultResponse, CreateOrUpdateUser200Response, CreateOrUpdateUserDefaultResponse } from "./responses.js";
3
+ import { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface GetConstitution {
5
+ /** The constitution is a script that assesses and applies proposals from consortium members. */
6
+ get(options?: GetConstitutionParameters): StreamableMethod<GetConstitution200Response | GetConstitutionDefaultResponse>;
7
+ }
8
+ export interface ListConsortiumMembers {
9
+ /** Consortium members can manage the Confidential Ledger. */
10
+ get(options?: ListConsortiumMembersParameters): StreamableMethod<ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse>;
11
+ }
12
+ export interface GetEnclaveQuotes {
13
+ /** A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave. */
14
+ get(options?: GetEnclaveQuotesParameters): StreamableMethod<GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse>;
15
+ }
16
+ export interface ListCollections {
17
+ /** Collection ids are user-created collections of ledger entries */
18
+ get(options?: ListCollectionsParameters): StreamableMethod<ListCollections200Response | ListCollectionsDefaultResponse>;
19
+ }
20
+ export interface ListLedgerEntries {
21
+ /** A collection id may optionally be specified. Only entries in the specified (or default) collection will be returned. */
22
+ get(options?: ListLedgerEntriesParameters): StreamableMethod<ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse>;
23
+ /** A collection id may optionally be specified. */
24
+ post(options: CreateLedgerEntryParameters): StreamableMethod<CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse>;
25
+ }
26
+ export interface GetLedgerEntry {
27
+ /** 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. */
28
+ get(options?: GetLedgerEntryParameters): StreamableMethod<GetLedgerEntry200Response | GetLedgerEntryDefaultResponse>;
29
+ }
30
+ export interface GetReceipt {
31
+ /** Gets a receipt certifying ledger contents at a particular transaction id. */
32
+ get(options?: GetReceiptParameters): StreamableMethod<GetReceipt200Response | GetReceiptDefaultResponse>;
33
+ }
34
+ export interface GetTransactionStatus {
35
+ /** Gets the status of an entry identified by a transaction id. */
36
+ get(options?: GetTransactionStatusParameters): StreamableMethod<GetTransactionStatus200Response | GetTransactionStatusDefaultResponse>;
37
+ }
38
+ export interface GetCurrentLedgerEntry {
39
+ /** A collection id may optionally be specified. */
40
+ get(options?: GetCurrentLedgerEntryParameters): StreamableMethod<GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse>;
41
+ }
42
+ export interface DeleteUser {
43
+ /** Deletes a user from the Confidential Ledger. */
44
+ delete(options?: DeleteUserParameters): StreamableMethod<DeleteUser204Response | DeleteUserDefaultResponse>;
45
+ /** Gets a user. */
46
+ get(options?: GetUserParameters): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;
47
+ /** A JSON merge patch is applied for existing users */
48
+ patch(options: CreateOrUpdateUserParameters): StreamableMethod<CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse>;
49
+ }
50
+ export interface Routes {
51
+ /** Resource for '/app/governance/constitution' has methods for the following verbs: get */
52
+ (path: "/app/governance/constitution"): GetConstitution;
53
+ /** Resource for '/app/governance/members' has methods for the following verbs: get */
54
+ (path: "/app/governance/members"): ListConsortiumMembers;
55
+ /** Resource for '/app/enclaveQuotes' has methods for the following verbs: get */
56
+ (path: "/app/enclaveQuotes"): GetEnclaveQuotes;
57
+ /** Resource for '/app/collections' has methods for the following verbs: get */
58
+ (path: "/app/collections"): ListCollections;
59
+ /** Resource for '/app/transactions' has methods for the following verbs: get, post */
60
+ (path: "/app/transactions"): ListLedgerEntries;
61
+ /** Resource for '/app/transactions/\{transactionId\}' has methods for the following verbs: get */
62
+ (path: "/app/transactions/{transactionId}", transactionId: string): GetLedgerEntry;
63
+ /** Resource for '/app/transactions/\{transactionId\}/receipt' has methods for the following verbs: get */
64
+ (path: "/app/transactions/{transactionId}/receipt", transactionId: string): GetReceipt;
65
+ /** Resource for '/app/transactions/\{transactionId\}/status' has methods for the following verbs: get */
66
+ (path: "/app/transactions/{transactionId}/status", transactionId: string): GetTransactionStatus;
67
+ /** Resource for '/app/transactions/current' has methods for the following verbs: get */
68
+ (path: "/app/transactions/current"): GetCurrentLedgerEntry;
69
+ /** Resource for '/app/users/\{userId\}' has methods for the following verbs: delete, get, patch */
70
+ (path: "/app/users/{userId}", userId: string): DeleteUser;
71
+ }
72
+ export type ConfidentialLedgerClient = Client & {
73
+ path: Routes;
74
+ };
75
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/generated/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,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,4BAA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BAAiB,CAAC;IAC/C,kGAAkG;IAClG,CACE,IAAI,EAAE,mCAAmC,EACzC,aAAa,EAAE,MAAM,GACpB,cAAc,CAAC;IAClB,0GAA0G;IAC1G,CACE,IAAI,EAAE,2CAA2C,EACjD,aAAa,EAAE,MAAM,GACpB,UAAU,CAAC;IACd,yGAAyG;IACzG,CACE,IAAI,EAAE,0CAA0C,EAChD,aAAa,EAAE,MAAM,GACpB,oBAAoB,CAAC;IACxB,wFAAwF;IACxF,CAAC,IAAI,EAAE,2BAA2B,GAAG,qBAAqB,CAAC;IAC3D,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"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../../src/generated/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 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 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<\n GetConstitution200Response | GetConstitutionDefaultResponse\n >;\n}\n\nexport interface ListConsortiumMembers {\n /** Consortium members can manage the Confidential Ledger. */\n get(\n options?: ListConsortiumMembersParameters\n ): StreamableMethod<\n ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse\n >;\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<\n GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse\n >;\n}\n\nexport interface ListCollections {\n /** Collection ids are user-created collections of ledger entries */\n get(\n options?: ListCollectionsParameters\n ): StreamableMethod<\n ListCollections200Response | ListCollectionsDefaultResponse\n >;\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<\n ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse\n >;\n /** A collection id may optionally be specified. */\n post(\n options: CreateLedgerEntryParameters\n ): StreamableMethod<\n CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse\n >;\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<\n GetLedgerEntry200Response | GetLedgerEntryDefaultResponse\n >;\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<\n GetTransactionStatus200Response | GetTransactionStatusDefaultResponse\n >;\n}\n\nexport interface GetCurrentLedgerEntry {\n /** A collection id may optionally be specified. */\n get(\n options?: GetCurrentLedgerEntryParameters\n ): StreamableMethod<\n GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse\n >;\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(\n options?: GetUserParameters\n ): StreamableMethod<GetUser200Response | GetUserDefaultResponse>;\n /** A JSON merge patch is applied for existing users */\n patch(\n options: CreateOrUpdateUserParameters\n ): StreamableMethod<\n CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse\n >;\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 (\n path: \"/app/transactions/{transactionId}\",\n transactionId: string\n ): GetLedgerEntry;\n /** Resource for '/app/transactions/\\{transactionId\\}/receipt' has methods for the following verbs: get */\n (\n path: \"/app/transactions/{transactionId}/receipt\",\n transactionId: string\n ): GetReceipt;\n /** Resource for '/app/transactions/\\{transactionId\\}/status' has methods for the following verbs: get */\n (\n path: \"/app/transactions/{transactionId}/status\",\n transactionId: string\n ): 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/\\{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"]}
@@ -0,0 +1,11 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { TokenCredential } from "@azure/core-auth";
3
+ import { ConfidentialLedgerClient } from "./clientDefinitions.js";
4
+ /**
5
+ * Initialize a new instance of `ConfidentialLedgerClient`
6
+ * @param ledgerEndpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
7
+ * @param credentials - uniquely identify client credential
8
+ * @param options - the parameter for all optional parameters
9
+ */
10
+ export default function createClient(ledgerEndpoint: string, credentials: TokenCredential, options?: ClientOptions): ConfidentialLedgerClient;
11
+ //# sourceMappingURL=confidentialLedger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialLedger.d.ts","sourceRoot":"","sources":["../../../../src/generated/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;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,wBAAwB,CAkC1B"}
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { getClient } from "@azure-rest/core-client";
4
- import { logger } from "./logger";
4
+ import { logger } from "./logger.js";
5
5
  /**
6
6
  * Initialize a new instance of `ConfidentialLedgerClient`
7
7
  * @param ledgerEndpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../../../src/generated/src/confidentialLedger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,cAAsB,EACtB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,cAAc,EAAE,CAAC;IACvD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI;gBACrC,gDAAgD;aACjD;SACF,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,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,MAAM,CAAC,IAAI;SACtD,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CACtB,OAAO,EACP,WAAW,EACX,OAAO,CACoB,CAAC;IAE9B,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/**\n * Initialize a new instance of `ConfidentialLedgerClient`\n * @param ledgerEndpoint - 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 ledgerEndpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): ConfidentialLedgerClient {\n const baseUrl = options.baseUrl ?? `${ledgerEndpoint}`;\n options.apiVersion = options.apiVersion ?? \"2022-05-13\";\n options = {\n ...options,\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://confidential-ledger.azure.com/.default\"\n ]\n }\n };\n\n const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.0.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 };\n\n const client = getClient(\n baseUrl,\n credentials,\n options\n ) as ConfidentialLedgerClient;\n\n return client;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import ConfidentialLedger from "./confidentialLedger.js";
2
+ export * from "./confidentialLedger.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./paginateHelper.js";
10
+ export default ConfidentialLedger;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import ConfidentialLedger from "./confidentialLedger.js";
4
+ export * from "./confidentialLedger.js";
5
+ export * from "./parameters.js";
6
+ export * from "./responses.js";
7
+ export * from "./clientDefinitions.js";
8
+ export * from "./isUnexpected.js";
9
+ export * from "./models.js";
10
+ export * from "./outputModels.js";
11
+ export * from "./paginateHelper.js";
12
+ export default ConfidentialLedger;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,kBAAkB,MAAM,yBAAyB,CAAC;AAEzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport ConfidentialLedger from \"./confidentialLedger.js\";\n\nexport * from \"./confidentialLedger.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\n\nexport default ConfidentialLedger;\n"]}
@@ -0,0 +1,15 @@
1
+ import { GetConstitution200Response, GetConstitutionDefaultResponse, ListConsortiumMembers200Response, ListConsortiumMembersDefaultResponse, GetEnclaveQuotes200Response, GetEnclaveQuotesDefaultResponse, ListCollections200Response, ListCollectionsDefaultResponse, ListLedgerEntries200Response, ListLedgerEntriesDefaultResponse, CreateLedgerEntry200Response, CreateLedgerEntryDefaultResponse, GetLedgerEntry200Response, GetLedgerEntryDefaultResponse, GetReceipt200Response, GetReceiptDefaultResponse, GetTransactionStatus200Response, GetTransactionStatusDefaultResponse, GetCurrentLedgerEntry200Response, GetCurrentLedgerEntryDefaultResponse, DeleteUser204Response, DeleteUserDefaultResponse, GetUser200Response, GetUserDefaultResponse, CreateOrUpdateUser200Response, CreateOrUpdateUserDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: GetConstitution200Response | GetConstitutionDefaultResponse): response is GetConstitutionDefaultResponse;
3
+ export declare function isUnexpected(response: ListConsortiumMembers200Response | ListConsortiumMembersDefaultResponse): response is ListConsortiumMembersDefaultResponse;
4
+ export declare function isUnexpected(response: GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse): response is GetEnclaveQuotesDefaultResponse;
5
+ export declare function isUnexpected(response: ListCollections200Response | ListCollectionsDefaultResponse): response is ListCollectionsDefaultResponse;
6
+ export declare function isUnexpected(response: ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse): response is ListLedgerEntriesDefaultResponse;
7
+ export declare function isUnexpected(response: CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse): response is CreateLedgerEntryDefaultResponse;
8
+ export declare function isUnexpected(response: GetLedgerEntry200Response | GetLedgerEntryDefaultResponse): response is GetLedgerEntryDefaultResponse;
9
+ export declare function isUnexpected(response: GetReceipt200Response | GetReceiptDefaultResponse): response is GetReceiptDefaultResponse;
10
+ export declare function isUnexpected(response: GetTransactionStatus200Response | GetTransactionStatusDefaultResponse): response is GetTransactionStatusDefaultResponse;
11
+ export declare function isUnexpected(response: GetCurrentLedgerEntry200Response | GetCurrentLedgerEntryDefaultResponse): response is GetCurrentLedgerEntryDefaultResponse;
12
+ export declare function isUnexpected(response: DeleteUser204Response | DeleteUserDefaultResponse): response is DeleteUserDefaultResponse;
13
+ export declare function isUnexpected(response: GetUser200Response | GetUserDefaultResponse): response is GetUserDefaultResponse;
14
+ export declare function isUnexpected(response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse): response is CreateOrUpdateUserDefaultResponse;
15
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../../src/generated/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,gCAAgC,EAChC,oCAAoC,EACpC,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAkBxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,0BAA0B,GAAG,8BAA8B,GACpE,QAAQ,IAAI,8BAA8B,CAAC;AAC9C,wBAAgB,YAAY,C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AAM,SAAS,GAAG,IAAI,MAAM,CAC1B,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAC1C,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE3B,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 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 \"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:\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: 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 | 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 | 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 (\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/src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA4C,CAAC"}
@@ -0,0 +1,11 @@
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
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/generated/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"}
@@ -0,0 +1,130 @@
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
+ receipt?: ReceiptContentsOutput;
92
+ /** State of a ledger query. */
93
+ state: "Loading" | "Ready";
94
+ /** 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. */
95
+ transactionId: string;
96
+ }
97
+ export interface ReceiptContentsOutput {
98
+ cert?: string;
99
+ leaf?: string;
100
+ leafComponents?: ReceiptLeafComponentsOutput;
101
+ nodeId: string;
102
+ proof: Array<ReceiptElementOutput>;
103
+ root?: string;
104
+ serviceEndorsements?: Array<string>;
105
+ signature: string;
106
+ }
107
+ export interface ReceiptLeafComponentsOutput {
108
+ claimsDigest?: string;
109
+ commitEvidence?: string;
110
+ writeSetDigest?: string;
111
+ }
112
+ export interface ReceiptElementOutput {
113
+ left?: string;
114
+ right?: string;
115
+ }
116
+ /** Response returned to a query for the transaction status */
117
+ export interface TransactionStatusOutput {
118
+ /** Represents the state of the transaction. */
119
+ state: "Committed" | "Pending";
120
+ /** 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. */
121
+ transactionId: string;
122
+ }
123
+ /** Details about a Confidential Ledger user. */
124
+ export interface LedgerUserOutput {
125
+ /** Represents an assignable role. */
126
+ assignedRole: "Administrator" | "Contributor" | "Reader";
127
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
128
+ readonly userId?: string;
129
+ }
130
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../../src/generated/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,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,sEAAsE;AACtE,MAAM,WAAW,gCAAgC;IAC/C,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CACnD;AAED,kCAAkC;AAClC,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,6DAA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MAAM,CAAC;IACf,KAAK,EAAE,KAAK,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,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"}
@@ -0,0 +1,55 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ /**
4
+ * Helper type to extract the type of an array
5
+ */
6
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
7
+ /**
8
+ * The type of a custom function that defines how to get a page and a link to the next one if any.
9
+ */
10
+ export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
11
+ page: TPage;
12
+ nextPageLink?: string;
13
+ }>;
14
+ /**
15
+ * Options for the paging helper
16
+ */
17
+ export interface PagingOptions<TResponse> {
18
+ /**
19
+ * Custom function to extract pagination details for crating the PagedAsyncIterableIterator
20
+ */
21
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
22
+ }
23
+ /**
24
+ * Helper type to infer the Type of the paged elements from the response type
25
+ * This type is generated based on the swagger information for x-ms-pageable
26
+ * specifically on the itemName property which indicates the property of the response
27
+ * where the page items are found. The default value is `value`.
28
+ * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
29
+ */
30
+ export type PaginateReturn<TResult> = TResult extends {
31
+ body: {
32
+ value?: infer TPage;
33
+ };
34
+ } | {
35
+ body: {
36
+ members?: infer TPage;
37
+ };
38
+ } | {
39
+ body: {
40
+ collections?: infer TPage;
41
+ };
42
+ } | {
43
+ body: {
44
+ entries?: infer TPage;
45
+ };
46
+ } ? GetArrayType<TPage> : Array<unknown>;
47
+ /**
48
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
49
+ * @param client - Client to use for sending the next page requests
50
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
51
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
52
+ * @returns - PagedAsyncIterableIterator to iterate the elements
53
+ */
54
+ export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
55
+ //# sourceMappingURL=paginateHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,0BAA0B,EAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,MAAM,EAEN,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC;;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,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,OAAO,IAAI,OAAO,SACzC;IACE,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CAC/B,GACD;IACE,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CACjC,GACD;IACE,IAAI,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CACrC,GACD;IACE,IAAI,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CACjC,GACD,YAAY,CAAC,KAAK,CAAC,GACnB,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,SAAS,qBAAqB,EAC9D,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,GAAE,aAAa,CAAC,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA8BvD"}
@@ -0,0 +1,66 @@
1
+ import { RequestParameters } from "@azure-rest/core-client";
2
+ import { LedgerEntry, LedgerUser } from "./models.js";
3
+ export type GetConstitutionParameters = RequestParameters;
4
+ export type ListConsortiumMembersParameters = RequestParameters;
5
+ export type GetEnclaveQuotesParameters = RequestParameters;
6
+ export type ListCollectionsParameters = RequestParameters;
7
+ export interface ListLedgerEntriesQueryParamProperties {
8
+ /** The collection id. */
9
+ collectionId?: string;
10
+ /** Specify the first transaction ID in a range. */
11
+ fromTransactionId?: string;
12
+ /** Specify the last transaction ID in a range. */
13
+ toTransactionId?: string;
14
+ }
15
+ export interface ListLedgerEntriesQueryParam {
16
+ queryParameters?: ListLedgerEntriesQueryParamProperties;
17
+ }
18
+ export type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam & RequestParameters;
19
+ export interface CreateLedgerEntryBodyParam {
20
+ /** Ledger entry. */
21
+ body: LedgerEntry;
22
+ }
23
+ export interface CreateLedgerEntryQueryParamProperties {
24
+ /** The collection id. */
25
+ collectionId?: string;
26
+ }
27
+ export interface CreateLedgerEntryQueryParam {
28
+ queryParameters?: CreateLedgerEntryQueryParamProperties;
29
+ }
30
+ export interface CreateLedgerEntryMediaTypesParam {
31
+ /** Request content type */
32
+ contentType?: "application/json";
33
+ }
34
+ export type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam & CreateLedgerEntryMediaTypesParam & CreateLedgerEntryBodyParam & RequestParameters;
35
+ export interface GetLedgerEntryQueryParamProperties {
36
+ /** The collection id. */
37
+ collectionId?: string;
38
+ }
39
+ export interface GetLedgerEntryQueryParam {
40
+ queryParameters?: GetLedgerEntryQueryParamProperties;
41
+ }
42
+ export type GetLedgerEntryParameters = GetLedgerEntryQueryParam & RequestParameters;
43
+ export type GetReceiptParameters = RequestParameters;
44
+ export type GetTransactionStatusParameters = RequestParameters;
45
+ export interface GetCurrentLedgerEntryQueryParamProperties {
46
+ /** The collection id. */
47
+ collectionId?: string;
48
+ }
49
+ export interface GetCurrentLedgerEntryQueryParam {
50
+ queryParameters?: GetCurrentLedgerEntryQueryParamProperties;
51
+ }
52
+ export type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam & RequestParameters;
53
+ export type DeleteUserParameters = RequestParameters;
54
+ export type GetUserParameters = RequestParameters;
55
+ /** Details about a Confidential Ledger user. */
56
+ export type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;
57
+ export interface CreateOrUpdateUserBodyParam {
58
+ /** Details about a Confidential Ledger user. */
59
+ body: LedgerUserResourceMergeAndPatch;
60
+ }
61
+ export interface CreateOrUpdateUserMediaTypesParam {
62
+ /** Request content type */
63
+ contentType?: "application/merge-patch+json";
64
+ }
65
+ export type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam & CreateOrUpdateUserBodyParam & RequestParameters;
66
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAC1D,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;AAChE,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC;AAE1D,MAAM,WAAW,qCAAqC;IACpD,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,qCAAqC,CAAC;CACzD;AAED,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,GACnE,iBAAiB,CAAC;AAEpB,MAAM,WAAW,0BAA0B;IACzC,oBAAoB;IACpB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,qCAAqC;IACpD,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,2BAA2B;IAC1C,eAAe,CAAC,EAAE,qCAAqC,CAAC;CACzD;AAED,MAAM,WAAW,gCAAgC;IAC/C,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,GACnE,gCAAgC,GAChC,0BAA0B,GAC1B,iBAAiB,CAAC;AAEpB,MAAM,WAAW,kCAAkC;IACjD,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACvC,eAAe,CAAC,EAAE,kCAAkC,CAAC;CACtD;AAED,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,GAC7D,iBAAiB,CAAC;AACpB,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACrD,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAE/D,MAAM,WAAW,yCAAyC;IACxD,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,+BAA+B;IAC9C,eAAe,CAAC,EAAE,yCAAyC,CAAC;CAC7D;AAED,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,GAC3E,iBAAiB,CAAC;AACpB,MAAM,MAAM,oBAAoB,GAAG,iBAAiB,CAAC;AACrD,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAClD,gDAAgD;AAChD,MAAM,MAAM,+BAA+B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAElE,MAAM,WAAW,2BAA2B;IAC1C,gDAAgD;IAChD,IAAI,EAAE,+BAA+B,CAAC;CACvC;AAED,MAAM,WAAW,iCAAiC;IAChD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,8BAA8B,CAAC;CAC9C;AAED,MAAM,MAAM,4BAA4B,GAAG,iCAAiC,GAC1E,2BAA2B,GAC3B,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { LedgerEntry, LedgerUser } from \"./models.js\";\n\nexport type GetConstitutionParameters = RequestParameters;\nexport type ListConsortiumMembersParameters = RequestParameters;\nexport type GetEnclaveQuotesParameters = RequestParameters;\nexport type ListCollectionsParameters = RequestParameters;\n\nexport interface ListLedgerEntriesQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n /** Specify the first transaction ID in a range. */\n fromTransactionId?: string;\n /** Specify the last transaction ID in a range. */\n toTransactionId?: string;\n}\n\nexport interface ListLedgerEntriesQueryParam {\n queryParameters?: ListLedgerEntriesQueryParamProperties;\n}\n\nexport type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam &\n RequestParameters;\n\nexport interface CreateLedgerEntryBodyParam {\n /** Ledger entry. */\n body: LedgerEntry;\n}\n\nexport interface CreateLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface CreateLedgerEntryQueryParam {\n queryParameters?: CreateLedgerEntryQueryParamProperties;\n}\n\nexport interface CreateLedgerEntryMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam &\n CreateLedgerEntryMediaTypesParam &\n CreateLedgerEntryBodyParam &\n RequestParameters;\n\nexport interface GetLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface GetLedgerEntryQueryParam {\n queryParameters?: GetLedgerEntryQueryParamProperties;\n}\n\nexport type GetLedgerEntryParameters = GetLedgerEntryQueryParam &\n RequestParameters;\nexport type GetReceiptParameters = RequestParameters;\nexport type GetTransactionStatusParameters = RequestParameters;\n\nexport interface GetCurrentLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface GetCurrentLedgerEntryQueryParam {\n queryParameters?: GetCurrentLedgerEntryQueryParamProperties;\n}\n\nexport type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam &\n RequestParameters;\nexport type DeleteUserParameters = RequestParameters;\nexport type GetUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user. */\nexport type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;\n\nexport interface CreateOrUpdateUserBodyParam {\n /** Details about a Confidential Ledger user. */\n body: LedgerUserResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam &\n CreateOrUpdateUserBodyParam &\n RequestParameters;\n"]}