@azure-rest/load-testing 1.1.0-beta.1 → 1.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE +1 -1
- package/README.md +12 -13
- package/dist/browser/azureLoadTesting.js +14 -12
- package/dist/browser/azureLoadTesting.js.map +1 -1
- package/dist/browser/clientDefinitions.d.ts +66 -34
- package/dist/browser/clientDefinitions.js.map +1 -1
- package/dist/browser/getFileValidationPoller.js +16 -11
- package/dist/browser/getFileValidationPoller.js.map +1 -1
- package/dist/browser/getTestProfileRunCompletionPoller.js +16 -11
- package/dist/browser/getTestProfileRunCompletionPoller.js.map +1 -1
- package/dist/browser/getTestRunCompletionPoller.js +16 -11
- package/dist/browser/getTestRunCompletionPoller.js.map +1 -1
- package/dist/browser/index.d.ts +6 -6
- package/dist/browser/index.js +1 -7
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/isUnexpected.d.ts +15 -9
- package/dist/browser/isUnexpected.js +21 -13
- package/dist/browser/isUnexpected.js.map +1 -1
- package/dist/browser/models.d.ts +205 -172
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/outputModels.d.ts +290 -208
- package/dist/browser/outputModels.js.map +1 -1
- package/dist/browser/paginateHelper.js +43 -73
- package/dist/browser/paginateHelper.js.map +1 -1
- package/dist/browser/parameters.d.ts +107 -66
- package/dist/browser/parameters.js.map +1 -1
- package/dist/browser/pollingHelper.d.ts +82 -4
- package/dist/browser/pollingHelper.js +119 -15
- package/dist/browser/pollingHelper.js.map +1 -1
- package/dist/browser/responses.d.ts +234 -121
- package/dist/browser/responses.js.map +1 -1
- package/dist/commonjs/azureLoadTesting.js +53 -45
- package/dist/commonjs/azureLoadTesting.js.map +7 -1
- package/dist/commonjs/clientDefinitions.d.ts +66 -34
- package/dist/commonjs/clientDefinitions.js +15 -5
- package/dist/commonjs/clientDefinitions.js.map +7 -1
- package/dist/commonjs/getFileValidationPoller.js +151 -137
- package/dist/commonjs/getFileValidationPoller.js.map +7 -1
- package/dist/commonjs/getTestProfileRunCompletionPoller.js +139 -127
- package/dist/commonjs/getTestProfileRunCompletionPoller.js.map +7 -1
- package/dist/commonjs/getTestRunCompletionPoller.js +139 -125
- package/dist/commonjs/getTestRunCompletionPoller.js.map +7 -1
- package/dist/commonjs/index.d.ts +6 -6
- package/dist/commonjs/index.js +46 -20
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/isUnexpected.d.ts +15 -9
- package/dist/commonjs/isUnexpected.js +118 -105
- package/dist/commonjs/isUnexpected.js.map +7 -1
- package/dist/commonjs/logger.js +28 -8
- package/dist/commonjs/logger.js.map +7 -1
- package/dist/commonjs/models.d.ts +205 -172
- package/dist/commonjs/models.js +15 -5
- package/dist/commonjs/models.js.map +7 -1
- package/dist/commonjs/outputModels.d.ts +290 -208
- package/dist/commonjs/outputModels.js +15 -5
- package/dist/commonjs/outputModels.js.map +7 -1
- package/dist/commonjs/paginateHelper.js +118 -158
- package/dist/commonjs/paginateHelper.js.map +7 -1
- package/dist/commonjs/parameters.d.ts +107 -66
- package/dist/commonjs/parameters.js +15 -5
- package/dist/commonjs/parameters.js.map +7 -1
- package/dist/commonjs/pollingHelper.d.ts +82 -4
- package/dist/commonjs/pollingHelper.js +143 -24
- package/dist/commonjs/pollingHelper.js.map +7 -1
- package/dist/commonjs/responses.d.ts +234 -121
- package/dist/commonjs/responses.js +15 -5
- package/dist/commonjs/responses.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/util/LROUtil.js +76 -54
- package/dist/commonjs/util/LROUtil.js.map +7 -1
- package/dist/esm/azureLoadTesting.js +32 -40
- package/dist/esm/azureLoadTesting.js.map +7 -1
- package/dist/esm/clientDefinitions.d.ts +66 -34
- package/dist/esm/clientDefinitions.js +0 -4
- package/dist/esm/clientDefinitions.js.map +7 -1
- package/dist/esm/getFileValidationPoller.js +126 -132
- package/dist/esm/getFileValidationPoller.js.map +7 -1
- package/dist/esm/getTestProfileRunCompletionPoller.js +114 -122
- package/dist/esm/getTestProfileRunCompletionPoller.js.map +7 -1
- package/dist/esm/getTestRunCompletionPoller.js +114 -120
- package/dist/esm/getTestRunCompletionPoller.js.map +7 -1
- package/dist/esm/index.d.ts +6 -6
- package/dist/esm/index.js +5 -11
- package/dist/esm/index.js.map +7 -1
- package/dist/esm/isUnexpected.d.ts +15 -9
- package/dist/esm/isUnexpected.js +96 -103
- package/dist/esm/isUnexpected.js.map +7 -1
- package/dist/esm/logger.js +4 -4
- package/dist/esm/logger.js.map +7 -1
- package/dist/esm/models.d.ts +205 -172
- package/dist/esm/models.js +0 -4
- package/dist/esm/models.js.map +7 -1
- package/dist/esm/outputModels.d.ts +290 -208
- package/dist/esm/outputModels.js +0 -4
- package/dist/esm/outputModels.js.map +7 -1
- package/dist/esm/paginateHelper.js +95 -155
- package/dist/esm/paginateHelper.js.map +7 -1
- package/dist/esm/parameters.d.ts +107 -66
- package/dist/esm/parameters.js +0 -4
- package/dist/esm/parameters.js.map +7 -1
- package/dist/esm/pollingHelper.d.ts +82 -4
- package/dist/esm/pollingHelper.js +117 -18
- package/dist/esm/pollingHelper.js.map +7 -1
- package/dist/esm/responses.d.ts +234 -121
- package/dist/esm/responses.js +0 -4
- package/dist/esm/responses.js.map +7 -1
- package/dist/esm/util/LROUtil.js +52 -50
- package/dist/esm/util/LROUtil.js.map +7 -1
- package/dist/react-native/azureLoadTesting.js +14 -12
- package/dist/react-native/azureLoadTesting.js.map +1 -1
- package/dist/react-native/clientDefinitions.d.ts +66 -34
- package/dist/react-native/clientDefinitions.js.map +1 -1
- package/dist/react-native/getFileValidationPoller.js +16 -11
- package/dist/react-native/getFileValidationPoller.js.map +1 -1
- package/dist/react-native/getTestProfileRunCompletionPoller.js +16 -11
- package/dist/react-native/getTestProfileRunCompletionPoller.js.map +1 -1
- package/dist/react-native/getTestRunCompletionPoller.js +16 -11
- package/dist/react-native/getTestRunCompletionPoller.js.map +1 -1
- package/dist/react-native/index.d.ts +6 -6
- package/dist/react-native/index.js +1 -7
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/isUnexpected.d.ts +15 -9
- package/dist/react-native/isUnexpected.js +21 -13
- package/dist/react-native/isUnexpected.js.map +1 -1
- package/dist/react-native/models.d.ts +205 -172
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/outputModels.d.ts +290 -208
- package/dist/react-native/outputModels.js.map +1 -1
- package/dist/react-native/paginateHelper.js +43 -73
- package/dist/react-native/paginateHelper.js.map +1 -1
- package/dist/react-native/parameters.d.ts +107 -66
- package/dist/react-native/parameters.js.map +1 -1
- package/dist/react-native/pollingHelper.d.ts +82 -4
- package/dist/react-native/pollingHelper.js +119 -15
- package/dist/react-native/pollingHelper.js.map +1 -1
- package/dist/react-native/responses.d.ts +234 -121
- package/dist/react-native/responses.js.map +1 -1
- package/package.json +69 -86
- package/review/{load-testing.api.md → load-testing-node.api.md} +420 -23
- package/dist/browser/azureLoadTesting.d.ts.map +0 -1
- package/dist/browser/clientDefinitions.d.ts.map +0 -1
- package/dist/browser/getFileValidationPoller.d.ts.map +0 -1
- package/dist/browser/getTestProfileRunCompletionPoller.d.ts.map +0 -1
- package/dist/browser/getTestRunCompletionPoller.d.ts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/isUnexpected.d.ts.map +0 -1
- package/dist/browser/logger.d.ts.map +0 -1
- package/dist/browser/models.d.ts.map +0 -1
- package/dist/browser/outputModels.d.ts.map +0 -1
- package/dist/browser/paginateHelper.d.ts.map +0 -1
- package/dist/browser/parameters.d.ts.map +0 -1
- package/dist/browser/pollingHelper.d.ts.map +0 -1
- package/dist/browser/responses.d.ts.map +0 -1
- package/dist/browser/util/LROUtil.d.ts.map +0 -1
- package/dist/commonjs/azureLoadTesting.d.ts.map +0 -1
- package/dist/commonjs/clientDefinitions.d.ts.map +0 -1
- package/dist/commonjs/getFileValidationPoller.d.ts.map +0 -1
- package/dist/commonjs/getTestProfileRunCompletionPoller.d.ts.map +0 -1
- package/dist/commonjs/getTestRunCompletionPoller.d.ts.map +0 -1
- package/dist/commonjs/index.d.ts.map +0 -1
- package/dist/commonjs/isUnexpected.d.ts.map +0 -1
- package/dist/commonjs/logger.d.ts.map +0 -1
- package/dist/commonjs/models.d.ts.map +0 -1
- package/dist/commonjs/outputModels.d.ts.map +0 -1
- package/dist/commonjs/paginateHelper.d.ts.map +0 -1
- package/dist/commonjs/parameters.d.ts.map +0 -1
- package/dist/commonjs/pollingHelper.d.ts.map +0 -1
- package/dist/commonjs/responses.d.ts.map +0 -1
- package/dist/commonjs/util/LROUtil.d.ts.map +0 -1
- package/dist/esm/azureLoadTesting.d.ts.map +0 -1
- package/dist/esm/clientDefinitions.d.ts.map +0 -1
- package/dist/esm/getFileValidationPoller.d.ts.map +0 -1
- package/dist/esm/getTestProfileRunCompletionPoller.d.ts.map +0 -1
- package/dist/esm/getTestRunCompletionPoller.d.ts.map +0 -1
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/isUnexpected.d.ts.map +0 -1
- package/dist/esm/logger.d.ts.map +0 -1
- package/dist/esm/models.d.ts.map +0 -1
- package/dist/esm/outputModels.d.ts.map +0 -1
- package/dist/esm/paginateHelper.d.ts.map +0 -1
- package/dist/esm/parameters.d.ts.map +0 -1
- package/dist/esm/pollingHelper.d.ts.map +0 -1
- package/dist/esm/responses.d.ts.map +0 -1
- package/dist/esm/util/LROUtil.d.ts.map +0 -1
- package/dist/react-native/azureLoadTesting.d.ts.map +0 -1
- package/dist/react-native/clientDefinitions.d.ts.map +0 -1
- package/dist/react-native/getFileValidationPoller.d.ts.map +0 -1
- package/dist/react-native/getTestProfileRunCompletionPoller.d.ts.map +0 -1
- package/dist/react-native/getTestRunCompletionPoller.d.ts.map +0 -1
- package/dist/react-native/index.d.ts.map +0 -1
- package/dist/react-native/isUnexpected.d.ts.map +0 -1
- package/dist/react-native/logger.d.ts.map +0 -1
- package/dist/react-native/models.d.ts.map +0 -1
- package/dist/react-native/outputModels.d.ts.map +0 -1
- package/dist/react-native/paginateHelper.d.ts.map +0 -1
- package/dist/react-native/parameters.d.ts.map +0 -1
- package/dist/react-native/pollingHelper.d.ts.map +0 -1
- package/dist/react-native/responses.d.ts.map +0 -1
- package/dist/react-native/util/LROUtil.d.ts.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RequestParameters } from "@azure-rest/core-client";
|
|
2
|
-
import type { Test, FileType, TestAppComponents, TestServerMetricsConfiguration, TestProfile, TestRun, TimeGrain, MetricRequestPayload, TestRunAppComponents, TestRunServerMetricsConfiguration, TestProfileRun
|
|
2
|
+
import type { Test, CloneTestRequest, FileType, TestAppComponents, TestServerMetricsConfiguration, TestProfile, Trigger, TriggerState, NotificationRule, TestRun, TestRunInsights, TimeGrain, MetricRequestPayload, TestRunAppComponents, TestRunServerMetricsConfiguration, TestProfileRun } from "./models.js";
|
|
3
|
+
export type OperationsGetStatusParameters = RequestParameters;
|
|
3
4
|
/** The resource instance. */
|
|
4
5
|
export type TestResourceMergeAndPatch = Partial<Test>;
|
|
5
6
|
export interface LoadTestAdministrationCreateOrUpdateTestBodyParam {
|
|
@@ -36,6 +37,11 @@ export interface LoadTestAdministrationListTestsQueryParam {
|
|
|
36
37
|
queryParameters?: LoadTestAdministrationListTestsQueryParamProperties;
|
|
37
38
|
}
|
|
38
39
|
export type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam & RequestParameters;
|
|
40
|
+
export interface LoadTestAdministrationCloneTestBodyParam {
|
|
41
|
+
body: CloneTestRequest;
|
|
42
|
+
}
|
|
43
|
+
export type LoadTestAdministrationCloneTestParameters = LoadTestAdministrationCloneTestBodyParam & RequestParameters;
|
|
44
|
+
export type LoadTestAdministrationGenerateTestPlanRecommendationsParameters = RequestParameters;
|
|
39
45
|
export interface LoadTestAdministrationUploadTestFileBodyParam {
|
|
40
46
|
/**
|
|
41
47
|
* The file content as application/octet-stream.
|
|
@@ -48,7 +54,7 @@ export interface LoadTestAdministrationUploadTestFileQueryParamProperties {
|
|
|
48
54
|
/**
|
|
49
55
|
* File type
|
|
50
56
|
*
|
|
51
|
-
* Possible values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT"
|
|
57
|
+
* Possible values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT", "BROWSER_RECORDING", "TEST_PLAN_RECOMMENDATIONS"
|
|
52
58
|
*/
|
|
53
59
|
fileType?: FileType;
|
|
54
60
|
}
|
|
@@ -134,6 +140,68 @@ export interface TestProfileAdministrationListTestProfilesQueryParam {
|
|
|
134
140
|
queryParameters?: TestProfileAdministrationListTestProfilesQueryParamProperties;
|
|
135
141
|
}
|
|
136
142
|
export type TestProfileAdministrationListTestProfilesParameters = TestProfileAdministrationListTestProfilesQueryParam & RequestParameters;
|
|
143
|
+
export type TriggerAdministrationGetTriggerParameters = RequestParameters;
|
|
144
|
+
/** The resource instance. */
|
|
145
|
+
export type TriggerResourceMergeAndPatch = Partial<Trigger>;
|
|
146
|
+
export interface TriggerAdministrationCreateOrUpdateTriggerBodyParam {
|
|
147
|
+
/** The resource instance. */
|
|
148
|
+
body: TriggerResourceMergeAndPatch;
|
|
149
|
+
}
|
|
150
|
+
export interface TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam {
|
|
151
|
+
/** This request has a JSON Merge Patch body. */
|
|
152
|
+
contentType: "application/merge-patch+json";
|
|
153
|
+
}
|
|
154
|
+
export type TriggerAdministrationCreateOrUpdateTriggerParameters = TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam & TriggerAdministrationCreateOrUpdateTriggerBodyParam & RequestParameters;
|
|
155
|
+
export type TriggerAdministrationDeleteTriggerParameters = RequestParameters;
|
|
156
|
+
export interface TriggerAdministrationListTriggerQueryParamProperties {
|
|
157
|
+
/** Search based on triggers associated with the provided test ids. */
|
|
158
|
+
testIds?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Filter triggers based on a comma separated list of states.
|
|
161
|
+
*
|
|
162
|
+
* Possible values: "Active", "Paused", "Completed", "Disabled"
|
|
163
|
+
*/
|
|
164
|
+
states?: TriggerState;
|
|
165
|
+
/** Start DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */
|
|
166
|
+
lastModifiedStartTime?: Date | string;
|
|
167
|
+
/** End DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */
|
|
168
|
+
lastModifiedEndTime?: Date | string;
|
|
169
|
+
/** Number of results in response. Default page size is 50. */
|
|
170
|
+
maxpagesize?: number;
|
|
171
|
+
}
|
|
172
|
+
export interface TriggerAdministrationListTriggerQueryParam {
|
|
173
|
+
queryParameters?: TriggerAdministrationListTriggerQueryParamProperties;
|
|
174
|
+
}
|
|
175
|
+
export type TriggerAdministrationListTriggerParameters = TriggerAdministrationListTriggerQueryParam & RequestParameters;
|
|
176
|
+
export type NotificationRuleAdministrationGetNotificationRuleParameters = RequestParameters;
|
|
177
|
+
/** The resource instance. */
|
|
178
|
+
export type NotificationRuleResourceMergeAndPatch = Partial<NotificationRule>;
|
|
179
|
+
export interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam {
|
|
180
|
+
/** The resource instance. */
|
|
181
|
+
body: NotificationRuleResourceMergeAndPatch;
|
|
182
|
+
}
|
|
183
|
+
export interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam {
|
|
184
|
+
/** This request has a JSON Merge Patch body. */
|
|
185
|
+
contentType: "application/merge-patch+json";
|
|
186
|
+
}
|
|
187
|
+
export type NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters = NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam & NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam & RequestParameters;
|
|
188
|
+
export type NotificationRuleAdministrationDeleteNotificationRuleParameters = RequestParameters;
|
|
189
|
+
export interface NotificationRuleAdministrationListNotificationRuleQueryParamProperties {
|
|
190
|
+
/** Search based on notification rules associated with the provided test ids. */
|
|
191
|
+
testIds?: string;
|
|
192
|
+
/** Search based on notification rules for the provided scopes. */
|
|
193
|
+
scopes?: string;
|
|
194
|
+
/** Start DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */
|
|
195
|
+
lastModifiedStartTime?: Date | string;
|
|
196
|
+
/** End DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */
|
|
197
|
+
lastModifiedEndTime?: Date | string;
|
|
198
|
+
/** Number of results in response. Default page size is 50. */
|
|
199
|
+
maxpagesize?: number;
|
|
200
|
+
}
|
|
201
|
+
export interface NotificationRuleAdministrationListNotificationRuleQueryParam {
|
|
202
|
+
queryParameters?: NotificationRuleAdministrationListNotificationRuleQueryParamProperties;
|
|
203
|
+
}
|
|
204
|
+
export type NotificationRuleAdministrationListNotificationRuleParameters = NotificationRuleAdministrationListNotificationRuleQueryParam & RequestParameters;
|
|
137
205
|
export type LoadTestRunGetTestRunParameters = RequestParameters;
|
|
138
206
|
/** The resource instance. */
|
|
139
207
|
export type TestRunResourceMergeAndPatch = Partial<TestRun>;
|
|
@@ -159,10 +227,28 @@ export interface LoadTestRunCreateOrUpdateTestRunMediaTypesParam {
|
|
|
159
227
|
}
|
|
160
228
|
export type LoadTestRunCreateOrUpdateTestRunParameters = LoadTestRunCreateOrUpdateTestRunQueryParam & LoadTestRunCreateOrUpdateTestRunMediaTypesParam & LoadTestRunCreateOrUpdateTestRunBodyParam & RequestParameters;
|
|
161
229
|
export type LoadTestRunDeleteTestRunParameters = RequestParameters;
|
|
230
|
+
/** This is the wrapper object for the parameter `createdByTypes` with explode set to false and style set to form. */
|
|
231
|
+
export interface LoadTestRunListTestRunsCreatedByTypesQueryParam {
|
|
232
|
+
/** Value of the parameter */
|
|
233
|
+
value: string[];
|
|
234
|
+
/** Should we explode the value? */
|
|
235
|
+
explode: false;
|
|
236
|
+
/** Style of the value */
|
|
237
|
+
style: "form";
|
|
238
|
+
}
|
|
239
|
+
/** This is the wrapper object for the parameter `testIds` with explode set to false and style set to form. */
|
|
240
|
+
export interface LoadTestRunListTestRunsTestIdsQueryParam {
|
|
241
|
+
/** Value of the parameter */
|
|
242
|
+
value: string[];
|
|
243
|
+
/** Should we explode the value? */
|
|
244
|
+
explode: false;
|
|
245
|
+
/** Style of the value */
|
|
246
|
+
style: "form";
|
|
247
|
+
}
|
|
162
248
|
export interface LoadTestRunListTestRunsQueryParamProperties {
|
|
163
249
|
/**
|
|
164
|
-
* Sort on the supported fields in (field asc/desc) format. eg:
|
|
165
|
-
*
|
|
250
|
+
* Sort on the supported fields in (field asc/desc) format. eg: createdDateTime asc.
|
|
251
|
+
* Supported fields - createdDateTime, executedDateTime (legacy)
|
|
166
252
|
*/
|
|
167
253
|
orderby?: string;
|
|
168
254
|
/**
|
|
@@ -181,6 +267,10 @@ export interface LoadTestRunListTestRunsQueryParamProperties {
|
|
|
181
267
|
status?: string;
|
|
182
268
|
/** Number of results in response. */
|
|
183
269
|
maxpagesize?: number;
|
|
270
|
+
/** Comma separated list of type of entities that have created the test run. */
|
|
271
|
+
createdByTypes?: string[] | LoadTestRunListTestRunsCreatedByTypesQueryParam;
|
|
272
|
+
/** Comma-separated list of test IDs. If you are using testIds, do not send a value for testId. */
|
|
273
|
+
testIds?: string[] | LoadTestRunListTestRunsTestIdsQueryParam;
|
|
184
274
|
}
|
|
185
275
|
export interface LoadTestRunListTestRunsQueryParam {
|
|
186
276
|
queryParameters?: LoadTestRunListTestRunsQueryParamProperties;
|
|
@@ -188,6 +278,19 @@ export interface LoadTestRunListTestRunsQueryParam {
|
|
|
188
278
|
export type LoadTestRunListTestRunsParameters = LoadTestRunListTestRunsQueryParam & RequestParameters;
|
|
189
279
|
export type LoadTestRunGetTestRunFileParameters = RequestParameters;
|
|
190
280
|
export type LoadTestRunStopParameters = RequestParameters;
|
|
281
|
+
export type LoadTestRunGetLatestInsightsParameters = RequestParameters;
|
|
282
|
+
/** Test run insights model. */
|
|
283
|
+
export type TestRunInsightsResourceMergeAndPatch = Partial<TestRunInsights>;
|
|
284
|
+
export interface LoadTestRunUpdateLatestInsightsBodyParam {
|
|
285
|
+
/** Test run insights model. */
|
|
286
|
+
body: TestRunInsightsResourceMergeAndPatch;
|
|
287
|
+
}
|
|
288
|
+
export interface LoadTestRunUpdateLatestInsightsMediaTypesParam {
|
|
289
|
+
/** Content type. */
|
|
290
|
+
contentType: "application/merge-patch+json";
|
|
291
|
+
}
|
|
292
|
+
export type LoadTestRunUpdateLatestInsightsParameters = LoadTestRunUpdateLatestInsightsMediaTypesParam & LoadTestRunUpdateLatestInsightsBodyParam & RequestParameters;
|
|
293
|
+
export type LoadTestRunGenerateInsightsParameters = RequestParameters;
|
|
191
294
|
export type LoadTestRunListMetricNamespacesParameters = RequestParameters;
|
|
192
295
|
export interface LoadTestRunListMetricDefinitionsQueryParamProperties {
|
|
193
296
|
/** Metric namespace to query metric definitions for. */
|
|
@@ -330,66 +433,4 @@ export interface TestProfileRunAdministrationListTestProfileRunsQueryParam {
|
|
|
330
433
|
queryParameters?: TestProfileRunAdministrationListTestProfileRunsQueryParamProperties;
|
|
331
434
|
}
|
|
332
435
|
export type TestProfileRunAdministrationListTestProfileRunsParameters = TestProfileRunAdministrationListTestProfileRunsQueryParam & RequestParameters;
|
|
333
|
-
export type TriggerAdministrationGetTriggerParameters = RequestParameters;
|
|
334
|
-
/** The resource instance. */
|
|
335
|
-
export type TriggerResourceMergeAndPatch = Partial<Trigger>;
|
|
336
|
-
export interface TriggerAdministrationCreateOrUpdateTriggerBodyParam {
|
|
337
|
-
/** The resource instance. */
|
|
338
|
-
body: TriggerResourceMergeAndPatch;
|
|
339
|
-
}
|
|
340
|
-
export interface TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam {
|
|
341
|
-
/** This request has a JSON Merge Patch body. */
|
|
342
|
-
contentType: "application/merge-patch+json";
|
|
343
|
-
}
|
|
344
|
-
export type TriggerAdministrationCreateOrUpdateTriggerParameters = TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam & TriggerAdministrationCreateOrUpdateTriggerBodyParam & RequestParameters;
|
|
345
|
-
export type TriggerAdministrationDeleteTriggerParameters = RequestParameters;
|
|
346
|
-
export interface TriggerAdministrationListTriggerQueryParamProperties {
|
|
347
|
-
/** Search based on triggers associated with the provided test ids. */
|
|
348
|
-
testIds?: string;
|
|
349
|
-
/**
|
|
350
|
-
* Filter triggers based on a comma separated list of states.
|
|
351
|
-
*
|
|
352
|
-
* Possible values: "Active", "Paused", "Completed", "Disabled"
|
|
353
|
-
*/
|
|
354
|
-
states?: TriggerState;
|
|
355
|
-
/** Start DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */
|
|
356
|
-
lastModifiedStartTime?: Date | string;
|
|
357
|
-
/** End DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */
|
|
358
|
-
lastModifiedEndTime?: Date | string;
|
|
359
|
-
/** Number of results in response. Default page size is 50. */
|
|
360
|
-
maxpagesize?: number;
|
|
361
|
-
}
|
|
362
|
-
export interface TriggerAdministrationListTriggerQueryParam {
|
|
363
|
-
queryParameters?: TriggerAdministrationListTriggerQueryParamProperties;
|
|
364
|
-
}
|
|
365
|
-
export type TriggerAdministrationListTriggerParameters = TriggerAdministrationListTriggerQueryParam & RequestParameters;
|
|
366
|
-
export type NotificationRuleAdministrationGetNotificationRuleParameters = RequestParameters;
|
|
367
|
-
/** The resource instance. */
|
|
368
|
-
export type NotificationRuleResourceMergeAndPatch = Partial<NotificationRule>;
|
|
369
|
-
export interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam {
|
|
370
|
-
/** The resource instance. */
|
|
371
|
-
body: NotificationRuleResourceMergeAndPatch;
|
|
372
|
-
}
|
|
373
|
-
export interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam {
|
|
374
|
-
/** This request has a JSON Merge Patch body. */
|
|
375
|
-
contentType: "application/merge-patch+json";
|
|
376
|
-
}
|
|
377
|
-
export type NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters = NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam & NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam & RequestParameters;
|
|
378
|
-
export type NotificationRuleAdministrationDeleteNotificationRuleParameters = RequestParameters;
|
|
379
|
-
export interface NotificationRuleAdministrationListNotificationRuleQueryParamProperties {
|
|
380
|
-
/** Search based on notification rules associated with the provided test ids. */
|
|
381
|
-
testIds?: string;
|
|
382
|
-
/** Search based on notification rules for the provided scopes. */
|
|
383
|
-
scopes?: string;
|
|
384
|
-
/** Start DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */
|
|
385
|
-
lastModifiedStartTime?: Date | string;
|
|
386
|
-
/** End DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */
|
|
387
|
-
lastModifiedEndTime?: Date | string;
|
|
388
|
-
/** Number of results in response. Default page size is 50. */
|
|
389
|
-
maxpagesize?: number;
|
|
390
|
-
}
|
|
391
|
-
export interface NotificationRuleAdministrationListNotificationRuleQueryParam {
|
|
392
|
-
queryParameters?: NotificationRuleAdministrationListNotificationRuleQueryParamProperties;
|
|
393
|
-
}
|
|
394
|
-
export type NotificationRuleAdministrationListNotificationRuleParameters = NotificationRuleAdministrationListNotificationRuleQueryParam & RequestParameters;
|
|
395
436
|
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n Test,\n FileType,\n TestAppComponents,\n TestServerMetricsConfiguration,\n TestProfile,\n TestRun,\n TimeGrain,\n MetricRequestPayload,\n TestRunAppComponents,\n TestRunServerMetricsConfiguration,\n TestProfileRun,\n Trigger,\n TriggerState,\n NotificationRule,\n} from \"./models.js\";\n\n/** The resource instance. */\nexport type TestResourceMergeAndPatch = Partial<Test>;\n\nexport interface LoadTestAdministrationCreateOrUpdateTestBodyParam {\n /** The resource instance. */\n body: TestResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateTestParameters =\n LoadTestAdministrationCreateOrUpdateTestMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateTestBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationDeleteTestParameters = RequestParameters;\nexport type LoadTestAdministrationGetTestParameters = RequestParameters;\n\nexport interface LoadTestAdministrationListTestsQueryParamProperties {\n /**\n * Sort on the supported fields in (field asc/desc) format. eg:\n * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime\n */\n orderby?: string;\n /**\n * Prefix based, case sensitive search on searchable fields - displayName,\n * createdBy. For example, to search for a test, with display name is Login Test,\n * the search parameter can be Login.\n */\n search?: string;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter tests. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. */\n maxpagesize?: number;\n}\n\nexport interface LoadTestAdministrationListTestsQueryParam {\n queryParameters?: LoadTestAdministrationListTestsQueryParamProperties;\n}\n\nexport type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam &\n RequestParameters;\n\nexport interface LoadTestAdministrationUploadTestFileBodyParam {\n /**\n * The file content as application/octet-stream.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface LoadTestAdministrationUploadTestFileQueryParamProperties {\n /**\n * File type\n *\n * Possible values: \"JMX_FILE\", \"USER_PROPERTIES\", \"ADDITIONAL_ARTIFACTS\", \"ZIPPED_ARTIFACTS\", \"URL_TEST_CONFIG\", \"TEST_SCRIPT\"\n */\n fileType?: FileType;\n}\n\nexport interface LoadTestAdministrationUploadTestFileQueryParam {\n queryParameters?: LoadTestAdministrationUploadTestFileQueryParamProperties;\n}\n\nexport interface LoadTestAdministrationUploadTestFileMediaTypesParam {\n /** Content type. */\n contentType: \"application/octet-stream\";\n}\n\nexport type LoadTestAdministrationUploadTestFileParameters =\n LoadTestAdministrationUploadTestFileQueryParam &\n LoadTestAdministrationUploadTestFileMediaTypesParam &\n LoadTestAdministrationUploadTestFileBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetTestFileParameters = RequestParameters;\nexport type LoadTestAdministrationDeleteTestFileParameters = RequestParameters;\nexport type LoadTestAdministrationListTestFilesParameters = RequestParameters;\n/** App Component model. */\nexport type TestAppComponentsResourceMergeAndPatch = Partial<TestAppComponents>;\n\nexport interface LoadTestAdministrationCreateOrUpdateAppComponentsBodyParam {\n /** App Component model. */\n body: TestAppComponentsResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateAppComponentsMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateAppComponentsParameters =\n LoadTestAdministrationCreateOrUpdateAppComponentsMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateAppComponentsBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetAppComponentsParameters = RequestParameters;\n/** Server metric configuration model. */\nexport type TestServerMetricsConfigurationResourceMergeAndPatch =\n Partial<TestServerMetricsConfiguration>;\n\nexport interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigBodyParam {\n /** Server metric configuration model. */\n body: TestServerMetricsConfigurationResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters =\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetServerMetricsConfigParameters = RequestParameters;\n/** The resource instance. */\nexport type TestProfileResourceMergeAndPatch = Partial<TestProfile>;\n\nexport interface TestProfileAdministrationCreateOrUpdateTestProfileBodyParam {\n /** The resource instance. */\n body: TestProfileResourceMergeAndPatch;\n}\n\nexport interface TestProfileAdministrationCreateOrUpdateTestProfileMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TestProfileAdministrationCreateOrUpdateTestProfileParameters =\n TestProfileAdministrationCreateOrUpdateTestProfileMediaTypesParam &\n TestProfileAdministrationCreateOrUpdateTestProfileBodyParam &\n RequestParameters;\nexport type TestProfileAdministrationDeleteTestProfileParameters = RequestParameters;\nexport type TestProfileAdministrationGetTestProfileParameters = RequestParameters;\n\n/** This is the wrapper object for the parameter `testProfileIds` with explode set to false and style set to form. */\nexport interface TestProfileAdministrationListTestProfilesTestProfileIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `testIds` with explode set to false and style set to form. */\nexport interface TestProfileAdministrationListTestProfilesTestIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface TestProfileAdministrationListTestProfilesQueryParamProperties {\n /** Maximum number of results to include in a single response. */\n maxpagesize?: number;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles. */\n lastModifiedEndTime?: Date | string;\n /** Comma separated list of IDs of the test profiles to filter. */\n testProfileIds?: string[] | TestProfileAdministrationListTestProfilesTestProfileIdsQueryParam;\n /** Comma separated list IDs of the tests which should be associated with the test profiles to fetch. */\n testIds?: string[] | TestProfileAdministrationListTestProfilesTestIdsQueryParam;\n}\n\nexport interface TestProfileAdministrationListTestProfilesQueryParam {\n queryParameters?: TestProfileAdministrationListTestProfilesQueryParamProperties;\n}\n\nexport type TestProfileAdministrationListTestProfilesParameters =\n TestProfileAdministrationListTestProfilesQueryParam & RequestParameters;\nexport type LoadTestRunGetTestRunParameters = RequestParameters;\n/** The resource instance. */\nexport type TestRunResourceMergeAndPatch = Partial<TestRun>;\n\nexport interface LoadTestRunCreateOrUpdateTestRunBodyParam {\n /** The resource instance. */\n body: TestRunResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunQueryParamProperties {\n /**\n * Existing test run identifier that should be rerun, if this is provided, the\n * test will run with the JMX file, configuration and app components from the\n * existing test run. You can override the configuration values for new test run\n * in the request body.\n */\n oldTestRunId?: string;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunQueryParam {\n queryParameters?: LoadTestRunCreateOrUpdateTestRunQueryParamProperties;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateTestRunParameters =\n LoadTestRunCreateOrUpdateTestRunQueryParam &\n LoadTestRunCreateOrUpdateTestRunMediaTypesParam &\n LoadTestRunCreateOrUpdateTestRunBodyParam &\n RequestParameters;\nexport type LoadTestRunDeleteTestRunParameters = RequestParameters;\n\nexport interface LoadTestRunListTestRunsQueryParamProperties {\n /**\n * Sort on the supported fields in (field asc/desc) format. eg: executedDateTime\n * asc. Supported fields - executedDateTime\n */\n orderby?: string;\n /**\n * Prefix based, case sensitive search on searchable fields - description,\n * executedUser. For example, to search for a test run, with description 500 VUs,\n * the search parameter can be 500.\n */\n search?: string;\n /** Unique name of an existing load test. */\n testId?: string;\n /** Start DateTime(RFC 3339 literal format) of test-run execution time filter range. */\n executionFrom?: Date | string;\n /** End DateTime(RFC 3339 literal format) of test-run execution time filter range. */\n executionTo?: Date | string;\n /** Comma separated list of test run status. */\n status?: string;\n /** Number of results in response. */\n maxpagesize?: number;\n}\n\nexport interface LoadTestRunListTestRunsQueryParam {\n queryParameters?: LoadTestRunListTestRunsQueryParamProperties;\n}\n\nexport type LoadTestRunListTestRunsParameters = LoadTestRunListTestRunsQueryParam &\n RequestParameters;\nexport type LoadTestRunGetTestRunFileParameters = RequestParameters;\nexport type LoadTestRunStopParameters = RequestParameters;\nexport type LoadTestRunListMetricNamespacesParameters = RequestParameters;\n\nexport interface LoadTestRunListMetricDefinitionsQueryParamProperties {\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n}\n\nexport interface LoadTestRunListMetricDefinitionsQueryParam {\n queryParameters: LoadTestRunListMetricDefinitionsQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricDefinitionsParameters =\n LoadTestRunListMetricDefinitionsQueryParam & RequestParameters;\n\nexport interface LoadTestRunListMetricsBodyParam {\n /** Metric dimension filter */\n body?: MetricRequestPayload;\n}\n\nexport interface LoadTestRunListMetricsQueryParamProperties {\n /** The aggregation */\n aggregation?: string;\n /** Metric name */\n metricname: string;\n /**\n * The interval (i.e. timegrain) of the query.\n *\n * Possible values: \"PT5S\", \"PT10S\", \"PT1M\", \"PT5M\", \"PT1H\"\n */\n interval?: TimeGrain;\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */\n timespan: string;\n}\n\nexport interface LoadTestRunListMetricsQueryParam {\n queryParameters: LoadTestRunListMetricsQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricsParameters = LoadTestRunListMetricsQueryParam &\n LoadTestRunListMetricsBodyParam &\n RequestParameters;\n\nexport interface LoadTestRunListMetricDimensionValuesQueryParamProperties {\n /** Metric name */\n metricname: string;\n /**\n * The interval (i.e. timegrain) of the query.\n *\n * Possible values: \"PT5S\", \"PT10S\", \"PT1M\", \"PT5M\", \"PT1H\"\n */\n interval?: TimeGrain;\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */\n timespan: string;\n}\n\nexport interface LoadTestRunListMetricDimensionValuesQueryParam {\n queryParameters: LoadTestRunListMetricDimensionValuesQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricDimensionValuesParameters =\n LoadTestRunListMetricDimensionValuesQueryParam & RequestParameters;\n/** App Component model. */\nexport type TestRunAppComponentsResourceMergeAndPatch = Partial<TestRunAppComponents>;\n\nexport interface LoadTestRunCreateOrUpdateAppComponentsBodyParam {\n /** App Component model. */\n body: TestRunAppComponentsResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateAppComponentsMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateAppComponentsParameters =\n LoadTestRunCreateOrUpdateAppComponentsMediaTypesParam &\n LoadTestRunCreateOrUpdateAppComponentsBodyParam &\n RequestParameters;\nexport type LoadTestRunGetAppComponentsParameters = RequestParameters;\n/** Server metric configuration model. */\nexport type TestRunServerMetricsConfigurationResourceMergeAndPatch =\n Partial<TestRunServerMetricsConfiguration>;\n\nexport interface LoadTestRunCreateOrUpdateServerMetricsConfigBodyParam {\n /** Server metric configuration model. */\n body: TestRunServerMetricsConfigurationResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateServerMetricsConfigMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateServerMetricsConfigParameters =\n LoadTestRunCreateOrUpdateServerMetricsConfigMediaTypesParam &\n LoadTestRunCreateOrUpdateServerMetricsConfigBodyParam &\n RequestParameters;\nexport type LoadTestRunGetServerMetricsConfigParameters = RequestParameters;\nexport type TestProfileRunAdministrationGetTestProfileRunParameters = RequestParameters;\n/** The resource instance. */\nexport type TestProfileRunResourceMergeAndPatch = Partial<TestProfileRun>;\n\nexport interface TestProfileRunAdministrationCreateOrUpdateTestProfileRunBodyParam {\n /** The resource instance. */\n body: TestProfileRunResourceMergeAndPatch;\n}\n\nexport interface TestProfileRunAdministrationCreateOrUpdateTestProfileRunMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters =\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunMediaTypesParam &\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunBodyParam &\n RequestParameters;\nexport type TestProfileRunAdministrationDeleteTestProfileRunParameters = RequestParameters;\nexport type TestProfileRunAdministrationStopParameters = RequestParameters;\n\n/** This is the wrapper object for the parameter `testProfileRunIds` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsTestProfileRunIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `testProfileIds` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsTestProfileIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `statuses` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsStatusesQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface TestProfileRunAdministrationListTestProfileRunsQueryParamProperties {\n /** Maximum number of results to include in a single response. */\n maxpagesize?: number;\n /** Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n minStartDateTime?: Date | string;\n /** Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n maxStartDateTime?: Date | string;\n /** Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n minEndDateTime?: Date | string;\n /** Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n maxEndDateTime?: Date | string;\n /** Start DateTime(RFC 3339 literal format) of the created time range to filter test profile runs. */\n createdDateStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the created time range to filter test profile runs. */\n createdDateEndTime?: Date | string;\n /** Comma separated list of IDs of the test profile runs to filter. */\n testProfileRunIds?:\n | string[]\n | TestProfileRunAdministrationListTestProfileRunsTestProfileRunIdsQueryParam;\n /** Comma separated IDs of the test profiles which should be associated with the test profile runs to fetch. */\n testProfileIds?:\n | string[]\n | TestProfileRunAdministrationListTestProfileRunsTestProfileIdsQueryParam;\n /** Comma separated list of Statuses of the test profile runs to filter. */\n statuses?: string[] | TestProfileRunAdministrationListTestProfileRunsStatusesQueryParam;\n}\n\nexport interface TestProfileRunAdministrationListTestProfileRunsQueryParam {\n queryParameters?: TestProfileRunAdministrationListTestProfileRunsQueryParamProperties;\n}\n\nexport type TestProfileRunAdministrationListTestProfileRunsParameters =\n TestProfileRunAdministrationListTestProfileRunsQueryParam & RequestParameters;\nexport type TriggerAdministrationGetTriggerParameters = RequestParameters;\n/** The resource instance. */\nexport type TriggerResourceMergeAndPatch = Partial<Trigger>;\n\nexport interface TriggerAdministrationCreateOrUpdateTriggerBodyParam {\n /** The resource instance. */\n body: TriggerResourceMergeAndPatch;\n}\n\nexport interface TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TriggerAdministrationCreateOrUpdateTriggerParameters =\n TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam &\n TriggerAdministrationCreateOrUpdateTriggerBodyParam &\n RequestParameters;\nexport type TriggerAdministrationDeleteTriggerParameters = RequestParameters;\n\nexport interface TriggerAdministrationListTriggerQueryParamProperties {\n /** Search based on triggers associated with the provided test ids. */\n testIds?: string;\n /**\n * Filter triggers based on a comma separated list of states.\n *\n * Possible values: \"Active\", \"Paused\", \"Completed\", \"Disabled\"\n */\n states?: TriggerState;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. Default page size is 50. */\n maxpagesize?: number;\n}\n\nexport interface TriggerAdministrationListTriggerQueryParam {\n queryParameters?: TriggerAdministrationListTriggerQueryParamProperties;\n}\n\nexport type TriggerAdministrationListTriggerParameters =\n TriggerAdministrationListTriggerQueryParam & RequestParameters;\nexport type NotificationRuleAdministrationGetNotificationRuleParameters = RequestParameters;\n/** The resource instance. */\nexport type NotificationRuleResourceMergeAndPatch = Partial<NotificationRule>;\n\nexport interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam {\n /** The resource instance. */\n body: NotificationRuleResourceMergeAndPatch;\n}\n\nexport interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters =\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam &\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam &\n RequestParameters;\nexport type NotificationRuleAdministrationDeleteNotificationRuleParameters = RequestParameters;\n\nexport interface NotificationRuleAdministrationListNotificationRuleQueryParamProperties {\n /** Search based on notification rules associated with the provided test ids. */\n testIds?: string;\n /** Search based on notification rules for the provided scopes. */\n scopes?: string;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. Default page size is 50. */\n maxpagesize?: number;\n}\n\nexport interface NotificationRuleAdministrationListNotificationRuleQueryParam {\n queryParameters?: NotificationRuleAdministrationListNotificationRuleQueryParamProperties;\n}\n\nexport type NotificationRuleAdministrationListNotificationRuleParameters =\n NotificationRuleAdministrationListNotificationRuleQueryParam & RequestParameters;\n"]}
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n Test,\n CloneTestRequest,\n FileType,\n TestAppComponents,\n TestServerMetricsConfiguration,\n TestProfile,\n Trigger,\n TriggerState,\n NotificationRule,\n TestRun,\n TestRunInsights,\n TimeGrain,\n MetricRequestPayload,\n TestRunAppComponents,\n TestRunServerMetricsConfiguration,\n TestProfileRun,\n} from \"./models.js\";\n\nexport type OperationsGetStatusParameters = RequestParameters;\n/** The resource instance. */\nexport type TestResourceMergeAndPatch = Partial<Test>;\n\nexport interface LoadTestAdministrationCreateOrUpdateTestBodyParam {\n /** The resource instance. */\n body: TestResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateTestParameters =\n LoadTestAdministrationCreateOrUpdateTestMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateTestBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationDeleteTestParameters = RequestParameters;\nexport type LoadTestAdministrationGetTestParameters = RequestParameters;\n\nexport interface LoadTestAdministrationListTestsQueryParamProperties {\n /**\n * Sort on the supported fields in (field asc/desc) format. eg:\n * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime\n */\n orderby?: string;\n /**\n * Prefix based, case sensitive search on searchable fields - displayName,\n * createdBy. For example, to search for a test, with display name is Login Test,\n * the search parameter can be Login.\n */\n search?: string;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter tests. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. */\n maxpagesize?: number;\n}\n\nexport interface LoadTestAdministrationListTestsQueryParam {\n queryParameters?: LoadTestAdministrationListTestsQueryParamProperties;\n}\n\nexport type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam &\n RequestParameters;\n\nexport interface LoadTestAdministrationCloneTestBodyParam {\n body: CloneTestRequest;\n}\n\nexport type LoadTestAdministrationCloneTestParameters = LoadTestAdministrationCloneTestBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGenerateTestPlanRecommendationsParameters = RequestParameters;\n\nexport interface LoadTestAdministrationUploadTestFileBodyParam {\n /**\n * The file content as application/octet-stream.\n *\n * Value may contain any sequence of octets\n */\n body: string | Uint8Array | ReadableStream<Uint8Array> | NodeJS.ReadableStream;\n}\n\nexport interface LoadTestAdministrationUploadTestFileQueryParamProperties {\n /**\n * File type\n *\n * Possible values: \"JMX_FILE\", \"USER_PROPERTIES\", \"ADDITIONAL_ARTIFACTS\", \"ZIPPED_ARTIFACTS\", \"URL_TEST_CONFIG\", \"TEST_SCRIPT\", \"BROWSER_RECORDING\", \"TEST_PLAN_RECOMMENDATIONS\"\n */\n fileType?: FileType;\n}\n\nexport interface LoadTestAdministrationUploadTestFileQueryParam {\n queryParameters?: LoadTestAdministrationUploadTestFileQueryParamProperties;\n}\n\nexport interface LoadTestAdministrationUploadTestFileMediaTypesParam {\n /** Content type. */\n contentType: \"application/octet-stream\";\n}\n\nexport type LoadTestAdministrationUploadTestFileParameters =\n LoadTestAdministrationUploadTestFileQueryParam &\n LoadTestAdministrationUploadTestFileMediaTypesParam &\n LoadTestAdministrationUploadTestFileBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetTestFileParameters = RequestParameters;\nexport type LoadTestAdministrationDeleteTestFileParameters = RequestParameters;\nexport type LoadTestAdministrationListTestFilesParameters = RequestParameters;\n/** App Component model. */\nexport type TestAppComponentsResourceMergeAndPatch = Partial<TestAppComponents>;\n\nexport interface LoadTestAdministrationCreateOrUpdateAppComponentsBodyParam {\n /** App Component model. */\n body: TestAppComponentsResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateAppComponentsMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateAppComponentsParameters =\n LoadTestAdministrationCreateOrUpdateAppComponentsMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateAppComponentsBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetAppComponentsParameters = RequestParameters;\n/** Server metric configuration model. */\nexport type TestServerMetricsConfigurationResourceMergeAndPatch =\n Partial<TestServerMetricsConfiguration>;\n\nexport interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigBodyParam {\n /** Server metric configuration model. */\n body: TestServerMetricsConfigurationResourceMergeAndPatch;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters =\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigMediaTypesParam &\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigBodyParam &\n RequestParameters;\nexport type LoadTestAdministrationGetServerMetricsConfigParameters = RequestParameters;\n/** The resource instance. */\nexport type TestProfileResourceMergeAndPatch = Partial<TestProfile>;\n\nexport interface TestProfileAdministrationCreateOrUpdateTestProfileBodyParam {\n /** The resource instance. */\n body: TestProfileResourceMergeAndPatch;\n}\n\nexport interface TestProfileAdministrationCreateOrUpdateTestProfileMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TestProfileAdministrationCreateOrUpdateTestProfileParameters =\n TestProfileAdministrationCreateOrUpdateTestProfileMediaTypesParam &\n TestProfileAdministrationCreateOrUpdateTestProfileBodyParam &\n RequestParameters;\nexport type TestProfileAdministrationDeleteTestProfileParameters = RequestParameters;\nexport type TestProfileAdministrationGetTestProfileParameters = RequestParameters;\n\n/** This is the wrapper object for the parameter `testProfileIds` with explode set to false and style set to form. */\nexport interface TestProfileAdministrationListTestProfilesTestProfileIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `testIds` with explode set to false and style set to form. */\nexport interface TestProfileAdministrationListTestProfilesTestIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface TestProfileAdministrationListTestProfilesQueryParamProperties {\n /** Maximum number of results to include in a single response. */\n maxpagesize?: number;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter test profiles. */\n lastModifiedEndTime?: Date | string;\n /** Comma separated list of IDs of the test profiles to filter. */\n testProfileIds?: string[] | TestProfileAdministrationListTestProfilesTestProfileIdsQueryParam;\n /** Comma separated list IDs of the tests which should be associated with the test profiles to fetch. */\n testIds?: string[] | TestProfileAdministrationListTestProfilesTestIdsQueryParam;\n}\n\nexport interface TestProfileAdministrationListTestProfilesQueryParam {\n queryParameters?: TestProfileAdministrationListTestProfilesQueryParamProperties;\n}\n\nexport type TestProfileAdministrationListTestProfilesParameters =\n TestProfileAdministrationListTestProfilesQueryParam & RequestParameters;\nexport type TriggerAdministrationGetTriggerParameters = RequestParameters;\n/** The resource instance. */\nexport type TriggerResourceMergeAndPatch = Partial<Trigger>;\n\nexport interface TriggerAdministrationCreateOrUpdateTriggerBodyParam {\n /** The resource instance. */\n body: TriggerResourceMergeAndPatch;\n}\n\nexport interface TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TriggerAdministrationCreateOrUpdateTriggerParameters =\n TriggerAdministrationCreateOrUpdateTriggerMediaTypesParam &\n TriggerAdministrationCreateOrUpdateTriggerBodyParam &\n RequestParameters;\nexport type TriggerAdministrationDeleteTriggerParameters = RequestParameters;\n\nexport interface TriggerAdministrationListTriggerQueryParamProperties {\n /** Search based on triggers associated with the provided test ids. */\n testIds?: string;\n /**\n * Filter triggers based on a comma separated list of states.\n *\n * Possible values: \"Active\", \"Paused\", \"Completed\", \"Disabled\"\n */\n states?: TriggerState;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter triggers. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. Default page size is 50. */\n maxpagesize?: number;\n}\n\nexport interface TriggerAdministrationListTriggerQueryParam {\n queryParameters?: TriggerAdministrationListTriggerQueryParamProperties;\n}\n\nexport type TriggerAdministrationListTriggerParameters =\n TriggerAdministrationListTriggerQueryParam & RequestParameters;\nexport type NotificationRuleAdministrationGetNotificationRuleParameters = RequestParameters;\n/** The resource instance. */\nexport type NotificationRuleResourceMergeAndPatch = Partial<NotificationRule>;\n\nexport interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam {\n /** The resource instance. */\n body: NotificationRuleResourceMergeAndPatch;\n}\n\nexport interface NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters =\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleMediaTypesParam &\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleBodyParam &\n RequestParameters;\nexport type NotificationRuleAdministrationDeleteNotificationRuleParameters = RequestParameters;\n\nexport interface NotificationRuleAdministrationListNotificationRuleQueryParamProperties {\n /** Search based on notification rules associated with the provided test ids. */\n testIds?: string;\n /** Search based on notification rules for the provided scopes. */\n scopes?: string;\n /** Start DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */\n lastModifiedStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the last updated time range to filter notification rules. */\n lastModifiedEndTime?: Date | string;\n /** Number of results in response. Default page size is 50. */\n maxpagesize?: number;\n}\n\nexport interface NotificationRuleAdministrationListNotificationRuleQueryParam {\n queryParameters?: NotificationRuleAdministrationListNotificationRuleQueryParamProperties;\n}\n\nexport type NotificationRuleAdministrationListNotificationRuleParameters =\n NotificationRuleAdministrationListNotificationRuleQueryParam & RequestParameters;\nexport type LoadTestRunGetTestRunParameters = RequestParameters;\n/** The resource instance. */\nexport type TestRunResourceMergeAndPatch = Partial<TestRun>;\n\nexport interface LoadTestRunCreateOrUpdateTestRunBodyParam {\n /** The resource instance. */\n body: TestRunResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunQueryParamProperties {\n /**\n * Existing test run identifier that should be rerun, if this is provided, the\n * test will run with the JMX file, configuration and app components from the\n * existing test run. You can override the configuration values for new test run\n * in the request body.\n */\n oldTestRunId?: string;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunQueryParam {\n queryParameters?: LoadTestRunCreateOrUpdateTestRunQueryParamProperties;\n}\n\nexport interface LoadTestRunCreateOrUpdateTestRunMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateTestRunParameters =\n LoadTestRunCreateOrUpdateTestRunQueryParam &\n LoadTestRunCreateOrUpdateTestRunMediaTypesParam &\n LoadTestRunCreateOrUpdateTestRunBodyParam &\n RequestParameters;\nexport type LoadTestRunDeleteTestRunParameters = RequestParameters;\n\n/** This is the wrapper object for the parameter `createdByTypes` with explode set to false and style set to form. */\nexport interface LoadTestRunListTestRunsCreatedByTypesQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `testIds` with explode set to false and style set to form. */\nexport interface LoadTestRunListTestRunsTestIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface LoadTestRunListTestRunsQueryParamProperties {\n /**\n * Sort on the supported fields in (field asc/desc) format. eg: createdDateTime asc.\n * Supported fields - createdDateTime, executedDateTime (legacy)\n */\n orderby?: string;\n /**\n * Prefix based, case sensitive search on searchable fields - description,\n * executedUser. For example, to search for a test run, with description 500 VUs,\n * the search parameter can be 500.\n */\n search?: string;\n /** Unique name of an existing load test. */\n testId?: string;\n /** Start DateTime(RFC 3339 literal format) of test-run execution time filter range. */\n executionFrom?: Date | string;\n /** End DateTime(RFC 3339 literal format) of test-run execution time filter range. */\n executionTo?: Date | string;\n /** Comma separated list of test run status. */\n status?: string;\n /** Number of results in response. */\n maxpagesize?: number;\n /** Comma separated list of type of entities that have created the test run. */\n createdByTypes?: string[] | LoadTestRunListTestRunsCreatedByTypesQueryParam;\n /** Comma-separated list of test IDs. If you are using testIds, do not send a value for testId. */\n testIds?: string[] | LoadTestRunListTestRunsTestIdsQueryParam;\n}\n\nexport interface LoadTestRunListTestRunsQueryParam {\n queryParameters?: LoadTestRunListTestRunsQueryParamProperties;\n}\n\nexport type LoadTestRunListTestRunsParameters = LoadTestRunListTestRunsQueryParam &\n RequestParameters;\nexport type LoadTestRunGetTestRunFileParameters = RequestParameters;\nexport type LoadTestRunStopParameters = RequestParameters;\nexport type LoadTestRunGetLatestInsightsParameters = RequestParameters;\n/** Test run insights model. */\nexport type TestRunInsightsResourceMergeAndPatch = Partial<TestRunInsights>;\n\nexport interface LoadTestRunUpdateLatestInsightsBodyParam {\n /** Test run insights model. */\n body: TestRunInsightsResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunUpdateLatestInsightsMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunUpdateLatestInsightsParameters =\n LoadTestRunUpdateLatestInsightsMediaTypesParam &\n LoadTestRunUpdateLatestInsightsBodyParam &\n RequestParameters;\nexport type LoadTestRunGenerateInsightsParameters = RequestParameters;\nexport type LoadTestRunListMetricNamespacesParameters = RequestParameters;\n\nexport interface LoadTestRunListMetricDefinitionsQueryParamProperties {\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n}\n\nexport interface LoadTestRunListMetricDefinitionsQueryParam {\n queryParameters: LoadTestRunListMetricDefinitionsQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricDefinitionsParameters =\n LoadTestRunListMetricDefinitionsQueryParam & RequestParameters;\n\nexport interface LoadTestRunListMetricsBodyParam {\n /** Metric dimension filter */\n body?: MetricRequestPayload;\n}\n\nexport interface LoadTestRunListMetricsQueryParamProperties {\n /** The aggregation */\n aggregation?: string;\n /** Metric name */\n metricname: string;\n /**\n * The interval (i.e. timegrain) of the query.\n *\n * Possible values: \"PT5S\", \"PT10S\", \"PT1M\", \"PT5M\", \"PT1H\"\n */\n interval?: TimeGrain;\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */\n timespan: string;\n}\n\nexport interface LoadTestRunListMetricsQueryParam {\n queryParameters: LoadTestRunListMetricsQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricsParameters = LoadTestRunListMetricsQueryParam &\n LoadTestRunListMetricsBodyParam &\n RequestParameters;\n\nexport interface LoadTestRunListMetricDimensionValuesQueryParamProperties {\n /** Metric name */\n metricname: string;\n /**\n * The interval (i.e. timegrain) of the query.\n *\n * Possible values: \"PT5S\", \"PT10S\", \"PT1M\", \"PT5M\", \"PT1H\"\n */\n interval?: TimeGrain;\n /** Metric namespace to query metric definitions for. */\n metricNamespace: string;\n /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */\n timespan: string;\n}\n\nexport interface LoadTestRunListMetricDimensionValuesQueryParam {\n queryParameters: LoadTestRunListMetricDimensionValuesQueryParamProperties;\n}\n\nexport type LoadTestRunListMetricDimensionValuesParameters =\n LoadTestRunListMetricDimensionValuesQueryParam & RequestParameters;\n/** App Component model. */\nexport type TestRunAppComponentsResourceMergeAndPatch = Partial<TestRunAppComponents>;\n\nexport interface LoadTestRunCreateOrUpdateAppComponentsBodyParam {\n /** App Component model. */\n body: TestRunAppComponentsResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateAppComponentsMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateAppComponentsParameters =\n LoadTestRunCreateOrUpdateAppComponentsMediaTypesParam &\n LoadTestRunCreateOrUpdateAppComponentsBodyParam &\n RequestParameters;\nexport type LoadTestRunGetAppComponentsParameters = RequestParameters;\n/** Server metric configuration model. */\nexport type TestRunServerMetricsConfigurationResourceMergeAndPatch =\n Partial<TestRunServerMetricsConfiguration>;\n\nexport interface LoadTestRunCreateOrUpdateServerMetricsConfigBodyParam {\n /** Server metric configuration model. */\n body: TestRunServerMetricsConfigurationResourceMergeAndPatch;\n}\n\nexport interface LoadTestRunCreateOrUpdateServerMetricsConfigMediaTypesParam {\n /** Content type. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type LoadTestRunCreateOrUpdateServerMetricsConfigParameters =\n LoadTestRunCreateOrUpdateServerMetricsConfigMediaTypesParam &\n LoadTestRunCreateOrUpdateServerMetricsConfigBodyParam &\n RequestParameters;\nexport type LoadTestRunGetServerMetricsConfigParameters = RequestParameters;\nexport type TestProfileRunAdministrationGetTestProfileRunParameters = RequestParameters;\n/** The resource instance. */\nexport type TestProfileRunResourceMergeAndPatch = Partial<TestProfileRun>;\n\nexport interface TestProfileRunAdministrationCreateOrUpdateTestProfileRunBodyParam {\n /** The resource instance. */\n body: TestProfileRunResourceMergeAndPatch;\n}\n\nexport interface TestProfileRunAdministrationCreateOrUpdateTestProfileRunMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters =\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunMediaTypesParam &\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunBodyParam &\n RequestParameters;\nexport type TestProfileRunAdministrationDeleteTestProfileRunParameters = RequestParameters;\nexport type TestProfileRunAdministrationStopParameters = RequestParameters;\n\n/** This is the wrapper object for the parameter `testProfileRunIds` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsTestProfileRunIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `testProfileIds` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsTestProfileIdsQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\n/** This is the wrapper object for the parameter `statuses` with explode set to false and style set to form. */\nexport interface TestProfileRunAdministrationListTestProfileRunsStatusesQueryParam {\n /** Value of the parameter */\n value: string[];\n /** Should we explode the value? */\n explode: false;\n /** Style of the value */\n style: \"form\";\n}\n\nexport interface TestProfileRunAdministrationListTestProfileRunsQueryParamProperties {\n /** Maximum number of results to include in a single response. */\n maxpagesize?: number;\n /** Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n minStartDateTime?: Date | string;\n /** Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n maxStartDateTime?: Date | string;\n /** Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n minEndDateTime?: Date | string;\n /** Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. */\n maxEndDateTime?: Date | string;\n /** Start DateTime(RFC 3339 literal format) of the created time range to filter test profile runs. */\n createdDateStartTime?: Date | string;\n /** End DateTime(RFC 3339 literal format) of the created time range to filter test profile runs. */\n createdDateEndTime?: Date | string;\n /** Comma separated list of IDs of the test profile runs to filter. */\n testProfileRunIds?:\n | string[]\n | TestProfileRunAdministrationListTestProfileRunsTestProfileRunIdsQueryParam;\n /** Comma separated IDs of the test profiles which should be associated with the test profile runs to fetch. */\n testProfileIds?:\n | string[]\n | TestProfileRunAdministrationListTestProfileRunsTestProfileIdsQueryParam;\n /** Comma separated list of Statuses of the test profile runs to filter. */\n statuses?: string[] | TestProfileRunAdministrationListTestProfileRunsStatusesQueryParam;\n}\n\nexport interface TestProfileRunAdministrationListTestProfileRunsQueryParam {\n queryParameters?: TestProfileRunAdministrationListTestProfileRunsQueryParamProperties;\n}\n\nexport type TestProfileRunAdministrationListTestProfileRunsParameters =\n TestProfileRunAdministrationListTestProfileRunsQueryParam & RequestParameters;\n"]}
|
|
@@ -1,6 +1,84 @@
|
|
|
1
|
+
import type { Client } from "@azure-rest/core-client";
|
|
2
|
+
import type { AbortSignalLike } from "@azure/abort-controller";
|
|
3
|
+
import type { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
|
|
1
4
|
import type { AzureLoadTestingClient } from "./clientDefinitions.js";
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
import type { LoadTestAdministrationCloneTest202Response, LoadTestAdministrationCloneTestDefaultResponse, LoadTestAdministrationCloneTestLogicalResponse, LoadTestAdministrationGenerateTestPlanRecommendations202Response, LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse, LoadTestAdministrationGenerateTestPlanRecommendationsLogicalResponse, LoadTestRunGenerateInsights202Response, LoadTestRunGenerateInsightsDefaultResponse, LoadTestRunGenerateInsightsLogicalResponse } from "./responses.js";
|
|
6
|
+
import type { FileUploadAndValidatePoller, TestUploadFileSuccessResponse, TestRunCompletionPoller, TestRunCreateOrUpdateSuccessResponse, TestProfileRunCreateOrUpdateSuccessResponse, TestProfileRunCompletionPoller, PolledOperationOptions } from "./models.js";
|
|
7
|
+
/**
|
|
8
|
+
* A simple poller that can be used to poll a long running operation.
|
|
9
|
+
*/
|
|
10
|
+
export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
|
|
11
|
+
/**
|
|
12
|
+
* Returns true if the poller has finished polling.
|
|
13
|
+
*/
|
|
14
|
+
isDone(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the state of the operation.
|
|
17
|
+
*/
|
|
18
|
+
getOperationState(): TState;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the result value of the operation,
|
|
21
|
+
* regardless of the state of the poller.
|
|
22
|
+
* It can return undefined or an incomplete form of the final TResult value
|
|
23
|
+
* depending on the implementation.
|
|
24
|
+
*/
|
|
25
|
+
getResult(): TResult | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Returns a promise that will resolve once a single polling request finishes.
|
|
28
|
+
* It does this by calling the update method of the Poller's operation.
|
|
29
|
+
*/
|
|
30
|
+
poll(options?: {
|
|
31
|
+
abortSignal?: AbortSignalLike;
|
|
32
|
+
}): Promise<TState>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a promise that will resolve once the underlying operation is completed.
|
|
35
|
+
*/
|
|
36
|
+
pollUntilDone(pollOptions?: {
|
|
37
|
+
abortSignal?: AbortSignalLike;
|
|
38
|
+
}): Promise<TResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Invokes the provided callback after each polling is completed,
|
|
41
|
+
* sending the current state of the poller's operation.
|
|
42
|
+
*
|
|
43
|
+
* It returns a method that can be used to stop receiving updates on the given callback function.
|
|
44
|
+
*/
|
|
45
|
+
onProgress(callback: (state: TState) => void): CancelOnProgress;
|
|
46
|
+
/**
|
|
47
|
+
* Returns a promise that could be used for serialized version of the poller's operation
|
|
48
|
+
* by invoking the operation's serialize method.
|
|
49
|
+
*/
|
|
50
|
+
serialize(): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Wait the poller to be submitted.
|
|
53
|
+
*/
|
|
54
|
+
submitted(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a string representation of the poller's operation. Similar to serialize but returns a string.
|
|
57
|
+
* @deprecated Use serialize() instead.
|
|
58
|
+
*/
|
|
59
|
+
toString(): string;
|
|
60
|
+
/**
|
|
61
|
+
* Stops the poller from continuing to poll. Please note this will only stop the client-side polling
|
|
62
|
+
* @deprecated Use abortSignal to stop polling instead.
|
|
63
|
+
*/
|
|
64
|
+
stopPolling(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Returns true if the poller is stopped.
|
|
67
|
+
* @deprecated Use abortSignal status to track this instead.
|
|
68
|
+
*/
|
|
69
|
+
isStopped(): boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Helper function that builds a Poller object to help polling a long running operation.
|
|
73
|
+
* @param client - Client to use for sending the request to get additional pages.
|
|
74
|
+
* @param initialResponse - The initial response.
|
|
75
|
+
* @param options - Options to set a resume state or custom polling interval.
|
|
76
|
+
* @returns - A poller object to poll for operation state updates and eventually get the final response.
|
|
77
|
+
*/
|
|
78
|
+
export declare function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestUploadFileSuccessResponse, polledOperationOptions?: PolledOperationOptions): Promise<FileUploadAndValidatePoller>;
|
|
79
|
+
export declare function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse, polledOperationOptions?: PolledOperationOptions): Promise<TestRunCompletionPoller>;
|
|
80
|
+
export declare function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestProfileRunCreateOrUpdateSuccessResponse, polledOperationOptions?: PolledOperationOptions): Promise<TestProfileRunCompletionPoller>;
|
|
81
|
+
export declare function getLongRunningPoller<TResult extends LoadTestAdministrationCloneTestLogicalResponse | LoadTestAdministrationCloneTestDefaultResponse>(client: Client, initialResponse: LoadTestAdministrationCloneTest202Response | LoadTestAdministrationCloneTestDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
82
|
+
export declare function getLongRunningPoller<TResult extends LoadTestAdministrationGenerateTestPlanRecommendationsLogicalResponse | LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse>(client: Client, initialResponse: LoadTestAdministrationGenerateTestPlanRecommendations202Response | LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
83
|
+
export declare function getLongRunningPoller<TResult extends LoadTestRunGenerateInsightsLogicalResponse | LoadTestRunGenerateInsightsDefaultResponse>(client: Client, initialResponse: LoadTestRunGenerateInsights202Response | LoadTestRunGenerateInsightsDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
6
84
|
//# sourceMappingURL=pollingHelper.d.ts.map
|
|
@@ -1,27 +1,131 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
+
import { createHttpPoller } from "@azure/core-lro";
|
|
3
4
|
import { getFileValidationPoller } from "./getFileValidationPoller.js";
|
|
4
5
|
import { getTestRunCompletionPoller } from "./getTestRunCompletionPoller.js";
|
|
5
6
|
import { getTestProfileRunCompletionPoller } from "./getTestProfileRunCompletionPoller.js";
|
|
6
|
-
|
|
7
|
-
if (isFileUpload(initialResponse)) {
|
|
8
|
-
return getFileValidationPoller(client, initialResponse);
|
|
9
|
-
}
|
|
10
|
-
else if (isTestRunCreation(initialResponse)) {
|
|
11
|
-
return getTestRunCompletionPoller(client, initialResponse);
|
|
12
|
-
}
|
|
13
|
-
else if (isTestProfileRunCreation(initialResponse)) {
|
|
14
|
-
return getTestProfileRunCompletionPoller(client, initialResponse);
|
|
15
|
-
}
|
|
16
|
-
throw new Error("The Operation is not a long running operation.");
|
|
17
|
-
}
|
|
7
|
+
// Helper for custom pollers
|
|
18
8
|
function isFileUpload(response) {
|
|
19
|
-
|
|
9
|
+
const url = response.request?.url ?? "";
|
|
10
|
+
// Match: /tests/{testId}/files/{fileName} but NOT /test-runs/
|
|
11
|
+
return url.includes("/files/") && url.includes("/tests/") && !url.includes("/test-runs/");
|
|
20
12
|
}
|
|
21
13
|
function isTestRunCreation(response) {
|
|
22
|
-
|
|
14
|
+
const url = response.request?.url ?? "";
|
|
15
|
+
const method = response.request?.method.toUpperCase() ?? "";
|
|
16
|
+
// Match: /test-runs/{testRunId}
|
|
17
|
+
return url.includes("/test-runs/") && !url.includes("/test-profile-runs/") && method === "PATCH";
|
|
23
18
|
}
|
|
24
19
|
function isTestProfileRunCreation(response) {
|
|
25
|
-
|
|
20
|
+
const url = response.request?.url ?? "";
|
|
21
|
+
// Match: /test-profile-runs/{testProfileRunId}
|
|
22
|
+
return url.includes("/test-profile-runs/");
|
|
23
|
+
}
|
|
24
|
+
export async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
25
|
+
// Route to custom pollers based on response type
|
|
26
|
+
if (isFileUpload(initialResponse)) {
|
|
27
|
+
return getFileValidationPoller(client, initialResponse, options);
|
|
28
|
+
}
|
|
29
|
+
if (isTestRunCreation(initialResponse)) {
|
|
30
|
+
return getTestRunCompletionPoller(client, initialResponse, options);
|
|
31
|
+
}
|
|
32
|
+
if (isTestProfileRunCreation(initialResponse)) {
|
|
33
|
+
return getTestProfileRunCompletionPoller(client, initialResponse, options);
|
|
34
|
+
}
|
|
35
|
+
const httpPollerOptions = options;
|
|
36
|
+
const abortController = new AbortController();
|
|
37
|
+
const poller = {
|
|
38
|
+
sendInitialRequest: async () => {
|
|
39
|
+
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
|
40
|
+
// we are not triggering the initial request here, just extracting the information from the
|
|
41
|
+
// response we were provided.
|
|
42
|
+
return getLroResponse(initialResponse);
|
|
43
|
+
},
|
|
44
|
+
sendPollRequest: async (path, pollOptions) => {
|
|
45
|
+
// This is the callback that is going to be called to poll the service
|
|
46
|
+
// to get the latest status. We use the client provided and the polling path
|
|
47
|
+
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
|
48
|
+
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
|
49
|
+
function abortListener() {
|
|
50
|
+
abortController.abort();
|
|
51
|
+
}
|
|
52
|
+
const inputAbortSignal = pollOptions?.abortSignal;
|
|
53
|
+
const abortSignal = abortController.signal;
|
|
54
|
+
if (inputAbortSignal?.aborted) {
|
|
55
|
+
abortController.abort();
|
|
56
|
+
}
|
|
57
|
+
else if (!abortSignal.aborted) {
|
|
58
|
+
inputAbortSignal?.addEventListener("abort", abortListener, {
|
|
59
|
+
once: true,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
let response;
|
|
63
|
+
try {
|
|
64
|
+
response = await client
|
|
65
|
+
.pathUnchecked(path ?? initialResponse.request.url)
|
|
66
|
+
.get({ abortSignal });
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
inputAbortSignal?.removeEventListener("abort", abortListener);
|
|
70
|
+
}
|
|
71
|
+
const lroResponse = getLroResponse(response);
|
|
72
|
+
lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
|
|
73
|
+
return lroResponse;
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
httpPollerOptions.resolveOnUnsuccessful = httpPollerOptions.resolveOnUnsuccessful ?? true;
|
|
77
|
+
const httpPoller = createHttpPoller(poller, httpPollerOptions);
|
|
78
|
+
const simplePoller = {
|
|
79
|
+
isDone() {
|
|
80
|
+
return httpPoller.isDone;
|
|
81
|
+
},
|
|
82
|
+
isStopped() {
|
|
83
|
+
return abortController.signal.aborted;
|
|
84
|
+
},
|
|
85
|
+
getOperationState() {
|
|
86
|
+
if (!httpPoller.operationState) {
|
|
87
|
+
throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
|
|
88
|
+
}
|
|
89
|
+
return httpPoller.operationState;
|
|
90
|
+
},
|
|
91
|
+
getResult() {
|
|
92
|
+
return httpPoller.result;
|
|
93
|
+
},
|
|
94
|
+
toString() {
|
|
95
|
+
if (!httpPoller.operationState) {
|
|
96
|
+
throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
|
|
97
|
+
}
|
|
98
|
+
return JSON.stringify({
|
|
99
|
+
state: httpPoller.operationState,
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
stopPolling() {
|
|
103
|
+
abortController.abort();
|
|
104
|
+
},
|
|
105
|
+
onProgress: httpPoller.onProgress,
|
|
106
|
+
poll: httpPoller.poll,
|
|
107
|
+
pollUntilDone: httpPoller.pollUntilDone,
|
|
108
|
+
serialize: httpPoller.serialize,
|
|
109
|
+
submitted: httpPoller.submitted,
|
|
110
|
+
};
|
|
111
|
+
return simplePoller;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
115
|
+
* @param response - a rest client http response
|
|
116
|
+
* @returns - An LRO response that the LRO implementation understands
|
|
117
|
+
*/
|
|
118
|
+
function getLroResponse(response) {
|
|
119
|
+
if (Number.isNaN(response.status)) {
|
|
120
|
+
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
flatResponse: response,
|
|
124
|
+
rawResponse: {
|
|
125
|
+
...response,
|
|
126
|
+
statusCode: Number.parseInt(response.status),
|
|
127
|
+
body: response.body,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
26
130
|
}
|
|
27
131
|
//# sourceMappingURL=pollingHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAsB3F,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAA8B,EAC9B,eAG+C;IAE/C,IAAI,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;QAClC,OAAO,uBAAuB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC1D,CAAC;SAAM,IAAI,iBAAiB,CAAC,eAAe,CAAC,EAAE,CAAC;QAC9C,OAAO,0BAA0B,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7D,CAAC;SAAM,IAAI,wBAAwB,CAAC,eAAe,CAAC,EAAE,CAAC;QACrD,OAAO,iCAAiC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,YAAY,CAAC,QAAa;IACjC,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAa;IACtC,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,wBAAwB,CAC/B,QAAa;IAEb,OAAO,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzureLoadTestingClient } from \"./clientDefinitions.js\";\nimport { getFileValidationPoller } from \"./getFileValidationPoller.js\";\nimport { getTestRunCompletionPoller } from \"./getTestRunCompletionPoller.js\";\nimport { getTestProfileRunCompletionPoller } from \"./getTestProfileRunCompletionPoller.js\";\nimport type {\n FileUploadAndValidatePoller,\n TestUploadFileSuccessResponse,\n TestRunCompletionPoller,\n TestRunCreateOrUpdateSuccessResponse,\n TestProfileRunCreateOrUpdateSuccessResponse,\n TestProfileRunCompletionPoller,\n} from \"./models.js\";\n\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestUploadFileSuccessResponse,\n): Promise<FileUploadAndValidatePoller>;\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestRunCreateOrUpdateSuccessResponse,\n): Promise<TestRunCompletionPoller>;\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestProfileRunCreateOrUpdateSuccessResponse,\n): Promise<TestProfileRunCompletionPoller>;\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse:\n | TestRunCreateOrUpdateSuccessResponse\n | TestUploadFileSuccessResponse\n | TestProfileRunCreateOrUpdateSuccessResponse,\n): Promise<TestRunCompletionPoller | FileUploadAndValidatePoller | TestProfileRunCompletionPoller> {\n if (isFileUpload(initialResponse)) {\n return getFileValidationPoller(client, initialResponse);\n } else if (isTestRunCreation(initialResponse)) {\n return getTestRunCompletionPoller(client, initialResponse);\n } else if (isTestProfileRunCreation(initialResponse)) {\n return getTestProfileRunCompletionPoller(client, initialResponse);\n }\n\n throw new Error(\"The Operation is not a long running operation.\");\n}\n\nfunction isFileUpload(response: any): response is TestUploadFileSuccessResponse {\n return response.request.url.includes(\"/files/\");\n}\n\nfunction isTestRunCreation(response: any): response is TestRunCreateOrUpdateSuccessResponse {\n return response.request.url.includes(\"/test-runs/\");\n}\n\nfunction isTestProfileRunCreation(\n response: any,\n): response is TestProfileRunCreateOrUpdateSuccessResponse {\n return response.request.url.includes(\"/test-profile-runs/\");\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAanD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AA6E3F,4BAA4B;AAC5B,SAAS,YAAY,CAAC,QAAsB;IAC1C,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACxC,8DAA8D;IAC9D,OAAO,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC;AAED,SAAS,iBAAiB,CACxB,QAAsB;IAEtB,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC;IAC5D,gCAAgC;IAChC,OAAO,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,MAAM,KAAK,OAAO,CAAC;AACnG,CAAC;AAED,SAAS,wBAAwB,CAC/B,QAAsB;IAEtB,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACxC,+CAA+C;IAC/C,OAAO,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAC7C,CAAC;AA2DD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAA8F,EAAE;IAEhG,iDAAiD;IACjD,IAAI,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;QAClC,OAAO,uBAAuB,CAC5B,MAAgC,EAChC,eAA2D,EAC3D,OAAiC,CAC+B,CAAC;IACrE,CAAC;IAED,IAAI,iBAAiB,CAAC,eAAe,CAAC,EAAE,CAAC;QACvC,OAAO,0BAA0B,CAC/B,MAAgC,EAChC,eAAkE,EAClE,OAAiC,CAC+B,CAAC;IACrE,CAAC;IAED,IAAI,wBAAwB,CAAC,eAAe,CAAC,EAAE,CAAC;QAC9C,OAAO,iCAAiC,CACtC,MAAgC,EAChC,eAAyE,EACzE,OAAiC,CAC+B,CAAC;IACrE,CAAC;IAED,MAAM,iBAAiB,GAAG,OAAoE,CAAC;IAE/F,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAY,EAAE,WAA+C,EAAE,EAAE;YACvF,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,SAAS,aAAa;gBACpB,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,CAAC;YACD,MAAM,gBAAgB,GAAG,WAAW,EAAE,WAAW,CAAC;YAClD,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC;YAC3C,IAAI,gBAAgB,EAAE,OAAO,EAAE,CAAC;gBAC9B,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,CAAC;iBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAChC,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE;oBACzD,IAAI,EAAE,IAAI;iBACX,CAAC,CAAC;YACL,CAAC;YACD,IAAI,QAAQ,CAAC;YACb,IAAI,CAAC;gBACH,QAAQ,GAAG,MAAM,MAAM;qBACpB,aAAa,CAAC,IAAI,IAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;qBAClD,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;YAC1B,CAAC;oBAAS,CAAC;gBACT,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YAChE,CAAC;YACD,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,iBAAiB,CAAC,qBAAqB,GAAG,iBAAiB,CAAC,qBAAqB,IAAI,IAAI,CAAC;IAC1F,MAAM,UAAU,GAAG,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC/D,MAAM,YAAY,GAAuD;QACvE,MAAM;YACJ,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,CAAC;QACD,SAAS;YACP,OAAO,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QACD,iBAAiB;YACf,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,4IAA4I,CAC7I,CAAC;YACJ,CAAC;YACD,OAAO,UAAU,CAAC,cAAc,CAAC;QACnC,CAAC;QACD,SAAS;YACP,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,CAAC;QACD,QAAQ;YACN,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,4IAA4I,CAC7I,CAAC;YACJ,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,cAAc;aACjC,CAAC,CAAC;QACL,CAAC;QACD,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;QACD,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,SAAS,EAAE,UAAU,CAAC,SAAS;KAChC,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE;YACX,GAAG,QAAQ;YACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\nimport type { AzureLoadTestingClient } from \"./clientDefinitions.js\";\nimport type {\n LoadTestAdministrationCloneTest202Response,\n LoadTestAdministrationCloneTestDefaultResponse,\n LoadTestAdministrationCloneTestLogicalResponse,\n LoadTestAdministrationGenerateTestPlanRecommendations202Response,\n LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse,\n LoadTestAdministrationGenerateTestPlanRecommendationsLogicalResponse,\n LoadTestRunGenerateInsights202Response,\n LoadTestRunGenerateInsightsDefaultResponse,\n LoadTestRunGenerateInsightsLogicalResponse,\n} from \"./responses.js\";\nimport { getFileValidationPoller } from \"./getFileValidationPoller.js\";\nimport { getTestRunCompletionPoller } from \"./getTestRunCompletionPoller.js\";\nimport { getTestProfileRunCompletionPoller } from \"./getTestProfileRunCompletionPoller.js\";\nimport type {\n FileUploadAndValidatePoller,\n TestUploadFileSuccessResponse,\n TestRunCompletionPoller,\n TestRunCreateOrUpdateSuccessResponse,\n TestProfileRunCreateOrUpdateSuccessResponse,\n TestProfileRunCompletionPoller,\n PolledOperationOptions,\n} from \"./models.js\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n// Helper for custom pollers\nfunction isFileUpload(response: HttpResponse): response is TestUploadFileSuccessResponse {\n const url = response.request?.url ?? \"\";\n // Match: /tests/{testId}/files/{fileName} but NOT /test-runs/\n return url.includes(\"/files/\") && url.includes(\"/tests/\") && !url.includes(\"/test-runs/\");\n}\n\nfunction isTestRunCreation(\n response: HttpResponse,\n): response is TestRunCreateOrUpdateSuccessResponse {\n const url = response.request?.url ?? \"\";\n const method = response.request?.method.toUpperCase() ?? \"\";\n // Match: /test-runs/{testRunId}\n return url.includes(\"/test-runs/\") && !url.includes(\"/test-profile-runs/\") && method === \"PATCH\";\n}\n\nfunction isTestProfileRunCreation(\n response: HttpResponse,\n): response is TestProfileRunCreateOrUpdateSuccessResponse {\n const url = response.request?.url ?? \"\";\n // Match: /test-profile-runs/{testProfileRunId}\n return url.includes(\"/test-profile-runs/\");\n}\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 */\n// Custom overload signatures\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestUploadFileSuccessResponse,\n polledOperationOptions?: PolledOperationOptions,\n): Promise<FileUploadAndValidatePoller>;\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestRunCreateOrUpdateSuccessResponse,\n polledOperationOptions?: PolledOperationOptions,\n): Promise<TestRunCompletionPoller>;\nexport async function getLongRunningPoller(\n client: AzureLoadTestingClient,\n initialResponse: TestProfileRunCreateOrUpdateSuccessResponse,\n polledOperationOptions?: PolledOperationOptions,\n): Promise<TestProfileRunCompletionPoller>;\nexport async function getLongRunningPoller<\n TResult extends\n | LoadTestAdministrationCloneTestLogicalResponse\n | LoadTestAdministrationCloneTestDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | LoadTestAdministrationCloneTest202Response\n | LoadTestAdministrationCloneTestDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | LoadTestAdministrationGenerateTestPlanRecommendationsLogicalResponse\n | LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | LoadTestAdministrationGenerateTestPlanRecommendations202Response\n | LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | LoadTestRunGenerateInsightsLogicalResponse\n | LoadTestRunGenerateInsightsDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | LoadTestRunGenerateInsights202Response\n | LoadTestRunGenerateInsightsDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\n\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> | PolledOperationOptions = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n // Route to custom pollers based on response type\n if (isFileUpload(initialResponse)) {\n return getFileValidationPoller(\n client as AzureLoadTestingClient,\n initialResponse as unknown as TestUploadFileSuccessResponse,\n options as PolledOperationOptions,\n ) as unknown as SimplePollerLike<OperationState<TResult>, TResult>;\n }\n\n if (isTestRunCreation(initialResponse)) {\n return getTestRunCompletionPoller(\n client as AzureLoadTestingClient,\n initialResponse as unknown as TestRunCreateOrUpdateSuccessResponse,\n options as PolledOperationOptions,\n ) as unknown as SimplePollerLike<OperationState<TResult>, TResult>;\n }\n\n if (isTestProfileRunCreation(initialResponse)) {\n return getTestProfileRunCompletionPoller(\n client as AzureLoadTestingClient,\n initialResponse as unknown as TestProfileRunCreateOrUpdateSuccessResponse,\n options as PolledOperationOptions,\n ) as unknown as SimplePollerLike<OperationState<TResult>, TResult>;\n }\n\n const httpPollerOptions = options as CreateHttpPollerOptions<TResult, OperationState<TResult>>;\n\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\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: string, pollOptions?: { abortSignal?: AbortSignalLike }) => {\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 function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\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 httpPollerOptions.resolveOnUnsuccessful = httpPollerOptions.resolveOnUnsuccessful ?? true;\n const httpPoller = createHttpPoller(poller, httpPollerOptions);\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState,\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted,\n };\n return simplePoller;\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<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"]}
|