@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.
Files changed (200) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +1 -1
  3. package/README.md +12 -13
  4. package/dist/browser/azureLoadTesting.js +14 -12
  5. package/dist/browser/azureLoadTesting.js.map +1 -1
  6. package/dist/browser/clientDefinitions.d.ts +66 -34
  7. package/dist/browser/clientDefinitions.js.map +1 -1
  8. package/dist/browser/getFileValidationPoller.js +16 -11
  9. package/dist/browser/getFileValidationPoller.js.map +1 -1
  10. package/dist/browser/getTestProfileRunCompletionPoller.js +16 -11
  11. package/dist/browser/getTestProfileRunCompletionPoller.js.map +1 -1
  12. package/dist/browser/getTestRunCompletionPoller.js +16 -11
  13. package/dist/browser/getTestRunCompletionPoller.js.map +1 -1
  14. package/dist/browser/index.d.ts +6 -6
  15. package/dist/browser/index.js +1 -7
  16. package/dist/browser/index.js.map +1 -1
  17. package/dist/browser/isUnexpected.d.ts +15 -9
  18. package/dist/browser/isUnexpected.js +21 -13
  19. package/dist/browser/isUnexpected.js.map +1 -1
  20. package/dist/browser/models.d.ts +205 -172
  21. package/dist/browser/models.js.map +1 -1
  22. package/dist/browser/outputModels.d.ts +290 -208
  23. package/dist/browser/outputModels.js.map +1 -1
  24. package/dist/browser/paginateHelper.js +43 -73
  25. package/dist/browser/paginateHelper.js.map +1 -1
  26. package/dist/browser/parameters.d.ts +107 -66
  27. package/dist/browser/parameters.js.map +1 -1
  28. package/dist/browser/pollingHelper.d.ts +82 -4
  29. package/dist/browser/pollingHelper.js +119 -15
  30. package/dist/browser/pollingHelper.js.map +1 -1
  31. package/dist/browser/responses.d.ts +234 -121
  32. package/dist/browser/responses.js.map +1 -1
  33. package/dist/commonjs/azureLoadTesting.js +53 -45
  34. package/dist/commonjs/azureLoadTesting.js.map +7 -1
  35. package/dist/commonjs/clientDefinitions.d.ts +66 -34
  36. package/dist/commonjs/clientDefinitions.js +15 -5
  37. package/dist/commonjs/clientDefinitions.js.map +7 -1
  38. package/dist/commonjs/getFileValidationPoller.js +151 -137
  39. package/dist/commonjs/getFileValidationPoller.js.map +7 -1
  40. package/dist/commonjs/getTestProfileRunCompletionPoller.js +139 -127
  41. package/dist/commonjs/getTestProfileRunCompletionPoller.js.map +7 -1
  42. package/dist/commonjs/getTestRunCompletionPoller.js +139 -125
  43. package/dist/commonjs/getTestRunCompletionPoller.js.map +7 -1
  44. package/dist/commonjs/index.d.ts +6 -6
  45. package/dist/commonjs/index.js +46 -20
  46. package/dist/commonjs/index.js.map +7 -1
  47. package/dist/commonjs/isUnexpected.d.ts +15 -9
  48. package/dist/commonjs/isUnexpected.js +118 -105
  49. package/dist/commonjs/isUnexpected.js.map +7 -1
  50. package/dist/commonjs/logger.js +28 -8
  51. package/dist/commonjs/logger.js.map +7 -1
  52. package/dist/commonjs/models.d.ts +205 -172
  53. package/dist/commonjs/models.js +15 -5
  54. package/dist/commonjs/models.js.map +7 -1
  55. package/dist/commonjs/outputModels.d.ts +290 -208
  56. package/dist/commonjs/outputModels.js +15 -5
  57. package/dist/commonjs/outputModels.js.map +7 -1
  58. package/dist/commonjs/paginateHelper.js +118 -158
  59. package/dist/commonjs/paginateHelper.js.map +7 -1
  60. package/dist/commonjs/parameters.d.ts +107 -66
  61. package/dist/commonjs/parameters.js +15 -5
  62. package/dist/commonjs/parameters.js.map +7 -1
  63. package/dist/commonjs/pollingHelper.d.ts +82 -4
  64. package/dist/commonjs/pollingHelper.js +143 -24
  65. package/dist/commonjs/pollingHelper.js.map +7 -1
  66. package/dist/commonjs/responses.d.ts +234 -121
  67. package/dist/commonjs/responses.js +15 -5
  68. package/dist/commonjs/responses.js.map +7 -1
  69. package/dist/commonjs/tsdoc-metadata.json +11 -11
  70. package/dist/commonjs/util/LROUtil.js +76 -54
  71. package/dist/commonjs/util/LROUtil.js.map +7 -1
  72. package/dist/esm/azureLoadTesting.js +32 -40
  73. package/dist/esm/azureLoadTesting.js.map +7 -1
  74. package/dist/esm/clientDefinitions.d.ts +66 -34
  75. package/dist/esm/clientDefinitions.js +0 -4
  76. package/dist/esm/clientDefinitions.js.map +7 -1
  77. package/dist/esm/getFileValidationPoller.js +126 -132
  78. package/dist/esm/getFileValidationPoller.js.map +7 -1
  79. package/dist/esm/getTestProfileRunCompletionPoller.js +114 -122
  80. package/dist/esm/getTestProfileRunCompletionPoller.js.map +7 -1
  81. package/dist/esm/getTestRunCompletionPoller.js +114 -120
  82. package/dist/esm/getTestRunCompletionPoller.js.map +7 -1
  83. package/dist/esm/index.d.ts +6 -6
  84. package/dist/esm/index.js +5 -11
  85. package/dist/esm/index.js.map +7 -1
  86. package/dist/esm/isUnexpected.d.ts +15 -9
  87. package/dist/esm/isUnexpected.js +96 -103
  88. package/dist/esm/isUnexpected.js.map +7 -1
  89. package/dist/esm/logger.js +4 -4
  90. package/dist/esm/logger.js.map +7 -1
  91. package/dist/esm/models.d.ts +205 -172
  92. package/dist/esm/models.js +0 -4
  93. package/dist/esm/models.js.map +7 -1
  94. package/dist/esm/outputModels.d.ts +290 -208
  95. package/dist/esm/outputModels.js +0 -4
  96. package/dist/esm/outputModels.js.map +7 -1
  97. package/dist/esm/paginateHelper.js +95 -155
  98. package/dist/esm/paginateHelper.js.map +7 -1
  99. package/dist/esm/parameters.d.ts +107 -66
  100. package/dist/esm/parameters.js +0 -4
  101. package/dist/esm/parameters.js.map +7 -1
  102. package/dist/esm/pollingHelper.d.ts +82 -4
  103. package/dist/esm/pollingHelper.js +117 -18
  104. package/dist/esm/pollingHelper.js.map +7 -1
  105. package/dist/esm/responses.d.ts +234 -121
  106. package/dist/esm/responses.js +0 -4
  107. package/dist/esm/responses.js.map +7 -1
  108. package/dist/esm/util/LROUtil.js +52 -50
  109. package/dist/esm/util/LROUtil.js.map +7 -1
  110. package/dist/react-native/azureLoadTesting.js +14 -12
  111. package/dist/react-native/azureLoadTesting.js.map +1 -1
  112. package/dist/react-native/clientDefinitions.d.ts +66 -34
  113. package/dist/react-native/clientDefinitions.js.map +1 -1
  114. package/dist/react-native/getFileValidationPoller.js +16 -11
  115. package/dist/react-native/getFileValidationPoller.js.map +1 -1
  116. package/dist/react-native/getTestProfileRunCompletionPoller.js +16 -11
  117. package/dist/react-native/getTestProfileRunCompletionPoller.js.map +1 -1
  118. package/dist/react-native/getTestRunCompletionPoller.js +16 -11
  119. package/dist/react-native/getTestRunCompletionPoller.js.map +1 -1
  120. package/dist/react-native/index.d.ts +6 -6
  121. package/dist/react-native/index.js +1 -7
  122. package/dist/react-native/index.js.map +1 -1
  123. package/dist/react-native/isUnexpected.d.ts +15 -9
  124. package/dist/react-native/isUnexpected.js +21 -13
  125. package/dist/react-native/isUnexpected.js.map +1 -1
  126. package/dist/react-native/models.d.ts +205 -172
  127. package/dist/react-native/models.js.map +1 -1
  128. package/dist/react-native/outputModels.d.ts +290 -208
  129. package/dist/react-native/outputModels.js.map +1 -1
  130. package/dist/react-native/paginateHelper.js +43 -73
  131. package/dist/react-native/paginateHelper.js.map +1 -1
  132. package/dist/react-native/parameters.d.ts +107 -66
  133. package/dist/react-native/parameters.js.map +1 -1
  134. package/dist/react-native/pollingHelper.d.ts +82 -4
  135. package/dist/react-native/pollingHelper.js +119 -15
  136. package/dist/react-native/pollingHelper.js.map +1 -1
  137. package/dist/react-native/responses.d.ts +234 -121
  138. package/dist/react-native/responses.js.map +1 -1
  139. package/package.json +69 -86
  140. package/review/{load-testing.api.md → load-testing-node.api.md} +420 -23
  141. package/dist/browser/azureLoadTesting.d.ts.map +0 -1
  142. package/dist/browser/clientDefinitions.d.ts.map +0 -1
  143. package/dist/browser/getFileValidationPoller.d.ts.map +0 -1
  144. package/dist/browser/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  145. package/dist/browser/getTestRunCompletionPoller.d.ts.map +0 -1
  146. package/dist/browser/index.d.ts.map +0 -1
  147. package/dist/browser/isUnexpected.d.ts.map +0 -1
  148. package/dist/browser/logger.d.ts.map +0 -1
  149. package/dist/browser/models.d.ts.map +0 -1
  150. package/dist/browser/outputModels.d.ts.map +0 -1
  151. package/dist/browser/paginateHelper.d.ts.map +0 -1
  152. package/dist/browser/parameters.d.ts.map +0 -1
  153. package/dist/browser/pollingHelper.d.ts.map +0 -1
  154. package/dist/browser/responses.d.ts.map +0 -1
  155. package/dist/browser/util/LROUtil.d.ts.map +0 -1
  156. package/dist/commonjs/azureLoadTesting.d.ts.map +0 -1
  157. package/dist/commonjs/clientDefinitions.d.ts.map +0 -1
  158. package/dist/commonjs/getFileValidationPoller.d.ts.map +0 -1
  159. package/dist/commonjs/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  160. package/dist/commonjs/getTestRunCompletionPoller.d.ts.map +0 -1
  161. package/dist/commonjs/index.d.ts.map +0 -1
  162. package/dist/commonjs/isUnexpected.d.ts.map +0 -1
  163. package/dist/commonjs/logger.d.ts.map +0 -1
  164. package/dist/commonjs/models.d.ts.map +0 -1
  165. package/dist/commonjs/outputModels.d.ts.map +0 -1
  166. package/dist/commonjs/paginateHelper.d.ts.map +0 -1
  167. package/dist/commonjs/parameters.d.ts.map +0 -1
  168. package/dist/commonjs/pollingHelper.d.ts.map +0 -1
  169. package/dist/commonjs/responses.d.ts.map +0 -1
  170. package/dist/commonjs/util/LROUtil.d.ts.map +0 -1
  171. package/dist/esm/azureLoadTesting.d.ts.map +0 -1
  172. package/dist/esm/clientDefinitions.d.ts.map +0 -1
  173. package/dist/esm/getFileValidationPoller.d.ts.map +0 -1
  174. package/dist/esm/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  175. package/dist/esm/getTestRunCompletionPoller.d.ts.map +0 -1
  176. package/dist/esm/index.d.ts.map +0 -1
  177. package/dist/esm/isUnexpected.d.ts.map +0 -1
  178. package/dist/esm/logger.d.ts.map +0 -1
  179. package/dist/esm/models.d.ts.map +0 -1
  180. package/dist/esm/outputModels.d.ts.map +0 -1
  181. package/dist/esm/paginateHelper.d.ts.map +0 -1
  182. package/dist/esm/parameters.d.ts.map +0 -1
  183. package/dist/esm/pollingHelper.d.ts.map +0 -1
  184. package/dist/esm/responses.d.ts.map +0 -1
  185. package/dist/esm/util/LROUtil.d.ts.map +0 -1
  186. package/dist/react-native/azureLoadTesting.d.ts.map +0 -1
  187. package/dist/react-native/clientDefinitions.d.ts.map +0 -1
  188. package/dist/react-native/getFileValidationPoller.d.ts.map +0 -1
  189. package/dist/react-native/getTestProfileRunCompletionPoller.d.ts.map +0 -1
  190. package/dist/react-native/getTestRunCompletionPoller.d.ts.map +0 -1
  191. package/dist/react-native/index.d.ts.map +0 -1
  192. package/dist/react-native/isUnexpected.d.ts.map +0 -1
  193. package/dist/react-native/logger.d.ts.map +0 -1
  194. package/dist/react-native/models.d.ts.map +0 -1
  195. package/dist/react-native/outputModels.d.ts.map +0 -1
  196. package/dist/react-native/paginateHelper.d.ts.map +0 -1
  197. package/dist/react-native/parameters.d.ts.map +0 -1
  198. package/dist/react-native/pollingHelper.d.ts.map +0 -1
  199. package/dist/react-native/responses.d.ts.map +0 -1
  200. package/dist/react-native/util/LROUtil.d.ts.map +0 -1
@@ -1,6 +1,10 @@
1
- import type { LoadTestAdministrationCreateOrUpdateTestParameters, LoadTestAdministrationDeleteTestParameters, LoadTestAdministrationGetTestParameters, LoadTestAdministrationListTestsParameters, LoadTestAdministrationUploadTestFileParameters, LoadTestAdministrationGetTestFileParameters, LoadTestAdministrationDeleteTestFileParameters, LoadTestAdministrationListTestFilesParameters, LoadTestAdministrationCreateOrUpdateAppComponentsParameters, LoadTestAdministrationGetAppComponentsParameters, LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters, LoadTestAdministrationGetServerMetricsConfigParameters, TestProfileAdministrationCreateOrUpdateTestProfileParameters, TestProfileAdministrationDeleteTestProfileParameters, TestProfileAdministrationGetTestProfileParameters, TestProfileAdministrationListTestProfilesParameters, LoadTestRunGetTestRunParameters, LoadTestRunCreateOrUpdateTestRunParameters, LoadTestRunDeleteTestRunParameters, LoadTestRunListTestRunsParameters, LoadTestRunGetTestRunFileParameters, LoadTestRunStopParameters, LoadTestRunListMetricNamespacesParameters, LoadTestRunListMetricDefinitionsParameters, LoadTestRunListMetricsParameters, LoadTestRunListMetricDimensionValuesParameters, LoadTestRunCreateOrUpdateAppComponentsParameters, LoadTestRunGetAppComponentsParameters, LoadTestRunCreateOrUpdateServerMetricsConfigParameters, LoadTestRunGetServerMetricsConfigParameters, TestProfileRunAdministrationGetTestProfileRunParameters, TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters, TestProfileRunAdministrationDeleteTestProfileRunParameters, TestProfileRunAdministrationStopParameters, TestProfileRunAdministrationListTestProfileRunsParameters, TriggerAdministrationGetTriggerParameters, TriggerAdministrationCreateOrUpdateTriggerParameters, TriggerAdministrationDeleteTriggerParameters, TriggerAdministrationListTriggerParameters, NotificationRuleAdministrationGetNotificationRuleParameters, NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters, NotificationRuleAdministrationDeleteNotificationRuleParameters, NotificationRuleAdministrationListNotificationRuleParameters } from "./parameters.js";
2
- import type { LoadTestAdministrationCreateOrUpdateTest200Response, LoadTestAdministrationCreateOrUpdateTest201Response, LoadTestAdministrationCreateOrUpdateTestDefaultResponse, LoadTestAdministrationDeleteTest204Response, LoadTestAdministrationDeleteTestDefaultResponse, LoadTestAdministrationGetTest200Response, LoadTestAdministrationGetTestDefaultResponse, LoadTestAdministrationListTests200Response, LoadTestAdministrationListTestsDefaultResponse, LoadTestAdministrationUploadTestFile201Response, LoadTestAdministrationUploadTestFileDefaultResponse, LoadTestAdministrationGetTestFile200Response, LoadTestAdministrationGetTestFileDefaultResponse, LoadTestAdministrationDeleteTestFile204Response, LoadTestAdministrationDeleteTestFileDefaultResponse, LoadTestAdministrationListTestFiles200Response, LoadTestAdministrationListTestFilesDefaultResponse, LoadTestAdministrationCreateOrUpdateAppComponents200Response, LoadTestAdministrationCreateOrUpdateAppComponents201Response, LoadTestAdministrationCreateOrUpdateAppComponentsDefaultResponse, LoadTestAdministrationGetAppComponents200Response, LoadTestAdministrationGetAppComponentsDefaultResponse, LoadTestAdministrationCreateOrUpdateServerMetricsConfig200Response, LoadTestAdministrationCreateOrUpdateServerMetricsConfig201Response, LoadTestAdministrationCreateOrUpdateServerMetricsConfigDefaultResponse, LoadTestAdministrationGetServerMetricsConfig200Response, LoadTestAdministrationGetServerMetricsConfigDefaultResponse, TestProfileAdministrationCreateOrUpdateTestProfile200Response, TestProfileAdministrationCreateOrUpdateTestProfile201Response, TestProfileAdministrationCreateOrUpdateTestProfileDefaultResponse, TestProfileAdministrationDeleteTestProfile204Response, TestProfileAdministrationDeleteTestProfileDefaultResponse, TestProfileAdministrationGetTestProfile200Response, TestProfileAdministrationGetTestProfileDefaultResponse, TestProfileAdministrationListTestProfiles200Response, TestProfileAdministrationListTestProfilesDefaultResponse, LoadTestRunGetTestRun200Response, LoadTestRunGetTestRunDefaultResponse, LoadTestRunCreateOrUpdateTestRun200Response, LoadTestRunCreateOrUpdateTestRun201Response, LoadTestRunCreateOrUpdateTestRunDefaultResponse, LoadTestRunDeleteTestRun204Response, LoadTestRunDeleteTestRunDefaultResponse, LoadTestRunListTestRuns200Response, LoadTestRunListTestRunsDefaultResponse, LoadTestRunGetTestRunFile200Response, LoadTestRunGetTestRunFileDefaultResponse, LoadTestRunStop200Response, LoadTestRunStopDefaultResponse, LoadTestRunListMetricNamespaces200Response, LoadTestRunListMetricNamespacesDefaultResponse, LoadTestRunListMetricDefinitions200Response, LoadTestRunListMetricDefinitionsDefaultResponse, LoadTestRunListMetrics200Response, LoadTestRunListMetricsDefaultResponse, LoadTestRunListMetricDimensionValues200Response, LoadTestRunListMetricDimensionValuesDefaultResponse, LoadTestRunCreateOrUpdateAppComponents200Response, LoadTestRunCreateOrUpdateAppComponents201Response, LoadTestRunCreateOrUpdateAppComponentsDefaultResponse, LoadTestRunGetAppComponents200Response, LoadTestRunGetAppComponentsDefaultResponse, LoadTestRunCreateOrUpdateServerMetricsConfig200Response, LoadTestRunCreateOrUpdateServerMetricsConfig201Response, LoadTestRunCreateOrUpdateServerMetricsConfigDefaultResponse, LoadTestRunGetServerMetricsConfig200Response, LoadTestRunGetServerMetricsConfigDefaultResponse, TestProfileRunAdministrationGetTestProfileRun200Response, TestProfileRunAdministrationGetTestProfileRunDefaultResponse, TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRunDefaultResponse, TestProfileRunAdministrationDeleteTestProfileRun204Response, TestProfileRunAdministrationDeleteTestProfileRunDefaultResponse, TestProfileRunAdministrationStop200Response, TestProfileRunAdministrationStopDefaultResponse, TestProfileRunAdministrationListTestProfileRuns200Response, TestProfileRunAdministrationListTestProfileRunsDefaultResponse, TriggerAdministrationGetTrigger200Response, TriggerAdministrationGetTriggerDefaultResponse, TriggerAdministrationCreateOrUpdateTrigger200Response, TriggerAdministrationCreateOrUpdateTrigger201Response, TriggerAdministrationCreateOrUpdateTriggerDefaultResponse, TriggerAdministrationDeleteTrigger204Response, TriggerAdministrationDeleteTriggerDefaultResponse, TriggerAdministrationListTrigger200Response, TriggerAdministrationListTriggerDefaultResponse, NotificationRuleAdministrationGetNotificationRule200Response, NotificationRuleAdministrationGetNotificationRuleDefaultResponse, NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response, NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response, NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse, NotificationRuleAdministrationDeleteNotificationRule204Response, NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse, NotificationRuleAdministrationListNotificationRule200Response, NotificationRuleAdministrationListNotificationRuleDefaultResponse } from "./responses.js";
1
+ import type { OperationsGetStatusParameters, LoadTestAdministrationCreateOrUpdateTestParameters, LoadTestAdministrationDeleteTestParameters, LoadTestAdministrationGetTestParameters, LoadTestAdministrationListTestsParameters, LoadTestAdministrationCloneTestParameters, LoadTestAdministrationGenerateTestPlanRecommendationsParameters, LoadTestAdministrationUploadTestFileParameters, LoadTestAdministrationGetTestFileParameters, LoadTestAdministrationDeleteTestFileParameters, LoadTestAdministrationListTestFilesParameters, LoadTestAdministrationCreateOrUpdateAppComponentsParameters, LoadTestAdministrationGetAppComponentsParameters, LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters, LoadTestAdministrationGetServerMetricsConfigParameters, TestProfileAdministrationCreateOrUpdateTestProfileParameters, TestProfileAdministrationDeleteTestProfileParameters, TestProfileAdministrationGetTestProfileParameters, TestProfileAdministrationListTestProfilesParameters, TriggerAdministrationGetTriggerParameters, TriggerAdministrationCreateOrUpdateTriggerParameters, TriggerAdministrationDeleteTriggerParameters, TriggerAdministrationListTriggerParameters, NotificationRuleAdministrationGetNotificationRuleParameters, NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters, NotificationRuleAdministrationDeleteNotificationRuleParameters, NotificationRuleAdministrationListNotificationRuleParameters, LoadTestRunGetTestRunParameters, LoadTestRunCreateOrUpdateTestRunParameters, LoadTestRunDeleteTestRunParameters, LoadTestRunListTestRunsParameters, LoadTestRunGetTestRunFileParameters, LoadTestRunStopParameters, LoadTestRunGetLatestInsightsParameters, LoadTestRunUpdateLatestInsightsParameters, LoadTestRunGenerateInsightsParameters, LoadTestRunListMetricNamespacesParameters, LoadTestRunListMetricDefinitionsParameters, LoadTestRunListMetricsParameters, LoadTestRunListMetricDimensionValuesParameters, LoadTestRunCreateOrUpdateAppComponentsParameters, LoadTestRunGetAppComponentsParameters, LoadTestRunCreateOrUpdateServerMetricsConfigParameters, LoadTestRunGetServerMetricsConfigParameters, TestProfileRunAdministrationGetTestProfileRunParameters, TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters, TestProfileRunAdministrationDeleteTestProfileRunParameters, TestProfileRunAdministrationStopParameters, TestProfileRunAdministrationListTestProfileRunsParameters } from "./parameters.js";
2
+ import type { OperationsGetStatus200Response, OperationsGetStatusDefaultResponse, LoadTestAdministrationCreateOrUpdateTest200Response, LoadTestAdministrationCreateOrUpdateTest201Response, LoadTestAdministrationCreateOrUpdateTestDefaultResponse, LoadTestAdministrationDeleteTest204Response, LoadTestAdministrationDeleteTestDefaultResponse, LoadTestAdministrationGetTest200Response, LoadTestAdministrationGetTestDefaultResponse, LoadTestAdministrationListTests200Response, LoadTestAdministrationListTestsDefaultResponse, LoadTestAdministrationCloneTest202Response, LoadTestAdministrationCloneTestDefaultResponse, LoadTestAdministrationGenerateTestPlanRecommendations202Response, LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse, LoadTestAdministrationUploadTestFile201Response, LoadTestAdministrationUploadTestFileDefaultResponse, LoadTestAdministrationGetTestFile200Response, LoadTestAdministrationGetTestFileDefaultResponse, LoadTestAdministrationDeleteTestFile204Response, LoadTestAdministrationDeleteTestFileDefaultResponse, LoadTestAdministrationListTestFiles200Response, LoadTestAdministrationListTestFilesDefaultResponse, LoadTestAdministrationCreateOrUpdateAppComponents200Response, LoadTestAdministrationCreateOrUpdateAppComponents201Response, LoadTestAdministrationCreateOrUpdateAppComponentsDefaultResponse, LoadTestAdministrationGetAppComponents200Response, LoadTestAdministrationGetAppComponentsDefaultResponse, LoadTestAdministrationCreateOrUpdateServerMetricsConfig200Response, LoadTestAdministrationCreateOrUpdateServerMetricsConfig201Response, LoadTestAdministrationCreateOrUpdateServerMetricsConfigDefaultResponse, LoadTestAdministrationGetServerMetricsConfig200Response, LoadTestAdministrationGetServerMetricsConfigDefaultResponse, TestProfileAdministrationCreateOrUpdateTestProfile200Response, TestProfileAdministrationCreateOrUpdateTestProfile201Response, TestProfileAdministrationCreateOrUpdateTestProfileDefaultResponse, TestProfileAdministrationDeleteTestProfile204Response, TestProfileAdministrationDeleteTestProfileDefaultResponse, TestProfileAdministrationGetTestProfile200Response, TestProfileAdministrationGetTestProfileDefaultResponse, TestProfileAdministrationListTestProfiles200Response, TestProfileAdministrationListTestProfilesDefaultResponse, TriggerAdministrationGetTrigger200Response, TriggerAdministrationGetTriggerDefaultResponse, TriggerAdministrationCreateOrUpdateTrigger200Response, TriggerAdministrationCreateOrUpdateTrigger201Response, TriggerAdministrationCreateOrUpdateTriggerDefaultResponse, TriggerAdministrationDeleteTrigger204Response, TriggerAdministrationDeleteTriggerDefaultResponse, TriggerAdministrationListTrigger200Response, TriggerAdministrationListTriggerDefaultResponse, NotificationRuleAdministrationGetNotificationRule200Response, NotificationRuleAdministrationGetNotificationRuleDefaultResponse, NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response, NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response, NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse, NotificationRuleAdministrationDeleteNotificationRule204Response, NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse, NotificationRuleAdministrationListNotificationRule200Response, NotificationRuleAdministrationListNotificationRuleDefaultResponse, LoadTestRunGetTestRun200Response, LoadTestRunGetTestRunDefaultResponse, LoadTestRunCreateOrUpdateTestRun200Response, LoadTestRunCreateOrUpdateTestRun201Response, LoadTestRunCreateOrUpdateTestRunDefaultResponse, LoadTestRunDeleteTestRun204Response, LoadTestRunDeleteTestRunDefaultResponse, LoadTestRunListTestRuns200Response, LoadTestRunListTestRunsDefaultResponse, LoadTestRunGetTestRunFile200Response, LoadTestRunGetTestRunFileDefaultResponse, LoadTestRunStop200Response, LoadTestRunStopDefaultResponse, LoadTestRunGetLatestInsights200Response, LoadTestRunGetLatestInsightsDefaultResponse, LoadTestRunUpdateLatestInsights200Response, LoadTestRunUpdateLatestInsightsDefaultResponse, LoadTestRunGenerateInsights202Response, LoadTestRunGenerateInsightsDefaultResponse, LoadTestRunListMetricNamespaces200Response, LoadTestRunListMetricNamespacesDefaultResponse, LoadTestRunListMetricDefinitions200Response, LoadTestRunListMetricDefinitionsDefaultResponse, LoadTestRunListMetrics200Response, LoadTestRunListMetricsDefaultResponse, LoadTestRunListMetricDimensionValues200Response, LoadTestRunListMetricDimensionValuesDefaultResponse, LoadTestRunCreateOrUpdateAppComponents200Response, LoadTestRunCreateOrUpdateAppComponents201Response, LoadTestRunCreateOrUpdateAppComponentsDefaultResponse, LoadTestRunGetAppComponents200Response, LoadTestRunGetAppComponentsDefaultResponse, LoadTestRunCreateOrUpdateServerMetricsConfig200Response, LoadTestRunCreateOrUpdateServerMetricsConfig201Response, LoadTestRunCreateOrUpdateServerMetricsConfigDefaultResponse, LoadTestRunGetServerMetricsConfig200Response, LoadTestRunGetServerMetricsConfigDefaultResponse, TestProfileRunAdministrationGetTestProfileRun200Response, TestProfileRunAdministrationGetTestProfileRunDefaultResponse, TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response, TestProfileRunAdministrationCreateOrUpdateTestProfileRunDefaultResponse, TestProfileRunAdministrationDeleteTestProfileRun204Response, TestProfileRunAdministrationDeleteTestProfileRunDefaultResponse, TestProfileRunAdministrationStop200Response, TestProfileRunAdministrationStopDefaultResponse, TestProfileRunAdministrationListTestProfileRuns200Response, TestProfileRunAdministrationListTestProfileRunsDefaultResponse } from "./responses.js";
3
3
  import type { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface OperationsGetStatus {
5
+ /** Get the status of a long running operation. */
6
+ get(options?: OperationsGetStatusParameters): StreamableMethod<OperationsGetStatus200Response | OperationsGetStatusDefaultResponse>;
7
+ }
4
8
  export interface LoadTestAdministrationCreateOrUpdateTest {
5
9
  /** Create a new test or update an existing test by providing the test Id. */
6
10
  patch(options: LoadTestAdministrationCreateOrUpdateTestParameters): StreamableMethod<LoadTestAdministrationCreateOrUpdateTest200Response | LoadTestAdministrationCreateOrUpdateTest201Response | LoadTestAdministrationCreateOrUpdateTestDefaultResponse>;
@@ -16,6 +20,14 @@ export interface LoadTestAdministrationListTests {
16
20
  */
17
21
  get(options?: LoadTestAdministrationListTestsParameters): StreamableMethod<LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsDefaultResponse>;
18
22
  }
23
+ export interface LoadTestAdministrationCloneTest {
24
+ /** Clone the given test with optional overrides applied to the clone test. */
25
+ post(options: LoadTestAdministrationCloneTestParameters): StreamableMethod<LoadTestAdministrationCloneTest202Response | LoadTestAdministrationCloneTestDefaultResponse>;
26
+ }
27
+ export interface LoadTestAdministrationGenerateTestPlanRecommendations {
28
+ /** Generate AI Recommendations to author a load test plan using the uploaded browser recording file. */
29
+ post(options?: LoadTestAdministrationGenerateTestPlanRecommendationsParameters): StreamableMethod<LoadTestAdministrationGenerateTestPlanRecommendations202Response | LoadTestAdministrationGenerateTestPlanRecommendationsDefaultResponse>;
30
+ }
19
31
  export interface LoadTestAdministrationUploadTestFile {
20
32
  /**
21
33
  * Upload input file for a given test Id. File size can't be more than 50 MB.
@@ -56,6 +68,30 @@ export interface TestProfileAdministrationListTestProfiles {
56
68
  /** Get all test profiles for the given filters. */
57
69
  get(options?: TestProfileAdministrationListTestProfilesParameters): StreamableMethod<TestProfileAdministrationListTestProfiles200Response | TestProfileAdministrationListTestProfilesDefaultResponse>;
58
70
  }
71
+ export interface TriggerAdministrationGetTrigger {
72
+ /** Resource read operation template. */
73
+ get(options?: TriggerAdministrationGetTriggerParameters): StreamableMethod<TriggerAdministrationGetTrigger200Response | TriggerAdministrationGetTriggerDefaultResponse>;
74
+ /** Create or update operation template. */
75
+ patch(options: TriggerAdministrationCreateOrUpdateTriggerParameters): StreamableMethod<TriggerAdministrationCreateOrUpdateTrigger200Response | TriggerAdministrationCreateOrUpdateTrigger201Response | TriggerAdministrationCreateOrUpdateTriggerDefaultResponse>;
76
+ /** Resource delete operation template. */
77
+ delete(options?: TriggerAdministrationDeleteTriggerParameters): StreamableMethod<TriggerAdministrationDeleteTrigger204Response | TriggerAdministrationDeleteTriggerDefaultResponse>;
78
+ }
79
+ export interface TriggerAdministrationListTrigger {
80
+ /** Resource list operation template. */
81
+ get(options?: TriggerAdministrationListTriggerParameters): StreamableMethod<TriggerAdministrationListTrigger200Response | TriggerAdministrationListTriggerDefaultResponse>;
82
+ }
83
+ export interface NotificationRuleAdministrationGetNotificationRule {
84
+ /** Resource read operation template. */
85
+ get(options?: NotificationRuleAdministrationGetNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationGetNotificationRule200Response | NotificationRuleAdministrationGetNotificationRuleDefaultResponse>;
86
+ /** Create or update operation template. */
87
+ patch(options: NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response | NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response | NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse>;
88
+ /** Resource delete operation template. */
89
+ delete(options?: NotificationRuleAdministrationDeleteNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationDeleteNotificationRule204Response | NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse>;
90
+ }
91
+ export interface NotificationRuleAdministrationListNotificationRule {
92
+ /** Resource list operation template. */
93
+ get(options?: NotificationRuleAdministrationListNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationListNotificationRule200Response | NotificationRuleAdministrationListNotificationRuleDefaultResponse>;
94
+ }
59
95
  export interface LoadTestRunGetTestRun {
60
96
  /** Get test run details by test run Id. */
61
97
  get(options?: LoadTestRunGetTestRunParameters): StreamableMethod<LoadTestRunGetTestRun200Response | LoadTestRunGetTestRunDefaultResponse>;
@@ -76,6 +112,16 @@ export interface LoadTestRunStop {
76
112
  /** Stop test run by test run Id. */
77
113
  post(options?: LoadTestRunStopParameters): StreamableMethod<LoadTestRunStop200Response | LoadTestRunStopDefaultResponse>;
78
114
  }
115
+ export interface LoadTestRunGetLatestInsights {
116
+ /** Get the latest insights for the test run. */
117
+ get(options?: LoadTestRunGetLatestInsightsParameters): StreamableMethod<LoadTestRunGetLatestInsights200Response | LoadTestRunGetLatestInsightsDefaultResponse>;
118
+ /** Update the latest insights for the test run. */
119
+ patch(options: LoadTestRunUpdateLatestInsightsParameters): StreamableMethod<LoadTestRunUpdateLatestInsights200Response | LoadTestRunUpdateLatestInsightsDefaultResponse>;
120
+ }
121
+ export interface LoadTestRunGenerateInsights {
122
+ /** Generate insights for the test run. */
123
+ post(options?: LoadTestRunGenerateInsightsParameters): StreamableMethod<LoadTestRunGenerateInsights202Response | LoadTestRunGenerateInsightsDefaultResponse>;
124
+ }
79
125
  export interface LoadTestRunListMetricNamespaces {
80
126
  /** List the metric namespaces for a load test run. */
81
127
  get(options?: LoadTestRunListMetricNamespacesParameters): StreamableMethod<LoadTestRunListMetricNamespaces200Response | LoadTestRunListMetricNamespacesDefaultResponse>;
@@ -123,35 +169,17 @@ export interface TestProfileRunAdministrationListTestProfileRuns {
123
169
  /** Get all test profile runs for the given filters. */
124
170
  get(options?: TestProfileRunAdministrationListTestProfileRunsParameters): StreamableMethod<TestProfileRunAdministrationListTestProfileRuns200Response | TestProfileRunAdministrationListTestProfileRunsDefaultResponse>;
125
171
  }
126
- export interface TriggerAdministrationGetTrigger {
127
- /** Resource read operation template. */
128
- get(options?: TriggerAdministrationGetTriggerParameters): StreamableMethod<TriggerAdministrationGetTrigger200Response | TriggerAdministrationGetTriggerDefaultResponse>;
129
- /** Create or update operation template. */
130
- patch(options: TriggerAdministrationCreateOrUpdateTriggerParameters): StreamableMethod<TriggerAdministrationCreateOrUpdateTrigger200Response | TriggerAdministrationCreateOrUpdateTrigger201Response | TriggerAdministrationCreateOrUpdateTriggerDefaultResponse>;
131
- /** Resource delete operation template. */
132
- delete(options?: TriggerAdministrationDeleteTriggerParameters): StreamableMethod<TriggerAdministrationDeleteTrigger204Response | TriggerAdministrationDeleteTriggerDefaultResponse>;
133
- }
134
- export interface TriggerAdministrationListTrigger {
135
- /** Resource list operation template. */
136
- get(options?: TriggerAdministrationListTriggerParameters): StreamableMethod<TriggerAdministrationListTrigger200Response | TriggerAdministrationListTriggerDefaultResponse>;
137
- }
138
- export interface NotificationRuleAdministrationGetNotificationRule {
139
- /** Resource read operation template. */
140
- get(options?: NotificationRuleAdministrationGetNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationGetNotificationRule200Response | NotificationRuleAdministrationGetNotificationRuleDefaultResponse>;
141
- /** Create or update operation template. */
142
- patch(options: NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response | NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response | NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse>;
143
- /** Resource delete operation template. */
144
- delete(options?: NotificationRuleAdministrationDeleteNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationDeleteNotificationRule204Response | NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse>;
145
- }
146
- export interface NotificationRuleAdministrationListNotificationRule {
147
- /** Resource list operation template. */
148
- get(options?: NotificationRuleAdministrationListNotificationRuleParameters): StreamableMethod<NotificationRuleAdministrationListNotificationRule200Response | NotificationRuleAdministrationListNotificationRuleDefaultResponse>;
149
- }
150
172
  export interface Routes {
173
+ /** Resource for '/operations/\{operationId\}' has methods for the following verbs: get */
174
+ (path: "/operations/{operationId}", operationId: string): OperationsGetStatus;
151
175
  /** Resource for '/tests/\{testId\}' has methods for the following verbs: patch, delete, get */
152
176
  (path: "/tests/{testId}", testId: string): LoadTestAdministrationCreateOrUpdateTest;
153
177
  /** Resource for '/tests' has methods for the following verbs: get */
154
178
  (path: "/tests"): LoadTestAdministrationListTests;
179
+ /** Resource for '/tests/\{testId\}:clone' has methods for the following verbs: post */
180
+ (path: "/tests/{testId}:clone", testId: string): LoadTestAdministrationCloneTest;
181
+ /** Resource for '/tests/\{testId\}:generateTestPlanRecommendations' has methods for the following verbs: post */
182
+ (path: "/tests/{testId}:generateTestPlanRecommendations", testId: string): LoadTestAdministrationGenerateTestPlanRecommendations;
155
183
  /** Resource for '/tests/\{testId\}/files/\{fileName\}' has methods for the following verbs: put, get, delete */
156
184
  (path: "/tests/{testId}/files/{fileName}", testId: string, fileName: string): LoadTestAdministrationUploadTestFile;
157
185
  /** Resource for '/tests/\{testId\}/files' has methods for the following verbs: get */
@@ -164,6 +192,14 @@ export interface Routes {
164
192
  (path: "/test-profiles/{testProfileId}", testProfileId: string): TestProfileAdministrationCreateOrUpdateTestProfile;
165
193
  /** Resource for '/test-profiles' has methods for the following verbs: get */
166
194
  (path: "/test-profiles"): TestProfileAdministrationListTestProfiles;
195
+ /** Resource for '/triggers/\{triggerId\}' has methods for the following verbs: get, patch, delete */
196
+ (path: "/triggers/{triggerId}", triggerId: string): TriggerAdministrationGetTrigger;
197
+ /** Resource for '/triggers' has methods for the following verbs: get */
198
+ (path: "/triggers"): TriggerAdministrationListTrigger;
199
+ /** Resource for '/notification-rules/\{notificationRuleId\}' has methods for the following verbs: get, patch, delete */
200
+ (path: "/notification-rules/{notificationRuleId}", notificationRuleId: string): NotificationRuleAdministrationGetNotificationRule;
201
+ /** Resource for '/notification-rules' has methods for the following verbs: get */
202
+ (path: "/notification-rules"): NotificationRuleAdministrationListNotificationRule;
167
203
  /** Resource for '/test-runs/\{testRunId\}' has methods for the following verbs: get, patch, delete */
168
204
  (path: "/test-runs/{testRunId}", testRunId: string): LoadTestRunGetTestRun;
169
205
  /** Resource for '/test-runs' has methods for the following verbs: get */
@@ -172,6 +208,10 @@ export interface Routes {
172
208
  (path: "/test-runs/{testRunId}/files/{fileName}", testRunId: string, fileName: string): LoadTestRunGetTestRunFile;
173
209
  /** Resource for '/test-runs/\{testRunId\}:stop' has methods for the following verbs: post */
174
210
  (path: "/test-runs/{testRunId}:stop", testRunId: string): LoadTestRunStop;
211
+ /** Resource for '/test-runs/\{testRunId\}/insights/latest' has methods for the following verbs: get, patch */
212
+ (path: "/test-runs/{testRunId}/insights/latest", testRunId: string): LoadTestRunGetLatestInsights;
213
+ /** Resource for '/test-runs/\{testRunId\}/insights:generate' has methods for the following verbs: post */
214
+ (path: "/test-runs/{testRunId}/insights:generate", testRunId: string): LoadTestRunGenerateInsights;
175
215
  /** Resource for '/test-runs/\{testRunId\}/metric-namespaces' has methods for the following verbs: get */
176
216
  (path: "/test-runs/{testRunId}/metric-namespaces", testRunId: string): LoadTestRunListMetricNamespaces;
177
217
  /** Resource for '/test-runs/\{testRunId\}/metric-definitions' has methods for the following verbs: get */
@@ -190,14 +230,6 @@ export interface Routes {
190
230
  (path: "/test-profile-runs/{testProfileRunId}:stop", testProfileRunId: string): TestProfileRunAdministrationStop;
191
231
  /** Resource for '/test-profile-runs' has methods for the following verbs: get */
192
232
  (path: "/test-profile-runs"): TestProfileRunAdministrationListTestProfileRuns;
193
- /** Resource for '/triggers/\{triggerId\}' has methods for the following verbs: get, patch, delete */
194
- (path: "/triggers/{triggerId}", triggerId: string): TriggerAdministrationGetTrigger;
195
- /** Resource for '/triggers' has methods for the following verbs: get */
196
- (path: "/triggers"): TriggerAdministrationListTrigger;
197
- /** Resource for '/notification-rules/\{notificationRuleId\}' has methods for the following verbs: get, patch, delete */
198
- (path: "/notification-rules/{notificationRuleId}", notificationRuleId: string): NotificationRuleAdministrationGetNotificationRule;
199
- /** Resource for '/notification-rules' has methods for the following verbs: get */
200
- (path: "/notification-rules"): NotificationRuleAdministrationListNotificationRule;
201
233
  }
202
234
  export type AzureLoadTestingClient = Client & {
203
235
  path: Routes;
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export {};
4
- //# sourceMappingURL=clientDefinitions.js.map
@@ -1 +1,7 @@
1
- {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n LoadTestAdministrationCreateOrUpdateTestParameters,\n LoadTestAdministrationDeleteTestParameters,\n LoadTestAdministrationGetTestParameters,\n LoadTestAdministrationListTestsParameters,\n LoadTestAdministrationUploadTestFileParameters,\n LoadTestAdministrationGetTestFileParameters,\n LoadTestAdministrationDeleteTestFileParameters,\n LoadTestAdministrationListTestFilesParameters,\n LoadTestAdministrationCreateOrUpdateAppComponentsParameters,\n LoadTestAdministrationGetAppComponentsParameters,\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters,\n LoadTestAdministrationGetServerMetricsConfigParameters,\n TestProfileAdministrationCreateOrUpdateTestProfileParameters,\n TestProfileAdministrationDeleteTestProfileParameters,\n TestProfileAdministrationGetTestProfileParameters,\n TestProfileAdministrationListTestProfilesParameters,\n LoadTestRunGetTestRunParameters,\n LoadTestRunCreateOrUpdateTestRunParameters,\n LoadTestRunDeleteTestRunParameters,\n LoadTestRunListTestRunsParameters,\n LoadTestRunGetTestRunFileParameters,\n LoadTestRunStopParameters,\n LoadTestRunListMetricNamespacesParameters,\n LoadTestRunListMetricDefinitionsParameters,\n LoadTestRunListMetricsParameters,\n LoadTestRunListMetricDimensionValuesParameters,\n LoadTestRunCreateOrUpdateAppComponentsParameters,\n LoadTestRunGetAppComponentsParameters,\n LoadTestRunCreateOrUpdateServerMetricsConfigParameters,\n LoadTestRunGetServerMetricsConfigParameters,\n TestProfileRunAdministrationGetTestProfileRunParameters,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters,\n TestProfileRunAdministrationDeleteTestProfileRunParameters,\n TestProfileRunAdministrationStopParameters,\n TestProfileRunAdministrationListTestProfileRunsParameters,\n TriggerAdministrationGetTriggerParameters,\n TriggerAdministrationCreateOrUpdateTriggerParameters,\n TriggerAdministrationDeleteTriggerParameters,\n TriggerAdministrationListTriggerParameters,\n NotificationRuleAdministrationGetNotificationRuleParameters,\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters,\n NotificationRuleAdministrationDeleteNotificationRuleParameters,\n NotificationRuleAdministrationListNotificationRuleParameters,\n} from \"./parameters.js\";\nimport type {\n LoadTestAdministrationCreateOrUpdateTest200Response,\n LoadTestAdministrationCreateOrUpdateTest201Response,\n LoadTestAdministrationCreateOrUpdateTestDefaultResponse,\n LoadTestAdministrationDeleteTest204Response,\n LoadTestAdministrationDeleteTestDefaultResponse,\n LoadTestAdministrationGetTest200Response,\n LoadTestAdministrationGetTestDefaultResponse,\n LoadTestAdministrationListTests200Response,\n LoadTestAdministrationListTestsDefaultResponse,\n LoadTestAdministrationUploadTestFile201Response,\n LoadTestAdministrationUploadTestFileDefaultResponse,\n LoadTestAdministrationGetTestFile200Response,\n LoadTestAdministrationGetTestFileDefaultResponse,\n LoadTestAdministrationDeleteTestFile204Response,\n LoadTestAdministrationDeleteTestFileDefaultResponse,\n LoadTestAdministrationListTestFiles200Response,\n LoadTestAdministrationListTestFilesDefaultResponse,\n LoadTestAdministrationCreateOrUpdateAppComponents200Response,\n LoadTestAdministrationCreateOrUpdateAppComponents201Response,\n LoadTestAdministrationCreateOrUpdateAppComponentsDefaultResponse,\n LoadTestAdministrationGetAppComponents200Response,\n LoadTestAdministrationGetAppComponentsDefaultResponse,\n LoadTestAdministrationCreateOrUpdateServerMetricsConfig200Response,\n LoadTestAdministrationCreateOrUpdateServerMetricsConfig201Response,\n LoadTestAdministrationCreateOrUpdateServerMetricsConfigDefaultResponse,\n LoadTestAdministrationGetServerMetricsConfig200Response,\n LoadTestAdministrationGetServerMetricsConfigDefaultResponse,\n TestProfileAdministrationCreateOrUpdateTestProfile200Response,\n TestProfileAdministrationCreateOrUpdateTestProfile201Response,\n TestProfileAdministrationCreateOrUpdateTestProfileDefaultResponse,\n TestProfileAdministrationDeleteTestProfile204Response,\n TestProfileAdministrationDeleteTestProfileDefaultResponse,\n TestProfileAdministrationGetTestProfile200Response,\n TestProfileAdministrationGetTestProfileDefaultResponse,\n TestProfileAdministrationListTestProfiles200Response,\n TestProfileAdministrationListTestProfilesDefaultResponse,\n LoadTestRunGetTestRun200Response,\n LoadTestRunGetTestRunDefaultResponse,\n LoadTestRunCreateOrUpdateTestRun200Response,\n LoadTestRunCreateOrUpdateTestRun201Response,\n LoadTestRunCreateOrUpdateTestRunDefaultResponse,\n LoadTestRunDeleteTestRun204Response,\n LoadTestRunDeleteTestRunDefaultResponse,\n LoadTestRunListTestRuns200Response,\n LoadTestRunListTestRunsDefaultResponse,\n LoadTestRunGetTestRunFile200Response,\n LoadTestRunGetTestRunFileDefaultResponse,\n LoadTestRunStop200Response,\n LoadTestRunStopDefaultResponse,\n LoadTestRunListMetricNamespaces200Response,\n LoadTestRunListMetricNamespacesDefaultResponse,\n LoadTestRunListMetricDefinitions200Response,\n LoadTestRunListMetricDefinitionsDefaultResponse,\n LoadTestRunListMetrics200Response,\n LoadTestRunListMetricsDefaultResponse,\n LoadTestRunListMetricDimensionValues200Response,\n LoadTestRunListMetricDimensionValuesDefaultResponse,\n LoadTestRunCreateOrUpdateAppComponents200Response,\n LoadTestRunCreateOrUpdateAppComponents201Response,\n LoadTestRunCreateOrUpdateAppComponentsDefaultResponse,\n LoadTestRunGetAppComponents200Response,\n LoadTestRunGetAppComponentsDefaultResponse,\n LoadTestRunCreateOrUpdateServerMetricsConfig200Response,\n LoadTestRunCreateOrUpdateServerMetricsConfig201Response,\n LoadTestRunCreateOrUpdateServerMetricsConfigDefaultResponse,\n LoadTestRunGetServerMetricsConfig200Response,\n LoadTestRunGetServerMetricsConfigDefaultResponse,\n TestProfileRunAdministrationGetTestProfileRun200Response,\n TestProfileRunAdministrationGetTestProfileRunDefaultResponse,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response,\n TestProfileRunAdministrationCreateOrUpdateTestProfileRunDefaultResponse,\n TestProfileRunAdministrationDeleteTestProfileRun204Response,\n TestProfileRunAdministrationDeleteTestProfileRunDefaultResponse,\n TestProfileRunAdministrationStop200Response,\n TestProfileRunAdministrationStopDefaultResponse,\n TestProfileRunAdministrationListTestProfileRuns200Response,\n TestProfileRunAdministrationListTestProfileRunsDefaultResponse,\n TriggerAdministrationGetTrigger200Response,\n TriggerAdministrationGetTriggerDefaultResponse,\n TriggerAdministrationCreateOrUpdateTrigger200Response,\n TriggerAdministrationCreateOrUpdateTrigger201Response,\n TriggerAdministrationCreateOrUpdateTriggerDefaultResponse,\n TriggerAdministrationDeleteTrigger204Response,\n TriggerAdministrationDeleteTriggerDefaultResponse,\n TriggerAdministrationListTrigger200Response,\n TriggerAdministrationListTriggerDefaultResponse,\n NotificationRuleAdministrationGetNotificationRule200Response,\n NotificationRuleAdministrationGetNotificationRuleDefaultResponse,\n NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response,\n NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response,\n NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse,\n NotificationRuleAdministrationDeleteNotificationRule204Response,\n NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse,\n NotificationRuleAdministrationListNotificationRule200Response,\n NotificationRuleAdministrationListNotificationRuleDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface LoadTestAdministrationCreateOrUpdateTest {\n /** Create a new test or update an existing test by providing the test Id. */\n patch(\n options: LoadTestAdministrationCreateOrUpdateTestParameters,\n ): StreamableMethod<\n | LoadTestAdministrationCreateOrUpdateTest200Response\n | LoadTestAdministrationCreateOrUpdateTest201Response\n | LoadTestAdministrationCreateOrUpdateTestDefaultResponse\n >;\n /** Delete a test by its test Id. */\n delete(\n options?: LoadTestAdministrationDeleteTestParameters,\n ): StreamableMethod<\n LoadTestAdministrationDeleteTest204Response | LoadTestAdministrationDeleteTestDefaultResponse\n >;\n /** Get load test details by test Id */\n get(\n options?: LoadTestAdministrationGetTestParameters,\n ): StreamableMethod<\n LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestDefaultResponse\n >;\n}\n\nexport interface LoadTestAdministrationListTests {\n /**\n * Get all load tests by the fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.\n */\n get(\n options?: LoadTestAdministrationListTestsParameters,\n ): StreamableMethod<\n LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsDefaultResponse\n >;\n}\n\nexport interface LoadTestAdministrationUploadTestFile {\n /**\n * Upload input file for a given test Id. File size can't be more than 50 MB.\n * Existing file with same name for the given test will be overwritten. File\n * should be provided in the request body as application/octet-stream.\n */\n put(\n options: LoadTestAdministrationUploadTestFileParameters,\n ): StreamableMethod<\n | LoadTestAdministrationUploadTestFile201Response\n | LoadTestAdministrationUploadTestFileDefaultResponse\n >;\n /** Get all the files that are associated with a test. */\n get(\n options?: LoadTestAdministrationGetTestFileParameters,\n ): StreamableMethod<\n LoadTestAdministrationGetTestFile200Response | LoadTestAdministrationGetTestFileDefaultResponse\n >;\n /** Delete file by the file name for a test */\n delete(\n options?: LoadTestAdministrationDeleteTestFileParameters,\n ): StreamableMethod<\n | LoadTestAdministrationDeleteTestFile204Response\n | LoadTestAdministrationDeleteTestFileDefaultResponse\n >;\n}\n\nexport interface LoadTestAdministrationListTestFiles {\n /** Get all test files. */\n get(\n options?: LoadTestAdministrationListTestFilesParameters,\n ): StreamableMethod<\n | LoadTestAdministrationListTestFiles200Response\n | LoadTestAdministrationListTestFilesDefaultResponse\n >;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateAppComponents {\n /** Add an app component to a test by providing the resource Id, name and type. */\n patch(\n options: LoadTestAdministrationCreateOrUpdateAppComponentsParameters,\n ): StreamableMethod<\n | LoadTestAdministrationCreateOrUpdateAppComponents200Response\n | LoadTestAdministrationCreateOrUpdateAppComponents201Response\n | LoadTestAdministrationCreateOrUpdateAppComponentsDefaultResponse\n >;\n /** Get associated app component (collection of azure resources) for the given test. */\n get(\n options?: LoadTestAdministrationGetAppComponentsParameters,\n ): StreamableMethod<\n | LoadTestAdministrationGetAppComponents200Response\n | LoadTestAdministrationGetAppComponentsDefaultResponse\n >;\n}\n\nexport interface LoadTestAdministrationCreateOrUpdateServerMetricsConfig {\n /** Configure server metrics for a test */\n patch(\n options: LoadTestAdministrationCreateOrUpdateServerMetricsConfigParameters,\n ): StreamableMethod<\n | LoadTestAdministrationCreateOrUpdateServerMetricsConfig200Response\n | LoadTestAdministrationCreateOrUpdateServerMetricsConfig201Response\n | LoadTestAdministrationCreateOrUpdateServerMetricsConfigDefaultResponse\n >;\n /** List server metrics configuration for the given test. */\n get(\n options?: LoadTestAdministrationGetServerMetricsConfigParameters,\n ): StreamableMethod<\n | LoadTestAdministrationGetServerMetricsConfig200Response\n | LoadTestAdministrationGetServerMetricsConfigDefaultResponse\n >;\n}\n\nexport interface TestProfileAdministrationCreateOrUpdateTestProfile {\n /** Create a new test profile or update an existing test profile by providing the test profile Id. */\n patch(\n options: TestProfileAdministrationCreateOrUpdateTestProfileParameters,\n ): StreamableMethod<\n | TestProfileAdministrationCreateOrUpdateTestProfile200Response\n | TestProfileAdministrationCreateOrUpdateTestProfile201Response\n | TestProfileAdministrationCreateOrUpdateTestProfileDefaultResponse\n >;\n /** Delete a test profile by its test profile Id. */\n delete(\n options?: TestProfileAdministrationDeleteTestProfileParameters,\n ): StreamableMethod<\n | TestProfileAdministrationDeleteTestProfile204Response\n | TestProfileAdministrationDeleteTestProfileDefaultResponse\n >;\n /** Get load test profile details by test profile Id. */\n get(\n options?: TestProfileAdministrationGetTestProfileParameters,\n ): StreamableMethod<\n | TestProfileAdministrationGetTestProfile200Response\n | TestProfileAdministrationGetTestProfileDefaultResponse\n >;\n}\n\nexport interface TestProfileAdministrationListTestProfiles {\n /** Get all test profiles for the given filters. */\n get(\n options?: TestProfileAdministrationListTestProfilesParameters,\n ): StreamableMethod<\n | TestProfileAdministrationListTestProfiles200Response\n | TestProfileAdministrationListTestProfilesDefaultResponse\n >;\n}\n\nexport interface LoadTestRunGetTestRun {\n /** Get test run details by test run Id. */\n get(\n options?: LoadTestRunGetTestRunParameters,\n ): StreamableMethod<LoadTestRunGetTestRun200Response | LoadTestRunGetTestRunDefaultResponse>;\n /** Create and start a new test run with the given test run Id. */\n patch(\n options: LoadTestRunCreateOrUpdateTestRunParameters,\n ): StreamableMethod<\n | LoadTestRunCreateOrUpdateTestRun200Response\n | LoadTestRunCreateOrUpdateTestRun201Response\n | LoadTestRunCreateOrUpdateTestRunDefaultResponse\n >;\n /** Delete an existing load test run by providing the testRunId. */\n delete(\n options?: LoadTestRunDeleteTestRunParameters,\n ): StreamableMethod<\n LoadTestRunDeleteTestRun204Response | LoadTestRunDeleteTestRunDefaultResponse\n >;\n}\n\nexport interface LoadTestRunListTestRuns {\n /** Get all test runs for the given filters. */\n get(\n options?: LoadTestRunListTestRunsParameters,\n ): StreamableMethod<LoadTestRunListTestRuns200Response | LoadTestRunListTestRunsDefaultResponse>;\n}\n\nexport interface LoadTestRunGetTestRunFile {\n /** Get test run file by file name. */\n get(\n options?: LoadTestRunGetTestRunFileParameters,\n ): StreamableMethod<\n LoadTestRunGetTestRunFile200Response | LoadTestRunGetTestRunFileDefaultResponse\n >;\n}\n\nexport interface LoadTestRunStop {\n /** Stop test run by test run Id. */\n post(\n options?: LoadTestRunStopParameters,\n ): StreamableMethod<LoadTestRunStop200Response | LoadTestRunStopDefaultResponse>;\n}\n\nexport interface LoadTestRunListMetricNamespaces {\n /** List the metric namespaces for a load test run. */\n get(\n options?: LoadTestRunListMetricNamespacesParameters,\n ): StreamableMethod<\n LoadTestRunListMetricNamespaces200Response | LoadTestRunListMetricNamespacesDefaultResponse\n >;\n}\n\nexport interface LoadTestRunListMetricDefinitions {\n /** List the metric definitions for a load test run. */\n get(\n options: LoadTestRunListMetricDefinitionsParameters,\n ): StreamableMethod<\n LoadTestRunListMetricDefinitions200Response | LoadTestRunListMetricDefinitionsDefaultResponse\n >;\n}\n\nexport interface LoadTestRunListMetrics {\n /** List the metric values for a load test run. */\n post(\n options: LoadTestRunListMetricsParameters,\n ): StreamableMethod<LoadTestRunListMetrics200Response | LoadTestRunListMetricsDefaultResponse>;\n}\n\nexport interface LoadTestRunListMetricDimensionValues {\n /** List the dimension values for the given metric dimension name. */\n get(\n options: LoadTestRunListMetricDimensionValuesParameters,\n ): StreamableMethod<\n | LoadTestRunListMetricDimensionValues200Response\n | LoadTestRunListMetricDimensionValuesDefaultResponse\n >;\n}\n\nexport interface LoadTestRunCreateOrUpdateAppComponents {\n /** Add an app component to a test run by providing the resource Id, name and type. */\n patch(\n options: LoadTestRunCreateOrUpdateAppComponentsParameters,\n ): StreamableMethod<\n | LoadTestRunCreateOrUpdateAppComponents200Response\n | LoadTestRunCreateOrUpdateAppComponents201Response\n | LoadTestRunCreateOrUpdateAppComponentsDefaultResponse\n >;\n /**\n * Get associated app component (collection of azure resources) for the given test\n * run.\n */\n get(\n options?: LoadTestRunGetAppComponentsParameters,\n ): StreamableMethod<\n LoadTestRunGetAppComponents200Response | LoadTestRunGetAppComponentsDefaultResponse\n >;\n}\n\nexport interface LoadTestRunCreateOrUpdateServerMetricsConfig {\n /** Configure server metrics for a test run */\n patch(\n options: LoadTestRunCreateOrUpdateServerMetricsConfigParameters,\n ): StreamableMethod<\n | LoadTestRunCreateOrUpdateServerMetricsConfig200Response\n | LoadTestRunCreateOrUpdateServerMetricsConfig201Response\n | LoadTestRunCreateOrUpdateServerMetricsConfigDefaultResponse\n >;\n /** Get associated server metrics configuration for the given test run. */\n get(\n options?: LoadTestRunGetServerMetricsConfigParameters,\n ): StreamableMethod<\n LoadTestRunGetServerMetricsConfig200Response | LoadTestRunGetServerMetricsConfigDefaultResponse\n >;\n}\n\nexport interface TestProfileRunAdministrationGetTestProfileRun {\n /** Get test profile run details by test profile run Id. */\n get(\n options?: TestProfileRunAdministrationGetTestProfileRunParameters,\n ): StreamableMethod<\n | TestProfileRunAdministrationGetTestProfileRun200Response\n | TestProfileRunAdministrationGetTestProfileRunDefaultResponse\n >;\n /** Create and start a new test profile run with the given test profile run Id. */\n patch(\n options: TestProfileRunAdministrationCreateOrUpdateTestProfileRunParameters,\n ): StreamableMethod<\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun200Response\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRun201Response\n | TestProfileRunAdministrationCreateOrUpdateTestProfileRunDefaultResponse\n >;\n /** Delete an existing load test profile run by providing the test profile run Id. */\n delete(\n options?: TestProfileRunAdministrationDeleteTestProfileRunParameters,\n ): StreamableMethod<\n | TestProfileRunAdministrationDeleteTestProfileRun204Response\n | TestProfileRunAdministrationDeleteTestProfileRunDefaultResponse\n >;\n}\n\nexport interface TestProfileRunAdministrationStop {\n /** Stop test profile run for the given test profile run Id. */\n post(\n options?: TestProfileRunAdministrationStopParameters,\n ): StreamableMethod<\n TestProfileRunAdministrationStop200Response | TestProfileRunAdministrationStopDefaultResponse\n >;\n}\n\nexport interface TestProfileRunAdministrationListTestProfileRuns {\n /** Get all test profile runs for the given filters. */\n get(\n options?: TestProfileRunAdministrationListTestProfileRunsParameters,\n ): StreamableMethod<\n | TestProfileRunAdministrationListTestProfileRuns200Response\n | TestProfileRunAdministrationListTestProfileRunsDefaultResponse\n >;\n}\n\nexport interface TriggerAdministrationGetTrigger {\n /** Resource read operation template. */\n get(\n options?: TriggerAdministrationGetTriggerParameters,\n ): StreamableMethod<\n TriggerAdministrationGetTrigger200Response | TriggerAdministrationGetTriggerDefaultResponse\n >;\n /** Create or update operation template. */\n patch(\n options: TriggerAdministrationCreateOrUpdateTriggerParameters,\n ): StreamableMethod<\n | TriggerAdministrationCreateOrUpdateTrigger200Response\n | TriggerAdministrationCreateOrUpdateTrigger201Response\n | TriggerAdministrationCreateOrUpdateTriggerDefaultResponse\n >;\n /** Resource delete operation template. */\n delete(\n options?: TriggerAdministrationDeleteTriggerParameters,\n ): StreamableMethod<\n | TriggerAdministrationDeleteTrigger204Response\n | TriggerAdministrationDeleteTriggerDefaultResponse\n >;\n}\n\nexport interface TriggerAdministrationListTrigger {\n /** Resource list operation template. */\n get(\n options?: TriggerAdministrationListTriggerParameters,\n ): StreamableMethod<\n TriggerAdministrationListTrigger200Response | TriggerAdministrationListTriggerDefaultResponse\n >;\n}\n\nexport interface NotificationRuleAdministrationGetNotificationRule {\n /** Resource read operation template. */\n get(\n options?: NotificationRuleAdministrationGetNotificationRuleParameters,\n ): StreamableMethod<\n | NotificationRuleAdministrationGetNotificationRule200Response\n | NotificationRuleAdministrationGetNotificationRuleDefaultResponse\n >;\n /** Create or update operation template. */\n patch(\n options: NotificationRuleAdministrationCreateOrUpdateNotificationRuleParameters,\n ): StreamableMethod<\n | NotificationRuleAdministrationCreateOrUpdateNotificationRule200Response\n | NotificationRuleAdministrationCreateOrUpdateNotificationRule201Response\n | NotificationRuleAdministrationCreateOrUpdateNotificationRuleDefaultResponse\n >;\n /** Resource delete operation template. */\n delete(\n options?: NotificationRuleAdministrationDeleteNotificationRuleParameters,\n ): StreamableMethod<\n | NotificationRuleAdministrationDeleteNotificationRule204Response\n | NotificationRuleAdministrationDeleteNotificationRuleDefaultResponse\n >;\n}\n\nexport interface NotificationRuleAdministrationListNotificationRule {\n /** Resource list operation template. */\n get(\n options?: NotificationRuleAdministrationListNotificationRuleParameters,\n ): StreamableMethod<\n | NotificationRuleAdministrationListNotificationRule200Response\n | NotificationRuleAdministrationListNotificationRuleDefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/tests/\\{testId\\}' has methods for the following verbs: patch, delete, get */\n (path: \"/tests/{testId}\", testId: string): LoadTestAdministrationCreateOrUpdateTest;\n /** Resource for '/tests' has methods for the following verbs: get */\n (path: \"/tests\"): LoadTestAdministrationListTests;\n /** Resource for '/tests/\\{testId\\}/files/\\{fileName\\}' has methods for the following verbs: put, get, delete */\n (\n path: \"/tests/{testId}/files/{fileName}\",\n testId: string,\n fileName: string,\n ): LoadTestAdministrationUploadTestFile;\n /** Resource for '/tests/\\{testId\\}/files' has methods for the following verbs: get */\n (path: \"/tests/{testId}/files\", testId: string): LoadTestAdministrationListTestFiles;\n /** Resource for '/tests/\\{testId\\}/app-components' has methods for the following verbs: patch, get */\n (\n path: \"/tests/{testId}/app-components\",\n testId: string,\n ): LoadTestAdministrationCreateOrUpdateAppComponents;\n /** Resource for '/tests/\\{testId\\}/server-metrics-config' has methods for the following verbs: patch, get */\n (\n path: \"/tests/{testId}/server-metrics-config\",\n testId: string,\n ): LoadTestAdministrationCreateOrUpdateServerMetricsConfig;\n /** Resource for '/test-profiles/\\{testProfileId\\}' has methods for the following verbs: patch, delete, get */\n (\n path: \"/test-profiles/{testProfileId}\",\n testProfileId: string,\n ): TestProfileAdministrationCreateOrUpdateTestProfile;\n /** Resource for '/test-profiles' has methods for the following verbs: get */\n (path: \"/test-profiles\"): TestProfileAdministrationListTestProfiles;\n /** Resource for '/test-runs/\\{testRunId\\}' has methods for the following verbs: get, patch, delete */\n (path: \"/test-runs/{testRunId}\", testRunId: string): LoadTestRunGetTestRun;\n /** Resource for '/test-runs' has methods for the following verbs: get */\n (path: \"/test-runs\"): LoadTestRunListTestRuns;\n /** Resource for '/test-runs/\\{testRunId\\}/files/\\{fileName\\}' has methods for the following verbs: get */\n (\n path: \"/test-runs/{testRunId}/files/{fileName}\",\n testRunId: string,\n fileName: string,\n ): LoadTestRunGetTestRunFile;\n /** Resource for '/test-runs/\\{testRunId\\}:stop' has methods for the following verbs: post */\n (path: \"/test-runs/{testRunId}:stop\", testRunId: string): LoadTestRunStop;\n /** Resource for '/test-runs/\\{testRunId\\}/metric-namespaces' has methods for the following verbs: get */\n (\n path: \"/test-runs/{testRunId}/metric-namespaces\",\n testRunId: string,\n ): LoadTestRunListMetricNamespaces;\n /** Resource for '/test-runs/\\{testRunId\\}/metric-definitions' has methods for the following verbs: get */\n (\n path: \"/test-runs/{testRunId}/metric-definitions\",\n testRunId: string,\n ): LoadTestRunListMetricDefinitions;\n /** Resource for '/test-runs/\\{testRunId\\}/metrics' has methods for the following verbs: post */\n (path: \"/test-runs/{testRunId}/metrics\", testRunId: string): LoadTestRunListMetrics;\n /** Resource for '/test-runs/\\{testRunId\\}/metric-dimensions/\\{name\\}/values' has methods for the following verbs: get */\n (\n path: \"/test-runs/{testRunId}/metric-dimensions/{name}/values\",\n testRunId: string,\n name: string,\n ): LoadTestRunListMetricDimensionValues;\n /** Resource for '/test-runs/\\{testRunId\\}/app-components' has methods for the following verbs: patch, get */\n (\n path: \"/test-runs/{testRunId}/app-components\",\n testRunId: string,\n ): LoadTestRunCreateOrUpdateAppComponents;\n /** Resource for '/test-runs/\\{testRunId\\}/server-metrics-config' has methods for the following verbs: patch, get */\n (\n path: \"/test-runs/{testRunId}/server-metrics-config\",\n testRunId: string,\n ): LoadTestRunCreateOrUpdateServerMetricsConfig;\n /** Resource for '/test-profile-runs/\\{testProfileRunId\\}' has methods for the following verbs: get, patch, delete */\n (\n path: \"/test-profile-runs/{testProfileRunId}\",\n testProfileRunId: string,\n ): TestProfileRunAdministrationGetTestProfileRun;\n /** Resource for '/test-profile-runs/\\{testProfileRunId\\}:stop' has methods for the following verbs: post */\n (\n path: \"/test-profile-runs/{testProfileRunId}:stop\",\n testProfileRunId: string,\n ): TestProfileRunAdministrationStop;\n /** Resource for '/test-profile-runs' has methods for the following verbs: get */\n (path: \"/test-profile-runs\"): TestProfileRunAdministrationListTestProfileRuns;\n /** Resource for '/triggers/\\{triggerId\\}' has methods for the following verbs: get, patch, delete */\n (path: \"/triggers/{triggerId}\", triggerId: string): TriggerAdministrationGetTrigger;\n /** Resource for '/triggers' has methods for the following verbs: get */\n (path: \"/triggers\"): TriggerAdministrationListTrigger;\n /** Resource for '/notification-rules/\\{notificationRuleId\\}' has methods for the following verbs: get, patch, delete */\n (\n path: \"/notification-rules/{notificationRuleId}\",\n notificationRuleId: string,\n ): NotificationRuleAdministrationGetNotificationRule;\n /** Resource for '/notification-rules' has methods for the following verbs: get */\n (path: \"/notification-rules\"): NotificationRuleAdministrationListNotificationRule;\n}\n\nexport type AzureLoadTestingClient = Client & {\n path: Routes;\n};\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,137 +1,131 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
1
  import { AbortError } from "@azure/abort-controller";
4
2
  import { isUnexpected } from "./isUnexpected.js";
5
3
  import { sleep } from "./util/LROUtil.js";
6
- /**
7
- * Uploads a file and creates a poller to poll for validation.
8
- * @param client - The Load Testing client.
9
- * @param options - The operation options.
10
- * @returns A poller which can be called to poll until completion of the job.
11
- */
12
- export async function getFileValidationPoller(client, fileUploadResult, polledOperationOptions = {}) {
13
- var _a;
14
- // get filename and testid from initial response
15
- const fileName = fileUploadResult.body.fileName;
16
- const requestUrl = fileUploadResult.request.url;
17
- const testId = requestUrl.substring(requestUrl.indexOf("tests/") + 6, requestUrl.lastIndexOf("/files"));
18
- const state = {
19
- status: "notStarted",
20
- };
21
- const progressCallbacks = new Map();
22
- const processProgressCallbacks = async () => progressCallbacks.forEach((h) => h(state));
23
- let resultPromise;
24
- let cancelJob;
25
- const abortController = new AbortController();
26
- const currentPollIntervalInMs = (_a = polledOperationOptions.updateIntervalInMs) !== null && _a !== void 0 ? _a : 2000;
27
- const poller = {
28
- async poll(options) {
29
- var _a;
30
- if ((_a = options === null || options === void 0 ? void 0 : options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {
31
- throw new AbortError("The polling was aborted.");
4
+ async function getFileValidationPoller(client, fileUploadResult, polledOperationOptions = {}) {
5
+ const fileName = fileUploadResult.body.fileName;
6
+ const requestUrl = fileUploadResult.request.url;
7
+ const testId = requestUrl.substring(
8
+ requestUrl.indexOf("tests/") + 6,
9
+ requestUrl.lastIndexOf("/files")
10
+ );
11
+ const state = {
12
+ status: "notStarted"
13
+ };
14
+ const progressCallbacks = /* @__PURE__ */ new Map();
15
+ const processProgressCallbacks = async () => progressCallbacks.forEach((h) => h(state));
16
+ let resultPromise;
17
+ let cancelJob;
18
+ const abortController = new AbortController();
19
+ const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2e3;
20
+ const poller = {
21
+ async poll(options) {
22
+ if (options?.abortSignal?.aborted) {
23
+ throw new AbortError("The polling was aborted.");
24
+ }
25
+ if (fileName) {
26
+ const fileValidationResponse = await client.path("/tests/{testId}/files/{fileName}", testId, fileName).get();
27
+ if (isUnexpected(fileValidationResponse)) {
28
+ state.status = "failed";
29
+ state.error = new Error(fileValidationResponse.body.error.message);
30
+ return state;
31
+ }
32
+ switch (fileValidationResponse.body.validationStatus) {
33
+ case "NOT_VALIDATED": {
34
+ state.status = "succeeded";
35
+ break;
36
+ }
37
+ case "VALIDATION_INITIATED": {
38
+ state.status = "running";
39
+ break;
40
+ }
41
+ case "VALIDATION_SUCCESS":
42
+ case "VALIDATION_NOT_REQUIRED": {
43
+ state.status = "succeeded";
44
+ break;
45
+ }
46
+ case "VALIDATION_FAILURE": {
47
+ state.status = "failed";
48
+ state.error = new Error(fileValidationResponse.body.validationFailureDetails);
49
+ break;
50
+ }
51
+ }
52
+ state.result = fileValidationResponse;
53
+ await processProgressCallbacks();
54
+ }
55
+ return state;
56
+ },
57
+ pollUntilDone(pollOptions) {
58
+ return resultPromise ??= (async () => {
59
+ const { abortSignal: inputAbortSignal } = pollOptions || {};
60
+ function abortListener() {
61
+ abortController.abort();
62
+ }
63
+ const abortSignal = abortController.signal;
64
+ if (inputAbortSignal?.aborted) {
65
+ abortController.abort();
66
+ } else if (!abortSignal.aborted) {
67
+ inputAbortSignal?.addEventListener("abort", abortListener, { once: true });
68
+ }
69
+ try {
70
+ if (!poller.isDone()) {
71
+ await poller.poll({ abortSignal });
72
+ while (!poller.isDone()) {
73
+ const delay = sleep(currentPollIntervalInMs, abortSignal);
74
+ cancelJob = () => abortController.abort();
75
+ await delay;
76
+ await poller.poll({ abortSignal });
32
77
  }
33
- if (fileName) {
34
- const fileValidationResponse = await client
35
- .path("/tests/{testId}/files/{fileName}", testId, fileName)
36
- .get();
37
- if (isUnexpected(fileValidationResponse)) {
38
- state.status = "failed";
39
- state.error = new Error(fileValidationResponse.body.error.message);
40
- return;
41
- }
42
- switch (fileValidationResponse.body.validationStatus) {
43
- case "NOT_VALIDATED": {
44
- state.status = "succeeded";
45
- break;
46
- }
47
- case "VALIDATION_INITIATED": {
48
- state.status = "running";
49
- break;
50
- }
51
- case "VALIDATION_SUCCESS":
52
- case "VALIDATION_NOT_REQUIRED": {
53
- state.status = "succeeded";
54
- break;
55
- }
56
- case "VALIDATION_FAILURE": {
57
- state.status = "failed";
58
- state.error = new Error(fileValidationResponse.body.validationFailureDetails);
59
- break;
60
- }
61
- }
62
- state.result = fileValidationResponse;
63
- await processProgressCallbacks();
64
- }
65
- },
66
- pollUntilDone(pollOptions) {
67
- return (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {
68
- const { abortSignal: inputAbortSignal } = pollOptions || {};
69
- // In the future we can use AbortSignal.any() instead
70
- function abortListener() {
71
- abortController.abort();
72
- }
73
- const abortSignal = abortController.signal;
74
- if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {
75
- abortController.abort();
76
- }
77
- else if (!abortSignal.aborted) {
78
- inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, { once: true });
79
- }
80
- try {
81
- if (!poller.isDone()) {
82
- await poller.poll({ abortSignal });
83
- while (!poller.isDone()) {
84
- const delay = sleep(currentPollIntervalInMs, abortSignal);
85
- cancelJob = () => abortController.abort();
86
- await delay;
87
- await poller.poll({ abortSignal });
88
- }
89
- }
90
- }
91
- finally {
92
- inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener);
93
- }
94
- switch (state.status) {
95
- case "succeeded":
96
- case "failed":
97
- case "canceled": {
98
- return poller.getResult();
99
- }
100
- case "notStarted":
101
- case "running": {
102
- // Unreachable
103
- throw new Error(`polling completed without succeeding or failing`);
104
- }
105
- }
106
- })().finally(() => {
107
- resultPromise = undefined;
108
- })));
109
- },
110
- onProgress(callback) {
111
- const s = Symbol();
112
- progressCallbacks.set(s, callback);
113
- return () => progressCallbacks.delete(s);
114
- },
115
- isDone() {
116
- return ["succeeded", "failed", "canceled"].includes(state.status);
117
- },
118
- stopPolling() {
119
- abortController.abort();
120
- cancelJob === null || cancelJob === void 0 ? void 0 : cancelJob();
121
- },
122
- isStopped() {
123
- return resultPromise === undefined;
124
- },
125
- getOperationState() {
126
- return state;
127
- },
128
- getResult() {
129
- return state.result;
130
- },
131
- toString() {
132
- return JSON.stringify({ state });
133
- },
134
- };
135
- return poller;
78
+ }
79
+ } finally {
80
+ inputAbortSignal?.removeEventListener("abort", abortListener);
81
+ }
82
+ switch (state.status) {
83
+ case "succeeded":
84
+ case "failed":
85
+ case "canceled": {
86
+ return poller.getResult();
87
+ }
88
+ case "notStarted":
89
+ case "running": {
90
+ throw new Error(`polling completed without succeeding or failing`);
91
+ }
92
+ }
93
+ })().finally(() => {
94
+ resultPromise = void 0;
95
+ });
96
+ },
97
+ onProgress(callback) {
98
+ const s = /* @__PURE__ */ Symbol();
99
+ progressCallbacks.set(s, callback);
100
+ return () => progressCallbacks.delete(s);
101
+ },
102
+ isDone() {
103
+ return ["succeeded", "failed", "canceled"].includes(state.status);
104
+ },
105
+ stopPolling() {
106
+ abortController.abort();
107
+ cancelJob?.();
108
+ },
109
+ isStopped() {
110
+ return resultPromise === void 0;
111
+ },
112
+ getOperationState() {
113
+ return state;
114
+ },
115
+ getResult() {
116
+ return state.result;
117
+ },
118
+ toString() {
119
+ return JSON.stringify({ state });
120
+ },
121
+ async serialize() {
122
+ return JSON.stringify({ state });
123
+ },
124
+ async submitted() {
125
+ }
126
+ };
127
+ return poller;
136
128
  }
137
- //# sourceMappingURL=getFileValidationPoller.js.map
129
+ export {
130
+ getFileValidationPoller
131
+ };
@@ -1 +1,7 @@
1
- {"version":3,"file":"getFileValidationPoller.js","sourceRoot":"","sources":["../../src/getFileValidationPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAQrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,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;wBACd,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;oBACrE,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;gBAChB,aAAa,GAAG,SAAS,CAAC;YAC5B,CAAC,CAAC,EAAC,CAAC;QACN,CAAC;QAED,UAAU,CACR,QAAuF;YAEvF,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;YACnB,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAEnC,OAAO,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM;YACJ,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACpE,CAAC;QAED,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;YACxB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAC;QAChB,CAAC;QAED,SAAS;YACP,OAAO,aAAa,KAAK,SAAS,CAAC;QACrC,CAAC;QAED,iBAAiB;YACf,OAAO,KAAK,CAAC;QACf,CAAC;QAED,SAAS;YACP,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QACnC,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport type { CancelOnProgress, OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport type { FileUploadAndValidatePoller, PolledOperationOptions } from \"./models.js\";\nimport type { AzureLoadTestingClient } from \"./clientDefinitions.js\";\nimport type {\n LoadTestAdministrationGetTestFile200Response,\n LoadTestAdministrationUploadTestFile201Response,\n} from \"./responses.js\";\nimport { isUnexpected } from \"./isUnexpected.js\";\nimport { sleep } from \"./util/LROUtil.js\";\n\n/**\n * Uploads a file and creates a poller to poll for validation.\n * @param client - The Load Testing client.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\nexport async function getFileValidationPoller(\n client: AzureLoadTestingClient,\n fileUploadResult: LoadTestAdministrationUploadTestFile201Response,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<FileUploadAndValidatePoller> {\n // get filename and testid from initial response\n const fileName = fileUploadResult.body.fileName;\n const requestUrl = fileUploadResult.request.url;\n const testId = requestUrl.substring(\n requestUrl.indexOf(\"tests/\") + 6,\n requestUrl.lastIndexOf(\"/files\"),\n );\n type Handler = (state: OperationState<LoadTestAdministrationGetTestFile200Response>) => void;\n\n const state: OperationState<LoadTestAdministrationGetTestFile200Response> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<LoadTestAdministrationGetTestFile200Response> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<\n OperationState<LoadTestAdministrationGetTestFile200Response>,\n LoadTestAdministrationGetTestFile200Response\n > = {\n async poll(options?: { abortSignal?: AbortSignalLike }): Promise<void> {\n if (options?.abortSignal?.aborted) {\n throw new AbortError(\"The polling was aborted.\");\n }\n\n if (fileName) {\n const fileValidationResponse = await client\n .path(\"/tests/{testId}/files/{fileName}\", testId, fileName)\n .get();\n if (isUnexpected(fileValidationResponse)) {\n state.status = \"failed\";\n state.error = new Error(fileValidationResponse.body.error.message);\n return;\n }\n\n switch (fileValidationResponse.body.validationStatus) {\n case \"NOT_VALIDATED\": {\n state.status = \"succeeded\";\n break;\n }\n case \"VALIDATION_INITIATED\": {\n state.status = \"running\";\n break;\n }\n case \"VALIDATION_SUCCESS\":\n case \"VALIDATION_NOT_REQUIRED\": {\n state.status = \"succeeded\";\n break;\n }\n case \"VALIDATION_FAILURE\": {\n state.status = \"failed\";\n state.error = new Error(fileValidationResponse.body.validationFailureDetails);\n break;\n }\n }\n state.result = fileValidationResponse;\n\n await processProgressCallbacks();\n }\n },\n\n pollUntilDone(pollOptions?: {\n abortSignal?: AbortSignalLike;\n }): Promise<LoadTestAdministrationGetTestFile200Response> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n const delay = sleep(currentPollIntervalInMs, abortSignal);\n cancelJob = () => abortController.abort();\n await delay;\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n case \"failed\":\n case \"canceled\": {\n return poller.getResult() as LoadTestAdministrationGetTestFile200Response;\n }\n case \"notStarted\":\n case \"running\": {\n // Unreachable\n throw new Error(`polling completed without succeeding or failing`);\n }\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(\n callback: (state: OperationState<LoadTestAdministrationGetTestFile200Response>) => void,\n ): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<LoadTestAdministrationGetTestFile200Response> {\n return state;\n },\n\n getResult(): LoadTestAdministrationGetTestFile200Response | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n };\n\n return poller;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/load-testing-rest/src/getFileValidationPoller.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport { AbortError } from \"@azure/abort-controller\";\nimport type { CancelOnProgress, OperationState } from \"@azure/core-lro\";\nimport type { SimplePollerLike } from \"./pollingHelper.js\";\nimport type { FileUploadAndValidatePoller, PolledOperationOptions } from \"./models.js\";\nimport type { AzureLoadTestingClient } from \"./clientDefinitions.js\";\nimport type {\n LoadTestAdministrationGetTestFile200Response,\n LoadTestAdministrationUploadTestFile201Response,\n} from \"./responses.js\";\nimport { isUnexpected } from \"./isUnexpected.js\";\nimport { sleep } from \"./util/LROUtil.js\";\n\n/**\n * Uploads a file and creates a poller to poll for validation.\n * @param client - The Load Testing client.\n * @param options - The operation options.\n * @returns A poller which can be called to poll until completion of the job.\n */\nexport async function getFileValidationPoller(\n client: AzureLoadTestingClient,\n fileUploadResult: LoadTestAdministrationUploadTestFile201Response,\n polledOperationOptions: PolledOperationOptions = {},\n): Promise<FileUploadAndValidatePoller> {\n // get filename and testid from initial response\n const fileName = fileUploadResult.body.fileName;\n const requestUrl = fileUploadResult.request.url;\n const testId = requestUrl.substring(\n requestUrl.indexOf(\"tests/\") + 6,\n requestUrl.lastIndexOf(\"/files\"),\n );\n type Handler = (state: OperationState<LoadTestAdministrationGetTestFile200Response>) => void;\n\n const state: OperationState<LoadTestAdministrationGetTestFile200Response> = {\n status: \"notStarted\",\n };\n\n const progressCallbacks = new Map<symbol, Handler>();\n const processProgressCallbacks = async (): Promise<void> =>\n progressCallbacks.forEach((h) => h(state));\n let resultPromise: Promise<LoadTestAdministrationGetTestFile200Response> | undefined;\n let cancelJob: (() => void) | undefined;\n const abortController = new AbortController();\n const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000;\n\n const poller: SimplePollerLike<\n OperationState<LoadTestAdministrationGetTestFile200Response>,\n LoadTestAdministrationGetTestFile200Response\n > = {\n async poll(options?: {\n abortSignal?: AbortSignalLike;\n }): Promise<OperationState<LoadTestAdministrationGetTestFile200Response>> {\n if (options?.abortSignal?.aborted) {\n throw new AbortError(\"The polling was aborted.\");\n }\n\n if (fileName) {\n const fileValidationResponse = await client\n .path(\"/tests/{testId}/files/{fileName}\", testId, fileName)\n .get();\n if (isUnexpected(fileValidationResponse)) {\n state.status = \"failed\";\n state.error = new Error(fileValidationResponse.body.error.message);\n return state;\n }\n\n switch (fileValidationResponse.body.validationStatus) {\n case \"NOT_VALIDATED\": {\n state.status = \"succeeded\";\n break;\n }\n case \"VALIDATION_INITIATED\": {\n state.status = \"running\";\n break;\n }\n case \"VALIDATION_SUCCESS\":\n case \"VALIDATION_NOT_REQUIRED\": {\n state.status = \"succeeded\";\n break;\n }\n case \"VALIDATION_FAILURE\": {\n state.status = \"failed\";\n state.error = new Error(fileValidationResponse.body.validationFailureDetails);\n break;\n }\n }\n state.result = fileValidationResponse;\n\n await processProgressCallbacks();\n }\n return state;\n },\n\n pollUntilDone(pollOptions?: {\n abortSignal?: AbortSignalLike;\n }): Promise<LoadTestAdministrationGetTestFile200Response> {\n return (resultPromise ??= (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n // In the future we can use AbortSignal.any() instead\n function abortListener(): void {\n abortController.abort();\n }\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, { once: true });\n }\n\n try {\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n const delay = sleep(currentPollIntervalInMs, abortSignal);\n cancelJob = () => abortController.abort();\n await delay;\n await poller.poll({ abortSignal });\n }\n }\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n switch (state.status) {\n case \"succeeded\":\n case \"failed\":\n case \"canceled\": {\n return poller.getResult() as LoadTestAdministrationGetTestFile200Response;\n }\n case \"notStarted\":\n case \"running\": {\n // Unreachable\n throw new Error(`polling completed without succeeding or failing`);\n }\n }\n })().finally(() => {\n resultPromise = undefined;\n }));\n },\n\n onProgress(\n callback: (state: OperationState<LoadTestAdministrationGetTestFile200Response>) => void,\n ): CancelOnProgress {\n const s = Symbol();\n progressCallbacks.set(s, callback);\n\n return () => progressCallbacks.delete(s);\n },\n\n isDone(): boolean {\n return [\"succeeded\", \"failed\", \"canceled\"].includes(state.status);\n },\n\n stopPolling(): void {\n abortController.abort();\n cancelJob?.();\n },\n\n isStopped(): boolean {\n return resultPromise === undefined;\n },\n\n getOperationState(): OperationState<LoadTestAdministrationGetTestFile200Response> {\n return state;\n },\n\n getResult(): LoadTestAdministrationGetTestFile200Response | undefined {\n return state.result;\n },\n\n toString() {\n return JSON.stringify({ state });\n },\n async serialize(): Promise<string> {\n return JSON.stringify({ state });\n },\n async submitted(): Promise<void> {\n // No-op: the file validation is a custom poller\n },\n };\n\n return poller;\n}\n"],
5
+ "mappings": "AAIA,SAAS,kBAAkB;AAS3B,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AAQtB,eAAsB,wBACpB,QACA,kBACA,yBAAiD,CAAC,GACZ;AAEtC,QAAM,WAAW,iBAAiB,KAAK;AACvC,QAAM,aAAa,iBAAiB,QAAQ;AAC5C,QAAM,SAAS,WAAW;AAAA,IACxB,WAAW,QAAQ,QAAQ,IAAI;AAAA,IAC/B,WAAW,YAAY,QAAQ;AAAA,EACjC;AAGA,QAAM,QAAsE;AAAA,IAC1E,QAAQ;AAAA,EACV;AAEA,QAAM,oBAAoB,oBAAI,IAAqB;AACnD,QAAM,2BAA2B,YAC/B,kBAAkB,QAAQ,CAAC,MAAM,EAAE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