@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 +1,7 @@
1
- {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Load test model. */\nexport interface TestOutput {\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteriaOutput;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteriaOutput;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, SecretOutput>;\n /** Certificates metadata. */\n certificate?: CertificateMetadataOutput;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** The load test configuration. */\n loadTestConfiguration?: LoadTestConfigurationOutput;\n /** Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs */\n baselineTestRunId?: string;\n /** The input artifacts for the test. */\n readonly inputArtifacts?: TestInputArtifactsOutput;\n /** Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. */\n readonly testId: string;\n /** The test description. */\n description?: string;\n /** Display name of a test. */\n displayName?: string;\n /** Subnet ID on which the load test instances should run. */\n subnetId?: string;\n /**\n * Kind of test.\n *\n * Possible values: \"URL\", \"JMX\", \"Locust\"\n */\n kind?: TestKindOutput;\n /** Inject load test engines without deploying public IP for outbound access */\n publicIPDisabled?: boolean;\n /** Type of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityType?: string;\n /** Resource Id of the managed identity referencing the Key vault. */\n keyvaultReferenceIdentityId?: string;\n /**\n * Type of the managed identity referencing the metrics.\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n metricsReferenceIdentityType?: ManagedIdentityTypeOutput;\n /** Resource Id of the managed identity referencing the metrics. */\n metricsReferenceIdentityId?: string;\n /**\n * Type of the managed identity built in load test engines\n *\n * Possible values: \"SystemAssigned\", \"UserAssigned\"\n */\n engineBuiltInIdentityType?: ManagedIdentityTypeOutput;\n /** Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. */\n engineBuiltInIdentityIds?: string[];\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** Pass fail criteria for a test. */\nexport interface PassFailCriteriaOutput {\n /** Map of id and pass fail metrics { id : pass fail metrics }. */\n passFailMetrics?: Record<string, PassFailMetricOutput>;\n /** Map of id and pass fail server metrics { id : pass fail metrics }. */\n passFailServerMetrics?: Record<string, PassFailServerMetricOutput>;\n}\n\n/** Pass fail metric */\nexport interface PassFailMetricOutput {\n /**\n * The client metric on which the criteria should be applied.\n *\n * Possible values: \"response_time_ms\", \"latency\", \"error\", \"requests\", \"requests_per_sec\"\n */\n clientMetric?: PFMetricsOutput;\n /**\n * The aggregation function to be applied on the client metric. Allowed functions\n * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’,\n * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec,\n * ‘count’ - for requests\n *\n * Possible values: \"count\", \"percentage\", \"avg\", \"p50\", \"p75\", \"p90\", \"p95\", \"p96\", \"p97\", \"p98\", \"p99\", \"p99.9\", \"p99.99\", \"min\", \"max\"\n */\n aggregate?: PassFailAggregationFunctionOutput;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition?: string;\n /** Request name for which the Pass fail criteria has to be applied */\n requestName?: string;\n /**\n * The value to compare with the client metric. Allowed values - ‘error : [0.0 ,\n * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.\n */\n value?: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailActionOutput;\n /** The actual value of the client metric for the test run. */\n readonly actualValue?: number;\n /**\n * Outcome of the test run.\n *\n * Possible values: \"passed\", \"undetermined\", \"failed\"\n */\n readonly result?: PassFailResultOutput;\n}\n\n/** Pass fail server metric */\nexport interface PassFailServerMetricOutput {\n /** The resource id of the resource emitting the metric. */\n resourceId: string;\n /** The server metric namespace. */\n metricNamespace: string;\n /** The server metric name. */\n metricName: string;\n /** Aggregation Type */\n aggregation: string;\n /** The comparison operator. Supported types ‘>’, ‘<’ */\n condition: string;\n /** The value to compare with the server metric. */\n value: number;\n /**\n * Action taken after the threshold is met. Default is ‘continue’.\n *\n * Possible values: \"continue\", \"stop\"\n */\n action?: PassFailActionOutput;\n /** The actual value of the server metric */\n readonly actualValue?: number;\n /**\n * Outcome of the test run.\n *\n * Possible values: \"passed\", \"undetermined\", \"failed\"\n */\n readonly result?: PassFailResultOutput;\n}\n\n/** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\nexport interface AutoStopCriteriaOutput {\n /** Whether auto-stop should be disabled. The default value is false. */\n autoStopDisabled?: boolean;\n /** Threshold percentage of errors on which test run should be automatically stopped. Allowed values are in range of 0.0-100.0 */\n errorRate?: number;\n /** Time window during which the error percentage should be evaluated in seconds. */\n errorRateTimeWindowInSeconds?: number;\n}\n\n/** Secret */\nexport interface SecretOutput {\n /** The value of the secret for the respective type */\n value?: string;\n /**\n * Type of secret\n *\n * Possible values: \"AKV_SECRET_URI\", \"SECRET_VALUE\"\n */\n type?: SecretTypeOutput;\n}\n\n/** Certificates metadata */\nexport interface CertificateMetadataOutput {\n /** The value of the certificate for respective type */\n value?: string;\n /**\n * Type of certificate\n *\n * Possible values: \"AKV_CERT_URI\"\n */\n type?: CertificateTypeOutput;\n /** Name of the certificate. */\n name?: string;\n}\n\n/** Configurations for the load test. */\nexport interface LoadTestConfigurationOutput {\n /** The number of engine instances to execute load test. Supported values are in range of 1-400. Required for creating a new test. */\n engineInstances?: number;\n /**\n * If false, Azure Load Testing copies and processes your input files unmodified\n * across all test engine instances. If true, Azure Load Testing splits the CSV\n * input data evenly across all engine instances. If you provide multiple CSV\n * files, each file will be split evenly.\n */\n splitAllCSVs?: boolean;\n /**\n * If true, optionalLoadTestConfig is required and JMX script for the load test is\n * not required to upload.\n */\n quickStartTest?: boolean;\n /** Configuration for quick load test */\n optionalLoadTestConfig?: OptionalLoadTestConfigurationOutput;\n /** Region distribution configuration for the load test. */\n regionalLoadTestConfig?: Array<RegionalConfigurationOutput>;\n}\n\n/** Configuration for quick load test */\nexport interface OptionalLoadTestConfigurationOutput {\n /** Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login */\n endpointUrl?: string;\n /** Target throughput (requests per second). This may not be necessarily achieved. The actual throughput will be lower if the application is not capable of handling it. */\n requestsPerSecond?: number;\n /** Maximum response time in milliseconds of the API/endpoint. */\n maxResponseTimeInMs?: number;\n /** No of concurrent virtual users. */\n virtualUsers?: number;\n /** Ramp up time in seconds. */\n rampUpTime?: number;\n /** Test run duration in seconds. */\n duration?: number;\n}\n\n/** Region distribution configuration for the load test. */\nexport interface RegionalConfigurationOutput {\n /** The number of engine instances to execute load test in specified region. Supported values are in range of 1-400. */\n engineInstances: number;\n /**\n * Azure region name.\n * The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\n * The region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.\n */\n region: string;\n}\n\n/** The input artifacts for the test. */\nexport interface TestInputArtifactsOutput {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestFileInfoOutput;\n /** The test script file for the test run */\n testScriptFileInfo?: TestFileInfoOutput;\n /** The user properties file */\n userPropFileInfo?: TestFileInfoOutput;\n /** The zip file with all input artifacts */\n inputArtifactsZipFileInfo?: TestFileInfoOutput;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestFileInfoOutput;\n /** Additional supported files for the test run */\n readonly additionalFileInfo?: Array<TestFileInfoOutput>;\n}\n\n/** Test file info. */\nexport interface TestFileInfoOutput {\n /** Name of the file. */\n fileName: string;\n /** File URL. */\n readonly url?: string;\n /**\n * File type\n *\n * Possible values: \"JMX_FILE\", \"USER_PROPERTIES\", \"ADDITIONAL_ARTIFACTS\", \"ZIPPED_ARTIFACTS\", \"URL_TEST_CONFIG\", \"TEST_SCRIPT\"\n */\n readonly fileType?: FileTypeOutput;\n /** Expiry time of the file (RFC 3339 literal format) */\n readonly expireDateTime?: string;\n /**\n * Validation status of the file\n *\n * Possible values: \"NOT_VALIDATED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\", \"VALIDATION_INITIATED\", \"VALIDATION_NOT_REQUIRED\"\n */\n readonly validationStatus?: FileValidationStatusOutput;\n /** Validation failure error details */\n readonly validationFailureDetails?: string;\n}\n\n/** Paged collection of Test items */\nexport interface PagedTestOutput {\n /** The Test items on this page */\n value: Array<TestOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Paged collection of TestFileInfo items */\nexport interface PagedTestFileInfoOutput {\n /** The TestFileInfo items on this page */\n value: Array<TestFileInfoOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Test app components */\nexport interface TestAppComponentsOutput {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponentOutput>;\n /** Test identifier */\n readonly testId?: string;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** An Azure resource object (Refer azure generic resource model :https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */\nexport interface AppComponentOutput {\n /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */\n readonly resourceId: string;\n /** Azure resource name, required while creating the app component. */\n resourceName: string;\n /** Azure resource type, required while creating the app component. */\n resourceType: string;\n /** Azure resource display name */\n displayName?: string;\n /** Resource group name of the Azure resource */\n readonly resourceGroup?: string;\n /** Subscription Id of the Azure resource */\n readonly subscriptionId?: string;\n /** Kind of Azure resource type */\n kind?: string;\n}\n\n/** Test server metrics configuration */\nexport interface TestServerMetricsConfigurationOutput {\n /** Test identifier */\n readonly testId?: string;\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics: Record<string, ResourceMetricOutput>;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/**\n * Associated metric definition for particular metrics of the azure resource (\n * Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition).\n */\nexport interface ResourceMetricOutput {\n /** Unique name for metric. */\n readonly id?: string;\n /** Azure resource id. */\n resourceId: string;\n /** Metric name space. */\n metricNamespace: string;\n /** Metric description. */\n displayDescription?: string;\n /** The invariant value of metric name */\n name: string;\n /** Metric aggregation. */\n aggregation: string;\n /** Metric unit. */\n unit?: string;\n /** Azure resource type. */\n resourceType: string;\n}\n\n/** The Test Profile Model. A Test Profile resource enables you to set up a test profile which contains various configurations for a supported resource type and a load test to execute on that resource. */\nexport interface TestProfileOutput {\n /** Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. */\n readonly testProfileId: string;\n /** Display name of the test profile. */\n displayName?: string;\n /** Description for the test profile. */\n description?: string;\n /** Associated test ID for the test profile. This property is required for creating a Test Profile and it's not allowed to be updated. */\n testId?: string;\n /** Target resource ID on which the test profile is created. This property is required for creating a Test Profile and it's not allowed to be updated. */\n targetResourceId?: string;\n /** Configurations of the target resource on which testing would be done. */\n targetResourceConfigurations?: TargetResourceConfigurationsOutput;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport interface TargetResourceConfigurationsOutputParent {\n kind: ResourceKindOutput;\n}\n\n/** Configurations for a Function App using Flex Consumption Plan. */\nexport interface FunctionFlexConsumptionTargetResourceConfigurationsOutput\n extends TargetResourceConfigurationsOutputParent {\n /**\n * The kind value to use when providing configuration.\n * This should typically be not changed from its value.\n */\n kind: \"FunctionsFlexConsumption\";\n /** A map of configurations for a Function app using Flex Consumption Plan. */\n configurations?: Record<string, FunctionFlexConsumptionResourceConfigurationOutput>;\n}\n\n/** Resource configuration instance for a Flex Consumption based Azure Function App. */\nexport interface FunctionFlexConsumptionResourceConfigurationOutput {\n /** Memory size of the instance. Supported values are 2048, 4096. */\n instanceMemoryMB: number;\n /** HTTP Concurrency for the function app. */\n httpConcurrency?: number;\n}\n\n/** Paged collection of TestProfile items */\nexport interface PagedTestProfileOutput {\n /** The TestProfile items on this page */\n value: Array<TestProfileOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Load test run model */\nexport interface TestRunOutput {\n /** Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. */\n readonly testRunId: string;\n /** Pass fail criteria for a test. */\n passFailCriteria?: PassFailCriteriaOutput;\n /** Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. */\n autoStopCriteria?: AutoStopCriteriaOutput;\n /**\n * Secrets can be stored in an Azure Key Vault or any other secret store. If the\n * secret is stored in an Azure Key Vault, the value should be the secret\n * identifier and the type should be AKV_SECRET_URI. If the secret is stored\n * elsewhere, the secret value should be provided directly and the type should be\n * SECRET_VALUE.\n */\n secrets?: Record<string, SecretOutput>;\n /** Certificates metadata */\n certificate?: CertificateMetadataOutput;\n /** Environment variables which are defined as a set of <name,value> pairs. */\n environmentVariables?: Record<string, string>;\n /** Error details if there is any failure in load test run */\n readonly errorDetails?: Array<ErrorDetailsOutput>;\n /**\n * Test run statistics. Key is the sampler name and value is the set of statistics for performance metrics like response time, throughput, etc. from the load test run.\n * The sampler name is the same as the name mentioned in the test script.\n * Sampler name \"Total\" represents the aggregated statistics of all the samplers.\n */\n readonly testRunStatistics?: Record<string, TestRunStatisticsOutput>;\n /**\n * Regional statistics. Key is the Azure region name and value is the test run statistics.\n * The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as \"eastus\".\n * The region name must match one of the strings in the \"Name\" column returned from running the \"az account list-locations -o table\" Azure CLI command.\n */\n readonly regionalStatistics?: Record<string, TestRunStatisticsOutput>;\n /** The load test configuration. */\n readonly loadTestConfiguration?: LoadTestConfigurationOutput;\n /** Collection of test run artifacts */\n readonly testArtifacts?: TestRunArtifactsOutput;\n /**\n * Test result for pass/Fail criteria used during the test run.\n *\n * Possible values: \"PASSED\", \"NOT_APPLICABLE\", \"FAILED\"\n */\n readonly testResult?: PassFailTestResultOutput;\n /** Number of virtual users, for which test has been run. */\n readonly virtualUsers?: number;\n /** Display name of a testRun. */\n displayName?: string;\n /** Associated test Id. */\n testId?: string;\n /** The test run description. */\n description?: string;\n /**\n * The test run status.\n *\n * Possible values: \"ACCEPTED\", \"NOTSTARTED\", \"PROVISIONING\", \"PROVISIONED\", \"CONFIGURING\", \"CONFIGURED\", \"EXECUTING\", \"EXECUTED\", \"DEPROVISIONING\", \"DEPROVISIONED\", \"DONE\", \"CANCELLING\", \"CANCELLED\", \"FAILED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\"\n */\n readonly status?: TestRunStatusOutput;\n /** The test run start DateTime(RFC 3339 literal format). */\n readonly startDateTime?: string;\n /** The test run end DateTime(RFC 3339 literal format). */\n readonly endDateTime?: string;\n /** Test run initiated time. */\n readonly executedDateTime?: string;\n /** Portal url. */\n readonly portalUrl?: string;\n /** Test run duration in milliseconds. */\n readonly duration?: number;\n /** Virtual user hours consumed by the test run. */\n readonly virtualUserHours?: number;\n /** Subnet ID on which the load test instances should run. */\n readonly subnetId?: string;\n /**\n * Type of test.\n *\n * Possible values: \"URL\", \"JMX\", \"Locust\"\n */\n readonly kind?: TestKindOutput;\n /**\n * Request data collection level for test run\n *\n * Possible values: \"NONE\", \"ERRORS\"\n */\n requestDataLevel?: RequestDataLevelOutput;\n /** Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise */\n debugLogsEnabled?: boolean;\n /** Inject load test engines without deploying public IP for outbound access */\n readonly publicIPDisabled?: boolean;\n /**\n * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc).\n *\n * Possible values: \"User\", \"ScheduledTrigger\"\n */\n createdByType?: CreatedByTypeOutput;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** Error details if there is any failure in load test run */\nexport interface ErrorDetailsOutput {\n /** Error details in case test run was not successfully run. */\n readonly message?: string;\n}\n\n/** Test run statistics. */\nexport interface TestRunStatisticsOutput {\n /** Transaction name. */\n readonly transaction?: string;\n /** Sampler count. */\n readonly sampleCount?: number;\n /** Error count. */\n readonly errorCount?: number;\n /** Error percentage. */\n readonly errorPct?: number;\n /** Mean response time. */\n readonly meanResTime?: number;\n /** Median response time. */\n readonly medianResTime?: number;\n /** Max response time. */\n readonly maxResTime?: number;\n /** Minimum response time. */\n readonly minResTime?: number;\n /** 90 percentile response time. */\n readonly pct1ResTime?: number;\n /** 95 percentile response time. */\n readonly pct2ResTime?: number;\n /** 99 percentile response time. */\n readonly pct3ResTime?: number;\n /** 75 percentile response time. */\n readonly pct75ResTime?: number;\n /** 96 percentile response time. */\n readonly pct96ResTime?: number;\n /** 97 percentile response time. */\n readonly pct97ResTime?: number;\n /** 98 percentile response time. */\n readonly pct98ResTime?: number;\n /** 99.9 percentile response time. */\n readonly pct999ResTime?: number;\n /** 99.99 percentile response time. */\n readonly pct9999ResTime?: number;\n /** Throughput. */\n readonly throughput?: number;\n /** Received network bytes. */\n readonly receivedKBytesPerSec?: number;\n /** Send network bytes. */\n readonly sentKBytesPerSec?: number;\n}\n\n/** Collection of test run artifacts */\nexport interface TestRunArtifactsOutput {\n /** The input artifacts for the test run. */\n readonly inputArtifacts?: TestRunInputArtifactsOutput;\n /** The output artifacts for the test run. */\n outputArtifacts?: TestRunOutputArtifactsOutput;\n}\n\n/** The input artifacts for the test run. */\nexport interface TestRunInputArtifactsOutput {\n /** The load test YAML file that contains the the test configuration */\n configFileInfo?: TestRunFileInfoOutput;\n /** The test script file for the test run */\n testScriptFileInfo?: TestRunFileInfoOutput;\n /** The user properties file */\n userPropFileInfo?: TestRunFileInfoOutput;\n /** The zip file for all input artifacts */\n inputArtifactsZipFileInfo?: TestRunFileInfoOutput;\n /** The config json file for url based test */\n urlTestConfigFileInfo?: TestRunFileInfoOutput;\n /** Additional supported files for the test run */\n readonly additionalFileInfo?: Array<TestRunFileInfoOutput>;\n}\n\n/** Test run file info. */\nexport interface TestRunFileInfoOutput {\n /** Name of the file. */\n fileName: string;\n /** File URL. */\n readonly url?: string;\n /**\n * File type\n *\n * Possible values: \"JMX_FILE\", \"USER_PROPERTIES\", \"ADDITIONAL_ARTIFACTS\", \"ZIPPED_ARTIFACTS\", \"URL_TEST_CONFIG\", \"TEST_SCRIPT\"\n */\n readonly fileType?: FileTypeOutput;\n /** Expiry time of the file (RFC 3339 literal format) */\n readonly expireDateTime?: string;\n /**\n * Validation status of the file\n *\n * Possible values: \"NOT_VALIDATED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\", \"VALIDATION_INITIATED\", \"VALIDATION_NOT_REQUIRED\"\n */\n readonly validationStatus?: FileValidationStatusOutput;\n /** Validation failure error details */\n readonly validationFailureDetails?: string;\n}\n\n/** The output artifacts for the test run. */\nexport interface TestRunOutputArtifactsOutput {\n /** The test run results file */\n resultFileInfo?: TestRunFileInfoOutput;\n /** The test run report with metrics */\n logsFileInfo?: TestRunFileInfoOutput;\n /** The container for test run artifacts. */\n artifactsContainerInfo?: ArtifactsContainerInfoOutput;\n /** The report file for the test run. */\n reportFileInfo?: TestRunFileInfoOutput;\n}\n\n/** Artifacts container info. */\nexport interface ArtifactsContainerInfoOutput {\n /** This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */\n url?: string;\n /** Expiry time of the container (RFC 3339 literal format) */\n expireDateTime?: string;\n}\n\n/** Paged collection of TestRun items */\nexport interface PagedTestRunOutput {\n /** The TestRun items on this page */\n value: Array<TestRunOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Represents collection of metric namespaces. */\nexport interface MetricNamespaceCollectionOutput {\n /** The values for the metric namespaces. */\n value: Array<MetricNamespaceOutput>;\n}\n\n/** Metric namespace class specifies the metadata for a metric namespace. */\nexport interface MetricNamespaceOutput {\n /** The namespace description. */\n description?: string;\n /** The metric namespace name. */\n name?: string;\n}\n\n/** Represents collection of metric definitions. */\nexport interface MetricDefinitionCollectionOutput {\n /** the values for the metric definitions. */\n value: Array<MetricDefinitionOutput>;\n}\n\n/** Metric definition */\nexport interface MetricDefinitionOutput {\n /** List of dimensions */\n dimensions?: Array<NameAndDescriptionOutput>;\n /** The metric description */\n description?: string;\n /** The metric name */\n name?: string;\n /** The namespace the metric belongs to. */\n namespace?: string;\n /**\n * The primary aggregation type value defining how to use the values for display.\n *\n * Possible values: \"Average\", \"Count\", \"None\", \"Total\", \"Percentile75\", \"Percentile90\", \"Percentile95\", \"Percentile96\", \"Percentile97\", \"Percentile98\", \"Percentile99\", \"Percentile999\", \"Percentile9999\"\n */\n primaryAggregationType?: AggregationOutput;\n /** The collection of what all aggregation types are supported. */\n supportedAggregationTypes?: string[];\n /**\n * The unit of the metric.\n *\n * Possible values: \"NotSpecified\", \"Percent\", \"Count\", \"Seconds\", \"Milliseconds\", \"Bytes\", \"BytesPerSecond\", \"CountPerSecond\"\n */\n unit?: MetricUnitOutput;\n /**\n * Metric availability specifies the time grain (aggregation interval or\n * frequency).\n */\n metricAvailabilities?: Array<MetricAvailabilityOutput>;\n}\n\n/** The name and description */\nexport interface NameAndDescriptionOutput {\n /** The description */\n description?: string;\n /** The name */\n name?: string;\n}\n\n/** Metric availability specifies the time grain (aggregation interval or frequency) */\nexport interface MetricAvailabilityOutput {\n /**\n * The time grain specifies the aggregation interval for the metric. Expressed as\n * a duration 'PT1M', 'PT1H', etc.\n *\n * Possible values: \"PT5S\", \"PT10S\", \"PT1M\", \"PT5M\", \"PT1H\"\n */\n timeGrain?: TimeGrainOutput;\n}\n\n/** The response to a metrics query. */\nexport interface MetricsOutput {\n /** The TimeSeriesElement items on this page */\n value: Array<TimeSeriesElementOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** The time series returned when a data query is performed. */\nexport interface TimeSeriesElementOutput {\n /** An array of data points representing the metric values. */\n data?: Array<MetricValueOutput>;\n /** The dimension values */\n dimensionValues?: Array<DimensionValueOutput>;\n}\n\n/** Represents a metric value. */\nexport interface MetricValueOutput {\n /** The timestamp for the metric value in RFC 3339 format. */\n timestamp?: string;\n /** The metric value. */\n value?: number;\n}\n\n/** Represents a metric dimension value. */\nexport interface DimensionValueOutput {\n /** The name of the dimension. */\n name?: string;\n /** The value of the dimension. */\n value?: string;\n}\n\n/** Metrics dimension values. */\nexport interface DimensionValueListOutput {\n /** The dimension name */\n readonly name?: string;\n /** The dimension value */\n value?: string[];\n /** Link for the next set of values in case of paginated results, if applicable. */\n nextLink?: string;\n}\n\n/** Test run app component */\nexport interface TestRunAppComponentsOutput {\n /**\n * Azure resource collection { resource id (fully qualified resource Id e.g\n * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName})\n * : resource object }\n */\n components: Record<string, AppComponentOutput>;\n /** Test run identifier */\n readonly testRunId?: string;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** Test run server metrics configuration */\nexport interface TestRunServerMetricsConfigurationOutput {\n /** Test run identifier */\n readonly testRunId?: string;\n /**\n * Azure resource metrics collection {metric id : metrics object} (Refer :\n * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition\n * for metric id).\n */\n metrics?: Record<string, ResourceMetricOutput>;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and run load tests to get recommendations on the optimal configuration for the target resource. */\nexport interface TestProfileRunOutput {\n /** Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. */\n readonly testProfileRunId: string;\n /** Display name for the test profile run. */\n displayName?: string;\n /** The test profile run description */\n description?: string;\n /** Associated test profile ID for the test profile run. This is required to create a test profile run and can't be updated. */\n testProfileId?: string;\n /** Target resource ID on which the test profile run is created */\n readonly targetResourceId?: string;\n /** Configurations of the target resource on which the test profile ran. */\n readonly targetResourceConfigurations?: TargetResourceConfigurationsOutput;\n /**\n * The test profile run status.\n *\n * Possible values: \"ACCEPTED\", \"NOTSTARTED\", \"EXECUTING\", \"DONE\", \"CANCELLING\", \"CANCELLED\", \"FAILED\"\n */\n readonly status?: TestProfileRunStatusOutput;\n /** Error details if there is any failure in test profile run. These errors are specific to the Test Profile Run. */\n readonly errorDetails?: Array<ErrorDetailsOutput>;\n /** The test profile run start DateTime(RFC 3339 literal format). */\n readonly startDateTime?: string;\n /** The test profile run end DateTime(RFC 3339 literal format). */\n readonly endDateTime?: string;\n /** Test profile run duration in seconds. */\n readonly durationInSeconds?: number;\n /**\n * Details of the test runs ran as part of the test profile run.\n * Key is the testRunId of the corresponding testRun.\n */\n readonly testRunDetails?: Record<string, TestRunDetailOutput>;\n /** Recommendations provided based on a successful test profile run. */\n readonly recommendations?: Array<TestProfileRunRecommendationOutput>;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n}\n\n/** Details of a particular test run for a test profile run. */\nexport interface TestRunDetailOutput {\n /**\n * Status of the test run.\n *\n * Possible values: \"ACCEPTED\", \"NOTSTARTED\", \"PROVISIONING\", \"PROVISIONED\", \"CONFIGURING\", \"CONFIGURED\", \"EXECUTING\", \"EXECUTED\", \"DEPROVISIONING\", \"DEPROVISIONED\", \"DONE\", \"CANCELLING\", \"CANCELLED\", \"FAILED\", \"VALIDATION_SUCCESS\", \"VALIDATION_FAILURE\"\n */\n status: TestRunStatusOutput;\n /** ID of the configuration on which the test ran. */\n configurationId: string;\n /** Key value pair of extra properties associated with the test run. */\n properties: Record<string, string>;\n}\n\n/** A recommendation object that provides a list of configuration that optimizes its category. */\nexport interface TestProfileRunRecommendationOutput {\n /**\n * Category of the recommendation.\n *\n * Possible values: \"ThroughputOptimized\", \"CostOptimized\"\n */\n category: RecommendationCategoryOutput;\n /** List of configurations IDs for which the recommendation is applicable. These are a subset of the provided target resource configurations. */\n configurations?: string[];\n}\n\n/** Paged collection of TestProfileRun items */\nexport interface PagedTestProfileRunOutput {\n /** The TestProfileRun items on this page */\n value: Array<TestProfileRunOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Trigger model. */\nexport interface TriggerOutputParent {\n /** The unique identifier of the trigger. */\n readonly triggerId: string;\n /** The name of the trigger. */\n displayName: string;\n /** The description of the trigger. */\n description?: string;\n /**\n * The current state of the trigger.\n *\n * Possible values: \"Active\", \"Paused\", \"Completed\", \"Disabled\"\n */\n state?: TriggerStateOutput;\n /** Details of current state of the trigger. */\n readonly stateDetails?: StateDetailsOutput;\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n kind: TriggerTypeOutput;\n}\n\n/** State details of the trigger. */\nexport interface StateDetailsOutput {\n /** The error message if the trigger is in disabled state. */\n message?: string;\n}\n\n/** ScheduleTestsTrigger model. */\nexport interface ScheduleTestsTriggerOutput extends TriggerOutputParent {\n /** The type of the trigger is ScheduleTestsTrigger. */\n kind: \"ScheduleTestsTrigger\";\n /** The test id of test to be triggered by this schedule trigger. Currently only one test is supported for a trigger. */\n testIds: string[];\n /** Start date time of the trigger in UTC timezone. (RFC 3339 literal format) */\n startDateTime?: string;\n readonly recurrenceStatus?: RecurrenceStatusOutput;\n /** Recurrence details of the trigger. Null if schedule is not recurring. */\n recurrence?: RecurrenceOutput;\n}\n\n/** Actual state of the recurrence for the trigger. */\nexport interface RecurrenceStatusOutput {\n /** The number of occurrences remaining for the trigger. Null if recurrence end has end date instead of number of occurrences. */\n remainingOccurrences?: number;\n /** The next three execution times of the trigger. (RFC 3339 literal format) */\n nextScheduledDateTimes?: string[];\n}\n\n/** Recurrence model. */\nexport interface RecurrenceOutputParent {\n /** Recurrence end model. You can specify the end either by providing a numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an endDateTime (which will end the recurrence after the specified date). If neither value is provided, the recurrence will continue until it is manually ended. However, if both values are provided, an error will be thrown. */\n recurrenceEnd?: RecurrenceEndOutput;\n frequency: FrequencyOutput;\n}\n\n/** Recurrence end model. Either provide numberOfOccurrences if you want recurrence to end after a specified number of occurrences or provide endDate if you want recurrence to end after a specified end date. If both values are provided, a validation error will be thrown indicating that only one field should be provided. If neither value is provided, the recurrence will end when manually ended. */\nexport interface RecurrenceEndOutput {\n /** Number of occurrences after which the recurrence will end. */\n numberOfOccurrences?: number;\n /** The date after which the recurrence will end. (RFC 3339 literal format) */\n endDateTime?: string;\n}\n\n/** Recurrence model when frequency is set as Daily. */\nexport interface DailyRecurrenceOutput extends RecurrenceOutputParent {\n /** Frequency of the day recurrence. */\n frequency: \"Daily\";\n /** The interval at which the recurrence should repeat. It signifies the number of days between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as Hourly. */\nexport interface HourlyRecurrenceOutput extends RecurrenceOutputParent {\n /** Frequency of the hour recurrence. */\n frequency: \"Hourly\";\n /** The interval at which the recurrence should repeat. It signifies the number of hours between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDays . */\nexport interface MonthlyRecurrenceByWeekDaysOutput extends RecurrenceOutputParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDays\";\n /** Specific days of the week when the recurrence should repeat. */\n weekDaysInMonth?: WeekDaysOutput[];\n /** Index of the week in a month at which the recurrence should repeat. For example, if the index is '2', weekDay is 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second Monday of the month and repeat every 3 months. Value of index can be 1 to 5. */\n index: number;\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval: number;\n}\n\n/** Recurrence model when frequency is set as MonthlyByDates. */\nexport interface MonthlyRecurrenceByDatesOutput extends RecurrenceOutputParent {\n /** Frequency of the month recurrence. */\n frequency: \"MonthlyByDates\";\n /** Recurrence set to repeat on the specified dates of the month. Value of dates can be 1 to 31 and -1. -1 represents the last day of the month. */\n datesInMonth?: number[];\n /** The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. */\n interval?: number;\n}\n\n/** Recurrence is set based on cron expression. */\nexport interface RecurrenceWithCronOutput extends RecurrenceOutputParent {\n /** Specify frequency using a cron expression. */\n frequency: \"Cron\";\n /** Cron expression for the recurrence. */\n cronExpression: string;\n}\n\n/** Recurrence model when frequency is set as weekly. */\nexport interface WeeklyRecurrenceOutput extends RecurrenceOutputParent {\n /** Frequency of the week recurrence. */\n frequency: \"Weekly\";\n /** Recurrence set to repeat on the specified days of the week. */\n daysOfWeek?: WeekDaysOutput[];\n /** The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence. */\n interval?: number;\n}\n\n/** Paged collection of Trigger items */\nexport interface PagedTriggerOutput {\n /** The Trigger items on this page */\n value: Array<TriggerOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Notification rule model. */\nexport interface NotificationRuleOutputParent {\n /** The unique identifier of the notification rule. */\n readonly notificationRuleId: string;\n /** The name of the notification rule. */\n displayName: string;\n /** The action groups to notify. */\n actionGroupIds: string[];\n /** The creation datetime(RFC 3339 literal format). */\n readonly createdDateTime?: string;\n /** The user that created. */\n readonly createdBy?: string;\n /** The last Modified datetime(RFC 3339 literal format). */\n readonly lastModifiedDateTime?: string;\n /** The user that last modified. */\n readonly lastModifiedBy?: string;\n scope: NotificationScopeTypeOutput;\n}\n\n/** Tests Notification rule model. */\nexport interface TestsNotificationRuleOutput extends NotificationRuleOutputParent {\n /** Scope of type Tests. */\n scope: \"Tests\";\n /** The test ids to include. If not provided, notification will be sent for all testIds. */\n testIds?: string[];\n /**\n * The event to receive notifications for along with filtering conditions.\n * Key is a user-assigned identifier for the event filter.\n */\n eventFilters: Record<string, TestsNotificationEventFilterOutput>;\n}\n\n/** The notification event filter for Tests scope. */\nexport interface TestsNotificationEventFilterOutputParent {\n kind: NotificationEventTypeOutput;\n}\n\n/** The notification event filter when the event type is TestRunEnded and scope is Tests. */\nexport interface TestRunEndedNotificationEventFilterOutput\n extends TestsNotificationEventFilterOutputParent {\n /** Event type for test run ended event. */\n kind: \"TestRunEnded\";\n /** Event filtering condition. */\n condition?: TestRunEndedEventConditionOutput;\n}\n\n/** TestRunEnded Event condition. */\nexport interface TestRunEndedEventConditionOutput {\n /** The test run statuses to send notification for. */\n testRunStatuses?: TestRunStatusOutput[];\n /** The test run results to send notification for. */\n testRunResults?: PassFailTestResultOutput[];\n}\n\n/** The notification event filter when the event type is TestRunStarted and scope is Tests. */\nexport interface TestRunStartedNotificationEventFilterOutput\n extends TestsNotificationEventFilterOutputParent {\n /** Event type for test run started event. */\n kind: \"TestRunStarted\";\n}\n\n/** The notification event filter when the event type is TriggerCompleted. */\nexport interface TriggerCompletedNotificationEventFilterOutput\n extends TestsNotificationEventFilterOutputParent {\n /** Event type for trigger ended event. */\n kind: \"TriggerCompleted\";\n}\n\n/** The notification event filter when the event type is TriggerDisabled. */\nexport interface TriggerDisabledNotificationEventFilterOutput\n extends TestsNotificationEventFilterOutputParent {\n /** Event type for trigger disabled event. */\n kind: \"TriggerDisabled\";\n}\n\n/** Paged collection of NotificationRule items */\nexport interface PagedNotificationRuleOutput {\n /** The NotificationRule items on this page */\n value: Array<NotificationRuleOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Configurations of a target resource. This varies with the kind of resource. */\nexport type TargetResourceConfigurationsOutput =\n | TargetResourceConfigurationsOutputParent\n | FunctionFlexConsumptionTargetResourceConfigurationsOutput;\n/** Trigger model. */\nexport type TriggerOutput = TriggerOutputParent | ScheduleTestsTriggerOutput;\n/** Recurrence model. */\nexport type RecurrenceOutput =\n | RecurrenceOutputParent\n | DailyRecurrenceOutput\n | HourlyRecurrenceOutput\n | MonthlyRecurrenceByWeekDaysOutput\n | MonthlyRecurrenceByDatesOutput\n | RecurrenceWithCronOutput\n | WeeklyRecurrenceOutput;\n/** Notification rule model. */\nexport type NotificationRuleOutput = NotificationRuleOutputParent | TestsNotificationRuleOutput;\n/** The notification event filter for Tests scope. */\nexport type TestsNotificationEventFilterOutput =\n | TestsNotificationEventFilterOutputParent\n | TestRunEndedNotificationEventFilterOutput\n | TestRunStartedNotificationEventFilterOutput\n | TriggerCompletedNotificationEventFilterOutput\n | TriggerDisabledNotificationEventFilterOutput;\n/** Alias for PFMetricsOutput */\nexport type PFMetricsOutput = string;\n/** Alias for PassFailAggregationFunctionOutput */\nexport type PassFailAggregationFunctionOutput = string;\n/** Alias for PassFailActionOutput */\nexport type PassFailActionOutput = string;\n/** Alias for PassFailResultOutput */\nexport type PassFailResultOutput = string;\n/** Alias for SecretTypeOutput */\nexport type SecretTypeOutput = string;\n/** Alias for CertificateTypeOutput */\nexport type CertificateTypeOutput = string;\n/** Alias for FileTypeOutput */\nexport type FileTypeOutput = string;\n/** Alias for FileValidationStatusOutput */\nexport type FileValidationStatusOutput = string;\n/** Alias for TestKindOutput */\nexport type TestKindOutput = string;\n/** Alias for ManagedIdentityTypeOutput */\nexport type ManagedIdentityTypeOutput = string;\n/** Alias for ResourceKindOutput */\nexport type ResourceKindOutput = string;\n/** Alias for PassFailTestResultOutput */\nexport type PassFailTestResultOutput = string;\n/** Alias for TestRunStatusOutput */\nexport type TestRunStatusOutput = string;\n/** Alias for RequestDataLevelOutput */\nexport type RequestDataLevelOutput = string;\n/** Alias for CreatedByTypeOutput */\nexport type CreatedByTypeOutput = string;\n/** Alias for AggregationOutput */\nexport type AggregationOutput = string;\n/** Alias for MetricUnitOutput */\nexport type MetricUnitOutput = string;\n/** Alias for TimeGrainOutput */\nexport type TimeGrainOutput = string;\n/** Alias for TestProfileRunStatusOutput */\nexport type TestProfileRunStatusOutput = string;\n/** Alias for RecommendationCategoryOutput */\nexport type RecommendationCategoryOutput = string;\n/** Alias for TriggerTypeOutput */\nexport type TriggerTypeOutput = string;\n/** Alias for TriggerStateOutput */\nexport type TriggerStateOutput = string;\n/** Alias for FrequencyOutput */\nexport type FrequencyOutput = string;\n/** Alias for WeekDaysOutput */\nexport type WeekDaysOutput = string;\n/** Alias for NotificationScopeTypeOutput */\nexport type NotificationScopeTypeOutput = string;\n/** Alias for NotificationEventTypeOutput */\nexport type NotificationEventTypeOutput = string;\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,167 +1,107 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
4
1
  import { createRestError } from "@azure-rest/core-client";
5
- /**
6
- * returns an async iterator that iterates over results. It also has a `byPage`
7
- * method that returns pages of items at once.
8
- *
9
- * @param pagedResult - an object that specifies how to get pages.
10
- * @returns a paged async iterator that iterates over results.
11
- */
12
2
  function getPagedAsyncIterator(pagedResult) {
13
- var _a;
14
- const iter = getItemAsyncIterator(pagedResult);
15
- return {
16
- next() {
17
- return iter.next();
18
- },
19
- [Symbol.asyncIterator]() {
20
- return this;
21
- },
22
- byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
23
- const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
24
- return getPageAsyncIterator(pagedResult, {
25
- pageLink: continuationToken,
26
- });
27
- }),
28
- };
3
+ const iter = getItemAsyncIterator(pagedResult);
4
+ return {
5
+ next() {
6
+ return iter.next();
7
+ },
8
+ [Symbol.asyncIterator]() {
9
+ return this;
10
+ },
11
+ byPage: pagedResult?.byPage ?? ((settings) => {
12
+ const { continuationToken } = settings ?? {};
13
+ return getPageAsyncIterator(pagedResult, {
14
+ pageLink: continuationToken
15
+ });
16
+ })
17
+ };
29
18
  }
30
- function getItemAsyncIterator(pagedResult) {
31
- return __asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
32
- var _a, e_1, _b, _c, _d, e_2, _e, _f;
33
- const pages = getPageAsyncIterator(pagedResult);
34
- const firstVal = yield __await(pages.next());
35
- // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is
36
- if (!Array.isArray(firstVal.value)) {
37
- // can extract elements from this page
38
- const { toElements } = pagedResult;
39
- if (toElements) {
40
- yield __await(yield* __asyncDelegator(__asyncValues(toElements(firstVal.value))));
41
- try {
42
- for (var _g = true, pages_1 = __asyncValues(pages), pages_1_1; pages_1_1 = yield __await(pages_1.next()), _a = pages_1_1.done, !_a; _g = true) {
43
- _c = pages_1_1.value;
44
- _g = false;
45
- const page = _c;
46
- yield __await(yield* __asyncDelegator(__asyncValues(toElements(page))));
47
- }
48
- }
49
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
50
- finally {
51
- try {
52
- if (!_g && !_a && (_b = pages_1.return)) yield __await(_b.call(pages_1));
53
- }
54
- finally { if (e_1) throw e_1.error; }
55
- }
56
- }
57
- else {
58
- yield yield __await(firstVal.value);
59
- // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case
60
- yield __await(yield* __asyncDelegator(__asyncValues(pages)));
61
- }
62
- }
63
- else {
64
- yield __await(yield* __asyncDelegator(__asyncValues(firstVal.value)));
65
- try {
66
- for (var _h = true, pages_2 = __asyncValues(pages), pages_2_1; pages_2_1 = yield __await(pages_2.next()), _d = pages_2_1.done, !_d; _h = true) {
67
- _f = pages_2_1.value;
68
- _h = false;
69
- const page = _f;
70
- // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,
71
- // it must be the case that `TPage = TElement[]`
72
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
73
- }
74
- }
75
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
76
- finally {
77
- try {
78
- if (!_h && !_d && (_e = pages_2.return)) yield __await(_e.call(pages_2));
79
- }
80
- finally { if (e_2) throw e_2.error; }
81
- }
82
- }
83
- });
19
+ async function* getItemAsyncIterator(pagedResult) {
20
+ const pages = getPageAsyncIterator(pagedResult);
21
+ const firstVal = await pages.next();
22
+ if (!Array.isArray(firstVal.value)) {
23
+ const { toElements } = pagedResult;
24
+ if (toElements) {
25
+ yield* toElements(firstVal.value);
26
+ for await (const page of pages) {
27
+ yield* toElements(page);
28
+ }
29
+ } else {
30
+ yield firstVal.value;
31
+ yield* pages;
32
+ }
33
+ } else {
34
+ yield* firstVal.value;
35
+ for await (const page of pages) {
36
+ yield* page;
37
+ }
38
+ }
84
39
  }
85
- function getPageAsyncIterator(pagedResult_1) {
86
- return __asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
87
- const { pageLink } = options;
88
- let response = yield __await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
89
- if (!response) {
90
- return yield __await(void 0);
91
- }
92
- yield yield __await(response.page);
93
- while (response.nextPageLink) {
94
- response = yield __await(pagedResult.getPage(response.nextPageLink));
95
- if (!response) {
96
- return yield __await(void 0);
97
- }
98
- yield yield __await(response.page);
99
- }
100
- });
40
+ async function* getPageAsyncIterator(pagedResult, options = {}) {
41
+ const { pageLink } = options;
42
+ let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
43
+ if (!response) {
44
+ return;
45
+ }
46
+ yield response.page;
47
+ while (response.nextPageLink) {
48
+ response = await pagedResult.getPage(response.nextPageLink);
49
+ if (!response) {
50
+ return;
51
+ }
52
+ yield response.page;
53
+ }
101
54
  }
102
- /**
103
- * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
104
- * @param client - Client to use for sending the next page requests
105
- * @param initialResponse - Initial response containing the nextLink and current page of elements
106
- * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
107
- * @returns - PagedAsyncIterableIterator to iterate the elements
108
- */
109
- export function paginate(client, initialResponse, options = {}) {
110
- let firstRun = true;
111
- const itemName = "value";
112
- const nextLinkName = "nextLink";
113
- const { customGetPage } = options;
114
- const pagedResult = {
115
- firstPageLink: "",
116
- getPage: typeof customGetPage === "function"
117
- ? customGetPage
118
- : async (pageLink) => {
119
- const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
120
- firstRun = false;
121
- checkPagingRequest(result);
122
- const nextLink = getNextLink(result.body, nextLinkName);
123
- const values = getElements(result.body, itemName);
124
- return {
125
- page: values,
126
- nextPageLink: nextLink,
127
- };
128
- },
129
- };
130
- return getPagedAsyncIterator(pagedResult);
55
+ function paginate(client, initialResponse, options = {}) {
56
+ let firstRun = true;
57
+ const itemName = "value";
58
+ const nextLinkName = "nextLink";
59
+ const { customGetPage } = options;
60
+ const pagedResult = {
61
+ firstPageLink: "",
62
+ getPage: typeof customGetPage === "function" ? customGetPage : async (pageLink) => {
63
+ const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
64
+ firstRun = false;
65
+ checkPagingRequest(result);
66
+ const nextLink = getNextLink(result.body, nextLinkName);
67
+ const values = getElements(result.body, itemName);
68
+ return {
69
+ page: values,
70
+ nextPageLink: nextLink
71
+ };
72
+ }
73
+ };
74
+ return getPagedAsyncIterator(pagedResult);
131
75
  }
132
- /**
133
- * Gets for the value of nextLink in the body
134
- */
135
76
  function getNextLink(body, nextLinkName) {
136
- if (!nextLinkName) {
137
- return undefined;
138
- }
139
- const nextLink = body[nextLinkName];
140
- if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
141
- throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
142
- }
143
- return nextLink;
77
+ if (!nextLinkName) {
78
+ return void 0;
79
+ }
80
+ const nextLink = body[nextLinkName];
81
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
82
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
83
+ }
84
+ return nextLink;
144
85
  }
145
- /**
146
- * Gets the elements of the current request in the body.
147
- */
148
86
  function getElements(body, itemName) {
149
- const value = body[itemName];
150
- // value has to be an array according to the x-ms-pageable extension.
151
- // The fact that this must be an array is used above to calculate the
152
- // type of elements in the page in PaginateReturn
153
- if (!Array.isArray(value)) {
154
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
155
- }
156
- return value !== null && value !== void 0 ? value : [];
87
+ const value = body[itemName];
88
+ if (!Array.isArray(value)) {
89
+ throw new Error(
90
+ `Couldn't paginate response
91
+ Body doesn't contain an array property with name: ${itemName}`
92
+ );
93
+ }
94
+ return value ?? [];
157
95
  }
158
- /**
159
- * Checks if a request failed
160
- */
161
96
  function checkPagingRequest(response) {
162
- const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
163
- if (!Http2xxStatusCodes.includes(response.status)) {
164
- throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
165
- }
97
+ const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
98
+ if (!Http2xxStatusCodes.includes(response.status)) {
99
+ throw createRestError(
100
+ `Pagination failed with unexpected statusCode ${response.status}`,
101
+ response
102
+ );
103
+ }
166
104
  }
167
- //# sourceMappingURL=paginateHelper.js.map
105
+ export {
106
+ paginate
107
+ };
@@ -1 +1,7 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/loadtesting/load-testing-rest/src/paginateHelper.ts"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (pageLink: string) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"],
5
+ "mappings": "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",
6
+ "names": []
7
+ }