@datadog/datadog-api-client 1.3.0 → 1.4.0

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 (359) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +72 -0
  3. package/dist/packages/datadog-api-client-common/configuration.js +2 -1
  4. package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
  5. package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js +3 -5
  6. package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js.map +1 -1
  7. package/dist/packages/datadog-api-client-common/servers.js.map +1 -1
  8. package/dist/packages/datadog-api-client-common/util.d.ts +0 -9
  9. package/dist/packages/datadog-api-client-common/util.js +1 -32
  10. package/dist/packages/datadog-api-client-common/util.js.map +1 -1
  11. package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js +262 -407
  12. package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js.map +1 -1
  13. package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js +201 -291
  14. package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js.map +1 -1
  15. package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js +27 -33
  16. package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js.map +1 -1
  17. package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js +145 -215
  18. package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js.map +1 -1
  19. package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js +144 -215
  20. package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js.map +1 -1
  21. package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js +198 -313
  22. package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js.map +1 -1
  23. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js +201 -308
  24. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js.map +1 -1
  25. package/dist/packages/datadog-api-client-v1/apis/EventsApi.js +85 -119
  26. package/dist/packages/datadog-api-client-v1/apis/EventsApi.js.map +1 -1
  27. package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js +116 -172
  28. package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js.map +1 -1
  29. package/dist/packages/datadog-api-client-v1/apis/HostsApi.js +116 -172
  30. package/dist/packages/datadog-api-client-v1/apis/HostsApi.js.map +1 -1
  31. package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js +23 -19
  32. package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js.map +1 -1
  33. package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js +291 -460
  34. package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js.map +1 -1
  35. package/dist/packages/datadog-api-client-v1/apis/LogsApi.js +75 -67
  36. package/dist/packages/datadog-api-client-v1/apis/LogsApi.js.map +1 -1
  37. package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js +210 -226
  38. package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js.map +1 -1
  39. package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js +246 -272
  40. package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js.map +1 -1
  41. package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js +208 -351
  42. package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js.map +1 -1
  43. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js +295 -490
  44. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js.map +1 -1
  45. package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js +146 -251
  46. package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js.map +1 -1
  47. package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js +173 -258
  48. package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js.map +1 -1
  49. package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js +111 -174
  50. package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js.map +1 -1
  51. package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js +90 -159
  52. package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js.map +1 -1
  53. package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js +31 -63
  54. package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js.map +1 -1
  55. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js +142 -221
  56. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js.map +1 -1
  57. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.d.ts +8 -1
  58. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js +298 -492
  59. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js.map +1 -1
  60. package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js +147 -261
  61. package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js.map +1 -1
  62. package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js +29 -43
  63. package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js.map +1 -1
  64. package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js +765 -1130
  65. package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js.map +1 -1
  66. package/dist/packages/datadog-api-client-v1/apis/TagsApi.js +142 -211
  67. package/dist/packages/datadog-api-client-v1/apis/TagsApi.js.map +1 -1
  68. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js +1093 -1594
  69. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js.map +1 -1
  70. package/dist/packages/datadog-api-client-v1/apis/UsersApi.js +146 -235
  71. package/dist/packages/datadog-api-client-v1/apis/UsersApi.js.map +1 -1
  72. package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js +230 -376
  73. package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js.map +1 -1
  74. package/dist/packages/datadog-api-client-v1/index.d.ts +20 -0
  75. package/dist/packages/datadog-api-client-v1/index.js +35 -7
  76. package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
  77. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.d.ts +5 -1
  78. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js +4 -0
  79. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js.map +1 -1
  80. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.d.ts +5 -1
  81. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js +4 -0
  82. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js.map +1 -1
  83. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.d.ts +4 -0
  84. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js +4 -0
  85. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js.map +1 -1
  86. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.d.ts +2 -1
  87. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js +2 -1
  88. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js.map +1 -1
  89. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.d.ts +4 -0
  90. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js +4 -0
  91. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js.map +1 -1
  92. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.d.ts +3 -1
  93. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js +4 -2
  94. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js.map +1 -1
  95. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.d.ts +8 -0
  96. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js +10 -0
  97. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js.map +1 -1
  98. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +44 -0
  99. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
  100. package/dist/packages/datadog-api-client-v1/models/SLOCreator.d.ts +36 -0
  101. package/dist/packages/datadog-api-client-v1/models/SLOCreator.js +42 -0
  102. package/dist/packages/datadog-api-client-v1/models/SLOCreator.js.map +1 -0
  103. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.d.ts +47 -0
  104. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js +46 -0
  105. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js.map +1 -0
  106. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.d.ts +7 -0
  107. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js +10 -0
  108. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js.map +1 -0
  109. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.d.ts +32 -0
  110. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js +39 -0
  111. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js.map +1 -0
  112. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.d.ts +34 -0
  113. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js +34 -0
  114. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js.map +1 -0
  115. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.d.ts +7 -0
  116. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js +10 -0
  117. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js.map +1 -0
  118. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.d.ts +55 -0
  119. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js +56 -0
  120. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js.map +1 -0
  121. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.d.ts +32 -0
  122. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js +38 -0
  123. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js.map +1 -0
  124. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.d.ts +39 -0
  125. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js +43 -0
  126. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js.map +1 -0
  127. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.d.ts +2 -2
  128. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js +3 -3
  129. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js.map +1 -1
  130. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.d.ts +54 -0
  131. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js +48 -0
  132. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js.map +1 -0
  133. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.d.ts +9 -0
  134. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js +12 -0
  135. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js.map +1 -0
  136. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.d.ts +29 -0
  137. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js +28 -0
  138. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js.map +1 -0
  139. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.d.ts +103 -0
  140. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js +88 -0
  141. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js.map +1 -0
  142. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.d.ts +40 -0
  143. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js +36 -0
  144. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js.map +1 -0
  145. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.d.ts +2 -1
  146. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js +2 -1
  147. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js.map +1 -1
  148. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.d.ts +52 -0
  149. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js +50 -0
  150. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js.map +1 -0
  151. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.d.ts +7 -0
  152. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js +10 -0
  153. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js.map +1 -0
  154. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.d.ts +37 -0
  155. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js +36 -0
  156. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js.map +1 -0
  157. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.d.ts +8 -0
  158. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js +11 -0
  159. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js.map +1 -0
  160. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.d.ts +34 -0
  161. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js +32 -0
  162. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js.map +1 -0
  163. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.d.ts +7 -0
  164. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js +10 -0
  165. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js.map +1 -0
  166. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.d.ts +3 -1
  167. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js +3 -1
  168. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js.map +1 -1
  169. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.d.ts +3 -1
  170. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js +3 -1
  171. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js.map +1 -1
  172. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.d.ts +8 -0
  173. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js +10 -0
  174. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js.map +1 -1
  175. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.d.ts +4 -0
  176. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js +5 -0
  177. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js.map +1 -1
  178. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.d.ts +4 -0
  179. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js +5 -0
  180. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js.map +1 -1
  181. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.d.ts +4 -0
  182. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js +5 -0
  183. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js.map +1 -1
  184. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.d.ts +4 -0
  185. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js +5 -0
  186. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js.map +1 -1
  187. package/dist/packages/datadog-api-client-v1/models/WidgetDefinition.d.ts +3 -1
  188. package/dist/packages/datadog-api-client-v2/apis/AuditApi.js +58 -86
  189. package/dist/packages/datadog-api-client-v2/apis/AuditApi.js.map +1 -1
  190. package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js +144 -241
  191. package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js.map +1 -1
  192. package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js +167 -260
  193. package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js.map +1 -1
  194. package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js +119 -202
  195. package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js.map +1 -1
  196. package/dist/packages/datadog-api-client-v2/apis/EventsApi.js +57 -86
  197. package/dist/packages/datadog-api-client-v2/apis/EventsApi.js.map +1 -1
  198. package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js +151 -311
  199. package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js.map +1 -1
  200. package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js +151 -311
  201. package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js.map +1 -1
  202. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.d.ts +67 -0
  203. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js +365 -303
  204. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js.map +1 -1
  205. package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js +403 -650
  206. package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js.map +1 -1
  207. package/dist/packages/datadog-api-client-v2/apis/LogsApi.js +121 -222
  208. package/dist/packages/datadog-api-client-v2/apis/LogsApi.js.map +1 -1
  209. package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js +285 -469
  210. package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js.map +1 -1
  211. package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js +142 -221
  212. package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js.map +1 -1
  213. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.d.ts +41 -8
  214. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js +428 -560
  215. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js.map +1 -1
  216. package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js +146 -261
  217. package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js.map +1 -1
  218. package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js +27 -40
  219. package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js.map +1 -1
  220. package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js +29 -43
  221. package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js.map +1 -1
  222. package/dist/packages/datadog-api-client-v2/apis/RUMApi.js +222 -310
  223. package/dist/packages/datadog-api-client-v2/apis/RUMApi.js.map +1 -1
  224. package/dist/packages/datadog-api-client-v2/apis/RolesApi.js +380 -625
  225. package/dist/packages/datadog-api-client-v2/apis/RolesApi.js.map +1 -1
  226. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.d.ts +21 -0
  227. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js +522 -685
  228. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js.map +1 -1
  229. package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js +144 -231
  230. package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js.map +1 -1
  231. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.d.ts +43 -6
  232. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js +284 -265
  233. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js.map +1 -1
  234. package/dist/packages/datadog-api-client-v2/apis/UsersApi.js +289 -446
  235. package/dist/packages/datadog-api-client-v2/apis/UsersApi.js.map +1 -1
  236. package/dist/packages/datadog-api-client-v2/index.d.ts +35 -5
  237. package/dist/packages/datadog-api-client-v2/index.js +49 -15
  238. package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
  239. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.d.ts +8 -0
  240. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js +11 -0
  241. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js.map +1 -0
  242. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.d.ts +12 -0
  243. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js +3 -0
  244. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js.map +1 -0
  245. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.d.ts +43 -0
  246. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js +44 -0
  247. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js.map +1 -0
  248. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.d.ts +7 -0
  249. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js +10 -0
  250. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js.map +1 -0
  251. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.d.ts +34 -0
  252. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js +34 -0
  253. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js.map +1 -0
  254. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.d.ts +32 -0
  255. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js +39 -0
  256. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js.map +1 -0
  257. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.d.ts +7 -0
  258. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js +10 -0
  259. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js.map +1 -0
  260. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.d.ts +34 -0
  261. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js +34 -0
  262. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js.map +1 -0
  263. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.d.ts +7 -0
  264. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js +10 -0
  265. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js.map +1 -0
  266. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.d.ts +29 -0
  267. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js +28 -0
  268. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js.map +1 -0
  269. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.d.ts +7 -0
  270. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js +10 -0
  271. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js.map +1 -0
  272. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.d.ts +12 -0
  273. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js +3 -0
  274. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js.map +1 -0
  275. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.d.ts +38 -0
  276. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js +37 -0
  277. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js.map +1 -0
  278. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.d.ts +32 -0
  279. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js +29 -0
  280. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js.map +1 -0
  281. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.d.ts +35 -0
  282. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js +33 -0
  283. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js.map +1 -0
  284. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.d.ts +32 -0
  285. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js +39 -0
  286. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js.map +1 -0
  287. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.d.ts +34 -0
  288. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js +33 -0
  289. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js.map +1 -0
  290. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.d.ts +11 -0
  291. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js +3 -0
  292. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js.map +1 -0
  293. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.d.ts +2 -1
  294. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js +2 -1
  295. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js.map +1 -1
  296. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.d.ts +0 -4
  297. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js +0 -4
  298. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js.map +1 -1
  299. package/dist/packages/datadog-api-client-v2/models/IncidentResponseIncludedItem.d.ts +2 -1
  300. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.d.ts +5 -5
  301. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js +4 -4
  302. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js.map +1 -1
  303. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.d.ts +7 -0
  304. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js +10 -0
  305. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js.map +1 -0
  306. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.d.ts +38 -0
  307. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js +36 -0
  308. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js.map +1 -0
  309. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.d.ts +29 -0
  310. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js +28 -0
  311. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js.map +1 -0
  312. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.d.ts +33 -0
  313. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js +32 -0
  314. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js.map +1 -0
  315. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +73 -10
  316. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
  317. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.d.ts +29 -0
  318. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js +29 -0
  319. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js.map +1 -0
  320. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.d.ts +33 -0
  321. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js +34 -0
  322. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js.map +1 -0
  323. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.d.ts +4 -61
  324. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js +0 -67
  325. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js.map +1 -1
  326. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.d.ts +4 -46
  327. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js +0 -49
  328. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js.map +1 -1
  329. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.d.ts +2 -1
  330. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js +2 -1
  331. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js.map +1 -1
  332. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.d.ts +5 -90
  333. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js +0 -93
  334. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js.map +1 -1
  335. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.d.ts +69 -0
  336. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js +70 -0
  337. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js.map +1 -0
  338. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.d.ts +49 -0
  339. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js +50 -0
  340. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js.map +1 -0
  341. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.d.ts +97 -0
  342. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js +96 -0
  343. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js.map +1 -0
  344. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.d.ts +7 -0
  345. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js +10 -0
  346. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js.map +1 -0
  347. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.d.ts +69 -0
  348. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js +70 -0
  349. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js.map +1 -0
  350. package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.d.ts → SecurityMonitoringStandardRuleQuery.d.ts} +1 -1
  351. package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.js → SecurityMonitoringStandardRuleQuery.js} +9 -9
  352. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleQuery.js.map +1 -0
  353. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.d.ts +97 -0
  354. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js +96 -0
  355. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js.map +1 -0
  356. package/dist/version.d.ts +1 -1
  357. package/dist/version.js +1 -1
  358. package/package.json +1 -1
  359. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryCreate.js.map +0 -1
@@ -55,9 +55,9 @@ exports.MonitorsApi = exports.MonitorsApiResponseProcessor = exports.MonitorsApi
55
55
  var baseapi_1 = require("../../datadog-api-client-common/baseapi");
56
56
  var configuration_1 = require("../../datadog-api-client-common/configuration");
57
57
  var http_1 = require("../../datadog-api-client-common/http/http");
58
+ var logger_1 = require("../../../logger");
58
59
  var ObjectSerializer_1 = require("../models/ObjectSerializer");
59
60
  var exception_1 = require("../../datadog-api-client-common/exception");
60
- var util_1 = require("../../datadog-api-client-common/util");
61
61
  var MonitorsApiRequestFactory = /** @class */ (function (_super) {
62
62
  __extends(MonitorsApiRequestFactory, _super);
63
63
  function MonitorsApiRequestFactory() {
@@ -391,73 +391,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
391
391
  */
392
392
  MonitorsApiResponseProcessor.prototype.checkCanDeleteMonitor = function (response) {
393
393
  return __awaiter(this, void 0, void 0, function () {
394
- var contentType, body_1, _a, _b, _c, _d, body_2, _e, _f, _g, _h, body_3, _j, _k, _l, _m, body_4, _o, _p, _q, _r, body_5, _s, _t, _u, _v, body_6, _w, _x, _y, _z, body;
395
- return __generator(this, function (_0) {
396
- switch (_0.label) {
394
+ var contentType, body_1, _a, _b, _c, _d, bodyText, _e, _f, body_2, body_3, _g, _h, _j, _k, body;
395
+ return __generator(this, function (_l) {
396
+ switch (_l.label) {
397
397
  case 0:
398
398
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
399
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
399
+ if (!(response.httpStatusCode == 200 || response.httpStatusCode == 409)) return [3 /*break*/, 2];
400
400
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
401
401
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
402
402
  return [4 /*yield*/, response.body.text()];
403
403
  case 1:
404
- body_1 = _b.apply(_a, [_d.apply(_c, [_0.sent(), contentType]),
405
- "CheckCanDeleteMonitorResponse",
406
- ""]);
404
+ body_1 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
405
+ "CheckCanDeleteMonitorResponse"]);
407
406
  return [2 /*return*/, body_1];
408
407
  case 2:
409
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
410
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
411
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
408
+ if (!(response.httpStatusCode == 400 ||
409
+ response.httpStatusCode == 403 ||
410
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
411
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
412
412
  return [4 /*yield*/, response.body.text()];
413
413
  case 3:
414
- body_2 = _f.apply(_e, [_h.apply(_g, [_0.sent(), contentType]),
415
- "APIErrorResponse",
416
- ""]);
417
- throw new exception_1.ApiException(400, body_2);
414
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
415
+ try {
416
+ body_2 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
417
+ throw new exception_1.ApiException(response.httpStatusCode, body_2);
418
+ }
419
+ catch (error) {
420
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
421
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
422
+ }
423
+ _l.label = 4;
418
424
  case 4:
419
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
420
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
421
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
425
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
426
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
427
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
422
428
  return [4 /*yield*/, response.body.text()];
423
429
  case 5:
424
- body_3 = _k.apply(_j, [_m.apply(_l, [_0.sent(), contentType]),
425
- "APIErrorResponse",
426
- ""]);
427
- throw new exception_1.ApiException(403, body_3);
428
- case 6:
429
- if (!(0, util_1.isCodeInRange)("409", response.httpStatusCode)) return [3 /*break*/, 8];
430
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
431
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
432
- return [4 /*yield*/, response.body.text()];
433
- case 7:
434
- body_4 = _p.apply(_o, [_r.apply(_q, [_0.sent(), contentType]),
430
+ body_3 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
435
431
  "CheckCanDeleteMonitorResponse",
436
432
  ""]);
437
- throw new exception_1.ApiException(409, body_4);
438
- case 8:
439
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 10];
440
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
441
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
442
- return [4 /*yield*/, response.body.text()];
443
- case 9:
444
- body_5 = _t.apply(_s, [_v.apply(_u, [_0.sent(), contentType]),
445
- "APIErrorResponse",
446
- ""]);
447
- throw new exception_1.ApiException(429, body_5);
448
- case 10:
449
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 12];
450
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
451
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
452
- return [4 /*yield*/, response.body.text()];
453
- case 11:
454
- body_6 = _x.apply(_w, [_z.apply(_y, [_0.sent(), contentType]),
455
- "CheckCanDeleteMonitorResponse",
456
- ""]);
457
- return [2 /*return*/, body_6];
458
- case 12: return [4 /*yield*/, response.body.text()];
459
- case 13:
460
- body = (_0.sent()) || "";
433
+ return [2 /*return*/, body_3];
434
+ case 6: return [4 /*yield*/, response.body.text()];
435
+ case 7:
436
+ body = (_l.sent()) || "";
461
437
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
462
438
  }
463
439
  });
@@ -472,63 +448,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
472
448
  */
473
449
  MonitorsApiResponseProcessor.prototype.createMonitor = function (response) {
474
450
  return __awaiter(this, void 0, void 0, function () {
475
- var contentType, body_7, _a, _b, _c, _d, body_8, _e, _f, _g, _h, body_9, _j, _k, _l, _m, body_10, _o, _p, _q, _r, body_11, _s, _t, _u, _v, body;
476
- return __generator(this, function (_w) {
477
- switch (_w.label) {
451
+ var contentType, body_4, _a, _b, _c, _d, bodyText, _e, _f, body_5, body_6, _g, _h, _j, _k, body;
452
+ return __generator(this, function (_l) {
453
+ switch (_l.label) {
478
454
  case 0:
479
455
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
480
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
456
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
481
457
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
482
458
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
483
459
  return [4 /*yield*/, response.body.text()];
484
460
  case 1:
485
- body_7 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
486
- "Monitor",
487
- ""]);
488
- return [2 /*return*/, body_7];
461
+ body_4 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
462
+ "Monitor"]);
463
+ return [2 /*return*/, body_4];
489
464
  case 2:
490
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
491
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
492
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
465
+ if (!(response.httpStatusCode == 400 ||
466
+ response.httpStatusCode == 403 ||
467
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
468
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
493
469
  return [4 /*yield*/, response.body.text()];
494
470
  case 3:
495
- body_8 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
496
- "APIErrorResponse",
497
- ""]);
498
- throw new exception_1.ApiException(400, body_8);
471
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
472
+ try {
473
+ body_5 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
474
+ throw new exception_1.ApiException(response.httpStatusCode, body_5);
475
+ }
476
+ catch (error) {
477
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
478
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
479
+ }
480
+ _l.label = 4;
499
481
  case 4:
500
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
501
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
502
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
482
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
483
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
484
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
503
485
  return [4 /*yield*/, response.body.text()];
504
486
  case 5:
505
- body_9 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
506
- "APIErrorResponse",
507
- ""]);
508
- throw new exception_1.ApiException(403, body_9);
509
- case 6:
510
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
511
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
512
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
513
- return [4 /*yield*/, response.body.text()];
514
- case 7:
515
- body_10 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
516
- "APIErrorResponse",
517
- ""]);
518
- throw new exception_1.ApiException(429, body_10);
519
- case 8:
520
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
521
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
522
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
523
- return [4 /*yield*/, response.body.text()];
524
- case 9:
525
- body_11 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
487
+ body_6 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
526
488
  "Monitor",
527
489
  ""]);
528
- return [2 /*return*/, body_11];
529
- case 10: return [4 /*yield*/, response.body.text()];
530
- case 11:
531
- body = (_w.sent()) || "";
490
+ return [2 /*return*/, body_6];
491
+ case 6: return [4 /*yield*/, response.body.text()];
492
+ case 7:
493
+ body = (_l.sent()) || "";
532
494
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
533
495
  }
534
496
  });
@@ -543,83 +505,51 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
543
505
  */
544
506
  MonitorsApiResponseProcessor.prototype.deleteMonitor = function (response) {
545
507
  return __awaiter(this, void 0, void 0, function () {
546
- var contentType, body_12, _a, _b, _c, _d, body_13, _e, _f, _g, _h, body_14, _j, _k, _l, _m, body_15, _o, _p, _q, _r, body_16, _s, _t, _u, _v, body_17, _w, _x, _y, _z, body_18, _0, _1, _2, _3, body;
547
- return __generator(this, function (_4) {
548
- switch (_4.label) {
508
+ var contentType, body_7, _a, _b, _c, _d, bodyText, _e, _f, body_8, body_9, _g, _h, _j, _k, body;
509
+ return __generator(this, function (_l) {
510
+ switch (_l.label) {
549
511
  case 0:
550
512
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
551
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
513
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
552
514
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
553
515
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
554
516
  return [4 /*yield*/, response.body.text()];
555
517
  case 1:
556
- body_12 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
557
- "DeletedMonitor",
558
- ""]);
559
- return [2 /*return*/, body_12];
518
+ body_7 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
519
+ "DeletedMonitor"]);
520
+ return [2 /*return*/, body_7];
560
521
  case 2:
561
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
562
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
563
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
522
+ if (!(response.httpStatusCode == 400 ||
523
+ response.httpStatusCode == 401 ||
524
+ response.httpStatusCode == 403 ||
525
+ response.httpStatusCode == 404 ||
526
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
527
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
564
528
  return [4 /*yield*/, response.body.text()];
565
529
  case 3:
566
- body_13 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
567
- "APIErrorResponse",
568
- ""]);
569
- throw new exception_1.ApiException(400, body_13);
530
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
531
+ try {
532
+ body_8 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
533
+ throw new exception_1.ApiException(response.httpStatusCode, body_8);
534
+ }
535
+ catch (error) {
536
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
537
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
538
+ }
539
+ _l.label = 4;
570
540
  case 4:
571
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
572
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
573
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
541
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
542
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
543
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
574
544
  return [4 /*yield*/, response.body.text()];
575
545
  case 5:
576
- body_14 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
577
- "APIErrorResponse",
578
- ""]);
579
- throw new exception_1.ApiException(401, body_14);
580
- case 6:
581
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
582
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
583
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
584
- return [4 /*yield*/, response.body.text()];
585
- case 7:
586
- body_15 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
587
- "APIErrorResponse",
588
- ""]);
589
- throw new exception_1.ApiException(403, body_15);
590
- case 8:
591
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
592
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
593
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
594
- return [4 /*yield*/, response.body.text()];
595
- case 9:
596
- body_16 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
597
- "APIErrorResponse",
598
- ""]);
599
- throw new exception_1.ApiException(404, body_16);
600
- case 10:
601
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
602
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
603
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
604
- return [4 /*yield*/, response.body.text()];
605
- case 11:
606
- body_17 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
607
- "APIErrorResponse",
608
- ""]);
609
- throw new exception_1.ApiException(429, body_17);
610
- case 12:
611
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
612
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
613
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
614
- return [4 /*yield*/, response.body.text()];
615
- case 13:
616
- body_18 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
546
+ body_9 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
617
547
  "DeletedMonitor",
618
548
  ""]);
619
- return [2 /*return*/, body_18];
620
- case 14: return [4 /*yield*/, response.body.text()];
621
- case 15:
622
- body = (_4.sent()) || "";
549
+ return [2 /*return*/, body_9];
550
+ case 6: return [4 /*yield*/, response.body.text()];
551
+ case 7:
552
+ body = (_l.sent()) || "";
623
553
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
624
554
  }
625
555
  });
@@ -634,73 +564,50 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
634
564
  */
635
565
  MonitorsApiResponseProcessor.prototype.getMonitor = function (response) {
636
566
  return __awaiter(this, void 0, void 0, function () {
637
- var contentType, body_19, _a, _b, _c, _d, body_20, _e, _f, _g, _h, body_21, _j, _k, _l, _m, body_22, _o, _p, _q, _r, body_23, _s, _t, _u, _v, body_24, _w, _x, _y, _z, body;
638
- return __generator(this, function (_0) {
639
- switch (_0.label) {
567
+ var contentType, body_10, _a, _b, _c, _d, bodyText, _e, _f, body_11, body_12, _g, _h, _j, _k, body;
568
+ return __generator(this, function (_l) {
569
+ switch (_l.label) {
640
570
  case 0:
641
571
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
642
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
572
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
643
573
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
644
574
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
645
575
  return [4 /*yield*/, response.body.text()];
646
576
  case 1:
647
- body_19 = _b.apply(_a, [_d.apply(_c, [_0.sent(), contentType]),
648
- "Monitor",
649
- ""]);
650
- return [2 /*return*/, body_19];
577
+ body_10 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
578
+ "Monitor"]);
579
+ return [2 /*return*/, body_10];
651
580
  case 2:
652
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
653
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
654
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
581
+ if (!(response.httpStatusCode == 400 ||
582
+ response.httpStatusCode == 403 ||
583
+ response.httpStatusCode == 404 ||
584
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
585
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
655
586
  return [4 /*yield*/, response.body.text()];
656
587
  case 3:
657
- body_20 = _f.apply(_e, [_h.apply(_g, [_0.sent(), contentType]),
658
- "APIErrorResponse",
659
- ""]);
660
- throw new exception_1.ApiException(400, body_20);
588
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
589
+ try {
590
+ body_11 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
591
+ throw new exception_1.ApiException(response.httpStatusCode, body_11);
592
+ }
593
+ catch (error) {
594
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
595
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
596
+ }
597
+ _l.label = 4;
661
598
  case 4:
662
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
663
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
664
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
599
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
600
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
601
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
665
602
  return [4 /*yield*/, response.body.text()];
666
603
  case 5:
667
- body_21 = _k.apply(_j, [_m.apply(_l, [_0.sent(), contentType]),
668
- "APIErrorResponse",
669
- ""]);
670
- throw new exception_1.ApiException(403, body_21);
671
- case 6:
672
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 8];
673
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
674
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
675
- return [4 /*yield*/, response.body.text()];
676
- case 7:
677
- body_22 = _p.apply(_o, [_r.apply(_q, [_0.sent(), contentType]),
678
- "APIErrorResponse",
679
- ""]);
680
- throw new exception_1.ApiException(404, body_22);
681
- case 8:
682
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 10];
683
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
684
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
685
- return [4 /*yield*/, response.body.text()];
686
- case 9:
687
- body_23 = _t.apply(_s, [_v.apply(_u, [_0.sent(), contentType]),
688
- "APIErrorResponse",
689
- ""]);
690
- throw new exception_1.ApiException(429, body_23);
691
- case 10:
692
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 12];
693
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
694
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
695
- return [4 /*yield*/, response.body.text()];
696
- case 11:
697
- body_24 = _x.apply(_w, [_z.apply(_y, [_0.sent(), contentType]),
604
+ body_12 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
698
605
  "Monitor",
699
606
  ""]);
700
- return [2 /*return*/, body_24];
701
- case 12: return [4 /*yield*/, response.body.text()];
702
- case 13:
703
- body = (_0.sent()) || "";
607
+ return [2 /*return*/, body_12];
608
+ case 6: return [4 /*yield*/, response.body.text()];
609
+ case 7:
610
+ body = (_l.sent()) || "";
704
611
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
705
612
  }
706
613
  });
@@ -715,63 +622,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
715
622
  */
716
623
  MonitorsApiResponseProcessor.prototype.listMonitors = function (response) {
717
624
  return __awaiter(this, void 0, void 0, function () {
718
- var contentType, body_25, _a, _b, _c, _d, body_26, _e, _f, _g, _h, body_27, _j, _k, _l, _m, body_28, _o, _p, _q, _r, body_29, _s, _t, _u, _v, body;
719
- return __generator(this, function (_w) {
720
- switch (_w.label) {
625
+ var contentType, body_13, _a, _b, _c, _d, bodyText, _e, _f, body_14, body_15, _g, _h, _j, _k, body;
626
+ return __generator(this, function (_l) {
627
+ switch (_l.label) {
721
628
  case 0:
722
629
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
723
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
630
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
724
631
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
725
632
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
726
633
  return [4 /*yield*/, response.body.text()];
727
634
  case 1:
728
- body_25 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
729
- "Array<Monitor>",
730
- ""]);
731
- return [2 /*return*/, body_25];
635
+ body_13 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
636
+ "Array<Monitor>"]);
637
+ return [2 /*return*/, body_13];
732
638
  case 2:
733
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
734
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
735
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
639
+ if (!(response.httpStatusCode == 400 ||
640
+ response.httpStatusCode == 403 ||
641
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
642
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
736
643
  return [4 /*yield*/, response.body.text()];
737
644
  case 3:
738
- body_26 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
739
- "APIErrorResponse",
740
- ""]);
741
- throw new exception_1.ApiException(400, body_26);
645
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
646
+ try {
647
+ body_14 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
648
+ throw new exception_1.ApiException(response.httpStatusCode, body_14);
649
+ }
650
+ catch (error) {
651
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
652
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
653
+ }
654
+ _l.label = 4;
742
655
  case 4:
743
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
744
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
745
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
656
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
657
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
658
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
746
659
  return [4 /*yield*/, response.body.text()];
747
660
  case 5:
748
- body_27 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
749
- "APIErrorResponse",
750
- ""]);
751
- throw new exception_1.ApiException(403, body_27);
752
- case 6:
753
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
754
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
755
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
756
- return [4 /*yield*/, response.body.text()];
757
- case 7:
758
- body_28 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
759
- "APIErrorResponse",
760
- ""]);
761
- throw new exception_1.ApiException(429, body_28);
762
- case 8:
763
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
764
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
765
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
766
- return [4 /*yield*/, response.body.text()];
767
- case 9:
768
- body_29 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
661
+ body_15 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
769
662
  "Array<Monitor>",
770
663
  ""]);
771
- return [2 /*return*/, body_29];
772
- case 10: return [4 /*yield*/, response.body.text()];
773
- case 11:
774
- body = (_w.sent()) || "";
664
+ return [2 /*return*/, body_15];
665
+ case 6: return [4 /*yield*/, response.body.text()];
666
+ case 7:
667
+ body = (_l.sent()) || "";
775
668
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
776
669
  }
777
670
  });
@@ -786,63 +679,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
786
679
  */
787
680
  MonitorsApiResponseProcessor.prototype.searchMonitorGroups = function (response) {
788
681
  return __awaiter(this, void 0, void 0, function () {
789
- var contentType, body_30, _a, _b, _c, _d, body_31, _e, _f, _g, _h, body_32, _j, _k, _l, _m, body_33, _o, _p, _q, _r, body_34, _s, _t, _u, _v, body;
790
- return __generator(this, function (_w) {
791
- switch (_w.label) {
682
+ var contentType, body_16, _a, _b, _c, _d, bodyText, _e, _f, body_17, body_18, _g, _h, _j, _k, body;
683
+ return __generator(this, function (_l) {
684
+ switch (_l.label) {
792
685
  case 0:
793
686
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
794
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
687
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
795
688
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
796
689
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
797
690
  return [4 /*yield*/, response.body.text()];
798
691
  case 1:
799
- body_30 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
800
- "MonitorGroupSearchResponse",
801
- ""]);
802
- return [2 /*return*/, body_30];
692
+ body_16 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
693
+ "MonitorGroupSearchResponse"]);
694
+ return [2 /*return*/, body_16];
803
695
  case 2:
804
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
805
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
806
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
696
+ if (!(response.httpStatusCode == 400 ||
697
+ response.httpStatusCode == 403 ||
698
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
699
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
807
700
  return [4 /*yield*/, response.body.text()];
808
701
  case 3:
809
- body_31 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
810
- "APIErrorResponse",
811
- ""]);
812
- throw new exception_1.ApiException(400, body_31);
702
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
703
+ try {
704
+ body_17 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
705
+ throw new exception_1.ApiException(response.httpStatusCode, body_17);
706
+ }
707
+ catch (error) {
708
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
709
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
710
+ }
711
+ _l.label = 4;
813
712
  case 4:
814
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
815
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
816
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
713
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
714
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
715
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
817
716
  return [4 /*yield*/, response.body.text()];
818
717
  case 5:
819
- body_32 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
820
- "APIErrorResponse",
821
- ""]);
822
- throw new exception_1.ApiException(403, body_32);
823
- case 6:
824
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
825
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
826
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
827
- return [4 /*yield*/, response.body.text()];
828
- case 7:
829
- body_33 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
830
- "APIErrorResponse",
831
- ""]);
832
- throw new exception_1.ApiException(429, body_33);
833
- case 8:
834
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
835
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
836
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
837
- return [4 /*yield*/, response.body.text()];
838
- case 9:
839
- body_34 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
718
+ body_18 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
840
719
  "MonitorGroupSearchResponse",
841
720
  ""]);
842
- return [2 /*return*/, body_34];
843
- case 10: return [4 /*yield*/, response.body.text()];
844
- case 11:
845
- body = (_w.sent()) || "";
721
+ return [2 /*return*/, body_18];
722
+ case 6: return [4 /*yield*/, response.body.text()];
723
+ case 7:
724
+ body = (_l.sent()) || "";
846
725
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
847
726
  }
848
727
  });
@@ -857,63 +736,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
857
736
  */
858
737
  MonitorsApiResponseProcessor.prototype.searchMonitors = function (response) {
859
738
  return __awaiter(this, void 0, void 0, function () {
860
- var contentType, body_35, _a, _b, _c, _d, body_36, _e, _f, _g, _h, body_37, _j, _k, _l, _m, body_38, _o, _p, _q, _r, body_39, _s, _t, _u, _v, body;
861
- return __generator(this, function (_w) {
862
- switch (_w.label) {
739
+ var contentType, body_19, _a, _b, _c, _d, bodyText, _e, _f, body_20, body_21, _g, _h, _j, _k, body;
740
+ return __generator(this, function (_l) {
741
+ switch (_l.label) {
863
742
  case 0:
864
743
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
865
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
744
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
866
745
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
867
746
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
868
747
  return [4 /*yield*/, response.body.text()];
869
748
  case 1:
870
- body_35 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
871
- "MonitorSearchResponse",
872
- ""]);
873
- return [2 /*return*/, body_35];
749
+ body_19 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
750
+ "MonitorSearchResponse"]);
751
+ return [2 /*return*/, body_19];
874
752
  case 2:
875
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
876
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
877
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
753
+ if (!(response.httpStatusCode == 400 ||
754
+ response.httpStatusCode == 403 ||
755
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
756
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
878
757
  return [4 /*yield*/, response.body.text()];
879
758
  case 3:
880
- body_36 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
881
- "APIErrorResponse",
882
- ""]);
883
- throw new exception_1.ApiException(400, body_36);
759
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
760
+ try {
761
+ body_20 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
762
+ throw new exception_1.ApiException(response.httpStatusCode, body_20);
763
+ }
764
+ catch (error) {
765
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
766
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
767
+ }
768
+ _l.label = 4;
884
769
  case 4:
885
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
886
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
887
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
770
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
771
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
772
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
888
773
  return [4 /*yield*/, response.body.text()];
889
774
  case 5:
890
- body_37 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
891
- "APIErrorResponse",
892
- ""]);
893
- throw new exception_1.ApiException(403, body_37);
894
- case 6:
895
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
896
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
897
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
898
- return [4 /*yield*/, response.body.text()];
899
- case 7:
900
- body_38 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
901
- "APIErrorResponse",
902
- ""]);
903
- throw new exception_1.ApiException(429, body_38);
904
- case 8:
905
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
906
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
907
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
908
- return [4 /*yield*/, response.body.text()];
909
- case 9:
910
- body_39 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
775
+ body_21 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
911
776
  "MonitorSearchResponse",
912
777
  ""]);
913
- return [2 /*return*/, body_39];
914
- case 10: return [4 /*yield*/, response.body.text()];
915
- case 11:
916
- body = (_w.sent()) || "";
778
+ return [2 /*return*/, body_21];
779
+ case 6: return [4 /*yield*/, response.body.text()];
780
+ case 7:
781
+ body = (_l.sent()) || "";
917
782
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
918
783
  }
919
784
  });
@@ -928,83 +793,51 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
928
793
  */
929
794
  MonitorsApiResponseProcessor.prototype.updateMonitor = function (response) {
930
795
  return __awaiter(this, void 0, void 0, function () {
931
- var contentType, body_40, _a, _b, _c, _d, body_41, _e, _f, _g, _h, body_42, _j, _k, _l, _m, body_43, _o, _p, _q, _r, body_44, _s, _t, _u, _v, body_45, _w, _x, _y, _z, body_46, _0, _1, _2, _3, body;
932
- return __generator(this, function (_4) {
933
- switch (_4.label) {
796
+ var contentType, body_22, _a, _b, _c, _d, bodyText, _e, _f, body_23, body_24, _g, _h, _j, _k, body;
797
+ return __generator(this, function (_l) {
798
+ switch (_l.label) {
934
799
  case 0:
935
800
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
936
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
801
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
937
802
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
938
803
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
939
804
  return [4 /*yield*/, response.body.text()];
940
805
  case 1:
941
- body_40 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
942
- "Monitor",
943
- ""]);
944
- return [2 /*return*/, body_40];
806
+ body_22 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
807
+ "Monitor"]);
808
+ return [2 /*return*/, body_22];
945
809
  case 2:
946
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
947
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
948
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
810
+ if (!(response.httpStatusCode == 400 ||
811
+ response.httpStatusCode == 401 ||
812
+ response.httpStatusCode == 403 ||
813
+ response.httpStatusCode == 404 ||
814
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
815
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
949
816
  return [4 /*yield*/, response.body.text()];
950
817
  case 3:
951
- body_41 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
952
- "APIErrorResponse",
953
- ""]);
954
- throw new exception_1.ApiException(400, body_41);
818
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
819
+ try {
820
+ body_23 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
821
+ throw new exception_1.ApiException(response.httpStatusCode, body_23);
822
+ }
823
+ catch (error) {
824
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
825
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
826
+ }
827
+ _l.label = 4;
955
828
  case 4:
956
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
957
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
958
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
829
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
830
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
831
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
959
832
  return [4 /*yield*/, response.body.text()];
960
833
  case 5:
961
- body_42 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
962
- "APIErrorResponse",
963
- ""]);
964
- throw new exception_1.ApiException(401, body_42);
965
- case 6:
966
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
967
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
968
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
969
- return [4 /*yield*/, response.body.text()];
970
- case 7:
971
- body_43 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
972
- "APIErrorResponse",
973
- ""]);
974
- throw new exception_1.ApiException(403, body_43);
975
- case 8:
976
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
977
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
978
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
979
- return [4 /*yield*/, response.body.text()];
980
- case 9:
981
- body_44 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
982
- "APIErrorResponse",
983
- ""]);
984
- throw new exception_1.ApiException(404, body_44);
985
- case 10:
986
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
987
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
988
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
989
- return [4 /*yield*/, response.body.text()];
990
- case 11:
991
- body_45 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
992
- "APIErrorResponse",
993
- ""]);
994
- throw new exception_1.ApiException(429, body_45);
995
- case 12:
996
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
997
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
998
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
999
- return [4 /*yield*/, response.body.text()];
1000
- case 13:
1001
- body_46 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
834
+ body_24 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
1002
835
  "Monitor",
1003
836
  ""]);
1004
- return [2 /*return*/, body_46];
1005
- case 14: return [4 /*yield*/, response.body.text()];
1006
- case 15:
1007
- body = (_4.sent()) || "";
837
+ return [2 /*return*/, body_24];
838
+ case 6: return [4 /*yield*/, response.body.text()];
839
+ case 7:
840
+ body = (_l.sent()) || "";
1008
841
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1009
842
  }
1010
843
  });
@@ -1019,63 +852,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
1019
852
  */
1020
853
  MonitorsApiResponseProcessor.prototype.validateExistingMonitor = function (response) {
1021
854
  return __awaiter(this, void 0, void 0, function () {
1022
- var contentType, body_47, _a, _b, _c, _d, body_48, _e, _f, _g, _h, body_49, _j, _k, _l, _m, body_50, _o, _p, _q, _r, body_51, _s, _t, _u, _v, body;
1023
- return __generator(this, function (_w) {
1024
- switch (_w.label) {
855
+ var contentType, body_25, _a, _b, _c, _d, bodyText, _e, _f, body_26, body_27, _g, _h, _j, _k, body;
856
+ return __generator(this, function (_l) {
857
+ switch (_l.label) {
1025
858
  case 0:
1026
859
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1027
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
860
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
1028
861
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1029
862
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1030
863
  return [4 /*yield*/, response.body.text()];
1031
864
  case 1:
1032
- body_47 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
1033
- "any",
1034
- ""]);
1035
- return [2 /*return*/, body_47];
865
+ body_25 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
866
+ "any"]);
867
+ return [2 /*return*/, body_25];
1036
868
  case 2:
1037
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
1038
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1039
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
869
+ if (!(response.httpStatusCode == 400 ||
870
+ response.httpStatusCode == 403 ||
871
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
872
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
1040
873
  return [4 /*yield*/, response.body.text()];
1041
874
  case 3:
1042
- body_48 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
1043
- "APIErrorResponse",
1044
- ""]);
1045
- throw new exception_1.ApiException(400, body_48);
875
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
876
+ try {
877
+ body_26 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
878
+ throw new exception_1.ApiException(response.httpStatusCode, body_26);
879
+ }
880
+ catch (error) {
881
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
882
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
883
+ }
884
+ _l.label = 4;
1046
885
  case 4:
1047
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
1048
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1049
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
886
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
887
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
888
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
1050
889
  return [4 /*yield*/, response.body.text()];
1051
890
  case 5:
1052
- body_49 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
1053
- "APIErrorResponse",
1054
- ""]);
1055
- throw new exception_1.ApiException(403, body_49);
1056
- case 6:
1057
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
1058
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1059
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1060
- return [4 /*yield*/, response.body.text()];
1061
- case 7:
1062
- body_50 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
1063
- "APIErrorResponse",
1064
- ""]);
1065
- throw new exception_1.ApiException(429, body_50);
1066
- case 8:
1067
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
1068
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1069
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1070
- return [4 /*yield*/, response.body.text()];
1071
- case 9:
1072
- body_51 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
891
+ body_27 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
1073
892
  "any",
1074
893
  ""]);
1075
- return [2 /*return*/, body_51];
1076
- case 10: return [4 /*yield*/, response.body.text()];
1077
- case 11:
1078
- body = (_w.sent()) || "";
894
+ return [2 /*return*/, body_27];
895
+ case 6: return [4 /*yield*/, response.body.text()];
896
+ case 7:
897
+ body = (_l.sent()) || "";
1079
898
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1080
899
  }
1081
900
  });
@@ -1090,63 +909,49 @@ var MonitorsApiResponseProcessor = /** @class */ (function () {
1090
909
  */
1091
910
  MonitorsApiResponseProcessor.prototype.validateMonitor = function (response) {
1092
911
  return __awaiter(this, void 0, void 0, function () {
1093
- var contentType, body_52, _a, _b, _c, _d, body_53, _e, _f, _g, _h, body_54, _j, _k, _l, _m, body_55, _o, _p, _q, _r, body_56, _s, _t, _u, _v, body;
1094
- return __generator(this, function (_w) {
1095
- switch (_w.label) {
912
+ var contentType, body_28, _a, _b, _c, _d, bodyText, _e, _f, body_29, body_30, _g, _h, _j, _k, body;
913
+ return __generator(this, function (_l) {
914
+ switch (_l.label) {
1096
915
  case 0:
1097
916
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1098
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
917
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
1099
918
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
1100
919
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
1101
920
  return [4 /*yield*/, response.body.text()];
1102
921
  case 1:
1103
- body_52 = _b.apply(_a, [_d.apply(_c, [_w.sent(), contentType]),
1104
- "any",
1105
- ""]);
1106
- return [2 /*return*/, body_52];
922
+ body_28 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
923
+ "any"]);
924
+ return [2 /*return*/, body_28];
1107
925
  case 2:
1108
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
1109
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
1110
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
926
+ if (!(response.httpStatusCode == 400 ||
927
+ response.httpStatusCode == 403 ||
928
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
929
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
1111
930
  return [4 /*yield*/, response.body.text()];
1112
931
  case 3:
1113
- body_53 = _f.apply(_e, [_h.apply(_g, [_w.sent(), contentType]),
1114
- "APIErrorResponse",
1115
- ""]);
1116
- throw new exception_1.ApiException(400, body_53);
932
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
933
+ try {
934
+ body_29 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
935
+ throw new exception_1.ApiException(response.httpStatusCode, body_29);
936
+ }
937
+ catch (error) {
938
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
939
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
940
+ }
941
+ _l.label = 4;
1117
942
  case 4:
1118
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
1119
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
1120
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
943
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
944
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
945
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
1121
946
  return [4 /*yield*/, response.body.text()];
1122
947
  case 5:
1123
- body_54 = _k.apply(_j, [_m.apply(_l, [_w.sent(), contentType]),
1124
- "APIErrorResponse",
1125
- ""]);
1126
- throw new exception_1.ApiException(403, body_54);
1127
- case 6:
1128
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
1129
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
1130
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
1131
- return [4 /*yield*/, response.body.text()];
1132
- case 7:
1133
- body_55 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
1134
- "APIErrorResponse",
1135
- ""]);
1136
- throw new exception_1.ApiException(429, body_55);
1137
- case 8:
1138
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
1139
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
1140
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
1141
- return [4 /*yield*/, response.body.text()];
1142
- case 9:
1143
- body_56 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
948
+ body_30 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
1144
949
  "any",
1145
950
  ""]);
1146
- return [2 /*return*/, body_56];
1147
- case 10: return [4 /*yield*/, response.body.text()];
1148
- case 11:
1149
- body = (_w.sent()) || "";
951
+ return [2 /*return*/, body_30];
952
+ case 6: return [4 /*yield*/, response.body.text()];
953
+ case 7:
954
+ body = (_l.sent()) || "";
1150
955
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1151
956
  }
1152
957
  });