@azure-rest/developer-devcenter 1.0.0-alpha.20221018.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Microsoft
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # AzureDevCenter client library for JavaScript
2
+
3
+ The Azure DevCenter library provides access to manage resources for Microsoft Dev Box and Azure Deployment Environments. This package enables managing developer machines and environments in Azure.
4
+
5
+ Use the package for Azure DevCenter to:
6
+ > Create, access, manage, and delete Dev Box resources
7
+ > Create, deploy, manage, and delete Environment resources
8
+
9
+
10
+ **Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**
11
+
12
+ Key links:
13
+
14
+ - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devcenter/developer-devcenter-rest)
15
+ - [Package (NPM)](https://www.npmjs.com/package/@azure-rest/developer-devcenter)
16
+ - [API reference documentation](https://learn.microsoft.com/azure/dev-box)
17
+ - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/devcenter/developer-devcenter-rest/samples)
18
+
19
+ ## Getting started
20
+
21
+ ### Currently supported environments
22
+
23
+ - Node.js version 14.x.x or higher
24
+
25
+ ### Prerequisites
26
+
27
+ - You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.
28
+ - You must have [configured](https://learn.microsoft.com/azure/dev-box/quickstart-configure-dev-box-service) a DevCenter, Project, Network Connection, Dev Box Definition, and Pool before you can create Dev Boxes
29
+ - You must have [configured](https://learn.microsoft.com/azure/deployment-environments/) a DevCenter, Project, Catalog, and Environment Type before you can create Environments
30
+
31
+ ### Install the `@azure-rest/developer-devcenter` package
32
+
33
+ Install the AzureDevCenter client REST client library for JavaScript with `npm`:
34
+
35
+ ```bash
36
+ npm install @azure-rest/developer-devcenter
37
+ ```
38
+
39
+ ### Create and authenticate to the Azure DevCenter service
40
+
41
+ To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
42
+ provide an instance of the desired credential type obtained from the
43
+ [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
44
+
45
+ To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
46
+
47
+ After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
48
+ As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
49
+ can be used to authenticate the client.
50
+
51
+ Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
52
+ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
53
+
54
+ ## Key Concepts
55
+
56
+ ### REST Client
57
+
58
+ This client is one of our REST clients. We highly recommend you read how to use a REST client [here](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md).
59
+
60
+ ### DevCenter Concepts
61
+ Dev Boxes refer to managed developer machines running in Azure. Dev Boxes are provisioned in Pools, which define the network and image used for a Dev Box.
62
+
63
+ Environments refer to templated developer environments, which combine a template (Catalog Item) and parameters, as well as an Environment Type which defines permissions and where the resources are deployed.
64
+
65
+ ## Troubleshooting
66
+
67
+ ### Logging
68
+
69
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
70
+
71
+ ```javascript
72
+ import { setLogLevel } from "@azure/logger";
73
+
74
+ setLogLevel("info");
75
+ ```
76
+
77
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
78
+
package/dist/index.js ADDED
@@ -0,0 +1,282 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreClient = require('@azure-rest/core-client');
6
+ var corePaging = require('@azure/core-paging');
7
+ var coreLro = require('@azure/core-lro');
8
+
9
+ // Copyright (c) Microsoft Corporation.
10
+ /**
11
+ * Initialize a new instance of the class AzureDevCenterClient class.
12
+ * @param tenantId type: string The tenant to operate on.
13
+ * @param devCenter type: string The DevCenter to operate on.
14
+ * @param devCenterDnsSuffix type: string The DNS suffix used as the base for all devcenter requests.
15
+ * @param credentials type: TokenCredential
16
+ */
17
+ function createClient(tenantId, devCenter, credentials, devCenterDnsSuffix = "devcenter.azure.com", options = {}) {
18
+ var _a, _b;
19
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `https://${tenantId}-${devCenter}.${devCenterDnsSuffix}`;
20
+ options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2022-03-01-preview";
21
+ options = Object.assign(Object.assign({}, options), { credentials: {
22
+ scopes: ["https://devcenter.azure.com/.default"],
23
+ } });
24
+ const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;
25
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
26
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
27
+ : `${userAgentInfo}`;
28
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
29
+ userAgentPrefix,
30
+ } });
31
+ const client = coreClient.getClient(baseUrl, credentials, options);
32
+ return client;
33
+ }
34
+
35
+ // Copyright (c) Microsoft Corporation.
36
+ // Licensed under the MIT license.
37
+ const responseMap = {
38
+ "GET /projects": ["200"],
39
+ "GET /projects/{projectName}": ["200"],
40
+ "GET /devboxes": ["200"],
41
+ "GET /users/{userId}/devboxes": ["200"],
42
+ "GET /projects/{projectName}/pools": ["200"],
43
+ "GET /projects/{projectName}/pools/{poolName}": ["200"],
44
+ "GET /projects/{projectName}/pools/{poolName}/schedules": ["200"],
45
+ "GET /projects/{projectName}/pools/{poolName}/schedules/{scheduleName}": ["200"],
46
+ "GET /projects/{projectName}/users/{userId}/devboxes": ["200"],
47
+ "GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}": ["200"],
48
+ "PUT /projects/{projectName}/users/{userId}/devboxes/{devBoxName}": ["200", "201"],
49
+ "DELETE /projects/{projectName}/users/{userId}/devboxes/{devBoxName}": ["200", "202", "204"],
50
+ "POST /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start": ["200", "202"],
51
+ "GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start": ["200", "202"],
52
+ "POST /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop": ["200", "202"],
53
+ "GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop": ["200", "202"],
54
+ "GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection": ["200"],
55
+ "GET /projects/{projectName}/environments": ["200"],
56
+ "GET /projects/{projectName}/users/{userId}/environments": ["200"],
57
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}": ["200"],
58
+ "PUT /projects/{projectName}/users/{userId}/environments/{environmentName}": ["200", "201"],
59
+ "PATCH /projects/{projectName}/users/{userId}/environments/{environmentName}": ["200"],
60
+ "DELETE /projects/{projectName}/users/{userId}/environments/{environmentName}": [
61
+ "200",
62
+ "202",
63
+ "204",
64
+ ],
65
+ "POST /projects/{projectName}/users/{userId}/environments/{environmentName}:deploy": [
66
+ "200",
67
+ "202",
68
+ ],
69
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}:deploy": [
70
+ "200",
71
+ "202",
72
+ ],
73
+ "POST /projects/{projectName}/users/{userId}/environments/{environmentName}:delete": [
74
+ "200",
75
+ "202",
76
+ ],
77
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}:delete": [
78
+ "200",
79
+ "202",
80
+ ],
81
+ "POST /projects/{projectName}/users/{userId}/environments/{environmentName}:custom": [
82
+ "200",
83
+ "202",
84
+ ],
85
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}:custom": [
86
+ "200",
87
+ "202",
88
+ ],
89
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts": ["200"],
90
+ "GET /projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts/{artifactPath}": [
91
+ "200",
92
+ ],
93
+ "GET /projects/{projectName}/catalogItems": ["200"],
94
+ "GET /projects/{projectName}/catalogItems/{catalogItemId}": ["200"],
95
+ "GET /projects/{projectName}/catalogItems/{catalogItemId}/versions": ["200"],
96
+ "GET /projects/{projectName}/catalogItems/{catalogItemId}/versions/{version}": ["200"],
97
+ "GET /projects/{projectName}/environmentTypes": ["200"],
98
+ };
99
+ function isUnexpected(response) {
100
+ const lroOriginal = response.headers["x-ms-original-url"];
101
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
102
+ const method = response.request.method;
103
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
104
+ if (!pathDetails) {
105
+ pathDetails = geParametrizedPathSuccess(method, url.pathname);
106
+ }
107
+ return !pathDetails.includes(response.status);
108
+ }
109
+ function geParametrizedPathSuccess(method, path) {
110
+ var _a, _b;
111
+ const pathParts = path.split("/");
112
+ // Iterate the responseMap to find a match
113
+ for (const [key, value] of Object.entries(responseMap)) {
114
+ // Extracting the path from the map key which is in format
115
+ // GET /path/foo
116
+ if (!key.startsWith(method)) {
117
+ continue;
118
+ }
119
+ const candidatePath = getPathFromMapKey(key);
120
+ // Get each part of the url path
121
+ const candidateParts = candidatePath.split("/");
122
+ // If the candidate and actual paths don't match in size
123
+ // we move on to the next candidate path
124
+ if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {
125
+ // track if we have found a match to return the values found.
126
+ let found = true;
127
+ for (let i = 0; i < candidateParts.length; i++) {
128
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.endsWith("}"))) {
129
+ // If the current part of the candidate is a "template" part
130
+ // it is a match with the actual path part on hand
131
+ // skip as the parameterized part can match anything
132
+ continue;
133
+ }
134
+ // If the candidate part is not a template and
135
+ // the parts don't match mark the candidate as not found
136
+ // to move on with the next candidate path.
137
+ if (candidateParts[i] !== pathParts[i]) {
138
+ found = false;
139
+ break;
140
+ }
141
+ }
142
+ // We finished evaluating the current candidate parts
143
+ // if all parts matched we return the success values form
144
+ // the path mapping.
145
+ if (found) {
146
+ return value;
147
+ }
148
+ }
149
+ }
150
+ // No match was found, return an empty array.
151
+ return [];
152
+ }
153
+ function hasParametrizedPath(path) {
154
+ return path.includes("/{");
155
+ }
156
+ function getPathFromMapKey(mapKey) {
157
+ const pathStart = mapKey.indexOf("/");
158
+ return mapKey.slice(pathStart);
159
+ }
160
+
161
+ // Copyright (c) Microsoft Corporation.
162
+ /**
163
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
164
+ * @param client - Client to use for sending the next page requests
165
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
166
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
167
+ * @returns - PagedAsyncIterableIterator to iterate the elements
168
+ */
169
+ function paginate(client, initialResponse, options = {}) {
170
+ let firstRun = true;
171
+ const itemName = "value";
172
+ const nextLinkName = "nextLink";
173
+ const { customGetPage } = options;
174
+ const pagedResult = {
175
+ firstPageLink: "",
176
+ getPage: typeof customGetPage === "function"
177
+ ? customGetPage
178
+ : async (pageLink) => {
179
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
180
+ firstRun = false;
181
+ checkPagingRequest(result);
182
+ const nextLink = getNextLink(result.body, nextLinkName);
183
+ const values = getElements(result.body, itemName);
184
+ return {
185
+ page: values,
186
+ nextPageLink: nextLink,
187
+ };
188
+ },
189
+ };
190
+ return corePaging.getPagedAsyncIterator(pagedResult);
191
+ }
192
+ /**
193
+ * Gets for the value of nextLink in the body
194
+ */
195
+ function getNextLink(body, nextLinkName) {
196
+ if (!nextLinkName) {
197
+ return undefined;
198
+ }
199
+ const nextLink = body[nextLinkName];
200
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
201
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
202
+ }
203
+ return nextLink;
204
+ }
205
+ /**
206
+ * Gets the elements of the current request in the body.
207
+ */
208
+ function getElements(body, itemName) {
209
+ const value = body[itemName];
210
+ // value has to be an array according to the x-ms-pageable extension.
211
+ // The fact that this must be an array is used above to calculate the
212
+ // type of elements in the page in PaginateReturn
213
+ if (!Array.isArray(value)) {
214
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
215
+ }
216
+ return value !== null && value !== void 0 ? value : [];
217
+ }
218
+ /**
219
+ * Checks if a request failed
220
+ */
221
+ function checkPagingRequest(response) {
222
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
223
+ if (!Http2xxStatusCodes.includes(response.status)) {
224
+ throw coreClient.createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
225
+ }
226
+ }
227
+
228
+ // Copyright (c) Microsoft Corporation.
229
+ /**
230
+ * Helper function that builds a Poller object to help polling a long running operation.
231
+ * @param client - Client to use for sending the request to get additional pages.
232
+ * @param initialResponse - The initial response.
233
+ * @param options - Options to set a resume state or custom polling interval.
234
+ * @returns - A poller object to poll for operation state updates and eventually get the final response.
235
+ */
236
+ function getLongRunningPoller(client, initialResponse, options = {}) {
237
+ var _a;
238
+ const poller = {
239
+ requestMethod: initialResponse.request.method,
240
+ // Override this so we can poll on requests sent while recording
241
+ requestPath: (_a = initialResponse.request.headers.get("x-recording-upstream-base-uri")) !== null && _a !== void 0 ? _a : initialResponse.request.url,
242
+ sendInitialRequest: async () => {
243
+ // In the case of Rest Clients we are building the LRO poller object from a response that's the reason
244
+ // we are not triggering the initial request here, just extracting the information from the
245
+ // response we were provided.
246
+ return getLroResponse(initialResponse);
247
+ },
248
+ sendPollRequest: async (path) => {
249
+ // This is the callback that is going to be called to poll the service
250
+ // to get the latest status. We use the client provided and the polling path
251
+ // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
252
+ // depending on the lro pattern that the service implements. If non is provided we default to the initial path.
253
+ const response = await client.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url).get();
254
+ const lroResponse = getLroResponse(response);
255
+ lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
256
+ return lroResponse;
257
+ },
258
+ };
259
+ return new coreLro.LroEngine(poller, options);
260
+ }
261
+ /**
262
+ * Converts a Rest Client response to a response that the LRO engine knows about
263
+ * @param response - a rest client http response
264
+ * @returns - An LRO response that the LRO engine can work with
265
+ */
266
+ function getLroResponse(response) {
267
+ if (Number.isNaN(response.status)) {
268
+ throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
269
+ }
270
+ return {
271
+ flatResponse: response,
272
+ rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
273
+ };
274
+ }
275
+
276
+ // Copyright (c) Microsoft Corporation.
277
+
278
+ exports["default"] = createClient;
279
+ exports.getLongRunningPoller = getLongRunningPoller;
280
+ exports.isUnexpected = isUnexpected;
281
+ exports.paginate = paginate;
282
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/azureDevCenter.ts","../src/isUnexpected.ts","../src/paginateHelper.ts","../src/pollingHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { AzureDevCenterClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of the class AzureDevCenterClient class.\n * @param tenantId type: string The tenant to operate on.\n * @param devCenter type: string The DevCenter to operate on.\n * @param devCenterDnsSuffix type: string The DNS suffix used as the base for all devcenter requests.\n * @param credentials type: TokenCredential\n */\nexport default function createClient(\n tenantId: string,\n devCenter: string,\n credentials: TokenCredential,\n devCenterDnsSuffix: string = \"devcenter.azure.com\",\n options: ClientOptions = {}\n): AzureDevCenterClient {\n const baseUrl = options.baseUrl ?? `https://${tenantId}-${devCenter}.${devCenterDnsSuffix}`;\n options.apiVersion = options.apiVersion ?? \"2022-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://devcenter.azure.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;\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 AzureDevCenterClient;\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DevCenterListProjects200Response,\n DevCenterListProjectsDefaultResponse,\n DevCenterGetProject200Response,\n DevCenterGetProjectDefaultResponse,\n DevCenterListAllDevBoxes200Response,\n DevCenterListAllDevBoxesDefaultResponse,\n DevCenterListAllDevBoxesByUser200Response,\n DevCenterListAllDevBoxesByUserDefaultResponse,\n DevBoxesListPools200Response,\n DevBoxesListPoolsDefaultResponse,\n DevBoxesGetPool200Response,\n DevBoxesGetPoolDefaultResponse,\n DevBoxesListSchedulesByPool200Response,\n DevBoxesListSchedulesByPoolDefaultResponse,\n DevBoxesGetScheduleByPool200Response,\n DevBoxesGetScheduleByPoolDefaultResponse,\n DevBoxesListDevBoxesByUser200Response,\n DevBoxesListDevBoxesByUserDefaultResponse,\n DevBoxesGetDevBoxByUser200Response,\n DevBoxesGetDevBoxByUserDefaultResponse,\n DevBoxesCreateDevBox200Response,\n DevBoxesCreateDevBox201Response,\n DevBoxesCreateDevBoxDefaultResponse,\n DevBoxesDeleteDevBox200Response,\n DevBoxesDeleteDevBox202Response,\n DevBoxesDeleteDevBox204Response,\n DevBoxesDeleteDevBoxDefaultResponse,\n DevBoxesStartDevBox200Response,\n DevBoxesStartDevBox202Response,\n DevBoxesStartDevBoxDefaultResponse,\n DevBoxesStopDevBox200Response,\n DevBoxesStopDevBox202Response,\n DevBoxesStopDevBoxDefaultResponse,\n DevBoxesGetRemoteConnection200Response,\n DevBoxesGetRemoteConnectionDefaultResponse,\n EnvironmentsListEnvironments200Response,\n EnvironmentsListEnvironmentsDefaultResponse,\n EnvironmentsListEnvironmentsByUser200Response,\n EnvironmentsListEnvironmentsByUserDefaultResponse,\n EnvironmentsGetEnvironmentByUser200Response,\n EnvironmentsGetEnvironmentByUserDefaultResponse,\n EnvironmentsCreateOrUpdateEnvironment200Response,\n EnvironmentsCreateOrUpdateEnvironment201Response,\n EnvironmentsCreateOrUpdateEnvironmentDefaultResponse,\n EnvironmentsUpdateEnvironment200Response,\n EnvironmentsUpdateEnvironmentDefaultResponse,\n EnvironmentsDeleteEnvironment200Response,\n EnvironmentsDeleteEnvironment202Response,\n EnvironmentsDeleteEnvironment204Response,\n EnvironmentsDeleteEnvironmentDefaultResponse,\n EnvironmentsDeployEnvironmentAction200Response,\n EnvironmentsDeployEnvironmentAction202Response,\n EnvironmentsDeployEnvironmentActionDefaultResponse,\n EnvironmentsDeleteEnvironmentAction200Response,\n EnvironmentsDeleteEnvironmentAction202Response,\n EnvironmentsDeleteEnvironmentActionDefaultResponse,\n EnvironmentsCustomEnvironmentAction200Response,\n EnvironmentsCustomEnvironmentAction202Response,\n EnvironmentsCustomEnvironmentActionDefaultResponse,\n EnvironmentsListArtifactsByEnvironment200Response,\n EnvironmentsListArtifactsByEnvironmentDefaultResponse,\n EnvironmentsListArtifactsByEnvironmentAndPath200Response,\n EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse,\n EnvironmentsListCatalogItems200Response,\n EnvironmentsListCatalogItemsDefaultResponse,\n EnvironmentsGetCatalogItem200Response,\n EnvironmentsGetCatalogItemDefaultResponse,\n EnvironmentsListCatalogItemVersions200Response,\n EnvironmentsListCatalogItemVersionsDefaultResponse,\n EnvironmentsGetCatalogItemVersion200Response,\n EnvironmentsGetCatalogItemVersionDefaultResponse,\n EnvironmentsListEnvironmentTypes200Response,\n EnvironmentsListEnvironmentTypesDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /projects\": [\"200\"],\n \"GET /projects/{projectName}\": [\"200\"],\n \"GET /devboxes\": [\"200\"],\n \"GET /users/{userId}/devboxes\": [\"200\"],\n \"GET /projects/{projectName}/pools\": [\"200\"],\n \"GET /projects/{projectName}/pools/{poolName}\": [\"200\"],\n \"GET /projects/{projectName}/pools/{poolName}/schedules\": [\"200\"],\n \"GET /projects/{projectName}/pools/{poolName}/schedules/{scheduleName}\": [\"200\"],\n \"GET /projects/{projectName}/users/{userId}/devboxes\": [\"200\"],\n \"GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}\": [\"200\"],\n \"PUT /projects/{projectName}/users/{userId}/devboxes/{devBoxName}\": [\"200\", \"201\"],\n \"DELETE /projects/{projectName}/users/{userId}/devboxes/{devBoxName}\": [\"200\", \"202\", \"204\"],\n \"POST /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start\": [\"200\", \"202\"],\n \"GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start\": [\"200\", \"202\"],\n \"POST /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop\": [\"200\", \"202\"],\n \"GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop\": [\"200\", \"202\"],\n \"GET /projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection\": [\"200\"],\n \"GET /projects/{projectName}/environments\": [\"200\"],\n \"GET /projects/{projectName}/users/{userId}/environments\": [\"200\"],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}\": [\"200\"],\n \"PUT /projects/{projectName}/users/{userId}/environments/{environmentName}\": [\"200\", \"201\"],\n \"PATCH /projects/{projectName}/users/{userId}/environments/{environmentName}\": [\"200\"],\n \"DELETE /projects/{projectName}/users/{userId}/environments/{environmentName}\": [\n \"200\",\n \"202\",\n \"204\",\n ],\n \"POST /projects/{projectName}/users/{userId}/environments/{environmentName}:deploy\": [\n \"200\",\n \"202\",\n ],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}:deploy\": [\n \"200\",\n \"202\",\n ],\n \"POST /projects/{projectName}/users/{userId}/environments/{environmentName}:delete\": [\n \"200\",\n \"202\",\n ],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}:delete\": [\n \"200\",\n \"202\",\n ],\n \"POST /projects/{projectName}/users/{userId}/environments/{environmentName}:custom\": [\n \"200\",\n \"202\",\n ],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}:custom\": [\n \"200\",\n \"202\",\n ],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts\": [\"200\"],\n \"GET /projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts/{artifactPath}\": [\n \"200\",\n ],\n \"GET /projects/{projectName}/catalogItems\": [\"200\"],\n \"GET /projects/{projectName}/catalogItems/{catalogItemId}\": [\"200\"],\n \"GET /projects/{projectName}/catalogItems/{catalogItemId}/versions\": [\"200\"],\n \"GET /projects/{projectName}/catalogItems/{catalogItemId}/versions/{version}\": [\"200\"],\n \"GET /projects/{projectName}/environmentTypes\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: DevCenterListProjects200Response | DevCenterListProjectsDefaultResponse\n): response is DevCenterListProjectsDefaultResponse;\nexport function isUnexpected(\n response: DevCenterGetProject200Response | DevCenterGetProjectDefaultResponse\n): response is DevCenterGetProjectDefaultResponse;\nexport function isUnexpected(\n response: DevCenterListAllDevBoxes200Response | DevCenterListAllDevBoxesDefaultResponse\n): response is DevCenterListAllDevBoxesDefaultResponse;\nexport function isUnexpected(\n response:\n | DevCenterListAllDevBoxesByUser200Response\n | DevCenterListAllDevBoxesByUserDefaultResponse\n): response is DevCenterListAllDevBoxesByUserDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesListPools200Response | DevBoxesListPoolsDefaultResponse\n): response is DevBoxesListPoolsDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesGetPool200Response | DevBoxesGetPoolDefaultResponse\n): response is DevBoxesGetPoolDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesListSchedulesByPool200Response | DevBoxesListSchedulesByPoolDefaultResponse\n): response is DevBoxesListSchedulesByPoolDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesGetScheduleByPool200Response | DevBoxesGetScheduleByPoolDefaultResponse\n): response is DevBoxesGetScheduleByPoolDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesListDevBoxesByUser200Response | DevBoxesListDevBoxesByUserDefaultResponse\n): response is DevBoxesListDevBoxesByUserDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesGetDevBoxByUser200Response | DevBoxesGetDevBoxByUserDefaultResponse\n): response is DevBoxesGetDevBoxByUserDefaultResponse;\nexport function isUnexpected(\n response:\n | DevBoxesCreateDevBox200Response\n | DevBoxesCreateDevBox201Response\n | DevBoxesCreateDevBoxDefaultResponse\n): response is DevBoxesCreateDevBoxDefaultResponse;\nexport function isUnexpected(\n response:\n | DevBoxesDeleteDevBox200Response\n | DevBoxesDeleteDevBox202Response\n | DevBoxesDeleteDevBox204Response\n | DevBoxesDeleteDevBoxDefaultResponse\n): response is DevBoxesDeleteDevBoxDefaultResponse;\nexport function isUnexpected(\n response:\n | DevBoxesStartDevBox200Response\n | DevBoxesStartDevBox202Response\n | DevBoxesStartDevBoxDefaultResponse\n): response is DevBoxesStartDevBoxDefaultResponse;\nexport function isUnexpected(\n response:\n | DevBoxesStopDevBox200Response\n | DevBoxesStopDevBox202Response\n | DevBoxesStopDevBoxDefaultResponse\n): response is DevBoxesStopDevBoxDefaultResponse;\nexport function isUnexpected(\n response: DevBoxesGetRemoteConnection200Response | DevBoxesGetRemoteConnectionDefaultResponse\n): response is DevBoxesGetRemoteConnectionDefaultResponse;\nexport function isUnexpected(\n response: EnvironmentsListEnvironments200Response | EnvironmentsListEnvironmentsDefaultResponse\n): response is EnvironmentsListEnvironmentsDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsListEnvironmentsByUser200Response\n | EnvironmentsListEnvironmentsByUserDefaultResponse\n): response is EnvironmentsListEnvironmentsByUserDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsGetEnvironmentByUser200Response\n | EnvironmentsGetEnvironmentByUserDefaultResponse\n): response is EnvironmentsGetEnvironmentByUserDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsCreateOrUpdateEnvironment200Response\n | EnvironmentsCreateOrUpdateEnvironment201Response\n | EnvironmentsCreateOrUpdateEnvironmentDefaultResponse\n): response is EnvironmentsCreateOrUpdateEnvironmentDefaultResponse;\nexport function isUnexpected(\n response: EnvironmentsUpdateEnvironment200Response | EnvironmentsUpdateEnvironmentDefaultResponse\n): response is EnvironmentsUpdateEnvironmentDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsDeleteEnvironment200Response\n | EnvironmentsDeleteEnvironment202Response\n | EnvironmentsDeleteEnvironment204Response\n | EnvironmentsDeleteEnvironmentDefaultResponse\n): response is EnvironmentsDeleteEnvironmentDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsDeployEnvironmentAction200Response\n | EnvironmentsDeployEnvironmentAction202Response\n | EnvironmentsDeployEnvironmentActionDefaultResponse\n): response is EnvironmentsDeployEnvironmentActionDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsDeleteEnvironmentAction200Response\n | EnvironmentsDeleteEnvironmentAction202Response\n | EnvironmentsDeleteEnvironmentActionDefaultResponse\n): response is EnvironmentsDeleteEnvironmentActionDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsCustomEnvironmentAction200Response\n | EnvironmentsCustomEnvironmentAction202Response\n | EnvironmentsCustomEnvironmentActionDefaultResponse\n): response is EnvironmentsCustomEnvironmentActionDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsListArtifactsByEnvironment200Response\n | EnvironmentsListArtifactsByEnvironmentDefaultResponse\n): response is EnvironmentsListArtifactsByEnvironmentDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsListArtifactsByEnvironmentAndPath200Response\n | EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse\n): response is EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse;\nexport function isUnexpected(\n response: EnvironmentsListCatalogItems200Response | EnvironmentsListCatalogItemsDefaultResponse\n): response is EnvironmentsListCatalogItemsDefaultResponse;\nexport function isUnexpected(\n response: EnvironmentsGetCatalogItem200Response | EnvironmentsGetCatalogItemDefaultResponse\n): response is EnvironmentsGetCatalogItemDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsListCatalogItemVersions200Response\n | EnvironmentsListCatalogItemVersionsDefaultResponse\n): response is EnvironmentsListCatalogItemVersionsDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsGetCatalogItemVersion200Response\n | EnvironmentsGetCatalogItemVersionDefaultResponse\n): response is EnvironmentsGetCatalogItemVersionDefaultResponse;\nexport function isUnexpected(\n response:\n | EnvironmentsListEnvironmentTypes200Response\n | EnvironmentsListEnvironmentTypesDefaultResponse\n): response is EnvironmentsListEnvironmentTypesDefaultResponse;\nexport function isUnexpected(\n response:\n | DevCenterListProjects200Response\n | DevCenterListProjectsDefaultResponse\n | DevCenterGetProject200Response\n | DevCenterGetProjectDefaultResponse\n | DevCenterListAllDevBoxes200Response\n | DevCenterListAllDevBoxesDefaultResponse\n | DevCenterListAllDevBoxesByUser200Response\n | DevCenterListAllDevBoxesByUserDefaultResponse\n | DevBoxesListPools200Response\n | DevBoxesListPoolsDefaultResponse\n | DevBoxesGetPool200Response\n | DevBoxesGetPoolDefaultResponse\n | DevBoxesListSchedulesByPool200Response\n | DevBoxesListSchedulesByPoolDefaultResponse\n | DevBoxesGetScheduleByPool200Response\n | DevBoxesGetScheduleByPoolDefaultResponse\n | DevBoxesListDevBoxesByUser200Response\n | DevBoxesListDevBoxesByUserDefaultResponse\n | DevBoxesGetDevBoxByUser200Response\n | DevBoxesGetDevBoxByUserDefaultResponse\n | DevBoxesCreateDevBox200Response\n | DevBoxesCreateDevBox201Response\n | DevBoxesCreateDevBoxDefaultResponse\n | DevBoxesDeleteDevBox200Response\n | DevBoxesDeleteDevBox202Response\n | DevBoxesDeleteDevBox204Response\n | DevBoxesDeleteDevBoxDefaultResponse\n | DevBoxesStartDevBox200Response\n | DevBoxesStartDevBox202Response\n | DevBoxesStartDevBoxDefaultResponse\n | DevBoxesStopDevBox200Response\n | DevBoxesStopDevBox202Response\n | DevBoxesStopDevBoxDefaultResponse\n | DevBoxesGetRemoteConnection200Response\n | DevBoxesGetRemoteConnectionDefaultResponse\n | EnvironmentsListEnvironments200Response\n | EnvironmentsListEnvironmentsDefaultResponse\n | EnvironmentsListEnvironmentsByUser200Response\n | EnvironmentsListEnvironmentsByUserDefaultResponse\n | EnvironmentsGetEnvironmentByUser200Response\n | EnvironmentsGetEnvironmentByUserDefaultResponse\n | EnvironmentsCreateOrUpdateEnvironment200Response\n | EnvironmentsCreateOrUpdateEnvironment201Response\n | EnvironmentsCreateOrUpdateEnvironmentDefaultResponse\n | EnvironmentsUpdateEnvironment200Response\n | EnvironmentsUpdateEnvironmentDefaultResponse\n | EnvironmentsDeleteEnvironment200Response\n | EnvironmentsDeleteEnvironment202Response\n | EnvironmentsDeleteEnvironment204Response\n | EnvironmentsDeleteEnvironmentDefaultResponse\n | EnvironmentsDeployEnvironmentAction200Response\n | EnvironmentsDeployEnvironmentAction202Response\n | EnvironmentsDeployEnvironmentActionDefaultResponse\n | EnvironmentsDeleteEnvironmentAction200Response\n | EnvironmentsDeleteEnvironmentAction202Response\n | EnvironmentsDeleteEnvironmentActionDefaultResponse\n | EnvironmentsCustomEnvironmentAction200Response\n | EnvironmentsCustomEnvironmentAction202Response\n | EnvironmentsCustomEnvironmentActionDefaultResponse\n | EnvironmentsListArtifactsByEnvironment200Response\n | EnvironmentsListArtifactsByEnvironmentDefaultResponse\n | EnvironmentsListArtifactsByEnvironmentAndPath200Response\n | EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse\n | EnvironmentsListCatalogItems200Response\n | EnvironmentsListCatalogItemsDefaultResponse\n | EnvironmentsGetCatalogItem200Response\n | EnvironmentsGetCatalogItemDefaultResponse\n | EnvironmentsListCatalogItemVersions200Response\n | EnvironmentsListCatalogItemVersionsDefaultResponse\n | EnvironmentsGetCatalogItemVersion200Response\n | EnvironmentsGetCatalogItemVersionDefaultResponse\n | EnvironmentsListEnvironmentTypes200Response\n | EnvironmentsListEnvironmentTypesDefaultResponse\n): response is\n | DevCenterListProjectsDefaultResponse\n | DevCenterGetProjectDefaultResponse\n | DevCenterListAllDevBoxesDefaultResponse\n | DevCenterListAllDevBoxesByUserDefaultResponse\n | DevBoxesListPoolsDefaultResponse\n | DevBoxesGetPoolDefaultResponse\n | DevBoxesListSchedulesByPoolDefaultResponse\n | DevBoxesGetScheduleByPoolDefaultResponse\n | DevBoxesListDevBoxesByUserDefaultResponse\n | DevBoxesGetDevBoxByUserDefaultResponse\n | DevBoxesCreateDevBoxDefaultResponse\n | DevBoxesDeleteDevBoxDefaultResponse\n | DevBoxesStartDevBoxDefaultResponse\n | DevBoxesStopDevBoxDefaultResponse\n | DevBoxesGetRemoteConnectionDefaultResponse\n | EnvironmentsListEnvironmentsDefaultResponse\n | EnvironmentsListEnvironmentsByUserDefaultResponse\n | EnvironmentsGetEnvironmentByUserDefaultResponse\n | EnvironmentsCreateOrUpdateEnvironmentDefaultResponse\n | EnvironmentsUpdateEnvironmentDefaultResponse\n | EnvironmentsDeleteEnvironmentDefaultResponse\n | EnvironmentsDeployEnvironmentActionDefaultResponse\n | EnvironmentsDeleteEnvironmentActionDefaultResponse\n | EnvironmentsCustomEnvironmentActionDefaultResponse\n | EnvironmentsListArtifactsByEnvironmentDefaultResponse\n | EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse\n | EnvironmentsListCatalogItemsDefaultResponse\n | EnvironmentsGetCatalogItemDefaultResponse\n | EnvironmentsListCatalogItemVersionsDefaultResponse\n | EnvironmentsGetCatalogItemVersionDefaultResponse\n | EnvironmentsListEnvironmentTypesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = geParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.endsWith(\"}\")) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } 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","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n LongRunningOperation,\n LroEngine,\n LroEngineOptions,\n LroResponse,\n PollerLike,\n PollOperationState,\n} from \"@azure/core-lro\";\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: LroEngineOptions<TResult, PollOperationState<TResult>> = {}\n): PollerLike<PollOperationState<TResult>, TResult> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n // Override this so we can poll on requests sent while recording\n requestPath:\n initialResponse.request.headers.get(\"x-recording-upstream-base-uri\") ??\n initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n return new LroEngine(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO engine knows about\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO engine can work with\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureDevCenter from \"./azureDevCenter\";\n\nexport * from \"./azureDevCenter\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\nexport * from \"./pollingHelper\";\n\nexport default AzureDevCenter;\n"],"names":["getClient","getPagedAsyncIterator","createRestError","LroEngine"],"mappings":";;;;;;;;AAAA;AAOA;;;;;;AAMG;AACqB,SAAA,YAAY,CAClC,QAAgB,EAChB,SAAiB,EACjB,WAA4B,EAC5B,kBAAA,GAA6B,qBAAqB,EAClD,UAAyB,EAAE,EAAA;;AAE3B,IAAA,MAAM,OAAO,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAW,QAAA,EAAA,QAAQ,CAAI,CAAA,EAAA,SAAS,CAAI,CAAA,EAAA,kBAAkB,EAAE,CAAC;IAC5F,OAAO,CAAC,UAAU,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,UAAU,M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CAAC;SACxC;AACD,QAAA,eAAe,EAAE,OAAO,IAAI,KAAI;;;;;YAK9B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,KAAA,IAAA,IAAJ,IAAI,KAAA,KAAA,CAAA,GAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;AACvF,YAAA,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;AACxD,YAAA,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;AACnF,YAAA,OAAO,WAAW,CAAC;SACpB;KACF,CAAC;AAEF,IAAA,OAAO,IAAIC,iBAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;AAIG;AACH,SAAS,cAAc,CAA+B,QAAiB,EAAA;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjC,MAAM,IAAI,SAAS,CAAC,CAAA,oDAAA,EAAuD,QAAQ,CAAC,MAAM,CAAE,CAAA,CAAC,CAAC;AAC/F,KAAA;IAED,OAAO;AACL,QAAA,YAAY,EAAE,QAAQ;AACtB,QAAA,WAAW,kCACN,QAAQ,CAAA,EAAA,EACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,EACpB,CAAA;KACF,CAAC;AACJ;;ACtEA;;;;;;;"}
@@ -0,0 +1,28 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { getClient } from "@azure-rest/core-client";
4
+ /**
5
+ * Initialize a new instance of the class AzureDevCenterClient class.
6
+ * @param tenantId type: string The tenant to operate on.
7
+ * @param devCenter type: string The DevCenter to operate on.
8
+ * @param devCenterDnsSuffix type: string The DNS suffix used as the base for all devcenter requests.
9
+ * @param credentials type: TokenCredential
10
+ */
11
+ export default function createClient(tenantId, devCenter, credentials, devCenterDnsSuffix = "devcenter.azure.com", options = {}) {
12
+ var _a, _b;
13
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `https://${tenantId}-${devCenter}.${devCenterDnsSuffix}`;
14
+ options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2022-03-01-preview";
15
+ options = Object.assign(Object.assign({}, options), { credentials: {
16
+ scopes: ["https://devcenter.azure.com/.default"],
17
+ } });
18
+ const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;
19
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
20
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
21
+ : `${userAgentInfo}`;
22
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
23
+ userAgentPrefix,
24
+ } });
25
+ const client = getClient(baseUrl, credentials, options);
26
+ return client;
27
+ }
28
+ //# sourceMappingURL=azureDevCenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureDevCenter.js","sourceRoot":"","sources":["../../src/azureDevCenter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,SAAiB,EACjB,WAA4B,EAC5B,qBAA6B,qBAAqB,EAClD,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,WAAW,QAAQ,IAAI,SAAS,IAAI,kBAAkB,EAAE,CAAC;IAC5F,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,sCAAsC,CAAC;SACjD,GACF,CAAC;IAEF,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,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,CAAyB,CAAC;IAEhF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { AzureDevCenterClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of the class AzureDevCenterClient class.\n * @param tenantId type: string The tenant to operate on.\n * @param devCenter type: string The DevCenter to operate on.\n * @param devCenterDnsSuffix type: string The DNS suffix used as the base for all devcenter requests.\n * @param credentials type: TokenCredential\n */\nexport default function createClient(\n tenantId: string,\n devCenter: string,\n credentials: TokenCredential,\n devCenterDnsSuffix: string = \"devcenter.azure.com\",\n options: ClientOptions = {}\n): AzureDevCenterClient {\n const baseUrl = options.baseUrl ?? `https://${tenantId}-${devCenter}.${devCenterDnsSuffix}`;\n options.apiVersion = options.apiVersion ?? \"2022-03-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://devcenter.azure.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-developer-devcenter-rest/1.0.0`;\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 AzureDevCenterClient;\n\n return client;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ export {};
4
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DevCenterListProjectsParameters,\n DevCenterGetProjectParameters,\n DevCenterListAllDevBoxesParameters,\n DevCenterListAllDevBoxesByUserParameters,\n DevBoxesListPoolsParameters,\n DevBoxesGetPoolParameters,\n DevBoxesListSchedulesByPoolParameters,\n DevBoxesGetScheduleByPoolParameters,\n DevBoxesListDevBoxesByUserParameters,\n DevBoxesGetDevBoxByUserParameters,\n DevBoxesCreateDevBoxParameters,\n DevBoxesDeleteDevBoxParameters,\n DevBoxesStartDevBoxParameters,\n DevBoxesStopDevBoxParameters,\n DevBoxesGetRemoteConnectionParameters,\n EnvironmentsListEnvironmentsParameters,\n EnvironmentsListEnvironmentsByUserParameters,\n EnvironmentsGetEnvironmentByUserParameters,\n EnvironmentsCreateOrUpdateEnvironmentParameters,\n EnvironmentsUpdateEnvironmentParameters,\n EnvironmentsDeleteEnvironmentParameters,\n EnvironmentsDeployEnvironmentActionParameters,\n EnvironmentsDeleteEnvironmentActionParameters,\n EnvironmentsCustomEnvironmentActionParameters,\n EnvironmentsListArtifactsByEnvironmentParameters,\n EnvironmentsListArtifactsByEnvironmentAndPathParameters,\n EnvironmentsListCatalogItemsParameters,\n EnvironmentsGetCatalogItemParameters,\n EnvironmentsListCatalogItemVersionsParameters,\n EnvironmentsGetCatalogItemVersionParameters,\n EnvironmentsListEnvironmentTypesParameters,\n} from \"./parameters\";\nimport {\n DevCenterListProjects200Response,\n DevCenterListProjectsDefaultResponse,\n DevCenterGetProject200Response,\n DevCenterGetProjectDefaultResponse,\n DevCenterListAllDevBoxes200Response,\n DevCenterListAllDevBoxesDefaultResponse,\n DevCenterListAllDevBoxesByUser200Response,\n DevCenterListAllDevBoxesByUserDefaultResponse,\n DevBoxesListPools200Response,\n DevBoxesListPoolsDefaultResponse,\n DevBoxesGetPool200Response,\n DevBoxesGetPoolDefaultResponse,\n DevBoxesListSchedulesByPool200Response,\n DevBoxesListSchedulesByPoolDefaultResponse,\n DevBoxesGetScheduleByPool200Response,\n DevBoxesGetScheduleByPoolDefaultResponse,\n DevBoxesListDevBoxesByUser200Response,\n DevBoxesListDevBoxesByUserDefaultResponse,\n DevBoxesGetDevBoxByUser200Response,\n DevBoxesGetDevBoxByUserDefaultResponse,\n DevBoxesCreateDevBox200Response,\n DevBoxesCreateDevBox201Response,\n DevBoxesCreateDevBoxDefaultResponse,\n DevBoxesDeleteDevBox200Response,\n DevBoxesDeleteDevBox202Response,\n DevBoxesDeleteDevBox204Response,\n DevBoxesDeleteDevBoxDefaultResponse,\n DevBoxesStartDevBox200Response,\n DevBoxesStartDevBox202Response,\n DevBoxesStartDevBoxDefaultResponse,\n DevBoxesStopDevBox200Response,\n DevBoxesStopDevBox202Response,\n DevBoxesStopDevBoxDefaultResponse,\n DevBoxesGetRemoteConnection200Response,\n DevBoxesGetRemoteConnectionDefaultResponse,\n EnvironmentsListEnvironments200Response,\n EnvironmentsListEnvironmentsDefaultResponse,\n EnvironmentsListEnvironmentsByUser200Response,\n EnvironmentsListEnvironmentsByUserDefaultResponse,\n EnvironmentsGetEnvironmentByUser200Response,\n EnvironmentsGetEnvironmentByUserDefaultResponse,\n EnvironmentsCreateOrUpdateEnvironment200Response,\n EnvironmentsCreateOrUpdateEnvironment201Response,\n EnvironmentsCreateOrUpdateEnvironmentDefaultResponse,\n EnvironmentsUpdateEnvironment200Response,\n EnvironmentsUpdateEnvironmentDefaultResponse,\n EnvironmentsDeleteEnvironment200Response,\n EnvironmentsDeleteEnvironment202Response,\n EnvironmentsDeleteEnvironment204Response,\n EnvironmentsDeleteEnvironmentDefaultResponse,\n EnvironmentsDeployEnvironmentAction200Response,\n EnvironmentsDeployEnvironmentAction202Response,\n EnvironmentsDeployEnvironmentActionDefaultResponse,\n EnvironmentsDeleteEnvironmentAction200Response,\n EnvironmentsDeleteEnvironmentAction202Response,\n EnvironmentsDeleteEnvironmentActionDefaultResponse,\n EnvironmentsCustomEnvironmentAction200Response,\n EnvironmentsCustomEnvironmentAction202Response,\n EnvironmentsCustomEnvironmentActionDefaultResponse,\n EnvironmentsListArtifactsByEnvironment200Response,\n EnvironmentsListArtifactsByEnvironmentDefaultResponse,\n EnvironmentsListArtifactsByEnvironmentAndPath200Response,\n EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse,\n EnvironmentsListCatalogItems200Response,\n EnvironmentsListCatalogItemsDefaultResponse,\n EnvironmentsGetCatalogItem200Response,\n EnvironmentsGetCatalogItemDefaultResponse,\n EnvironmentsListCatalogItemVersions200Response,\n EnvironmentsListCatalogItemVersionsDefaultResponse,\n EnvironmentsGetCatalogItemVersion200Response,\n EnvironmentsGetCatalogItemVersionDefaultResponse,\n EnvironmentsListEnvironmentTypes200Response,\n EnvironmentsListEnvironmentTypesDefaultResponse,\n} from \"./responses\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface DevCenterListProjects {\n /** Lists all projects. */\n get(\n options?: DevCenterListProjectsParameters\n ): StreamableMethod<DevCenterListProjects200Response | DevCenterListProjectsDefaultResponse>;\n}\n\nexport interface DevCenterGetProject {\n /** Gets a project. */\n get(\n options?: DevCenterGetProjectParameters\n ): StreamableMethod<DevCenterGetProject200Response | DevCenterGetProjectDefaultResponse>;\n}\n\nexport interface DevCenterListAllDevBoxes {\n /** Lists Dev Boxes that the caller has access to in the DevCenter. */\n get(\n options?: DevCenterListAllDevBoxesParameters\n ): StreamableMethod<\n DevCenterListAllDevBoxes200Response | DevCenterListAllDevBoxesDefaultResponse\n >;\n}\n\nexport interface DevCenterListAllDevBoxesByUser {\n /** Lists Dev Boxes in the Dev Center for a particular user. */\n get(\n options?: DevCenterListAllDevBoxesByUserParameters\n ): StreamableMethod<\n DevCenterListAllDevBoxesByUser200Response | DevCenterListAllDevBoxesByUserDefaultResponse\n >;\n}\n\nexport interface DevBoxesListPools {\n /** Lists available pools */\n get(\n options?: DevBoxesListPoolsParameters\n ): StreamableMethod<DevBoxesListPools200Response | DevBoxesListPoolsDefaultResponse>;\n}\n\nexport interface DevBoxesGetPool {\n /** Gets a pool */\n get(\n options?: DevBoxesGetPoolParameters\n ): StreamableMethod<DevBoxesGetPool200Response | DevBoxesGetPoolDefaultResponse>;\n}\n\nexport interface DevBoxesListSchedulesByPool {\n /** Lists available schedules for a pool. */\n get(\n options?: DevBoxesListSchedulesByPoolParameters\n ): StreamableMethod<\n DevBoxesListSchedulesByPool200Response | DevBoxesListSchedulesByPoolDefaultResponse\n >;\n}\n\nexport interface DevBoxesGetScheduleByPool {\n /** Gets a schedule. */\n get(\n options?: DevBoxesGetScheduleByPoolParameters\n ): StreamableMethod<\n DevBoxesGetScheduleByPool200Response | DevBoxesGetScheduleByPoolDefaultResponse\n >;\n}\n\nexport interface DevBoxesListDevBoxesByUser {\n /** Lists Dev Boxes in the project for a particular user. */\n get(\n options?: DevBoxesListDevBoxesByUserParameters\n ): StreamableMethod<\n DevBoxesListDevBoxesByUser200Response | DevBoxesListDevBoxesByUserDefaultResponse\n >;\n}\n\nexport interface DevBoxesGetDevBoxByUser {\n /** Gets a Dev Box */\n get(\n options?: DevBoxesGetDevBoxByUserParameters\n ): StreamableMethod<DevBoxesGetDevBoxByUser200Response | DevBoxesGetDevBoxByUserDefaultResponse>;\n /** Creates or updates a Dev Box. */\n put(\n options: DevBoxesCreateDevBoxParameters\n ): StreamableMethod<\n | DevBoxesCreateDevBox200Response\n | DevBoxesCreateDevBox201Response\n | DevBoxesCreateDevBoxDefaultResponse\n >;\n /** Deletes a Dev Box. */\n delete(\n options?: DevBoxesDeleteDevBoxParameters\n ): StreamableMethod<\n | DevBoxesDeleteDevBox200Response\n | DevBoxesDeleteDevBox202Response\n | DevBoxesDeleteDevBox204Response\n | DevBoxesDeleteDevBoxDefaultResponse\n >;\n}\n\nexport interface DevBoxesStartDevBox {\n /** Starts a Dev Box */\n post(\n options?: DevBoxesStartDevBoxParameters\n ): StreamableMethod<\n | DevBoxesStartDevBox200Response\n | DevBoxesStartDevBox202Response\n | DevBoxesStartDevBoxDefaultResponse\n >;\n}\n\nexport interface DevBoxesStopDevBox {\n /** Stops a Dev Box */\n post(\n options?: DevBoxesStopDevBoxParameters\n ): StreamableMethod<\n | DevBoxesStopDevBox200Response\n | DevBoxesStopDevBox202Response\n | DevBoxesStopDevBoxDefaultResponse\n >;\n}\n\nexport interface DevBoxesGetRemoteConnection {\n /** Gets RDP Connection info */\n get(\n options?: DevBoxesGetRemoteConnectionParameters\n ): StreamableMethod<\n DevBoxesGetRemoteConnection200Response | DevBoxesGetRemoteConnectionDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListEnvironments {\n /** Lists the environments for a project. */\n get(\n options?: EnvironmentsListEnvironmentsParameters\n ): StreamableMethod<\n EnvironmentsListEnvironments200Response | EnvironmentsListEnvironmentsDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListEnvironmentsByUser {\n /** Lists the environments for a project and user. */\n get(\n options?: EnvironmentsListEnvironmentsByUserParameters\n ): StreamableMethod<\n | EnvironmentsListEnvironmentsByUser200Response\n | EnvironmentsListEnvironmentsByUserDefaultResponse\n >;\n}\n\nexport interface EnvironmentsGetEnvironmentByUser {\n /** Gets an environment */\n get(\n options?: EnvironmentsGetEnvironmentByUserParameters\n ): StreamableMethod<\n EnvironmentsGetEnvironmentByUser200Response | EnvironmentsGetEnvironmentByUserDefaultResponse\n >;\n /** Creates or updates an environment. */\n put(\n options: EnvironmentsCreateOrUpdateEnvironmentParameters\n ): StreamableMethod<\n | EnvironmentsCreateOrUpdateEnvironment200Response\n | EnvironmentsCreateOrUpdateEnvironment201Response\n | EnvironmentsCreateOrUpdateEnvironmentDefaultResponse\n >;\n /** Partially updates an environment */\n patch(\n options: EnvironmentsUpdateEnvironmentParameters\n ): StreamableMethod<\n EnvironmentsUpdateEnvironment200Response | EnvironmentsUpdateEnvironmentDefaultResponse\n >;\n /** Deletes an environment and all it's associated resources */\n delete(\n options?: EnvironmentsDeleteEnvironmentParameters\n ): StreamableMethod<\n | EnvironmentsDeleteEnvironment200Response\n | EnvironmentsDeleteEnvironment202Response\n | EnvironmentsDeleteEnvironment204Response\n | EnvironmentsDeleteEnvironmentDefaultResponse\n >;\n}\n\nexport interface EnvironmentsDeployEnvironmentAction {\n /** Executes a deploy action */\n post(\n options: EnvironmentsDeployEnvironmentActionParameters\n ): StreamableMethod<\n | EnvironmentsDeployEnvironmentAction200Response\n | EnvironmentsDeployEnvironmentAction202Response\n | EnvironmentsDeployEnvironmentActionDefaultResponse\n >;\n}\n\nexport interface EnvironmentsDeleteEnvironmentAction {\n /** Executes a delete action */\n post(\n options: EnvironmentsDeleteEnvironmentActionParameters\n ): StreamableMethod<\n | EnvironmentsDeleteEnvironmentAction200Response\n | EnvironmentsDeleteEnvironmentAction202Response\n | EnvironmentsDeleteEnvironmentActionDefaultResponse\n >;\n}\n\nexport interface EnvironmentsCustomEnvironmentAction {\n /** Executes a custom action */\n post(\n options: EnvironmentsCustomEnvironmentActionParameters\n ): StreamableMethod<\n | EnvironmentsCustomEnvironmentAction200Response\n | EnvironmentsCustomEnvironmentAction202Response\n | EnvironmentsCustomEnvironmentActionDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListArtifactsByEnvironment {\n /** Lists the artifacts for an environment */\n get(\n options?: EnvironmentsListArtifactsByEnvironmentParameters\n ): StreamableMethod<\n | EnvironmentsListArtifactsByEnvironment200Response\n | EnvironmentsListArtifactsByEnvironmentDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListArtifactsByEnvironmentAndPath {\n /** Lists the artifacts for an environment at a specified path, or returns the file at the path. */\n get(\n options?: EnvironmentsListArtifactsByEnvironmentAndPathParameters\n ): StreamableMethod<\n | EnvironmentsListArtifactsByEnvironmentAndPath200Response\n | EnvironmentsListArtifactsByEnvironmentAndPathDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListCatalogItems {\n /** Lists latest version of all catalog items available for a project. */\n get(\n options?: EnvironmentsListCatalogItemsParameters\n ): StreamableMethod<\n EnvironmentsListCatalogItems200Response | EnvironmentsListCatalogItemsDefaultResponse\n >;\n}\n\nexport interface EnvironmentsGetCatalogItem {\n /** Get a catalog item from a project. */\n get(\n options?: EnvironmentsGetCatalogItemParameters\n ): StreamableMethod<\n EnvironmentsGetCatalogItem200Response | EnvironmentsGetCatalogItemDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListCatalogItemVersions {\n /** List all versions of a catalog item from a project. */\n get(\n options?: EnvironmentsListCatalogItemVersionsParameters\n ): StreamableMethod<\n | EnvironmentsListCatalogItemVersions200Response\n | EnvironmentsListCatalogItemVersionsDefaultResponse\n >;\n}\n\nexport interface EnvironmentsGetCatalogItemVersion {\n /** Get a specific catalog item version from a project. */\n get(\n options?: EnvironmentsGetCatalogItemVersionParameters\n ): StreamableMethod<\n EnvironmentsGetCatalogItemVersion200Response | EnvironmentsGetCatalogItemVersionDefaultResponse\n >;\n}\n\nexport interface EnvironmentsListEnvironmentTypes {\n /** Lists all environment types configured for a project. */\n get(\n options?: EnvironmentsListEnvironmentTypesParameters\n ): StreamableMethod<\n EnvironmentsListEnvironmentTypes200Response | EnvironmentsListEnvironmentTypesDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/projects' has methods for the following verbs: get */\n (path: \"/projects\"): DevCenterListProjects;\n /** Resource for '/projects/\\{projectName\\}' has methods for the following verbs: get */\n (path: \"/projects/{projectName}\", projectName: string): DevCenterGetProject;\n /** Resource for '/devboxes' has methods for the following verbs: get */\n (path: \"/devboxes\"): DevCenterListAllDevBoxes;\n /** Resource for '/users/\\{userId\\}/devboxes' has methods for the following verbs: get */\n (path: \"/users/{userId}/devboxes\", userId: string): DevCenterListAllDevBoxesByUser;\n /** Resource for '/projects/\\{projectName\\}/pools' has methods for the following verbs: get */\n (path: \"/projects/{projectName}/pools\", projectName: string): DevBoxesListPools;\n /** Resource for '/projects/\\{projectName\\}/pools/\\{poolName\\}' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/pools/{poolName}\",\n projectName: string,\n poolName: string\n ): DevBoxesGetPool;\n /** Resource for '/projects/\\{projectName\\}/pools/\\{poolName\\}/schedules' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/pools/{poolName}/schedules\",\n projectName: string,\n poolName: string\n ): DevBoxesListSchedulesByPool;\n /** Resource for '/projects/\\{projectName\\}/pools/\\{poolName\\}/schedules/\\{scheduleName\\}' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/pools/{poolName}/schedules/{scheduleName}\",\n projectName: string,\n poolName: string,\n scheduleName: string\n ): DevBoxesGetScheduleByPool;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/devboxes' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/users/{userId}/devboxes\",\n projectName: string,\n userId: string\n ): DevBoxesListDevBoxesByUser;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/devboxes/\\{devBoxName\\}' has methods for the following verbs: get, put, delete */\n (\n path: \"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}\",\n projectName: string,\n userId: string,\n devBoxName: string\n ): DevBoxesGetDevBoxByUser;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/devboxes/\\{devBoxName\\}:start' has methods for the following verbs: post */\n (\n path: \"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:start\",\n projectName: string,\n userId: string,\n devBoxName: string\n ): DevBoxesStartDevBox;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/devboxes/\\{devBoxName\\}:stop' has methods for the following verbs: post */\n (\n path: \"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}:stop\",\n projectName: string,\n userId: string,\n devBoxName: string\n ): DevBoxesStopDevBox;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/devboxes/\\{devBoxName\\}/remoteConnection' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/users/{userId}/devboxes/{devBoxName}/remoteConnection\",\n projectName: string,\n userId: string,\n devBoxName: string\n ): DevBoxesGetRemoteConnection;\n /** Resource for '/projects/\\{projectName\\}/environments' has methods for the following verbs: get */\n (path: \"/projects/{projectName}/environments\", projectName: string): EnvironmentsListEnvironments;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/users/{userId}/environments\",\n projectName: string,\n userId: string\n ): EnvironmentsListEnvironmentsByUser;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}' has methods for the following verbs: get, put, patch, delete */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}\",\n projectName: string,\n userId: string,\n environmentName: string\n ): EnvironmentsGetEnvironmentByUser;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}:deploy' has methods for the following verbs: post */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}:deploy\",\n projectName: string,\n userId: string,\n environmentName: string\n ): EnvironmentsDeployEnvironmentAction;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}:delete' has methods for the following verbs: post */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}:delete\",\n projectName: string,\n userId: string,\n environmentName: string\n ): EnvironmentsDeleteEnvironmentAction;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}:custom' has methods for the following verbs: post */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}:custom\",\n projectName: string,\n userId: string,\n environmentName: string\n ): EnvironmentsCustomEnvironmentAction;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}/artifacts' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts\",\n projectName: string,\n userId: string,\n environmentName: string\n ): EnvironmentsListArtifactsByEnvironment;\n /** Resource for '/projects/\\{projectName\\}/users/\\{userId\\}/environments/\\{environmentName\\}/artifacts/\\{artifactPath\\}' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/users/{userId}/environments/{environmentName}/artifacts/{artifactPath}\",\n projectName: string,\n userId: string,\n environmentName: string,\n artifactPath: string\n ): EnvironmentsListArtifactsByEnvironmentAndPath;\n /** Resource for '/projects/\\{projectName\\}/catalogItems' has methods for the following verbs: get */\n (path: \"/projects/{projectName}/catalogItems\", projectName: string): EnvironmentsListCatalogItems;\n /** Resource for '/projects/\\{projectName\\}/catalogItems/\\{catalogItemId\\}' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/catalogItems/{catalogItemId}\",\n projectName: string,\n catalogItemId: string\n ): EnvironmentsGetCatalogItem;\n /** Resource for '/projects/\\{projectName\\}/catalogItems/\\{catalogItemId\\}/versions' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/catalogItems/{catalogItemId}/versions\",\n projectName: string,\n catalogItemId: string\n ): EnvironmentsListCatalogItemVersions;\n /** Resource for '/projects/\\{projectName\\}/catalogItems/\\{catalogItemId\\}/versions/\\{version\\}' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/catalogItems/{catalogItemId}/versions/{version}\",\n projectName: string,\n catalogItemId: string,\n version: string\n ): EnvironmentsGetCatalogItemVersion;\n /** Resource for '/projects/\\{projectName\\}/environmentTypes' has methods for the following verbs: get */\n (\n path: \"/projects/{projectName}/environmentTypes\",\n projectName: string\n ): EnvironmentsListEnvironmentTypes;\n}\n\nexport type AzureDevCenterClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import AzureDevCenter from "./azureDevCenter";
4
+ export * from "./azureDevCenter";
5
+ export * from "./parameters";
6
+ export * from "./responses";
7
+ export * from "./clientDefinitions";
8
+ export * from "./isUnexpected";
9
+ export * from "./models";
10
+ export * from "./outputModels";
11
+ export * from "./paginateHelper";
12
+ export * from "./pollingHelper";
13
+ export default AzureDevCenter;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,eAAe,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureDevCenter from \"./azureDevCenter\";\n\nexport * from \"./azureDevCenter\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\nexport * from \"./pollingHelper\";\n\nexport default AzureDevCenter;\n"]}