@azure-rest/communication-job-router 1.1.0-beta.1 → 1.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/README.md +168 -115
  2. package/dist/browser/azureCommunicationRoutingServiceClient.d.ts +14 -0
  3. package/dist/browser/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
  4. package/dist/browser/azureCommunicationRoutingServiceClient.js +40 -0
  5. package/dist/browser/azureCommunicationRoutingServiceClient.js.map +1 -0
  6. package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
  7. package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
  8. package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
  9. package/dist/browser/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
  10. package/dist/browser/clientDefinitions.d.ts +159 -0
  11. package/dist/browser/clientDefinitions.d.ts.map +1 -0
  12. package/dist/browser/clientDefinitions.js +4 -0
  13. package/dist/browser/clientDefinitions.js.map +1 -0
  14. package/dist/browser/index.d.ts +11 -0
  15. package/dist/browser/index.d.ts.map +1 -0
  16. package/dist/browser/index.js +13 -0
  17. package/dist/browser/index.js.map +1 -0
  18. package/dist/browser/isUnexpected.d.ts +35 -0
  19. package/dist/browser/isUnexpected.d.ts.map +1 -0
  20. package/{dist-esm/src → dist/browser}/isUnexpected.js +1 -1
  21. package/dist/browser/isUnexpected.js.map +1 -0
  22. package/dist/browser/logger.d.ts +2 -0
  23. package/dist/browser/logger.d.ts.map +1 -0
  24. package/{dist-esm/src → dist/browser}/logger.js +1 -1
  25. package/{dist-esm/src → dist/browser}/logger.js.map +1 -1
  26. package/dist/browser/models.d.ts +562 -0
  27. package/dist/browser/models.d.ts.map +1 -0
  28. package/dist/browser/models.js +4 -0
  29. package/dist/browser/models.js.map +1 -0
  30. package/dist/browser/outputModels.d.ts +683 -0
  31. package/dist/browser/outputModels.d.ts.map +1 -0
  32. package/dist/browser/outputModels.js +4 -0
  33. package/dist/browser/outputModels.js.map +1 -0
  34. package/dist/browser/package.json +3 -0
  35. package/dist/browser/paginateHelper.d.ts +68 -0
  36. package/dist/browser/paginateHelper.d.ts.map +1 -0
  37. package/dist/browser/paginateHelper.js +167 -0
  38. package/dist/browser/paginateHelper.js.map +1 -0
  39. package/dist/browser/parameters.d.ts +245 -0
  40. package/dist/browser/parameters.d.ts.map +1 -0
  41. package/dist/browser/parameters.js +4 -0
  42. package/dist/browser/parameters.js.map +1 -0
  43. package/dist/browser/responses.d.ts +616 -0
  44. package/dist/browser/responses.d.ts.map +1 -0
  45. package/dist/browser/responses.js +4 -0
  46. package/dist/browser/responses.js.map +1 -0
  47. package/dist/commonjs/azureCommunicationRoutingServiceClient.d.ts +14 -0
  48. package/dist/commonjs/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
  49. package/dist/commonjs/azureCommunicationRoutingServiceClient.js +43 -0
  50. package/dist/commonjs/azureCommunicationRoutingServiceClient.js.map +1 -0
  51. package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
  52. package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
  53. package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.js +33 -0
  54. package/dist/commonjs/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
  55. package/dist/commonjs/clientDefinitions.d.ts +159 -0
  56. package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
  57. package/dist/commonjs/clientDefinitions.js +5 -0
  58. package/dist/commonjs/clientDefinitions.js.map +1 -0
  59. package/dist/commonjs/index.d.ts +11 -0
  60. package/dist/commonjs/index.d.ts.map +1 -0
  61. package/dist/commonjs/index.js +16 -0
  62. package/dist/commonjs/index.js.map +1 -0
  63. package/dist/commonjs/isUnexpected.d.ts +35 -0
  64. package/dist/commonjs/isUnexpected.d.ts.map +1 -0
  65. package/dist/commonjs/isUnexpected.js +105 -0
  66. package/dist/commonjs/isUnexpected.js.map +1 -0
  67. package/dist/commonjs/logger.d.ts +2 -0
  68. package/dist/commonjs/logger.d.ts.map +1 -0
  69. package/dist/commonjs/logger.js +8 -0
  70. package/dist/commonjs/logger.js.map +1 -0
  71. package/dist/commonjs/models.d.ts +562 -0
  72. package/dist/commonjs/models.d.ts.map +1 -0
  73. package/dist/commonjs/models.js +5 -0
  74. package/dist/commonjs/models.js.map +1 -0
  75. package/dist/commonjs/outputModels.d.ts +683 -0
  76. package/dist/commonjs/outputModels.d.ts.map +1 -0
  77. package/dist/commonjs/outputModels.js +5 -0
  78. package/dist/commonjs/outputModels.js.map +1 -0
  79. package/dist/commonjs/package.json +3 -0
  80. package/dist/commonjs/paginateHelper.d.ts +68 -0
  81. package/dist/commonjs/paginateHelper.d.ts.map +1 -0
  82. package/dist/commonjs/paginateHelper.js +170 -0
  83. package/dist/commonjs/paginateHelper.js.map +1 -0
  84. package/dist/commonjs/parameters.d.ts +245 -0
  85. package/dist/commonjs/parameters.d.ts.map +1 -0
  86. package/dist/commonjs/parameters.js +5 -0
  87. package/dist/commonjs/parameters.js.map +1 -0
  88. package/dist/commonjs/responses.d.ts +616 -0
  89. package/dist/commonjs/responses.d.ts.map +1 -0
  90. package/dist/commonjs/responses.js +5 -0
  91. package/dist/commonjs/responses.js.map +1 -0
  92. package/dist/commonjs/tsdoc-metadata.json +11 -0
  93. package/dist/esm/azureCommunicationRoutingServiceClient.d.ts +14 -0
  94. package/dist/esm/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
  95. package/dist/esm/azureCommunicationRoutingServiceClient.js +40 -0
  96. package/dist/esm/azureCommunicationRoutingServiceClient.js.map +1 -0
  97. package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
  98. package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
  99. package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
  100. package/dist/esm/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
  101. package/dist/esm/clientDefinitions.d.ts +159 -0
  102. package/dist/esm/clientDefinitions.d.ts.map +1 -0
  103. package/dist/esm/clientDefinitions.js +4 -0
  104. package/dist/esm/clientDefinitions.js.map +1 -0
  105. package/dist/esm/index.d.ts +11 -0
  106. package/dist/esm/index.d.ts.map +1 -0
  107. package/dist/esm/index.js +13 -0
  108. package/dist/esm/index.js.map +1 -0
  109. package/dist/esm/isUnexpected.d.ts +35 -0
  110. package/dist/esm/isUnexpected.d.ts.map +1 -0
  111. package/dist/esm/isUnexpected.js +102 -0
  112. package/dist/esm/isUnexpected.js.map +1 -0
  113. package/dist/esm/logger.d.ts +2 -0
  114. package/dist/esm/logger.d.ts.map +1 -0
  115. package/dist/esm/logger.js +5 -0
  116. package/dist/esm/logger.js.map +1 -0
  117. package/dist/esm/models.d.ts +562 -0
  118. package/dist/esm/models.d.ts.map +1 -0
  119. package/dist/esm/models.js +4 -0
  120. package/dist/esm/models.js.map +1 -0
  121. package/dist/esm/outputModels.d.ts +683 -0
  122. package/dist/esm/outputModels.d.ts.map +1 -0
  123. package/dist/esm/outputModels.js +4 -0
  124. package/dist/esm/outputModels.js.map +1 -0
  125. package/dist/esm/package.json +3 -0
  126. package/dist/esm/paginateHelper.d.ts +68 -0
  127. package/dist/esm/paginateHelper.d.ts.map +1 -0
  128. package/dist/esm/paginateHelper.js +167 -0
  129. package/dist/esm/paginateHelper.js.map +1 -0
  130. package/dist/esm/parameters.d.ts +245 -0
  131. package/dist/esm/parameters.d.ts.map +1 -0
  132. package/dist/esm/parameters.js +4 -0
  133. package/dist/esm/parameters.js.map +1 -0
  134. package/dist/esm/responses.d.ts +616 -0
  135. package/dist/esm/responses.d.ts.map +1 -0
  136. package/dist/esm/responses.js +4 -0
  137. package/dist/esm/responses.js.map +1 -0
  138. package/dist/react-native/azureCommunicationRoutingServiceClient.d.ts +14 -0
  139. package/dist/react-native/azureCommunicationRoutingServiceClient.d.ts.map +1 -0
  140. package/dist/react-native/azureCommunicationRoutingServiceClient.js +40 -0
  141. package/dist/react-native/azureCommunicationRoutingServiceClient.js.map +1 -0
  142. package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.d.ts +17 -0
  143. package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.d.ts.map +1 -0
  144. package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.js +29 -0
  145. package/dist/react-native/azureCommunicationRoutingServiceCustmizedClient.js.map +1 -0
  146. package/dist/react-native/clientDefinitions.d.ts +159 -0
  147. package/dist/react-native/clientDefinitions.d.ts.map +1 -0
  148. package/dist/react-native/clientDefinitions.js +4 -0
  149. package/dist/react-native/clientDefinitions.js.map +1 -0
  150. package/dist/react-native/index.d.ts +11 -0
  151. package/dist/react-native/index.d.ts.map +1 -0
  152. package/dist/react-native/index.js +13 -0
  153. package/dist/react-native/index.js.map +1 -0
  154. package/dist/react-native/isUnexpected.d.ts +35 -0
  155. package/dist/react-native/isUnexpected.d.ts.map +1 -0
  156. package/dist/react-native/isUnexpected.js +102 -0
  157. package/dist/react-native/isUnexpected.js.map +1 -0
  158. package/dist/react-native/logger.d.ts +2 -0
  159. package/dist/react-native/logger.d.ts.map +1 -0
  160. package/dist/react-native/logger.js +5 -0
  161. package/dist/react-native/logger.js.map +1 -0
  162. package/dist/react-native/models.d.ts +562 -0
  163. package/dist/react-native/models.d.ts.map +1 -0
  164. package/dist/react-native/models.js +4 -0
  165. package/dist/react-native/models.js.map +1 -0
  166. package/dist/react-native/outputModels.d.ts +683 -0
  167. package/dist/react-native/outputModels.d.ts.map +1 -0
  168. package/dist/react-native/outputModels.js +4 -0
  169. package/dist/react-native/outputModels.js.map +1 -0
  170. package/dist/react-native/package.json +3 -0
  171. package/dist/react-native/paginateHelper.d.ts +68 -0
  172. package/dist/react-native/paginateHelper.d.ts.map +1 -0
  173. package/dist/react-native/paginateHelper.js +167 -0
  174. package/dist/react-native/paginateHelper.js.map +1 -0
  175. package/dist/react-native/parameters.d.ts +245 -0
  176. package/dist/react-native/parameters.d.ts.map +1 -0
  177. package/dist/react-native/parameters.js +4 -0
  178. package/dist/react-native/parameters.js.map +1 -0
  179. package/dist/react-native/responses.d.ts +616 -0
  180. package/dist/react-native/responses.d.ts.map +1 -0
  181. package/dist/react-native/responses.js +4 -0
  182. package/dist/react-native/responses.js.map +1 -0
  183. package/package.json +79 -63
  184. package/dist/index.js +0 -229
  185. package/dist/index.js.map +0 -1
  186. package/dist-esm/src/azureCommunicationRoutingServiceClient.js +0 -42
  187. package/dist-esm/src/azureCommunicationRoutingServiceClient.js.map +0 -1
  188. package/dist-esm/src/clientDefinitions.js +0 -4
  189. package/dist-esm/src/clientDefinitions.js.map +0 -1
  190. package/dist-esm/src/index.js +0 -13
  191. package/dist-esm/src/index.js.map +0 -1
  192. package/dist-esm/src/isUnexpected.js.map +0 -1
  193. package/dist-esm/src/models.js +0 -4
  194. package/dist-esm/src/models.js.map +0 -1
  195. package/dist-esm/src/outputModels.js +0 -4
  196. package/dist-esm/src/outputModels.js.map +0 -1
  197. package/dist-esm/src/paginateHelper.js +0 -70
  198. package/dist-esm/src/paginateHelper.js.map +0 -1
  199. package/dist-esm/src/parameters.js +0 -4
  200. package/dist-esm/src/parameters.js.map +0 -1
  201. package/dist-esm/src/responses.js +0 -4
  202. package/dist-esm/src/responses.js.map +0 -1
  203. package/review/communication-job-router.api.md +0 -2485
  204. package/types/communication-job-router.d.ts +0 -2677
@@ -1 +0,0 @@
1
- {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n UpsertClassificationPolicyParameters,\n GetClassificationPolicyParameters,\n DeleteClassificationPolicyParameters,\n ListClassificationPoliciesParameters,\n UpsertDistributionPolicyParameters,\n GetDistributionPolicyParameters,\n DeleteDistributionPolicyParameters,\n ListDistributionPoliciesParameters,\n UpsertExceptionPolicyParameters,\n GetExceptionPolicyParameters,\n DeleteExceptionPolicyParameters,\n ListExceptionPoliciesParameters,\n UpsertQueueParameters,\n GetQueueParameters,\n DeleteQueueParameters,\n ListQueuesParameters,\n UpsertJobParameters,\n GetJobParameters,\n DeleteJobParameters,\n ReclassifyParameters,\n CancelParameters,\n CompleteParameters,\n CloseParameters,\n ListJobsParameters,\n GetInQueuePositionParameters,\n UnassignParameters,\n AcceptParameters,\n DeclineParameters,\n GetQueueStatisticsParameters,\n UpsertWorkerParameters,\n GetWorkerParameters,\n DeleteWorkerParameters,\n ListWorkersParameters,\n} from \"./parameters\";\nimport {\n UpsertClassificationPolicy200Response,\n UpsertClassificationPolicy201Response,\n UpsertClassificationPolicyDefaultResponse,\n GetClassificationPolicy200Response,\n GetClassificationPolicyDefaultResponse,\n DeleteClassificationPolicy204Response,\n DeleteClassificationPolicyDefaultResponse,\n ListClassificationPolicies200Response,\n ListClassificationPoliciesDefaultResponse,\n UpsertDistributionPolicy200Response,\n UpsertDistributionPolicy201Response,\n UpsertDistributionPolicyDefaultResponse,\n GetDistributionPolicy200Response,\n GetDistributionPolicyDefaultResponse,\n DeleteDistributionPolicy204Response,\n DeleteDistributionPolicyDefaultResponse,\n ListDistributionPolicies200Response,\n ListDistributionPoliciesDefaultResponse,\n UpsertExceptionPolicy200Response,\n UpsertExceptionPolicy201Response,\n UpsertExceptionPolicyDefaultResponse,\n GetExceptionPolicy200Response,\n GetExceptionPolicyDefaultResponse,\n DeleteExceptionPolicy204Response,\n DeleteExceptionPolicyDefaultResponse,\n ListExceptionPolicies200Response,\n ListExceptionPoliciesDefaultResponse,\n UpsertQueue200Response,\n UpsertQueue201Response,\n UpsertQueueDefaultResponse,\n GetQueue200Response,\n GetQueueDefaultResponse,\n DeleteQueue204Response,\n DeleteQueueDefaultResponse,\n ListQueues200Response,\n ListQueuesDefaultResponse,\n UpsertJob200Response,\n UpsertJob201Response,\n UpsertJobDefaultResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n DeleteJob204Response,\n DeleteJobDefaultResponse,\n Reclassify200Response,\n ReclassifyDefaultResponse,\n Cancel200Response,\n CancelDefaultResponse,\n Complete200Response,\n CompleteDefaultResponse,\n Close200Response,\n CloseDefaultResponse,\n ListJobs200Response,\n ListJobsDefaultResponse,\n GetInQueuePosition200Response,\n GetInQueuePositionDefaultResponse,\n Unassign200Response,\n UnassignDefaultResponse,\n Accept200Response,\n AcceptDefaultResponse,\n Decline200Response,\n DeclineDefaultResponse,\n GetQueueStatistics200Response,\n GetQueueStatisticsDefaultResponse,\n UpsertWorker200Response,\n UpsertWorker201Response,\n UpsertWorkerDefaultResponse,\n GetWorker200Response,\n GetWorkerDefaultResponse,\n DeleteWorker204Response,\n DeleteWorkerDefaultResponse,\n ListWorkers200Response,\n ListWorkersDefaultResponse,\n} from \"./responses\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface UpsertClassificationPolicy {\n /** Creates or updates a classification policy. */\n patch(\n options: UpsertClassificationPolicyParameters,\n ): StreamableMethod<\n | UpsertClassificationPolicy200Response\n | UpsertClassificationPolicy201Response\n | UpsertClassificationPolicyDefaultResponse\n >;\n /** Retrieves an existing classification policy by Id. */\n get(\n options?: GetClassificationPolicyParameters,\n ): StreamableMethod<GetClassificationPolicy200Response | GetClassificationPolicyDefaultResponse>;\n /** Delete a classification policy by Id. */\n delete(\n options?: DeleteClassificationPolicyParameters,\n ): StreamableMethod<\n DeleteClassificationPolicy204Response | DeleteClassificationPolicyDefaultResponse\n >;\n}\n\nexport interface ListClassificationPolicies {\n /** Retrieves existing classification policies. */\n get(\n options?: ListClassificationPoliciesParameters,\n ): StreamableMethod<\n ListClassificationPolicies200Response | ListClassificationPoliciesDefaultResponse\n >;\n}\n\nexport interface UpsertDistributionPolicy {\n /** Creates or updates a distribution policy. */\n patch(\n options: UpsertDistributionPolicyParameters,\n ): StreamableMethod<\n | UpsertDistributionPolicy200Response\n | UpsertDistributionPolicy201Response\n | UpsertDistributionPolicyDefaultResponse\n >;\n /** Retrieves an existing distribution policy by Id. */\n get(\n options?: GetDistributionPolicyParameters,\n ): StreamableMethod<GetDistributionPolicy200Response | GetDistributionPolicyDefaultResponse>;\n /** Delete a distribution policy by Id. */\n delete(\n options?: DeleteDistributionPolicyParameters,\n ): StreamableMethod<\n DeleteDistributionPolicy204Response | DeleteDistributionPolicyDefaultResponse\n >;\n}\n\nexport interface ListDistributionPolicies {\n /** Retrieves existing distribution policies. */\n get(\n options?: ListDistributionPoliciesParameters,\n ): StreamableMethod<\n ListDistributionPolicies200Response | ListDistributionPoliciesDefaultResponse\n >;\n}\n\nexport interface UpsertExceptionPolicy {\n /** Creates or updates a exception policy. */\n patch(\n options: UpsertExceptionPolicyParameters,\n ): StreamableMethod<\n | UpsertExceptionPolicy200Response\n | UpsertExceptionPolicy201Response\n | UpsertExceptionPolicyDefaultResponse\n >;\n /** Retrieves an existing exception policy by Id. */\n get(\n options?: GetExceptionPolicyParameters,\n ): StreamableMethod<GetExceptionPolicy200Response | GetExceptionPolicyDefaultResponse>;\n /** Deletes a exception policy by Id. */\n delete(\n options?: DeleteExceptionPolicyParameters,\n ): StreamableMethod<DeleteExceptionPolicy204Response | DeleteExceptionPolicyDefaultResponse>;\n}\n\nexport interface ListExceptionPolicies {\n /** Retrieves existing exception policies. */\n get(\n options?: ListExceptionPoliciesParameters,\n ): StreamableMethod<ListExceptionPolicies200Response | ListExceptionPoliciesDefaultResponse>;\n}\n\nexport interface UpsertQueue {\n /** Creates or updates a queue. */\n patch(\n options: UpsertQueueParameters,\n ): StreamableMethod<UpsertQueue200Response | UpsertQueue201Response | UpsertQueueDefaultResponse>;\n /** Retrieves an existing queue by Id. */\n get(\n options?: GetQueueParameters,\n ): StreamableMethod<GetQueue200Response | GetQueueDefaultResponse>;\n /** Deletes a queue by Id. */\n delete(\n options?: DeleteQueueParameters,\n ): StreamableMethod<DeleteQueue204Response | DeleteQueueDefaultResponse>;\n}\n\nexport interface ListQueues {\n /** Retrieves existing queues. */\n get(\n options?: ListQueuesParameters,\n ): StreamableMethod<ListQueues200Response | ListQueuesDefaultResponse>;\n}\n\nexport interface UpsertJob {\n /** Creates or updates a router job. */\n patch(\n options: UpsertJobParameters,\n ): StreamableMethod<UpsertJob200Response | UpsertJob201Response | UpsertJobDefaultResponse>;\n /** Retrieves an existing job by Id. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n /** Deletes a job and all of its traces. */\n delete(\n options?: DeleteJobParameters,\n ): StreamableMethod<DeleteJob204Response | DeleteJobDefaultResponse>;\n}\n\nexport interface Reclassify {\n /** Reclassify a job. */\n post(\n options?: ReclassifyParameters,\n ): StreamableMethod<Reclassify200Response | ReclassifyDefaultResponse>;\n}\n\nexport interface Cancel {\n /** Submits request to cancel an existing job by Id while supplying free-form cancellation reason. */\n post(options?: CancelParameters): StreamableMethod<Cancel200Response | CancelDefaultResponse>;\n}\n\nexport interface Complete {\n /** Completes an assigned job. */\n post(\n options?: CompleteParameters,\n ): StreamableMethod<Complete200Response | CompleteDefaultResponse>;\n}\n\nexport interface Close {\n /** Closes a completed job. */\n post(options?: CloseParameters): StreamableMethod<Close200Response | CloseDefaultResponse>;\n}\n\nexport interface ListJobs {\n /** Retrieves list of jobs based on filter parameters. */\n get(\n options?: ListJobsParameters,\n ): StreamableMethod<ListJobs200Response | ListJobsDefaultResponse>;\n}\n\nexport interface GetInQueuePosition {\n /** Gets a job's position details. */\n get(\n options?: GetInQueuePositionParameters,\n ): StreamableMethod<GetInQueuePosition200Response | GetInQueuePositionDefaultResponse>;\n}\n\nexport interface Unassign {\n /** Unassign a job. */\n post(\n options?: UnassignParameters,\n ): StreamableMethod<Unassign200Response | UnassignDefaultResponse>;\n}\n\nexport interface Accept {\n /** Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already. */\n post(options?: AcceptParameters): StreamableMethod<Accept200Response | AcceptDefaultResponse>;\n}\n\nexport interface Decline {\n /** Declines an offer to work on a job. */\n post(options?: DeclineParameters): StreamableMethod<Decline200Response | DeclineDefaultResponse>;\n}\n\nexport interface GetQueueStatistics {\n /** Retrieves a queue's statistics. */\n get(\n options?: GetQueueStatisticsParameters,\n ): StreamableMethod<GetQueueStatistics200Response | GetQueueStatisticsDefaultResponse>;\n}\n\nexport interface UpsertWorker {\n /** Creates or updates a worker. */\n patch(\n options: UpsertWorkerParameters,\n ): StreamableMethod<\n UpsertWorker200Response | UpsertWorker201Response | UpsertWorkerDefaultResponse\n >;\n /** Retrieves an existing worker by Id. */\n get(\n options?: GetWorkerParameters,\n ): StreamableMethod<GetWorker200Response | GetWorkerDefaultResponse>;\n /** Deletes a worker and all of its traces. */\n delete(\n options?: DeleteWorkerParameters,\n ): StreamableMethod<DeleteWorker204Response | DeleteWorkerDefaultResponse>;\n}\n\nexport interface ListWorkers {\n /** Retrieves existing workers. */\n get(\n options?: ListWorkersParameters,\n ): StreamableMethod<ListWorkers200Response | ListWorkersDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/routing/classificationPolicies/\\{classificationPolicyId\\}' has methods for the following verbs: patch, get, delete */\n (\n path: \"/routing/classificationPolicies/{classificationPolicyId}\",\n classificationPolicyId: string,\n ): UpsertClassificationPolicy;\n /** Resource for '/routing/classificationPolicies' has methods for the following verbs: get */\n (path: \"/routing/classificationPolicies\"): ListClassificationPolicies;\n /** Resource for '/routing/distributionPolicies/\\{distributionPolicyId\\}' has methods for the following verbs: patch, get, delete */\n (\n path: \"/routing/distributionPolicies/{distributionPolicyId}\",\n distributionPolicyId: string,\n ): UpsertDistributionPolicy;\n /** Resource for '/routing/distributionPolicies' has methods for the following verbs: get */\n (path: \"/routing/distributionPolicies\"): ListDistributionPolicies;\n /** Resource for '/routing/exceptionPolicies/\\{exceptionPolicyId\\}' has methods for the following verbs: patch, get, delete */\n (\n path: \"/routing/exceptionPolicies/{exceptionPolicyId}\",\n exceptionPolicyId: string,\n ): UpsertExceptionPolicy;\n /** Resource for '/routing/exceptionPolicies' has methods for the following verbs: get */\n (path: \"/routing/exceptionPolicies\"): ListExceptionPolicies;\n /** Resource for '/routing/queues/\\{queueId\\}' has methods for the following verbs: patch, get, delete */\n (path: \"/routing/queues/{queueId}\", queueId: string): UpsertQueue;\n /** Resource for '/routing/queues' has methods for the following verbs: get */\n (path: \"/routing/queues\"): ListQueues;\n /** Resource for '/routing/jobs/\\{jobId\\}' has methods for the following verbs: patch, get, delete */\n (path: \"/routing/jobs/{jobId}\", jobId: string): UpsertJob;\n /** Resource for '/routing/jobs/\\{jobId\\}:reclassify' has methods for the following verbs: post */\n (path: \"/routing/jobs/{jobId}:reclassify\", jobId: string): Reclassify;\n /** Resource for '/routing/jobs/\\{jobId\\}:cancel' has methods for the following verbs: post */\n (path: \"/routing/jobs/{jobId}:cancel\", jobId: string): Cancel;\n /** Resource for '/routing/jobs/\\{jobId\\}/assignments/\\{assignmentId\\}:complete' has methods for the following verbs: post */\n (\n path: \"/routing/jobs/{jobId}/assignments/{assignmentId}:complete\",\n jobId: string,\n assignmentId: string,\n ): Complete;\n /** Resource for '/routing/jobs/\\{jobId\\}/assignments/\\{assignmentId\\}:close' has methods for the following verbs: post */\n (\n path: \"/routing/jobs/{jobId}/assignments/{assignmentId}:close\",\n jobId: string,\n assignmentId: string,\n ): Close;\n /** Resource for '/routing/jobs' has methods for the following verbs: get */\n (path: \"/routing/jobs\"): ListJobs;\n /** Resource for '/routing/jobs/\\{jobId\\}/position' has methods for the following verbs: get */\n (path: \"/routing/jobs/{jobId}/position\", jobId: string): GetInQueuePosition;\n /** Resource for '/routing/jobs/\\{jobId\\}/assignments/\\{assignmentId\\}:unassign' has methods for the following verbs: post */\n (\n path: \"/routing/jobs/{jobId}/assignments/{assignmentId}:unassign\",\n jobId: string,\n assignmentId: string,\n ): Unassign;\n /** Resource for '/routing/workers/\\{workerId\\}/offers/\\{offerId\\}:accept' has methods for the following verbs: post */\n (\n path: \"/routing/workers/{workerId}/offers/{offerId}:accept\",\n workerId: string,\n offerId: string,\n ): Accept;\n /** Resource for '/routing/workers/\\{workerId\\}/offers/\\{offerId\\}:decline' has methods for the following verbs: post */\n (\n path: \"/routing/workers/{workerId}/offers/{offerId}:decline\",\n workerId: string,\n offerId: string,\n ): Decline;\n /** Resource for '/routing/queues/\\{queueId\\}/statistics' has methods for the following verbs: get */\n (path: \"/routing/queues/{queueId}/statistics\", queueId: string): GetQueueStatistics;\n /** Resource for '/routing/workers/\\{workerId\\}' has methods for the following verbs: patch, get, delete */\n (path: \"/routing/workers/{workerId}\", workerId: string): UpsertWorker;\n /** Resource for '/routing/workers' has methods for the following verbs: get */\n (path: \"/routing/workers\"): ListWorkers;\n}\n\nexport type AzureCommunicationRoutingServiceClient = Client & {\n path: Routes;\n};\n"]}
@@ -1,13 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import AzureCommunicationRoutingServiceClient from "./azureCommunicationRoutingServiceClient";
4
- export * from "./azureCommunicationRoutingServiceClient";
5
- export * from "./parameters";
6
- export * from "./responses";
7
- export * from "./clientDefinitions";
8
- export * from "./isUnexpected";
9
- export * from "./models";
10
- export * from "./outputModels";
11
- export * from "./paginateHelper";
12
- export default AzureCommunicationRoutingServiceClient;
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,sCAAsC,MAAM,0CAA0C,CAAC;AAE9F,cAAc,0CAA0C,CAAC;AACzD,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAEjC,eAAe,sCAAsC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureCommunicationRoutingServiceClient from \"./azureCommunicationRoutingServiceClient\";\n\nexport * from \"./azureCommunicationRoutingServiceClient\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\n\nexport default AzureCommunicationRoutingServiceClient;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA6ElC,MAAM,WAAW,GAA6B;IAC5C,gEAAgE,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAChF,8DAA8D,EAAE,CAAC,KAAK,CAAC;IACvE,iEAAiE,EAAE,CAAC,KAAK,CAAC;IAC1E,qCAAqC,EAAE,CAAC,KAAK,CAAC;IAC9C,4DAA4D,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC5E,0DAA0D,EAAE,CAAC,KAAK,CAAC;IACnE,6DAA6D,EAAE,CAAC,KAAK,CAAC;IACtE,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,sDAAsD,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACtE,oDAAoD,EAAE,CAAC,KAAK,CAAC;IAC7D,uDAAuD,EAAE,CAAC,KAAK,CAAC;IAChE,gCAAgC,EAAE,CAAC,KAAK,CAAC;IACzC,iCAAiC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACjD,+BAA+B,EAAE,CAAC,KAAK,CAAC;IACxC,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAC9B,6BAA6B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC7C,2BAA2B,EAAE,CAAC,KAAK,CAAC;IACpC,8BAA8B,EAAE,CAAC,KAAK,CAAC;IACvC,uCAAuC,EAAE,CAAC,KAAK,CAAC;IAChD,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,gEAAgE,EAAE,CAAC,KAAK,CAAC;IACzE,6DAA6D,EAAE,CAAC,KAAK,CAAC;IACtE,mBAAmB,EAAE,CAAC,KAAK,CAAC;IAC5B,oCAAoC,EAAE,CAAC,KAAK,CAAC;IAC7C,gEAAgE,EAAE,CAAC,KAAK,CAAC;IACzE,0DAA0D,EAAE,CAAC,KAAK,CAAC;IACnE,2DAA2D,EAAE,CAAC,KAAK,CAAC;IACpE,0CAA0C,EAAE,CAAC,KAAK,CAAC;IACnD,mCAAmC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACnD,iCAAiC,EAAE,CAAC,KAAK,CAAC;IAC1C,oCAAoC,EAAE,CAAC,KAAK,CAAC;IAC7C,sBAAsB,EAAE,CAAC,KAAK,CAAC;CAChC,CAAC;AA8GF,MAAM,UAAU,YAAY,CAC1B,QAwE8B;IAmC9B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,0BAA0B,CAAC,MAAc,EAAE,IAAY;;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,+CAA+C;IAC/C,2CAA2C;IAC3C,8CAA8C;IAC9C,IAAI,UAAU,GAAG,CAAC,CAAC,EACjB,YAAY,GAAa,EAAE,CAAC;IAE9B,0CAA0C;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvD,0DAA0D;QAC1D,gBAAgB;QAChB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,MAAM,aAAa,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC7C,gCAAgC;QAChC,MAAM,cAAc,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEhD,6DAA6D;QAC7D,IAAI,KAAK,GAAG,IAAI,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC7F,IAAI,CAAA,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,UAAU,CAAC,GAAG,CAAC,KAAI,CAAA,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,OAAO,CAAC,GAAG,CAAC,MAAK,CAAC,CAAC,EAAE,CAAC;gBACjF,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n UpsertClassificationPolicy200Response,\n UpsertClassificationPolicy201Response,\n UpsertClassificationPolicyDefaultResponse,\n GetClassificationPolicy200Response,\n GetClassificationPolicyDefaultResponse,\n DeleteClassificationPolicy204Response,\n DeleteClassificationPolicyDefaultResponse,\n ListClassificationPolicies200Response,\n ListClassificationPoliciesDefaultResponse,\n UpsertDistributionPolicy200Response,\n UpsertDistributionPolicy201Response,\n UpsertDistributionPolicyDefaultResponse,\n GetDistributionPolicy200Response,\n GetDistributionPolicyDefaultResponse,\n DeleteDistributionPolicy204Response,\n DeleteDistributionPolicyDefaultResponse,\n ListDistributionPolicies200Response,\n ListDistributionPoliciesDefaultResponse,\n UpsertExceptionPolicy200Response,\n UpsertExceptionPolicy201Response,\n UpsertExceptionPolicyDefaultResponse,\n GetExceptionPolicy200Response,\n GetExceptionPolicyDefaultResponse,\n DeleteExceptionPolicy204Response,\n DeleteExceptionPolicyDefaultResponse,\n ListExceptionPolicies200Response,\n ListExceptionPoliciesDefaultResponse,\n UpsertQueue200Response,\n UpsertQueue201Response,\n UpsertQueueDefaultResponse,\n GetQueue200Response,\n GetQueueDefaultResponse,\n DeleteQueue204Response,\n DeleteQueueDefaultResponse,\n ListQueues200Response,\n ListQueuesDefaultResponse,\n UpsertJob200Response,\n UpsertJob201Response,\n UpsertJobDefaultResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n DeleteJob204Response,\n DeleteJobDefaultResponse,\n Reclassify200Response,\n ReclassifyDefaultResponse,\n Cancel200Response,\n CancelDefaultResponse,\n Complete200Response,\n CompleteDefaultResponse,\n Close200Response,\n CloseDefaultResponse,\n ListJobs200Response,\n ListJobsDefaultResponse,\n GetInQueuePosition200Response,\n GetInQueuePositionDefaultResponse,\n Unassign200Response,\n UnassignDefaultResponse,\n Accept200Response,\n AcceptDefaultResponse,\n Decline200Response,\n DeclineDefaultResponse,\n GetQueueStatistics200Response,\n GetQueueStatisticsDefaultResponse,\n UpsertWorker200Response,\n UpsertWorker201Response,\n UpsertWorkerDefaultResponse,\n GetWorker200Response,\n GetWorkerDefaultResponse,\n DeleteWorker204Response,\n DeleteWorkerDefaultResponse,\n ListWorkers200Response,\n ListWorkersDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"PATCH /routing/classificationPolicies/{classificationPolicyId}\": [\"200\", \"201\"],\n \"GET /routing/classificationPolicies/{classificationPolicyId}\": [\"200\"],\n \"DELETE /routing/classificationPolicies/{classificationPolicyId}\": [\"204\"],\n \"GET /routing/classificationPolicies\": [\"200\"],\n \"PATCH /routing/distributionPolicies/{distributionPolicyId}\": [\"200\", \"201\"],\n \"GET /routing/distributionPolicies/{distributionPolicyId}\": [\"200\"],\n \"DELETE /routing/distributionPolicies/{distributionPolicyId}\": [\"204\"],\n \"GET /routing/distributionPolicies\": [\"200\"],\n \"PATCH /routing/exceptionPolicies/{exceptionPolicyId}\": [\"200\", \"201\"],\n \"GET /routing/exceptionPolicies/{exceptionPolicyId}\": [\"200\"],\n \"DELETE /routing/exceptionPolicies/{exceptionPolicyId}\": [\"204\"],\n \"GET /routing/exceptionPolicies\": [\"200\"],\n \"PATCH /routing/queues/{queueId}\": [\"200\", \"201\"],\n \"GET /routing/queues/{queueId}\": [\"200\"],\n \"DELETE /routing/queues/{queueId}\": [\"204\"],\n \"GET /routing/queues\": [\"200\"],\n \"PATCH /routing/jobs/{jobId}\": [\"200\", \"201\"],\n \"GET /routing/jobs/{jobId}\": [\"200\"],\n \"DELETE /routing/jobs/{jobId}\": [\"204\"],\n \"POST /routing/jobs/{jobId}:reclassify\": [\"200\"],\n \"POST /routing/jobs/{jobId}:cancel\": [\"200\"],\n \"POST /routing/jobs/{jobId}/assignments/{assignmentId}:complete\": [\"200\"],\n \"POST /routing/jobs/{jobId}/assignments/{assignmentId}:close\": [\"200\"],\n \"GET /routing/jobs\": [\"200\"],\n \"GET /routing/jobs/{jobId}/position\": [\"200\"],\n \"POST /routing/jobs/{jobId}/assignments/{assignmentId}:unassign\": [\"200\"],\n \"POST /routing/workers/{workerId}/offers/{offerId}:accept\": [\"200\"],\n \"POST /routing/workers/{workerId}/offers/{offerId}:decline\": [\"200\"],\n \"GET /routing/queues/{queueId}/statistics\": [\"200\"],\n \"PATCH /routing/workers/{workerId}\": [\"200\", \"201\"],\n \"GET /routing/workers/{workerId}\": [\"200\"],\n \"DELETE /routing/workers/{workerId}\": [\"204\"],\n \"GET /routing/workers\": [\"200\"],\n};\n\nexport function isUnexpected(\n response:\n | UpsertClassificationPolicy200Response\n | UpsertClassificationPolicy201Response\n | UpsertClassificationPolicyDefaultResponse,\n): response is UpsertClassificationPolicyDefaultResponse;\nexport function isUnexpected(\n response: GetClassificationPolicy200Response | GetClassificationPolicyDefaultResponse,\n): response is GetClassificationPolicyDefaultResponse;\nexport function isUnexpected(\n response: DeleteClassificationPolicy204Response | DeleteClassificationPolicyDefaultResponse,\n): response is DeleteClassificationPolicyDefaultResponse;\nexport function isUnexpected(\n response: ListClassificationPolicies200Response | ListClassificationPoliciesDefaultResponse,\n): response is ListClassificationPoliciesDefaultResponse;\nexport function isUnexpected(\n response:\n | UpsertDistributionPolicy200Response\n | UpsertDistributionPolicy201Response\n | UpsertDistributionPolicyDefaultResponse,\n): response is UpsertDistributionPolicyDefaultResponse;\nexport function isUnexpected(\n response: GetDistributionPolicy200Response | GetDistributionPolicyDefaultResponse,\n): response is GetDistributionPolicyDefaultResponse;\nexport function isUnexpected(\n response: DeleteDistributionPolicy204Response | DeleteDistributionPolicyDefaultResponse,\n): response is DeleteDistributionPolicyDefaultResponse;\nexport function isUnexpected(\n response: ListDistributionPolicies200Response | ListDistributionPoliciesDefaultResponse,\n): response is ListDistributionPoliciesDefaultResponse;\nexport function isUnexpected(\n response:\n | UpsertExceptionPolicy200Response\n | UpsertExceptionPolicy201Response\n | UpsertExceptionPolicyDefaultResponse,\n): response is UpsertExceptionPolicyDefaultResponse;\nexport function isUnexpected(\n response: GetExceptionPolicy200Response | GetExceptionPolicyDefaultResponse,\n): response is GetExceptionPolicyDefaultResponse;\nexport function isUnexpected(\n response: DeleteExceptionPolicy204Response | DeleteExceptionPolicyDefaultResponse,\n): response is DeleteExceptionPolicyDefaultResponse;\nexport function isUnexpected(\n response: ListExceptionPolicies200Response | ListExceptionPoliciesDefaultResponse,\n): response is ListExceptionPoliciesDefaultResponse;\nexport function isUnexpected(\n response: UpsertQueue200Response | UpsertQueue201Response | UpsertQueueDefaultResponse,\n): response is UpsertQueueDefaultResponse;\nexport function isUnexpected(\n response: GetQueue200Response | GetQueueDefaultResponse,\n): response is GetQueueDefaultResponse;\nexport function isUnexpected(\n response: DeleteQueue204Response | DeleteQueueDefaultResponse,\n): response is DeleteQueueDefaultResponse;\nexport function isUnexpected(\n response: ListQueues200Response | ListQueuesDefaultResponse,\n): response is ListQueuesDefaultResponse;\nexport function isUnexpected(\n response: UpsertJob200Response | UpsertJob201Response | UpsertJobDefaultResponse,\n): response is UpsertJobDefaultResponse;\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response: DeleteJob204Response | DeleteJobDefaultResponse,\n): response is DeleteJobDefaultResponse;\nexport function isUnexpected(\n response: Reclassify200Response | ReclassifyDefaultResponse,\n): response is ReclassifyDefaultResponse;\nexport function isUnexpected(\n response: Cancel200Response | CancelDefaultResponse,\n): response is CancelDefaultResponse;\nexport function isUnexpected(\n response: Complete200Response | CompleteDefaultResponse,\n): response is CompleteDefaultResponse;\nexport function isUnexpected(\n response: Close200Response | CloseDefaultResponse,\n): response is CloseDefaultResponse;\nexport function isUnexpected(\n response: ListJobs200Response | ListJobsDefaultResponse,\n): response is ListJobsDefaultResponse;\nexport function isUnexpected(\n response: GetInQueuePosition200Response | GetInQueuePositionDefaultResponse,\n): response is GetInQueuePositionDefaultResponse;\nexport function isUnexpected(\n response: Unassign200Response | UnassignDefaultResponse,\n): response is UnassignDefaultResponse;\nexport function isUnexpected(\n response: Accept200Response | AcceptDefaultResponse,\n): response is AcceptDefaultResponse;\nexport function isUnexpected(\n response: Decline200Response | DeclineDefaultResponse,\n): response is DeclineDefaultResponse;\nexport function isUnexpected(\n response: GetQueueStatistics200Response | GetQueueStatisticsDefaultResponse,\n): response is GetQueueStatisticsDefaultResponse;\nexport function isUnexpected(\n response: UpsertWorker200Response | UpsertWorker201Response | UpsertWorkerDefaultResponse,\n): response is UpsertWorkerDefaultResponse;\nexport function isUnexpected(\n response: GetWorker200Response | GetWorkerDefaultResponse,\n): response is GetWorkerDefaultResponse;\nexport function isUnexpected(\n response: DeleteWorker204Response | DeleteWorkerDefaultResponse,\n): response is DeleteWorkerDefaultResponse;\nexport function isUnexpected(\n response: ListWorkers200Response | ListWorkersDefaultResponse,\n): response is ListWorkersDefaultResponse;\nexport function isUnexpected(\n response:\n | UpsertClassificationPolicy200Response\n | UpsertClassificationPolicy201Response\n | UpsertClassificationPolicyDefaultResponse\n | GetClassificationPolicy200Response\n | GetClassificationPolicyDefaultResponse\n | DeleteClassificationPolicy204Response\n | DeleteClassificationPolicyDefaultResponse\n | ListClassificationPolicies200Response\n | ListClassificationPoliciesDefaultResponse\n | UpsertDistributionPolicy200Response\n | UpsertDistributionPolicy201Response\n | UpsertDistributionPolicyDefaultResponse\n | GetDistributionPolicy200Response\n | GetDistributionPolicyDefaultResponse\n | DeleteDistributionPolicy204Response\n | DeleteDistributionPolicyDefaultResponse\n | ListDistributionPolicies200Response\n | ListDistributionPoliciesDefaultResponse\n | UpsertExceptionPolicy200Response\n | UpsertExceptionPolicy201Response\n | UpsertExceptionPolicyDefaultResponse\n | GetExceptionPolicy200Response\n | GetExceptionPolicyDefaultResponse\n | DeleteExceptionPolicy204Response\n | DeleteExceptionPolicyDefaultResponse\n | ListExceptionPolicies200Response\n | ListExceptionPoliciesDefaultResponse\n | UpsertQueue200Response\n | UpsertQueue201Response\n | UpsertQueueDefaultResponse\n | GetQueue200Response\n | GetQueueDefaultResponse\n | DeleteQueue204Response\n | DeleteQueueDefaultResponse\n | ListQueues200Response\n | ListQueuesDefaultResponse\n | UpsertJob200Response\n | UpsertJob201Response\n | UpsertJobDefaultResponse\n | GetJob200Response\n | GetJobDefaultResponse\n | DeleteJob204Response\n | DeleteJobDefaultResponse\n | Reclassify200Response\n | ReclassifyDefaultResponse\n | Cancel200Response\n | CancelDefaultResponse\n | Complete200Response\n | CompleteDefaultResponse\n | Close200Response\n | CloseDefaultResponse\n | ListJobs200Response\n | ListJobsDefaultResponse\n | GetInQueuePosition200Response\n | GetInQueuePositionDefaultResponse\n | Unassign200Response\n | UnassignDefaultResponse\n | Accept200Response\n | AcceptDefaultResponse\n | Decline200Response\n | DeclineDefaultResponse\n | GetQueueStatistics200Response\n | GetQueueStatisticsDefaultResponse\n | UpsertWorker200Response\n | UpsertWorker201Response\n | UpsertWorkerDefaultResponse\n | GetWorker200Response\n | GetWorkerDefaultResponse\n | DeleteWorker204Response\n | DeleteWorkerDefaultResponse\n | ListWorkers200Response\n | ListWorkersDefaultResponse,\n): response is\n | UpsertClassificationPolicyDefaultResponse\n | GetClassificationPolicyDefaultResponse\n | DeleteClassificationPolicyDefaultResponse\n | ListClassificationPoliciesDefaultResponse\n | UpsertDistributionPolicyDefaultResponse\n | GetDistributionPolicyDefaultResponse\n | DeleteDistributionPolicyDefaultResponse\n | ListDistributionPoliciesDefaultResponse\n | UpsertExceptionPolicyDefaultResponse\n | GetExceptionPolicyDefaultResponse\n | DeleteExceptionPolicyDefaultResponse\n | ListExceptionPoliciesDefaultResponse\n | UpsertQueueDefaultResponse\n | GetQueueDefaultResponse\n | DeleteQueueDefaultResponse\n | ListQueuesDefaultResponse\n | UpsertJobDefaultResponse\n | GetJobDefaultResponse\n | DeleteJobDefaultResponse\n | ReclassifyDefaultResponse\n | CancelDefaultResponse\n | CompleteDefaultResponse\n | CloseDefaultResponse\n | ListJobsDefaultResponse\n | GetInQueuePositionDefaultResponse\n | UnassignDefaultResponse\n | AcceptDefaultResponse\n | DeclineDefaultResponse\n | GetQueueStatisticsDefaultResponse\n | UpsertWorkerDefaultResponse\n | GetWorkerDefaultResponse\n | DeleteWorkerDefaultResponse\n | ListWorkersDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** A container for the rules that govern how jobs are classified. */\nexport interface ClassificationPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** Id of a fallback queue to select if queue selector attachments doesn't find a match. */\n fallbackQueueId?: string;\n /** Queue selector attachments used to resolve a queue for a job. */\n queueSelectorAttachments?: Array<QueueSelectorAttachment>;\n /** A rule to determine a priority score for a job. */\n prioritizationRule?: RouterRule;\n /** Worker selector attachments used to attach worker selectors to a job. */\n workerSelectorAttachments?: Array<WorkerSelectorAttachment>;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport interface QueueSelectorAttachmentParent {\n kind: string;\n}\n\n/** Describes a set of queue selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The condition that must be true for the queue selectors to be attached. */\n condition: RouterRule;\n /** The queue selectors to attach. */\n queueSelectors: Array<RouterQueueSelector>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"conditional\";\n}\n\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport interface RouterRuleParent {\n kind: string;\n}\n\n/** A rule that return the same labels as the input labels. */\nexport interface DirectMapRouterRule extends RouterRuleParent {\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"directMap\";\n}\n\n/** A rule providing inline expression rules. */\nexport interface ExpressionRouterRule extends RouterRuleParent {\n /**\n * The expression language to compile to and execute.\n *\n * Possible values: \"powerFx\"\n */\n language?: string;\n /** An expression to evaluate. Should contain return statement with calculated values. */\n expression: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"expression\";\n}\n\n/** A rule providing a binding to an HTTP Triggered Azure Function. */\nexport interface FunctionRouterRule extends RouterRuleParent {\n /** URL for Azure Function. */\n functionUri: string;\n /** Credentials used to access Azure function rule. */\n credential?: FunctionRouterRuleCredential;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"function\";\n}\n\n/** Credentials used to access Azure function rule. */\nexport interface FunctionRouterRuleCredential {\n /** Access key scoped to a particular function. */\n functionKey?: string;\n /** Access key scoped to a Azure Function app. This key grants access to all functions under the app. */\n appKey?: string;\n /** Client id, when AppKey is provided In context of Azure function, this is usually the name of the key. */\n clientId?: string;\n}\n\n/** A rule providing static rules that always return the same result, regardless of input. */\nexport interface StaticRouterRule extends RouterRuleParent {\n /** The static value this rule always returns. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"static\";\n}\n\n/** A rule providing a binding to an external web server. */\nexport interface WebhookRouterRule extends RouterRuleParent {\n /** Uri for Authorization Server. */\n authorizationServerUri?: string;\n /** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\n clientCredential?: OAuth2WebhookClientCredential;\n /** Uri for Contoso's Web Server. */\n webhookUri?: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"webhook\";\n}\n\n/** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\nexport interface OAuth2WebhookClientCredential {\n /** ClientId for Contoso Authorization server. */\n clientId?: string;\n /** Client secret for Contoso Authorization server. */\n clientSecret?: string;\n}\n\n/** Describes a condition that must be met against a set of labels for queue selection. */\nexport interface RouterQueueSelector {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the label selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n}\n\n/** Attaches a queue selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches queue selectors to a job when the RouterRule is resolved. */\nexport interface RuleEngineQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** A RouterRule that resolves a collection of queue selectors to attach. */\n rule: RouterRule;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a queue selector that will be attached to a job. */\nexport interface StaticQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** The queue selector to attach. */\n queueSelector: RouterQueueSelector;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationQueueSelectorAttachment extends QueueSelectorAttachmentParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<QueueWeightedAllocation>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */\nexport interface QueueWeightedAllocation {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of queue selectors that will be applied if this allocation is selected. */\n queueSelectors: Array<RouterQueueSelector>;\n}\n\n/** An attachment which attaches worker selectors to a job. */\nexport interface WorkerSelectorAttachmentParent {\n kind: string;\n}\n\n/** Describes a set of worker selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The condition that must be true for the worker selectors to be attached. */\n condition: RouterRule;\n /** The worker selectors to attach. */\n workerSelectors: Array<RouterWorkerSelector>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"conditional\";\n}\n\n/** Describes a condition that must be met against a set of labels for worker selection. */\nexport interface RouterWorkerSelector {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the worker selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: unknown;\n /** Describes how long this label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** Pushes a job to the front of the queue as long as this selector is active. */\n expedite?: boolean;\n}\n\n/** Attaches a worker selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** Describes how long the attached label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches worker selectors to a job when a RouterRule is resolved. */\nexport interface RuleEngineWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** A RouterRule that resolves a collection of worker selectors to attach. */\n rule: RouterRule;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a worker selector that will be attached to a job. */\nexport interface StaticWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** The worker selector to attach. */\n workerSelector: RouterWorkerSelector;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationWorkerSelectorAttachment extends WorkerSelectorAttachmentParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<WorkerWeightedAllocation>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */\nexport interface WorkerWeightedAllocation {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of worker selectors that will be applied if this allocation is selected. */\n workerSelectors: Array<RouterWorkerSelector>;\n}\n\n/** Policy governing how jobs are distributed to workers */\nexport interface DistributionPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** Number of seconds after which any offers created under this policy will be expired. */\n offerExpiresAfterSeconds?: number;\n /** Mode governing the specific distribution method. */\n mode?: DistributionMode;\n}\n\n/** Abstract base class for defining a distribution mode. */\nexport interface DistributionModeParent {\n /** Governs the minimum desired number of active concurrent offers a job can have. */\n minConcurrentOffers?: number;\n /** Governs the maximum number of active concurrent offers a job can have. */\n maxConcurrentOffers?: number;\n /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */\n bypassSelectors?: boolean;\n kind: string;\n}\n\n/** Jobs are distributed to the worker with the strongest abilities available. */\nexport interface BestWorkerMode extends DistributionModeParent {\n /** Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function). */\n scoringRule?: RouterRule;\n /** Options to configure 'scoringRule'. If not set, default values are used. */\n scoringRuleOptions?: ScoringRuleOptions;\n /** The type discriminator describing a sub-type of Mode */\n kind: \"bestWorker\";\n}\n\n/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */\nexport interface ScoringRuleOptions {\n /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */\n batchSize?: number;\n /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */\n scoringParameters?: string[];\n /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */\n isBatchScoringEnabled?: boolean;\n /** If false, will sort scores by ascending order. By default, set to true. */\n descendingOrder?: boolean;\n}\n\n/** Jobs are directed to the worker who has been idle longest. */\nexport interface LongestIdleMode extends DistributionModeParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"longestIdle\";\n}\n\n/** Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job. */\nexport interface RoundRobinMode extends DistributionModeParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"roundRobin\";\n}\n\n/** A policy that defines actions to execute when exception are triggered. */\nexport interface ExceptionPolicy {\n /** Friendly name of this policy. */\n name?: string;\n /** A collection of exception rules on the exception policy. */\n exceptionRules?: Array<ExceptionRule>;\n}\n\n/** A rule that defines actions to execute upon a specific trigger. */\nexport interface ExceptionRule {\n /** Id of an exception rule. */\n id: string;\n /** The trigger for this exception rule. */\n trigger: ExceptionTrigger;\n /** A collection of actions to perform once the exception is triggered. */\n actions: Array<ExceptionAction>;\n}\n\n/** Abstract base class for defining a trigger for exception rules. */\nexport interface ExceptionTriggerParent {\n kind: string;\n}\n\n/** Trigger for an exception action on exceeding queue length. */\nexport interface QueueLengthExceptionTrigger extends ExceptionTriggerParent {\n /** Threshold of number of jobs ahead in the queue to for this trigger to fire. */\n threshold: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"queueLength\";\n}\n\n/** Trigger for an exception action on exceeding wait time. */\nexport interface WaitTimeExceptionTrigger extends ExceptionTriggerParent {\n /** Threshold for wait time for this trigger. */\n thresholdSeconds: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"waitTime\";\n}\n\n/** The action to take when the exception is triggered. */\nexport interface ExceptionActionParent {\n /** Unique Id of the exception action. */\n id?: string;\n kind: string;\n}\n\n/** An action that marks a job as cancelled. */\nexport interface CancelExceptionAction extends ExceptionActionParent {\n /** A note that will be appended to a job's notes collection with the current timestamp. */\n note?: string;\n /** Indicates the outcome of a job, populate this field with your own custom values. */\n dispositionCode?: string;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"cancel\";\n}\n\n/** An action that manually reclassifies a job by providing the queue, priority and worker selectors. */\nexport interface ManualReclassifyExceptionAction extends ExceptionActionParent {\n /** Updated QueueId. */\n queueId?: string;\n /** Updated Priority. */\n priority?: number;\n /** Updated WorkerSelectors. */\n workerSelectors?: Array<RouterWorkerSelector>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"manualReclassify\";\n}\n\n/** An action that modifies labels on a job and then reclassifies it. */\nexport interface ReclassifyExceptionAction extends ExceptionActionParent {\n /** The new classification policy that will determine queue, priority and worker selectors. */\n classificationPolicyId?: string;\n /** Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean. */\n labelsToUpsert?: Record<string, unknown>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"reclassify\";\n}\n\n/** A queue that can contain jobs to be routed. */\nexport interface RouterQueue {\n /** Friendly name of this queue. */\n name?: string;\n /** Id of a distribution policy that will determine how a job is distributed to workers. */\n distributionPolicyId?: string;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** Id of an exception policy that determines various job escalation rules. */\n exceptionPolicyId?: string;\n}\n\n/** A unit of work to be routed */\nexport interface RouterJob {\n /** Reference to an external parent context, eg. call ID. */\n channelReference?: string;\n /** The channel identifier. eg. voice, chat, etc. */\n channelId?: string;\n /** Id of a classification policy used for classifying this job. */\n classificationPolicyId?: string;\n /** Id of a queue that this job is queued to. */\n queueId?: string;\n /** Priority of this job. */\n priority?: number;\n /** Reason code for cancelled or closed jobs. */\n dispositionCode?: string;\n /** A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. */\n requestedWorkerSelectors?: Array<RouterWorkerSelector>;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, unknown>;\n /** Notes attached to a job, sorted by timestamp. */\n notes?: Array<RouterJobNote>;\n /** If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode. */\n matchingMode?: JobMatchingMode;\n}\n\n/** Assignment details of a job to a worker. */\nexport interface RouterJobAssignment {\n /** Id of the Worker assigned to the job. */\n workerId?: string;\n /** Timestamp when the job was assigned to a worker in UTC. */\n assignedAt: Date | string;\n /** Timestamp when the job was marked as completed after being assigned in UTC. */\n completedAt?: Date | string;\n /** Timestamp when the job was marked as closed after being completed in UTC. */\n closedAt?: Date | string;\n}\n\n/** A note attached to a job. */\nexport interface RouterJobNote {\n /** The message contained in the note. */\n message: string;\n /** The time at which the note was added in UTC. If not provided, will default to the current time. */\n addedAt?: Date | string;\n}\n\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport interface JobMatchingModeParent {\n kind: string;\n}\n\n/** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */\nexport interface ScheduleAndSuspendMode extends JobMatchingModeParent {\n /** Requested schedule time. */\n scheduleAt: Date | string;\n /** The type discriminator describing ScheduleAndSuspendMode */\n kind: \"scheduleAndSuspend\";\n}\n\n/** Describes a matching mode where matching worker to a job is automatically started after job is queued successfully. */\nexport interface QueueAndMatchMode extends JobMatchingModeParent {\n /** The type discriminator describing QueueAndMatchMode */\n kind: \"queueAndMatch\";\n}\n\n/** Describes a matching mode where matching worker to a job is suspended. */\nexport interface SuspendMode extends JobMatchingModeParent {\n /** The type discriminator describing SuspendMode */\n kind: \"suspend\";\n}\n\n/** Request payload for reclassifying jobs. */\nexport interface ReclassifyJobOptions {}\n\n/** Request payload for cancelling a job. */\nexport interface CancelJobOptions {\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n /** Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of \"Cancelled\" is set. */\n dispositionCode?: string;\n}\n\n/** Request payload for completing jobs. */\nexport interface CompleteJobOptions {\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n}\n\n/** Request payload for closing jobs */\nexport interface CloseJobOptions {\n /** Indicates the outcome of a job, populate this field with your own custom values. */\n dispositionCode?: string;\n /** If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC. */\n closeAt?: Date | string;\n /** A note that will be appended to a job's Notes collection with the current timestamp. */\n note?: string;\n}\n\n/** Request payload for unassigning a job. */\nexport interface UnassignJobOptions {\n /** If SuspendMatching is true, then a job is not queued for re-matching with a worker. */\n suspendMatching?: boolean;\n}\n\n/** Request payload for declining offers. */\nexport interface DeclineJobOfferOptions {\n /** If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time. */\n retryOfferAt?: Date | string;\n}\n\n/** An entity for jobs to be routed to. */\nexport interface RouterWorker {\n /** Collection of queue(s) that this worker can receive work from. */\n queues?: string[];\n /** The total capacity score this worker has to manage multiple concurrent jobs. */\n capacity?: number;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, unknown>;\n /** A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, unknown>;\n /** Collection of channel(s) this worker can handle and their impact on the workers capacity. */\n channels?: Array<RouterChannel>;\n /** A flag indicating this worker is open to receive offers or not. */\n availableForOffers?: boolean;\n /** If this is set, the worker will only receive up to this many new offers at a time. */\n maxConcurrentOffers?: number;\n}\n\n/** Represents the capacity a job in this channel will consume from a worker. */\nexport interface RouterChannel {\n /** Id of a channel. */\n channelId: string;\n /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */\n capacityCostPerJob: number;\n /** The maximum number of jobs that can be supported concurrently for this channel. */\n maxNumberOfJobs?: number;\n}\n\n/** An offer of a job to a worker. */\nexport interface RouterJobOffer {\n /** Id of the job. */\n jobId: string;\n /** The capacity cost consumed by the job offer. */\n capacityCost: number;\n /** Timestamp when the offer was created in UTC. */\n offeredAt?: Date | string;\n /** Timestamp when the offer will expire in UTC. */\n expiresAt?: Date | string;\n}\n\n/** The assignment for a worker to a job. */\nexport interface RouterWorkerAssignment {\n /** Id of the assignment. */\n assignmentId: string;\n /** Id of the job assigned. */\n jobId: string;\n /** The amount of capacity this assignment has consumed on the worker. */\n capacityCost: number;\n /** The assignment time of the job in UTC. */\n assignedAt: Date | string;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport type QueueSelectorAttachment =\n | QueueSelectorAttachmentParent\n | ConditionalQueueSelectorAttachment\n | PassThroughQueueSelectorAttachment\n | RuleEngineQueueSelectorAttachment\n | StaticQueueSelectorAttachment\n | WeightedAllocationQueueSelectorAttachment;\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport type RouterRule =\n | RouterRuleParent\n | DirectMapRouterRule\n | ExpressionRouterRule\n | FunctionRouterRule\n | StaticRouterRule\n | WebhookRouterRule;\n/** An attachment which attaches worker selectors to a job. */\nexport type WorkerSelectorAttachment =\n | WorkerSelectorAttachmentParent\n | ConditionalWorkerSelectorAttachment\n | PassThroughWorkerSelectorAttachment\n | RuleEngineWorkerSelectorAttachment\n | StaticWorkerSelectorAttachment\n | WeightedAllocationWorkerSelectorAttachment;\n/** Abstract base class for defining a distribution mode. */\nexport type DistributionMode =\n | DistributionModeParent\n | BestWorkerMode\n | LongestIdleMode\n | RoundRobinMode;\n/** Abstract base class for defining a trigger for exception rules. */\nexport type ExceptionTrigger =\n | ExceptionTriggerParent\n | QueueLengthExceptionTrigger\n | WaitTimeExceptionTrigger;\n/** The action to take when the exception is triggered. */\nexport type ExceptionAction =\n | ExceptionActionParent\n | CancelExceptionAction\n | ManualReclassifyExceptionAction\n | ReclassifyExceptionAction;\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport type JobMatchingMode =\n | JobMatchingModeParent\n | ScheduleAndSuspendMode\n | QueueAndMatchMode\n | SuspendMode;\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=outputModels.js.map
@@ -1 +0,0 @@
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\nimport { Paged } from \"@azure/core-paging\";\n\n/** A container for the rules that govern how jobs are classified. */\nexport interface ClassificationPolicyOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of a classification policy. */\n readonly id: string;\n /** Friendly name of this policy. */\n name?: string;\n /** Id of a fallback queue to select if queue selector attachments doesn't find a match. */\n fallbackQueueId?: string;\n /** Queue selector attachments used to resolve a queue for a job. */\n queueSelectorAttachments?: Array<QueueSelectorAttachmentOutput>;\n /** A rule to determine a priority score for a job. */\n prioritizationRule?: RouterRuleOutput;\n /** Worker selector attachments used to attach worker selectors to a job. */\n workerSelectorAttachments?: Array<WorkerSelectorAttachmentOutput>;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport interface QueueSelectorAttachmentOutputParent {\n kind: string;\n}\n\n/** Describes a set of queue selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalQueueSelectorAttachmentOutput\n extends QueueSelectorAttachmentOutputParent {\n /** The condition that must be true for the queue selectors to be attached. */\n condition: RouterRuleOutput;\n /** The queue selectors to attach. */\n queueSelectors: Array<RouterQueueSelectorOutput>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"conditional\";\n}\n\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport interface RouterRuleOutputParent {\n kind: string;\n}\n\n/** A rule that return the same labels as the input labels. */\nexport interface DirectMapRouterRuleOutput extends RouterRuleOutputParent {\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"directMap\";\n}\n\n/** A rule providing inline expression rules. */\nexport interface ExpressionRouterRuleOutput extends RouterRuleOutputParent {\n /**\n * The expression language to compile to and execute.\n *\n * Possible values: \"powerFx\"\n */\n language?: string;\n /** An expression to evaluate. Should contain return statement with calculated values. */\n expression: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"expression\";\n}\n\n/** A rule providing a binding to an HTTP Triggered Azure Function. */\nexport interface FunctionRouterRuleOutput extends RouterRuleOutputParent {\n /** URL for Azure Function. */\n functionUri: string;\n /** Credentials used to access Azure function rule. */\n credential?: FunctionRouterRuleCredentialOutput;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"function\";\n}\n\n/** Credentials used to access Azure function rule. */\nexport interface FunctionRouterRuleCredentialOutput {\n /** Access key scoped to a particular function. */\n functionKey?: string;\n /** Access key scoped to a Azure Function app. This key grants access to all functions under the app. */\n appKey?: string;\n /** Client id, when AppKey is provided In context of Azure function, this is usually the name of the key. */\n clientId?: string;\n}\n\n/** A rule providing static rules that always return the same result, regardless of input. */\nexport interface StaticRouterRuleOutput extends RouterRuleOutputParent {\n /** The static value this rule always returns. Values must be primitive values - number, string, boolean. */\n value?: any;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"static\";\n}\n\n/** A rule providing a binding to an external web server. */\nexport interface WebhookRouterRuleOutput extends RouterRuleOutputParent {\n /** Uri for Authorization Server. */\n authorizationServerUri?: string;\n /** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\n clientCredential?: OAuth2WebhookClientCredentialOutput;\n /** Uri for Contoso's Web Server. */\n webhookUri?: string;\n /** The type discriminator describing a sub-type of Rule. */\n kind: \"webhook\";\n}\n\n/** OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/ */\nexport interface OAuth2WebhookClientCredentialOutput {\n /** ClientId for Contoso Authorization server. */\n clientId?: string;\n /** Client secret for Contoso Authorization server. */\n clientSecret?: string;\n}\n\n/** Describes a condition that must be met against a set of labels for queue selection. */\nexport interface RouterQueueSelectorOutput {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the label selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: any;\n}\n\n/** Attaches a queue selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughQueueSelectorAttachmentOutput\n extends QueueSelectorAttachmentOutputParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches queue selectors to a job when the RouterRule is resolved. */\nexport interface RuleEngineQueueSelectorAttachmentOutput\n extends QueueSelectorAttachmentOutputParent {\n /** A RouterRule that resolves a collection of queue selectors to attach. */\n rule: RouterRuleOutput;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a queue selector that will be attached to a job. */\nexport interface StaticQueueSelectorAttachmentOutput extends QueueSelectorAttachmentOutputParent {\n /** The queue selector to attach. */\n queueSelector: RouterQueueSelectorOutput;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationQueueSelectorAttachmentOutput\n extends QueueSelectorAttachmentOutputParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<QueueWeightedAllocationOutput>;\n /** The type discriminator describing the type of queue selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and queue selectors to be applied if selected for weighted distributions. */\nexport interface QueueWeightedAllocationOutput {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of queue selectors that will be applied if this allocation is selected. */\n queueSelectors: Array<RouterQueueSelectorOutput>;\n}\n\n/** An attachment which attaches worker selectors to a job. */\nexport interface WorkerSelectorAttachmentOutputParent {\n kind: string;\n}\n\n/** Describes a set of worker selectors that will be attached if the given condition resolves to true. */\nexport interface ConditionalWorkerSelectorAttachmentOutput\n extends WorkerSelectorAttachmentOutputParent {\n /** The condition that must be true for the worker selectors to be attached. */\n condition: RouterRuleOutput;\n /** The worker selectors to attach. */\n workerSelectors: Array<RouterWorkerSelectorOutput>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"conditional\";\n}\n\n/** Describes a condition that must be met against a set of labels for worker selection. */\nexport interface RouterWorkerSelectorOutput {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value defined on the worker selector.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean. */\n value?: any;\n /** Describes how long this label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** Pushes a job to the front of the queue as long as this selector is active. */\n expedite?: boolean;\n /**\n * Status of the worker selector.\n *\n * Possible values: \"active\", \"expired\"\n */\n readonly status?: string;\n /** The time at which this worker selector expires in UTC. */\n readonly expiresAt?: string;\n}\n\n/** Attaches a worker selector where the value is passed through from a job's label with the same key. */\nexport interface PassThroughWorkerSelectorAttachmentOutput\n extends WorkerSelectorAttachmentOutputParent {\n /** The label key to query against. */\n key: string;\n /**\n * Describes how the value of the label is compared to the value pass through.\n *\n * Possible values: \"equal\", \"notEqual\", \"lessThan\", \"lessThanOrEqual\", \"greaterThan\", \"greaterThanOrEqual\"\n */\n labelOperator: string;\n /** Describes how long the attached label selector is valid in seconds. */\n expiresAfterSeconds?: number;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"passThrough\";\n}\n\n/** Attaches worker selectors to a job when a RouterRule is resolved. */\nexport interface RuleEngineWorkerSelectorAttachmentOutput\n extends WorkerSelectorAttachmentOutputParent {\n /** A RouterRule that resolves a collection of worker selectors to attach. */\n rule: RouterRuleOutput;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"ruleEngine\";\n}\n\n/** Describes a worker selector that will be attached to a job. */\nexport interface StaticWorkerSelectorAttachmentOutput extends WorkerSelectorAttachmentOutputParent {\n /** The worker selector to attach. */\n workerSelector: RouterWorkerSelectorOutput;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"static\";\n}\n\n/** Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting. */\nexport interface WeightedAllocationWorkerSelectorAttachmentOutput\n extends WorkerSelectorAttachmentOutputParent {\n /** A collection of percentage based weighted allocations. */\n allocations: Array<WorkerWeightedAllocationOutput>;\n /** The type discriminator describing the type of worker selector attachment. */\n kind: \"weightedAllocation\";\n}\n\n/** Contains the weight percentage and worker selectors to be applied if selected for weighted distributions. */\nexport interface WorkerWeightedAllocationOutput {\n /** The percentage of this weight, expressed as a fraction of 1. */\n weight: number;\n /** A collection of worker selectors that will be applied if this allocation is selected. */\n workerSelectors: Array<RouterWorkerSelectorOutput>;\n}\n\n/** Provides the 'If-*' headers to enable conditional (cached) responses for JobRouter. */\nexport interface RouterConditionalRequestHeadersOutput {}\n\n/** Policy governing how jobs are distributed to workers */\nexport interface DistributionPolicyOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of a distribution policy. */\n readonly id: string;\n /** Friendly name of this policy. */\n name?: string;\n /** Number of seconds after which any offers created under this policy will be expired. */\n offerExpiresAfterSeconds?: number;\n /** Mode governing the specific distribution method. */\n mode?: DistributionModeOutput;\n}\n\n/** Abstract base class for defining a distribution mode. */\nexport interface DistributionModeOutputParent {\n /** Governs the minimum desired number of active concurrent offers a job can have. */\n minConcurrentOffers?: number;\n /** Governs the maximum number of active concurrent offers a job can have. */\n maxConcurrentOffers?: number;\n /** If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false. */\n bypassSelectors?: boolean;\n kind: string;\n}\n\n/** Jobs are distributed to the worker with the strongest abilities available. */\nexport interface BestWorkerModeOutput extends DistributionModeOutputParent {\n /** Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function). */\n scoringRule?: RouterRuleOutput;\n /** Options to configure 'scoringRule'. If not set, default values are used. */\n scoringRuleOptions?: ScoringRuleOptionsOutput;\n /** The type discriminator describing a sub-type of Mode */\n kind: \"bestWorker\";\n}\n\n/** Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode. */\nexport interface ScoringRuleOptionsOutput {\n /** Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured. */\n batchSize?: number;\n /** List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload. */\n scoringParameters?: string[];\n /** If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size. */\n isBatchScoringEnabled?: boolean;\n /** If false, will sort scores by ascending order. By default, set to true. */\n descendingOrder?: boolean;\n}\n\n/** Jobs are directed to the worker who has been idle longest. */\nexport interface LongestIdleModeOutput extends DistributionModeOutputParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"longestIdle\";\n}\n\n/** Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job. */\nexport interface RoundRobinModeOutput extends DistributionModeOutputParent {\n /** The type discriminator describing a sub-type of Mode. */\n kind: \"roundRobin\";\n}\n\n/** A policy that defines actions to execute when exception are triggered. */\nexport interface ExceptionPolicyOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of an exception policy. */\n readonly id: string;\n /** Friendly name of this policy. */\n name?: string;\n /** A collection of exception rules on the exception policy. */\n exceptionRules?: Array<ExceptionRuleOutput>;\n}\n\n/** A rule that defines actions to execute upon a specific trigger. */\nexport interface ExceptionRuleOutput {\n /** Id of an exception rule. */\n id: string;\n /** The trigger for this exception rule. */\n trigger: ExceptionTriggerOutput;\n /** A collection of actions to perform once the exception is triggered. */\n actions: Array<ExceptionActionOutput>;\n}\n\n/** Abstract base class for defining a trigger for exception rules. */\nexport interface ExceptionTriggerOutputParent {\n kind: string;\n}\n\n/** Trigger for an exception action on exceeding queue length. */\nexport interface QueueLengthExceptionTriggerOutput extends ExceptionTriggerOutputParent {\n /** Threshold of number of jobs ahead in the queue to for this trigger to fire. */\n threshold: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"queueLength\";\n}\n\n/** Trigger for an exception action on exceeding wait time. */\nexport interface WaitTimeExceptionTriggerOutput extends ExceptionTriggerOutputParent {\n /** Threshold for wait time for this trigger. */\n thresholdSeconds: number;\n /** The type discriminator describing a sub-type of ExceptionTrigger. */\n kind: \"waitTime\";\n}\n\n/** The action to take when the exception is triggered. */\nexport interface ExceptionActionOutputParent {\n /** Unique Id of the exception action. */\n id?: string;\n kind: string;\n}\n\n/** An action that marks a job as cancelled. */\nexport interface CancelExceptionActionOutput extends ExceptionActionOutputParent {\n /** A note that will be appended to a job's notes collection with the current timestamp. */\n note?: string;\n /** Indicates the outcome of a job, populate this field with your own custom values. */\n dispositionCode?: string;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"cancel\";\n}\n\n/** An action that manually reclassifies a job by providing the queue, priority and worker selectors. */\nexport interface ManualReclassifyExceptionActionOutput extends ExceptionActionOutputParent {\n /** Updated QueueId. */\n queueId?: string;\n /** Updated Priority. */\n priority?: number;\n /** Updated WorkerSelectors. */\n workerSelectors?: Array<RouterWorkerSelectorOutput>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"manualReclassify\";\n}\n\n/** An action that modifies labels on a job and then reclassifies it. */\nexport interface ReclassifyExceptionActionOutput extends ExceptionActionOutputParent {\n /** The new classification policy that will determine queue, priority and worker selectors. */\n classificationPolicyId?: string;\n /** Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean. */\n labelsToUpsert?: Record<string, any>;\n /** The type discriminator describing a sub-type of ExceptionAction. */\n kind: \"reclassify\";\n}\n\n/** A queue that can contain jobs to be routed. */\nexport interface RouterQueueOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of a queue. */\n readonly id: string;\n /** Friendly name of this queue. */\n name?: string;\n /** Id of a distribution policy that will determine how a job is distributed to workers. */\n distributionPolicyId?: string;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, any>;\n /** Id of an exception policy that determines various job escalation rules. */\n exceptionPolicyId?: string;\n}\n\n/** A unit of work to be routed */\nexport interface RouterJobOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of a job. */\n readonly id: string;\n /** Reference to an external parent context, eg. call ID. */\n channelReference?: string;\n /**\n * The status of the job.\n *\n * Possible values: \"pendingClassification\", \"queued\", \"assigned\", \"completed\", \"closed\", \"cancelled\", \"classificationFailed\", \"created\", \"pendingSchedule\", \"scheduled\", \"scheduleFailed\", \"waitingForActivation\"\n */\n readonly status?: string;\n /** Timestamp a job was queued in UTC. */\n readonly enqueuedAt?: string;\n /** The channel identifier. eg. voice, chat, etc. */\n channelId?: string;\n /** Id of a classification policy used for classifying this job. */\n classificationPolicyId?: string;\n /** Id of a queue that this job is queued to. */\n queueId?: string;\n /** Priority of this job. */\n priority?: number;\n /** Reason code for cancelled or closed jobs. */\n dispositionCode?: string;\n /** A collection of manually specified worker selectors, which a worker must satisfy in order to process this job. */\n requestedWorkerSelectors?: Array<RouterWorkerSelectorOutput>;\n /** A collection of worker selectors attached by a classification policy, which a worker must satisfy in order to process this job. */\n readonly attachedWorkerSelectors?: Array<RouterWorkerSelectorOutput>;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, any>;\n /** A collection of the assignments of the job. Key is AssignmentId. */\n readonly assignments?: Record<string, RouterJobAssignmentOutput>;\n /** A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, any>;\n /** Notes attached to a job, sorted by timestamp. */\n notes?: Array<RouterJobNoteOutput>;\n /** If set, job will be scheduled to be enqueued at a given time. */\n readonly scheduledAt?: string;\n /** If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode. */\n matchingMode?: JobMatchingModeOutput;\n}\n\n/** Assignment details of a job to a worker. */\nexport interface RouterJobAssignmentOutput {\n /** Id of a job assignment. */\n readonly assignmentId: string;\n /** Id of the Worker assigned to the job. */\n workerId?: string;\n /** Timestamp when the job was assigned to a worker in UTC. */\n assignedAt: string;\n /** Timestamp when the job was marked as completed after being assigned in UTC. */\n completedAt?: string;\n /** Timestamp when the job was marked as closed after being completed in UTC. */\n closedAt?: string;\n}\n\n/** A note attached to a job. */\nexport interface RouterJobNoteOutput {\n /** The message contained in the note. */\n message: string;\n /** The time at which the note was added in UTC. If not provided, will default to the current time. */\n addedAt?: string;\n}\n\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport interface JobMatchingModeOutputParent {\n kind: string;\n}\n\n/** Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically. */\nexport interface ScheduleAndSuspendModeOutput extends JobMatchingModeOutputParent {\n /** Requested schedule time. */\n scheduleAt: string;\n /** The type discriminator describing ScheduleAndSuspendMode */\n kind: \"scheduleAndSuspend\";\n}\n\n/** Describes a matching mode where matching worker to a job is automatically started after job is queued successfully. */\nexport interface QueueAndMatchModeOutput extends JobMatchingModeOutputParent {\n /** The type discriminator describing QueueAndMatchMode */\n kind: \"queueAndMatch\";\n}\n\n/** Describes a matching mode where matching worker to a job is suspended. */\nexport interface SuspendModeOutput extends JobMatchingModeOutputParent {\n /** The type discriminator describing SuspendMode */\n kind: \"suspend\";\n}\n\n/** Response payload from reclassifying a job. */\nexport interface ReclassifyJobResultOutput {}\n\n/** Response payload from cancelling a job. */\nexport interface CancelJobResultOutput {}\n\n/** Response payload from completing a job. */\nexport interface CompleteJobResultOutput {}\n\n/** Response payload from closing a job. */\nexport interface CloseJobResultOutput {}\n\n/** Position and estimated wait time for a job. */\nexport interface RouterJobPositionDetailsOutput {\n /** Id of the job these details are about. */\n jobId: string;\n /** Position of the job in question within that queue. */\n position: number;\n /** Id of the queue this job is enqueued in. */\n queueId: string;\n /** Length of the queue: total number of enqueued jobs. */\n queueLength: number;\n /** Estimated wait time of the job rounded up to the nearest minute. */\n estimatedWaitTimeMinutes: number;\n}\n\n/** Response payload after a job has been successfully unassigned. */\nexport interface UnassignJobResultOutput {\n /** Id of an unassigned job. */\n jobId: string;\n /** The number of times a job is unassigned. At a maximum 3. */\n unassignmentCount: number;\n}\n\n/** Response containing ids for the worker, job, and assignment from an accepted offer. */\nexport interface AcceptJobOfferResultOutput {\n /** Id of job assignment that assigns a worker that has accepted an offer to a job. */\n assignmentId: string;\n /** Id of the job assigned. */\n jobId: string;\n /** Id of the worker that has been assigned this job. */\n workerId: string;\n}\n\n/** Response payload from declining a job. */\nexport interface DeclineJobOfferResultOutput {}\n\n/** Statistics for the queue. */\nexport interface RouterQueueStatisticsOutput {\n /** Id of the queue these details are about. */\n queueId: string;\n /** Length of the queue: total number of enqueued jobs. */\n length: number;\n /** The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority. */\n estimatedWaitTimeMinutes?: Record<string, number>;\n /** The wait time of the job that has been enqueued in this queue for the longest. */\n longestJobWaitTimeMinutes?: number;\n}\n\n/** An entity for jobs to be routed to. */\nexport interface RouterWorkerOutput {\n /** The entity tag for this resource. */\n readonly etag: string;\n /** Id of a worker. */\n readonly id: string;\n /**\n * Current state of a worker.\n *\n * Possible values: \"active\", \"draining\", \"inactive\"\n */\n readonly state?: string;\n /** Collection of queue(s) that this worker can receive work from. */\n queues?: string[];\n /** The total capacity score this worker has to manage multiple concurrent jobs. */\n capacity?: number;\n /** A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean. */\n labels?: Record<string, any>;\n /** A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean. */\n tags?: Record<string, any>;\n /** Collection of channel(s) this worker can handle and their impact on the workers capacity. */\n channels?: Array<RouterChannelOutput>;\n /** A list of active offers issued to this worker. */\n readonly offers?: Array<RouterJobOfferOutput>;\n /** A list of assigned jobs attached to this worker. */\n readonly assignedJobs?: Array<RouterWorkerAssignmentOutput>;\n /** A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed. */\n readonly loadRatio?: number;\n /** A flag indicating this worker is open to receive offers or not. */\n availableForOffers?: boolean;\n /** If this is set, the worker will only receive up to this many new offers at a time. */\n maxConcurrentOffers?: number;\n}\n\n/** Represents the capacity a job in this channel will consume from a worker. */\nexport interface RouterChannelOutput {\n /** Id of a channel. */\n channelId: string;\n /** The amount of capacity that an instance of a job of this channel will consume of the total worker capacity. */\n capacityCostPerJob: number;\n /** The maximum number of jobs that can be supported concurrently for this channel. */\n maxNumberOfJobs?: number;\n}\n\n/** An offer of a job to a worker. */\nexport interface RouterJobOfferOutput {\n /** Id of an offer. */\n readonly offerId: string;\n /** Id of the job. */\n jobId: string;\n /** The capacity cost consumed by the job offer. */\n capacityCost: number;\n /** Timestamp when the offer was created in UTC. */\n offeredAt?: string;\n /** Timestamp when the offer will expire in UTC. */\n expiresAt?: string;\n}\n\n/** The assignment for a worker to a job. */\nexport interface RouterWorkerAssignmentOutput {\n /** Id of the assignment. */\n assignmentId: string;\n /** Id of the job assigned. */\n jobId: string;\n /** The amount of capacity this assignment has consumed on the worker. */\n capacityCost: number;\n /** The assignment time of the job in UTC. */\n assignedAt: string;\n}\n\n/** An attachment of queue selectors to resolve a queue to a job from a classification policy. */\nexport type QueueSelectorAttachmentOutput =\n | QueueSelectorAttachmentOutputParent\n | ConditionalQueueSelectorAttachmentOutput\n | PassThroughQueueSelectorAttachmentOutput\n | RuleEngineQueueSelectorAttachmentOutput\n | StaticQueueSelectorAttachmentOutput\n | WeightedAllocationQueueSelectorAttachmentOutput;\n/**\n * A rule of one of the following types:\n * StaticRule: A rule providing static rules that always return the same result, regardless of input.\n * DirectMapRule: A rule that return the same labels as the input labels.\n * ExpressionRule: A rule providing inline expression rules.\n * FunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\n * WebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.\n */\nexport type RouterRuleOutput =\n | RouterRuleOutputParent\n | DirectMapRouterRuleOutput\n | ExpressionRouterRuleOutput\n | FunctionRouterRuleOutput\n | StaticRouterRuleOutput\n | WebhookRouterRuleOutput;\n/** An attachment which attaches worker selectors to a job. */\nexport type WorkerSelectorAttachmentOutput =\n | WorkerSelectorAttachmentOutputParent\n | ConditionalWorkerSelectorAttachmentOutput\n | PassThroughWorkerSelectorAttachmentOutput\n | RuleEngineWorkerSelectorAttachmentOutput\n | StaticWorkerSelectorAttachmentOutput\n | WeightedAllocationWorkerSelectorAttachmentOutput;\n/** Abstract base class for defining a distribution mode. */\nexport type DistributionModeOutput =\n | DistributionModeOutputParent\n | BestWorkerModeOutput\n | LongestIdleModeOutput\n | RoundRobinModeOutput;\n/** Abstract base class for defining a trigger for exception rules. */\nexport type ExceptionTriggerOutput =\n | ExceptionTriggerOutputParent\n | QueueLengthExceptionTriggerOutput\n | WaitTimeExceptionTriggerOutput;\n/** The action to take when the exception is triggered. */\nexport type ExceptionActionOutput =\n | ExceptionActionOutputParent\n | CancelExceptionActionOutput\n | ManualReclassifyExceptionActionOutput\n | ReclassifyExceptionActionOutput;\n/**\n * A matching mode of one of the following types:\n * QueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\n * ScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\n * SuspendMode: Used when matching workers to a job needs to be suspended.\n */\nexport type JobMatchingModeOutput =\n | JobMatchingModeOutputParent\n | ScheduleAndSuspendModeOutput\n | QueueAndMatchModeOutput\n | SuspendModeOutput;\n/** Paged collection of ClassificationPolicy items */\nexport type PagedClassificationPolicyOutput = Paged<ClassificationPolicyOutput>;\n/** Paged collection of DistributionPolicy items */\nexport type PagedDistributionPolicyOutput = Paged<DistributionPolicyOutput>;\n/** Paged collection of ExceptionPolicy items */\nexport type PagedExceptionPolicyOutput = Paged<ExceptionPolicyOutput>;\n/** Paged collection of RouterQueue items */\nexport type PagedRouterQueueOutput = Paged<RouterQueueOutput>;\n/** Paged collection of RouterJob items */\nexport type PagedRouterJobOutput = Paged<RouterJobOutput>;\n/** Paged collection of RouterWorker items */\nexport type PagedRouterWorkerOutput = Paged<RouterWorkerOutput>;\n"]}
@@ -1,70 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { getPagedAsyncIterator } from "@azure/core-paging";
4
- import { createRestError } from "@azure-rest/core-client";
5
- /**
6
- * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
7
- * @param client - Client to use for sending the next page requests
8
- * @param initialResponse - Initial response containing the nextLink and current page of elements
9
- * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
10
- * @returns - PagedAsyncIterableIterator to iterate the elements
11
- */
12
- export function paginate(client, initialResponse, options = {}) {
13
- let firstRun = true;
14
- const itemName = "value";
15
- const nextLinkName = "nextLink";
16
- const { customGetPage } = options;
17
- const pagedResult = {
18
- firstPageLink: "",
19
- getPage: typeof customGetPage === "function"
20
- ? customGetPage
21
- : async (pageLink) => {
22
- const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
23
- firstRun = false;
24
- checkPagingRequest(result);
25
- const nextLink = getNextLink(result.body, nextLinkName);
26
- const values = getElements(result.body, itemName);
27
- return {
28
- page: values,
29
- nextPageLink: nextLink,
30
- };
31
- },
32
- };
33
- return getPagedAsyncIterator(pagedResult);
34
- }
35
- /**
36
- * Gets for the value of nextLink in the body
37
- */
38
- function getNextLink(body, nextLinkName) {
39
- if (!nextLinkName) {
40
- return undefined;
41
- }
42
- const nextLink = body[nextLinkName];
43
- if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
44
- throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
45
- }
46
- return nextLink;
47
- }
48
- /**
49
- * Gets the elements of the current request in the body.
50
- */
51
- function getElements(body, itemName) {
52
- const value = body[itemName];
53
- // value has to be an array according to the x-ms-pageable extension.
54
- // The fact that this must be an array is used above to calculate the
55
- // type of elements in the page in PaginateReturn
56
- if (!Array.isArray(value)) {
57
- throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
58
- }
59
- return value !== null && value !== void 0 ? value : [];
60
- }
61
- /**
62
- * Checks if a request failed
63
- */
64
- function checkPagingRequest(response) {
65
- const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
66
- if (!Http2xxStatusCodes.includes(response.status)) {
67
- throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
68
- }
69
- }
70
- //# sourceMappingURL=paginateHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=parameters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n ClassificationPolicy,\n DistributionPolicy,\n ExceptionPolicy,\n RouterQueue,\n RouterJob,\n ReclassifyJobOptions,\n CancelJobOptions,\n CompleteJobOptions,\n CloseJobOptions,\n UnassignJobOptions,\n DeclineJobOfferOptions,\n RouterWorker,\n} from \"./models\";\n\nexport interface UpsertClassificationPolicyHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type ClassificationPolicyResourceMergeAndPatch = Partial<ClassificationPolicy>;\n\nexport interface UpsertClassificationPolicyBodyParam {\n /** The resource instance. */\n body: ClassificationPolicyResourceMergeAndPatch;\n}\n\nexport interface UpsertClassificationPolicyHeaderParam {\n headers?: RawHttpHeadersInput & UpsertClassificationPolicyHeaders;\n}\n\nexport interface UpsertClassificationPolicyMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertClassificationPolicyParameters = UpsertClassificationPolicyHeaderParam &\n UpsertClassificationPolicyMediaTypesParam &\n UpsertClassificationPolicyBodyParam &\n RequestParameters;\nexport type GetClassificationPolicyParameters = RequestParameters;\nexport type DeleteClassificationPolicyParameters = RequestParameters;\n\nexport interface ListClassificationPoliciesQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n}\n\nexport interface ListClassificationPoliciesQueryParam {\n queryParameters?: ListClassificationPoliciesQueryParamProperties;\n}\n\nexport type ListClassificationPoliciesParameters = ListClassificationPoliciesQueryParam &\n RequestParameters;\n\nexport interface UpsertDistributionPolicyHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type DistributionPolicyResourceMergeAndPatch = Partial<DistributionPolicy>;\n\nexport interface UpsertDistributionPolicyBodyParam {\n /** The resource instance. */\n body: DistributionPolicyResourceMergeAndPatch;\n}\n\nexport interface UpsertDistributionPolicyHeaderParam {\n headers?: RawHttpHeadersInput & UpsertDistributionPolicyHeaders;\n}\n\nexport interface UpsertDistributionPolicyMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertDistributionPolicyParameters = UpsertDistributionPolicyHeaderParam &\n UpsertDistributionPolicyMediaTypesParam &\n UpsertDistributionPolicyBodyParam &\n RequestParameters;\nexport type GetDistributionPolicyParameters = RequestParameters;\nexport type DeleteDistributionPolicyParameters = RequestParameters;\n\nexport interface ListDistributionPoliciesQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n}\n\nexport interface ListDistributionPoliciesQueryParam {\n queryParameters?: ListDistributionPoliciesQueryParamProperties;\n}\n\nexport type ListDistributionPoliciesParameters = ListDistributionPoliciesQueryParam &\n RequestParameters;\n\nexport interface UpsertExceptionPolicyHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type ExceptionPolicyResourceMergeAndPatch = Partial<ExceptionPolicy>;\n\nexport interface UpsertExceptionPolicyBodyParam {\n /** The resource instance. */\n body: ExceptionPolicyResourceMergeAndPatch;\n}\n\nexport interface UpsertExceptionPolicyHeaderParam {\n headers?: RawHttpHeadersInput & UpsertExceptionPolicyHeaders;\n}\n\nexport interface UpsertExceptionPolicyMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertExceptionPolicyParameters = UpsertExceptionPolicyHeaderParam &\n UpsertExceptionPolicyMediaTypesParam &\n UpsertExceptionPolicyBodyParam &\n RequestParameters;\nexport type GetExceptionPolicyParameters = RequestParameters;\nexport type DeleteExceptionPolicyParameters = RequestParameters;\n\nexport interface ListExceptionPoliciesQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n}\n\nexport interface ListExceptionPoliciesQueryParam {\n queryParameters?: ListExceptionPoliciesQueryParamProperties;\n}\n\nexport type ListExceptionPoliciesParameters = ListExceptionPoliciesQueryParam & RequestParameters;\n\nexport interface UpsertQueueHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type RouterQueueResourceMergeAndPatch = Partial<RouterQueue>;\n\nexport interface UpsertQueueBodyParam {\n /** The resource instance. */\n body: RouterQueueResourceMergeAndPatch;\n}\n\nexport interface UpsertQueueHeaderParam {\n headers?: RawHttpHeadersInput & UpsertQueueHeaders;\n}\n\nexport interface UpsertQueueMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertQueueParameters = UpsertQueueHeaderParam &\n UpsertQueueMediaTypesParam &\n UpsertQueueBodyParam &\n RequestParameters;\nexport type GetQueueParameters = RequestParameters;\nexport type DeleteQueueParameters = RequestParameters;\n\nexport interface ListQueuesQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n}\n\nexport interface ListQueuesQueryParam {\n queryParameters?: ListQueuesQueryParamProperties;\n}\n\nexport type ListQueuesParameters = ListQueuesQueryParam & RequestParameters;\n\nexport interface UpsertJobHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type RouterJobResourceMergeAndPatch = Partial<RouterJob>;\n\nexport interface UpsertJobBodyParam {\n /** The resource instance. */\n body: RouterJobResourceMergeAndPatch;\n}\n\nexport interface UpsertJobHeaderParam {\n headers?: RawHttpHeadersInput & UpsertJobHeaders;\n}\n\nexport interface UpsertJobMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertJobParameters = UpsertJobHeaderParam &\n UpsertJobMediaTypesParam &\n UpsertJobBodyParam &\n RequestParameters;\nexport type GetJobParameters = RequestParameters;\nexport type DeleteJobParameters = RequestParameters;\n\nexport interface ReclassifyBodyParam {\n /** Request object for reclassifying a job. */\n body?: ReclassifyJobOptions;\n}\n\nexport type ReclassifyParameters = ReclassifyBodyParam & RequestParameters;\n\nexport interface CancelBodyParam {\n /** Request model for cancelling job. */\n body?: CancelJobOptions;\n}\n\nexport type CancelParameters = CancelBodyParam & RequestParameters;\n\nexport interface CompleteBodyParam {\n /** Request model for completing job. */\n body?: CompleteJobOptions;\n}\n\nexport type CompleteParameters = CompleteBodyParam & RequestParameters;\n\nexport interface CloseBodyParam {\n /** Request model for closing job. */\n body?: CloseJobOptions;\n}\n\nexport type CloseParameters = CloseBodyParam & RequestParameters;\n\nexport interface ListJobsQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n /**\n * If specified, filter jobs by status.\n *\n * Possible values: \"all\", \"pendingClassification\", \"queued\", \"assigned\", \"completed\", \"closed\", \"cancelled\", \"classificationFailed\", \"created\", \"pendingSchedule\", \"scheduled\", \"scheduleFailed\", \"waitingForActivation\", \"active\"\n */\n status?: string;\n /** If specified, filter jobs by queue. */\n queueId?: string;\n /** If specified, filter jobs by channel. */\n channelId?: string;\n /** If specified, filter jobs by classificationPolicy. */\n classificationPolicyId?: string;\n /** If specified, filter on jobs that was scheduled before or at given timestamp. Range: (-Inf, scheduledBefore]. */\n scheduledBefore?: Date | string;\n /** If specified, filter on jobs that was scheduled at or after given value. Range: [scheduledAfter, +Inf). */\n scheduledAfter?: Date | string;\n}\n\nexport interface ListJobsQueryParam {\n queryParameters?: ListJobsQueryParamProperties;\n}\n\nexport type ListJobsParameters = ListJobsQueryParam & RequestParameters;\nexport type GetInQueuePositionParameters = RequestParameters;\n\nexport interface UnassignBodyParam {\n /** Request body for unassign route. */\n body?: UnassignJobOptions;\n}\n\nexport type UnassignParameters = UnassignBodyParam & RequestParameters;\nexport type AcceptParameters = RequestParameters;\n\nexport interface DeclineBodyParam {\n /** Request model for declining offer. */\n body?: DeclineJobOfferOptions;\n}\n\nexport type DeclineParameters = DeclineBodyParam & RequestParameters;\nexport type GetQueueStatisticsParameters = RequestParameters;\n\nexport interface UpsertWorkerHeaders {\n /** The request should only proceed if an entity matches this string. */\n \"If-Match\"?: string;\n /** The request should only proceed if the entity was not modified after this time. */\n \"If-Unmodified-Since\"?: string;\n}\n\n/** The resource instance. */\nexport type RouterWorkerResourceMergeAndPatch = Partial<RouterWorker>;\n\nexport interface UpsertWorkerBodyParam {\n /** The resource instance. */\n body: RouterWorkerResourceMergeAndPatch;\n}\n\nexport interface UpsertWorkerHeaderParam {\n headers?: RawHttpHeadersInput & UpsertWorkerHeaders;\n}\n\nexport interface UpsertWorkerMediaTypesParam {\n /** This request has a JSON Merge Patch body. */\n contentType: \"application/merge-patch+json\";\n}\n\nexport type UpsertWorkerParameters = UpsertWorkerHeaderParam &\n UpsertWorkerMediaTypesParam &\n UpsertWorkerBodyParam &\n RequestParameters;\nexport type GetWorkerParameters = RequestParameters;\nexport type DeleteWorkerParameters = RequestParameters;\n\nexport interface ListWorkersQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n /**\n * If specified, select workers by worker state.\n *\n * Possible values: \"active\", \"draining\", \"inactive\", \"all\"\n */\n state?: string;\n /** If specified, select workers who have a channel configuration with this channel. */\n channelId?: string;\n /** If specified, select workers who are assigned to this queue. */\n queueId?: string;\n /** If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false. */\n hasCapacity?: boolean;\n}\n\nexport interface ListWorkersQueryParam {\n queryParameters?: ListWorkersQueryParamProperties;\n}\n\nexport type ListWorkersParameters = ListWorkersQueryParam & RequestParameters;\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=responses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport {\n ClassificationPolicyOutput,\n PagedClassificationPolicyOutput,\n DistributionPolicyOutput,\n PagedDistributionPolicyOutput,\n ExceptionPolicyOutput,\n PagedExceptionPolicyOutput,\n RouterQueueOutput,\n PagedRouterQueueOutput,\n RouterJobOutput,\n ReclassifyJobResultOutput,\n CancelJobResultOutput,\n CompleteJobResultOutput,\n CloseJobResultOutput,\n PagedRouterJobOutput,\n RouterJobPositionDetailsOutput,\n UnassignJobResultOutput,\n AcceptJobOfferResultOutput,\n DeclineJobOfferResultOutput,\n RouterQueueStatisticsOutput,\n RouterWorkerOutput,\n PagedRouterWorkerOutput,\n} from \"./outputModels\";\n\nexport interface UpsertClassificationPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertClassificationPolicy200Response extends HttpResponse {\n status: \"200\";\n body: ClassificationPolicyOutput;\n headers: RawHttpHeaders & UpsertClassificationPolicy200Headers;\n}\n\nexport interface UpsertClassificationPolicy201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertClassificationPolicy201Response extends HttpResponse {\n status: \"201\";\n body: ClassificationPolicyOutput;\n headers: RawHttpHeaders & UpsertClassificationPolicy201Headers;\n}\n\nexport interface UpsertClassificationPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertClassificationPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertClassificationPolicyDefaultHeaders;\n}\n\nexport interface GetClassificationPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetClassificationPolicy200Response extends HttpResponse {\n status: \"200\";\n body: ClassificationPolicyOutput;\n headers: RawHttpHeaders & GetClassificationPolicy200Headers;\n}\n\nexport interface GetClassificationPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetClassificationPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetClassificationPolicyDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteClassificationPolicy204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteClassificationPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteClassificationPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteClassificationPolicyDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListClassificationPolicies200Response extends HttpResponse {\n status: \"200\";\n body: PagedClassificationPolicyOutput;\n}\n\nexport interface ListClassificationPoliciesDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListClassificationPoliciesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListClassificationPoliciesDefaultHeaders;\n}\n\nexport interface UpsertDistributionPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertDistributionPolicy200Response extends HttpResponse {\n status: \"200\";\n body: DistributionPolicyOutput;\n headers: RawHttpHeaders & UpsertDistributionPolicy200Headers;\n}\n\nexport interface UpsertDistributionPolicy201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertDistributionPolicy201Response extends HttpResponse {\n status: \"201\";\n body: DistributionPolicyOutput;\n headers: RawHttpHeaders & UpsertDistributionPolicy201Headers;\n}\n\nexport interface UpsertDistributionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertDistributionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertDistributionPolicyDefaultHeaders;\n}\n\nexport interface GetDistributionPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetDistributionPolicy200Response extends HttpResponse {\n status: \"200\";\n body: DistributionPolicyOutput;\n headers: RawHttpHeaders & GetDistributionPolicy200Headers;\n}\n\nexport interface GetDistributionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetDistributionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetDistributionPolicyDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteDistributionPolicy204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteDistributionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteDistributionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteDistributionPolicyDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListDistributionPolicies200Response extends HttpResponse {\n status: \"200\";\n body: PagedDistributionPolicyOutput;\n}\n\nexport interface ListDistributionPoliciesDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListDistributionPoliciesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListDistributionPoliciesDefaultHeaders;\n}\n\nexport interface UpsertExceptionPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertExceptionPolicy200Response extends HttpResponse {\n status: \"200\";\n body: ExceptionPolicyOutput;\n headers: RawHttpHeaders & UpsertExceptionPolicy200Headers;\n}\n\nexport interface UpsertExceptionPolicy201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertExceptionPolicy201Response extends HttpResponse {\n status: \"201\";\n body: ExceptionPolicyOutput;\n headers: RawHttpHeaders & UpsertExceptionPolicy201Headers;\n}\n\nexport interface UpsertExceptionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertExceptionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertExceptionPolicyDefaultHeaders;\n}\n\nexport interface GetExceptionPolicy200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetExceptionPolicy200Response extends HttpResponse {\n status: \"200\";\n body: ExceptionPolicyOutput;\n headers: RawHttpHeaders & GetExceptionPolicy200Headers;\n}\n\nexport interface GetExceptionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetExceptionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetExceptionPolicyDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteExceptionPolicy204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteExceptionPolicyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteExceptionPolicyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteExceptionPolicyDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListExceptionPolicies200Response extends HttpResponse {\n status: \"200\";\n body: PagedExceptionPolicyOutput;\n}\n\nexport interface ListExceptionPoliciesDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListExceptionPoliciesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListExceptionPoliciesDefaultHeaders;\n}\n\nexport interface UpsertQueue200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertQueue200Response extends HttpResponse {\n status: \"200\";\n body: RouterQueueOutput;\n headers: RawHttpHeaders & UpsertQueue200Headers;\n}\n\nexport interface UpsertQueue201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertQueue201Response extends HttpResponse {\n status: \"201\";\n body: RouterQueueOutput;\n headers: RawHttpHeaders & UpsertQueue201Headers;\n}\n\nexport interface UpsertQueueDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertQueueDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertQueueDefaultHeaders;\n}\n\nexport interface GetQueue200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetQueue200Response extends HttpResponse {\n status: \"200\";\n body: RouterQueueOutput;\n headers: RawHttpHeaders & GetQueue200Headers;\n}\n\nexport interface GetQueueDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetQueueDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetQueueDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteQueue204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteQueueDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteQueueDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteQueueDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListQueues200Response extends HttpResponse {\n status: \"200\";\n body: PagedRouterQueueOutput;\n}\n\nexport interface ListQueuesDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListQueuesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListQueuesDefaultHeaders;\n}\n\nexport interface UpsertJob200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertJob200Response extends HttpResponse {\n status: \"200\";\n body: RouterJobOutput;\n headers: RawHttpHeaders & UpsertJob200Headers;\n}\n\nexport interface UpsertJob201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertJob201Response extends HttpResponse {\n status: \"201\";\n body: RouterJobOutput;\n headers: RawHttpHeaders & UpsertJob201Headers;\n}\n\nexport interface UpsertJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertJobDefaultHeaders;\n}\n\nexport interface GetJob200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetJob200Response extends HttpResponse {\n status: \"200\";\n body: RouterJobOutput;\n headers: RawHttpHeaders & GetJob200Headers;\n}\n\nexport interface GetJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetJobDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteJob204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteJobDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteJobDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteJobDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Reclassify200Response extends HttpResponse {\n status: \"200\";\n body: ReclassifyJobResultOutput;\n}\n\nexport interface ReclassifyDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ReclassifyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ReclassifyDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Cancel200Response extends HttpResponse {\n status: \"200\";\n body: CancelJobResultOutput;\n}\n\nexport interface CancelDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CancelDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CancelDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Complete200Response extends HttpResponse {\n status: \"200\";\n body: CompleteJobResultOutput;\n}\n\nexport interface CompleteDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CompleteDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CompleteDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Close200Response extends HttpResponse {\n status: \"200\";\n body: CloseJobResultOutput;\n}\n\nexport interface CloseDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface CloseDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & CloseDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListJobs200Response extends HttpResponse {\n status: \"200\";\n body: PagedRouterJobOutput;\n}\n\nexport interface ListJobsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListJobsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListJobsDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetInQueuePosition200Response extends HttpResponse {\n status: \"200\";\n body: RouterJobPositionDetailsOutput;\n}\n\nexport interface GetInQueuePositionDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetInQueuePositionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetInQueuePositionDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Unassign200Response extends HttpResponse {\n status: \"200\";\n body: UnassignJobResultOutput;\n}\n\nexport interface UnassignDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UnassignDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UnassignDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Accept200Response extends HttpResponse {\n status: \"200\";\n body: AcceptJobOfferResultOutput;\n}\n\nexport interface AcceptDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface AcceptDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & AcceptDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface Decline200Response extends HttpResponse {\n status: \"200\";\n body: DeclineJobOfferResultOutput;\n}\n\nexport interface DeclineDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeclineDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeclineDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetQueueStatistics200Response extends HttpResponse {\n status: \"200\";\n body: RouterQueueStatisticsOutput;\n}\n\nexport interface GetQueueStatisticsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetQueueStatisticsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetQueueStatisticsDefaultHeaders;\n}\n\nexport interface UpsertWorker200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface UpsertWorker200Response extends HttpResponse {\n status: \"200\";\n body: RouterWorkerOutput;\n headers: RawHttpHeaders & UpsertWorker200Headers;\n}\n\nexport interface UpsertWorker201Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface UpsertWorker201Response extends HttpResponse {\n status: \"201\";\n body: RouterWorkerOutput;\n headers: RawHttpHeaders & UpsertWorker201Headers;\n}\n\nexport interface UpsertWorkerDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface UpsertWorkerDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & UpsertWorkerDefaultHeaders;\n}\n\nexport interface GetWorker200Headers {\n /** The entity tag for the response. */\n etag?: string;\n /** The last modified timestamp. */\n \"last-modified\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface GetWorker200Response extends HttpResponse {\n status: \"200\";\n body: RouterWorkerOutput;\n headers: RawHttpHeaders & GetWorker200Headers;\n}\n\nexport interface GetWorkerDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetWorkerDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetWorkerDefaultHeaders;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteWorker204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteWorkerDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface DeleteWorkerDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & DeleteWorkerDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface ListWorkers200Response extends HttpResponse {\n status: \"200\";\n body: PagedRouterWorkerOutput;\n}\n\nexport interface ListWorkersDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListWorkersDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListWorkersDefaultHeaders;\n}\n"]}