@azure-rest/confidential-ledger 1.1.2-beta.1 → 1.1.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/commonjs/clientDefinitions.d.ts +68 -10
  2. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  3. package/dist/commonjs/clientDefinitions.js.map +1 -1
  4. package/dist/commonjs/confidentialLedger.d.ts +2 -2
  5. package/dist/commonjs/confidentialLedger.d.ts.map +1 -1
  6. package/dist/commonjs/confidentialLedger.js +5 -5
  7. package/dist/commonjs/confidentialLedger.js.map +1 -1
  8. package/dist/commonjs/isUnexpected.d.ts +19 -1
  9. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  10. package/dist/commonjs/isUnexpected.js +18 -0
  11. package/dist/commonjs/isUnexpected.js.map +1 -1
  12. package/dist/commonjs/models.d.ts +57 -12
  13. package/dist/commonjs/models.d.ts.map +1 -1
  14. package/dist/commonjs/models.js.map +1 -1
  15. package/dist/commonjs/outputModels.d.ts +71 -0
  16. package/dist/commonjs/outputModels.d.ts.map +1 -1
  17. package/dist/commonjs/outputModels.js.map +1 -1
  18. package/dist/commonjs/paginateHelper.d.ts +4 -0
  19. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  20. package/dist/commonjs/paginateHelper.js +8 -1
  21. package/dist/commonjs/paginateHelper.js.map +1 -1
  22. package/dist/commonjs/parameters.d.ts +92 -2
  23. package/dist/commonjs/parameters.d.ts.map +1 -1
  24. package/dist/commonjs/parameters.js.map +1 -1
  25. package/dist/commonjs/responses.d.ts +172 -12
  26. package/dist/commonjs/responses.d.ts.map +1 -1
  27. package/dist/commonjs/responses.js.map +1 -1
  28. package/dist/commonjs/tsdoc-metadata.json +1 -1
  29. package/dist/esm/clientDefinitions.d.ts +68 -10
  30. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  31. package/dist/esm/clientDefinitions.js.map +1 -1
  32. package/dist/esm/confidentialLedger.d.ts +2 -2
  33. package/dist/esm/confidentialLedger.d.ts.map +1 -1
  34. package/dist/esm/confidentialLedger.js +5 -5
  35. package/dist/esm/confidentialLedger.js.map +1 -1
  36. package/dist/esm/isUnexpected.d.ts +19 -1
  37. package/dist/esm/isUnexpected.d.ts.map +1 -1
  38. package/dist/esm/isUnexpected.js +18 -0
  39. package/dist/esm/isUnexpected.js.map +1 -1
  40. package/dist/esm/models.d.ts +57 -12
  41. package/dist/esm/models.d.ts.map +1 -1
  42. package/dist/esm/models.js.map +1 -1
  43. package/dist/esm/outputModels.d.ts +71 -0
  44. package/dist/esm/outputModels.d.ts.map +1 -1
  45. package/dist/esm/outputModels.js.map +1 -1
  46. package/dist/esm/paginateHelper.d.ts +4 -0
  47. package/dist/esm/paginateHelper.d.ts.map +1 -1
  48. package/dist/esm/paginateHelper.js +8 -1
  49. package/dist/esm/paginateHelper.js.map +1 -1
  50. package/dist/esm/parameters.d.ts +92 -2
  51. package/dist/esm/parameters.d.ts.map +1 -1
  52. package/dist/esm/parameters.js.map +1 -1
  53. package/dist/esm/responses.d.ts +172 -12
  54. package/dist/esm/responses.d.ts.map +1 -1
  55. package/dist/esm/responses.js.map +1 -1
  56. package/package.json +9 -17
  57. package/CHANGELOG.md +0 -22
  58. package/dist/commonjs/generated/clientDefinitions.d.ts +0 -153
  59. package/dist/commonjs/generated/clientDefinitions.d.ts.map +0 -1
  60. package/dist/commonjs/generated/clientDefinitions.js +0 -5
  61. package/dist/commonjs/generated/clientDefinitions.js.map +0 -1
  62. package/dist/commonjs/generated/confidentialLedger.d.ts +0 -16
  63. package/dist/commonjs/generated/confidentialLedger.d.ts.map +0 -1
  64. package/dist/commonjs/generated/confidentialLedger.js +0 -48
  65. package/dist/commonjs/generated/confidentialLedger.js.map +0 -1
  66. package/dist/commonjs/generated/index.d.ts +0 -11
  67. package/dist/commonjs/generated/index.d.ts.map +0 -1
  68. package/dist/commonjs/generated/index.js +0 -16
  69. package/dist/commonjs/generated/index.js.map +0 -1
  70. package/dist/commonjs/generated/isUnexpected.d.ts +0 -34
  71. package/dist/commonjs/generated/isUnexpected.d.ts.map +0 -1
  72. package/dist/commonjs/generated/isUnexpected.js +0 -105
  73. package/dist/commonjs/generated/isUnexpected.js.map +0 -1
  74. package/dist/commonjs/generated/logger.d.ts +0 -2
  75. package/dist/commonjs/generated/logger.d.ts.map +0 -1
  76. package/dist/commonjs/generated/logger.js +0 -8
  77. package/dist/commonjs/generated/logger.js.map +0 -1
  78. package/dist/commonjs/generated/models.d.ts +0 -87
  79. package/dist/commonjs/generated/models.d.ts.map +0 -1
  80. package/dist/commonjs/generated/models.js +0 -5
  81. package/dist/commonjs/generated/models.js.map +0 -1
  82. package/dist/commonjs/generated/outputModels.d.ts +0 -280
  83. package/dist/commonjs/generated/outputModels.d.ts.map +0 -1
  84. package/dist/commonjs/generated/outputModels.js +0 -5
  85. package/dist/commonjs/generated/outputModels.js.map +0 -1
  86. package/dist/commonjs/generated/paginateHelper.d.ts +0 -88
  87. package/dist/commonjs/generated/paginateHelper.d.ts.map +0 -1
  88. package/dist/commonjs/generated/paginateHelper.js +0 -223
  89. package/dist/commonjs/generated/paginateHelper.js.map +0 -1
  90. package/dist/commonjs/generated/parameters.d.ts +0 -168
  91. package/dist/commonjs/generated/parameters.d.ts.map +0 -1
  92. package/dist/commonjs/generated/parameters.js +0 -5
  93. package/dist/commonjs/generated/parameters.js.map +0 -1
  94. package/dist/commonjs/generated/responses.d.ts +0 -337
  95. package/dist/commonjs/generated/responses.d.ts.map +0 -1
  96. package/dist/commonjs/generated/responses.js +0 -5
  97. package/dist/commonjs/generated/responses.js.map +0 -1
  98. package/dist/esm/generated/clientDefinitions.d.ts +0 -153
  99. package/dist/esm/generated/clientDefinitions.d.ts.map +0 -1
  100. package/dist/esm/generated/clientDefinitions.js +0 -4
  101. package/dist/esm/generated/clientDefinitions.js.map +0 -1
  102. package/dist/esm/generated/confidentialLedger.d.ts +0 -16
  103. package/dist/esm/generated/confidentialLedger.d.ts.map +0 -1
  104. package/dist/esm/generated/confidentialLedger.js +0 -45
  105. package/dist/esm/generated/confidentialLedger.js.map +0 -1
  106. package/dist/esm/generated/index.d.ts +0 -11
  107. package/dist/esm/generated/index.d.ts.map +0 -1
  108. package/dist/esm/generated/index.js +0 -13
  109. package/dist/esm/generated/index.js.map +0 -1
  110. package/dist/esm/generated/isUnexpected.d.ts +0 -34
  111. package/dist/esm/generated/isUnexpected.d.ts.map +0 -1
  112. package/dist/esm/generated/isUnexpected.js +0 -102
  113. package/dist/esm/generated/isUnexpected.js.map +0 -1
  114. package/dist/esm/generated/logger.d.ts +0 -2
  115. package/dist/esm/generated/logger.d.ts.map +0 -1
  116. package/dist/esm/generated/logger.js +0 -5
  117. package/dist/esm/generated/logger.js.map +0 -1
  118. package/dist/esm/generated/models.d.ts +0 -87
  119. package/dist/esm/generated/models.d.ts.map +0 -1
  120. package/dist/esm/generated/models.js +0 -4
  121. package/dist/esm/generated/models.js.map +0 -1
  122. package/dist/esm/generated/outputModels.d.ts +0 -280
  123. package/dist/esm/generated/outputModels.d.ts.map +0 -1
  124. package/dist/esm/generated/outputModels.js +0 -4
  125. package/dist/esm/generated/outputModels.js.map +0 -1
  126. package/dist/esm/generated/paginateHelper.d.ts +0 -88
  127. package/dist/esm/generated/paginateHelper.d.ts.map +0 -1
  128. package/dist/esm/generated/paginateHelper.js +0 -220
  129. package/dist/esm/generated/paginateHelper.js.map +0 -1
  130. package/dist/esm/generated/parameters.d.ts +0 -168
  131. package/dist/esm/generated/parameters.d.ts.map +0 -1
  132. package/dist/esm/generated/parameters.js +0 -4
  133. package/dist/esm/generated/parameters.js.map +0 -1
  134. package/dist/esm/generated/responses.d.ts +0 -337
  135. package/dist/esm/generated/responses.d.ts.map +0 -1
  136. package/dist/esm/generated/responses.js +0 -4
  137. package/dist/esm/generated/responses.js.map +0 -1
  138. package/review/confidential-ledger.api.md +0 -927
@@ -74,6 +74,35 @@ export interface LedgerEntryOutput {
74
74
  readonly collectionId?: string;
75
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
76
  readonly transactionId?: string;
77
+ /** List of user defined function hooks to be executed before the ledger entry is written. */
78
+ preHooks?: Array<UserDefinedFunctionHookOutput>;
79
+ /** List of user defined function hooks to be executed after the ledger entry is written. */
80
+ postHooks?: Array<UserDefinedFunctionHookOutput>;
81
+ }
82
+ /** Hook for a user defined function execution. */
83
+ export interface UserDefinedFunctionHookOutput {
84
+ /** ID of the user defined function to execute. */
85
+ functionId: string;
86
+ /** The properties for executing a user defined function. */
87
+ properties?: UserDefinedFunctionExecutionPropertiesOutput;
88
+ }
89
+ /** The properties for executing a user defined function. */
90
+ export interface UserDefinedFunctionExecutionPropertiesOutput {
91
+ /** Runtime arguments of the user defined function. Defaults to an empty list. */
92
+ arguments?: Array<string>;
93
+ /** Name of the exported function to execute in the code of the user defined function. Defaults to main. */
94
+ exportedFunctionName?: string;
95
+ /** JS runtime options for user defined endpoints and functions */
96
+ runtimeOptions?: JSRuntimeOptionsOutput;
97
+ }
98
+ /** JS runtime options for user defined endpoints and functions */
99
+ export interface JSRuntimeOptionsOutput {
100
+ log_exception_details?: boolean;
101
+ max_cached_interpreters?: number;
102
+ max_execution_time_ms?: number;
103
+ max_heap_bytes?: number;
104
+ max_stack_bytes?: number;
105
+ return_exception_details?: boolean;
77
106
  }
78
107
  /** 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
108
  export interface LedgerWriteResultOutput {
@@ -162,6 +191,19 @@ export interface LedgerUserOutput {
162
191
  /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
163
192
  readonly userId?: string;
164
193
  }
194
+ /** Paginated users returned in response to a query. */
195
+ export interface PagedLedgerUsersOutput {
196
+ ledgerUsers?: Array<LedgerUserMultipleRolesOutput>;
197
+ /** Path from which to retrieve the next page of results. */
198
+ nextLink?: string;
199
+ }
200
+ /** Details about a Confidential Ledger user. */
201
+ export interface LedgerUserMultipleRolesOutput {
202
+ /** Represents an assignable role. */
203
+ assignedRoles: Array<"Administrator" | "Contributor" | "Reader">;
204
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
205
+ readonly userId?: string;
206
+ }
165
207
  /** bundle for the user defined endpoints */
166
208
  export interface BundleOutput {
167
209
  metadata: MetadataOutput;
@@ -193,6 +235,10 @@ export interface EndpointPropertiesOutput {
193
235
  export interface InterpreterReusePolicyOutput {
194
236
  key: string;
195
237
  }
238
+ export interface ModuleDefOutput {
239
+ module: string;
240
+ name: string;
241
+ }
196
242
  /** Paginated user defined functions returned in response to a query. */
197
243
  export interface PagedUserDefinedFunctionsOutput {
198
244
  functions: Array<UserDefinedFunctionOutput>;
@@ -206,4 +252,29 @@ export interface UserDefinedFunctionOutput {
206
252
  /** ID of the user defined function. */
207
253
  readonly id?: string;
208
254
  }
255
+ /** The result of a user defined function execution. */
256
+ export interface UserDefinedFunctionExecutionResponseOutput {
257
+ /** The error object of a user defined function execution. This is returned only when the user defined function execution throws an exception. */
258
+ error?: UserDefinedFunctionExecutionErrorOutput;
259
+ /** The result object of a user defined function execution. This is returned only when the user defined function executes successfully. */
260
+ result?: UserDefinedFunctionExecutionResultOutput;
261
+ /** Represents the status of a user defined function execution. */
262
+ status: "Succeeded" | "Failed";
263
+ }
264
+ /** The error object of a user defined function execution. This is returned only when the user defined function execution throws an exception. */
265
+ export interface UserDefinedFunctionExecutionErrorOutput {
266
+ /** Message indicating the error thrown when executing the function. */
267
+ message?: string;
268
+ }
269
+ /** The result object of a user defined function execution. This is returned only when the user defined function executes successfully. */
270
+ export interface UserDefinedFunctionExecutionResultOutput {
271
+ /** String-encoded value returned by the user defined function execution. If the function does not return any value, this is set to an empty string. */
272
+ returnValue?: string;
273
+ }
274
+ /** Definition for roles */
275
+ export interface RoleOutput {
276
+ /** name of the user defined role */
277
+ roleName?: string;
278
+ roleActions?: Array<string>;
279
+ }
209
280
  //# sourceMappingURL=outputModels.d.ts.map
@@ -1 +1 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M,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B"}
@@ -1 +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\n/** bundle for the user defined endpoints */\nexport interface BundleOutput {\n metadata: MetadataOutput;\n /** Any object */\n modules: Record<string, unknown>;\n}\n\nexport interface MetadataOutput {\n /** A map of path to method endpoints for the path */\n endpoints: Record<string, MethodToEndpointPropertiesOutput>;\n}\n\nexport interface MethodToEndpointPropertiesOutput {\n get?: EndpointPropertiesOutput;\n put?: EndpointPropertiesOutput;\n patch?: EndpointPropertiesOutput;\n delete?: EndpointPropertiesOutput;\n}\n\nexport interface EndpointPropertiesOutput {\n authn_policies: Array<any>;\n forwarding_required: \"sometimes\" | \"always\" | \"never\";\n interpreter_reuse?: InterpreterReusePolicyOutput;\n js_function?: string;\n js_module?: string;\n mode?: \"readwrite\" | \"readonly\" | \"historical\";\n /** Anything */\n openapi?: any;\n openapi_hidden?: boolean;\n redirection_strategy?: \"none\" | \"to_primary\" | \"to_backup\";\n}\n\nexport interface InterpreterReusePolicyOutput {\n key: string;\n}\n\n/** Paginated user defined functions returned in response to a query. */\nexport interface PagedUserDefinedFunctionsOutput {\n functions: Array<UserDefinedFunctionOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** A user defined function in the ledger. */\nexport interface UserDefinedFunctionOutput {\n /** Code of the user defined function in JavaScript. */\n code: string;\n /** ID of the user defined function. */\n readonly id?: string;\n}\n"]}
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 /** List of user defined function hooks to be executed before the ledger entry is written. */\n preHooks?: Array<UserDefinedFunctionHookOutput>;\n /** List of user defined function hooks to be executed after the ledger entry is written. */\n postHooks?: Array<UserDefinedFunctionHookOutput>;\n}\n\n/** Hook for a user defined function execution. */\nexport interface UserDefinedFunctionHookOutput {\n /** ID of the user defined function to execute. */\n functionId: string;\n /** The properties for executing a user defined function. */\n properties?: UserDefinedFunctionExecutionPropertiesOutput;\n}\n\n/** The properties for executing a user defined function. */\nexport interface UserDefinedFunctionExecutionPropertiesOutput {\n /** Runtime arguments of the user defined function. Defaults to an empty list. */\n arguments?: Array<string>;\n /** Name of the exported function to execute in the code of the user defined function. Defaults to main. */\n exportedFunctionName?: string;\n /** JS runtime options for user defined endpoints and functions */\n runtimeOptions?: JSRuntimeOptionsOutput;\n}\n\n/** JS runtime options for user defined endpoints and functions */\nexport interface JSRuntimeOptionsOutput {\n log_exception_details?: boolean;\n max_cached_interpreters?: number;\n max_execution_time_ms?: number;\n max_heap_bytes?: number;\n max_stack_bytes?: number;\n return_exception_details?: boolean;\n}\n\n/** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */\nexport interface LedgerWriteResultOutput {\n collectionId: string;\n}\n\n/** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */\nexport interface LedgerQueryResultOutput {\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */\n entry?: LedgerEntryOutput;\n}\n\n/** A receipt certifying the transaction at the specified id. */\nexport interface TransactionReceiptOutput {\n /** List of application claims. */\n applicationClaims?: Array<ApplicationClaimOutput>;\n receipt?: ReceiptContentsOutput;\n /** State of a ledger query. */\n state: \"Loading\" | \"Ready\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\n/** A claim of a ledger application. */\nexport interface ApplicationClaimOutput {\n /** An application claim in digested form. */\n digest?: ClaimDigestOutput;\n /** Represents the kind of an application claim. */\n kind: \"LedgerEntry\" | \"ClaimDigest\";\n /** An application claim derived from ledger entry data. */\n ledgerEntry?: LedgerEntryClaimOutput;\n}\n\n/** An application claim in digested form. */\nexport interface ClaimDigestOutput {\n /** The digest of the application claim, in hexadecimal form. */\n value?: string;\n /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */\n protocol: \"LedgerEntryV1\";\n}\n\n/** An application claim derived from ledger entry data. */\nexport interface LedgerEntryClaimOutput {\n /** Identifier of a collection. */\n collectionId?: string;\n /** Contents of a ledger entry. */\n contents?: string;\n /** Base64-encoded secret key. */\n secretKey?: string;\n /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */\n protocol: \"LedgerEntryV1\";\n}\n\nexport interface ReceiptContentsOutput {\n cert?: string;\n leaf?: string;\n leafComponents?: ReceiptLeafComponentsOutput;\n nodeId: string;\n proof: Array<ReceiptElementOutput>;\n root?: string;\n serviceEndorsements?: Array<string>;\n signature: string;\n}\n\nexport interface ReceiptLeafComponentsOutput {\n claimsDigest?: string;\n commitEvidence?: string;\n writeSetDigest?: string;\n}\n\nexport interface ReceiptElementOutput {\n left?: string;\n right?: string;\n}\n\n/** Response returned to a query for the transaction status */\nexport interface TransactionStatusOutput {\n /** Represents the state of the transaction. */\n state: \"Committed\" | \"Pending\";\n /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */\n transactionId: string;\n}\n\n/** Paginated users returned in response to a query. */\nexport interface PagedUsersOutput {\n ledgerUsers?: Array<LedgerUserOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserOutput {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */\n readonly userId?: string;\n}\n\n/** Paginated users returned in response to a query. */\nexport interface PagedLedgerUsersOutput {\n ledgerUsers?: Array<LedgerUserMultipleRolesOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserMultipleRolesOutput {\n /** Represents an assignable role. */\n assignedRoles: Array<\"Administrator\" | \"Contributor\" | \"Reader\">;\n /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */\n readonly userId?: string;\n}\n\n/** bundle for the user defined endpoints */\nexport interface BundleOutput {\n metadata: MetadataOutput;\n /** Any object */\n modules: Record<string, unknown>;\n}\n\nexport interface MetadataOutput {\n /** A map of path to method endpoints for the path */\n endpoints: Record<string, MethodToEndpointPropertiesOutput>;\n}\n\nexport interface MethodToEndpointPropertiesOutput {\n get?: EndpointPropertiesOutput;\n put?: EndpointPropertiesOutput;\n patch?: EndpointPropertiesOutput;\n delete?: EndpointPropertiesOutput;\n}\n\nexport interface EndpointPropertiesOutput {\n authn_policies: Array<any>;\n forwarding_required: \"sometimes\" | \"always\" | \"never\";\n interpreter_reuse?: InterpreterReusePolicyOutput;\n js_function?: string;\n js_module?: string;\n mode?: \"readwrite\" | \"readonly\" | \"historical\";\n /** Anything */\n openapi?: any;\n openapi_hidden?: boolean;\n redirection_strategy?: \"none\" | \"to_primary\" | \"to_backup\";\n}\n\nexport interface InterpreterReusePolicyOutput {\n key: string;\n}\n\nexport interface ModuleDefOutput {\n module: string;\n name: string;\n}\n\n/** Paginated user defined functions returned in response to a query. */\nexport interface PagedUserDefinedFunctionsOutput {\n functions: Array<UserDefinedFunctionOutput>;\n /** Path from which to retrieve the next page of results. */\n nextLink?: string;\n}\n\n/** A user defined function in the ledger. */\nexport interface UserDefinedFunctionOutput {\n /** Code of the user defined function in JavaScript. */\n code: string;\n /** ID of the user defined function. */\n readonly id?: string;\n}\n\n/** The result of a user defined function execution. */\nexport interface UserDefinedFunctionExecutionResponseOutput {\n /** The error object of a user defined function execution. This is returned only when the user defined function execution throws an exception. */\n error?: UserDefinedFunctionExecutionErrorOutput;\n /** The result object of a user defined function execution. This is returned only when the user defined function executes successfully. */\n result?: UserDefinedFunctionExecutionResultOutput;\n /** Represents the status of a user defined function execution. */\n status: \"Succeeded\" | \"Failed\";\n}\n\n/** The error object of a user defined function execution. This is returned only when the user defined function execution throws an exception. */\nexport interface UserDefinedFunctionExecutionErrorOutput {\n /** Message indicating the error thrown when executing the function. */\n message?: string;\n}\n\n/** The result object of a user defined function execution. This is returned only when the user defined function executes successfully. */\nexport interface UserDefinedFunctionExecutionResultOutput {\n /** String-encoded value returned by the user defined function execution. If the function does not return any value, this is set to an empty string. */\n returnValue?: string;\n}\n\n/** Definition for roles */\nexport interface RoleOutput {\n /** name of the user defined role */\n roleName?: string;\n roleActions?: Array<string>;\n}\n"]}
@@ -72,6 +72,10 @@ export type PaginateReturn<TResult> = TResult extends {
72
72
  body: {
73
73
  ledgerUsers?: infer TPage;
74
74
  };
75
+ } | {
76
+ body: {
77
+ functions?: infer TPage;
78
+ };
75
79
  } ? GetArrayType<TPage> : Array<unknown>;
76
80
  /**
77
81
  * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
@@ -1 +1 @@
1
- {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAuF7E;;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,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAA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E,IAAI,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CACnC,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,CA4BvD"}
@@ -176,7 +176,14 @@ function getPaginationProperties(initialResponse) {
176
176
  // Build a set with the passed custom nextLinkNames
177
177
  const nextLinkNames = new Set(["nextLink", "@nextLink"]);
178
178
  // Build a set with the passed custom set of itemNames
179
- const itemNames = new Set(["value", "members", "collections", "entries", "ledgerUsers"]);
179
+ const itemNames = new Set([
180
+ "value",
181
+ "members",
182
+ "collections",
183
+ "entries",
184
+ "ledgerUsers",
185
+ "functions",
186
+ ]);
180
187
  let nextLinkName;
181
188
  let itemName;
182
189
  for (const name of nextLinkNames) {
@@ -1 +1 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwMlC,4BAgCC;;AArOD,yDAA0D;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAAwC,WAAW,CAAC,CAAC;IACtF,OAAO;QACL,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,EACJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,mCAClB,CAAC,CAAC,QAAuB,EAAE,EAAE;YAC5B,MAAM,EAAE,iBAAi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AAC;YACT,QAAQ,GAAG,IAAI,CAAC;YAChB,MAAM;QACR,CAAC;IACH,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,kFAAkF;YAChF,GAAG,SAAS;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACjB,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends\n | {\n body: { value?: infer TPage };\n }\n | {\n body: { members?: infer TPage };\n }\n | {\n body: { collections?: infer TPage };\n }\n | {\n body: { entries?: infer TPage };\n }\n | {\n body: { ledgerUsers?: infer TPage };\n }\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n // We need to check the response for success before trying to inspect it looking for\n // the properties to use for nextLink and itemName\n checkPagingRequest(initialResponse);\n const { itemName, nextLinkName } = getPaginationProperties(initialResponse);\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n\n/**\n * Extracts the itemName and nextLinkName from the initial response to use them for pagination\n */\nfunction getPaginationProperties(initialResponse: PathUncheckedResponse): {\n itemName: string;\n nextLinkName: string | undefined;\n} {\n // Build a set with the passed custom nextLinkNames\n const nextLinkNames = new Set([\"nextLink\", \"@nextLink\"]);\n\n // Build a set with the passed custom set of itemNames\n const itemNames = new Set([\"value\", \"members\", \"collections\", \"entries\", \"ledgerUsers\"]);\n\n let nextLinkName: string | undefined;\n let itemName: string | undefined;\n\n for (const name of nextLinkNames) {\n const nextLink = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (nextLink) {\n nextLinkName = name;\n break;\n }\n }\n\n for (const name of itemNames) {\n const item = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (item) {\n itemName = name;\n break;\n }\n }\n\n if (!itemName) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${[\n ...itemNames,\n ].join(\" OR \")}`,\n );\n }\n\n return { itemName, nextLinkName };\n}\n"]}
1
+ {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA2MlC,4BAgCC;;AAxOD,yDAA0D;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAAwC,WAAW,CAAC,CAAC;IACtF,OAAO;QACL,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,EACJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,mCAClB,CAAC,CAAC,QAAuB,EAAE,EAAE;YAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;YAC7C,OAAO,oBAAoB,CAAC,WAAW,EAAE;gBACvC,QAAQ,EAAE,iBAAiD;aAC5D,CAAC,CAAC;QACL,CAAC,CAA2E;KAC/E,CAAC;AACJ,CAAC;AAED,SAAgB,oBAAoB,CAClC,WAAqD;;;QAErD,MAAM,KAAK,GAAG,oBAAoB,CAAC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CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends\n | {\n body: { value?: infer TPage };\n }\n | {\n body: { members?: infer TPage };\n }\n | {\n body: { collections?: infer TPage };\n }\n | {\n body: { entries?: infer TPage };\n }\n | {\n body: { ledgerUsers?: infer TPage };\n }\n | {\n body: { functions?: infer TPage };\n }\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n // We need to check the response for success before trying to inspect it looking for\n // the properties to use for nextLink and itemName\n checkPagingRequest(initialResponse);\n const { itemName, nextLinkName } = getPaginationProperties(initialResponse);\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n\n/**\n * Extracts the itemName and nextLinkName from the initial response to use them for pagination\n */\nfunction getPaginationProperties(initialResponse: PathUncheckedResponse): {\n itemName: string;\n nextLinkName: string | undefined;\n} {\n // Build a set with the passed custom nextLinkNames\n const nextLinkNames = new Set([\"nextLink\", \"@nextLink\"]);\n\n // Build a set with the passed custom set of itemNames\n const itemNames = new Set([\n \"value\",\n \"members\",\n \"collections\",\n \"entries\",\n \"ledgerUsers\",\n \"functions\",\n ]);\n\n let nextLinkName: string | undefined;\n let itemName: string | undefined;\n\n for (const name of nextLinkNames) {\n const nextLink = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (nextLink) {\n nextLinkName = name;\n break;\n }\n }\n\n for (const name of itemNames) {\n const item = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (item) {\n itemName = name;\n break;\n }\n }\n\n if (!itemName) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${[\n ...itemNames,\n ].join(\" OR \")}`,\n );\n }\n\n return { itemName, nextLinkName };\n}\n"]}
@@ -1,10 +1,9 @@
1
1
  import type { RequestParameters } from "@azure-rest/core-client";
2
- import type { Bundle, LedgerEntry, LedgerUser } from "./models.js";
2
+ import type { LedgerEntry, LedgerUser, LedgerUserMultipleRoles, Bundle, JSRuntimeOptions, UserDefinedFunction, UserDefinedFunctionExecutionProperties, Role } from "./models.js";
3
3
  export type GetConstitutionParameters = RequestParameters;
4
4
  export type ListConsortiumMembersParameters = RequestParameters;
5
5
  export type GetEnclaveQuotesParameters = RequestParameters;
6
6
  export type ListCollectionsParameters = RequestParameters;
7
- export type ListUserDefinedFunctionsParameters = RequestParameters;
8
7
  export interface ListLedgerEntriesQueryParamProperties {
9
8
  /** The collection id. */
10
9
  collectionId?: string;
@@ -12,6 +11,8 @@ export interface ListLedgerEntriesQueryParamProperties {
12
11
  fromTransactionId?: string;
13
12
  /** Specify the last transaction ID in a range. */
14
13
  toTransactionId?: string;
14
+ /** Single tag. */
15
+ tag?: string;
15
16
  }
16
17
  export interface ListLedgerEntriesQueryParam {
17
18
  queryParameters?: ListLedgerEntriesQueryParamProperties;
@@ -24,6 +25,8 @@ export interface CreateLedgerEntryBodyParam {
24
25
  export interface CreateLedgerEntryQueryParamProperties {
25
26
  /** The collection id. */
26
27
  collectionId?: string;
28
+ /** Comma separated tags. */
29
+ tags?: string;
27
30
  }
28
31
  export interface CreateLedgerEntryQueryParam {
29
32
  queryParameters?: CreateLedgerEntryQueryParamProperties;
@@ -52,6 +55,7 @@ export interface GetCurrentLedgerEntryQueryParam {
52
55
  }
53
56
  export type GetCurrentLedgerEntryParameters = GetCurrentLedgerEntryQueryParam & RequestParameters;
54
57
  export type ListUsersParameters = RequestParameters;
58
+ export type ListLedgerUsersParameters = RequestParameters;
55
59
  export type DeleteUserParameters = RequestParameters;
56
60
  export type GetUserParameters = RequestParameters;
57
61
  /** Details about a Confidential Ledger user. */
@@ -65,6 +69,19 @@ export interface CreateOrUpdateUserMediaTypesParam {
65
69
  contentType?: "application/merge-patch+json";
66
70
  }
67
71
  export type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam & CreateOrUpdateUserBodyParam & RequestParameters;
72
+ export type DeleteLedgerUserParameters = RequestParameters;
73
+ export type GetLedgerUserParameters = RequestParameters;
74
+ /** Details about a Confidential Ledger user with multiple roles. */
75
+ export type LedgerUserMultipleRolesResourceMergeAndPatch = Partial<LedgerUserMultipleRoles>;
76
+ export interface CreateOrUpdateLedgerUserBodyParam {
77
+ /** Details about a Confidential Ledger user with multiple roles. */
78
+ body: LedgerUserMultipleRolesResourceMergeAndPatch;
79
+ }
80
+ export interface CreateOrUpdateLedgerUserMediaTypesParam {
81
+ /** Request content type */
82
+ contentType?: "application/merge-patch+json";
83
+ }
84
+ export type CreateOrUpdateLedgerUserParameters = CreateOrUpdateLedgerUserMediaTypesParam & CreateOrUpdateLedgerUserBodyParam & RequestParameters;
68
85
  export type GetUserDefinedEndpointParameters = RequestParameters;
69
86
  export interface CreateUserDefinedEndpointBodyParam {
70
87
  /** bundle parameter description */
@@ -75,4 +92,77 @@ export interface CreateUserDefinedEndpointMediaTypesParam {
75
92
  contentType?: "application/json";
76
93
  }
77
94
  export type CreateUserDefinedEndpointParameters = CreateUserDefinedEndpointMediaTypesParam & CreateUserDefinedEndpointBodyParam & RequestParameters;
95
+ export type GetRuntimeOptionsParameters = RequestParameters;
96
+ export interface UpdateRuntimeOptionsBodyParam {
97
+ /** JS runtime options */
98
+ body: JSRuntimeOptions;
99
+ }
100
+ export interface UpdateRuntimeOptionsMediaTypesParam {
101
+ /** Request content type */
102
+ contentType?: "application/json";
103
+ }
104
+ export type UpdateRuntimeOptionsParameters = UpdateRuntimeOptionsMediaTypesParam & UpdateRuntimeOptionsBodyParam & RequestParameters;
105
+ export interface GetUserDefinedEndpointsModuleQueryParamProperties {
106
+ /** module name of the user defined endpoint */
107
+ module_name: string;
108
+ }
109
+ export interface GetUserDefinedEndpointsModuleQueryParam {
110
+ queryParameters: GetUserDefinedEndpointsModuleQueryParamProperties;
111
+ }
112
+ export type GetUserDefinedEndpointsModuleParameters = GetUserDefinedEndpointsModuleQueryParam & RequestParameters;
113
+ export type ListUserDefinedFunctionsParameters = RequestParameters;
114
+ export type DeleteUserDefinedFunctionParameters = RequestParameters;
115
+ export type GetUserDefinedFunctionParameters = RequestParameters;
116
+ export interface CreateUserDefinedFunctionBodyParam {
117
+ /** Specify a user defined function of a Confidential Ledger. */
118
+ body: UserDefinedFunction;
119
+ }
120
+ export interface CreateUserDefinedFunctionMediaTypesParam {
121
+ /** Request content type */
122
+ contentType?: "application/json";
123
+ }
124
+ export type CreateUserDefinedFunctionParameters = CreateUserDefinedFunctionMediaTypesParam & CreateUserDefinedFunctionBodyParam & RequestParameters;
125
+ export interface ExecuteUserDefinedFunctionBodyParam {
126
+ /** Specify user defined function execution properties. */
127
+ body?: UserDefinedFunctionExecutionProperties;
128
+ }
129
+ export interface ExecuteUserDefinedFunctionMediaTypesParam {
130
+ /** Request content type */
131
+ contentType?: "application/json";
132
+ }
133
+ export type ExecuteUserDefinedFunctionParameters = ExecuteUserDefinedFunctionMediaTypesParam & ExecuteUserDefinedFunctionBodyParam & RequestParameters;
134
+ export interface GetUserDefinedRoleQueryParamProperties {
135
+ /** user defined role name */
136
+ roleName: string;
137
+ }
138
+ export interface GetUserDefinedRoleQueryParam {
139
+ queryParameters: GetUserDefinedRoleQueryParamProperties;
140
+ }
141
+ export type GetUserDefinedRoleParameters = GetUserDefinedRoleQueryParam & RequestParameters;
142
+ export interface CreateUserDefinedRoleBodyParam {
143
+ /** user defined role */
144
+ body: Array<Role>;
145
+ }
146
+ export interface CreateUserDefinedRoleMediaTypesParam {
147
+ /** Request content type */
148
+ contentType?: "application/json";
149
+ }
150
+ export type CreateUserDefinedRoleParameters = CreateUserDefinedRoleMediaTypesParam & CreateUserDefinedRoleBodyParam & RequestParameters;
151
+ export interface UpdateUserDefinedRoleBodyParam {
152
+ /** user defined role */
153
+ body: Array<Role>;
154
+ }
155
+ export interface UpdateUserDefinedRoleMediaTypesParam {
156
+ /** Request content type */
157
+ contentType?: "application/json";
158
+ }
159
+ export type UpdateUserDefinedRoleParameters = UpdateUserDefinedRoleMediaTypesParam & UpdateUserDefinedRoleBodyParam & RequestParameters;
160
+ export interface DeleteUserDefinedRoleQueryParamProperties {
161
+ /** user defined role name */
162
+ roleName: string;
163
+ }
164
+ export interface DeleteUserDefinedRoleQueryParam {
165
+ queryParameters: DeleteUserDefinedRoleQueryParamProperties;
166
+ }
167
+ export type DeleteUserDefinedRoleParameters = DeleteUserDefinedRoleQueryParam & RequestParameters;
78
168
  //# sourceMappingURL=parameters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEnE,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;AAC1D,MAAM,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;AAEnE,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,MA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4BAA4B,GAAG,iBAAiB,CAAC;AAE5F,MAAM,WAAW,8BAA8B;IAC7C,wBAAwB;IACxB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,oCAAoC;IACnD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,+BAA+B,GAAG,oCAAoC,GAChF,8BAA8B,GAC9B,iBAAiB,CAAC;AAEpB,MAAM,WAAW,8BAA8B;IAC7C,wBAAwB;IACxB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,MAAM,WAAW,oCAAoC;IACnD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,+BAA+B,GAAG,oCAAoC,GAChF,8BAA8B,GAC9B,iBAAiB,CAAC;AAEpB,MAAM,WAAW,yCAAyC;IACxD,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,+BAA+B;IAC9C,eAAe,EAAE,yCAAyC,CAAC;CAC5D;AAED,MAAM,MAAM,+BAA+B,GAAG,+BAA+B,GAAG,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { Bundle, LedgerEntry, LedgerUser } from \"./models.js\";\n\nexport type GetConstitutionParameters = RequestParameters;\nexport type ListConsortiumMembersParameters = RequestParameters;\nexport type GetEnclaveQuotesParameters = RequestParameters;\nexport type ListCollectionsParameters = RequestParameters;\nexport type ListUserDefinedFunctionsParameters = 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 & 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 & 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 & RequestParameters;\nexport type ListUsersParameters = RequestParameters;\nexport type DeleteUserParameters = RequestParameters;\nexport type GetUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user. */\nexport type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;\n\nexport interface CreateOrUpdateUserBodyParam {\n /** Details about a Confidential Ledger user. */\n body: LedgerUserResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam &\n CreateOrUpdateUserBodyParam &\n RequestParameters;\n\nexport type GetUserDefinedEndpointParameters = RequestParameters;\n\nexport interface CreateUserDefinedEndpointBodyParam {\n /** bundle parameter description */\n body: Bundle;\n}\n\nexport interface CreateUserDefinedEndpointMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedEndpointParameters = CreateUserDefinedEndpointMediaTypesParam &\n CreateUserDefinedEndpointBodyParam &\n RequestParameters;\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n LedgerEntry,\n LedgerUser,\n LedgerUserMultipleRoles,\n Bundle,\n JSRuntimeOptions,\n UserDefinedFunction,\n UserDefinedFunctionExecutionProperties,\n Role,\n} from \"./models.js\";\n\nexport type GetConstitutionParameters = RequestParameters;\nexport type ListConsortiumMembersParameters = RequestParameters;\nexport type GetEnclaveQuotesParameters = RequestParameters;\nexport type ListCollectionsParameters = RequestParameters;\n\nexport interface ListLedgerEntriesQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n /** Specify the first transaction ID in a range. */\n fromTransactionId?: string;\n /** Specify the last transaction ID in a range. */\n toTransactionId?: string;\n /** Single tag. */\n tag?: string;\n}\n\nexport interface ListLedgerEntriesQueryParam {\n queryParameters?: ListLedgerEntriesQueryParamProperties;\n}\n\nexport type ListLedgerEntriesParameters = ListLedgerEntriesQueryParam & RequestParameters;\n\nexport interface CreateLedgerEntryBodyParam {\n /** Ledger entry. */\n body: LedgerEntry;\n}\n\nexport interface CreateLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n /** Comma separated tags. */\n tags?: string;\n}\n\nexport interface CreateLedgerEntryQueryParam {\n queryParameters?: CreateLedgerEntryQueryParamProperties;\n}\n\nexport interface CreateLedgerEntryMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateLedgerEntryParameters = CreateLedgerEntryQueryParam &\n CreateLedgerEntryMediaTypesParam &\n CreateLedgerEntryBodyParam &\n RequestParameters;\n\nexport interface GetLedgerEntryQueryParamProperties {\n /** The collection id. */\n collectionId?: string;\n}\n\nexport interface GetLedgerEntryQueryParam {\n queryParameters?: GetLedgerEntryQueryParamProperties;\n}\n\nexport type GetLedgerEntryParameters = GetLedgerEntryQueryParam & 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 & RequestParameters;\nexport type ListUsersParameters = RequestParameters;\nexport type ListLedgerUsersParameters = RequestParameters;\nexport type DeleteUserParameters = RequestParameters;\nexport type GetUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user. */\nexport type LedgerUserResourceMergeAndPatch = Partial<LedgerUser>;\n\nexport interface CreateOrUpdateUserBodyParam {\n /** Details about a Confidential Ledger user. */\n body: LedgerUserResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateUserParameters = CreateOrUpdateUserMediaTypesParam &\n CreateOrUpdateUserBodyParam &\n RequestParameters;\nexport type DeleteLedgerUserParameters = RequestParameters;\nexport type GetLedgerUserParameters = RequestParameters;\n/** Details about a Confidential Ledger user with multiple roles. */\nexport type LedgerUserMultipleRolesResourceMergeAndPatch = Partial<LedgerUserMultipleRoles>;\n\nexport interface CreateOrUpdateLedgerUserBodyParam {\n /** Details about a Confidential Ledger user with multiple roles. */\n body: LedgerUserMultipleRolesResourceMergeAndPatch;\n}\n\nexport interface CreateOrUpdateLedgerUserMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type CreateOrUpdateLedgerUserParameters = CreateOrUpdateLedgerUserMediaTypesParam &\n CreateOrUpdateLedgerUserBodyParam &\n RequestParameters;\nexport type GetUserDefinedEndpointParameters = RequestParameters;\n\nexport interface CreateUserDefinedEndpointBodyParam {\n /** bundle parameter description */\n body: Bundle;\n}\n\nexport interface CreateUserDefinedEndpointMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedEndpointParameters = CreateUserDefinedEndpointMediaTypesParam &\n CreateUserDefinedEndpointBodyParam &\n RequestParameters;\nexport type GetRuntimeOptionsParameters = RequestParameters;\n\nexport interface UpdateRuntimeOptionsBodyParam {\n /** JS runtime options */\n body: JSRuntimeOptions;\n}\n\nexport interface UpdateRuntimeOptionsMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type UpdateRuntimeOptionsParameters = UpdateRuntimeOptionsMediaTypesParam &\n UpdateRuntimeOptionsBodyParam &\n RequestParameters;\n\nexport interface GetUserDefinedEndpointsModuleQueryParamProperties {\n /** module name of the user defined endpoint */\n module_name: string;\n}\n\nexport interface GetUserDefinedEndpointsModuleQueryParam {\n queryParameters: GetUserDefinedEndpointsModuleQueryParamProperties;\n}\n\nexport type GetUserDefinedEndpointsModuleParameters = GetUserDefinedEndpointsModuleQueryParam &\n RequestParameters;\nexport type ListUserDefinedFunctionsParameters = RequestParameters;\nexport type DeleteUserDefinedFunctionParameters = RequestParameters;\nexport type GetUserDefinedFunctionParameters = RequestParameters;\n\nexport interface CreateUserDefinedFunctionBodyParam {\n /** Specify a user defined function of a Confidential Ledger. */\n body: UserDefinedFunction;\n}\n\nexport interface CreateUserDefinedFunctionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedFunctionParameters = CreateUserDefinedFunctionMediaTypesParam &\n CreateUserDefinedFunctionBodyParam &\n RequestParameters;\n\nexport interface ExecuteUserDefinedFunctionBodyParam {\n /** Specify user defined function execution properties. */\n body?: UserDefinedFunctionExecutionProperties;\n}\n\nexport interface ExecuteUserDefinedFunctionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ExecuteUserDefinedFunctionParameters = ExecuteUserDefinedFunctionMediaTypesParam &\n ExecuteUserDefinedFunctionBodyParam &\n RequestParameters;\n\nexport interface GetUserDefinedRoleQueryParamProperties {\n /** user defined role name */\n roleName: string;\n}\n\nexport interface GetUserDefinedRoleQueryParam {\n queryParameters: GetUserDefinedRoleQueryParamProperties;\n}\n\nexport type GetUserDefinedRoleParameters = GetUserDefinedRoleQueryParam & RequestParameters;\n\nexport interface CreateUserDefinedRoleBodyParam {\n /** user defined role */\n body: Array<Role>;\n}\n\nexport interface CreateUserDefinedRoleMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CreateUserDefinedRoleParameters = CreateUserDefinedRoleMediaTypesParam &\n CreateUserDefinedRoleBodyParam &\n RequestParameters;\n\nexport interface UpdateUserDefinedRoleBodyParam {\n /** user defined role */\n body: Array<Role>;\n}\n\nexport interface UpdateUserDefinedRoleMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type UpdateUserDefinedRoleParameters = UpdateUserDefinedRoleMediaTypesParam &\n UpdateUserDefinedRoleBodyParam &\n RequestParameters;\n\nexport interface DeleteUserDefinedRoleQueryParamProperties {\n /** user defined role name */\n roleName: string;\n}\n\nexport interface DeleteUserDefinedRoleQueryParam {\n queryParameters: DeleteUserDefinedRoleQueryParamProperties;\n}\n\nexport type DeleteUserDefinedRoleParameters = DeleteUserDefinedRoleQueryParam & RequestParameters;\n"]}