@azure/synapse-access-control 1.0.0-beta.2 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -20
  3. package/dist/browser/accessControlClient.d.ts +21 -0
  4. package/dist/browser/accessControlClient.d.ts.map +1 -0
  5. package/dist/browser/accessControlClient.js +103 -0
  6. package/dist/browser/accessControlClient.js.map +1 -0
  7. package/dist/browser/index.d.ts +4 -0
  8. package/dist/browser/index.d.ts.map +1 -0
  9. package/dist/browser/index.js +11 -0
  10. package/dist/browser/index.js.map +1 -0
  11. package/dist/browser/models/index.d.ts +213 -0
  12. package/dist/browser/models/index.d.ts.map +1 -0
  13. package/dist/browser/models/index.js +9 -0
  14. package/dist/browser/models/index.js.map +1 -0
  15. package/dist/browser/models/mappers.d.ts +16 -0
  16. package/dist/browser/models/mappers.d.ts.map +1 -0
  17. package/dist/browser/models/mappers.js +457 -0
  18. package/dist/browser/models/mappers.js.map +1 -0
  19. package/dist/browser/models/parameters.d.ts +20 -0
  20. package/dist/browser/models/parameters.d.ts.map +1 -0
  21. package/dist/browser/models/parameters.js +149 -0
  22. package/dist/browser/models/parameters.js.map +1 -0
  23. package/dist/browser/operations/index.d.ts +3 -0
  24. package/dist/browser/operations/index.d.ts.map +1 -0
  25. package/dist/browser/operations/index.js +10 -0
  26. package/dist/browser/operations/index.js.map +1 -0
  27. package/dist/browser/operations/roleAssignments.d.ts +55 -0
  28. package/dist/browser/operations/roleAssignments.d.ts.map +1 -0
  29. package/dist/browser/operations/roleAssignments.js +210 -0
  30. package/dist/browser/operations/roleAssignments.js.map +1 -0
  31. package/dist/browser/operations/roleDefinitions.d.ts +29 -0
  32. package/dist/browser/operations/roleDefinitions.d.ts.map +1 -0
  33. package/dist/browser/operations/roleDefinitions.js +110 -0
  34. package/dist/browser/operations/roleDefinitions.js.map +1 -0
  35. package/dist/browser/operationsInterfaces/index.d.ts +3 -0
  36. package/dist/browser/operationsInterfaces/index.d.ts.map +1 -0
  37. package/dist/browser/operationsInterfaces/index.js +10 -0
  38. package/dist/browser/operationsInterfaces/index.js.map +1 -0
  39. package/dist/browser/operationsInterfaces/roleAssignments.d.ts +40 -0
  40. package/dist/browser/operationsInterfaces/roleAssignments.d.ts.map +1 -0
  41. package/dist/browser/operationsInterfaces/roleAssignments.js +9 -0
  42. package/dist/browser/operationsInterfaces/roleAssignments.js.map +1 -0
  43. package/dist/browser/operationsInterfaces/roleDefinitions.d.ts +21 -0
  44. package/dist/browser/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
  45. package/dist/browser/operationsInterfaces/roleDefinitions.js +9 -0
  46. package/dist/browser/operationsInterfaces/roleDefinitions.js.map +1 -0
  47. package/dist/browser/package.json +3 -0
  48. package/dist/browser/tracing.d.ts +2 -0
  49. package/dist/browser/tracing.d.ts.map +1 -0
  50. package/dist/browser/tracing.js +14 -0
  51. package/dist/browser/tracing.js.map +1 -0
  52. package/dist/commonjs/accessControlClient.d.ts +21 -0
  53. package/dist/commonjs/accessControlClient.d.ts.map +1 -0
  54. package/dist/commonjs/accessControlClient.js +108 -0
  55. package/dist/commonjs/accessControlClient.js.map +1 -0
  56. package/dist/commonjs/index.d.ts +4 -0
  57. package/dist/commonjs/index.d.ts.map +1 -0
  58. package/dist/commonjs/index.js +16 -0
  59. package/dist/commonjs/index.js.map +1 -0
  60. package/dist/commonjs/models/index.d.ts +213 -0
  61. package/dist/commonjs/models/index.d.ts.map +1 -0
  62. package/dist/commonjs/models/index.js +10 -0
  63. package/dist/commonjs/models/index.js.map +1 -0
  64. package/dist/commonjs/models/mappers.d.ts +16 -0
  65. package/dist/commonjs/models/mappers.d.ts.map +1 -0
  66. package/dist/commonjs/models/mappers.js +460 -0
  67. package/dist/commonjs/models/mappers.js.map +1 -0
  68. package/dist/commonjs/models/parameters.d.ts +20 -0
  69. package/dist/commonjs/models/parameters.d.ts.map +1 -0
  70. package/dist/commonjs/models/parameters.js +152 -0
  71. package/dist/commonjs/models/parameters.js.map +1 -0
  72. package/dist/commonjs/operations/index.d.ts +3 -0
  73. package/dist/commonjs/operations/index.d.ts.map +1 -0
  74. package/dist/commonjs/operations/index.js +13 -0
  75. package/dist/commonjs/operations/index.js.map +1 -0
  76. package/dist/commonjs/operations/roleAssignments.d.ts +55 -0
  77. package/dist/commonjs/operations/roleAssignments.d.ts.map +1 -0
  78. package/dist/commonjs/operations/roleAssignments.js +215 -0
  79. package/dist/commonjs/operations/roleAssignments.js.map +1 -0
  80. package/dist/commonjs/operations/roleDefinitions.d.ts +29 -0
  81. package/dist/commonjs/operations/roleDefinitions.d.ts.map +1 -0
  82. package/dist/commonjs/operations/roleDefinitions.js +115 -0
  83. package/dist/commonjs/operations/roleDefinitions.js.map +1 -0
  84. package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
  85. package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
  86. package/dist/commonjs/operationsInterfaces/index.js +13 -0
  87. package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
  88. package/dist/commonjs/operationsInterfaces/roleAssignments.d.ts +40 -0
  89. package/dist/commonjs/operationsInterfaces/roleAssignments.d.ts.map +1 -0
  90. package/dist/commonjs/operationsInterfaces/roleAssignments.js +10 -0
  91. package/dist/commonjs/operationsInterfaces/roleAssignments.js.map +1 -0
  92. package/dist/commonjs/operationsInterfaces/roleDefinitions.d.ts +21 -0
  93. package/dist/commonjs/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
  94. package/dist/commonjs/operationsInterfaces/roleDefinitions.js +10 -0
  95. package/dist/commonjs/operationsInterfaces/roleDefinitions.js.map +1 -0
  96. package/dist/commonjs/package.json +3 -0
  97. package/dist/commonjs/tracing.d.ts +2 -0
  98. package/dist/commonjs/tracing.d.ts.map +1 -0
  99. package/dist/commonjs/tracing.js +17 -0
  100. package/dist/commonjs/tracing.js.map +1 -0
  101. package/dist/commonjs/tsdoc-metadata.json +11 -0
  102. package/dist/esm/accessControlClient.d.ts +21 -0
  103. package/dist/esm/accessControlClient.d.ts.map +1 -0
  104. package/dist/esm/accessControlClient.js +103 -0
  105. package/dist/esm/accessControlClient.js.map +1 -0
  106. package/dist/esm/index.d.ts +4 -0
  107. package/dist/esm/index.d.ts.map +1 -0
  108. package/dist/esm/index.js +11 -0
  109. package/dist/esm/index.js.map +1 -0
  110. package/dist/esm/models/index.d.ts +213 -0
  111. package/dist/esm/models/index.d.ts.map +1 -0
  112. package/dist/esm/models/index.js +9 -0
  113. package/dist/esm/models/index.js.map +1 -0
  114. package/dist/esm/models/mappers.d.ts +16 -0
  115. package/dist/esm/models/mappers.d.ts.map +1 -0
  116. package/dist/esm/models/mappers.js +457 -0
  117. package/dist/esm/models/mappers.js.map +1 -0
  118. package/dist/esm/models/parameters.d.ts +20 -0
  119. package/dist/esm/models/parameters.d.ts.map +1 -0
  120. package/dist/esm/models/parameters.js +149 -0
  121. package/dist/esm/models/parameters.js.map +1 -0
  122. package/dist/esm/operations/index.d.ts +3 -0
  123. package/dist/esm/operations/index.d.ts.map +1 -0
  124. package/dist/esm/operations/index.js +10 -0
  125. package/dist/esm/operations/index.js.map +1 -0
  126. package/dist/esm/operations/roleAssignments.d.ts +55 -0
  127. package/dist/esm/operations/roleAssignments.d.ts.map +1 -0
  128. package/dist/esm/operations/roleAssignments.js +210 -0
  129. package/dist/esm/operations/roleAssignments.js.map +1 -0
  130. package/dist/esm/operations/roleDefinitions.d.ts +29 -0
  131. package/dist/esm/operations/roleDefinitions.d.ts.map +1 -0
  132. package/dist/esm/operations/roleDefinitions.js +110 -0
  133. package/dist/esm/operations/roleDefinitions.js.map +1 -0
  134. package/dist/esm/operationsInterfaces/index.d.ts +3 -0
  135. package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
  136. package/dist/esm/operationsInterfaces/index.js +10 -0
  137. package/dist/esm/operationsInterfaces/index.js.map +1 -0
  138. package/dist/esm/operationsInterfaces/roleAssignments.d.ts +40 -0
  139. package/dist/esm/operationsInterfaces/roleAssignments.d.ts.map +1 -0
  140. package/dist/esm/operationsInterfaces/roleAssignments.js +9 -0
  141. package/dist/esm/operationsInterfaces/roleAssignments.js.map +1 -0
  142. package/dist/esm/operationsInterfaces/roleDefinitions.d.ts +21 -0
  143. package/dist/esm/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
  144. package/dist/esm/operationsInterfaces/roleDefinitions.js +9 -0
  145. package/dist/esm/operationsInterfaces/roleDefinitions.js.map +1 -0
  146. package/dist/esm/package.json +3 -0
  147. package/dist/esm/tracing.d.ts +2 -0
  148. package/dist/esm/tracing.d.ts.map +1 -0
  149. package/dist/esm/tracing.js +14 -0
  150. package/dist/esm/tracing.js.map +1 -0
  151. package/dist/react-native/accessControlClient.d.ts +21 -0
  152. package/dist/react-native/accessControlClient.d.ts.map +1 -0
  153. package/dist/react-native/accessControlClient.js +103 -0
  154. package/dist/react-native/accessControlClient.js.map +1 -0
  155. package/dist/react-native/index.d.ts +4 -0
  156. package/dist/react-native/index.d.ts.map +1 -0
  157. package/dist/react-native/index.js +11 -0
  158. package/dist/react-native/index.js.map +1 -0
  159. package/dist/react-native/models/index.d.ts +213 -0
  160. package/dist/react-native/models/index.d.ts.map +1 -0
  161. package/dist/react-native/models/index.js +9 -0
  162. package/dist/react-native/models/index.js.map +1 -0
  163. package/dist/react-native/models/mappers.d.ts +16 -0
  164. package/dist/react-native/models/mappers.d.ts.map +1 -0
  165. package/dist/react-native/models/mappers.js +457 -0
  166. package/dist/react-native/models/mappers.js.map +1 -0
  167. package/dist/react-native/models/parameters.d.ts +20 -0
  168. package/dist/react-native/models/parameters.d.ts.map +1 -0
  169. package/dist/react-native/models/parameters.js +149 -0
  170. package/dist/react-native/models/parameters.js.map +1 -0
  171. package/dist/react-native/operations/index.d.ts +3 -0
  172. package/dist/react-native/operations/index.d.ts.map +1 -0
  173. package/dist/react-native/operations/index.js +10 -0
  174. package/dist/react-native/operations/index.js.map +1 -0
  175. package/dist/react-native/operations/roleAssignments.d.ts +55 -0
  176. package/dist/react-native/operations/roleAssignments.d.ts.map +1 -0
  177. package/dist/react-native/operations/roleAssignments.js +210 -0
  178. package/dist/react-native/operations/roleAssignments.js.map +1 -0
  179. package/dist/react-native/operations/roleDefinitions.d.ts +29 -0
  180. package/dist/react-native/operations/roleDefinitions.d.ts.map +1 -0
  181. package/dist/react-native/operations/roleDefinitions.js +110 -0
  182. package/dist/react-native/operations/roleDefinitions.js.map +1 -0
  183. package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
  184. package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
  185. package/dist/react-native/operationsInterfaces/index.js +10 -0
  186. package/dist/react-native/operationsInterfaces/index.js.map +1 -0
  187. package/dist/react-native/operationsInterfaces/roleAssignments.d.ts +40 -0
  188. package/dist/react-native/operationsInterfaces/roleAssignments.d.ts.map +1 -0
  189. package/dist/react-native/operationsInterfaces/roleAssignments.js +9 -0
  190. package/dist/react-native/operationsInterfaces/roleAssignments.js.map +1 -0
  191. package/dist/react-native/operationsInterfaces/roleDefinitions.d.ts +21 -0
  192. package/dist/react-native/operationsInterfaces/roleDefinitions.d.ts.map +1 -0
  193. package/dist/react-native/operationsInterfaces/roleDefinitions.js +9 -0
  194. package/dist/react-native/operationsInterfaces/roleDefinitions.js.map +1 -0
  195. package/dist/react-native/package.json +3 -0
  196. package/dist/react-native/tracing.d.ts +2 -0
  197. package/dist/react-native/tracing.d.ts.map +1 -0
  198. package/dist/react-native/tracing.js +14 -0
  199. package/dist/react-native/tracing.js.map +1 -0
  200. package/package.json +96 -51
  201. package/CHANGELOG.md +0 -11
  202. package/dist/index.js +0 -3137
  203. package/dist/index.js.map +0 -1
  204. package/dist/index.min.js +0 -1
  205. package/dist/index.min.js.map +0 -1
  206. package/dist-esm/accessControlClient.d.ts +0 -67
  207. package/dist-esm/accessControlClient.d.ts.map +0 -1
  208. package/dist-esm/accessControlClient.js +0 -557
  209. package/dist-esm/accessControlClient.js.map +0 -1
  210. package/dist-esm/accessControlClientContext.d.ts +0 -15
  211. package/dist-esm/accessControlClientContext.d.ts.map +0 -1
  212. package/dist-esm/accessControlClientContext.js +0 -47
  213. package/dist-esm/accessControlClientContext.js.map +0 -1
  214. package/dist-esm/index.d.ts +0 -5
  215. package/dist-esm/index.d.ts.map +0 -1
  216. package/dist-esm/index.js +0 -7
  217. package/dist-esm/index.js.map +0 -1
  218. package/dist-esm/models/index.d.ts +0 -145
  219. package/dist-esm/models/index.d.ts.map +0 -1
  220. package/dist-esm/models/index.js +0 -2
  221. package/dist-esm/models/index.js.map +0 -1
  222. package/dist-esm/models/mappers.d.ts +0 -10
  223. package/dist-esm/models/mappers.d.ts.map +0 -1
  224. package/dist-esm/models/mappers.js +0 -200
  225. package/dist-esm/models/mappers.js.map +0 -1
  226. package/dist-esm/models/parameters.d.ts +0 -13
  227. package/dist-esm/models/parameters.d.ts.map +0 -1
  228. package/dist-esm/models/parameters.js +0 -111
  229. package/dist-esm/models/parameters.js.map +0 -1
  230. package/dist-esm/tracing.d.ts +0 -5
  231. package/dist-esm/tracing.d.ts.map +0 -1
  232. package/dist-esm/tracing.js +0 -8
  233. package/dist-esm/tracing.js.map +0 -1
  234. package/rollup.config.js +0 -41
  235. package/tsconfig.json +0 -20
  236. package/types/synapse-access-control.d.ts +0 -240
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -12,28 +12,27 @@ npm install @azure/synapse-access-control
12
12
 
13
13
  ### Currently supported environments
14
14
 
15
- - Node.js version 8.x.x or higher
16
- - Browser JavaScript
15
+ - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
16
+ - Latest versions of Safari, Chrome, Edge, and Firefox.
17
+
18
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
17
19
 
18
20
  ## Key concepts
19
21
 
20
22
  ## Examples
21
23
 
22
- ```ts
24
+ ```ts snippet:ReadmeSampleCreateClient_Node
23
25
  import { AccessControlClient } from "@azure/synapse-access-control";
24
26
  import { DefaultAzureCredential } from "@azure/identity";
25
27
 
26
- export async function main(): Promise<void> {
27
- const credential = new DefaultAzureCredential();
28
-
29
- let client = new AccessControlClient(
30
- credential,
31
- "https://mysynapse.dev.azuresynapse.net"
32
- );
33
- let list = await client.listRoleDefinitions();
34
- for await (let item of list) {
35
- console.log("item:", item);
36
- }
28
+ const client = new AccessControlClient(
29
+ new DefaultAzureCredential(),
30
+ "https://mysynapse.dev.azuresynapse.net",
31
+ );
32
+
33
+ const roleDefinitions = await client.roleDefinitions.listRoleDefinitions();
34
+ for await (const roleDefinition of roleDefinitions) {
35
+ console.log(`Role Definition ID: ${roleDefinition.id}`);
37
36
  }
38
37
  ```
39
38
 
@@ -41,13 +40,11 @@ export async function main(): Promise<void> {
41
40
 
42
41
  - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
43
42
 
44
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcdn%2Farm-cdn%2FREADME.png)
45
-
46
43
  ## Troubleshooting
47
44
 
48
45
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
49
46
 
50
- ```javascript
47
+ ```ts snippet:SetLogLevel
51
48
  import { setLogLevel } from "@azure/logger";
52
49
 
53
50
  setLogLevel("info");
@@ -59,6 +56,4 @@ In the future, you'll find additional code samples here.
59
56
 
60
57
  ## Contributing
61
58
 
62
- If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
63
-
64
- ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fkeyvault%2Fkeyvault-keys%2FREADME.png)
59
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
@@ -0,0 +1,21 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ import type * as coreAuth from "@azure/core-auth";
3
+ import type { RoleAssignments, RoleDefinitions } from "./operationsInterfaces/index.js";
4
+ import type { AccessControlClientOptionalParams } from "./models/index.js";
5
+ export declare class AccessControlClient extends coreClient.ServiceClient {
6
+ endpoint: string;
7
+ apiVersion: string;
8
+ /**
9
+ * Initializes a new instance of the AccessControlClient class.
10
+ * @param credentials - Subscription credentials which uniquely identify client subscription.
11
+ * @param endpoint - The workspace development endpoint, for example
12
+ * https://myworkspace.dev.azuresynapse.net.
13
+ * @param options - The parameter options
14
+ */
15
+ constructor(credentials: coreAuth.TokenCredential, endpoint: string, options?: AccessControlClientOptionalParams);
16
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
17
+ private addCustomApiVersionPolicy;
18
+ roleAssignments: RoleAssignments;
19
+ roleDefinitions: RoleDefinitions;
20
+ }
21
+ //# sourceMappingURL=accessControlClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessControlClient.d.ts","sourceRoot":"","sources":["../../src/accessControlClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,OAAO,KAAK,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AAE3E,qBAAa,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,iCAAiC;IAoE7C,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IAwBjC,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,eAAe,CAAC;CAClC"}
@@ -0,0 +1,103 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import * as coreClient from "@azure/core-client";
9
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
+ import { RoleAssignmentsImpl, RoleDefinitionsImpl } from "./operations/index.js";
11
+ export class AccessControlClient extends coreClient.ServiceClient {
12
+ endpoint;
13
+ apiVersion;
14
+ /**
15
+ * Initializes a new instance of the AccessControlClient class.
16
+ * @param credentials - Subscription credentials which uniquely identify client subscription.
17
+ * @param endpoint - The workspace development endpoint, for example
18
+ * https://myworkspace.dev.azuresynapse.net.
19
+ * @param options - The parameter options
20
+ */
21
+ constructor(credentials, endpoint, options) {
22
+ if (credentials === undefined) {
23
+ throw new Error("'credentials' cannot be null");
24
+ }
25
+ if (endpoint === undefined) {
26
+ throw new Error("'endpoint' cannot be null");
27
+ }
28
+ // Initializing default values for options
29
+ if (!options) {
30
+ options = {};
31
+ }
32
+ const defaults = {
33
+ requestContentType: "application/json; charset=utf-8",
34
+ credential: credentials,
35
+ };
36
+ const packageDetails = `azsdk-js-synapse-access-control/1.0.0-beta.5`;
37
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
38
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
39
+ : `${packageDetails}`;
40
+ if (!options.credentialScopes) {
41
+ options.credentialScopes = ["https://dev.azuresynapse.net/.default"];
42
+ }
43
+ const optionsWithDefaults = {
44
+ ...defaults,
45
+ ...options,
46
+ userAgentOptions: {
47
+ userAgentPrefix,
48
+ },
49
+ baseUri: options.endpoint ?? options.baseUri ?? "{endpoint}",
50
+ };
51
+ super(optionsWithDefaults);
52
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
53
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
54
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName);
55
+ if (!bearerTokenAuthenticationPolicyFound) {
56
+ this.pipeline.removePolicy({
57
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
58
+ });
59
+ this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
60
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
61
+ challengeCallbacks: {
62
+ authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
63
+ },
64
+ }));
65
+ }
66
+ }
67
+ // Parameter assignments
68
+ this.endpoint = endpoint;
69
+ // Assigning values to Constant parameters
70
+ this.apiVersion = options.apiVersion || "2020-12-01";
71
+ this.roleAssignments = new RoleAssignmentsImpl(this);
72
+ this.roleDefinitions = new RoleDefinitionsImpl(this);
73
+ this.addCustomApiVersionPolicy(options.apiVersion);
74
+ }
75
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
76
+ addCustomApiVersionPolicy(apiVersion) {
77
+ if (!apiVersion) {
78
+ return;
79
+ }
80
+ const apiVersionPolicy = {
81
+ name: "CustomApiVersionPolicy",
82
+ async sendRequest(request, next) {
83
+ const param = request.url.split("?");
84
+ if (param.length > 1) {
85
+ const newParams = param[1].split("&").map((item) => {
86
+ if (item.indexOf("api-version") > -1) {
87
+ return "api-version=" + apiVersion;
88
+ }
89
+ else {
90
+ return item;
91
+ }
92
+ });
93
+ request.url = param[0] + "?" + newParams.join("&");
94
+ }
95
+ return next(request);
96
+ },
97
+ };
98
+ this.pipeline.addPolicy(apiVersionPolicy);
99
+ }
100
+ roleAssignments;
101
+ roleDefinitions;
102
+ }
103
+ //# sourceMappingURL=accessControlClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessControlClient.js","sourceRoot":"","sources":["../../src/accessControlClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjF,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAC/D,QAAQ,CAAS;IACjB,UAAU,CAAS;IAEnB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,QAAgB,EAChB,OAA2C;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,QAAQ,KAAK,SAAS,E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O,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,eAAe,CAAkB;IACjC,eAAe,CAAkB;CAClC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport type { PipelineRequest, PipelineResponse, SendRequest } from \"@azure/core-rest-pipeline\";\nimport type * as coreAuth from \"@azure/core-auth\";\nimport { RoleAssignmentsImpl, RoleDefinitionsImpl } from \"./operations/index.js\";\nimport type { RoleAssignments, RoleDefinitions } from \"./operationsInterfaces/index.js\";\nimport type { AccessControlClientOptionalParams } from \"./models/index.js\";\n\nexport class AccessControlClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the AccessControlClient class.\n * @param credentials - Subscription credentials which uniquely identify client subscription.\n * @param endpoint - The workspace development endpoint, for example\n * https://myworkspace.dev.azuresynapse.net.\n * @param options - The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n endpoint: string,\n options?: AccessControlClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AccessControlClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-synapse-access-control/1.0.0-beta.5`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n if (!options.credentialScopes) {\n options.credentialScopes = [\"https://dev.azuresynapse.net/.default\"];\n }\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2020-12-01\";\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.roleDefinitions = new RoleDefinitionsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string): void {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n roleAssignments: RoleAssignments;\n roleDefinitions: RoleDefinitions;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ export * from "./models/index.js";
2
+ export { AccessControlClient } from "./accessControlClient.js";
3
+ export * from "./operationsInterfaces/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export * from "./models/index.js";
9
+ export { AccessControlClient } from "./accessControlClient.js";
10
+ export * from "./operationsInterfaces/index.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,cAAc,iCAAiC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { AccessControlClient } from \"./accessControlClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
@@ -0,0 +1,213 @@
1
+ import type * as coreClient from "@azure/core-client";
2
+ /** Check access request details */
3
+ export interface CheckPrincipalAccessRequest {
4
+ /** Subject details */
5
+ subject: SubjectInfo;
6
+ /** List of actions. */
7
+ actions: RequiredAction[];
8
+ /** Scope at which the check access is done. */
9
+ scope: string;
10
+ }
11
+ /** Subject details */
12
+ export interface SubjectInfo {
13
+ /** Principal Id */
14
+ principalId: string;
15
+ /** List of group Ids that the principalId is part of. */
16
+ groupIds?: string[];
17
+ }
18
+ /** Action Info */
19
+ export interface RequiredAction {
20
+ /** Action Id. */
21
+ id: string;
22
+ /** Is a data action or not. */
23
+ isDataAction: boolean;
24
+ }
25
+ /** Check access response details */
26
+ export interface CheckPrincipalAccessResponse {
27
+ /** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */
28
+ accessDecisions?: CheckAccessDecision[];
29
+ }
30
+ /** Check access response details */
31
+ export interface CheckAccessDecision {
32
+ /** Access Decision. */
33
+ accessDecision?: string;
34
+ /** Action Id. */
35
+ actionId?: string;
36
+ /** Role Assignment response details */
37
+ roleAssignment?: RoleAssignmentDetails;
38
+ }
39
+ /** Role Assignment response details */
40
+ export interface RoleAssignmentDetails {
41
+ /** Role Assignment ID */
42
+ id?: string;
43
+ /** Role ID of the Synapse Built-In Role */
44
+ roleDefinitionId?: string;
45
+ /** Object ID of the AAD principal or security-group */
46
+ principalId?: string;
47
+ /** Scope at the role assignment is created */
48
+ scope?: string;
49
+ /** Type of the principal Id: User, Group or ServicePrincipal */
50
+ principalType?: string;
51
+ }
52
+ /** Contains details when the response code indicates an error. */
53
+ export interface ErrorContract {
54
+ /** The error details. */
55
+ error?: ErrorResponse;
56
+ }
57
+ /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */
58
+ export interface ErrorResponse {
59
+ /**
60
+ * The error code.
61
+ * NOTE: This property will not be serialized. It can only be populated by the server.
62
+ */
63
+ readonly code?: string;
64
+ /**
65
+ * The error message.
66
+ * NOTE: This property will not be serialized. It can only be populated by the server.
67
+ */
68
+ readonly message?: string;
69
+ /**
70
+ * The error target.
71
+ * NOTE: This property will not be serialized. It can only be populated by the server.
72
+ */
73
+ readonly target?: string;
74
+ /**
75
+ * The error details.
76
+ * NOTE: This property will not be serialized. It can only be populated by the server.
77
+ */
78
+ readonly details?: ErrorResponse[];
79
+ /**
80
+ * The error additional info.
81
+ * NOTE: This property will not be serialized. It can only be populated by the server.
82
+ */
83
+ readonly additionalInfo?: ErrorAdditionalInfo[];
84
+ }
85
+ /** The resource management error additional info. */
86
+ export interface ErrorAdditionalInfo {
87
+ /**
88
+ * The additional info type.
89
+ * NOTE: This property will not be serialized. It can only be populated by the server.
90
+ */
91
+ readonly type?: string;
92
+ /**
93
+ * The additional info.
94
+ * NOTE: This property will not be serialized. It can only be populated by the server.
95
+ */
96
+ readonly info?: Record<string, unknown>;
97
+ }
98
+ /** Role Assignment response details */
99
+ export interface RoleAssignmentDetailsList {
100
+ /** Number of role assignments */
101
+ count?: number;
102
+ /** A list of role assignments */
103
+ value?: RoleAssignmentDetails[];
104
+ }
105
+ /** Role Assignment request details */
106
+ export interface RoleAssignmentRequest {
107
+ /** Role ID of the Synapse Built-In Role */
108
+ roleId: string;
109
+ /** Object ID of the AAD principal or security-group */
110
+ principalId: string;
111
+ /** Scope at which the role assignment is created */
112
+ scope: string;
113
+ /** Type of the principal Id: User, Group or ServicePrincipal */
114
+ principalType?: string;
115
+ }
116
+ /** Synapse role definition details */
117
+ export interface SynapseRoleDefinition {
118
+ /** Role Definition ID */
119
+ id?: string;
120
+ /** Name of the Synapse role */
121
+ name?: string;
122
+ /** Is a built-in role or not */
123
+ isBuiltIn?: boolean;
124
+ /** Description for the Synapse role */
125
+ description?: string;
126
+ /** Permissions for the Synapse role */
127
+ permissions?: SynapseRbacPermission[];
128
+ /** Allowed scopes for the Synapse role */
129
+ scopes?: string[];
130
+ /** Availability of the Synapse role */
131
+ availabilityStatus?: string;
132
+ }
133
+ /** Synapse role definition details */
134
+ export interface SynapseRbacPermission {
135
+ /** List of actions */
136
+ actions?: string[];
137
+ /** List of Not actions */
138
+ notActions?: string[];
139
+ /** List of data actions */
140
+ dataActions?: string[];
141
+ /** List of Not data actions */
142
+ notDataActions?: string[];
143
+ }
144
+ /** Defines headers for RoleAssignments_listRoleAssignments operation. */
145
+ export interface RoleAssignmentsListRoleAssignmentsHeaders {
146
+ /** 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. */
147
+ xMsContinuation?: string;
148
+ }
149
+ /** Optional parameters. */
150
+ export interface RoleAssignmentsCheckPrincipalAccessOptionalParams extends coreClient.OperationOptions {
151
+ }
152
+ /** Contains response data for the checkPrincipalAccess operation. */
153
+ export type RoleAssignmentsCheckPrincipalAccessResponse = CheckPrincipalAccessResponse;
154
+ /** Optional parameters. */
155
+ export interface RoleAssignmentsListRoleAssignmentsOptionalParams extends coreClient.OperationOptions {
156
+ /** Synapse Built-In Role Id. */
157
+ roleId?: string;
158
+ /** Object ID of the AAD principal or security-group. */
159
+ principalId?: string;
160
+ /** Scope of the Synapse Built-in Role. */
161
+ scope?: string;
162
+ /** Continuation token. */
163
+ continuationToken?: string;
164
+ }
165
+ /** Contains response data for the listRoleAssignments operation. */
166
+ export type RoleAssignmentsListRoleAssignmentsResponse = RoleAssignmentsListRoleAssignmentsHeaders & RoleAssignmentDetailsList;
167
+ /** Optional parameters. */
168
+ export interface RoleAssignmentsCreateRoleAssignmentOptionalParams extends coreClient.OperationOptions {
169
+ /** Type of the principal Id: User, Group or ServicePrincipal */
170
+ principalType?: string;
171
+ }
172
+ /** Contains response data for the createRoleAssignment operation. */
173
+ export type RoleAssignmentsCreateRoleAssignmentResponse = RoleAssignmentDetails;
174
+ /** Optional parameters. */
175
+ export interface RoleAssignmentsGetRoleAssignmentByIdOptionalParams extends coreClient.OperationOptions {
176
+ }
177
+ /** Contains response data for the getRoleAssignmentById operation. */
178
+ export type RoleAssignmentsGetRoleAssignmentByIdResponse = RoleAssignmentDetails;
179
+ /** Optional parameters. */
180
+ export interface RoleAssignmentsDeleteRoleAssignmentByIdOptionalParams extends coreClient.OperationOptions {
181
+ /** Scope of the Synapse Built-in Role. */
182
+ scope?: string;
183
+ }
184
+ /** Optional parameters. */
185
+ export interface RoleDefinitionsListRoleDefinitionsOptionalParams extends coreClient.OperationOptions {
186
+ /** Scope of the Synapse Built-in Role. */
187
+ scope?: string;
188
+ /** Is a Synapse Built-In Role or not. */
189
+ isBuiltIn?: boolean;
190
+ }
191
+ /** Contains response data for the listRoleDefinitions operation. */
192
+ export type RoleDefinitionsListRoleDefinitionsResponse = SynapseRoleDefinition[];
193
+ /** Optional parameters. */
194
+ export interface RoleDefinitionsGetRoleDefinitionByIdOptionalParams extends coreClient.OperationOptions {
195
+ }
196
+ /** Contains response data for the getRoleDefinitionById operation. */
197
+ export type RoleDefinitionsGetRoleDefinitionByIdResponse = SynapseRoleDefinition;
198
+ /** Optional parameters. */
199
+ export interface RoleDefinitionsListScopesOptionalParams extends coreClient.OperationOptions {
200
+ }
201
+ /** Contains response data for the listScopes operation. */
202
+ export type RoleDefinitionsListScopesResponse = {
203
+ /** The parsed response body. */
204
+ body: string[];
205
+ };
206
+ /** Optional parameters. */
207
+ export interface AccessControlClientOptionalParams extends coreClient.ServiceClientOptions {
208
+ /** Api Version */
209
+ apiVersion?: string;
210
+ /** Overrides client endpoint. */
211
+ endpoint?: string;
212
+ }
213
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEtD,mCAAmC;AACnC,MAAM,WAAW,2BAA2B;IAC1C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2BAA2B;AAC3B,MAAM,WAAW,qDACf,SAAQ,UAAU,CAAC,gBAAgB;IACnC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2BAA2B;AAC3B,MAAM,WAAW,gDACf,SAAQ,UAAU,CAAC,gBAAgB;IACnC,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yCAAyC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,oEAAoE;AACpE,MAAM,MAAM,0CAA0C,GAAG,qBAAqB,EAAE,CAAC;AAEjF,2BAA2B;AAC3B,MAAM,WAAW,kDACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,sEAAsE;AACtE,MAAM,MAAM,4CAA4C,GAAG,qBAAqB,CAAC;AAEjF,2BAA2B;AAC3B,MAAM,WAAW,uCAAwC,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAE/F,2DAA2D;AAC3D,MAAM,MAAM,iCAAiC,GAAG;IAC9C,gCAAgC;IAChC,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,2BAA2B;AAC3B,MAAM,WAAW,iCAAkC,SAAQ,UAAU,CAAC,oBAAoB;IACxF,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport type * as coreClient from \"@azure/core-client\";\n\n/** Check access request details */\nexport interface CheckPrincipalAccessRequest {\n /** Subject details */\n subject: SubjectInfo;\n /** List of actions. */\n actions: RequiredAction[];\n /** Scope at which the check access is done. */\n scope: string;\n}\n\n/** Subject details */\nexport interface SubjectInfo {\n /** Principal Id */\n principalId: string;\n /** List of group Ids that the principalId is part of. */\n groupIds?: 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/** Check access response details */\nexport interface CheckPrincipalAccessResponse {\n /** To check if the current user, group, or service principal has permission to read artifacts in the specified workspace. */\n accessDecisions?: CheckAccessDecision[];\n}\n\n/** Check access response details */\nexport interface CheckAccessDecision {\n /** Access Decision. */\n accessDecision?: string;\n /** Action Id. */\n actionId?: string;\n /** Role Assignment response details */\n roleAssignment?: RoleAssignmentDetails;\n}\n\n/** Role Assignment response details */\nexport interface RoleAssignmentDetails {\n /** Role Assignment ID */\n id?: string;\n /** Role ID of the Synapse Built-In Role */\n roleDefinitionId?: string;\n /** Object ID of the AAD principal or security-group */\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\n/** Contains details when the response code indicates an error. */\nexport interface ErrorContract {\n /** The error details. */\n error?: ErrorResponse;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.) */\nexport interface ErrorResponse {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The error target.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly target?: string;\n /**\n * The error details.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly details?: ErrorResponse[];\n /**\n * The error additional info.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /**\n * The additional info type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: string;\n /**\n * The additional info.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly info?: Record<string, unknown>;\n}\n\n/** Role Assignment response details */\nexport interface RoleAssignmentDetailsList {\n /** Number of role assignments */\n count?: number;\n /** A list of role assignments */\n value?: RoleAssignmentDetails[];\n}\n\n/** Role Assignment request details */\nexport interface RoleAssignmentRequest {\n /** Role ID of the Synapse Built-In Role */\n roleId: string;\n /** Object ID of the AAD principal or security-group */\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\n/** Synapse role definition details */\nexport interface SynapseRoleDefinition {\n /** Role Definition ID */\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?: SynapseRbacPermission[];\n /** Allowed scopes for the Synapse role */\n scopes?: string[];\n /** Availability of the Synapse role */\n availabilityStatus?: string;\n}\n\n/** Synapse role definition details */\nexport interface SynapseRbacPermission {\n /** List of actions */\n actions?: string[];\n /** List of Not actions */\n notActions?: string[];\n /** List of data actions */\n dataActions?: string[];\n /** List of Not data actions */\n notDataActions?: string[];\n}\n\n/** Defines headers for RoleAssignments_listRoleAssignments operation. */\nexport interface RoleAssignmentsListRoleAssignmentsHeaders {\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 xMsContinuation?: string;\n}\n\n/** Optional parameters. */\nexport interface RoleAssignmentsCheckPrincipalAccessOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the checkPrincipalAccess operation. */\nexport type RoleAssignmentsCheckPrincipalAccessResponse = CheckPrincipalAccessResponse;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsListRoleAssignmentsOptionalParams\n extends coreClient.OperationOptions {\n /** Synapse Built-In Role Id. */\n roleId?: string;\n /** Object ID of the AAD principal or security-group. */\n principalId?: string;\n /** Scope of the Synapse Built-in Role. */\n scope?: string;\n /** Continuation token. */\n continuationToken?: string;\n}\n\n/** Contains response data for the listRoleAssignments operation. */\nexport type RoleAssignmentsListRoleAssignmentsResponse = RoleAssignmentsListRoleAssignmentsHeaders &\n RoleAssignmentDetailsList;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsCreateRoleAssignmentOptionalParams\n extends coreClient.OperationOptions {\n /** Type of the principal Id: User, Group or ServicePrincipal */\n principalType?: string;\n}\n\n/** Contains response data for the createRoleAssignment operation. */\nexport type RoleAssignmentsCreateRoleAssignmentResponse = RoleAssignmentDetails;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsGetRoleAssignmentByIdOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getRoleAssignmentById operation. */\nexport type RoleAssignmentsGetRoleAssignmentByIdResponse = RoleAssignmentDetails;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsDeleteRoleAssignmentByIdOptionalParams\n extends coreClient.OperationOptions {\n /** Scope of the Synapse Built-in Role. */\n scope?: string;\n}\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListRoleDefinitionsOptionalParams\n extends coreClient.OperationOptions {\n /** Scope of the Synapse Built-in Role. */\n scope?: string;\n /** Is a Synapse Built-In Role or not. */\n isBuiltIn?: boolean;\n}\n\n/** Contains response data for the listRoleDefinitions operation. */\nexport type RoleDefinitionsListRoleDefinitionsResponse = SynapseRoleDefinition[];\n\n/** Optional parameters. */\nexport interface RoleDefinitionsGetRoleDefinitionByIdOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getRoleDefinitionById operation. */\nexport type RoleDefinitionsGetRoleDefinitionByIdResponse = SynapseRoleDefinition;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListScopesOptionalParams extends coreClient.OperationOptions {}\n\n/** Contains response data for the listScopes operation. */\nexport type RoleDefinitionsListScopesResponse = {\n /** The parsed response body. */\n body: string[];\n};\n\n/** Optional parameters. */\nexport interface AccessControlClientOptionalParams extends coreClient.ServiceClientOptions {\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import type * as coreClient from "@azure/core-client";
2
+ export declare const CheckPrincipalAccessRequest: coreClient.CompositeMapper;
3
+ export declare const SubjectInfo: coreClient.CompositeMapper;
4
+ export declare const RequiredAction: coreClient.CompositeMapper;
5
+ export declare const CheckPrincipalAccessResponse: coreClient.CompositeMapper;
6
+ export declare const CheckAccessDecision: coreClient.CompositeMapper;
7
+ export declare const RoleAssignmentDetails: coreClient.CompositeMapper;
8
+ export declare const ErrorContract: coreClient.CompositeMapper;
9
+ export declare const ErrorResponse: coreClient.CompositeMapper;
10
+ export declare const ErrorAdditionalInfo: coreClient.CompositeMapper;
11
+ export declare const RoleAssignmentDetailsList: coreClient.CompositeMapper;
12
+ export declare const RoleAssignmentRequest: coreClient.CompositeMapper;
13
+ export declare const SynapseRoleDefinition: coreClient.CompositeMapper;
14
+ export declare const SynapseRbacPermission: coreClient.CompositeMapper;
15
+ export declare const RoleAssignmentsListRoleAssignmentsHeaders: coreClient.CompositeMapper;
16
+ //# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../src/models/mappers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,eAkCpD,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,eAyBpC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,eAqBvC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,UAAU,CAAC,eAmBrD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eA0B5C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAqC9C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eActC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eAsDtC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAsB5C,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,eAyBlD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAkC9C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eA4D9C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAmD9C,CAAC;AAEF,eAAO,MAAM,yCAAyC,EAAE,UAAU,CAAC,eAalE,CAAC"}