@azure-rest/synapse-access-control 1.0.0-alpha.20241219.1 → 1.0.0-alpha.20241223.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.
- package/dist/browser/accessControlRestClient.d.ts +12 -1
- package/dist/browser/accessControlRestClient.d.ts.map +1 -1
- package/dist/browser/accessControlRestClient.js +30 -8
- package/dist/browser/accessControlRestClient.js.map +1 -1
- package/dist/browser/clientDefinitions.d.ts +9 -9
- package/dist/browser/clientDefinitions.js.map +1 -1
- package/dist/browser/isUnexpected.d.ts +9 -9
- package/dist/browser/isUnexpected.js +35 -28
- package/dist/browser/isUnexpected.js.map +1 -1
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models.d.ts +4 -0
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/outputModels.d.ts +16 -7
- package/dist/browser/outputModels.d.ts.map +1 -1
- package/dist/browser/outputModels.js.map +1 -1
- package/dist/browser/paginateHelper.d.ts +27 -2
- package/dist/browser/paginateHelper.d.ts.map +1 -1
- package/dist/browser/paginateHelper.js +98 -1
- package/dist/browser/paginateHelper.js.map +1 -1
- package/dist/browser/parameters.d.ts +1 -1
- package/dist/browser/parameters.d.ts.map +1 -1
- package/dist/browser/parameters.js.map +1 -1
- package/dist/browser/responses.d.ts +8 -10
- package/dist/browser/responses.d.ts.map +1 -1
- package/dist/browser/responses.js.map +1 -1
- package/dist/commonjs/accessControlRestClient.d.ts +12 -1
- package/dist/commonjs/accessControlRestClient.d.ts.map +1 -1
- package/dist/commonjs/accessControlRestClient.js +30 -8
- package/dist/commonjs/accessControlRestClient.js.map +1 -1
- package/dist/commonjs/clientDefinitions.d.ts +9 -9
- package/dist/commonjs/clientDefinitions.js.map +1 -1
- package/dist/commonjs/isUnexpected.d.ts +9 -9
- package/dist/commonjs/isUnexpected.js +35 -28
- package/dist/commonjs/isUnexpected.js.map +1 -1
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +4 -0
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.js.map +1 -1
- package/dist/commonjs/outputModels.d.ts +16 -7
- package/dist/commonjs/outputModels.d.ts.map +1 -1
- package/dist/commonjs/outputModels.js.map +1 -1
- package/dist/commonjs/paginateHelper.d.ts +27 -2
- package/dist/commonjs/paginateHelper.d.ts.map +1 -1
- package/dist/commonjs/paginateHelper.js +99 -2
- package/dist/commonjs/paginateHelper.js.map +1 -1
- package/dist/commonjs/parameters.d.ts +1 -1
- package/dist/commonjs/parameters.d.ts.map +1 -1
- package/dist/commonjs/parameters.js.map +1 -1
- package/dist/commonjs/responses.d.ts +8 -10
- package/dist/commonjs/responses.d.ts.map +1 -1
- package/dist/commonjs/responses.js.map +1 -1
- package/dist/esm/accessControlRestClient.d.ts +12 -1
- package/dist/esm/accessControlRestClient.d.ts.map +1 -1
- package/dist/esm/accessControlRestClient.js +30 -8
- package/dist/esm/accessControlRestClient.js.map +1 -1
- package/dist/esm/clientDefinitions.d.ts +9 -9
- package/dist/esm/clientDefinitions.js.map +1 -1
- package/dist/esm/isUnexpected.d.ts +9 -9
- package/dist/esm/isUnexpected.js +35 -28
- package/dist/esm/isUnexpected.js.map +1 -1
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +4 -0
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/outputModels.d.ts +16 -7
- package/dist/esm/outputModels.d.ts.map +1 -1
- package/dist/esm/outputModels.js.map +1 -1
- package/dist/esm/paginateHelper.d.ts +27 -2
- package/dist/esm/paginateHelper.d.ts.map +1 -1
- package/dist/esm/paginateHelper.js +98 -1
- package/dist/esm/paginateHelper.js.map +1 -1
- package/dist/esm/parameters.d.ts +1 -1
- package/dist/esm/parameters.d.ts.map +1 -1
- package/dist/esm/parameters.js.map +1 -1
- package/dist/esm/responses.d.ts +8 -10
- package/dist/esm/responses.d.ts.map +1 -1
- package/dist/esm/responses.js.map +1 -1
- package/dist/react-native/accessControlRestClient.d.ts +12 -1
- package/dist/react-native/accessControlRestClient.d.ts.map +1 -1
- package/dist/react-native/accessControlRestClient.js +30 -8
- package/dist/react-native/accessControlRestClient.js.map +1 -1
- package/dist/react-native/clientDefinitions.d.ts +9 -9
- package/dist/react-native/clientDefinitions.js.map +1 -1
- package/dist/react-native/isUnexpected.d.ts +9 -9
- package/dist/react-native/isUnexpected.js +35 -28
- package/dist/react-native/isUnexpected.js.map +1 -1
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +4 -0
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/outputModels.d.ts +16 -7
- package/dist/react-native/outputModels.d.ts.map +1 -1
- package/dist/react-native/outputModels.js.map +1 -1
- package/dist/react-native/paginateHelper.d.ts +27 -2
- package/dist/react-native/paginateHelper.d.ts.map +1 -1
- package/dist/react-native/paginateHelper.js +98 -1
- package/dist/react-native/paginateHelper.js.map +1 -1
- package/dist/react-native/parameters.d.ts +1 -1
- package/dist/react-native/parameters.d.ts.map +1 -1
- package/dist/react-native/parameters.js.map +1 -1
- package/dist/react-native/responses.d.ts +8 -10
- package/dist/react-native/responses.d.ts.map +1 -1
- package/dist/react-native/responses.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ export interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResp
|
|
|
7
7
|
body: CheckPrincipalAccessResponseOutput;
|
|
8
8
|
}
|
|
9
9
|
/** Check if the given principalId has access to perform list of actions at a given scope. */
|
|
10
|
-
export interface
|
|
10
|
+
export interface RoleAssignmentsCheckPrincipalAccessDefaultResponse extends HttpResponse {
|
|
11
11
|
status: string;
|
|
12
12
|
body: ErrorContractOutput;
|
|
13
13
|
}
|
|
@@ -22,7 +22,7 @@ export interface RoleAssignmentsListRoleAssignments200Response extends HttpRespo
|
|
|
22
22
|
headers: RawHttpHeaders & RoleAssignmentsListRoleAssignments200Headers;
|
|
23
23
|
}
|
|
24
24
|
/** List role assignments. */
|
|
25
|
-
export interface
|
|
25
|
+
export interface RoleAssignmentsListRoleAssignmentsDefaultResponse extends HttpResponse {
|
|
26
26
|
status: string;
|
|
27
27
|
body: ErrorContractOutput;
|
|
28
28
|
}
|
|
@@ -32,7 +32,7 @@ export interface RoleAssignmentsCreateRoleAssignment200Response extends HttpResp
|
|
|
32
32
|
body: RoleAssignmentDetailsOutput;
|
|
33
33
|
}
|
|
34
34
|
/** Create role assignment. */
|
|
35
|
-
export interface
|
|
35
|
+
export interface RoleAssignmentsCreateRoleAssignmentDefaultResponse extends HttpResponse {
|
|
36
36
|
status: string;
|
|
37
37
|
body: ErrorContractOutput;
|
|
38
38
|
}
|
|
@@ -42,22 +42,20 @@ export interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpRes
|
|
|
42
42
|
body: RoleAssignmentDetailsOutput;
|
|
43
43
|
}
|
|
44
44
|
/** Get role assignment by role assignment Id. */
|
|
45
|
-
export interface
|
|
45
|
+
export interface RoleAssignmentsGetRoleAssignmentByIdDefaultResponse extends HttpResponse {
|
|
46
46
|
status: string;
|
|
47
47
|
body: ErrorContractOutput;
|
|
48
48
|
}
|
|
49
49
|
/** Delete role assignment by role assignment Id. */
|
|
50
50
|
export interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse {
|
|
51
51
|
status: "200";
|
|
52
|
-
body: Record<string, unknown>;
|
|
53
52
|
}
|
|
54
53
|
/** Delete role assignment by role assignment Id. */
|
|
55
54
|
export interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse {
|
|
56
55
|
status: "204";
|
|
57
|
-
body: Record<string, unknown>;
|
|
58
56
|
}
|
|
59
57
|
/** Delete role assignment by role assignment Id. */
|
|
60
|
-
export interface
|
|
58
|
+
export interface RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse extends HttpResponse {
|
|
61
59
|
status: string;
|
|
62
60
|
body: ErrorContractOutput;
|
|
63
61
|
}
|
|
@@ -67,7 +65,7 @@ export interface RoleDefinitionsListRoleDefinitions200Response extends HttpRespo
|
|
|
67
65
|
body: Array<SynapseRoleDefinitionOutput>;
|
|
68
66
|
}
|
|
69
67
|
/** List role definitions. */
|
|
70
|
-
export interface
|
|
68
|
+
export interface RoleDefinitionsListRoleDefinitionsDefaultResponse extends HttpResponse {
|
|
71
69
|
status: string;
|
|
72
70
|
body: ErrorContractOutput;
|
|
73
71
|
}
|
|
@@ -77,7 +75,7 @@ export interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpRes
|
|
|
77
75
|
body: SynapseRoleDefinitionOutput;
|
|
78
76
|
}
|
|
79
77
|
/** Get role definition by role definition Id. */
|
|
80
|
-
export interface
|
|
78
|
+
export interface RoleDefinitionsGetRoleDefinitionByIdDefaultResponse extends HttpResponse {
|
|
81
79
|
status: string;
|
|
82
80
|
body: ErrorContractOutput;
|
|
83
81
|
}
|
|
@@ -87,7 +85,7 @@ export interface RoleDefinitionsListScopes200Response extends HttpResponse {
|
|
|
87
85
|
body: Array<string>;
|
|
88
86
|
}
|
|
89
87
|
/** List rbac scopes. */
|
|
90
|
-
export interface
|
|
88
|
+
export interface RoleDefinitionsListScopesDefaultResponse extends HttpResponse {
|
|
91
89
|
status: string;
|
|
92
90
|
body: ErrorContractOutput;
|
|
93
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","s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B,MAAM,WAAW,oCAAqC,SAAQ,YAAY;IACxE,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACrB;AAED,wBAAwB;AACxB,MAAM,WAAW,wCAAyC,SAAQ,YAAY;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n CheckPrincipalAccessResponseOutput,\n ErrorContractOutput,\n RoleAssignmentDetailsListOutput,\n RoleAssignmentDetailsOutput,\n SynapseRoleDefinitionOutput,\n} from \"./outputModels.js\";\n\n/** Check if the given principalId has access to perform list of actions at a given scope. */\nexport interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResponse {\n status: \"200\";\n body: CheckPrincipalAccessResponseOutput;\n}\n\n/** Check if the given principalId has access to perform list of actions at a given scope. */\nexport interface
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n CheckPrincipalAccessResponseOutput,\n ErrorContractOutput,\n RoleAssignmentDetailsListOutput,\n RoleAssignmentDetailsOutput,\n SynapseRoleDefinitionOutput,\n} from \"./outputModels.js\";\n\n/** Check if the given principalId has access to perform list of actions at a given scope. */\nexport interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResponse {\n status: \"200\";\n body: CheckPrincipalAccessResponseOutput;\n}\n\n/** Check if the given principalId has access to perform list of actions at a given scope. */\nexport interface RoleAssignmentsCheckPrincipalAccessDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\nexport interface RoleAssignmentsListRoleAssignments200Headers {\n /** If the number of role assignments to be listed exceeds the maxResults limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the role assignments. */\n \"x-ms-continuation\"?: string;\n}\n\n/** List role assignments. */\nexport interface RoleAssignmentsListRoleAssignments200Response extends HttpResponse {\n status: \"200\";\n body: RoleAssignmentDetailsListOutput;\n headers: RawHttpHeaders & RoleAssignmentsListRoleAssignments200Headers;\n}\n\n/** List role assignments. */\nexport interface RoleAssignmentsListRoleAssignmentsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** Create role assignment. */\nexport interface RoleAssignmentsCreateRoleAssignment200Response extends HttpResponse {\n status: \"200\";\n body: RoleAssignmentDetailsOutput;\n}\n\n/** Create role assignment. */\nexport interface RoleAssignmentsCreateRoleAssignmentDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** Get role assignment by role assignment Id. */\nexport interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpResponse {\n status: \"200\";\n body: RoleAssignmentDetailsOutput;\n}\n\n/** Get role assignment by role assignment Id. */\nexport interface RoleAssignmentsGetRoleAssignmentByIdDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** Delete role assignment by role assignment Id. */\nexport interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse {\n status: \"200\";\n}\n\n/** Delete role assignment by role assignment Id. */\nexport interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse {\n status: \"204\";\n}\n\n/** Delete role assignment by role assignment Id. */\nexport interface RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** List role definitions. */\nexport interface RoleDefinitionsListRoleDefinitions200Response extends HttpResponse {\n status: \"200\";\n body: Array<SynapseRoleDefinitionOutput>;\n}\n\n/** List role definitions. */\nexport interface RoleDefinitionsListRoleDefinitionsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** Get role definition by role definition Id. */\nexport interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpResponse {\n status: \"200\";\n body: SynapseRoleDefinitionOutput;\n}\n\n/** Get role definition by role definition Id. */\nexport interface RoleDefinitionsGetRoleDefinitionByIdDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n\n/** List rbac scopes. */\nexport interface RoleDefinitionsListScopes200Response extends HttpResponse {\n status: \"200\";\n body: Array<string>;\n}\n\n/** List rbac scopes. */\nexport interface RoleDefinitionsListScopesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorContractOutput;\n}\n"]}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import type { ClientOptions } from "@azure-rest/core-client";
|
|
2
2
|
import type { TokenCredential } from "@azure/core-auth";
|
|
3
3
|
import type { AccessControlRestClient } from "./clientDefinitions.js";
|
|
4
|
-
|
|
4
|
+
/** The optional parameters for the client */
|
|
5
|
+
export interface AccessControlRestClientOptions extends ClientOptions {
|
|
6
|
+
/** The api version option of the client */
|
|
7
|
+
apiVersion?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Initialize a new instance of `AccessControlRestClient`
|
|
11
|
+
* @param endpoint - The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`.
|
|
12
|
+
* @param credentials - uniquely identify client credential
|
|
13
|
+
* @param options - the parameter for all optional parameters
|
|
14
|
+
*/
|
|
15
|
+
export default function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: AccessControlRestClientOptions): AccessControlRestClient;
|
|
5
16
|
//# sourceMappingURL=accessControlRestClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessControlRestClient.d.ts","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"accessControlRestClient.d.ts","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,6CAA6C;AAC7C,MAAM,WAAW,8BAA+B,SAAQ,aAAa;IACnE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,eAAe,EAC5B,EAAE,UAAyB,EAAE,GAAG,OAAO,EAAE,GAAE,8BAAmC,GAC7E,uBAAuB,CAuCzB"}
|
|
@@ -1,21 +1,43 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import { __rest } from "tslib";
|
|
3
4
|
import { getClient } from "@azure-rest/core-client";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { logger } from "./logger.js";
|
|
6
|
+
/**
|
|
7
|
+
* Initialize a new instance of `AccessControlRestClient`
|
|
8
|
+
* @param endpoint - The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`.
|
|
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 = "2020-12-01" } = _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}`;
|
|
11
16
|
const userAgentInfo = `azsdk-js-synapse-access-control-rest/1.0.0-beta.1`;
|
|
12
17
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
13
18
|
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
14
19
|
: `${userAgentInfo}`;
|
|
15
20
|
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
16
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 : ["https://dev.azuresynapse.net/.default"],
|
|
17
26
|
} });
|
|
18
|
-
const client = getClient(
|
|
27
|
+
const client = getClient(endpointUrl, credentials, options);
|
|
28
|
+
client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
|
|
29
|
+
client.pipeline.addPolicy({
|
|
30
|
+
name: "ClientApiVersionPolicy",
|
|
31
|
+
sendRequest: (req, next) => {
|
|
32
|
+
// Use the apiVersion defined in request url directly
|
|
33
|
+
// Append one if there is no apiVersion and we have one at client options
|
|
34
|
+
const url = new URL(req.url);
|
|
35
|
+
if (!url.searchParams.get("api-version") && apiVersion) {
|
|
36
|
+
req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
|
|
37
|
+
}
|
|
38
|
+
return next(req);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
19
41
|
return client;
|
|
20
42
|
}
|
|
21
43
|
//# sourceMappingURL=accessControlRestClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessControlRestClient.js","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"accessControlRestClient.js","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,KAA4E,EAAE;;QAA9E,EAAE,UAAU,GAAG,YAAY,OAAmD,EAA9C,OAAO,cAAvC,cAAyC,CAAF;IAEvC,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACzE,MAAM,aAAa,GAAG,mDAAmD,CAAC;IAC1E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,uCAAuC,CAAC;SACjF,GACF,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAA4B,CAAC;IAEvF,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport 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 { AccessControlRestClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface AccessControlRestClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `AccessControlRestClient`\n * @param endpoint - The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential,\n { apiVersion = \"2020-12-01\", ...options }: AccessControlRestClientOptions = {},\n): AccessControlRestClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`;\n const userAgentInfo = `azsdk-js-synapse-access-control-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://dev.azuresynapse.net/.default\"],\n },\n };\n const client = getClient(endpointUrl, credentials, options) as AccessControlRestClient;\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"]}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import type { RoleAssignmentsCheckPrincipalAccessParameters, RoleAssignmentsListRoleAssignmentsParameters, RoleAssignmentsCreateRoleAssignmentParameters, RoleAssignmentsGetRoleAssignmentByIdParameters, RoleAssignmentsDeleteRoleAssignmentByIdParameters, RoleDefinitionsListRoleDefinitionsParameters, RoleDefinitionsGetRoleDefinitionByIdParameters, RoleDefinitionsListScopesParameters } from "./parameters.js";
|
|
2
|
-
import type { RoleAssignmentsCheckPrincipalAccess200Response,
|
|
2
|
+
import type { RoleAssignmentsCheckPrincipalAccess200Response, RoleAssignmentsCheckPrincipalAccessDefaultResponse, RoleAssignmentsListRoleAssignments200Response, RoleAssignmentsListRoleAssignmentsDefaultResponse, RoleAssignmentsCreateRoleAssignment200Response, RoleAssignmentsCreateRoleAssignmentDefaultResponse, RoleAssignmentsGetRoleAssignmentById200Response, RoleAssignmentsGetRoleAssignmentByIdDefaultResponse, RoleAssignmentsDeleteRoleAssignmentById200Response, RoleAssignmentsDeleteRoleAssignmentById204Response, RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse, RoleDefinitionsListRoleDefinitions200Response, RoleDefinitionsListRoleDefinitionsDefaultResponse, RoleDefinitionsGetRoleDefinitionById200Response, RoleDefinitionsGetRoleDefinitionByIdDefaultResponse, RoleDefinitionsListScopes200Response, RoleDefinitionsListScopesDefaultResponse } from "./responses.js";
|
|
3
3
|
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
4
|
export interface RoleAssignmentsCheckPrincipalAccess {
|
|
5
5
|
/** Check if the given principalId has access to perform list of actions at a given scope. */
|
|
6
|
-
post(options: RoleAssignmentsCheckPrincipalAccessParameters): StreamableMethod<RoleAssignmentsCheckPrincipalAccess200Response |
|
|
6
|
+
post(options: RoleAssignmentsCheckPrincipalAccessParameters): StreamableMethod<RoleAssignmentsCheckPrincipalAccess200Response | RoleAssignmentsCheckPrincipalAccessDefaultResponse>;
|
|
7
7
|
}
|
|
8
8
|
export interface RoleAssignmentsListRoleAssignments {
|
|
9
9
|
/** List role assignments. */
|
|
10
|
-
get(options?: RoleAssignmentsListRoleAssignmentsParameters): StreamableMethod<RoleAssignmentsListRoleAssignments200Response |
|
|
10
|
+
get(options?: RoleAssignmentsListRoleAssignmentsParameters): StreamableMethod<RoleAssignmentsListRoleAssignments200Response | RoleAssignmentsListRoleAssignmentsDefaultResponse>;
|
|
11
11
|
}
|
|
12
12
|
export interface RoleAssignmentsCreateRoleAssignment {
|
|
13
13
|
/** Create role assignment. */
|
|
14
|
-
put(options: RoleAssignmentsCreateRoleAssignmentParameters): StreamableMethod<RoleAssignmentsCreateRoleAssignment200Response |
|
|
14
|
+
put(options: RoleAssignmentsCreateRoleAssignmentParameters): StreamableMethod<RoleAssignmentsCreateRoleAssignment200Response | RoleAssignmentsCreateRoleAssignmentDefaultResponse>;
|
|
15
15
|
/** Get role assignment by role assignment Id. */
|
|
16
|
-
get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsGetRoleAssignmentById200Response |
|
|
16
|
+
get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsGetRoleAssignmentById200Response | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse>;
|
|
17
17
|
/** Delete role assignment by role assignment Id. */
|
|
18
|
-
delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response |
|
|
18
|
+
delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse>;
|
|
19
19
|
}
|
|
20
20
|
export interface RoleDefinitionsListRoleDefinitions {
|
|
21
21
|
/** List role definitions. */
|
|
22
|
-
get(options?: RoleDefinitionsListRoleDefinitionsParameters): StreamableMethod<RoleDefinitionsListRoleDefinitions200Response |
|
|
22
|
+
get(options?: RoleDefinitionsListRoleDefinitionsParameters): StreamableMethod<RoleDefinitionsListRoleDefinitions200Response | RoleDefinitionsListRoleDefinitionsDefaultResponse>;
|
|
23
23
|
}
|
|
24
24
|
export interface RoleDefinitionsGetRoleDefinitionById {
|
|
25
25
|
/** Get role definition by role definition Id. */
|
|
26
|
-
get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): StreamableMethod<RoleDefinitionsGetRoleDefinitionById200Response |
|
|
26
|
+
get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): StreamableMethod<RoleDefinitionsGetRoleDefinitionById200Response | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse>;
|
|
27
27
|
}
|
|
28
28
|
export interface RoleDefinitionsListScopes {
|
|
29
29
|
/** List rbac scopes. */
|
|
30
|
-
get(options?: RoleDefinitionsListScopesParameters): StreamableMethod<RoleDefinitionsListScopes200Response |
|
|
30
|
+
get(options?: RoleDefinitionsListScopesParameters): StreamableMethod<RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse>;
|
|
31
31
|
}
|
|
32
32
|
export interface Routes {
|
|
33
33
|
/** Resource for '/checkAccessSynapseRbac' has methods for the following verbs: post */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RoleAssignmentsCheckPrincipalAccessParameters,\n RoleAssignmentsListRoleAssignmentsParameters,\n RoleAssignmentsCreateRoleAssignmentParameters,\n RoleAssignmentsGetRoleAssignmentByIdParameters,\n RoleAssignmentsDeleteRoleAssignmentByIdParameters,\n RoleDefinitionsListRoleDefinitionsParameters,\n RoleDefinitionsGetRoleDefinitionByIdParameters,\n RoleDefinitionsListScopesParameters,\n} from \"./parameters.js\";\nimport type {\n RoleAssignmentsCheckPrincipalAccess200Response,\n
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RoleAssignmentsCheckPrincipalAccessParameters,\n RoleAssignmentsListRoleAssignmentsParameters,\n RoleAssignmentsCreateRoleAssignmentParameters,\n RoleAssignmentsGetRoleAssignmentByIdParameters,\n RoleAssignmentsDeleteRoleAssignmentByIdParameters,\n RoleDefinitionsListRoleDefinitionsParameters,\n RoleDefinitionsGetRoleDefinitionByIdParameters,\n RoleDefinitionsListScopesParameters,\n} from \"./parameters.js\";\nimport type {\n RoleAssignmentsCheckPrincipalAccess200Response,\n RoleAssignmentsCheckPrincipalAccessDefaultResponse,\n RoleAssignmentsListRoleAssignments200Response,\n RoleAssignmentsListRoleAssignmentsDefaultResponse,\n RoleAssignmentsCreateRoleAssignment200Response,\n RoleAssignmentsCreateRoleAssignmentDefaultResponse,\n RoleAssignmentsGetRoleAssignmentById200Response,\n RoleAssignmentsGetRoleAssignmentByIdDefaultResponse,\n RoleAssignmentsDeleteRoleAssignmentById200Response,\n RoleAssignmentsDeleteRoleAssignmentById204Response,\n RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse,\n RoleDefinitionsListRoleDefinitions200Response,\n RoleDefinitionsListRoleDefinitionsDefaultResponse,\n RoleDefinitionsGetRoleDefinitionById200Response,\n RoleDefinitionsGetRoleDefinitionByIdDefaultResponse,\n RoleDefinitionsListScopes200Response,\n RoleDefinitionsListScopesDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface RoleAssignmentsCheckPrincipalAccess {\n /** Check if the given principalId has access to perform list of actions at a given scope. */\n post(\n options: RoleAssignmentsCheckPrincipalAccessParameters,\n ): StreamableMethod<\n | RoleAssignmentsCheckPrincipalAccess200Response\n | RoleAssignmentsCheckPrincipalAccessDefaultResponse\n >;\n}\n\nexport interface RoleAssignmentsListRoleAssignments {\n /** List role assignments. */\n get(\n options?: RoleAssignmentsListRoleAssignmentsParameters,\n ): StreamableMethod<\n | RoleAssignmentsListRoleAssignments200Response\n | RoleAssignmentsListRoleAssignmentsDefaultResponse\n >;\n}\n\nexport interface RoleAssignmentsCreateRoleAssignment {\n /** Create role assignment. */\n put(\n options: RoleAssignmentsCreateRoleAssignmentParameters,\n ): StreamableMethod<\n | RoleAssignmentsCreateRoleAssignment200Response\n | RoleAssignmentsCreateRoleAssignmentDefaultResponse\n >;\n /** Get role assignment by role assignment Id. */\n get(\n options?: RoleAssignmentsGetRoleAssignmentByIdParameters,\n ): StreamableMethod<\n | RoleAssignmentsGetRoleAssignmentById200Response\n | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse\n >;\n /** Delete role assignment by role assignment Id. */\n delete(\n options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters,\n ): StreamableMethod<\n | RoleAssignmentsDeleteRoleAssignmentById200Response\n | RoleAssignmentsDeleteRoleAssignmentById204Response\n | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse\n >;\n}\n\nexport interface RoleDefinitionsListRoleDefinitions {\n /** List role definitions. */\n get(\n options?: RoleDefinitionsListRoleDefinitionsParameters,\n ): StreamableMethod<\n | RoleDefinitionsListRoleDefinitions200Response\n | RoleDefinitionsListRoleDefinitionsDefaultResponse\n >;\n}\n\nexport interface RoleDefinitionsGetRoleDefinitionById {\n /** Get role definition by role definition Id. */\n get(\n options?: RoleDefinitionsGetRoleDefinitionByIdParameters,\n ): StreamableMethod<\n | RoleDefinitionsGetRoleDefinitionById200Response\n | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse\n >;\n}\n\nexport interface RoleDefinitionsListScopes {\n /** List rbac scopes. */\n get(\n options?: RoleDefinitionsListScopesParameters,\n ): StreamableMethod<\n RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/checkAccessSynapseRbac' has methods for the following verbs: post */\n (path: \"/checkAccessSynapseRbac\"): RoleAssignmentsCheckPrincipalAccess;\n /** Resource for '/roleAssignments' has methods for the following verbs: get */\n (path: \"/roleAssignments\"): RoleAssignmentsListRoleAssignments;\n /** Resource for '/roleAssignments/\\{roleAssignmentId\\}' has methods for the following verbs: put, get, delete */\n (\n path: \"/roleAssignments/{roleAssignmentId}\",\n roleAssignmentId: string,\n ): RoleAssignmentsCreateRoleAssignment;\n /** Resource for '/roleDefinitions' has methods for the following verbs: get */\n (path: \"/roleDefinitions\"): RoleDefinitionsListRoleDefinitions;\n /** Resource for '/roleDefinitions/\\{roleDefinitionId\\}' has methods for the following verbs: get */\n (\n path: \"/roleDefinitions/{roleDefinitionId}\",\n roleDefinitionId: string,\n ): RoleDefinitionsGetRoleDefinitionById;\n /** Resource for '/rbacScopes' has methods for the following verbs: get */\n (path: \"/rbacScopes\"): RoleDefinitionsListScopes;\n}\n\nexport type AccessControlRestClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { RoleAssignmentsCheckPrincipalAccess200Response,
|
|
2
|
-
export declare function isUnexpected(response: RoleAssignmentsCheckPrincipalAccess200Response |
|
|
3
|
-
export declare function isUnexpected(response: RoleAssignmentsListRoleAssignments200Response |
|
|
4
|
-
export declare function isUnexpected(response: RoleAssignmentsCreateRoleAssignment200Response |
|
|
5
|
-
export declare function isUnexpected(response: RoleAssignmentsGetRoleAssignmentById200Response |
|
|
6
|
-
export declare function isUnexpected(response: RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response |
|
|
7
|
-
export declare function isUnexpected(response: RoleDefinitionsListRoleDefinitions200Response |
|
|
8
|
-
export declare function isUnexpected(response: RoleDefinitionsGetRoleDefinitionById200Response |
|
|
9
|
-
export declare function isUnexpected(response: RoleDefinitionsListScopes200Response |
|
|
1
|
+
import type { RoleAssignmentsCheckPrincipalAccess200Response, RoleAssignmentsCheckPrincipalAccessDefaultResponse, RoleAssignmentsListRoleAssignments200Response, RoleAssignmentsListRoleAssignmentsDefaultResponse, RoleAssignmentsCreateRoleAssignment200Response, RoleAssignmentsCreateRoleAssignmentDefaultResponse, RoleAssignmentsGetRoleAssignmentById200Response, RoleAssignmentsGetRoleAssignmentByIdDefaultResponse, RoleAssignmentsDeleteRoleAssignmentById200Response, RoleAssignmentsDeleteRoleAssignmentById204Response, RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse, RoleDefinitionsListRoleDefinitions200Response, RoleDefinitionsListRoleDefinitionsDefaultResponse, RoleDefinitionsGetRoleDefinitionById200Response, RoleDefinitionsGetRoleDefinitionByIdDefaultResponse, RoleDefinitionsListScopes200Response, RoleDefinitionsListScopesDefaultResponse } from "./responses.js";
|
|
2
|
+
export declare function isUnexpected(response: RoleAssignmentsCheckPrincipalAccess200Response | RoleAssignmentsCheckPrincipalAccessDefaultResponse): response is RoleAssignmentsCheckPrincipalAccessDefaultResponse;
|
|
3
|
+
export declare function isUnexpected(response: RoleAssignmentsListRoleAssignments200Response | RoleAssignmentsListRoleAssignmentsDefaultResponse): response is RoleAssignmentsListRoleAssignmentsDefaultResponse;
|
|
4
|
+
export declare function isUnexpected(response: RoleAssignmentsCreateRoleAssignment200Response | RoleAssignmentsCreateRoleAssignmentDefaultResponse): response is RoleAssignmentsCreateRoleAssignmentDefaultResponse;
|
|
5
|
+
export declare function isUnexpected(response: RoleAssignmentsGetRoleAssignmentById200Response | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse): response is RoleAssignmentsGetRoleAssignmentByIdDefaultResponse;
|
|
6
|
+
export declare function isUnexpected(response: RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse): response is RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse;
|
|
7
|
+
export declare function isUnexpected(response: RoleDefinitionsListRoleDefinitions200Response | RoleDefinitionsListRoleDefinitionsDefaultResponse): response is RoleDefinitionsListRoleDefinitionsDefaultResponse;
|
|
8
|
+
export declare function isUnexpected(response: RoleDefinitionsGetRoleDefinitionById200Response | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse): response is RoleDefinitionsGetRoleDefinitionByIdDefaultResponse;
|
|
9
|
+
export declare function isUnexpected(response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse): response is RoleDefinitionsListScopesDefaultResponse;
|
|
10
10
|
//# sourceMappingURL=isUnexpected.d.ts.map
|
package/dist/esm/isUnexpected.js
CHANGED
|
@@ -16,52 +16,59 @@ export function isUnexpected(response) {
|
|
|
16
16
|
const method = response.request.method;
|
|
17
17
|
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
18
18
|
if (!pathDetails) {
|
|
19
|
-
pathDetails =
|
|
19
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
20
20
|
}
|
|
21
21
|
return !pathDetails.includes(response.status);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function getParametrizedPathSuccess(method, path) {
|
|
24
|
+
var _a, _b, _c, _d;
|
|
24
25
|
const pathParts = path.split("/");
|
|
26
|
+
// Traverse list to match the longest candidate
|
|
27
|
+
// matchedLen: the length of candidate path
|
|
28
|
+
// matchedValue: the matched status code array
|
|
29
|
+
let matchedLen = -1, matchedValue = [];
|
|
25
30
|
// Iterate the responseMap to find a match
|
|
26
31
|
for (const [key, value] of Object.entries(responseMap)) {
|
|
27
32
|
// Extracting the path from the map key which is in format
|
|
28
33
|
// GET /path/foo
|
|
34
|
+
if (!key.startsWith(method)) {
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
29
37
|
const candidatePath = getPathFromMapKey(key);
|
|
30
38
|
// Get each part of the url path
|
|
31
39
|
const candidateParts = candidatePath.split("/");
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
// If the candidate part is not a template and
|
|
45
|
-
// the parts don't match mark the candidate as not found
|
|
46
|
-
// to move on with the next candidate path.
|
|
47
|
-
if (candidateParts[i] !== pathParts[i]) {
|
|
40
|
+
// track if we have found a match to return the values found.
|
|
41
|
+
let found = true;
|
|
42
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
43
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
44
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
45
|
+
// If the current part of the candidate is a "template" part
|
|
46
|
+
// Try to use the suffix of pattern to match the path
|
|
47
|
+
// {guid} ==> $
|
|
48
|
+
// {guid}:export ==> :export$
|
|
49
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
50
|
+
if (!isMatched) {
|
|
48
51
|
found = false;
|
|
49
52
|
break;
|
|
50
53
|
}
|
|
54
|
+
continue;
|
|
51
55
|
}
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
// the path
|
|
55
|
-
if (
|
|
56
|
-
|
|
56
|
+
// If the candidate part is not a template and
|
|
57
|
+
// the parts don't match mark the candidate as not found
|
|
58
|
+
// to move on with the next candidate path.
|
|
59
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
60
|
+
found = false;
|
|
61
|
+
break;
|
|
57
62
|
}
|
|
58
63
|
}
|
|
64
|
+
// We finished evaluating the current candidate parts
|
|
65
|
+
// Update the matched value if and only if we found the longer pattern
|
|
66
|
+
if (found && candidatePath.length > matchedLen) {
|
|
67
|
+
matchedLen = candidatePath.length;
|
|
68
|
+
matchedValue = value;
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
return [];
|
|
62
|
-
}
|
|
63
|
-
function hasParametrizedPath(path) {
|
|
64
|
-
return path.includes("/{");
|
|
71
|
+
return matchedValue;
|
|
65
72
|
}
|
|
66
73
|
function getPathFromMapKey(mapKey) {
|
|
67
74
|
const pathStart = mapKey.indexOf("/");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources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AAC;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 RoleAssignmentsCheckPrincipalAccess200Response,\n RoleAssignmentsCheckPrincipalAccessdefaultResponse,\n RoleAssignmentsListRoleAssignments200Response,\n RoleAssignmentsListRoleAssignmentsdefaultResponse,\n RoleAssignmentsCreateRoleAssignment200Response,\n RoleAssignmentsCreateRoleAssignmentdefaultResponse,\n RoleAssignmentsGetRoleAssignmentById200Response,\n RoleAssignmentsGetRoleAssignmentByIddefaultResponse,\n RoleAssignmentsDeleteRoleAssignmentById200Response,\n RoleAssignmentsDeleteRoleAssignmentById204Response,\n RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse,\n RoleDefinitionsListRoleDefinitions200Response,\n RoleDefinitionsListRoleDefinitionsdefaultResponse,\n RoleDefinitionsGetRoleDefinitionById200Response,\n RoleDefinitionsGetRoleDefinitionByIddefaultResponse,\n RoleDefinitionsListScopes200Response,\n RoleDefinitionsListScopesdefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /checkAccessSynapseRbac\": [\"200\"],\n \"GET /roleAssignments\": [\"200\"],\n \"PUT /roleAssignments/{roleAssignmentId}\": [\"200\"],\n \"GET /roleAssignments/{roleAssignmentId}\": [\"200\"],\n \"DELETE /roleAssignments/{roleAssignmentId}\": [\"200\", \"204\"],\n \"GET /roleDefinitions\": [\"200\"],\n \"GET /roleDefinitions/{roleDefinitionId}\": [\"200\"],\n \"GET /rbacScopes\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | RoleAssignmentsCheckPrincipalAccess200Response\n | RoleAssignmentsCheckPrincipalAccessdefaultResponse,\n): response is RoleAssignmentsCheckPrincipalAccessdefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsListRoleAssignments200Response\n | RoleAssignmentsListRoleAssignmentsdefaultResponse,\n): response is RoleAssignmentsListRoleAssignmentsdefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsCreateRoleAssignment200Response\n | RoleAssignmentsCreateRoleAssignmentdefaultResponse,\n): response is RoleAssignmentsCreateRoleAssignmentdefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsGetRoleAssignmentById200Response\n | RoleAssignmentsGetRoleAssignmentByIddefaultResponse,\n): response is RoleAssignmentsGetRoleAssignmentByIddefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsDeleteRoleAssignmentById200Response\n | RoleAssignmentsDeleteRoleAssignmentById204Response\n | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse,\n): response is RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse;\nexport function isUnexpected(\n response:\n | RoleDefinitionsListRoleDefinitions200Response\n | RoleDefinitionsListRoleDefinitionsdefaultResponse,\n): response is RoleDefinitionsListRoleDefinitionsdefaultResponse;\nexport function isUnexpected(\n response:\n | RoleDefinitionsGetRoleDefinitionById200Response\n | RoleDefinitionsGetRoleDefinitionByIddefaultResponse,\n): response is RoleDefinitionsGetRoleDefinitionByIddefaultResponse;\nexport function isUnexpected(\n response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesdefaultResponse,\n): response is RoleDefinitionsListScopesdefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsCheckPrincipalAccess200Response\n | RoleAssignmentsCheckPrincipalAccessdefaultResponse\n | RoleAssignmentsListRoleAssignments200Response\n | RoleAssignmentsListRoleAssignmentsdefaultResponse\n | RoleAssignmentsCreateRoleAssignment200Response\n | RoleAssignmentsCreateRoleAssignmentdefaultResponse\n | RoleAssignmentsGetRoleAssignmentById200Response\n | RoleAssignmentsGetRoleAssignmentByIddefaultResponse\n | RoleAssignmentsDeleteRoleAssignmentById200Response\n | RoleAssignmentsDeleteRoleAssignmentById204Response\n | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse\n | RoleDefinitionsListRoleDefinitions200Response\n | RoleDefinitionsListRoleDefinitionsdefaultResponse\n | RoleDefinitionsGetRoleDefinitionById200Response\n | RoleDefinitionsGetRoleDefinitionByIddefaultResponse\n | RoleDefinitionsListScopes200Response\n | RoleDefinitionsListScopesdefaultResponse,\n): response is\n | RoleAssignmentsCheckPrincipalAccessdefaultResponse\n | RoleAssignmentsListRoleAssignmentsdefaultResponse\n | RoleAssignmentsCreateRoleAssignmentdefaultResponse\n | RoleAssignmentsGetRoleAssignmentByIddefaultResponse\n | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse\n | RoleDefinitionsListRoleDefinitionsdefaultResponse\n | RoleDefinitionsGetRoleDefinitionByIddefaultResponse\n | RoleDefinitionsListScopesdefaultResponse {\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 = geParametrizedPathSuccess(url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(path: string): string[] {\n const pathParts = path.split(\"/\");\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 const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (candidateParts[i].startsWith(\"{\") && candidateParts[i].endsWith(\"}\")) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\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[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsBlC,MAAM,WAAW,GAA6B;IAC5C,8BAA8B,EAAE,CAAC,KAAK,CAAC;IACvC,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,yCAAyC,EAAE,CAAC,KAAK,CAAC;IAClD,yCAAyC,EAAE,CAAC,KAAK,CAAC;IAClD,4CAA4C,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC5D,sBAAsB,EAAE,CAAC,KAAK,CAAC;IAC/B,yCAAyC,EAAE,CAAC,KAAK,CAAC;IAClD,iBAAiB,EAAE,CAAC,KAAK,CAAC;CAC3B,CAAC;AAyCF,MAAM,UAAU,YAAY,CAC1B,QAiB4C;IAU5C,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,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,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n RoleAssignmentsCheckPrincipalAccess200Response,\n RoleAssignmentsCheckPrincipalAccessDefaultResponse,\n RoleAssignmentsListRoleAssignments200Response,\n RoleAssignmentsListRoleAssignmentsDefaultResponse,\n RoleAssignmentsCreateRoleAssignment200Response,\n RoleAssignmentsCreateRoleAssignmentDefaultResponse,\n RoleAssignmentsGetRoleAssignmentById200Response,\n RoleAssignmentsGetRoleAssignmentByIdDefaultResponse,\n RoleAssignmentsDeleteRoleAssignmentById200Response,\n RoleAssignmentsDeleteRoleAssignmentById204Response,\n RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse,\n RoleDefinitionsListRoleDefinitions200Response,\n RoleDefinitionsListRoleDefinitionsDefaultResponse,\n RoleDefinitionsGetRoleDefinitionById200Response,\n RoleDefinitionsGetRoleDefinitionByIdDefaultResponse,\n RoleDefinitionsListScopes200Response,\n RoleDefinitionsListScopesDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /checkAccessSynapseRbac\": [\"200\"],\n \"GET /roleAssignments\": [\"200\"],\n \"PUT /roleAssignments/{roleAssignmentId}\": [\"200\"],\n \"GET /roleAssignments/{roleAssignmentId}\": [\"200\"],\n \"DELETE /roleAssignments/{roleAssignmentId}\": [\"200\", \"204\"],\n \"GET /roleDefinitions\": [\"200\"],\n \"GET /roleDefinitions/{roleDefinitionId}\": [\"200\"],\n \"GET /rbacScopes\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | RoleAssignmentsCheckPrincipalAccess200Response\n | RoleAssignmentsCheckPrincipalAccessDefaultResponse,\n): response is RoleAssignmentsCheckPrincipalAccessDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsListRoleAssignments200Response\n | RoleAssignmentsListRoleAssignmentsDefaultResponse,\n): response is RoleAssignmentsListRoleAssignmentsDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsCreateRoleAssignment200Response\n | RoleAssignmentsCreateRoleAssignmentDefaultResponse,\n): response is RoleAssignmentsCreateRoleAssignmentDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsGetRoleAssignmentById200Response\n | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse,\n): response is RoleAssignmentsGetRoleAssignmentByIdDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsDeleteRoleAssignmentById200Response\n | RoleAssignmentsDeleteRoleAssignmentById204Response\n | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse,\n): response is RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleDefinitionsListRoleDefinitions200Response\n | RoleDefinitionsListRoleDefinitionsDefaultResponse,\n): response is RoleDefinitionsListRoleDefinitionsDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleDefinitionsGetRoleDefinitionById200Response\n | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse,\n): response is RoleDefinitionsGetRoleDefinitionByIdDefaultResponse;\nexport function isUnexpected(\n response: RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesDefaultResponse,\n): response is RoleDefinitionsListScopesDefaultResponse;\nexport function isUnexpected(\n response:\n | RoleAssignmentsCheckPrincipalAccess200Response\n | RoleAssignmentsCheckPrincipalAccessDefaultResponse\n | RoleAssignmentsListRoleAssignments200Response\n | RoleAssignmentsListRoleAssignmentsDefaultResponse\n | RoleAssignmentsCreateRoleAssignment200Response\n | RoleAssignmentsCreateRoleAssignmentDefaultResponse\n | RoleAssignmentsGetRoleAssignmentById200Response\n | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse\n | RoleAssignmentsDeleteRoleAssignmentById200Response\n | RoleAssignmentsDeleteRoleAssignmentById204Response\n | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse\n | RoleDefinitionsListRoleDefinitions200Response\n | RoleDefinitionsListRoleDefinitionsDefaultResponse\n | RoleDefinitionsGetRoleDefinitionById200Response\n | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse\n | RoleDefinitionsListScopes200Response\n | RoleDefinitionsListScopesDefaultResponse,\n): response is\n | RoleAssignmentsCheckPrincipalAccessDefaultResponse\n | RoleAssignmentsListRoleAssignmentsDefaultResponse\n | RoleAssignmentsCreateRoleAssignmentDefaultResponse\n | RoleAssignmentsGetRoleAssignmentByIdDefaultResponse\n | RoleAssignmentsDeleteRoleAssignmentByIdDefaultResponse\n | RoleDefinitionsListRoleDefinitionsDefaultResponse\n | RoleDefinitionsGetRoleDefinitionByIdDefaultResponse\n | RoleDefinitionsListScopesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"synapse-access-control\");\n"]}
|
package/dist/esm/models.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Check access request details */
|
|
1
2
|
export interface CheckPrincipalAccessRequest {
|
|
2
3
|
/** Subject details */
|
|
3
4
|
subject: SubjectInfo;
|
|
@@ -6,6 +7,7 @@ export interface CheckPrincipalAccessRequest {
|
|
|
6
7
|
/** Scope at which the check access is done. */
|
|
7
8
|
scope: string;
|
|
8
9
|
}
|
|
10
|
+
/** Subject details */
|
|
9
11
|
export interface SubjectInfo {
|
|
10
12
|
/**
|
|
11
13
|
* Principal Id
|
|
@@ -16,12 +18,14 @@ export interface SubjectInfo {
|
|
|
16
18
|
/** List of group Ids that the principalId is part of. */
|
|
17
19
|
groupIds?: Array<string>;
|
|
18
20
|
}
|
|
21
|
+
/** Action Info */
|
|
19
22
|
export interface RequiredAction {
|
|
20
23
|
/** Action Id. */
|
|
21
24
|
id: string;
|
|
22
25
|
/** Is a data action or not. */
|
|
23
26
|
isDataAction: boolean;
|
|
24
27
|
}
|
|
28
|
+
/** Role Assignment request details */
|
|
25
29
|
export interface RoleAssignmentRequest {
|
|
26
30
|
/**
|
|
27
31
|
* Role ID of the Synapse Built-In Role
|
package/dist/esm/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,uBAAuB;IACvB,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC/B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,mCAAmC;AACnC,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,uBAAuB;IACvB,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC/B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sBAAsB;AACtB,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC1B;AAED,kBAAkB;AAClB,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,sCAAsC;AACtC,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
package/dist/esm/models.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport interface CheckPrincipalAccessRequest {\n /** Subject details */\n subject: SubjectInfo;\n /** List of actions. */\n actions: Array<RequiredAction>;\n /** Scope at which the check access is done. */\n scope: string;\n}\n\nexport interface SubjectInfo {\n /**\n * Principal Id\n *\n * Value may contain a UUID\n */\n principalId: string;\n /** List of group Ids that the principalId is part of. */\n groupIds?: Array<string>;\n}\n\nexport interface RequiredAction {\n /** Action Id. */\n id: string;\n /** Is a data action or not. */\n isDataAction: boolean;\n}\n\nexport interface RoleAssignmentRequest {\n /**\n * Role ID of the Synapse Built-In Role\n *\n * Value may contain a UUID\n */\n roleId: string;\n /**\n * Object ID of the AAD principal or security-group\n *\n * Value may contain a UUID\n */\n principalId: string;\n /** Scope at which the role assignment is created */\n scope: string;\n /** Type of the principal Id: User, Group or ServicePrincipal */\n principalType?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Check access request details */\nexport interface CheckPrincipalAccessRequest {\n /** Subject details */\n subject: SubjectInfo;\n /** List of actions. */\n actions: Array<RequiredAction>;\n /** Scope at which the check access is done. */\n scope: string;\n}\n\n/** Subject details */\nexport interface SubjectInfo {\n /**\n * Principal Id\n *\n * Value may contain a UUID\n */\n principalId: string;\n /** List of group Ids that the principalId is part of. */\n groupIds?: Array<string>;\n}\n\n/** Action Info */\nexport interface RequiredAction {\n /** Action Id. */\n id: string;\n /** Is a data action or not. */\n isDataAction: boolean;\n}\n\n/** Role Assignment request details */\nexport interface RoleAssignmentRequest {\n /**\n * Role ID of the Synapse Built-In Role\n *\n * Value may contain a UUID\n */\n roleId: string;\n /**\n * Object ID of the AAD principal or security-group\n *\n * Value may contain a UUID\n */\n principalId: string;\n /** Scope at which the role assignment is created */\n scope: string;\n /** Type of the principal Id: User, Group or ServicePrincipal */\n principalType?: string;\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/** Check access response details */
|
|
1
2
|
export interface CheckPrincipalAccessResponseOutput {
|
|
2
3
|
/** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */
|
|
3
4
|
AccessDecisions?: Array<CheckAccessDecisionOutput>;
|
|
4
5
|
}
|
|
6
|
+
/** Check access response details */
|
|
5
7
|
export interface CheckAccessDecisionOutput {
|
|
6
8
|
/** Access Decision. */
|
|
7
9
|
accessDecision?: string;
|
|
@@ -10,6 +12,7 @@ export interface CheckAccessDecisionOutput {
|
|
|
10
12
|
/** Role Assignment response details */
|
|
11
13
|
roleAssignment?: RoleAssignmentDetailsOutput;
|
|
12
14
|
}
|
|
15
|
+
/** Role Assignment response details */
|
|
13
16
|
export interface RoleAssignmentDetailsOutput {
|
|
14
17
|
/** Role Assignment ID */
|
|
15
18
|
id?: string;
|
|
@@ -30,34 +33,39 @@ export interface RoleAssignmentDetailsOutput {
|
|
|
30
33
|
/** Type of the principal Id: User, Group or ServicePrincipal */
|
|
31
34
|
principalType?: string;
|
|
32
35
|
}
|
|
36
|
+
/** Contains details when the response code indicates an error. */
|
|
33
37
|
export interface ErrorContractOutput {
|
|
34
38
|
/** The error details. */
|
|
35
39
|
error?: ErrorResponseOutput;
|
|
36
40
|
}
|
|
41
|
+
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */
|
|
37
42
|
export interface ErrorResponseOutput {
|
|
38
43
|
/** The error code. */
|
|
39
|
-
code?: string;
|
|
44
|
+
readonly code?: string;
|
|
40
45
|
/** The error message. */
|
|
41
|
-
message?: string;
|
|
46
|
+
readonly message?: string;
|
|
42
47
|
/** The error target. */
|
|
43
|
-
target?: string;
|
|
48
|
+
readonly target?: string;
|
|
44
49
|
/** The error details. */
|
|
45
|
-
details?: Array<ErrorResponseOutput>;
|
|
50
|
+
readonly details?: Array<ErrorResponseOutput>;
|
|
46
51
|
/** The error additional info. */
|
|
47
|
-
additionalInfo?: Array<ErrorAdditionalInfoOutput>;
|
|
52
|
+
readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;
|
|
48
53
|
}
|
|
54
|
+
/** The resource management error additional info. */
|
|
49
55
|
export interface ErrorAdditionalInfoOutput {
|
|
50
56
|
/** The additional info type. */
|
|
51
|
-
type?: string;
|
|
57
|
+
readonly type?: string;
|
|
52
58
|
/** The additional info. */
|
|
53
|
-
info?: Record<string, unknown>;
|
|
59
|
+
readonly info?: Record<string, unknown>;
|
|
54
60
|
}
|
|
61
|
+
/** Role Assignment response details */
|
|
55
62
|
export interface RoleAssignmentDetailsListOutput {
|
|
56
63
|
/** Number of role assignments */
|
|
57
64
|
count?: number;
|
|
58
65
|
/** A list of role assignments */
|
|
59
66
|
value?: Array<RoleAssignmentDetailsOutput>;
|
|
60
67
|
}
|
|
68
|
+
/** Synapse role definition details */
|
|
61
69
|
export interface SynapseRoleDefinitionOutput {
|
|
62
70
|
/**
|
|
63
71
|
* Role Definition ID
|
|
@@ -78,6 +86,7 @@ export interface SynapseRoleDefinitionOutput {
|
|
|
78
86
|
/** Availability of the Synapse role */
|
|
79
87
|
availabilityStatus?: string;
|
|
80
88
|
}
|
|
89
|
+
/** Synapse role definition details */
|
|
81
90
|
export interface SynapseRbacPermissionOutput {
|
|
82
91
|
/** List of actions */
|
|
83
92
|
actions?: Array<string>;
|