@azure-rest/synapse-access-control 1.0.0-alpha.20241121.1 → 1.0.0-alpha.20241126.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/README.md +1 -1
- package/dist/browser/accessControlRestClient.d.ts +5 -0
- package/dist/browser/accessControlRestClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/accessControlRestClient.js +2 -2
- package/dist/browser/accessControlRestClient.js.map +1 -0
- package/dist/browser/clientDefinitions.d.ts +49 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +14 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +10 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/isUnexpected.js +3 -5
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/models.d.ts +43 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/outputModels.d.ts +91 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/paginateHelper.d.ts +43 -0
- package/dist/browser/paginateHelper.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/paginateHelper.js +4 -17
- package/dist/browser/paginateHelper.js.map +1 -0
- package/dist/browser/parameters.d.ts +62 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/responses.d.ts +94 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/commonjs/accessControlRestClient.d.ts +5 -0
- package/dist/commonjs/accessControlRestClient.d.ts.map +1 -0
- package/dist/commonjs/accessControlRestClient.js +24 -0
- package/dist/commonjs/accessControlRestClient.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +49 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +10 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +73 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/models.d.ts +43 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +91 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/paginateHelper.d.ts +43 -0
- package/dist/commonjs/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/paginateHelper.js +73 -0
- package/dist/commonjs/paginateHelper.js.map +1 -0
- package/dist/commonjs/parameters.d.ts +62 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/responses.d.ts +94 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/accessControlRestClient.d.ts +5 -0
- package/dist/esm/accessControlRestClient.d.ts.map +1 -0
- package/dist/esm/accessControlRestClient.js +21 -0
- package/dist/esm/accessControlRestClient.js.map +1 -0
- package/dist/esm/clientDefinitions.d.ts +49 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +10 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +70 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/models.d.ts +43 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +91 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/paginateHelper.d.ts +43 -0
- package/dist/esm/paginateHelper.d.ts.map +1 -0
- package/dist/esm/paginateHelper.js +70 -0
- package/dist/esm/paginateHelper.js.map +1 -0
- package/dist/esm/parameters.d.ts +62 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/responses.d.ts +94 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/react-native/accessControlRestClient.d.ts +5 -0
- package/dist/react-native/accessControlRestClient.d.ts.map +1 -0
- package/dist/react-native/accessControlRestClient.js +21 -0
- package/dist/react-native/accessControlRestClient.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +49 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +14 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +10 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +70 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/models.d.ts +43 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +91 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/paginateHelper.d.ts +43 -0
- package/dist/react-native/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/paginateHelper.js +70 -0
- package/dist/react-native/paginateHelper.js.map +1 -0
- package/dist/react-native/parameters.d.ts +62 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/responses.d.ts +94 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/dist/synapse-access-control-rest.d.ts +460 -0
- package/package.json +67 -57
- package/dist/index.js +0 -187
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/createRoleAssignment.js +0 -33
- package/dist-esm/samples-dev/createRoleAssignment.js.map +0 -1
- package/dist-esm/samples-dev/listRoleAssignments.js +0 -40
- package/dist-esm/samples-dev/listRoleAssignments.js.map +0 -1
- package/dist-esm/src/accessControlRestClient.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/index.js +0 -13
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/paginateHelper.js.map +0 -1
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/responses.js.map +0 -1
- package/dist-esm/test/public/test.spec.js +0 -97
- package/dist-esm/test/public/test.spec.js.map +0 -1
- package/dist-esm/test/public/utils/env.browser.js +0 -4
- package/dist-esm/test/public/utils/env.browser.js.map +0 -1
- package/dist-esm/test/public/utils/env.js +0 -5
- package/dist-esm/test/public/utils/env.js.map +0 -1
- package/dist-esm/test/public/utils/recordedClient.js +0 -35
- package/dist-esm/test/public/utils/recordedClient.js.map +0 -1
- package/tsconfig.json +0 -25
- /package/{dist-esm/src → dist/browser}/clientDefinitions.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/outputModels.js +0 -0
- /package/{dist-esm/src → dist/browser}/outputModels.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
- /package/{dist-esm/src → dist/browser}/responses.js +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { RawHttpHeaders } from "@azure/core-rest-pipeline";
|
|
2
|
+
import type { HttpResponse } from "@azure-rest/core-client";
|
|
3
|
+
import type { CheckPrincipalAccessResponseOutput, ErrorContractOutput, RoleAssignmentDetailsListOutput, RoleAssignmentDetailsOutput, SynapseRoleDefinitionOutput } from "./outputModels.js";
|
|
4
|
+
/** Check if the given principalId has access to perform list of actions at a given scope. */
|
|
5
|
+
export interface RoleAssignmentsCheckPrincipalAccess200Response extends HttpResponse {
|
|
6
|
+
status: "200";
|
|
7
|
+
body: CheckPrincipalAccessResponseOutput;
|
|
8
|
+
}
|
|
9
|
+
/** Check if the given principalId has access to perform list of actions at a given scope. */
|
|
10
|
+
export interface RoleAssignmentsCheckPrincipalAccessdefaultResponse extends HttpResponse {
|
|
11
|
+
status: string;
|
|
12
|
+
body: ErrorContractOutput;
|
|
13
|
+
}
|
|
14
|
+
export interface RoleAssignmentsListRoleAssignments200Headers {
|
|
15
|
+
/** 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. */
|
|
16
|
+
"x-ms-continuation"?: string;
|
|
17
|
+
}
|
|
18
|
+
/** List role assignments. */
|
|
19
|
+
export interface RoleAssignmentsListRoleAssignments200Response extends HttpResponse {
|
|
20
|
+
status: "200";
|
|
21
|
+
body: RoleAssignmentDetailsListOutput;
|
|
22
|
+
headers: RawHttpHeaders & RoleAssignmentsListRoleAssignments200Headers;
|
|
23
|
+
}
|
|
24
|
+
/** List role assignments. */
|
|
25
|
+
export interface RoleAssignmentsListRoleAssignmentsdefaultResponse extends HttpResponse {
|
|
26
|
+
status: string;
|
|
27
|
+
body: ErrorContractOutput;
|
|
28
|
+
}
|
|
29
|
+
/** Create role assignment. */
|
|
30
|
+
export interface RoleAssignmentsCreateRoleAssignment200Response extends HttpResponse {
|
|
31
|
+
status: "200";
|
|
32
|
+
body: RoleAssignmentDetailsOutput;
|
|
33
|
+
}
|
|
34
|
+
/** Create role assignment. */
|
|
35
|
+
export interface RoleAssignmentsCreateRoleAssignmentdefaultResponse extends HttpResponse {
|
|
36
|
+
status: string;
|
|
37
|
+
body: ErrorContractOutput;
|
|
38
|
+
}
|
|
39
|
+
/** Get role assignment by role assignment Id. */
|
|
40
|
+
export interface RoleAssignmentsGetRoleAssignmentById200Response extends HttpResponse {
|
|
41
|
+
status: "200";
|
|
42
|
+
body: RoleAssignmentDetailsOutput;
|
|
43
|
+
}
|
|
44
|
+
/** Get role assignment by role assignment Id. */
|
|
45
|
+
export interface RoleAssignmentsGetRoleAssignmentByIddefaultResponse extends HttpResponse {
|
|
46
|
+
status: string;
|
|
47
|
+
body: ErrorContractOutput;
|
|
48
|
+
}
|
|
49
|
+
/** Delete role assignment by role assignment Id. */
|
|
50
|
+
export interface RoleAssignmentsDeleteRoleAssignmentById200Response extends HttpResponse {
|
|
51
|
+
status: "200";
|
|
52
|
+
body: Record<string, unknown>;
|
|
53
|
+
}
|
|
54
|
+
/** Delete role assignment by role assignment Id. */
|
|
55
|
+
export interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse {
|
|
56
|
+
status: "204";
|
|
57
|
+
body: Record<string, unknown>;
|
|
58
|
+
}
|
|
59
|
+
/** Delete role assignment by role assignment Id. */
|
|
60
|
+
export interface RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse extends HttpResponse {
|
|
61
|
+
status: string;
|
|
62
|
+
body: ErrorContractOutput;
|
|
63
|
+
}
|
|
64
|
+
/** List role definitions. */
|
|
65
|
+
export interface RoleDefinitionsListRoleDefinitions200Response extends HttpResponse {
|
|
66
|
+
status: "200";
|
|
67
|
+
body: Array<SynapseRoleDefinitionOutput>;
|
|
68
|
+
}
|
|
69
|
+
/** List role definitions. */
|
|
70
|
+
export interface RoleDefinitionsListRoleDefinitionsdefaultResponse extends HttpResponse {
|
|
71
|
+
status: string;
|
|
72
|
+
body: ErrorContractOutput;
|
|
73
|
+
}
|
|
74
|
+
/** Get role definition by role definition Id. */
|
|
75
|
+
export interface RoleDefinitionsGetRoleDefinitionById200Response extends HttpResponse {
|
|
76
|
+
status: "200";
|
|
77
|
+
body: SynapseRoleDefinitionOutput;
|
|
78
|
+
}
|
|
79
|
+
/** Get role definition by role definition Id. */
|
|
80
|
+
export interface RoleDefinitionsGetRoleDefinitionByIddefaultResponse extends HttpResponse {
|
|
81
|
+
status: string;
|
|
82
|
+
body: ErrorContractOutput;
|
|
83
|
+
}
|
|
84
|
+
/** List rbac scopes. */
|
|
85
|
+
export interface RoleDefinitionsListScopes200Response extends HttpResponse {
|
|
86
|
+
status: "200";
|
|
87
|
+
body: Array<string>;
|
|
88
|
+
}
|
|
89
|
+
/** List rbac scopes. */
|
|
90
|
+
export interface RoleDefinitionsListScopesdefaultResponse extends HttpResponse {
|
|
91
|
+
status: string;
|
|
92
|
+
body: ErrorContractOutput;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","s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W,wCAAyC,SAAQ,YAAY;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC;CAC3B"}
|
|
@@ -0,0 +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 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 body: Record<string, unknown>;\n}\n\n/** Delete role assignment by role assignment Id. */\nexport interface RoleAssignmentsDeleteRoleAssignmentById204Response extends HttpResponse {\n status: \"204\";\n body: Record<string, unknown>;\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"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
3
|
+
import type { AccessControlRestClient } from "./clientDefinitions.js";
|
|
4
|
+
export default function createClient(endpoint: string, credentials: TokenCredential, options?: ClientOptions): AccessControlRestClient;
|
|
5
|
+
//# sourceMappingURL=accessControlRestClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessControlRestClient.d.ts","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,eAAe,EAC5B,OAAO,GAAE,aAAkB,GAC1B,uBAAuB,CAyBzB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.default = createClient;
|
|
6
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
7
|
+
function createClient(endpoint, credentials, options = {}) {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}`;
|
|
10
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2020-12-01";
|
|
11
|
+
options = Object.assign(Object.assign({}, options), { credentials: {
|
|
12
|
+
scopes: ["https://dev.azuresynapse.net/.default"],
|
|
13
|
+
} });
|
|
14
|
+
const userAgentInfo = `azsdk-js-synapse-access-control-rest/1.0.0-beta.1`;
|
|
15
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
16
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
17
|
+
: `${userAgentInfo}`;
|
|
18
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
19
|
+
userAgentPrefix,
|
|
20
|
+
} });
|
|
21
|
+
const client = (0, core_client_1.getClient)(baseUrl, credentials, options);
|
|
22
|
+
return client;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=accessControlRestClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessControlRestClient.js","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,+BA6BC;AAjCD,yDAAoD;AAIpD,SAAwB,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,uCAAuC,CAAC;SAClD,GACF,CAAC;IAEF,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,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA4B,CAAC;IAEnF,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 type { TokenCredential } from \"@azure/core-auth\";\nimport type { AccessControlRestClient } from \"./clientDefinitions.js\";\n\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AccessControlRestClient {\n const baseUrl = options.baseUrl ?? `${endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2020-12-01\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://dev.azuresynapse.net/.default\"],\n },\n };\n\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 };\n\n const client = getClient(baseUrl, credentials, options) as AccessControlRestClient;\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { RoleAssignmentsCheckPrincipalAccessParameters, RoleAssignmentsListRoleAssignmentsParameters, RoleAssignmentsCreateRoleAssignmentParameters, RoleAssignmentsGetRoleAssignmentByIdParameters, RoleAssignmentsDeleteRoleAssignmentByIdParameters, RoleDefinitionsListRoleDefinitionsParameters, RoleDefinitionsGetRoleDefinitionByIdParameters, RoleDefinitionsListScopesParameters } from "./parameters.js";
|
|
2
|
+
import type { RoleAssignmentsCheckPrincipalAccess200Response, RoleAssignmentsCheckPrincipalAccessdefaultResponse, RoleAssignmentsListRoleAssignments200Response, RoleAssignmentsListRoleAssignmentsdefaultResponse, RoleAssignmentsCreateRoleAssignment200Response, RoleAssignmentsCreateRoleAssignmentdefaultResponse, RoleAssignmentsGetRoleAssignmentById200Response, RoleAssignmentsGetRoleAssignmentByIddefaultResponse, RoleAssignmentsDeleteRoleAssignmentById200Response, RoleAssignmentsDeleteRoleAssignmentById204Response, RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse, RoleDefinitionsListRoleDefinitions200Response, RoleDefinitionsListRoleDefinitionsdefaultResponse, RoleDefinitionsGetRoleDefinitionById200Response, RoleDefinitionsGetRoleDefinitionByIddefaultResponse, RoleDefinitionsListScopes200Response, RoleDefinitionsListScopesdefaultResponse } from "./responses.js";
|
|
3
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
|
+
export interface RoleAssignmentsCheckPrincipalAccess {
|
|
5
|
+
/** Check if the given principalId has access to perform list of actions at a given scope. */
|
|
6
|
+
post(options: RoleAssignmentsCheckPrincipalAccessParameters): StreamableMethod<RoleAssignmentsCheckPrincipalAccess200Response | RoleAssignmentsCheckPrincipalAccessdefaultResponse>;
|
|
7
|
+
}
|
|
8
|
+
export interface RoleAssignmentsListRoleAssignments {
|
|
9
|
+
/** List role assignments. */
|
|
10
|
+
get(options?: RoleAssignmentsListRoleAssignmentsParameters): StreamableMethod<RoleAssignmentsListRoleAssignments200Response | RoleAssignmentsListRoleAssignmentsdefaultResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface RoleAssignmentsCreateRoleAssignment {
|
|
13
|
+
/** Create role assignment. */
|
|
14
|
+
put(options: RoleAssignmentsCreateRoleAssignmentParameters): StreamableMethod<RoleAssignmentsCreateRoleAssignment200Response | RoleAssignmentsCreateRoleAssignmentdefaultResponse>;
|
|
15
|
+
/** Get role assignment by role assignment Id. */
|
|
16
|
+
get(options?: RoleAssignmentsGetRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsGetRoleAssignmentById200Response | RoleAssignmentsGetRoleAssignmentByIddefaultResponse>;
|
|
17
|
+
/** Delete role assignment by role assignment Id. */
|
|
18
|
+
delete(options?: RoleAssignmentsDeleteRoleAssignmentByIdParameters): StreamableMethod<RoleAssignmentsDeleteRoleAssignmentById200Response | RoleAssignmentsDeleteRoleAssignmentById204Response | RoleAssignmentsDeleteRoleAssignmentByIddefaultResponse>;
|
|
19
|
+
}
|
|
20
|
+
export interface RoleDefinitionsListRoleDefinitions {
|
|
21
|
+
/** List role definitions. */
|
|
22
|
+
get(options?: RoleDefinitionsListRoleDefinitionsParameters): StreamableMethod<RoleDefinitionsListRoleDefinitions200Response | RoleDefinitionsListRoleDefinitionsdefaultResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface RoleDefinitionsGetRoleDefinitionById {
|
|
25
|
+
/** Get role definition by role definition Id. */
|
|
26
|
+
get(options?: RoleDefinitionsGetRoleDefinitionByIdParameters): StreamableMethod<RoleDefinitionsGetRoleDefinitionById200Response | RoleDefinitionsGetRoleDefinitionByIddefaultResponse>;
|
|
27
|
+
}
|
|
28
|
+
export interface RoleDefinitionsListScopes {
|
|
29
|
+
/** List rbac scopes. */
|
|
30
|
+
get(options?: RoleDefinitionsListScopesParameters): StreamableMethod<RoleDefinitionsListScopes200Response | RoleDefinitionsListScopesdefaultResponse>;
|
|
31
|
+
}
|
|
32
|
+
export interface Routes {
|
|
33
|
+
/** Resource for '/checkAccessSynapseRbac' has methods for the following verbs: post */
|
|
34
|
+
(path: "/checkAccessSynapseRbac"): RoleAssignmentsCheckPrincipalAccess;
|
|
35
|
+
/** Resource for '/roleAssignments' has methods for the following verbs: get */
|
|
36
|
+
(path: "/roleAssignments"): RoleAssignmentsListRoleAssignments;
|
|
37
|
+
/** Resource for '/roleAssignments/\{roleAssignmentId\}' has methods for the following verbs: put, get, delete */
|
|
38
|
+
(path: "/roleAssignments/{roleAssignmentId}", roleAssignmentId: string): RoleAssignmentsCreateRoleAssignment;
|
|
39
|
+
/** Resource for '/roleDefinitions' has methods for the following verbs: get */
|
|
40
|
+
(path: "/roleDefinitions"): RoleDefinitionsListRoleDefinitions;
|
|
41
|
+
/** Resource for '/roleDefinitions/\{roleDefinitionId\}' has methods for the following verbs: get */
|
|
42
|
+
(path: "/roleDefinitions/{roleDefinitionId}", roleDefinitionId: string): RoleDefinitionsGetRoleDefinitionById;
|
|
43
|
+
/** Resource for '/rbacScopes' has methods for the following verbs: get */
|
|
44
|
+
(path: "/rbacScopes"): RoleDefinitionsListScopes;
|
|
45
|
+
}
|
|
46
|
+
export type AccessControlRestClient = Client & {
|
|
47
|
+
path: Routes;
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=clientDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,6CAA6C,EAC7C,4CAA4C,EAC5C,6CAA6C,EAC7C,8CAA8C,EAC9C,iDAAiD,EACjD,4CAA4C,EAC5C,8CAA8C,EAC9C,mCAAmC,EACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,8CAA8C,EAC9C,kDAAkD,EAClD,6CAA6C,EAC7C,iDAAiD,EACjD,8CAA8C,EAC9C,kDAAkD,EAClD,+CAA+C,EAC/C,mDAAmD,EACnD,kDAAkD,EAClD,kDAAkD,EAClD,sDAAsD,EACtD,6CAA6C,EAC7C,iDAAiD,EACjD,+CAA+C,EAC/C,mDAAmD,EACnD,oCAAoC,EACpC,wCAAwC,EACzC,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,WAAW,mCAAmC;IAClD,6FAA6F;IAC7F,IAAI,CACF,OAAO,EAAE,6CAA6C,GACrD,gBAAgB,CACf,8CAA8C,GAC9C,kDAAkD,CACrD,CAAC;CACH;AAED,MAAM,WAAW,kCAAkC;IACjD,6BAA6B;IAC7B,GAAG,CACD,OAAO,CAAC,EAAE,4CAA4C,GACrD,gBAAgB,CACf,6CAA6C,GAC7C,iDAAiD,CACpD,CAAC;CACH;AAED,MAAM,WAAW,mCAAmC;IAClD,8BAA8B;IAC9B,GAAG,CACD,O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C;CAClD;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport 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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import AccessControlRestClient from "./accessControlRestClient.js";
|
|
2
|
+
export * from "./accessControlRestClient.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 AccessControlRestClient;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,uBAAuB,MAAM,8BAA8B,CAAC;AAEnE,cAAc,8BAA8B,CAAC;AAC7C,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;AAGpC,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const accessControlRestClient_js_1 = tslib_1.__importDefault(require("./accessControlRestClient.js"));
|
|
7
|
+
tslib_1.__exportStar(require("./accessControlRestClient.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./parameters.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./responses.js"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./isUnexpected.js"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./models.js"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./outputModels.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./paginateHelper.js"), exports);
|
|
15
|
+
// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named
|
|
16
|
+
exports.default = accessControlRestClient_js_1.default;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,sGAAmE;AAEnE,uEAA6C;AAC7C,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAClC,8DAAoC;AAEpC,kEAAkE;AAClE,kBAAe,oCAAuB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport AccessControlRestClient from \"./accessControlRestClient.js\";\n\nexport * from \"./accessControlRestClient.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\n// eslint-disable-next-line @azure/azure-sdk/ts-modules-only-named\nexport default AccessControlRestClient;\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
//# sourceMappingURL=isUnexpected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8CAA8C,EAC9C,kDAAkD,EAClD,6CAA6C,EAC7C,iDAAiD,EACjD,8CAA8C,EAC9C,kDAAkD,EAClD,+CAA+C,EAC/C,mDAAmD,EACnD,kDAAkD,EAClD,kDAAkD,EAClD,sDAAsD,EACtD,6CAA6C,EAC7C,iDAAiD,EACjD,+CAA+C,EAC/C,mDAAmD,EACnD,oCAAoC,EACpC,wCAAwC,EACzC,MAAM,gBAAgB,CAAC;AAaxB,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,8CAA8C,GAC9C,kDAAkD,GACrD,QAAQ,IAAI,kDAAkD,CAAC;AAClE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,6CAA6C,GAC7C,iDAAiD,GACpD,QAAQ,IAAI,iDAAiD,CAAC;AACjE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,8CAA8C,GAC9C,kDAAkD,GACrD,QAAQ,IAAI,kDAAkD,CAAC;AAClE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+CAA+C,GAC/C,mDAAmD,GACtD,QAAQ,IAAI,mDAAmD,CAAC;AACnE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,kDAAkD,GAClD,kDAAkD,GAClD,sDAAsD,GACzD,QAAQ,IAAI,sDAAsD,CAAC;AACtE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,6CAA6C,GAC7C,iDAAiD,GACpD,QAAQ,IAAI,iDAAiD,CAAC;AACjE,wBAAgB,YAAY,CAC1B,QAAQ,EACJ,+CAA+C,GAC/C,mDAAmD,GACtD,QAAQ,IAAI,mDAAmD,CAAC;AACnE,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,oCAAoC,GAAG,wCAAwC,GACxF,QAAQ,IAAI,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isUnexpected = isUnexpected;
|
|
6
|
+
const responseMap = {
|
|
7
|
+
"POST /checkAccessSynapseRbac": ["200"],
|
|
8
|
+
"GET /roleAssignments": ["200"],
|
|
9
|
+
"PUT /roleAssignments/{roleAssignmentId}": ["200"],
|
|
10
|
+
"GET /roleAssignments/{roleAssignmentId}": ["200"],
|
|
11
|
+
"DELETE /roleAssignments/{roleAssignmentId}": ["200", "204"],
|
|
12
|
+
"GET /roleDefinitions": ["200"],
|
|
13
|
+
"GET /roleDefinitions/{roleDefinitionId}": ["200"],
|
|
14
|
+
"GET /rbacScopes": ["200"],
|
|
15
|
+
};
|
|
16
|
+
function isUnexpected(response) {
|
|
17
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
18
|
+
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
19
|
+
const method = response.request.method;
|
|
20
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
21
|
+
if (!pathDetails) {
|
|
22
|
+
pathDetails = geParametrizedPathSuccess(url.pathname);
|
|
23
|
+
}
|
|
24
|
+
return !pathDetails.includes(response.status);
|
|
25
|
+
}
|
|
26
|
+
function geParametrizedPathSuccess(path) {
|
|
27
|
+
const pathParts = path.split("/");
|
|
28
|
+
// Iterate the responseMap to find a match
|
|
29
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
30
|
+
// Extracting the path from the map key which is in format
|
|
31
|
+
// GET /path/foo
|
|
32
|
+
const candidatePath = getPathFromMapKey(key);
|
|
33
|
+
// Get each part of the url path
|
|
34
|
+
const candidateParts = candidatePath.split("/");
|
|
35
|
+
// If the candidate and actual paths don't match in size
|
|
36
|
+
// we move on to the next candidate path
|
|
37
|
+
if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {
|
|
38
|
+
// track if we have found a match to return the values found.
|
|
39
|
+
let found = true;
|
|
40
|
+
for (let i = 0; i < candidateParts.length; i++) {
|
|
41
|
+
if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) {
|
|
42
|
+
// If the current part of the candidate is a "template" part
|
|
43
|
+
// it is a match with the actual path part on hand
|
|
44
|
+
// skip as the parameterized part can match anything
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// If the candidate part is not a template and
|
|
48
|
+
// the parts don't match mark the candidate as not found
|
|
49
|
+
// to move on with the next candidate path.
|
|
50
|
+
if (candidateParts[i] !== pathParts[i]) {
|
|
51
|
+
found = false;
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// We finished evaluating the current candidate parts
|
|
56
|
+
// if all parts matched we return the success values form
|
|
57
|
+
// the path mapping.
|
|
58
|
+
if (found) {
|
|
59
|
+
return value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// No match was found, return an empty array.
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
function hasParametrizedPath(path) {
|
|
67
|
+
return path.includes("/{");
|
|
68
|
+
}
|
|
69
|
+
function getPathFromMapKey(mapKey) {
|
|
70
|
+
const pathStart = mapKey.indexOf("/");
|
|
71
|
+
return mapKey.slice(pathStart);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwElC,oCAoCC;AAtFD,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,SAAgB,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;IACz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gBAED,8CAA8C;gBAC9C,wDAAwD;gBACxD,2CAA2C;gBAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;oBACvC,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;YACH,CAAC;YAED,qDAAqD;YACrD,yDAAyD;YACzD,oBAAoB;YACpB,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;IAED,6CAA6C;IAC7C,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7B,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 = 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"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface CheckPrincipalAccessRequest {
|
|
2
|
+
/** Subject details */
|
|
3
|
+
subject: SubjectInfo;
|
|
4
|
+
/** List of actions. */
|
|
5
|
+
actions: Array<RequiredAction>;
|
|
6
|
+
/** Scope at which the check access is done. */
|
|
7
|
+
scope: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SubjectInfo {
|
|
10
|
+
/**
|
|
11
|
+
* Principal Id
|
|
12
|
+
*
|
|
13
|
+
* Value may contain a UUID
|
|
14
|
+
*/
|
|
15
|
+
principalId: string;
|
|
16
|
+
/** List of group Ids that the principalId is part of. */
|
|
17
|
+
groupIds?: Array<string>;
|
|
18
|
+
}
|
|
19
|
+
export interface RequiredAction {
|
|
20
|
+
/** Action Id. */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Is a data action or not. */
|
|
23
|
+
isDataAction: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface RoleAssignmentRequest {
|
|
26
|
+
/**
|
|
27
|
+
* Role ID of the Synapse Built-In Role
|
|
28
|
+
*
|
|
29
|
+
* Value may contain a UUID
|
|
30
|
+
*/
|
|
31
|
+
roleId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Object ID of the AAD principal or security-group
|
|
34
|
+
*
|
|
35
|
+
* Value may contain a UUID
|
|
36
|
+
*/
|
|
37
|
+
principalId: string;
|
|
38
|
+
/** Scope at which the role assignment is created */
|
|
39
|
+
scope: string;
|
|
40
|
+
/** Type of the principal Id: User, Group or ServicePrincipal */
|
|
41
|
+
principalType?: string;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=models.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\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"]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export interface CheckPrincipalAccessResponseOutput {
|
|
2
|
+
/** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */
|
|
3
|
+
AccessDecisions?: Array<CheckAccessDecisionOutput>;
|
|
4
|
+
}
|
|
5
|
+
export interface CheckAccessDecisionOutput {
|
|
6
|
+
/** Access Decision. */
|
|
7
|
+
accessDecision?: string;
|
|
8
|
+
/** Action Id. */
|
|
9
|
+
actionId?: string;
|
|
10
|
+
/** Role Assignment response details */
|
|
11
|
+
roleAssignment?: RoleAssignmentDetailsOutput;
|
|
12
|
+
}
|
|
13
|
+
export interface RoleAssignmentDetailsOutput {
|
|
14
|
+
/** Role Assignment ID */
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Role ID of the Synapse Built-In Role
|
|
18
|
+
*
|
|
19
|
+
* Value may contain a UUID
|
|
20
|
+
*/
|
|
21
|
+
roleDefinitionId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Object ID of the AAD principal or security-group
|
|
24
|
+
*
|
|
25
|
+
* Value may contain a UUID
|
|
26
|
+
*/
|
|
27
|
+
principalId?: string;
|
|
28
|
+
/** Scope at the role assignment is created */
|
|
29
|
+
scope?: string;
|
|
30
|
+
/** Type of the principal Id: User, Group or ServicePrincipal */
|
|
31
|
+
principalType?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ErrorContractOutput {
|
|
34
|
+
/** The error details. */
|
|
35
|
+
error?: ErrorResponseOutput;
|
|
36
|
+
}
|
|
37
|
+
export interface ErrorResponseOutput {
|
|
38
|
+
/** The error code. */
|
|
39
|
+
code?: string;
|
|
40
|
+
/** The error message. */
|
|
41
|
+
message?: string;
|
|
42
|
+
/** The error target. */
|
|
43
|
+
target?: string;
|
|
44
|
+
/** The error details. */
|
|
45
|
+
details?: Array<ErrorResponseOutput>;
|
|
46
|
+
/** The error additional info. */
|
|
47
|
+
additionalInfo?: Array<ErrorAdditionalInfoOutput>;
|
|
48
|
+
}
|
|
49
|
+
export interface ErrorAdditionalInfoOutput {
|
|
50
|
+
/** The additional info type. */
|
|
51
|
+
type?: string;
|
|
52
|
+
/** The additional info. */
|
|
53
|
+
info?: Record<string, unknown>;
|
|
54
|
+
}
|
|
55
|
+
export interface RoleAssignmentDetailsListOutput {
|
|
56
|
+
/** Number of role assignments */
|
|
57
|
+
count?: number;
|
|
58
|
+
/** A list of role assignments */
|
|
59
|
+
value?: Array<RoleAssignmentDetailsOutput>;
|
|
60
|
+
}
|
|
61
|
+
export interface SynapseRoleDefinitionOutput {
|
|
62
|
+
/**
|
|
63
|
+
* Role Definition ID
|
|
64
|
+
*
|
|
65
|
+
* Value may contain a UUID
|
|
66
|
+
*/
|
|
67
|
+
id?: string;
|
|
68
|
+
/** Name of the Synapse role */
|
|
69
|
+
name?: string;
|
|
70
|
+
/** Is a built-in role or not */
|
|
71
|
+
isBuiltIn?: boolean;
|
|
72
|
+
/** Description for the Synapse role */
|
|
73
|
+
description?: string;
|
|
74
|
+
/** Permissions for the Synapse role */
|
|
75
|
+
permissions?: Array<SynapseRbacPermissionOutput>;
|
|
76
|
+
/** Allowed scopes for the Synapse role */
|
|
77
|
+
scopes?: Array<string>;
|
|
78
|
+
/** Availability of the Synapse role */
|
|
79
|
+
availabilityStatus?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface SynapseRbacPermissionOutput {
|
|
82
|
+
/** List of actions */
|
|
83
|
+
actions?: Array<string>;
|
|
84
|
+
/** List of Not actions */
|
|
85
|
+
notActions?: Array<string>;
|
|
86
|
+
/** List of data actions */
|
|
87
|
+
dataActions?: Array<string>;
|
|
88
|
+
/** List of Not data actions */
|
|
89
|
+
notDataActions?: Array<string>;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=outputModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kCAAkC;IACjD,6HAA6H;IAC7H,eAAe,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,yBAAyB;IACxC,uBAAuB;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAED,MAAM,WAAW,2BAA2B;IAC1C,yBAAyB;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAA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ACvC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C,sBAAsB;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,2BAA2B;IAC3B,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,+BAA+B;IAC/B,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport interface CheckPrincipalAccessResponseOutput {\n /** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */\n AccessDecisions?: Array<CheckAccessDecisionOutput>;\n}\n\nexport interface CheckAccessDecisionOutput {\n /** Access Decision. */\n accessDecision?: string;\n /** Action Id. */\n actionId?: string;\n /** Role Assignment response details */\n roleAssignment?: RoleAssignmentDetailsOutput;\n}\n\nexport interface RoleAssignmentDetailsOutput {\n /** Role Assignment ID */\n id?: string;\n /**\n * Role ID of the Synapse Built-In Role\n *\n * Value may contain a UUID\n */\n roleDefinitionId?: 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 the role assignment is created */\n scope?: string;\n /** Type of the principal Id: User, Group or ServicePrincipal */\n principalType?: string;\n}\n\nexport interface ErrorContractOutput {\n /** The error details. */\n error?: ErrorResponseOutput;\n}\n\nexport interface ErrorResponseOutput {\n /** The error code. */\n code?: string;\n /** The error message. */\n message?: string;\n /** The error target. */\n target?: string;\n /** The error details. */\n details?: Array<ErrorResponseOutput>;\n /** The error additional info. */\n additionalInfo?: Array<ErrorAdditionalInfoOutput>;\n}\n\nexport interface ErrorAdditionalInfoOutput {\n /** The additional info type. */\n type?: string;\n /** The additional info. */\n info?: Record<string, unknown>;\n}\n\nexport interface RoleAssignmentDetailsListOutput {\n /** Number of role assignments */\n count?: number;\n /** A list of role assignments */\n value?: Array<RoleAssignmentDetailsOutput>;\n}\n\nexport interface SynapseRoleDefinitionOutput {\n /**\n * Role Definition ID\n *\n * Value may contain a UUID\n */\n id?: string;\n /** Name of the Synapse role */\n name?: string;\n /** Is a built-in role or not */\n isBuiltIn?: boolean;\n /** Description for the Synapse role */\n description?: string;\n /** Permissions for the Synapse role */\n permissions?: Array<SynapseRbacPermissionOutput>;\n /** Allowed scopes for the Synapse role */\n scopes?: Array<string>;\n /** Availability of the Synapse role */\n availabilityStatus?: string;\n}\n\nexport interface SynapseRbacPermissionOutput {\n /** List of actions */\n actions?: Array<string>;\n /** List of Not actions */\n notActions?: Array<string>;\n /** List of data actions */\n dataActions?: Array<string>;\n /** List of Not data actions */\n notDataActions?: Array<string>;\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
/**
|
|
4
|
+
* Helper type to extract the type of an array
|
|
5
|
+
*/
|
|
6
|
+
export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
|
|
7
|
+
/**
|
|
8
|
+
* The type of a custom function that defines how to get a page and a link to the next one if any.
|
|
9
|
+
*/
|
|
10
|
+
export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
|
|
11
|
+
page: TPage;
|
|
12
|
+
nextPageLink?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Options for the paging helper
|
|
16
|
+
*/
|
|
17
|
+
export interface PagingOptions<TResponse> {
|
|
18
|
+
/**
|
|
19
|
+
* Custom function to extract pagination details for crating the PagedAsyncIterableIterator
|
|
20
|
+
*/
|
|
21
|
+
customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Helper type to infer the Type of the paged elements from the response type
|
|
25
|
+
* This type is generated based on the swagger information for x-ms-pageable
|
|
26
|
+
* specifically on the itemName property which indicates the property of the response
|
|
27
|
+
* where the page items are found. The default value is `value`.
|
|
28
|
+
* This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
|
|
29
|
+
*/
|
|
30
|
+
export type PaginateReturn<TResult> = TResult extends {
|
|
31
|
+
body: {
|
|
32
|
+
value?: infer TPage;
|
|
33
|
+
};
|
|
34
|
+
} ? GetArrayType<TPage> : Array<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
37
|
+
* @param client - Client to use for sending the next page requests
|
|
38
|
+
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
39
|
+
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
40
|
+
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
41
|
+
*/
|
|
42
|
+
export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
|
|
43
|
+
//# sourceMappingURL=paginateHelper.d.ts.map
|