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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/commonjs/clientDefinitions.d.ts +11 -3
  2. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  3. package/dist/commonjs/clientDefinitions.js.map +1 -1
  4. package/dist/commonjs/confidentialLedger.d.ts +3 -3
  5. package/dist/commonjs/confidentialLedger.d.ts.map +1 -1
  6. package/dist/commonjs/confidentialLedger.js.map +1 -1
  7. package/dist/commonjs/generated/clientDefinitions.d.ts +131 -0
  8. package/dist/commonjs/generated/clientDefinitions.d.ts.map +1 -0
  9. package/dist/commonjs/generated/clientDefinitions.js +5 -0
  10. package/dist/commonjs/generated/clientDefinitions.js.map +1 -0
  11. package/dist/commonjs/generated/confidentialLedger.d.ts +16 -0
  12. package/dist/commonjs/generated/confidentialLedger.d.ts.map +1 -0
  13. package/dist/commonjs/generated/confidentialLedger.js +48 -0
  14. package/dist/commonjs/generated/confidentialLedger.js.map +1 -0
  15. package/dist/commonjs/generated/index.d.ts +11 -0
  16. package/dist/commonjs/generated/index.d.ts.map +1 -0
  17. package/dist/commonjs/generated/index.js +16 -0
  18. package/dist/commonjs/generated/index.js.map +1 -0
  19. package/dist/commonjs/generated/isUnexpected.d.ts +29 -0
  20. package/dist/commonjs/generated/isUnexpected.d.ts.map +1 -0
  21. package/dist/commonjs/generated/isUnexpected.js +100 -0
  22. package/dist/commonjs/generated/isUnexpected.js.map +1 -0
  23. package/dist/commonjs/generated/logger.d.ts +2 -0
  24. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  25. package/dist/commonjs/generated/logger.js +8 -0
  26. package/dist/commonjs/generated/logger.js.map +1 -0
  27. package/dist/commonjs/generated/models.d.ts +62 -0
  28. package/dist/commonjs/generated/models.d.ts.map +1 -0
  29. package/dist/commonjs/generated/models.js +5 -0
  30. package/dist/commonjs/generated/models.js.map +1 -0
  31. package/dist/commonjs/generated/outputModels.d.ts +228 -0
  32. package/dist/commonjs/generated/outputModels.d.ts.map +1 -0
  33. package/dist/commonjs/generated/outputModels.js +5 -0
  34. package/dist/commonjs/generated/outputModels.js.map +1 -0
  35. package/dist/commonjs/generated/paginateHelper.d.ts +84 -0
  36. package/dist/commonjs/generated/paginateHelper.d.ts.map +1 -0
  37. package/dist/commonjs/generated/paginateHelper.js +222 -0
  38. package/dist/commonjs/generated/paginateHelper.js.map +1 -0
  39. package/dist/commonjs/generated/parameters.d.ts +143 -0
  40. package/dist/commonjs/generated/parameters.d.ts.map +1 -0
  41. package/dist/commonjs/generated/parameters.js +5 -0
  42. package/dist/commonjs/generated/parameters.js.map +1 -0
  43. package/dist/commonjs/generated/responses.d.ts +273 -0
  44. package/dist/commonjs/generated/responses.d.ts.map +1 -0
  45. package/dist/commonjs/generated/responses.js +5 -0
  46. package/dist/commonjs/generated/responses.js.map +1 -0
  47. package/dist/commonjs/isUnexpected.d.ts +1 -1
  48. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  49. package/dist/commonjs/isUnexpected.js.map +1 -1
  50. package/dist/commonjs/models.d.ts +31 -0
  51. package/dist/commonjs/models.d.ts.map +1 -1
  52. package/dist/commonjs/models.js.map +1 -1
  53. package/dist/commonjs/outputModels.d.ts +31 -0
  54. package/dist/commonjs/outputModels.d.ts.map +1 -1
  55. package/dist/commonjs/outputModels.js.map +1 -1
  56. package/dist/commonjs/paginateHelper.d.ts +1 -1
  57. package/dist/commonjs/paginateHelper.d.ts.map +1 -1
  58. package/dist/commonjs/paginateHelper.js.map +1 -1
  59. package/dist/commonjs/parameters.d.ts +12 -2
  60. package/dist/commonjs/parameters.d.ts.map +1 -1
  61. package/dist/commonjs/parameters.js.map +1 -1
  62. package/dist/commonjs/responses.d.ts +22 -3
  63. package/dist/commonjs/responses.d.ts.map +1 -1
  64. package/dist/commonjs/responses.js.map +1 -1
  65. package/dist/esm/clientDefinitions.d.ts +11 -3
  66. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  67. package/dist/esm/clientDefinitions.js.map +1 -1
  68. package/dist/esm/confidentialLedger.d.ts +3 -3
  69. package/dist/esm/confidentialLedger.d.ts.map +1 -1
  70. package/dist/esm/confidentialLedger.js.map +1 -1
  71. package/dist/esm/generated/clientDefinitions.d.ts +131 -0
  72. package/dist/esm/generated/clientDefinitions.d.ts.map +1 -0
  73. package/dist/esm/generated/clientDefinitions.js +4 -0
  74. package/dist/esm/generated/clientDefinitions.js.map +1 -0
  75. package/dist/esm/generated/confidentialLedger.d.ts +16 -0
  76. package/dist/esm/generated/confidentialLedger.d.ts.map +1 -0
  77. package/dist/esm/generated/confidentialLedger.js +45 -0
  78. package/dist/esm/generated/confidentialLedger.js.map +1 -0
  79. package/dist/esm/generated/index.d.ts +11 -0
  80. package/dist/esm/generated/index.d.ts.map +1 -0
  81. package/dist/esm/generated/index.js +13 -0
  82. package/dist/esm/generated/index.js.map +1 -0
  83. package/dist/esm/generated/isUnexpected.d.ts +29 -0
  84. package/dist/esm/generated/isUnexpected.d.ts.map +1 -0
  85. package/dist/esm/generated/isUnexpected.js +97 -0
  86. package/dist/esm/generated/isUnexpected.js.map +1 -0
  87. package/dist/esm/generated/logger.d.ts +2 -0
  88. package/dist/esm/generated/logger.d.ts.map +1 -0
  89. package/dist/esm/generated/logger.js +5 -0
  90. package/dist/esm/generated/logger.js.map +1 -0
  91. package/dist/esm/generated/models.d.ts +62 -0
  92. package/dist/esm/generated/models.d.ts.map +1 -0
  93. package/dist/esm/generated/models.js +4 -0
  94. package/dist/esm/generated/models.js.map +1 -0
  95. package/dist/esm/generated/outputModels.d.ts +228 -0
  96. package/dist/esm/generated/outputModels.d.ts.map +1 -0
  97. package/dist/esm/generated/outputModels.js +4 -0
  98. package/dist/esm/generated/outputModels.js.map +1 -0
  99. package/dist/esm/generated/paginateHelper.d.ts +84 -0
  100. package/dist/esm/generated/paginateHelper.d.ts.map +1 -0
  101. package/dist/esm/generated/paginateHelper.js +219 -0
  102. package/dist/esm/generated/paginateHelper.js.map +1 -0
  103. package/dist/esm/generated/parameters.d.ts +143 -0
  104. package/dist/esm/generated/parameters.d.ts.map +1 -0
  105. package/dist/esm/generated/parameters.js +4 -0
  106. package/dist/esm/generated/parameters.js.map +1 -0
  107. package/dist/esm/generated/responses.d.ts +273 -0
  108. package/dist/esm/generated/responses.d.ts.map +1 -0
  109. package/dist/esm/generated/responses.js +4 -0
  110. package/dist/esm/generated/responses.js.map +1 -0
  111. package/dist/esm/isUnexpected.d.ts +1 -1
  112. package/dist/esm/isUnexpected.d.ts.map +1 -1
  113. package/dist/esm/isUnexpected.js.map +1 -1
  114. package/dist/esm/models.d.ts +31 -0
  115. package/dist/esm/models.d.ts.map +1 -1
  116. package/dist/esm/models.js.map +1 -1
  117. package/dist/esm/outputModels.d.ts +31 -0
  118. package/dist/esm/outputModels.d.ts.map +1 -1
  119. package/dist/esm/outputModels.js.map +1 -1
  120. package/dist/esm/paginateHelper.d.ts +1 -1
  121. package/dist/esm/paginateHelper.d.ts.map +1 -1
  122. package/dist/esm/paginateHelper.js.map +1 -1
  123. package/dist/esm/parameters.d.ts +12 -2
  124. package/dist/esm/parameters.d.ts.map +1 -1
  125. package/dist/esm/parameters.js.map +1 -1
  126. package/dist/esm/responses.d.ts +22 -3
  127. package/dist/esm/responses.d.ts.map +1 -1
  128. package/dist/esm/responses.js.map +1 -1
  129. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { __rest } from "tslib";
4
+ import { getClient } from "@azure-rest/core-client";
5
+ import { logger } from "../logger.js";
6
+ /**
7
+ * Initialize a new instance of `ConfidentialLedgerClient`
8
+ * @param endpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
9
+ * @param credentials - uniquely identify client credential
10
+ * @param options - the parameter for all optional parameters
11
+ */
12
+ export default function createClient(endpoint, credentials, _a = {}) {
13
+ var _b, _c, _d, _e, _f, _g;
14
+ var { apiVersion = "2024-08-22-preview" } = _a, options = __rest(_a, ["apiVersion"]);
15
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpoint}`;
16
+ const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.1.0-beta.1`;
17
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
18
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
19
+ : `${userAgentInfo}`;
20
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
21
+ userAgentPrefix,
22
+ }, loggingOptions: {
23
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info,
24
+ }, credentials: {
25
+ scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [
26
+ "https://confidential-ledger.azure.com/.default",
27
+ ],
28
+ } });
29
+ const client = getClient(endpointUrl, credentials, options);
30
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
31
+ client.pipeline.addPolicy({
32
+ name: "ClientApiVersionPolicy",
33
+ sendRequest: (req, next) => {
34
+ // Use the apiVersion defined in request url directly
35
+ // Append one if there is no apiVersion and we have one at client options
36
+ const url = new URL(req.url);
37
+ if (!url.searchParams.get("api-version") && apiVersion) {
38
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
39
+ }
40
+ return next(req);
41
+ },
42
+ });
43
+ return client;
44
+ }
45
+ //# sourceMappingURL=confidentialLedger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confidentialLedger.js","sourceRoot":"","sources":["../../../src/generated/confidentialLedger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,y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AC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { ConfidentialLedgerClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface ConfidentialLedgerClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `ConfidentialLedgerClient`\n * @param endpoint - The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential,\n {\n apiVersion = \"2024-08-22-preview\",\n ...options\n }: ConfidentialLedgerClientOptions = {},\n): ConfidentialLedgerClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`;\n const userAgentInfo = `azsdk-js-confidential-ledger-rest/1.1.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://confidential-ledger.azure.com/.default\",\n ],\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as ConfidentialLedgerClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -0,0 +1,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/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/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,29 @@
1
+ import type { GetConstitution200Response, GetConstitutionDefaultResponse, ListConsortiumMembers200Response, ListConsortiumMembersDefaultResponse, GetEnclaveQuotes200Response, GetEnclaveQuotesDefaultResponse, ListCollections200Response, ListCollectionsDefaultResponse, ListLedgerEntries200Response, ListLedgerEntriesDefaultResponse, CreateLedgerEntry200Response, CreateLedgerEntryDefaultResponse, GetLedgerEntry200Response, GetLedgerEntryDefaultResponse, GetReceipt200Response, GetReceiptDefaultResponse, GetTransactionStatus200Response, GetTransactionStatusDefaultResponse, GetCurrentLedgerEntry200Response, GetCurrentLedgerEntryDefaultResponse, ListUsers200Response, ListUsersDefaultResponse, ListLedgerUsers200Response, ListLedgerUsersDefaultResponse, DeleteUser204Response, DeleteUserDefaultResponse, GetUser200Response, GetUserDefaultResponse, CreateOrUpdateUser200Response, CreateOrUpdateUserDefaultResponse, DeleteLedgerUser204Response, DeleteLedgerUserDefaultResponse, GetLedgerUser200Response, GetLedgerUserDefaultResponse, CreateOrUpdateLedgerUser200Response, CreateOrUpdateLedgerUserDefaultResponse, GetUserDefinedEndpoint200Response, GetUserDefinedEndpointDefaultResponse, CreateUserDefinedEndpoint201Response, CreateUserDefinedEndpointDefaultResponse, GetRuntimeOptions200Response, GetRuntimeOptionsDefaultResponse, UpdateRuntimeOptions200Response, UpdateRuntimeOptionsDefaultResponse, GetUserDefinedEndpointsModule200Response, GetUserDefinedEndpointsModuleDefaultResponse, GetUserDefinedRole200Response, GetUserDefinedRoleDefaultResponse, CreateUserDefinedRole200Response, CreateUserDefinedRoleDefaultResponse, UpdateUserDefinedRole200Response, UpdateUserDefinedRoleDefaultResponse, DeleteUserDefinedRole200Response, DeleteUserDefinedRoleDefaultResponse } 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: ListUsers200Response | ListUsersDefaultResponse): response is ListUsersDefaultResponse;
13
+ export declare function isUnexpected(response: ListLedgerUsers200Response | ListLedgerUsersDefaultResponse): response is ListLedgerUsersDefaultResponse;
14
+ export declare function isUnexpected(response: DeleteUser204Response | DeleteUserDefaultResponse): response is DeleteUserDefaultResponse;
15
+ export declare function isUnexpected(response: GetUser200Response | GetUserDefaultResponse): response is GetUserDefaultResponse;
16
+ export declare function isUnexpected(response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse): response is CreateOrUpdateUserDefaultResponse;
17
+ export declare function isUnexpected(response: DeleteLedgerUser204Response | DeleteLedgerUserDefaultResponse): response is DeleteLedgerUserDefaultResponse;
18
+ export declare function isUnexpected(response: GetLedgerUser200Response | GetLedgerUserDefaultResponse): response is GetLedgerUserDefaultResponse;
19
+ export declare function isUnexpected(response: CreateOrUpdateLedgerUser200Response | CreateOrUpdateLedgerUserDefaultResponse): response is CreateOrUpdateLedgerUserDefaultResponse;
20
+ export declare function isUnexpected(response: GetUserDefinedEndpoint200Response | GetUserDefinedEndpointDefaultResponse): response is GetUserDefinedEndpointDefaultResponse;
21
+ export declare function isUnexpected(response: CreateUserDefinedEndpoint201Response | CreateUserDefinedEndpointDefaultResponse): response is CreateUserDefinedEndpointDefaultResponse;
22
+ export declare function isUnexpected(response: GetRuntimeOptions200Response | GetRuntimeOptionsDefaultResponse): response is GetRuntimeOptionsDefaultResponse;
23
+ export declare function isUnexpected(response: UpdateRuntimeOptions200Response | UpdateRuntimeOptionsDefaultResponse): response is UpdateRuntimeOptionsDefaultResponse;
24
+ export declare function isUnexpected(response: GetUserDefinedEndpointsModule200Response | GetUserDefinedEndpointsModuleDefaultResponse): response is GetUserDefinedEndpointsModuleDefaultResponse;
25
+ export declare function isUnexpected(response: GetUserDefinedRole200Response | GetUserDefinedRoleDefaultResponse): response is GetUserDefinedRoleDefaultResponse;
26
+ export declare function isUnexpected(response: CreateUserDefinedRole200Response | CreateUserDefinedRoleDefaultResponse): response is CreateUserDefinedRoleDefaultResponse;
27
+ export declare function isUnexpected(response: UpdateUserDefinedRole200Response | UpdateUserDefinedRoleDefaultResponse): response is UpdateUserDefinedRoleDefaultResponse;
28
+ export declare function isUnexpected(response: DeleteUserDefinedRole200Response | DeleteUserDefinedRoleDefaultResponse): response is DeleteUserDefinedRoleDefaultResponse;
29
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,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,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,6BAA6B,EAC7B,iCAAiC,EACjC,2BAA2B,EAC3B,+BAA+B,EAC/B,wBAA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AmC,GACtC,QAAQ,IAAI,mCAAmC,CAAC;AACnD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,wCAAwC,GACxC,4CAA4C,GAC/C,QAAQ,IAAI,4CAA4C,CAAC;AAC5D,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC;AACjD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,gCAAgC,GAChC,oCAAoC,GACvC,QAAQ,IAAI,oCAAoC,CAAC;AACpD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,gCAAgC,GAChC,oCAAoC,GACvC,QAAQ,IAAI,oCAAoC,CAAC;AACpD,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,gCAAgC,GAChC,oCAAoC,GACvC,QAAQ,IAAI,oCAAoC,CAAC"}
@@ -0,0 +1,97 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ const responseMap = {
4
+ "GET /app/governance/constitution": ["200"],
5
+ "GET /app/governance/members": ["200"],
6
+ "GET /app/enclaveQuotes": ["200"],
7
+ "GET /app/collections": ["200"],
8
+ "GET /app/transactions": ["200"],
9
+ "POST /app/transactions": ["200"],
10
+ "GET /app/transactions/{transactionId}": ["200"],
11
+ "GET /app/transactions/{transactionId}/receipt": ["200"],
12
+ "GET /app/transactions/{transactionId}/status": ["200"],
13
+ "GET /app/transactions/current": ["200"],
14
+ "GET /app/users": ["200"],
15
+ "GET /app/ledgerUsers": ["200"],
16
+ "DELETE /app/users/{userId}": ["204"],
17
+ "GET /app/users/{userId}": ["200"],
18
+ "PATCH /app/users/{userId}": ["200"],
19
+ "DELETE /app/ledgerUsers/{userId}": ["204"],
20
+ "GET /app/ledgerUsers/{userId}": ["200"],
21
+ "PATCH /app/ledgerUsers/{userId}": ["200"],
22
+ "GET /app/userDefinedEndpoints": ["200"],
23
+ "PUT /app/userDefinedEndpoints": ["201"],
24
+ "GET /app/userDefinedEndpoints/runTimeOptions": ["200"],
25
+ "PATCH /app/userDefinedEndpoints/runTimeOptions": ["200"],
26
+ "GET /app/userDefinedEndpoints/modules": ["200"],
27
+ "GET /app/roles": ["200"],
28
+ "PUT /app/roles": ["200"],
29
+ "PATCH /app/roles": ["200"],
30
+ "DELETE /app/roles": ["200"],
31
+ };
32
+ export function isUnexpected(response) {
33
+ const lroOriginal = response.headers["x-ms-original-url"];
34
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
35
+ const method = response.request.method;
36
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
37
+ if (!pathDetails) {
38
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
39
+ }
40
+ return !pathDetails.includes(response.status);
41
+ }
42
+ function getParametrizedPathSuccess(method, path) {
43
+ var _a, _b, _c, _d;
44
+ const pathParts = path.split("/");
45
+ // Traverse list to match the longest candidate
46
+ // matchedLen: the length of candidate path
47
+ // matchedValue: the matched status code array
48
+ let matchedLen = -1, matchedValue = [];
49
+ // Iterate the responseMap to find a match
50
+ for (const [key, value] of Object.entries(responseMap)) {
51
+ // Extracting the path from the map key which is in format
52
+ // GET /path/foo
53
+ if (!key.startsWith(method)) {
54
+ continue;
55
+ }
56
+ const candidatePath = getPathFromMapKey(key);
57
+ // Get each part of the url path
58
+ const candidateParts = candidatePath.split("/");
59
+ // track if we have found a match to return the values found.
60
+ let found = true;
61
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
62
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
63
+ ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
64
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
65
+ // If the current part of the candidate is a "template" part
66
+ // Try to use the suffix of pattern to match the path
67
+ // {guid} ==> $
68
+ // {guid}:export ==> :export$
69
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
70
+ if (!isMatched) {
71
+ found = false;
72
+ break;
73
+ }
74
+ continue;
75
+ }
76
+ // If the candidate part is not a template and
77
+ // the parts don't match mark the candidate as not found
78
+ // to move on with the next candidate path.
79
+ if (candidateParts[i] !== pathParts[j]) {
80
+ found = false;
81
+ break;
82
+ }
83
+ }
84
+ // We finished evaluating the current candidate parts
85
+ // Update the matched value if and only if we found the longer pattern
86
+ if (found && candidatePath.length > matchedLen) {
87
+ matchedLen = candidatePath.length;
88
+ matchedValue = value;
89
+ }
90
+ }
91
+ return matchedValue;
92
+ }
93
+ function getPathFromMapKey(mapKey) {
94
+ const pathStart = mapKey.indexOf("/");
95
+ return mapKey.slice(pathStart);
96
+ }
97
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/generated/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA2DlC,MAAM,WAAW,GAA6B;IAC5C,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,6BAA6B,EAAE,CAAC,KAAK,CAAC;IACtC,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,uBAAuB,EAAE,CAAC,KAAK,CAAC;IAChC,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,uCAAuC,EAAE,CAAC,KAAK,CAAC;IAChD,+CAA+C,EAAE,CAAC,KAAK,CAAC;IACxD,8CAA8C,EAAE,CAAC,KAAK,CAAC;IACvD,+BAA+B,EAAE,CAAC,KAAK,CAAC;IACxC,gBAAgB,EAAE,CAAC,KAAK,CAAC;IACzB,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,yBAAyB,EAAE,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AAC,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 type {\n GetConstitution200Response,\n GetConstitutionDefaultResponse,\n ListConsortiumMembers200Response,\n ListConsortiumMembersDefaultResponse,\n GetEnclaveQuotes200Response,\n GetEnclaveQuotesDefaultResponse,\n ListCollections200Response,\n ListCollectionsDefaultResponse,\n ListLedgerEntries200Response,\n ListLedgerEntriesDefaultResponse,\n CreateLedgerEntry200Response,\n CreateLedgerEntryDefaultResponse,\n GetLedgerEntry200Response,\n GetLedgerEntryDefaultResponse,\n GetReceipt200Response,\n GetReceiptDefaultResponse,\n GetTransactionStatus200Response,\n GetTransactionStatusDefaultResponse,\n GetCurrentLedgerEntry200Response,\n GetCurrentLedgerEntryDefaultResponse,\n ListUsers200Response,\n ListUsersDefaultResponse,\n ListLedgerUsers200Response,\n ListLedgerUsersDefaultResponse,\n DeleteUser204Response,\n DeleteUserDefaultResponse,\n GetUser200Response,\n GetUserDefaultResponse,\n CreateOrUpdateUser200Response,\n CreateOrUpdateUserDefaultResponse,\n DeleteLedgerUser204Response,\n DeleteLedgerUserDefaultResponse,\n GetLedgerUser200Response,\n GetLedgerUserDefaultResponse,\n CreateOrUpdateLedgerUser200Response,\n CreateOrUpdateLedgerUserDefaultResponse,\n GetUserDefinedEndpoint200Response,\n GetUserDefinedEndpointDefaultResponse,\n CreateUserDefinedEndpoint201Response,\n CreateUserDefinedEndpointDefaultResponse,\n GetRuntimeOptions200Response,\n GetRuntimeOptionsDefaultResponse,\n UpdateRuntimeOptions200Response,\n UpdateRuntimeOptionsDefaultResponse,\n GetUserDefinedEndpointsModule200Response,\n GetUserDefinedEndpointsModuleDefaultResponse,\n GetUserDefinedRole200Response,\n GetUserDefinedRoleDefaultResponse,\n CreateUserDefinedRole200Response,\n CreateUserDefinedRoleDefaultResponse,\n UpdateUserDefinedRole200Response,\n UpdateUserDefinedRoleDefaultResponse,\n DeleteUserDefinedRole200Response,\n DeleteUserDefinedRoleDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /app/governance/constitution\": [\"200\"],\n \"GET /app/governance/members\": [\"200\"],\n \"GET /app/enclaveQuotes\": [\"200\"],\n \"GET /app/collections\": [\"200\"],\n \"GET /app/transactions\": [\"200\"],\n \"POST /app/transactions\": [\"200\"],\n \"GET /app/transactions/{transactionId}\": [\"200\"],\n \"GET /app/transactions/{transactionId}/receipt\": [\"200\"],\n \"GET /app/transactions/{transactionId}/status\": [\"200\"],\n \"GET /app/transactions/current\": [\"200\"],\n \"GET /app/users\": [\"200\"],\n \"GET /app/ledgerUsers\": [\"200\"],\n \"DELETE /app/users/{userId}\": [\"204\"],\n \"GET /app/users/{userId}\": [\"200\"],\n \"PATCH /app/users/{userId}\": [\"200\"],\n \"DELETE /app/ledgerUsers/{userId}\": [\"204\"],\n \"GET /app/ledgerUsers/{userId}\": [\"200\"],\n \"PATCH /app/ledgerUsers/{userId}\": [\"200\"],\n \"GET /app/userDefinedEndpoints\": [\"200\"],\n \"PUT /app/userDefinedEndpoints\": [\"201\"],\n \"GET /app/userDefinedEndpoints/runTimeOptions\": [\"200\"],\n \"PATCH /app/userDefinedEndpoints/runTimeOptions\": [\"200\"],\n \"GET /app/userDefinedEndpoints/modules\": [\"200\"],\n \"GET /app/roles\": [\"200\"],\n \"PUT /app/roles\": [\"200\"],\n \"PATCH /app/roles\": [\"200\"],\n \"DELETE /app/roles\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetConstitution200Response | GetConstitutionDefaultResponse,\n): response is GetConstitutionDefaultResponse;\nexport function isUnexpected(\n response:\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse,\n): response is ListConsortiumMembersDefaultResponse;\nexport function isUnexpected(\n response: GetEnclaveQuotes200Response | GetEnclaveQuotesDefaultResponse,\n): response is GetEnclaveQuotesDefaultResponse;\nexport function isUnexpected(\n response: ListCollections200Response | ListCollectionsDefaultResponse,\n): response is ListCollectionsDefaultResponse;\nexport function isUnexpected(\n response: ListLedgerEntries200Response | ListLedgerEntriesDefaultResponse,\n): response is ListLedgerEntriesDefaultResponse;\nexport function isUnexpected(\n response: CreateLedgerEntry200Response | CreateLedgerEntryDefaultResponse,\n): response is CreateLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetLedgerEntry200Response | GetLedgerEntryDefaultResponse,\n): response is GetLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: GetReceipt200Response | GetReceiptDefaultResponse,\n): response is GetReceiptDefaultResponse;\nexport function isUnexpected(\n response:\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse,\n): response is GetTransactionStatusDefaultResponse;\nexport function isUnexpected(\n response:\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse,\n): response is GetCurrentLedgerEntryDefaultResponse;\nexport function isUnexpected(\n response: ListUsers200Response | ListUsersDefaultResponse,\n): response is ListUsersDefaultResponse;\nexport function isUnexpected(\n response: ListLedgerUsers200Response | ListLedgerUsersDefaultResponse,\n): response is ListLedgerUsersDefaultResponse;\nexport function isUnexpected(\n response: DeleteUser204Response | DeleteUserDefaultResponse,\n): response is DeleteUserDefaultResponse;\nexport function isUnexpected(\n response: GetUser200Response | GetUserDefaultResponse,\n): response is GetUserDefaultResponse;\nexport function isUnexpected(\n response: CreateOrUpdateUser200Response | CreateOrUpdateUserDefaultResponse,\n): response is CreateOrUpdateUserDefaultResponse;\nexport function isUnexpected(\n response: DeleteLedgerUser204Response | DeleteLedgerUserDefaultResponse,\n): response is DeleteLedgerUserDefaultResponse;\nexport function isUnexpected(\n response: GetLedgerUser200Response | GetLedgerUserDefaultResponse,\n): response is GetLedgerUserDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateOrUpdateLedgerUser200Response\n | CreateOrUpdateLedgerUserDefaultResponse,\n): response is CreateOrUpdateLedgerUserDefaultResponse;\nexport function isUnexpected(\n response:\n | GetUserDefinedEndpoint200Response\n | GetUserDefinedEndpointDefaultResponse,\n): response is GetUserDefinedEndpointDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateUserDefinedEndpoint201Response\n | CreateUserDefinedEndpointDefaultResponse,\n): response is CreateUserDefinedEndpointDefaultResponse;\nexport function isUnexpected(\n response: GetRuntimeOptions200Response | GetRuntimeOptionsDefaultResponse,\n): response is GetRuntimeOptionsDefaultResponse;\nexport function isUnexpected(\n response:\n | UpdateRuntimeOptions200Response\n | UpdateRuntimeOptionsDefaultResponse,\n): response is UpdateRuntimeOptionsDefaultResponse;\nexport function isUnexpected(\n response:\n | GetUserDefinedEndpointsModule200Response\n | GetUserDefinedEndpointsModuleDefaultResponse,\n): response is GetUserDefinedEndpointsModuleDefaultResponse;\nexport function isUnexpected(\n response: GetUserDefinedRole200Response | GetUserDefinedRoleDefaultResponse,\n): response is GetUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | CreateUserDefinedRole200Response\n | CreateUserDefinedRoleDefaultResponse,\n): response is CreateUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | UpdateUserDefinedRole200Response\n | UpdateUserDefinedRoleDefaultResponse,\n): response is UpdateUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | DeleteUserDefinedRole200Response\n | DeleteUserDefinedRoleDefaultResponse,\n): response is DeleteUserDefinedRoleDefaultResponse;\nexport function isUnexpected(\n response:\n | GetConstitution200Response\n | GetConstitutionDefaultResponse\n | ListConsortiumMembers200Response\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotes200Response\n | GetEnclaveQuotesDefaultResponse\n | ListCollections200Response\n | ListCollectionsDefaultResponse\n | ListLedgerEntries200Response\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntry200Response\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntry200Response\n | GetLedgerEntryDefaultResponse\n | GetReceipt200Response\n | GetReceiptDefaultResponse\n | GetTransactionStatus200Response\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntry200Response\n | GetCurrentLedgerEntryDefaultResponse\n | ListUsers200Response\n | ListUsersDefaultResponse\n | ListLedgerUsers200Response\n | ListLedgerUsersDefaultResponse\n | DeleteUser204Response\n | DeleteUserDefaultResponse\n | GetUser200Response\n | GetUserDefaultResponse\n | CreateOrUpdateUser200Response\n | CreateOrUpdateUserDefaultResponse\n | DeleteLedgerUser204Response\n | DeleteLedgerUserDefaultResponse\n | GetLedgerUser200Response\n | GetLedgerUserDefaultResponse\n | CreateOrUpdateLedgerUser200Response\n | CreateOrUpdateLedgerUserDefaultResponse\n | GetUserDefinedEndpoint200Response\n | GetUserDefinedEndpointDefaultResponse\n | CreateUserDefinedEndpoint201Response\n | CreateUserDefinedEndpointDefaultResponse\n | GetRuntimeOptions200Response\n | GetRuntimeOptionsDefaultResponse\n | UpdateRuntimeOptions200Response\n | UpdateRuntimeOptionsDefaultResponse\n | GetUserDefinedEndpointsModule200Response\n | GetUserDefinedEndpointsModuleDefaultResponse\n | GetUserDefinedRole200Response\n | GetUserDefinedRoleDefaultResponse\n | CreateUserDefinedRole200Response\n | CreateUserDefinedRoleDefaultResponse\n | UpdateUserDefinedRole200Response\n | UpdateUserDefinedRoleDefaultResponse\n | DeleteUserDefinedRole200Response\n | DeleteUserDefinedRoleDefaultResponse,\n): response is\n | GetConstitutionDefaultResponse\n | ListConsortiumMembersDefaultResponse\n | GetEnclaveQuotesDefaultResponse\n | ListCollectionsDefaultResponse\n | ListLedgerEntriesDefaultResponse\n | CreateLedgerEntryDefaultResponse\n | GetLedgerEntryDefaultResponse\n | GetReceiptDefaultResponse\n | GetTransactionStatusDefaultResponse\n | GetCurrentLedgerEntryDefaultResponse\n | ListUsersDefaultResponse\n | ListLedgerUsersDefaultResponse\n | DeleteUserDefaultResponse\n | GetUserDefaultResponse\n | CreateOrUpdateUserDefaultResponse\n | DeleteLedgerUserDefaultResponse\n | GetLedgerUserDefaultResponse\n | CreateOrUpdateLedgerUserDefaultResponse\n | GetUserDefinedEndpointDefaultResponse\n | CreateUserDefinedEndpointDefaultResponse\n | GetRuntimeOptionsDefaultResponse\n | UpdateRuntimeOptionsDefaultResponse\n | GetUserDefinedEndpointsModuleDefaultResponse\n | GetUserDefinedRoleDefaultResponse\n | CreateUserDefinedRoleDefaultResponse\n | UpdateUserDefinedRoleDefaultResponse\n | DeleteUserDefinedRoleDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA4C,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("confidential-ledger");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/generated/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,qBAAqB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"confidential-ledger\");\n"]}
@@ -0,0 +1,62 @@
1
+ /** An entry in the ledger. */
2
+ export interface LedgerEntry {
3
+ /** Contents of the ledger entry. */
4
+ contents: string;
5
+ }
6
+ /** Details about a Confidential Ledger user. */
7
+ export interface LedgerUser {
8
+ /** Represents an assignable role. */
9
+ assignedRole: "Administrator" | "Contributor" | "Reader";
10
+ }
11
+ /** Details about a Confidential Ledger user. */
12
+ export interface LedgerUserMultipleRoles {
13
+ /** Represents an assignable role. */
14
+ assignedRoles: Array<"Administrator" | "Contributor" | "Reader">;
15
+ }
16
+ /** bundle for the user defined endpoints */
17
+ export interface Bundle {
18
+ metadata: Metadata;
19
+ /** Any object */
20
+ modules: Record<string, unknown>;
21
+ }
22
+ export interface Metadata {
23
+ /** A map of path to method endpoints for the path */
24
+ endpoints: Record<string, MethodToEndpointProperties>;
25
+ }
26
+ export interface MethodToEndpointProperties {
27
+ get?: EndpointProperties;
28
+ put?: EndpointProperties;
29
+ patch?: EndpointProperties;
30
+ delete?: EndpointProperties;
31
+ }
32
+ export interface EndpointProperties {
33
+ authn_policies: Array<any>;
34
+ forwarding_required: "sometimes" | "always" | "never";
35
+ interpreter_reuse?: InterpreterReusePolicy;
36
+ js_function?: string;
37
+ js_module?: string;
38
+ mode?: "readwrite" | "readonly" | "historical";
39
+ /** Anything */
40
+ openapi?: any;
41
+ openapi_hidden?: boolean;
42
+ redirection_strategy?: "none" | "to_primary" | "to_backup";
43
+ }
44
+ export interface InterpreterReusePolicy {
45
+ key: string;
46
+ }
47
+ /** JS runtime options for user defined endpoints */
48
+ export interface JSRuntimeOptions {
49
+ log_exception_details?: boolean;
50
+ max_cached_interpreters?: number;
51
+ max_execution_time_ms?: number;
52
+ max_heap_bytes?: number;
53
+ max_stack_bytes?: number;
54
+ return_exception_details?: boolean;
55
+ }
56
+ /** Definition for roles */
57
+ export interface Role {
58
+ /** name of the user defined role */
59
+ roleName?: string;
60
+ roleActions?: Array<string>;
61
+ }
62
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAGA,8BAA8B;AAC9B,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,gDAAgD;AAChD,MAAM,WAAW,UAAU;IACzB,qCAAqC;IACrC,YAAY,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,CAAC;CAC1D;AAED,gDAAgD;AAChD,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,aAAa,EAAE,KAAK,CAAC,eAAe,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAC;CAClE;AAED,4CAA4C;AAC5C,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iBAAiB;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,QAAQ;IACvB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,0BAA0B;IACzC,G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3,"file":"models.js","sourceRoot":"","sources":["../../../src/generated/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** An entry in the ledger. */\nexport interface LedgerEntry {\n /** Contents of the ledger entry. */\n contents: string;\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUser {\n /** Represents an assignable role. */\n assignedRole: \"Administrator\" | \"Contributor\" | \"Reader\";\n}\n\n/** Details about a Confidential Ledger user. */\nexport interface LedgerUserMultipleRoles {\n /** Represents an assignable role. */\n assignedRoles: Array<\"Administrator\" | \"Contributor\" | \"Reader\">;\n}\n\n/** bundle for the user defined endpoints */\nexport interface Bundle {\n metadata: Metadata;\n /** Any object */\n modules: Record<string, unknown>;\n}\n\nexport interface Metadata {\n /** A map of path to method endpoints for the path */\n endpoints: Record<string, MethodToEndpointProperties>;\n}\n\nexport interface MethodToEndpointProperties {\n get?: EndpointProperties;\n put?: EndpointProperties;\n patch?: EndpointProperties;\n delete?: EndpointProperties;\n}\n\nexport interface EndpointProperties {\n authn_policies: Array<any>;\n forwarding_required: \"sometimes\" | \"always\" | \"never\";\n interpreter_reuse?: InterpreterReusePolicy;\n js_function?: string;\n js_module?: string;\n mode?: \"readwrite\" | \"readonly\" | \"historical\";\n /** Anything */\n openapi?: any;\n openapi_hidden?: boolean;\n redirection_strategy?: \"none\" | \"to_primary\" | \"to_backup\";\n}\n\nexport interface InterpreterReusePolicy {\n key: string;\n}\n\n/** JS runtime options for user defined endpoints */\nexport interface JSRuntimeOptions {\n log_exception_details?: boolean;\n max_cached_interpreters?: number;\n max_execution_time_ms?: number;\n max_heap_bytes?: number;\n max_stack_bytes?: number;\n return_exception_details?: boolean;\n}\n\n/** Definition for roles */\nexport interface Role {\n /** name of the user defined role */\n roleName?: string;\n roleActions?: Array<string>;\n}\n"]}
@@ -0,0 +1,228 @@
1
+ /** The governance script for the application. */
2
+ export interface ConstitutionOutput {
3
+ /** SHA256 digest of the constitution script. */
4
+ digest: string;
5
+ /** Contents of the constitution. */
6
+ script: string;
7
+ }
8
+ /** An error response from Confidential Ledger. */
9
+ export interface ConfidentialLedgerErrorOutput {
10
+ /** An error response from Confidential Ledger. */
11
+ readonly error?: ConfidentialLedgerErrorBodyOutput;
12
+ }
13
+ /** An error response from Confidential Ledger. */
14
+ export interface ConfidentialLedgerErrorBodyOutput {
15
+ /** The error code. */
16
+ readonly code?: string;
17
+ /** The error message. */
18
+ readonly message?: string;
19
+ }
20
+ /** List of members in the consortium. */
21
+ export interface ConsortiumOutput {
22
+ members: Array<ConsortiumMemberOutput>;
23
+ /** Path from which to retrieve the next page of results. */
24
+ nextLink?: string;
25
+ }
26
+ /** Describes a member of the consortium. */
27
+ export interface ConsortiumMemberOutput {
28
+ /** PEM-encoded certificate associated with the member. */
29
+ certificate: string;
30
+ /** Identifier assigned to the member. */
31
+ id: string;
32
+ }
33
+ /** Information about the enclaves running the Confidential Ledger. */
34
+ export interface ConfidentialLedgerEnclavesOutput {
35
+ /** Id of the Confidential Ledger node responding to the request. */
36
+ currentNodeId: string;
37
+ /** Dictionary of enclave quotes, indexed by node id. */
38
+ enclaveQuotes: Record<string, EnclaveQuoteOutput>;
39
+ }
40
+ /** Contains the enclave quote. */
41
+ export interface EnclaveQuoteOutput {
42
+ /** ID assigned to this node. */
43
+ nodeId: string;
44
+ /** MRENCLAVE value of the code running in the enclave. */
45
+ mrenclave?: string;
46
+ /** Version of the quote presented. */
47
+ quoteVersion: string;
48
+ /** Raw SGX quote, parsable by tools like Open Enclave's oeverify. */
49
+ raw: string;
50
+ }
51
+ /** Paginated collections returned in response to a query. */
52
+ export interface PagedCollectionsOutput {
53
+ collections: Array<CollectionOutput>;
54
+ /** Path from which to retrieve the next page of results. */
55
+ nextLink?: string;
56
+ }
57
+ /** Identifier for collections. */
58
+ export interface CollectionOutput {
59
+ collectionId: string;
60
+ }
61
+ /** Paginated ledger entries returned in response to a query. */
62
+ export interface PagedLedgerEntriesOutput {
63
+ /** State of a ledger query. */
64
+ state: "Loading" | "Ready";
65
+ /** Path from which to retrieve the next page of results. */
66
+ nextLink?: string;
67
+ /** Array of ledger entries. */
68
+ entries: Array<LedgerEntryOutput>;
69
+ }
70
+ /** An entry in the ledger. */
71
+ export interface LedgerEntryOutput {
72
+ /** Contents of the ledger entry. */
73
+ contents: string;
74
+ readonly collectionId?: string;
75
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
76
+ readonly transactionId?: string;
77
+ }
78
+ /** Returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates when the write will become durable. */
79
+ export interface LedgerWriteResultOutput {
80
+ collectionId: string;
81
+ }
82
+ /** The result of querying for a ledger entry from an older transaction id. The ledger entry is available in the response only if the returned state is Ready. */
83
+ export interface LedgerQueryResultOutput {
84
+ /** State of a ledger query. */
85
+ state: "Loading" | "Ready";
86
+ /** The ledger entry found as a result of the query. This is only available if the query is in Ready state. */
87
+ entry?: LedgerEntryOutput;
88
+ }
89
+ /** A receipt certifying the transaction at the specified id. */
90
+ export interface TransactionReceiptOutput {
91
+ /** List of application claims. */
92
+ applicationClaims?: Array<ApplicationClaimOutput>;
93
+ receipt?: ReceiptContentsOutput;
94
+ /** State of a ledger query. */
95
+ state: "Loading" | "Ready";
96
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
97
+ transactionId: string;
98
+ }
99
+ /** A claim of a ledger application. */
100
+ export interface ApplicationClaimOutput {
101
+ /** An application claim in digested form. */
102
+ digest?: ClaimDigestOutput;
103
+ /** Represents the kind of an application claim. */
104
+ kind: "LedgerEntry" | "ClaimDigest";
105
+ /** An application claim derived from ledger entry data. */
106
+ ledgerEntry?: LedgerEntryClaimOutput;
107
+ }
108
+ /** An application claim in digested form. */
109
+ export interface ClaimDigestOutput {
110
+ /** The digest of the application claim, in hexadecimal form. */
111
+ value?: string;
112
+ /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */
113
+ protocol: "LedgerEntryV1";
114
+ }
115
+ /** An application claim derived from ledger entry data. */
116
+ export interface LedgerEntryClaimOutput {
117
+ /** Identifier of a collection. */
118
+ collectionId?: string;
119
+ /** Contents of a ledger entry. */
120
+ contents?: string;
121
+ /** Base64-encoded secret key. */
122
+ secretKey?: string;
123
+ /** Represents the protocol to be used to compute the digest of a claim from the given claim data. */
124
+ protocol: "LedgerEntryV1";
125
+ }
126
+ export interface ReceiptContentsOutput {
127
+ cert?: string;
128
+ leaf?: string;
129
+ leafComponents?: ReceiptLeafComponentsOutput;
130
+ nodeId: string;
131
+ proof: Array<ReceiptElementOutput>;
132
+ root?: string;
133
+ serviceEndorsements?: Array<string>;
134
+ signature: string;
135
+ }
136
+ export interface ReceiptLeafComponentsOutput {
137
+ claimsDigest?: string;
138
+ commitEvidence?: string;
139
+ writeSetDigest?: string;
140
+ }
141
+ export interface ReceiptElementOutput {
142
+ left?: string;
143
+ right?: string;
144
+ }
145
+ /** Response returned to a query for the transaction status */
146
+ export interface TransactionStatusOutput {
147
+ /** Represents the state of the transaction. */
148
+ state: "Committed" | "Pending";
149
+ /** A unique identifier for the state of the ledger. If returned as part of a LedgerEntry, it indicates the state from which the entry was read. */
150
+ transactionId: string;
151
+ }
152
+ /** Paginated users returned in response to a query. */
153
+ export interface PagedUsersOutput {
154
+ ledgerUsers?: Array<LedgerUserOutput>;
155
+ /** Path from which to retrieve the next page of results. */
156
+ nextLink?: string;
157
+ }
158
+ /** Details about a Confidential Ledger user. */
159
+ export interface LedgerUserOutput {
160
+ /** Represents an assignable role. */
161
+ assignedRole: "Administrator" | "Contributor" | "Reader";
162
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
163
+ readonly userId?: string;
164
+ }
165
+ /** Paginated users returned in response to a query. */
166
+ export interface PagedLedgerUsersOutput {
167
+ ledgerUsers?: Array<LedgerUserMultipleRolesOutput>;
168
+ /** Path from which to retrieve the next page of results. */
169
+ nextLink?: string;
170
+ }
171
+ /** Details about a Confidential Ledger user. */
172
+ export interface LedgerUserMultipleRolesOutput {
173
+ /** Represents an assignable role. */
174
+ assignedRoles: Array<"Administrator" | "Contributor" | "Reader">;
175
+ /** Identifier for the user. This must either be an AAD object id or a certificate fingerprint. */
176
+ readonly userId?: string;
177
+ }
178
+ /** bundle for the user defined endpoints */
179
+ export interface BundleOutput {
180
+ metadata: MetadataOutput;
181
+ /** Any object */
182
+ modules: Record<string, unknown>;
183
+ }
184
+ export interface MetadataOutput {
185
+ /** A map of path to method endpoints for the path */
186
+ endpoints: Record<string, MethodToEndpointPropertiesOutput>;
187
+ }
188
+ export interface MethodToEndpointPropertiesOutput {
189
+ get?: EndpointPropertiesOutput;
190
+ put?: EndpointPropertiesOutput;
191
+ patch?: EndpointPropertiesOutput;
192
+ delete?: EndpointPropertiesOutput;
193
+ }
194
+ export interface EndpointPropertiesOutput {
195
+ authn_policies: Array<any>;
196
+ forwarding_required: "sometimes" | "always" | "never";
197
+ interpreter_reuse?: InterpreterReusePolicyOutput;
198
+ js_function?: string;
199
+ js_module?: string;
200
+ mode?: "readwrite" | "readonly" | "historical";
201
+ /** Anything */
202
+ openapi?: any;
203
+ openapi_hidden?: boolean;
204
+ redirection_strategy?: "none" | "to_primary" | "to_backup";
205
+ }
206
+ export interface InterpreterReusePolicyOutput {
207
+ key: string;
208
+ }
209
+ /** JS runtime options for user defined endpoints */
210
+ export interface JSRuntimeOptionsOutput {
211
+ log_exception_details?: boolean;
212
+ max_cached_interpreters?: number;
213
+ max_execution_time_ms?: number;
214
+ max_heap_bytes?: number;
215
+ max_stack_bytes?: number;
216
+ return_exception_details?: boolean;
217
+ }
218
+ export interface ModuleDefOutput {
219
+ module: string;
220
+ name: string;
221
+ }
222
+ /** Definition for roles */
223
+ export interface RoleOutput {
224
+ /** name of the user defined role */
225
+ roleName?: string;
226
+ roleActions?: Array<string>;
227
+ }
228
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../src/generated/outputModels.ts"],"names":[],"mappings":"AAGA,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,kDAAkD;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE,iCAAiC,CAAC;CACpD;AAED,kDAAkD;AAClD,MAAM,WAAW,iCAAiC;IAChD,sBAAsB;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACvC,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,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,6DAA6D;AAC7D,MAAM,WAAW,sBAAsB;IACrC,WAAW,E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