@azure/arm-visualstudio 2.2.0 → 4.0.0-beta.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 (230) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +21 -21
  4. package/README.md +98 -96
  5. package/dist/index.js +1332 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/samples-dev/checkAvailabilityOfAnAccountName.d.ts +2 -0
  10. package/dist-esm/samples-dev/checkAvailabilityOfAnAccountName.d.ts.map +1 -0
  11. package/dist-esm/samples-dev/checkAvailabilityOfAnAccountName.js +33 -0
  12. package/dist-esm/samples-dev/checkAvailabilityOfAnAccountName.js.map +1 -0
  13. package/dist-esm/samples-dev/createAProjectResource.d.ts +2 -0
  14. package/dist-esm/samples-dev/createAProjectResource.d.ts.map +1 -0
  15. package/dist-esm/samples-dev/createAProjectResource.js +43 -0
  16. package/dist-esm/samples-dev/createAProjectResource.js.map +1 -0
  17. package/dist-esm/samples-dev/createAnAccountResource.d.ts +2 -0
  18. package/dist-esm/samples-dev/createAnAccountResource.d.ts.map +1 -0
  19. package/dist-esm/samples-dev/createAnAccountResource.js +32 -0
  20. package/dist-esm/samples-dev/createAnAccountResource.js.map +1 -0
  21. package/dist-esm/samples-dev/createAnExtensionResource.d.ts +2 -0
  22. package/dist-esm/samples-dev/createAnExtensionResource.d.ts.map +1 -0
  23. package/dist-esm/samples-dev/createAnExtensionResource.js +44 -0
  24. package/dist-esm/samples-dev/createAnExtensionResource.js.map +1 -0
  25. package/dist-esm/samples-dev/deleteAnAccountResource.d.ts +2 -0
  26. package/dist-esm/samples-dev/deleteAnAccountResource.d.ts.map +1 -0
  27. package/dist-esm/samples-dev/deleteAnAccountResource.js +31 -0
  28. package/dist-esm/samples-dev/deleteAnAccountResource.js.map +1 -0
  29. package/dist-esm/samples-dev/deleteAnExtensionResource.d.ts +2 -0
  30. package/dist-esm/samples-dev/deleteAnExtensionResource.d.ts.map +1 -0
  31. package/dist-esm/samples-dev/deleteAnExtensionResource.js +32 -0
  32. package/dist-esm/samples-dev/deleteAnExtensionResource.js.map +1 -0
  33. package/dist-esm/samples-dev/getAListOfAccountResourcesInTheResourceGroup.d.ts +2 -0
  34. package/dist-esm/samples-dev/getAListOfAccountResourcesInTheResourceGroup.d.ts.map +1 -0
  35. package/dist-esm/samples-dev/getAListOfAccountResourcesInTheResourceGroup.js +30 -0
  36. package/dist-esm/samples-dev/getAListOfAccountResourcesInTheResourceGroup.js.map +1 -0
  37. package/dist-esm/samples-dev/getAListOfExtensionResourcesWithinTheResourceGroup.d.ts +2 -0
  38. package/dist-esm/samples-dev/getAListOfExtensionResourcesWithinTheResourceGroup.d.ts.map +1 -0
  39. package/dist-esm/samples-dev/getAListOfExtensionResourcesWithinTheResourceGroup.js +31 -0
  40. package/dist-esm/samples-dev/getAListOfExtensionResourcesWithinTheResourceGroup.js.map +1 -0
  41. package/dist-esm/samples-dev/getAListOfOperationsForThisResourceProvider.d.ts +2 -0
  42. package/dist-esm/samples-dev/getAListOfOperationsForThisResourceProvider.d.ts.map +1 -0
  43. package/dist-esm/samples-dev/getAListOfOperationsForThisResourceProvider.js +29 -0
  44. package/dist-esm/samples-dev/getAListOfOperationsForThisResourceProvider.js.map +1 -0
  45. package/dist-esm/samples-dev/getAListOfProjectResourcesInTheTeamServicesAccount.d.ts +2 -0
  46. package/dist-esm/samples-dev/getAListOfProjectResourcesInTheTeamServicesAccount.d.ts.map +1 -0
  47. package/dist-esm/samples-dev/getAListOfProjectResourcesInTheTeamServicesAccount.js +31 -0
  48. package/dist-esm/samples-dev/getAListOfProjectResourcesInTheTeamServicesAccount.js.map +1 -0
  49. package/dist-esm/samples-dev/getAProjectResource.d.ts +2 -0
  50. package/dist-esm/samples-dev/getAProjectResource.d.ts.map +1 -0
  51. package/dist-esm/samples-dev/getAProjectResource.js +32 -0
  52. package/dist-esm/samples-dev/getAProjectResource.js.map +1 -0
  53. package/dist-esm/samples-dev/getAnAccountResource.d.ts +2 -0
  54. package/dist-esm/samples-dev/getAnAccountResource.d.ts.map +1 -0
  55. package/dist-esm/samples-dev/getAnAccountResource.js +31 -0
  56. package/dist-esm/samples-dev/getAnAccountResource.js.map +1 -0
  57. package/dist-esm/samples-dev/getAnExtensionResource.d.ts +2 -0
  58. package/dist-esm/samples-dev/getAnExtensionResource.d.ts.map +1 -0
  59. package/dist-esm/samples-dev/getAnExtensionResource.js +32 -0
  60. package/dist-esm/samples-dev/getAnExtensionResource.js.map +1 -0
  61. package/dist-esm/samples-dev/getTheStatusOfTheProjectCreationJob.d.ts +2 -0
  62. package/dist-esm/samples-dev/getTheStatusOfTheProjectCreationJob.d.ts.map +1 -0
  63. package/dist-esm/samples-dev/getTheStatusOfTheProjectCreationJob.js +36 -0
  64. package/dist-esm/samples-dev/getTheStatusOfTheProjectCreationJob.js.map +1 -0
  65. package/dist-esm/samples-dev/updateAProjectResource.d.ts +2 -0
  66. package/dist-esm/samples-dev/updateAProjectResource.d.ts.map +1 -0
  67. package/dist-esm/samples-dev/updateAProjectResource.js +40 -0
  68. package/dist-esm/samples-dev/updateAProjectResource.js.map +1 -0
  69. package/dist-esm/samples-dev/updateAnExtensionResource.d.ts +2 -0
  70. package/dist-esm/samples-dev/updateAnExtensionResource.d.ts.map +1 -0
  71. package/dist-esm/samples-dev/updateAnExtensionResource.js +44 -0
  72. package/dist-esm/samples-dev/updateAnExtensionResource.js.map +1 -0
  73. package/dist-esm/src/index.d.ts +4 -0
  74. package/dist-esm/src/index.d.ts.map +1 -0
  75. package/dist-esm/src/index.js +11 -0
  76. package/dist-esm/src/index.js.map +1 -0
  77. package/dist-esm/src/lroImpl.d.ts +16 -0
  78. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  79. package/dist-esm/src/lroImpl.js +29 -0
  80. package/dist-esm/src/lroImpl.js.map +1 -0
  81. package/dist-esm/src/models/index.d.ts +253 -0
  82. package/dist-esm/src/models/index.d.ts.map +1 -0
  83. package/dist-esm/src/models/index.js +9 -0
  84. package/dist-esm/src/models/index.js.map +1 -0
  85. package/dist-esm/src/models/mappers.d.ts +18 -0
  86. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  87. package/{esm → dist-esm/src}/models/mappers.js +171 -228
  88. package/dist-esm/src/models/mappers.js.map +1 -0
  89. package/dist-esm/src/models/parameters.d.ts +21 -0
  90. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  91. package/{esm → dist-esm/src}/models/parameters.js +86 -49
  92. package/dist-esm/src/models/parameters.js.map +1 -0
  93. package/dist-esm/src/operations/accounts.d.ts +57 -0
  94. package/dist-esm/src/operations/accounts.d.ts.map +1 -0
  95. package/dist-esm/src/operations/accounts.js +185 -0
  96. package/dist-esm/src/operations/accounts.js.map +1 -0
  97. package/dist-esm/src/operations/extensions.d.ts +54 -0
  98. package/dist-esm/src/operations/extensions.d.ts.map +1 -0
  99. package/dist-esm/src/operations/extensions.js +190 -0
  100. package/dist-esm/src/operations/extensions.js.map +1 -0
  101. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  102. package/dist-esm/src/operations/index.d.ts.map +1 -0
  103. package/{esm → dist-esm/src}/operations/index.js +3 -5
  104. package/dist-esm/src/operations/index.js.map +1 -0
  105. package/dist-esm/src/operations/operations.d.ts +18 -0
  106. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  107. package/dist-esm/src/operations/operations.js +42 -0
  108. package/dist-esm/src/operations/operations.js.map +1 -0
  109. package/dist-esm/src/operations/projects.d.ts +77 -0
  110. package/dist-esm/src/operations/projects.d.ts.map +1 -0
  111. package/dist-esm/src/operations/projects.js +253 -0
  112. package/dist-esm/src/operations/projects.js.map +1 -0
  113. package/dist-esm/src/operationsInterfaces/accounts.d.ts +49 -0
  114. package/dist-esm/src/operationsInterfaces/accounts.d.ts.map +1 -0
  115. package/dist-esm/src/operationsInterfaces/accounts.js +9 -0
  116. package/dist-esm/src/operationsInterfaces/accounts.js.map +1 -0
  117. package/dist-esm/src/operationsInterfaces/extensions.d.ts +46 -0
  118. package/dist-esm/src/operationsInterfaces/extensions.d.ts.map +1 -0
  119. package/dist-esm/src/operationsInterfaces/extensions.js +9 -0
  120. package/dist-esm/src/operationsInterfaces/extensions.js.map +1 -0
  121. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  122. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  123. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  124. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  125. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  126. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  127. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  128. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  129. package/dist-esm/src/operationsInterfaces/projects.d.ts +69 -0
  130. package/dist-esm/src/operationsInterfaces/projects.d.ts.map +1 -0
  131. package/dist-esm/src/operationsInterfaces/projects.js +9 -0
  132. package/dist-esm/src/operationsInterfaces/projects.js.map +1 -0
  133. package/dist-esm/src/visualStudioResourceProviderClient.d.ts +21 -0
  134. package/dist-esm/src/visualStudioResourceProviderClient.d.ts.map +1 -0
  135. package/dist-esm/src/visualStudioResourceProviderClient.js +54 -0
  136. package/dist-esm/src/visualStudioResourceProviderClient.js.map +1 -0
  137. package/dist-esm/test/sampleTest.d.ts +2 -0
  138. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  139. package/dist-esm/test/sampleTest.js +40 -0
  140. package/dist-esm/test/sampleTest.js.map +1 -0
  141. package/package.json +83 -34
  142. package/review/arm-visualstudio.api.md +314 -0
  143. package/rollup.config.js +184 -27
  144. package/src/index.ts +11 -0
  145. package/src/lroImpl.ts +34 -0
  146. package/src/models/index.ts +298 -0
  147. package/{lib → src}/models/mappers.ts +175 -232
  148. package/src/models/parameters.ts +201 -0
  149. package/src/operations/accounts.ts +261 -0
  150. package/src/operations/extensions.ts +259 -0
  151. package/{lib → src}/operations/index.ts +3 -5
  152. package/src/operations/operations.ts +55 -0
  153. package/src/operations/projects.ts +356 -0
  154. package/src/operationsInterfaces/accounts.ts +96 -0
  155. package/src/operationsInterfaces/extensions.ts +91 -0
  156. package/src/operationsInterfaces/index.ts +12 -0
  157. package/src/operationsInterfaces/operations.ts +21 -0
  158. package/src/operationsInterfaces/projects.ts +128 -0
  159. package/src/visualStudioResourceProviderClient.ts +91 -0
  160. package/tsconfig.json +6 -5
  161. package/types/arm-visualstudio.d.ts +493 -0
  162. package/types/tsdoc-metadata.json +11 -0
  163. package/dist/arm-visualstudio.js +0 -1562
  164. package/dist/arm-visualstudio.js.map +0 -1
  165. package/dist/arm-visualstudio.min.js +0 -1
  166. package/dist/arm-visualstudio.min.js.map +0 -1
  167. package/esm/models/accountsMappers.d.ts +0 -2
  168. package/esm/models/accountsMappers.d.ts.map +0 -1
  169. package/esm/models/accountsMappers.js +0 -11
  170. package/esm/models/accountsMappers.js.map +0 -1
  171. package/esm/models/extensionsMappers.d.ts +0 -2
  172. package/esm/models/extensionsMappers.d.ts.map +0 -1
  173. package/esm/models/extensionsMappers.js +0 -11
  174. package/esm/models/extensionsMappers.js.map +0 -1
  175. package/esm/models/index.d.ts +0 -671
  176. package/esm/models/index.d.ts.map +0 -1
  177. package/esm/models/index.js +0 -10
  178. package/esm/models/index.js.map +0 -1
  179. package/esm/models/mappers.d.ts +0 -20
  180. package/esm/models/mappers.d.ts.map +0 -1
  181. package/esm/models/mappers.js.map +0 -1
  182. package/esm/models/operationsMappers.d.ts +0 -2
  183. package/esm/models/operationsMappers.d.ts.map +0 -1
  184. package/esm/models/operationsMappers.js +0 -11
  185. package/esm/models/operationsMappers.js.map +0 -1
  186. package/esm/models/parameters.d.ts +0 -14
  187. package/esm/models/parameters.d.ts.map +0 -1
  188. package/esm/models/parameters.js.map +0 -1
  189. package/esm/models/projectsMappers.d.ts +0 -2
  190. package/esm/models/projectsMappers.d.ts.map +0 -1
  191. package/esm/models/projectsMappers.js +0 -11
  192. package/esm/models/projectsMappers.js.map +0 -1
  193. package/esm/operations/accounts.d.ts +0 -147
  194. package/esm/operations/accounts.d.ts.map +0 -1
  195. package/esm/operations/accounts.js +0 -224
  196. package/esm/operations/accounts.js.map +0 -1
  197. package/esm/operations/extensions.d.ts +0 -141
  198. package/esm/operations/extensions.d.ts.map +0 -1
  199. package/esm/operations/extensions.js +0 -200
  200. package/esm/operations/extensions.js.map +0 -1
  201. package/esm/operations/index.d.ts.map +0 -1
  202. package/esm/operations/index.js.map +0 -1
  203. package/esm/operations/operations.d.ts +0 -29
  204. package/esm/operations/operations.d.ts.map +0 -1
  205. package/esm/operations/operations.js +0 -48
  206. package/esm/operations/operations.js.map +0 -1
  207. package/esm/operations/projects.d.ts +0 -153
  208. package/esm/operations/projects.d.ts.map +0 -1
  209. package/esm/operations/projects.js +0 -244
  210. package/esm/operations/projects.js.map +0 -1
  211. package/esm/visualStudioResourceProviderClient.d.ts +0 -21
  212. package/esm/visualStudioResourceProviderClient.d.ts.map +0 -1
  213. package/esm/visualStudioResourceProviderClient.js +0 -36
  214. package/esm/visualStudioResourceProviderClient.js.map +0 -1
  215. package/esm/visualStudioResourceProviderClientContext.d.ts +0 -16
  216. package/esm/visualStudioResourceProviderClientContext.d.ts.map +0 -1
  217. package/esm/visualStudioResourceProviderClientContext.js +0 -56
  218. package/esm/visualStudioResourceProviderClientContext.js.map +0 -1
  219. package/lib/models/accountsMappers.ts +0 -25
  220. package/lib/models/extensionsMappers.ts +0 -22
  221. package/lib/models/index.ts +0 -701
  222. package/lib/models/operationsMappers.ts +0 -17
  223. package/lib/models/parameters.ts +0 -136
  224. package/lib/models/projectsMappers.ts +0 -21
  225. package/lib/operations/accounts.ts +0 -399
  226. package/lib/operations/extensions.ts +0 -361
  227. package/lib/operations/operations.ts +0 -72
  228. package/lib/operations/projects.ts +0 -386
  229. package/lib/visualStudioResourceProviderClient.ts +0 -48
  230. package/lib/visualStudioResourceProviderClientContext.ts +0 -62
@@ -1,11 +1,9 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
9
  export * from "./operations";
@@ -0,0 +1,55 @@
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
+
9
+ import { Operations } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { VisualStudioResourceProviderClient } from "../visualStudioResourceProviderClient";
14
+ import {
15
+ OperationsListOptionalParams,
16
+ OperationsListResponse
17
+ } from "../models";
18
+
19
+ /** Class containing Operations operations. */
20
+ export class OperationsImpl implements Operations {
21
+ private readonly client: VisualStudioResourceProviderClient;
22
+
23
+ /**
24
+ * Initialize a new instance of the class Operations class.
25
+ * @param client Reference to the service client
26
+ */
27
+ constructor(client: VisualStudioResourceProviderClient) {
28
+ this.client = client;
29
+ }
30
+
31
+ /**
32
+ * Gets the details of all operations possible on the Microsoft.VisualStudio resource provider.
33
+ * @param options The options parameters.
34
+ */
35
+ list(
36
+ options?: OperationsListOptionalParams
37
+ ): Promise<OperationsListResponse> {
38
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
39
+ }
40
+ }
41
+ // Operation Specifications
42
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
43
+
44
+ const listOperationSpec: coreClient.OperationSpec = {
45
+ path: "/providers/microsoft.visualstudio/operations",
46
+ httpMethod: "GET",
47
+ responses: {
48
+ 200: {
49
+ bodyMapper: Mappers.OperationListResult
50
+ }
51
+ },
52
+ urlParameters: [Parameters.$host],
53
+ headerParameters: [Parameters.accept],
54
+ serializer
55
+ };
@@ -0,0 +1,356 @@
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
+
9
+ import { Projects } from "../operationsInterfaces";
10
+ import * as coreClient from "@azure/core-client";
11
+ import * as Mappers from "../models/mappers";
12
+ import * as Parameters from "../models/parameters";
13
+ import { VisualStudioResourceProviderClient } from "../visualStudioResourceProviderClient";
14
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
+ import { LroImpl } from "../lroImpl";
16
+ import {
17
+ ProjectsListByResourceGroupOptionalParams,
18
+ ProjectsListByResourceGroupResponse,
19
+ ProjectResource,
20
+ ProjectsCreateOptionalParams,
21
+ ProjectsCreateResponse,
22
+ ProjectsGetOptionalParams,
23
+ ProjectsGetResponse,
24
+ ProjectsUpdateOptionalParams,
25
+ ProjectsUpdateResponse,
26
+ ProjectsGetJobStatusOptionalParams,
27
+ ProjectsGetJobStatusResponse
28
+ } from "../models";
29
+
30
+ /** Class containing Projects operations. */
31
+ export class ProjectsImpl implements Projects {
32
+ private readonly client: VisualStudioResourceProviderClient;
33
+
34
+ /**
35
+ * Initialize a new instance of the class Projects class.
36
+ * @param client Reference to the service client
37
+ */
38
+ constructor(client: VisualStudioResourceProviderClient) {
39
+ this.client = client;
40
+ }
41
+
42
+ /**
43
+ * Gets all Visual Studio Team Services project resources created in the specified Team Services
44
+ * account.
45
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
46
+ * @param rootResourceName Name of the Team Services account.
47
+ * @param options The options parameters.
48
+ */
49
+ listByResourceGroup(
50
+ resourceGroupName: string,
51
+ rootResourceName: string,
52
+ options?: ProjectsListByResourceGroupOptionalParams
53
+ ): Promise<ProjectsListByResourceGroupResponse> {
54
+ return this.client.sendOperationRequest(
55
+ { resourceGroupName, rootResourceName, options },
56
+ listByResourceGroupOperationSpec
57
+ );
58
+ }
59
+
60
+ /**
61
+ * Creates a Team Services project in the collection with the specified name. 'VersionControlOption'
62
+ * and 'ProcessTemplateId' must be specified in the resource properties. Valid values for
63
+ * VersionControlOption: Git, Tfvc. Valid values for ProcessTemplateId:
64
+ * 6B724908-EF14-45CF-84F8-768B5384DA45, ADCC42AB-9882-485E-A3ED-7678F01F66BC,
65
+ * 27450541-8E31-4150-9947-DC59F998FC01 (these IDs correspond to Scrum, Agile, and CMMI process
66
+ * templates).
67
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
68
+ * @param rootResourceName Name of the Team Services account.
69
+ * @param resourceName Name of the Team Services project.
70
+ * @param body The request data.
71
+ * @param options The options parameters.
72
+ */
73
+ async beginCreate(
74
+ resourceGroupName: string,
75
+ rootResourceName: string,
76
+ resourceName: string,
77
+ body: ProjectResource,
78
+ options?: ProjectsCreateOptionalParams
79
+ ): Promise<
80
+ PollerLike<
81
+ PollOperationState<ProjectsCreateResponse>,
82
+ ProjectsCreateResponse
83
+ >
84
+ > {
85
+ const directSendOperation = async (
86
+ args: coreClient.OperationArguments,
87
+ spec: coreClient.OperationSpec
88
+ ): Promise<ProjectsCreateResponse> => {
89
+ return this.client.sendOperationRequest(args, spec);
90
+ };
91
+ const sendOperation = async (
92
+ args: coreClient.OperationArguments,
93
+ spec: coreClient.OperationSpec
94
+ ) => {
95
+ let currentRawResponse:
96
+ | coreClient.FullOperationResponse
97
+ | undefined = undefined;
98
+ const providedCallback = args.options?.onResponse;
99
+ const callback: coreClient.RawResponseCallback = (
100
+ rawResponse: coreClient.FullOperationResponse,
101
+ flatResponse: unknown
102
+ ) => {
103
+ currentRawResponse = rawResponse;
104
+ providedCallback?.(rawResponse, flatResponse);
105
+ };
106
+ const updatedArgs = {
107
+ ...args,
108
+ options: {
109
+ ...args.options,
110
+ onResponse: callback
111
+ }
112
+ };
113
+ const flatResponse = await directSendOperation(updatedArgs, spec);
114
+ return {
115
+ flatResponse,
116
+ rawResponse: {
117
+ statusCode: currentRawResponse!.status,
118
+ body: currentRawResponse!.parsedBody,
119
+ headers: currentRawResponse!.headers.toJSON()
120
+ }
121
+ };
122
+ };
123
+
124
+ const lro = new LroImpl(
125
+ sendOperation,
126
+ { resourceGroupName, rootResourceName, resourceName, body, options },
127
+ createOperationSpec
128
+ );
129
+ return new LroEngine(lro, {
130
+ resumeFrom: options?.resumeFrom,
131
+ intervalInMs: options?.updateIntervalInMs
132
+ });
133
+ }
134
+
135
+ /**
136
+ * Creates a Team Services project in the collection with the specified name. 'VersionControlOption'
137
+ * and 'ProcessTemplateId' must be specified in the resource properties. Valid values for
138
+ * VersionControlOption: Git, Tfvc. Valid values for ProcessTemplateId:
139
+ * 6B724908-EF14-45CF-84F8-768B5384DA45, ADCC42AB-9882-485E-A3ED-7678F01F66BC,
140
+ * 27450541-8E31-4150-9947-DC59F998FC01 (these IDs correspond to Scrum, Agile, and CMMI process
141
+ * templates).
142
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
143
+ * @param rootResourceName Name of the Team Services account.
144
+ * @param resourceName Name of the Team Services project.
145
+ * @param body The request data.
146
+ * @param options The options parameters.
147
+ */
148
+ async beginCreateAndWait(
149
+ resourceGroupName: string,
150
+ rootResourceName: string,
151
+ resourceName: string,
152
+ body: ProjectResource,
153
+ options?: ProjectsCreateOptionalParams
154
+ ): Promise<ProjectsCreateResponse> {
155
+ const poller = await this.beginCreate(
156
+ resourceGroupName,
157
+ rootResourceName,
158
+ resourceName,
159
+ body,
160
+ options
161
+ );
162
+ return poller.pollUntilDone();
163
+ }
164
+
165
+ /**
166
+ * Gets the details of a Team Services project resource.
167
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
168
+ * @param rootResourceName Name of the Team Services account.
169
+ * @param resourceName Name of the Team Services project.
170
+ * @param options The options parameters.
171
+ */
172
+ get(
173
+ resourceGroupName: string,
174
+ rootResourceName: string,
175
+ resourceName: string,
176
+ options?: ProjectsGetOptionalParams
177
+ ): Promise<ProjectsGetResponse> {
178
+ return this.client.sendOperationRequest(
179
+ { resourceGroupName, rootResourceName, resourceName, options },
180
+ getOperationSpec
181
+ );
182
+ }
183
+
184
+ /**
185
+ * Updates the tags of the specified Team Services project.
186
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
187
+ * @param rootResourceName Name of the Team Services account.
188
+ * @param resourceName Name of the Team Services project.
189
+ * @param body The request data.
190
+ * @param options The options parameters.
191
+ */
192
+ update(
193
+ resourceGroupName: string,
194
+ rootResourceName: string,
195
+ resourceName: string,
196
+ body: ProjectResource,
197
+ options?: ProjectsUpdateOptionalParams
198
+ ): Promise<ProjectsUpdateResponse> {
199
+ return this.client.sendOperationRequest(
200
+ { resourceGroupName, rootResourceName, resourceName, body, options },
201
+ updateOperationSpec
202
+ );
203
+ }
204
+
205
+ /**
206
+ * Gets the status of the project resource creation job.
207
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
208
+ * @param rootResourceName Name of the Team Services account.
209
+ * @param resourceName Name of the Team Services project.
210
+ * @param subContainerName This parameter should be set to the resourceName.
211
+ * @param operation The operation type. The only supported value is 'put'.
212
+ * @param options The options parameters.
213
+ */
214
+ getJobStatus(
215
+ resourceGroupName: string,
216
+ rootResourceName: string,
217
+ resourceName: string,
218
+ subContainerName: string,
219
+ operation: string,
220
+ options?: ProjectsGetJobStatusOptionalParams
221
+ ): Promise<ProjectsGetJobStatusResponse> {
222
+ return this.client.sendOperationRequest(
223
+ {
224
+ resourceGroupName,
225
+ rootResourceName,
226
+ resourceName,
227
+ subContainerName,
228
+ operation,
229
+ options
230
+ },
231
+ getJobStatusOperationSpec
232
+ );
233
+ }
234
+ }
235
+ // Operation Specifications
236
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
237
+
238
+ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
239
+ path:
240
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project",
241
+ httpMethod: "GET",
242
+ responses: {
243
+ 200: {
244
+ bodyMapper: Mappers.ProjectResourceListResult
245
+ }
246
+ },
247
+ queryParameters: [Parameters.apiVersion],
248
+ urlParameters: [
249
+ Parameters.$host,
250
+ Parameters.subscriptionId,
251
+ Parameters.resourceGroupName,
252
+ Parameters.rootResourceName
253
+ ],
254
+ headerParameters: [Parameters.accept],
255
+ serializer
256
+ };
257
+ const createOperationSpec: coreClient.OperationSpec = {
258
+ path:
259
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}",
260
+ httpMethod: "PUT",
261
+ responses: {
262
+ 200: {
263
+ bodyMapper: Mappers.ProjectResource
264
+ },
265
+ 201: {
266
+ bodyMapper: Mappers.ProjectResource
267
+ },
268
+ 202: {
269
+ bodyMapper: Mappers.ProjectResource
270
+ },
271
+ 204: {
272
+ bodyMapper: Mappers.ProjectResource
273
+ }
274
+ },
275
+ requestBody: Parameters.body4,
276
+ queryParameters: [Parameters.apiVersion, Parameters.validating],
277
+ urlParameters: [
278
+ Parameters.$host,
279
+ Parameters.subscriptionId,
280
+ Parameters.resourceGroupName,
281
+ Parameters.resourceName,
282
+ Parameters.rootResourceName
283
+ ],
284
+ headerParameters: [Parameters.accept, Parameters.contentType],
285
+ mediaType: "json",
286
+ serializer
287
+ };
288
+ const getOperationSpec: coreClient.OperationSpec = {
289
+ path:
290
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}",
291
+ httpMethod: "GET",
292
+ responses: {
293
+ 200: {
294
+ bodyMapper: Mappers.ProjectResource
295
+ },
296
+ 404: {}
297
+ },
298
+ queryParameters: [Parameters.apiVersion],
299
+ urlParameters: [
300
+ Parameters.$host,
301
+ Parameters.subscriptionId,
302
+ Parameters.resourceGroupName,
303
+ Parameters.resourceName,
304
+ Parameters.rootResourceName
305
+ ],
306
+ headerParameters: [Parameters.accept],
307
+ serializer
308
+ };
309
+ const updateOperationSpec: coreClient.OperationSpec = {
310
+ path:
311
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}",
312
+ httpMethod: "PATCH",
313
+ responses: {
314
+ 200: {
315
+ bodyMapper: Mappers.ProjectResource
316
+ }
317
+ },
318
+ requestBody: Parameters.body4,
319
+ queryParameters: [Parameters.apiVersion],
320
+ urlParameters: [
321
+ Parameters.$host,
322
+ Parameters.subscriptionId,
323
+ Parameters.resourceGroupName,
324
+ Parameters.resourceName,
325
+ Parameters.rootResourceName
326
+ ],
327
+ headerParameters: [Parameters.accept, Parameters.contentType],
328
+ mediaType: "json",
329
+ serializer
330
+ };
331
+ const getJobStatusOperationSpec: coreClient.OperationSpec = {
332
+ path:
333
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}/subContainers/{subContainerName}/status",
334
+ httpMethod: "GET",
335
+ responses: {
336
+ 200: {
337
+ bodyMapper: Mappers.ProjectResource
338
+ },
339
+ 202: {}
340
+ },
341
+ queryParameters: [
342
+ Parameters.apiVersion,
343
+ Parameters.operation,
344
+ Parameters.jobId
345
+ ],
346
+ urlParameters: [
347
+ Parameters.$host,
348
+ Parameters.subscriptionId,
349
+ Parameters.resourceGroupName,
350
+ Parameters.resourceName,
351
+ Parameters.rootResourceName,
352
+ Parameters.subContainerName
353
+ ],
354
+ headerParameters: [Parameters.accept],
355
+ serializer
356
+ };
@@ -0,0 +1,96 @@
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
+
9
+ import {
10
+ CheckNameAvailabilityParameter,
11
+ AccountsCheckNameAvailabilityOptionalParams,
12
+ AccountsCheckNameAvailabilityResponse,
13
+ AccountsListByResourceGroupOptionalParams,
14
+ AccountsListByResourceGroupResponse,
15
+ AccountResourceRequest,
16
+ AccountsCreateOrUpdateOptionalParams,
17
+ AccountsCreateOrUpdateResponse,
18
+ AccountsDeleteOptionalParams,
19
+ AccountsGetOptionalParams,
20
+ AccountsGetResponse,
21
+ AccountTagRequest,
22
+ AccountsUpdateOptionalParams,
23
+ AccountsUpdateResponse
24
+ } from "../models";
25
+
26
+ /** Interface representing a Accounts. */
27
+ export interface Accounts {
28
+ /**
29
+ * Checks if the specified Visual Studio Team Services account name is available. Resource name can be
30
+ * either an account name or an account name and PUID.
31
+ * @param body Parameters describing the name to check availability for.
32
+ * @param options The options parameters.
33
+ */
34
+ checkNameAvailability(
35
+ body: CheckNameAvailabilityParameter,
36
+ options?: AccountsCheckNameAvailabilityOptionalParams
37
+ ): Promise<AccountsCheckNameAvailabilityResponse>;
38
+ /**
39
+ * Gets all Visual Studio Team Services account resources under the resource group linked to the
40
+ * specified Azure subscription.
41
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
42
+ * @param options The options parameters.
43
+ */
44
+ listByResourceGroup(
45
+ resourceGroupName: string,
46
+ options?: AccountsListByResourceGroupOptionalParams
47
+ ): Promise<AccountsListByResourceGroupResponse>;
48
+ /**
49
+ * Creates or updates a Visual Studio Team Services account resource.
50
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
51
+ * @param resourceName Name of the resource.
52
+ * @param body The request data.
53
+ * @param options The options parameters.
54
+ */
55
+ createOrUpdate(
56
+ resourceGroupName: string,
57
+ resourceName: string,
58
+ body: AccountResourceRequest,
59
+ options?: AccountsCreateOrUpdateOptionalParams
60
+ ): Promise<AccountsCreateOrUpdateResponse>;
61
+ /**
62
+ * Deletes a Visual Studio Team Services account resource.
63
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
64
+ * @param resourceName Name of the resource.
65
+ * @param options The options parameters.
66
+ */
67
+ delete(
68
+ resourceGroupName: string,
69
+ resourceName: string,
70
+ options?: AccountsDeleteOptionalParams
71
+ ): Promise<void>;
72
+ /**
73
+ * Gets the Visual Studio Team Services account resource details.
74
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
75
+ * @param resourceName Name of the resource.
76
+ * @param options The options parameters.
77
+ */
78
+ get(
79
+ resourceGroupName: string,
80
+ resourceName: string,
81
+ options?: AccountsGetOptionalParams
82
+ ): Promise<AccountsGetResponse>;
83
+ /**
84
+ * Updates tags for Visual Studio Team Services account resource.
85
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
86
+ * @param resourceName Name of the resource.
87
+ * @param body The request data.
88
+ * @param options The options parameters.
89
+ */
90
+ update(
91
+ resourceGroupName: string,
92
+ resourceName: string,
93
+ body: AccountTagRequest,
94
+ options?: AccountsUpdateOptionalParams
95
+ ): Promise<AccountsUpdateResponse>;
96
+ }
@@ -0,0 +1,91 @@
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
+
9
+ import {
10
+ ExtensionsListByAccountOptionalParams,
11
+ ExtensionsListByAccountResponse,
12
+ ExtensionResourceRequest,
13
+ ExtensionsCreateOptionalParams,
14
+ ExtensionsCreateResponse,
15
+ ExtensionsDeleteOptionalParams,
16
+ ExtensionsGetOptionalParams,
17
+ ExtensionsGetResponse,
18
+ ExtensionsUpdateOptionalParams,
19
+ ExtensionsUpdateResponse
20
+ } from "../models";
21
+
22
+ /** Interface representing a Extensions. */
23
+ export interface Extensions {
24
+ /**
25
+ * Gets the details of the extension resources created within the resource group.
26
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
27
+ * @param accountResourceName The name of the Visual Studio Team Services account resource.
28
+ * @param options The options parameters.
29
+ */
30
+ listByAccount(
31
+ resourceGroupName: string,
32
+ accountResourceName: string,
33
+ options?: ExtensionsListByAccountOptionalParams
34
+ ): Promise<ExtensionsListByAccountResponse>;
35
+ /**
36
+ * Registers the extension with a Visual Studio Team Services account.
37
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
38
+ * @param accountResourceName The name of the Visual Studio Team Services account resource.
39
+ * @param extensionResourceName The name of the extension.
40
+ * @param body An object containing additional information related to the extension request.
41
+ * @param options The options parameters.
42
+ */
43
+ create(
44
+ resourceGroupName: string,
45
+ accountResourceName: string,
46
+ extensionResourceName: string,
47
+ body: ExtensionResourceRequest,
48
+ options?: ExtensionsCreateOptionalParams
49
+ ): Promise<ExtensionsCreateResponse>;
50
+ /**
51
+ * Removes an extension resource registration for a Visual Studio Team Services account.
52
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
53
+ * @param accountResourceName The name of the Visual Studio Team Services account resource.
54
+ * @param extensionResourceName The name of the extension.
55
+ * @param options The options parameters.
56
+ */
57
+ delete(
58
+ resourceGroupName: string,
59
+ accountResourceName: string,
60
+ extensionResourceName: string,
61
+ options?: ExtensionsDeleteOptionalParams
62
+ ): Promise<void>;
63
+ /**
64
+ * Gets the details of an extension associated with a Visual Studio Team Services account resource.
65
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
66
+ * @param accountResourceName The name of the Visual Studio Team Services account resource.
67
+ * @param extensionResourceName The name of the extension.
68
+ * @param options The options parameters.
69
+ */
70
+ get(
71
+ resourceGroupName: string,
72
+ accountResourceName: string,
73
+ extensionResourceName: string,
74
+ options?: ExtensionsGetOptionalParams
75
+ ): Promise<ExtensionsGetResponse>;
76
+ /**
77
+ * Updates an existing extension registration for the Visual Studio Team Services account.
78
+ * @param resourceGroupName Name of the resource group within the Azure subscription.
79
+ * @param accountResourceName The name of the Visual Studio Team Services account resource.
80
+ * @param extensionResourceName The name of the extension.
81
+ * @param body An object containing additional information related to the extension request.
82
+ * @param options The options parameters.
83
+ */
84
+ update(
85
+ resourceGroupName: string,
86
+ accountResourceName: string,
87
+ extensionResourceName: string,
88
+ body: ExtensionResourceRequest,
89
+ options?: ExtensionsUpdateOptionalParams
90
+ ): Promise<ExtensionsUpdateResponse>;
91
+ }
@@ -0,0 +1,12 @@
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
+
9
+ export * from "./operations";
10
+ export * from "./accounts";
11
+ export * from "./extensions";
12
+ export * from "./projects";
@@ -0,0 +1,21 @@
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
+
9
+ import {
10
+ OperationsListOptionalParams,
11
+ OperationsListResponse
12
+ } from "../models";
13
+
14
+ /** Interface representing a Operations. */
15
+ export interface Operations {
16
+ /**
17
+ * Gets the details of all operations possible on the Microsoft.VisualStudio resource provider.
18
+ * @param options The options parameters.
19
+ */
20
+ list(options?: OperationsListOptionalParams): Promise<OperationsListResponse>;
21
+ }