@azure-rest/synapse-access-control 1.0.0-alpha.20241120.1 → 1.0.0-alpha.20241125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/accessControlRestClient.d.ts +5 -0
  3. package/dist/browser/accessControlRestClient.d.ts.map +1 -0
  4. package/{dist-esm/src → dist/browser}/accessControlRestClient.js +2 -2
  5. package/dist/browser/accessControlRestClient.js.map +1 -0
  6. package/dist/browser/clientDefinitions.d.ts +49 -0
  7. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  8. package/dist/browser/clientDefinitions.js.map +1 -0
  9. package/dist/browser/index.d.ts +11 -0
  10. package/dist/browser/index.d.ts.map +1 -0
  11. package/dist/browser/index.js +14 -0
  12. package/dist/browser/index.js.map +1 -0
  13. package/dist/browser/isUnexpected.d.ts +10 -0
  14. package/dist/browser/isUnexpected.d.ts.map +1 -0
  15. package/{dist-esm/src → dist/browser}/isUnexpected.js +3 -5
  16. package/dist/browser/isUnexpected.js.map +1 -0
  17. package/dist/browser/models.d.ts +43 -0
  18. package/dist/browser/models.d.ts.map +1 -0
  19. package/dist/browser/outputModels.d.ts +91 -0
  20. package/dist/browser/outputModels.d.ts.map +1 -0
  21. package/dist/browser/package.json +3 -0
  22. package/dist/browser/paginateHelper.d.ts +43 -0
  23. package/dist/browser/paginateHelper.d.ts.map +1 -0
  24. package/{dist-esm/src → dist/browser}/paginateHelper.js +4 -17
  25. package/dist/browser/paginateHelper.js.map +1 -0
  26. package/dist/browser/parameters.d.ts +62 -0
  27. package/dist/browser/parameters.d.ts.map +1 -0
  28. package/dist/browser/parameters.js.map +1 -0
  29. package/dist/browser/responses.d.ts +94 -0
  30. package/dist/browser/responses.d.ts.map +1 -0
  31. package/dist/browser/responses.js.map +1 -0
  32. package/dist/commonjs/accessControlRestClient.d.ts +5 -0
  33. package/dist/commonjs/accessControlRestClient.d.ts.map +1 -0
  34. package/dist/commonjs/accessControlRestClient.js +24 -0
  35. package/dist/commonjs/accessControlRestClient.js.map +1 -0
  36. package/dist/commonjs/clientDefinitions.d.ts +49 -0
  37. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  38. package/dist/commonjs/clientDefinitions.js +5 -0
  39. package/dist/commonjs/clientDefinitions.js.map +1 -0
  40. package/dist/commonjs/index.d.ts +11 -0
  41. package/dist/commonjs/index.d.ts.map +1 -0
  42. package/dist/commonjs/index.js +17 -0
  43. package/dist/commonjs/index.js.map +1 -0
  44. package/dist/commonjs/isUnexpected.d.ts +10 -0
  45. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  46. package/dist/commonjs/isUnexpected.js +73 -0
  47. package/dist/commonjs/isUnexpected.js.map +1 -0
  48. package/dist/commonjs/models.d.ts +43 -0
  49. package/dist/commonjs/models.d.ts.map +1 -0
  50. package/dist/commonjs/models.js +5 -0
  51. package/dist/commonjs/models.js.map +1 -0
  52. package/dist/commonjs/outputModels.d.ts +91 -0
  53. package/dist/commonjs/outputModels.d.ts.map +1 -0
  54. package/dist/commonjs/outputModels.js +5 -0
  55. package/dist/commonjs/outputModels.js.map +1 -0
  56. package/dist/commonjs/package.json +3 -0
  57. package/dist/commonjs/paginateHelper.d.ts +43 -0
  58. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  59. package/dist/commonjs/paginateHelper.js +73 -0
  60. package/dist/commonjs/paginateHelper.js.map +1 -0
  61. package/dist/commonjs/parameters.d.ts +62 -0
  62. package/dist/commonjs/parameters.d.ts.map +1 -0
  63. package/dist/commonjs/parameters.js +5 -0
  64. package/dist/commonjs/parameters.js.map +1 -0
  65. package/dist/commonjs/responses.d.ts +94 -0
  66. package/dist/commonjs/responses.d.ts.map +1 -0
  67. package/dist/commonjs/responses.js +5 -0
  68. package/dist/commonjs/responses.js.map +1 -0
  69. package/dist/commonjs/tsdoc-metadata.json +11 -0
  70. package/dist/esm/accessControlRestClient.d.ts +5 -0
  71. package/dist/esm/accessControlRestClient.d.ts.map +1 -0
  72. package/dist/esm/accessControlRestClient.js +21 -0
  73. package/dist/esm/accessControlRestClient.js.map +1 -0
  74. package/dist/esm/clientDefinitions.d.ts +49 -0
  75. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  76. package/dist/esm/clientDefinitions.js +4 -0
  77. package/dist/esm/clientDefinitions.js.map +1 -0
  78. package/dist/esm/index.d.ts +11 -0
  79. package/dist/esm/index.d.ts.map +1 -0
  80. package/dist/esm/index.js +14 -0
  81. package/dist/esm/index.js.map +1 -0
  82. package/dist/esm/isUnexpected.d.ts +10 -0
  83. package/dist/esm/isUnexpected.d.ts.map +1 -0
  84. package/dist/esm/isUnexpected.js +70 -0
  85. package/dist/esm/isUnexpected.js.map +1 -0
  86. package/dist/esm/models.d.ts +43 -0
  87. package/dist/esm/models.d.ts.map +1 -0
  88. package/dist/esm/models.js +4 -0
  89. package/dist/esm/models.js.map +1 -0
  90. package/dist/esm/outputModels.d.ts +91 -0
  91. package/dist/esm/outputModels.d.ts.map +1 -0
  92. package/dist/esm/outputModels.js +4 -0
  93. package/dist/esm/outputModels.js.map +1 -0
  94. package/dist/esm/package.json +3 -0
  95. package/dist/esm/paginateHelper.d.ts +43 -0
  96. package/dist/esm/paginateHelper.d.ts.map +1 -0
  97. package/dist/esm/paginateHelper.js +70 -0
  98. package/dist/esm/paginateHelper.js.map +1 -0
  99. package/dist/esm/parameters.d.ts +62 -0
  100. package/dist/esm/parameters.d.ts.map +1 -0
  101. package/dist/esm/parameters.js +4 -0
  102. package/dist/esm/parameters.js.map +1 -0
  103. package/dist/esm/responses.d.ts +94 -0
  104. package/dist/esm/responses.d.ts.map +1 -0
  105. package/dist/esm/responses.js +4 -0
  106. package/dist/esm/responses.js.map +1 -0
  107. package/dist/react-native/accessControlRestClient.d.ts +5 -0
  108. package/dist/react-native/accessControlRestClient.d.ts.map +1 -0
  109. package/dist/react-native/accessControlRestClient.js +21 -0
  110. package/dist/react-native/accessControlRestClient.js.map +1 -0
  111. package/dist/react-native/clientDefinitions.d.ts +49 -0
  112. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  113. package/dist/react-native/clientDefinitions.js +4 -0
  114. package/dist/react-native/clientDefinitions.js.map +1 -0
  115. package/dist/react-native/index.d.ts +11 -0
  116. package/dist/react-native/index.d.ts.map +1 -0
  117. package/dist/react-native/index.js +14 -0
  118. package/dist/react-native/index.js.map +1 -0
  119. package/dist/react-native/isUnexpected.d.ts +10 -0
  120. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  121. package/dist/react-native/isUnexpected.js +70 -0
  122. package/dist/react-native/isUnexpected.js.map +1 -0
  123. package/dist/react-native/models.d.ts +43 -0
  124. package/dist/react-native/models.d.ts.map +1 -0
  125. package/dist/react-native/models.js +4 -0
  126. package/dist/react-native/models.js.map +1 -0
  127. package/dist/react-native/outputModels.d.ts +91 -0
  128. package/dist/react-native/outputModels.d.ts.map +1 -0
  129. package/dist/react-native/outputModels.js +4 -0
  130. package/dist/react-native/outputModels.js.map +1 -0
  131. package/dist/react-native/package.json +3 -0
  132. package/dist/react-native/paginateHelper.d.ts +43 -0
  133. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  134. package/dist/react-native/paginateHelper.js +70 -0
  135. package/dist/react-native/paginateHelper.js.map +1 -0
  136. package/dist/react-native/parameters.d.ts +62 -0
  137. package/dist/react-native/parameters.d.ts.map +1 -0
  138. package/dist/react-native/parameters.js +4 -0
  139. package/dist/react-native/parameters.js.map +1 -0
  140. package/dist/react-native/responses.d.ts +94 -0
  141. package/dist/react-native/responses.d.ts.map +1 -0
  142. package/dist/react-native/responses.js +4 -0
  143. package/dist/react-native/responses.js.map +1 -0
  144. package/dist/synapse-access-control-rest.d.ts +460 -0
  145. package/package.json +67 -57
  146. package/dist/index.js +0 -187
  147. package/dist/index.js.map +0 -1
  148. package/dist/index.min.js +0 -2
  149. package/dist/index.min.js.map +0 -1
  150. package/dist-esm/samples-dev/createRoleAssignment.js +0 -33
  151. package/dist-esm/samples-dev/createRoleAssignment.js.map +0 -1
  152. package/dist-esm/samples-dev/listRoleAssignments.js +0 -40
  153. package/dist-esm/samples-dev/listRoleAssignments.js.map +0 -1
  154. package/dist-esm/src/accessControlRestClient.js.map +0 -1
  155. package/dist-esm/src/clientDefinitions.js.map +0 -1
  156. package/dist-esm/src/index.js +0 -13
  157. package/dist-esm/src/index.js.map +0 -1
  158. package/dist-esm/src/isUnexpected.js.map +0 -1
  159. package/dist-esm/src/paginateHelper.js.map +0 -1
  160. package/dist-esm/src/parameters.js.map +0 -1
  161. package/dist-esm/src/responses.js.map +0 -1
  162. package/dist-esm/test/public/test.spec.js +0 -97
  163. package/dist-esm/test/public/test.spec.js.map +0 -1
  164. package/dist-esm/test/public/utils/env.browser.js +0 -4
  165. package/dist-esm/test/public/utils/env.browser.js.map +0 -1
  166. package/dist-esm/test/public/utils/env.js +0 -5
  167. package/dist-esm/test/public/utils/env.js.map +0 -1
  168. package/dist-esm/test/public/utils/recordedClient.js +0 -35
  169. package/dist-esm/test/public/utils/recordedClient.js.map +0 -1
  170. package/tsconfig.json +0 -25
  171. /package/{dist-esm/src → dist/browser}/clientDefinitions.js +0 -0
  172. /package/{dist-esm/src → dist/browser}/models.js +0 -0
  173. /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
  174. /package/{dist-esm/src → dist/browser}/outputModels.js +0 -0
  175. /package/{dist-esm/src → dist/browser}/outputModels.js.map +0 -0
  176. /package/{dist-esm/src → dist/browser}/parameters.js +0 -0
  177. /package/{dist-esm/src → dist/browser}/responses.js +0 -0
@@ -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,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=models.js.map
@@ -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","sourceR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;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;CAC5C;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,WAAW,CAAC,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACjD,0CAA0C;IAC1C,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,uCAAuC;IACvC,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,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=outputModels.js.map
@@ -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,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAe,MAAM,oBAAoB,CAAC;AAElF,OAAO,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAG7E;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,IAAI,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,OAAO,IAAI,OAAO,SAAS;IACpD,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CAC/B,GACG,YAAY,CAAC,KAAK,CAAC,GACnB,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,SAAS,qBAAqB,EAC9D,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,GAAE,aAAa,CAAC,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA0BvD"}
@@ -0,0 +1,70 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { getPagedAsyncIterator } from "@azure/core-paging";
4
+ import { createRestError } from "@azure-rest/core-client";
5
+ /**
6
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
7
+ * @param client - Client to use for sending the next page requests
8
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
9
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
10
+ * @returns - PagedAsyncIterableIterator to iterate the elements
11
+ */
12
+ export function paginate(client, initialResponse, options = {}) {
13
+ let firstRun = true;
14
+ const itemName = "value";
15
+ const nextLinkName = "nextLink";
16
+ const { customGetPage } = options;
17
+ const pagedResult = {
18
+ firstPageLink: "",
19
+ getPage: typeof customGetPage === "function"
20
+ ? customGetPage
21
+ : async (pageLink) => {
22
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
23
+ firstRun = false;
24
+ checkPagingRequest(result);
25
+ const nextLink = getNextLink(result.body, nextLinkName);
26
+ const values = getElements(result.body, itemName);
27
+ return {
28
+ page: values,
29
+ nextPageLink: nextLink,
30
+ };
31
+ },
32
+ };
33
+ return getPagedAsyncIterator(pagedResult);
34
+ }
35
+ /**
36
+ * Gets for the value of nextLink in the body
37
+ */
38
+ function getNextLink(body, nextLinkName) {
39
+ if (!nextLinkName) {
40
+ return undefined;
41
+ }
42
+ const nextLink = body[nextLinkName];
43
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
44
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
45
+ }
46
+ return nextLink;
47
+ }
48
+ /**
49
+ * Gets the elements of the current request in the body.
50
+ */
51
+ function getElements(body, itemName) {
52
+ const value = body[itemName];
53
+ // value has to be an array according to the x-ms-pageable extension.
54
+ // The fact that this must be an array is used above to calculate the
55
+ // type of elements in the page in PaginateReturn
56
+ if (!Array.isArray(value)) {
57
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
58
+ }
59
+ return value !== null && value !== void 0 ? value : [];
60
+ }
61
+ /**
62
+ * Checks if a request failed
63
+ */
64
+ function checkPagingRequest(response) {
65
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
66
+ if (!Http2xxStatusCodes.includes(response.status)) {
67
+ throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
68
+ }
69
+ }
70
+ //# sourceMappingURL=paginateHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAyC1D;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,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ACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -0,0 +1,62 @@
1
+ import type { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
2
+ import type { RequestParameters } from "@azure-rest/core-client";
3
+ import type { CheckPrincipalAccessRequest, RoleAssignmentRequest } from "./models.js";
4
+ export interface RoleAssignmentsCheckPrincipalAccessBodyParam {
5
+ /** Details of scope, list of actions and principal. */
6
+ body: CheckPrincipalAccessRequest;
7
+ }
8
+ export interface RoleAssignmentsCheckPrincipalAccessMediaTypesParam {
9
+ /** Request content type */
10
+ contentType?: "application/json" | "text/json";
11
+ }
12
+ export type RoleAssignmentsCheckPrincipalAccessParameters = RoleAssignmentsCheckPrincipalAccessMediaTypesParam & RoleAssignmentsCheckPrincipalAccessBodyParam & RequestParameters;
13
+ export interface RoleAssignmentsListRoleAssignmentsHeaders {
14
+ /** Continuation token. */
15
+ "x-ms-continuation"?: string;
16
+ }
17
+ export interface RoleAssignmentsListRoleAssignmentsQueryParamProperties {
18
+ /** Synapse Built-In Role Id. */
19
+ roleId?: string;
20
+ /** Object ID of the AAD principal or security-group. */
21
+ principalId?: string;
22
+ /** Scope of the Synapse Built-in Role. */
23
+ scope?: string;
24
+ }
25
+ export interface RoleAssignmentsListRoleAssignmentsQueryParam {
26
+ queryParameters?: RoleAssignmentsListRoleAssignmentsQueryParamProperties;
27
+ }
28
+ export interface RoleAssignmentsListRoleAssignmentsHeaderParam {
29
+ headers: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders;
30
+ }
31
+ export type RoleAssignmentsListRoleAssignmentsParameters = RoleAssignmentsListRoleAssignmentsQueryParam & RoleAssignmentsListRoleAssignmentsHeaderParam & RequestParameters;
32
+ export interface RoleAssignmentsCreateRoleAssignmentBodyParam {
33
+ /** Details of role id, scope and object id. */
34
+ body: RoleAssignmentRequest;
35
+ }
36
+ export interface RoleAssignmentsCreateRoleAssignmentMediaTypesParam {
37
+ /** Request content type */
38
+ contentType?: "application/json" | "text/json";
39
+ }
40
+ export type RoleAssignmentsCreateRoleAssignmentParameters = RoleAssignmentsCreateRoleAssignmentMediaTypesParam & RoleAssignmentsCreateRoleAssignmentBodyParam & RequestParameters;
41
+ export type RoleAssignmentsGetRoleAssignmentByIdParameters = RequestParameters;
42
+ export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties {
43
+ /** Scope of the Synapse Built-in Role. */
44
+ scope?: string;
45
+ }
46
+ export interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParam {
47
+ queryParameters?: RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties;
48
+ }
49
+ export type RoleAssignmentsDeleteRoleAssignmentByIdParameters = RoleAssignmentsDeleteRoleAssignmentByIdQueryParam & RequestParameters;
50
+ export interface RoleDefinitionsListRoleDefinitionsQueryParamProperties {
51
+ /** Is a Synapse Built-In Role or not. */
52
+ isBuiltIn?: boolean;
53
+ /** Scope of the Synapse Built-in Role. */
54
+ scope?: string;
55
+ }
56
+ export interface RoleDefinitionsListRoleDefinitionsQueryParam {
57
+ queryParameters?: RoleDefinitionsListRoleDefinitionsQueryParamProperties;
58
+ }
59
+ export type RoleDefinitionsListRoleDefinitionsParameters = RoleDefinitionsListRoleDefinitionsQueryParam & RequestParameters;
60
+ export type RoleDefinitionsGetRoleDefinitionByIdParameters = RequestParameters;
61
+ export type RoleDefinitionsListScopesParameters = RequestParameters;
62
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEtF,MAAM,WAAW,4CAA4C;IAC3D,uDAAuD;IACvD,IAAI,EAAE,2BAA2B,CAAC;CACnC;AAED,MAAM,WAAW,kDAAkD;IACjE,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAAC;CAChD;AAED,MAAM,MAAM,6CAA6C,GACvD,kDAAkD,GAChD,4CAA4C,GAC5C,iBAAiB,CAAC;AAEtB,MAAM,WAAW,yCAAyC;IACxD,0BAA0B;IAC1B,mBAAmB,CAAC,EAAE,MAAM,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AM,8CAA8C,GAAG,iBAAiB,CAAC;AAC/E,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { CheckPrincipalAccessRequest, RoleAssignmentRequest } from \"./models.js\";\n\nexport interface RoleAssignmentsCheckPrincipalAccessBodyParam {\n /** Details of scope, list of actions and principal. */\n body: CheckPrincipalAccessRequest;\n}\n\nexport interface RoleAssignmentsCheckPrincipalAccessMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\" | \"text/json\";\n}\n\nexport type RoleAssignmentsCheckPrincipalAccessParameters =\n RoleAssignmentsCheckPrincipalAccessMediaTypesParam &\n RoleAssignmentsCheckPrincipalAccessBodyParam &\n RequestParameters;\n\nexport interface RoleAssignmentsListRoleAssignmentsHeaders {\n /** Continuation token. */\n \"x-ms-continuation\"?: string;\n}\n\nexport interface RoleAssignmentsListRoleAssignmentsQueryParamProperties {\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}\n\nexport interface RoleAssignmentsListRoleAssignmentsQueryParam {\n queryParameters?: RoleAssignmentsListRoleAssignmentsQueryParamProperties;\n}\n\nexport interface RoleAssignmentsListRoleAssignmentsHeaderParam {\n headers: RawHttpHeadersInput & RoleAssignmentsListRoleAssignmentsHeaders;\n}\n\nexport type RoleAssignmentsListRoleAssignmentsParameters =\n RoleAssignmentsListRoleAssignmentsQueryParam &\n RoleAssignmentsListRoleAssignmentsHeaderParam &\n RequestParameters;\n\nexport interface RoleAssignmentsCreateRoleAssignmentBodyParam {\n /** Details of role id, scope and object id. */\n body: RoleAssignmentRequest;\n}\n\nexport interface RoleAssignmentsCreateRoleAssignmentMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\" | \"text/json\";\n}\n\nexport type RoleAssignmentsCreateRoleAssignmentParameters =\n RoleAssignmentsCreateRoleAssignmentMediaTypesParam &\n RoleAssignmentsCreateRoleAssignmentBodyParam &\n RequestParameters;\nexport type RoleAssignmentsGetRoleAssignmentByIdParameters = RequestParameters;\n\nexport interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties {\n /** Scope of the Synapse Built-in Role. */\n scope?: string;\n}\n\nexport interface RoleAssignmentsDeleteRoleAssignmentByIdQueryParam {\n queryParameters?: RoleAssignmentsDeleteRoleAssignmentByIdQueryParamProperties;\n}\n\nexport type RoleAssignmentsDeleteRoleAssignmentByIdParameters =\n RoleAssignmentsDeleteRoleAssignmentByIdQueryParam & RequestParameters;\n\nexport interface RoleDefinitionsListRoleDefinitionsQueryParamProperties {\n /** Is a Synapse Built-In Role or not. */\n isBuiltIn?: boolean;\n /** Scope of the Synapse Built-in Role. */\n scope?: string;\n}\n\nexport interface RoleDefinitionsListRoleDefinitionsQueryParam {\n queryParameters?: RoleDefinitionsListRoleDefinitionsQueryParamProperties;\n}\n\nexport type RoleDefinitionsListRoleDefinitionsParameters =\n RoleDefinitionsListRoleDefinitionsQueryParam & RequestParameters;\nexport type RoleDefinitionsGetRoleDefinitionByIdParameters = RequestParameters;\nexport type RoleDefinitionsListScopesParameters = RequestParameters;\n"]}
@@ -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":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACV,kCAAkC,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+ //# sourceMappingURL=responses.js.map
@@ -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,21 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { getClient } from "@azure-rest/core-client";
4
+ export default function createClient(endpoint, credentials, options = {}) {
5
+ var _a, _b;
6
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}`;
7
+ options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2020-12-01";
8
+ options = Object.assign(Object.assign({}, options), { credentials: {
9
+ scopes: ["https://dev.azuresynapse.net/.default"],
10
+ } });
11
+ const userAgentInfo = `azsdk-js-synapse-access-control-rest/1.0.0-beta.1`;
12
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
13
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
14
+ : `${userAgentInfo}`;
15
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
16
+ userAgentPrefix,
17
+ } });
18
+ const client = getClient(baseUrl, credentials, options);
19
+ return client;
20
+ }
21
+ //# sourceMappingURL=accessControlRestClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessControlRestClient.js","sourceRoot":"","sources":["../../src/accessControlRestClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,MAAM,CAAC,OAAO,UAAU,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,SAAS,CAAC,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,mDAA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M,WAAW,MAAM;IACrB,uFAAuF;IACvF,CAAC,IAAI,EAAE,yBAAyB,GAAG,mCAAmC,CAAC;IACvE,+EAA+E;IAC/E,CAAC,IAAI,EAAE,kBAAkB,GAAG,kCAAkC,CAAC;IAC/D,iHAAiH;IACjH,CACE,IAAI,EAAE,qCAAqC,EAC3C,gBAAgB,EAAE,MAAM,GACvB,mCAAmC,CAAC;IACvC,+EAA+E;IAC/E,CAAC,IAAI,EAAE,kBAAkB,GAAG,kCAAkC,CAAC;IAC/D,oGAAoG;IACpG,CACE,IAAI,EAAE,qCAAqC,EAC3C,gBAAgB,EAAE,MAAM,GACvB,oCAAoC,CAAC;IACxC,0EAA0E;IAC1E,CAAC,IAAI,EAAE,aAAa,GAAG,yBAAyB,CAAC;CAClD;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=clientDefinitions.js.map