@azure-rest/load-testing 1.0.0-alpha.20221020.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,201 @@
1
+ # Azure Load Testing client library for JavaScript
2
+
3
+ Azure Load Testing provides client library in JavaScript to the user by which they can interact natively with Azure Load Testing service. Azure Load Testing is a fully managed load-testing service that enables you to generate high-scale load. The service simulates traffic for your applications, regardless of where they're hosted. Developers, testers, and quality assurance (QA) engineers can use it to optimize application performance, scalability, or capacity.
4
+
5
+ **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**
6
+
7
+ ## Documentation
8
+
9
+ Various documentation is available to help you get started
10
+
11
+ <!-- - [Source code][source_code] -->
12
+
13
+ - [API reference documentation][api_reference_doc]
14
+ - [Product Documentation][product_documentation]
15
+
16
+ ## Getting started
17
+
18
+ ### Currently supported environments
19
+
20
+ - Node.js version 14.x.x or higher
21
+
22
+ ### Prerequisites
23
+
24
+ - You must have an [Azure subscription](https://azure.microsoft.com/free/) and [Azure Load Test Service Resource](https://learn.microsoft.com/azure/load-testing/) to use this package.
25
+
26
+ ### Install the `@azure-rest/load-testing` package
27
+
28
+ Install the AzureLoadTesting client REST client library for JavaScript with `npm`:
29
+
30
+ ```bash
31
+ npm install @azure-rest/load-testing
32
+ ```
33
+
34
+ ### Create and authenticate a `AzureLoadTesting` client
35
+
36
+ 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),
37
+ provide an instance of the desired credential type obtained from the
38
+ [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
39
+
40
+ To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)
41
+
42
+ 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.
43
+ As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
44
+ can be used to authenticate the client.
45
+
46
+ Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
47
+ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
48
+
49
+ ## Key concepts
50
+
51
+ The following components make up the Azure Load Testing Service. The Azure Load Test client library for JavaScript allows you to interact with each of these components through the use of a dedicated client object.
52
+
53
+ #### Test
54
+
55
+ A test specifies the test script, and configuration settings for running a load test. You can create one or more tests in an Azure Load Testing resource.
56
+
57
+ #### App Component
58
+
59
+ When you run a load test for an Azure-hosted application, you can monitor resource metrics for the different Azure application components (server-side metrics). While the load test runs, and after completion of the test, you can monitor and analyze the resource metrics in the Azure Load Testing dashboard.
60
+
61
+ #### Metrics
62
+
63
+ During a load test, Azure Load Testing collects metrics about the test execution. There are two types of metrics:
64
+
65
+ 1. Client-side metrics give you details reported by the test engine. These metrics include the number of virtual users, the request response time, the number of failed requests, or the number of requests per second.
66
+
67
+ 2. Server-side metrics are available for Azure-hosted applications and provide information about your Azure application components. Metrics can be for the number of database reads, the type of HTTP responses, or container resource consumption.
68
+
69
+ ### Test Engine
70
+
71
+ A test engine is computing infrastructure that runs the Apache JMeter test script. You can scale out your load test by configuring the number of test engines. The test script runs in parallel across the specified number of test engines.
72
+
73
+ ### Test Run
74
+
75
+ A test run represents one execution of a load test. It collects the logs associated with running the Apache JMeter script, the load test YAML configuration, the list of app components to monitor, and the results of the test.
76
+
77
+ ### Data-Plane Endpoint
78
+
79
+ Data-plane of Azure Load Testing resources is addressable using the following URL format:
80
+
81
+ `00000000-0000-0000-0000-000000000000.aaa.cnt-prod.loadtesting.azure.com`
82
+
83
+ The first GUID `00000000-0000-0000-0000-000000000000` is the unique identifier used for accessing the Azure Load Testing resource. This is followed by `aaa` which is the Azure region of the resource.
84
+
85
+ The data-plane endpoint is obtained from Control Plane APIs.
86
+
87
+ **Example:** `1234abcd-12ab-12ab-12ab-123456abcdef.eus.cnt-prod.loadtesting.azure.com`
88
+
89
+ In the above example, `eus` represents the Azure region `East US`.
90
+
91
+ ## Examples
92
+
93
+ ### Creating a load test
94
+
95
+ ```javascript
96
+ import AzureLoadTesting, { AzureLoadTestingClient } from "@azure-rest/load-testing";
97
+ import { DefaultAzureCredential } from "@azure/identity";
98
+
99
+ var TEST_ID = "some-test-id";
100
+ var DISPLAY_NAME = "my-load-test";
101
+
102
+ const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
103
+
104
+ await Client.path("/loadtests/{testId}", TEST_ID).patch({
105
+ contentType: "application/merge-patch+json",
106
+ body: {
107
+ displayName: DISPLAY_NAME,
108
+ description: "",
109
+ loadTestConfig: {
110
+ engineInstances: 1,
111
+ splitAllCSVs: false,
112
+ },
113
+ secrets: {},
114
+ environmentVariables: {},
115
+ passFailCriteria: { passFailMetrics: {} },
116
+ },
117
+ });
118
+ ```
119
+
120
+ ### Uploading .jmx file to a Test
121
+
122
+ ```javascript
123
+ import { AzureLoadTestingClient } from "@azure-rest/load-testing";
124
+ import { DefaultAzureCredential } from "@azure/identity";
125
+ import { createReadStream } from "fs";
126
+
127
+ var TEST_ID = "some-test-id";
128
+ var FILE_ID = "some-file-id";
129
+ const readStream = createReadStream("./sample.jmx");
130
+
131
+ const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
132
+
133
+ await Client.path("/loadtests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({
134
+ contentType: "multipart/form-data",
135
+ body: {
136
+ file: readStream,
137
+ },
138
+ });
139
+ ```
140
+
141
+ ### Running a Test
142
+
143
+ ```javascript
144
+ import { AzureLoadTestingClient } from "@azure-rest/load-testing";
145
+ import { DefaultAzureCredential } from "@azure/identity";
146
+
147
+ var TEST_ID = "some-test-id";
148
+ var TEST_RUN_ID = "some-testrun-id";
149
+ var DISPLAY_NAME = "my-load-test-run";
150
+
151
+ const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential());
152
+
153
+ await Client.path("/testruns/{testRunId}", TEST_RUN_ID).patch({
154
+ contentType: "application/merge-patch+json",
155
+ body: {
156
+ testId: TEST_ID,
157
+ displayName: DISPLAY_NAME,
158
+ },
159
+ });
160
+
161
+ var result = await client.path("/testruns/{testRunId}", TEST_RUN_ID).get();
162
+ console.log(result);
163
+ ```
164
+
165
+ ## Troubleshooting
166
+
167
+ ### Logging
168
+
169
+ 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`:
170
+
171
+ ```javascript
172
+ import { setLogLevel } from "@azure/logger";
173
+
174
+ setLogLevel("info");
175
+ ```
176
+
177
+ 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).
178
+
179
+ ## Next steps
180
+
181
+ Azure Loading Testing JavaScript SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered.
182
+
183
+ <!-- See [Azure Load Testing samples][sample_code]. -->
184
+
185
+ ## Contributing
186
+
187
+ For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md).
188
+
189
+ 1. Fork it
190
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
191
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
192
+ 4. Push to the branch (`git push origin my-new-feature`)
193
+ 5. Create new Pull Request
194
+
195
+ <!-- LINKS -->
196
+ <!-- [source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/loadtesting/azure-developer-loadtesting/src -->
197
+ <!-- [sample_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta -->
198
+
199
+ [api_reference_doc]: https://docs.microsoft.com/rest/api/loadtesting/
200
+ [product_documentation]: https://azure.microsoft.com/services/load-testing/
201
+ [azure_subscription]: https://azure.microsoft.com/free/
package/dist/index.js ADDED
@@ -0,0 +1,187 @@
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
+
8
+ // Copyright (c) Microsoft Corporation.
9
+ function createClient(Endpoint, credentials, options = {}) {
10
+ var _a, _b;
11
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `https://${Endpoint}`;
12
+ options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2022-06-01-preview";
13
+ options = Object.assign(Object.assign({}, options), { credentials: {
14
+ scopes: ["https://cnt-prod.loadtesting.azure.com/.default"],
15
+ } });
16
+ const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.1`;
17
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
18
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
19
+ : `${userAgentInfo}`;
20
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
21
+ userAgentPrefix,
22
+ } });
23
+ const client = coreClient.getClient(baseUrl, credentials, options);
24
+ return client;
25
+ }
26
+
27
+ // Copyright (c) Microsoft Corporation.
28
+ // Licensed under the MIT license.
29
+ const responseMap = {
30
+ "PATCH /appcomponents/{name}": ["200", "201"],
31
+ "DELETE /appcomponents/{name}": ["204"],
32
+ "GET /appcomponents/{name}": ["200"],
33
+ "GET /appcomponents": ["200"],
34
+ "PATCH /serverMetricsConfig/{name}": ["200", "201"],
35
+ "GET /serverMetricsConfig/{name}": ["200"],
36
+ "DELETE /serverMetricsConfig/{name}": ["204"],
37
+ "GET /serverMetricsConfig": ["200"],
38
+ "GET /serverMetricsConfig/default": ["200"],
39
+ "GET /serverMetricsConfig/supportedResourceTypes": ["200"],
40
+ "PATCH /loadtests/{testId}": ["200", "201"],
41
+ "DELETE /loadtests/{testId}": ["204"],
42
+ "GET /loadtests/{testId}": ["200"],
43
+ "GET /loadtests/sortAndFilter": ["200"],
44
+ "PUT /loadtests/{testId}/files/{fileId}": ["201"],
45
+ "GET /loadtests/{testId}/files/{fileId}": ["200"],
46
+ "DELETE /loadtests/{testId}/files/{fileId}": ["204"],
47
+ "GET /loadtests/{testId}/files": ["200"],
48
+ "DELETE /testruns/{testRunId}": ["204"],
49
+ "PATCH /testruns/{testRunId}": ["200"],
50
+ "GET /testruns/{testRunId}": ["200"],
51
+ "GET /testruns/{testRunId}/files/{fileId}": ["200"],
52
+ "GET /testruns/sortAndFilter": ["200"],
53
+ "POST /testruns/{testRunId}:stop": ["200"],
54
+ "POST /testruns/{testRunId}/clientMetrics": ["200"],
55
+ "GET /testruns/{testRunId}/clientMetricsFilters": ["200"],
56
+ };
57
+ function isUnexpected(response) {
58
+ const lroOriginal = response.headers["x-ms-original-url"];
59
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
60
+ const method = response.request.method;
61
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
62
+ if (!pathDetails) {
63
+ pathDetails = geParametrizedPathSuccess(url.pathname);
64
+ }
65
+ return !pathDetails.includes(response.status);
66
+ }
67
+ function geParametrizedPathSuccess(path) {
68
+ const pathParts = path.split("/");
69
+ // Iterate the responseMap to find a match
70
+ for (const [key, value] of Object.entries(responseMap)) {
71
+ // Extracting the path from the map key which is in format
72
+ // GET /path/foo
73
+ const candidatePath = getPathFromMapKey(key);
74
+ // Get each part of the url path
75
+ const candidateParts = candidatePath.split("/");
76
+ // If the candidate and actual paths don't match in size
77
+ // we move on to the next candidate path
78
+ if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {
79
+ // track if we have found a match to return the values found.
80
+ let found = true;
81
+ for (let i = 0; i < candidateParts.length; i++) {
82
+ if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) {
83
+ // If the current part of the candidate is a "template" part
84
+ // it is a match with the actual path part on hand
85
+ // skip as the parameterized part can match anything
86
+ continue;
87
+ }
88
+ // If the candidate part is not a template and
89
+ // the parts don't match mark the candidate as not found
90
+ // to move on with the next candidate path.
91
+ if (candidateParts[i] !== pathParts[i]) {
92
+ found = false;
93
+ break;
94
+ }
95
+ }
96
+ // We finished evaluating the current candidate parts
97
+ // if all parts matched we return the success values form
98
+ // the path mapping.
99
+ if (found) {
100
+ return value;
101
+ }
102
+ }
103
+ }
104
+ // No match was found, return an empty array.
105
+ return [];
106
+ }
107
+ function hasParametrizedPath(path) {
108
+ return path.includes("/{");
109
+ }
110
+ function getPathFromMapKey(mapKey) {
111
+ const pathStart = mapKey.indexOf("/");
112
+ return mapKey.slice(pathStart);
113
+ }
114
+
115
+ // Copyright (c) Microsoft Corporation.
116
+ /**
117
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
118
+ * @param client - Client to use for sending the next page requests
119
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
120
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
121
+ * @returns - PagedAsyncIterableIterator to iterate the elements
122
+ */
123
+ function paginate(client, initialResponse, options = {}) {
124
+ let firstRun = true;
125
+ const itemName = "value";
126
+ const nextLinkName = "nextLink";
127
+ const { customGetPage } = options;
128
+ const pagedResult = {
129
+ firstPageLink: "",
130
+ getPage: typeof customGetPage === "function"
131
+ ? customGetPage
132
+ : async (pageLink) => {
133
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
134
+ firstRun = false;
135
+ checkPagingRequest(result);
136
+ const nextLink = getNextLink(result.body, nextLinkName);
137
+ const values = getElements(result.body, itemName);
138
+ return {
139
+ page: values,
140
+ nextPageLink: nextLink,
141
+ };
142
+ },
143
+ };
144
+ return corePaging.getPagedAsyncIterator(pagedResult);
145
+ }
146
+ /**
147
+ * Gets for the value of nextLink in the body
148
+ */
149
+ function getNextLink(body, nextLinkName) {
150
+ if (!nextLinkName) {
151
+ return undefined;
152
+ }
153
+ const nextLink = body[nextLinkName];
154
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
155
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
156
+ }
157
+ return nextLink;
158
+ }
159
+ /**
160
+ * Gets the elements of the current request in the body.
161
+ */
162
+ function getElements(body, itemName) {
163
+ const value = body[itemName];
164
+ // value has to be an array according to the x-ms-pageable extension.
165
+ // The fact that this must be an array is used above to calculate the
166
+ // type of elements in the page in PaginateReturn
167
+ if (!Array.isArray(value)) {
168
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
169
+ }
170
+ return value !== null && value !== void 0 ? value : [];
171
+ }
172
+ /**
173
+ * Checks if a request failed
174
+ */
175
+ function checkPagingRequest(response) {
176
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
177
+ if (!Http2xxStatusCodes.includes(response.status)) {
178
+ throw coreClient.createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
179
+ }
180
+ }
181
+
182
+ // Copyright (c) Microsoft Corporation.
183
+
184
+ exports["default"] = createClient;
185
+ exports.isUnexpected = isUnexpected;
186
+ exports.paginate = paginate;
187
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/azureLoadTesting.ts","../src/isUnexpected.ts","../src/paginateHelper.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 { AzureLoadTestingClient } from \"./clientDefinitions\";\n\nexport default function createClient(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): AzureLoadTestingClient {\n const baseUrl = options.baseUrl ?? `https://${Endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2022-06-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://cnt-prod.loadtesting.azure.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as AzureLoadTestingClient;\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AppComponentCreateOrUpdateAppComponents200Response,\n AppComponentCreateOrUpdateAppComponents201Response,\n AppComponentCreateOrUpdateAppComponentsdefaultResponse,\n AppComponentDeleteAppComponents204Response,\n AppComponentDeleteAppComponentsdefaultResponse,\n AppComponentGetAppComponentByName200Response,\n AppComponentGetAppComponentByNamedefaultResponse,\n AppComponentGetAppComponent200Response,\n AppComponentGetAppComponentdefaultResponse,\n ServerMetricsCreateOrUpdateServerMetricsConfig200Response,\n ServerMetricsCreateOrUpdateServerMetricsConfig201Response,\n ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerMetricsConfigByName200Response,\n ServerMetricsGetServerMetricsConfigByNamedefaultResponse,\n ServerMetricsDeleteServerMetricsConfig204Response,\n ServerMetricsDeleteServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerMetricsConfig200Response,\n ServerMetricsGetServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerDefaultMetricsConfig200Response,\n ServerMetricsGetServerDefaultMetricsConfigdefaultResponse,\n ServerMetricsListSupportedResourceTypes200Response,\n ServerMetricsListSupportedResourceTypesdefaultResponse,\n TestCreateOrUpdateTest200Response,\n TestCreateOrUpdateTest201Response,\n TestCreateOrUpdateTestdefaultResponse,\n TestDeleteLoadTest204Response,\n TestDeleteLoadTestdefaultResponse,\n TestGetLoadTest200Response,\n TestGetLoadTestdefaultResponse,\n TestListLoadTestSearch200Response,\n TestListLoadTestSearchdefaultResponse,\n TestUploadTestFile201Response,\n TestUploadTestFiledefaultResponse,\n TestGetTestFile200Response,\n TestGetTestFiledefaultResponse,\n TestDeleteTestFile204Response,\n TestDeleteTestFiledefaultResponse,\n TestListTestFiles200Response,\n TestListTestFilesdefaultResponse,\n TestRunDeleteTestRun204Response,\n TestRunDeleteTestRundefaultResponse,\n TestRunCreateOrUpdateTestRun200Response,\n TestRunCreateOrUpdateTestRundefaultResponse,\n TestRunGetTestRun200Response,\n TestRunGetTestRundefaultResponse,\n TestRunGetTestRunFile200Response,\n TestRunGetTestRunFiledefaultResponse,\n TestRunListTestRuns200Response,\n TestRunListTestRunsdefaultResponse,\n TestRunStopTestRun200Response,\n TestRunStopTestRundefaultResponse,\n TestRunGetTestRunClientMetrics200Response,\n TestRunGetTestRunClientMetricsdefaultResponse,\n TestRunGetTestRunClientMetricsFilters200Response,\n TestRunGetTestRunClientMetricsFiltersdefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"PATCH /appcomponents/{name}\": [\"200\", \"201\"],\n \"DELETE /appcomponents/{name}\": [\"204\"],\n \"GET /appcomponents/{name}\": [\"200\"],\n \"GET /appcomponents\": [\"200\"],\n \"PATCH /serverMetricsConfig/{name}\": [\"200\", \"201\"],\n \"GET /serverMetricsConfig/{name}\": [\"200\"],\n \"DELETE /serverMetricsConfig/{name}\": [\"204\"],\n \"GET /serverMetricsConfig\": [\"200\"],\n \"GET /serverMetricsConfig/default\": [\"200\"],\n \"GET /serverMetricsConfig/supportedResourceTypes\": [\"200\"],\n \"PATCH /loadtests/{testId}\": [\"200\", \"201\"],\n \"DELETE /loadtests/{testId}\": [\"204\"],\n \"GET /loadtests/{testId}\": [\"200\"],\n \"GET /loadtests/sortAndFilter\": [\"200\"],\n \"PUT /loadtests/{testId}/files/{fileId}\": [\"201\"],\n \"GET /loadtests/{testId}/files/{fileId}\": [\"200\"],\n \"DELETE /loadtests/{testId}/files/{fileId}\": [\"204\"],\n \"GET /loadtests/{testId}/files\": [\"200\"],\n \"DELETE /testruns/{testRunId}\": [\"204\"],\n \"PATCH /testruns/{testRunId}\": [\"200\"],\n \"GET /testruns/{testRunId}\": [\"200\"],\n \"GET /testruns/{testRunId}/files/{fileId}\": [\"200\"],\n \"GET /testruns/sortAndFilter\": [\"200\"],\n \"POST /testruns/{testRunId}:stop\": [\"200\"],\n \"POST /testruns/{testRunId}/clientMetrics\": [\"200\"],\n \"GET /testruns/{testRunId}/clientMetricsFilters\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | AppComponentCreateOrUpdateAppComponents200Response\n | AppComponentCreateOrUpdateAppComponents201Response\n | AppComponentCreateOrUpdateAppComponentsdefaultResponse\n): response is AppComponentCreateOrUpdateAppComponentsdefaultResponse;\nexport function isUnexpected(\n response:\n | AppComponentDeleteAppComponents204Response\n | AppComponentDeleteAppComponentsdefaultResponse\n): response is AppComponentDeleteAppComponentsdefaultResponse;\nexport function isUnexpected(\n response:\n | AppComponentGetAppComponentByName200Response\n | AppComponentGetAppComponentByNamedefaultResponse\n): response is AppComponentGetAppComponentByNamedefaultResponse;\nexport function isUnexpected(\n response: AppComponentGetAppComponent200Response | AppComponentGetAppComponentdefaultResponse\n): response is AppComponentGetAppComponentdefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsCreateOrUpdateServerMetricsConfig200Response\n | ServerMetricsCreateOrUpdateServerMetricsConfig201Response\n | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse\n): response is ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsGetServerMetricsConfigByName200Response\n | ServerMetricsGetServerMetricsConfigByNamedefaultResponse\n): response is ServerMetricsGetServerMetricsConfigByNamedefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsDeleteServerMetricsConfig204Response\n | ServerMetricsDeleteServerMetricsConfigdefaultResponse\n): response is ServerMetricsDeleteServerMetricsConfigdefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsGetServerMetricsConfig200Response\n | ServerMetricsGetServerMetricsConfigdefaultResponse\n): response is ServerMetricsGetServerMetricsConfigdefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsGetServerDefaultMetricsConfig200Response\n | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse\n): response is ServerMetricsGetServerDefaultMetricsConfigdefaultResponse;\nexport function isUnexpected(\n response:\n | ServerMetricsListSupportedResourceTypes200Response\n | ServerMetricsListSupportedResourceTypesdefaultResponse\n): response is ServerMetricsListSupportedResourceTypesdefaultResponse;\nexport function isUnexpected(\n response:\n | TestCreateOrUpdateTest200Response\n | TestCreateOrUpdateTest201Response\n | TestCreateOrUpdateTestdefaultResponse\n): response is TestCreateOrUpdateTestdefaultResponse;\nexport function isUnexpected(\n response: TestDeleteLoadTest204Response | TestDeleteLoadTestdefaultResponse\n): response is TestDeleteLoadTestdefaultResponse;\nexport function isUnexpected(\n response: TestGetLoadTest200Response | TestGetLoadTestdefaultResponse\n): response is TestGetLoadTestdefaultResponse;\nexport function isUnexpected(\n response: TestListLoadTestSearch200Response | TestListLoadTestSearchdefaultResponse\n): response is TestListLoadTestSearchdefaultResponse;\nexport function isUnexpected(\n response: TestUploadTestFile201Response | TestUploadTestFiledefaultResponse\n): response is TestUploadTestFiledefaultResponse;\nexport function isUnexpected(\n response: TestGetTestFile200Response | TestGetTestFiledefaultResponse\n): response is TestGetTestFiledefaultResponse;\nexport function isUnexpected(\n response: TestDeleteTestFile204Response | TestDeleteTestFiledefaultResponse\n): response is TestDeleteTestFiledefaultResponse;\nexport function isUnexpected(\n response: TestListTestFiles200Response | TestListTestFilesdefaultResponse\n): response is TestListTestFilesdefaultResponse;\nexport function isUnexpected(\n response: TestRunDeleteTestRun204Response | TestRunDeleteTestRundefaultResponse\n): response is TestRunDeleteTestRundefaultResponse;\nexport function isUnexpected(\n response: TestRunCreateOrUpdateTestRun200Response | TestRunCreateOrUpdateTestRundefaultResponse\n): response is TestRunCreateOrUpdateTestRundefaultResponse;\nexport function isUnexpected(\n response: TestRunGetTestRun200Response | TestRunGetTestRundefaultResponse\n): response is TestRunGetTestRundefaultResponse;\nexport function isUnexpected(\n response: TestRunGetTestRunFile200Response | TestRunGetTestRunFiledefaultResponse\n): response is TestRunGetTestRunFiledefaultResponse;\nexport function isUnexpected(\n response: TestRunListTestRuns200Response | TestRunListTestRunsdefaultResponse\n): response is TestRunListTestRunsdefaultResponse;\nexport function isUnexpected(\n response: TestRunStopTestRun200Response | TestRunStopTestRundefaultResponse\n): response is TestRunStopTestRundefaultResponse;\nexport function isUnexpected(\n response:\n | TestRunGetTestRunClientMetrics200Response\n | TestRunGetTestRunClientMetricsdefaultResponse\n): response is TestRunGetTestRunClientMetricsdefaultResponse;\nexport function isUnexpected(\n response:\n | TestRunGetTestRunClientMetricsFilters200Response\n | TestRunGetTestRunClientMetricsFiltersdefaultResponse\n): response is TestRunGetTestRunClientMetricsFiltersdefaultResponse;\nexport function isUnexpected(\n response:\n | AppComponentCreateOrUpdateAppComponents200Response\n | AppComponentCreateOrUpdateAppComponents201Response\n | AppComponentCreateOrUpdateAppComponentsdefaultResponse\n | AppComponentDeleteAppComponents204Response\n | AppComponentDeleteAppComponentsdefaultResponse\n | AppComponentGetAppComponentByName200Response\n | AppComponentGetAppComponentByNamedefaultResponse\n | AppComponentGetAppComponent200Response\n | AppComponentGetAppComponentdefaultResponse\n | ServerMetricsCreateOrUpdateServerMetricsConfig200Response\n | ServerMetricsCreateOrUpdateServerMetricsConfig201Response\n | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerMetricsConfigByName200Response\n | ServerMetricsGetServerMetricsConfigByNamedefaultResponse\n | ServerMetricsDeleteServerMetricsConfig204Response\n | ServerMetricsDeleteServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerMetricsConfig200Response\n | ServerMetricsGetServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerDefaultMetricsConfig200Response\n | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse\n | ServerMetricsListSupportedResourceTypes200Response\n | ServerMetricsListSupportedResourceTypesdefaultResponse\n | TestCreateOrUpdateTest200Response\n | TestCreateOrUpdateTest201Response\n | TestCreateOrUpdateTestdefaultResponse\n | TestDeleteLoadTest204Response\n | TestDeleteLoadTestdefaultResponse\n | TestGetLoadTest200Response\n | TestGetLoadTestdefaultResponse\n | TestListLoadTestSearch200Response\n | TestListLoadTestSearchdefaultResponse\n | TestUploadTestFile201Response\n | TestUploadTestFiledefaultResponse\n | TestGetTestFile200Response\n | TestGetTestFiledefaultResponse\n | TestDeleteTestFile204Response\n | TestDeleteTestFiledefaultResponse\n | TestListTestFiles200Response\n | TestListTestFilesdefaultResponse\n | TestRunDeleteTestRun204Response\n | TestRunDeleteTestRundefaultResponse\n | TestRunCreateOrUpdateTestRun200Response\n | TestRunCreateOrUpdateTestRundefaultResponse\n | TestRunGetTestRun200Response\n | TestRunGetTestRundefaultResponse\n | TestRunGetTestRunFile200Response\n | TestRunGetTestRunFiledefaultResponse\n | TestRunListTestRuns200Response\n | TestRunListTestRunsdefaultResponse\n | TestRunStopTestRun200Response\n | TestRunStopTestRundefaultResponse\n | TestRunGetTestRunClientMetrics200Response\n | TestRunGetTestRunClientMetricsdefaultResponse\n | TestRunGetTestRunClientMetricsFilters200Response\n | TestRunGetTestRunClientMetricsFiltersdefaultResponse\n): response is\n | AppComponentCreateOrUpdateAppComponentsdefaultResponse\n | AppComponentDeleteAppComponentsdefaultResponse\n | AppComponentGetAppComponentByNamedefaultResponse\n | AppComponentGetAppComponentdefaultResponse\n | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerMetricsConfigByNamedefaultResponse\n | ServerMetricsDeleteServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerMetricsConfigdefaultResponse\n | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse\n | ServerMetricsListSupportedResourceTypesdefaultResponse\n | TestCreateOrUpdateTestdefaultResponse\n | TestDeleteLoadTestdefaultResponse\n | TestGetLoadTestdefaultResponse\n | TestListLoadTestSearchdefaultResponse\n | TestUploadTestFiledefaultResponse\n | TestGetTestFiledefaultResponse\n | TestDeleteTestFiledefaultResponse\n | TestListTestFilesdefaultResponse\n | TestRunDeleteTestRundefaultResponse\n | TestRunCreateOrUpdateTestRundefaultResponse\n | TestRunGetTestRundefaultResponse\n | TestRunGetTestRunFiledefaultResponse\n | TestRunListTestRunsdefaultResponse\n | TestRunStopTestRundefaultResponse\n | TestRunGetTestRunClientMetricsdefaultResponse\n | TestRunGetTestRunClientMetricsFiltersdefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = geParametrizedPathSuccess(url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (candidateParts[i].startsWith(\"{\") && candidateParts[i].endsWith(\"}\")) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// 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 AzureLoadTesting from \"./azureLoadTesting\";\n\nexport * from \"./azureLoadTesting\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\n\nexport default AzureLoadTesting;\n"],"names":["getClient","getPagedAsyncIterator","createRestError"],"mappings":";;;;;;;AAAA;AAOc,SAAU,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,OAAA,GAAyB,EAAE,EAAA;;IAE3B,MAAM,OAAO,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAA,QAAA,EAAW,QAAQ,CAAA,CAAE,CAAC;IACzD,OAAO,CAAC,UAAU,GAAG,CAAA,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ure-rest/core-client";
4
+ export default function createClient(Endpoint, credentials, options = {}) {
5
+ var _a, _b;
6
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `https://${Endpoint}`;
7
+ options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2022-06-01-preview";
8
+ options = Object.assign(Object.assign({}, options), { credentials: {
9
+ scopes: ["https://cnt-prod.loadtesting.azure.com/.default"],
10
+ } });
11
+ const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.1`;
12
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
13
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
14
+ : `${userAgentInfo}`;
15
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
16
+ userAgentPrefix,
17
+ } });
18
+ const client = getClient(baseUrl, credentials, options);
19
+ return client;
20
+ }
21
+ //# sourceMappingURL=azureLoadTesting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"azureLoadTesting.js","sourceRoot":"","sources":["../../src/azureLoadTesting.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,WAAW,QAAQ,EAAE,CAAC;IACzD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,iDAAiD,CAAC;SAC5D,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,CAA2B,CAAC;IAElF,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 { AzureLoadTestingClient } from \"./clientDefinitions\";\n\nexport default function createClient(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): AzureLoadTestingClient {\n const baseUrl = options.baseUrl ?? `https://${Endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2022-06-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://cnt-prod.loadtesting.azure.com/.default\"],\n },\n };\n\n const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as AzureLoadTestingClient;\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 AppComponentCreateOrUpdateAppComponentsParameters,\n AppComponentDeleteAppComponentsParameters,\n AppComponentGetAppComponentByNameParameters,\n AppComponentGetAppComponentParameters,\n ServerMetricsCreateOrUpdateServerMetricsConfigParameters,\n ServerMetricsGetServerMetricsConfigByNameParameters,\n ServerMetricsDeleteServerMetricsConfigParameters,\n ServerMetricsGetServerMetricsConfigParameters,\n ServerMetricsGetServerDefaultMetricsConfigParameters,\n ServerMetricsListSupportedResourceTypesParameters,\n TestCreateOrUpdateTestParameters,\n TestDeleteLoadTestParameters,\n TestGetLoadTestParameters,\n TestListLoadTestSearchParameters,\n TestUploadTestFileParameters,\n TestGetTestFileParameters,\n TestDeleteTestFileParameters,\n TestListTestFilesParameters,\n TestRunDeleteTestRunParameters,\n TestRunCreateOrUpdateTestRunParameters,\n TestRunGetTestRunParameters,\n TestRunGetTestRunFileParameters,\n TestRunListTestRunsParameters,\n TestRunStopTestRunParameters,\n TestRunGetTestRunClientMetricsParameters,\n TestRunGetTestRunClientMetricsFiltersParameters,\n} from \"./parameters\";\nimport {\n AppComponentCreateOrUpdateAppComponents200Response,\n AppComponentCreateOrUpdateAppComponents201Response,\n AppComponentCreateOrUpdateAppComponentsdefaultResponse,\n AppComponentDeleteAppComponents204Response,\n AppComponentDeleteAppComponentsdefaultResponse,\n AppComponentGetAppComponentByName200Response,\n AppComponentGetAppComponentByNamedefaultResponse,\n AppComponentGetAppComponent200Response,\n AppComponentGetAppComponentdefaultResponse,\n ServerMetricsCreateOrUpdateServerMetricsConfig200Response,\n ServerMetricsCreateOrUpdateServerMetricsConfig201Response,\n ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerMetricsConfigByName200Response,\n ServerMetricsGetServerMetricsConfigByNamedefaultResponse,\n ServerMetricsDeleteServerMetricsConfig204Response,\n ServerMetricsDeleteServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerMetricsConfig200Response,\n ServerMetricsGetServerMetricsConfigdefaultResponse,\n ServerMetricsGetServerDefaultMetricsConfig200Response,\n ServerMetricsGetServerDefaultMetricsConfigdefaultResponse,\n ServerMetricsListSupportedResourceTypes200Response,\n ServerMetricsListSupportedResourceTypesdefaultResponse,\n TestCreateOrUpdateTest200Response,\n TestCreateOrUpdateTest201Response,\n TestCreateOrUpdateTestdefaultResponse,\n TestDeleteLoadTest204Response,\n TestDeleteLoadTestdefaultResponse,\n TestGetLoadTest200Response,\n TestGetLoadTestdefaultResponse,\n TestListLoadTestSearch200Response,\n TestListLoadTestSearchdefaultResponse,\n TestUploadTestFile201Response,\n TestUploadTestFiledefaultResponse,\n TestGetTestFile200Response,\n TestGetTestFiledefaultResponse,\n TestDeleteTestFile204Response,\n TestDeleteTestFiledefaultResponse,\n TestListTestFiles200Response,\n TestListTestFilesdefaultResponse,\n TestRunDeleteTestRun204Response,\n TestRunDeleteTestRundefaultResponse,\n TestRunCreateOrUpdateTestRun200Response,\n TestRunCreateOrUpdateTestRundefaultResponse,\n TestRunGetTestRun200Response,\n TestRunGetTestRundefaultResponse,\n TestRunGetTestRunFile200Response,\n TestRunGetTestRunFiledefaultResponse,\n TestRunListTestRuns200Response,\n TestRunListTestRunsdefaultResponse,\n TestRunStopTestRun200Response,\n TestRunStopTestRundefaultResponse,\n TestRunGetTestRunClientMetrics200Response,\n TestRunGetTestRunClientMetricsdefaultResponse,\n TestRunGetTestRunClientMetricsFilters200Response,\n TestRunGetTestRunClientMetricsFiltersdefaultResponse,\n} from \"./responses\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface AppComponentCreateOrUpdateAppComponents {\n /** Associate an App Component (Azure resource) to a test or test run. */\n patch(\n options: AppComponentCreateOrUpdateAppComponentsParameters\n ): StreamableMethod<\n | AppComponentCreateOrUpdateAppComponents200Response\n | AppComponentCreateOrUpdateAppComponents201Response\n | AppComponentCreateOrUpdateAppComponentsdefaultResponse\n >;\n /** Delete an App Component. */\n delete(\n options?: AppComponentDeleteAppComponentsParameters\n ): StreamableMethod<\n AppComponentDeleteAppComponents204Response | AppComponentDeleteAppComponentsdefaultResponse\n >;\n /** Get App Component details by App Component name. */\n get(\n options?: AppComponentGetAppComponentByNameParameters\n ): StreamableMethod<\n AppComponentGetAppComponentByName200Response | AppComponentGetAppComponentByNamedefaultResponse\n >;\n}\n\nexport interface AppComponentGetAppComponent {\n /** Get App Components for a test or a test run by its name. */\n get(\n options?: AppComponentGetAppComponentParameters\n ): StreamableMethod<\n AppComponentGetAppComponent200Response | AppComponentGetAppComponentdefaultResponse\n >;\n}\n\nexport interface ServerMetricsCreateOrUpdateServerMetricsConfig {\n /** Configure server metrics for a test or test run */\n patch(\n options: ServerMetricsCreateOrUpdateServerMetricsConfigParameters\n ): StreamableMethod<\n | ServerMetricsCreateOrUpdateServerMetricsConfig200Response\n | ServerMetricsCreateOrUpdateServerMetricsConfig201Response\n | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse\n >;\n /** Get server metrics configuration by its name. */\n get(\n options?: ServerMetricsGetServerMetricsConfigByNameParameters\n ): StreamableMethod<\n | ServerMetricsGetServerMetricsConfigByName200Response\n | ServerMetricsGetServerMetricsConfigByNamedefaultResponse\n >;\n /** Delete server metrics configuration by its name */\n delete(\n options?: ServerMetricsDeleteServerMetricsConfigParameters\n ): StreamableMethod<\n | ServerMetricsDeleteServerMetricsConfig204Response\n | ServerMetricsDeleteServerMetricsConfigdefaultResponse\n >;\n}\n\nexport interface ServerMetricsGetServerMetricsConfig {\n /** Get server metrics configuration for a test or test run by its name. */\n get(\n options?: ServerMetricsGetServerMetricsConfigParameters\n ): StreamableMethod<\n | ServerMetricsGetServerMetricsConfig200Response\n | ServerMetricsGetServerMetricsConfigdefaultResponse\n >;\n}\n\nexport interface ServerMetricsGetServerDefaultMetricsConfig {\n /** Get all default server metrics configuration for supported resource types. */\n get(\n options?: ServerMetricsGetServerDefaultMetricsConfigParameters\n ): StreamableMethod<\n | ServerMetricsGetServerDefaultMetricsConfig200Response\n | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse\n >;\n}\n\nexport interface ServerMetricsListSupportedResourceTypes {\n /** Get all supported resource types for App Components(Azure resource types). */\n get(\n options?: ServerMetricsListSupportedResourceTypesParameters\n ): StreamableMethod<\n | ServerMetricsListSupportedResourceTypes200Response\n | ServerMetricsListSupportedResourceTypesdefaultResponse\n >;\n}\n\nexport interface TestCreateOrUpdateTest {\n /** Create a new test or Update an existing test. */\n patch(\n options: TestCreateOrUpdateTestParameters\n ): StreamableMethod<\n | TestCreateOrUpdateTest200Response\n | TestCreateOrUpdateTest201Response\n | TestCreateOrUpdateTestdefaultResponse\n >;\n /** Delete a test by its name. */\n delete(\n options?: TestDeleteLoadTestParameters\n ): StreamableMethod<TestDeleteLoadTest204Response | TestDeleteLoadTestdefaultResponse>;\n /** Get load test details by test name */\n get(\n options?: TestGetLoadTestParameters\n ): StreamableMethod<TestGetLoadTest200Response | TestGetLoadTestdefaultResponse>;\n}\n\nexport interface TestListLoadTestSearch {\n /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */\n get(\n options?: TestListLoadTestSearchParameters\n ): StreamableMethod<TestListLoadTestSearch200Response | TestListLoadTestSearchdefaultResponse>;\n}\n\nexport interface TestUploadTestFile {\n /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */\n put(\n options: TestUploadTestFileParameters\n ): StreamableMethod<TestUploadTestFile201Response | TestUploadTestFiledefaultResponse>;\n /** Get test file by the file name. */\n get(\n options?: TestGetTestFileParameters\n ): StreamableMethod<TestGetTestFile200Response | TestGetTestFiledefaultResponse>;\n /** Delete file by the file name for a test. */\n delete(\n options?: TestDeleteTestFileParameters\n ): StreamableMethod<TestDeleteTestFile204Response | TestDeleteTestFiledefaultResponse>;\n}\n\nexport interface TestListTestFiles {\n /** Get all test files. */\n get(\n options?: TestListTestFilesParameters\n ): StreamableMethod<TestListTestFiles200Response | TestListTestFilesdefaultResponse>;\n}\n\nexport interface TestRunDeleteTestRun {\n /** Delete a test run by its name. */\n delete(\n options?: TestRunDeleteTestRunParameters\n ): StreamableMethod<TestRunDeleteTestRun204Response | TestRunDeleteTestRundefaultResponse>;\n /** Create and start a new test run with the given name. */\n patch(\n options: TestRunCreateOrUpdateTestRunParameters\n ): StreamableMethod<\n TestRunCreateOrUpdateTestRun200Response | TestRunCreateOrUpdateTestRundefaultResponse\n >;\n /** Get test run details by name. */\n get(\n options?: TestRunGetTestRunParameters\n ): StreamableMethod<TestRunGetTestRun200Response | TestRunGetTestRundefaultResponse>;\n}\n\nexport interface TestRunGetTestRunFile {\n /** Get test run file by file name. */\n get(\n options?: TestRunGetTestRunFileParameters\n ): StreamableMethod<TestRunGetTestRunFile200Response | TestRunGetTestRunFiledefaultResponse>;\n}\n\nexport interface TestRunListTestRuns {\n /** Get all test runs with given filters */\n get(\n options?: TestRunListTestRunsParameters\n ): StreamableMethod<TestRunListTestRuns200Response | TestRunListTestRunsdefaultResponse>;\n}\n\nexport interface TestRunStopTestRun {\n /** Stop test run by name. */\n post(\n options?: TestRunStopTestRunParameters\n ): StreamableMethod<TestRunStopTestRun200Response | TestRunStopTestRundefaultResponse>;\n}\n\nexport interface TestRunGetTestRunClientMetrics {\n /** Get all client metrics for a load test run. */\n post(\n options: TestRunGetTestRunClientMetricsParameters\n ): StreamableMethod<\n TestRunGetTestRunClientMetrics200Response | TestRunGetTestRunClientMetricsdefaultResponse\n >;\n}\n\nexport interface TestRunGetTestRunClientMetricsFilters {\n /** Get all filters that are supported for client metrics for a given load test run */\n get(\n options?: TestRunGetTestRunClientMetricsFiltersParameters\n ): StreamableMethod<\n | TestRunGetTestRunClientMetricsFilters200Response\n | TestRunGetTestRunClientMetricsFiltersdefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/appcomponents/\\{name\\}' has methods for the following verbs: patch, delete, get */\n (path: \"/appcomponents/{name}\", name: string): AppComponentCreateOrUpdateAppComponents;\n /** Resource for '/appcomponents' has methods for the following verbs: get */\n (path: \"/appcomponents\"): AppComponentGetAppComponent;\n /** Resource for '/serverMetricsConfig/\\{name\\}' has methods for the following verbs: patch, get, delete */\n (\n path: \"/serverMetricsConfig/{name}\",\n name: string\n ): ServerMetricsCreateOrUpdateServerMetricsConfig;\n /** Resource for '/serverMetricsConfig' has methods for the following verbs: get */\n (path: \"/serverMetricsConfig\"): ServerMetricsGetServerMetricsConfig;\n /** Resource for '/serverMetricsConfig/default' has methods for the following verbs: get */\n (path: \"/serverMetricsConfig/default\"): ServerMetricsGetServerDefaultMetricsConfig;\n /** Resource for '/serverMetricsConfig/supportedResourceTypes' has methods for the following verbs: get */\n (path: \"/serverMetricsConfig/supportedResourceTypes\"): ServerMetricsListSupportedResourceTypes;\n /** Resource for '/loadtests/\\{testId\\}' has methods for the following verbs: patch, delete, get */\n (path: \"/loadtests/{testId}\", testId: string): TestCreateOrUpdateTest;\n /** Resource for '/loadtests/sortAndFilter' has methods for the following verbs: get */\n (path: \"/loadtests/sortAndFilter\"): TestListLoadTestSearch;\n /** Resource for '/loadtests/\\{testId\\}/files/\\{fileId\\}' has methods for the following verbs: put, get, delete */\n (path: \"/loadtests/{testId}/files/{fileId}\", testId: string, fileId: string): TestUploadTestFile;\n /** Resource for '/loadtests/\\{testId\\}/files' has methods for the following verbs: get */\n (path: \"/loadtests/{testId}/files\", testId: string): TestListTestFiles;\n /** Resource for '/testruns/\\{testRunId\\}' has methods for the following verbs: delete, patch, get */\n (path: \"/testruns/{testRunId}\", testRunId: string): TestRunDeleteTestRun;\n /** Resource for '/testruns/\\{testRunId\\}/files/\\{fileId\\}' has methods for the following verbs: get */\n (\n path: \"/testruns/{testRunId}/files/{fileId}\",\n testRunId: string,\n fileId: string\n ): TestRunGetTestRunFile;\n /** Resource for '/testruns/sortAndFilter' has methods for the following verbs: get */\n (path: \"/testruns/sortAndFilter\"): TestRunListTestRuns;\n /** Resource for '/testruns/\\{testRunId\\}:stop' has methods for the following verbs: post */\n (path: \"/testruns/{testRunId}:stop\", testRunId: string): TestRunStopTestRun;\n /** Resource for '/testruns/\\{testRunId\\}/clientMetrics' has methods for the following verbs: post */\n (path: \"/testruns/{testRunId}/clientMetrics\", testRunId: string): TestRunGetTestRunClientMetrics;\n /** Resource for '/testruns/\\{testRunId\\}/clientMetricsFilters' has methods for the following verbs: get */\n (\n path: \"/testruns/{testRunId}/clientMetricsFilters\",\n testRunId: string\n ): TestRunGetTestRunClientMetricsFilters;\n}\n\nexport type AzureLoadTestingClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import AzureLoadTesting from "./azureLoadTesting";
4
+ export * from "./azureLoadTesting";
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 default AzureLoadTesting;
13
+ //# 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,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,cAAc,oBAAoB,CAAC;AACnC,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;AAEjC,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureLoadTesting from \"./azureLoadTesting\";\n\nexport * from \"./azureLoadTesting\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\n\nexport default AzureLoadTesting;\n"]}