@datadog/datadog-api-client 1.3.0 → 1.5.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 (539) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +72 -2
  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/exception.js +3 -0
  6. package/dist/packages/datadog-api-client-common/exception.js.map +1 -1
  7. package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js +3 -5
  8. package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js.map +1 -1
  9. package/dist/packages/datadog-api-client-common/servers.js.map +1 -1
  10. package/dist/packages/datadog-api-client-common/util.d.ts +0 -9
  11. package/dist/packages/datadog-api-client-common/util.js +1 -32
  12. package/dist/packages/datadog-api-client-common/util.js.map +1 -1
  13. package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js +253 -407
  14. package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js.map +1 -1
  15. package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js +194 -291
  16. package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js.map +1 -1
  17. package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js +26 -33
  18. package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js.map +1 -1
  19. package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js +140 -215
  20. package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js.map +1 -1
  21. package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js +139 -215
  22. package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js.map +1 -1
  23. package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js +191 -313
  24. package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js.map +1 -1
  25. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js +194 -308
  26. package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js.map +1 -1
  27. package/dist/packages/datadog-api-client-v1/apis/EventsApi.js +82 -119
  28. package/dist/packages/datadog-api-client-v1/apis/EventsApi.js.map +1 -1
  29. package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js +112 -172
  30. package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js.map +1 -1
  31. package/dist/packages/datadog-api-client-v1/apis/HostsApi.js +112 -172
  32. package/dist/packages/datadog-api-client-v1/apis/HostsApi.js.map +1 -1
  33. package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js +22 -19
  34. package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js.map +1 -1
  35. package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js +281 -460
  36. package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js.map +1 -1
  37. package/dist/packages/datadog-api-client-v1/apis/LogsApi.js +71 -67
  38. package/dist/packages/datadog-api-client-v1/apis/LogsApi.js.map +1 -1
  39. package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js +200 -226
  40. package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js.map +1 -1
  41. package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js +234 -272
  42. package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js.map +1 -1
  43. package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js +201 -351
  44. package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js.map +1 -1
  45. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js +285 -490
  46. package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js.map +1 -1
  47. package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js +141 -251
  48. package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js.map +1 -1
  49. package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js +167 -258
  50. package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js.map +1 -1
  51. package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js +107 -174
  52. package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js.map +1 -1
  53. package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js +87 -159
  54. package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js.map +1 -1
  55. package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js +30 -63
  56. package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js.map +1 -1
  57. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js +137 -221
  58. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js.map +1 -1
  59. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.d.ts +8 -1
  60. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js +288 -492
  61. package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js.map +1 -1
  62. package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js +142 -261
  63. package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js.map +1 -1
  64. package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js +28 -43
  65. package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js.map +1 -1
  66. package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js +738 -1130
  67. package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js.map +1 -1
  68. package/dist/packages/datadog-api-client-v1/apis/TagsApi.js +137 -211
  69. package/dist/packages/datadog-api-client-v1/apis/TagsApi.js.map +1 -1
  70. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.d.ts +1 -1
  71. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js +1056 -1595
  72. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js.map +1 -1
  73. package/dist/packages/datadog-api-client-v1/apis/UsersApi.js +141 -235
  74. package/dist/packages/datadog-api-client-v1/apis/UsersApi.js.map +1 -1
  75. package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js +222 -376
  76. package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js.map +1 -1
  77. package/dist/packages/datadog-api-client-v1/index.d.ts +20 -0
  78. package/dist/packages/datadog-api-client-v1/index.js +35 -7
  79. package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
  80. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.d.ts +5 -1
  81. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js +4 -0
  82. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js.map +1 -1
  83. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.d.ts +5 -1
  84. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js +4 -0
  85. package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js.map +1 -1
  86. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.d.ts +4 -0
  87. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js +4 -0
  88. package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js.map +1 -1
  89. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.d.ts +2 -1
  90. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js +2 -1
  91. package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js.map +1 -1
  92. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.d.ts +4 -0
  93. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js +4 -0
  94. package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js.map +1 -1
  95. package/dist/packages/datadog-api-client-v1/models/MonitorOptions.d.ts +9 -0
  96. package/dist/packages/datadog-api-client-v1/models/MonitorOptions.js +4 -0
  97. package/dist/packages/datadog-api-client-v1/models/MonitorOptions.js.map +1 -1
  98. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.d.ts +3 -1
  99. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js +4 -2
  100. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js.map +1 -1
  101. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.d.ts +8 -0
  102. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js +10 -0
  103. package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js.map +1 -1
  104. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +44 -0
  105. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
  106. package/dist/packages/datadog-api-client-v1/models/SLOCreator.d.ts +36 -0
  107. package/dist/packages/datadog-api-client-v1/models/SLOCreator.js +42 -0
  108. package/dist/packages/datadog-api-client-v1/models/SLOCreator.js.map +1 -0
  109. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.d.ts +47 -0
  110. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js +46 -0
  111. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js.map +1 -0
  112. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.d.ts +7 -0
  113. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js +10 -0
  114. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js.map +1 -0
  115. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.d.ts +32 -0
  116. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js +39 -0
  117. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js.map +1 -0
  118. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.d.ts +34 -0
  119. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js +34 -0
  120. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js.map +1 -0
  121. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.d.ts +7 -0
  122. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js +10 -0
  123. package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js.map +1 -0
  124. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.d.ts +55 -0
  125. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js +56 -0
  126. package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js.map +1 -0
  127. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.d.ts +32 -0
  128. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js +38 -0
  129. package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js.map +1 -0
  130. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.d.ts +39 -0
  131. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js +43 -0
  132. package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js.map +1 -0
  133. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.d.ts +2 -2
  134. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js +3 -3
  135. package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js.map +1 -1
  136. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.d.ts +54 -0
  137. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js +48 -0
  138. package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js.map +1 -0
  139. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.d.ts +9 -0
  140. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js +12 -0
  141. package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js.map +1 -0
  142. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.d.ts +29 -0
  143. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js +28 -0
  144. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js.map +1 -0
  145. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.d.ts +103 -0
  146. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js +88 -0
  147. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js.map +1 -0
  148. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.d.ts +40 -0
  149. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js +36 -0
  150. package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js.map +1 -0
  151. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.d.ts +2 -1
  152. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js +2 -1
  153. package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js.map +1 -1
  154. package/dist/packages/datadog-api-client-v1/models/SyntheticsBrowserTest.d.ts +1 -1
  155. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.d.ts +52 -0
  156. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js +50 -0
  157. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js.map +1 -0
  158. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.d.ts +7 -0
  159. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js +10 -0
  160. package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js.map +1 -0
  161. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.d.ts +37 -0
  162. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js +36 -0
  163. package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js.map +1 -0
  164. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.d.ts +8 -0
  165. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js +11 -0
  166. package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js.map +1 -0
  167. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.d.ts +34 -0
  168. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js +32 -0
  169. package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js.map +1 -0
  170. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.d.ts +7 -0
  171. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js +10 -0
  172. package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js.map +1 -0
  173. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.d.ts +3 -1
  174. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js +3 -1
  175. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js.map +1 -1
  176. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.d.ts +3 -1
  177. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js +3 -1
  178. package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js.map +1 -1
  179. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.d.ts +8 -0
  180. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js +10 -0
  181. package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js.map +1 -1
  182. package/dist/packages/datadog-api-client-v1/models/UsageCIVisibilityHour.js +4 -0
  183. package/dist/packages/datadog-api-client-v1/models/UsageCIVisibilityHour.js.map +1 -1
  184. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.d.ts +4 -0
  185. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js +5 -0
  186. package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js.map +1 -1
  187. package/dist/packages/datadog-api-client-v1/models/UsageOnlineArchiveHour.js +1 -0
  188. package/dist/packages/datadog-api-client-v1/models/UsageOnlineArchiveHour.js.map +1 -1
  189. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.d.ts +4 -0
  190. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js +5 -0
  191. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js.map +1 -1
  192. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.d.ts +4 -0
  193. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js +5 -0
  194. package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js.map +1 -1
  195. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.d.ts +4 -0
  196. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js +5 -0
  197. package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js.map +1 -1
  198. package/dist/packages/datadog-api-client-v1/models/WidgetDefinition.d.ts +3 -1
  199. package/dist/packages/datadog-api-client-v2/apis/AuditApi.js +56 -86
  200. package/dist/packages/datadog-api-client-v2/apis/AuditApi.js.map +1 -1
  201. package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js +139 -241
  202. package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js.map +1 -1
  203. package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js +161 -260
  204. package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js.map +1 -1
  205. package/dist/packages/datadog-api-client-v2/apis/ConfluentCloudApi.d.ts +253 -0
  206. package/dist/packages/datadog-api-client-v2/apis/ConfluentCloudApi.js +1064 -0
  207. package/dist/packages/datadog-api-client-v2/apis/ConfluentCloudApi.js.map +1 -0
  208. package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js +115 -202
  209. package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js.map +1 -1
  210. package/dist/packages/datadog-api-client-v2/apis/EventsApi.js +55 -86
  211. package/dist/packages/datadog-api-client-v2/apis/EventsApi.js.map +1 -1
  212. package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js +146 -311
  213. package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js.map +1 -1
  214. package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js +146 -311
  215. package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js.map +1 -1
  216. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.d.ts +67 -0
  217. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js +358 -303
  218. package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js.map +1 -1
  219. package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js +389 -650
  220. package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js.map +1 -1
  221. package/dist/packages/datadog-api-client-v2/apis/LogsApi.js +117 -222
  222. package/dist/packages/datadog-api-client-v2/apis/LogsApi.js.map +1 -1
  223. package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js +275 -469
  224. package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js.map +1 -1
  225. package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js +137 -221
  226. package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js.map +1 -1
  227. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.d.ts +41 -8
  228. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js +419 -563
  229. package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js.map +1 -1
  230. package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js +141 -261
  231. package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js.map +1 -1
  232. package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js +26 -40
  233. package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js.map +1 -1
  234. package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js +28 -43
  235. package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js.map +1 -1
  236. package/dist/packages/datadog-api-client-v2/apis/RUMApi.js +214 -310
  237. package/dist/packages/datadog-api-client-v2/apis/RUMApi.js.map +1 -1
  238. package/dist/packages/datadog-api-client-v2/apis/RolesApi.js +367 -625
  239. package/dist/packages/datadog-api-client-v2/apis/RolesApi.js.map +1 -1
  240. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.d.ts +21 -0
  241. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js +506 -685
  242. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js.map +1 -1
  243. package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js +139 -231
  244. package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js.map +1 -1
  245. package/dist/packages/datadog-api-client-v2/apis/ServiceDefinitionApi.d.ts +94 -0
  246. package/dist/packages/datadog-api-client-v2/apis/ServiceDefinitionApi.js +456 -0
  247. package/dist/packages/datadog-api-client-v2/apis/ServiceDefinitionApi.js.map +1 -0
  248. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.d.ts +43 -6
  249. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js +277 -265
  250. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js.map +1 -1
  251. package/dist/packages/datadog-api-client-v2/apis/UsersApi.js +279 -446
  252. package/dist/packages/datadog-api-client-v2/apis/UsersApi.js.map +1 -1
  253. package/dist/packages/datadog-api-client-v2/index.d.ts +88 -5
  254. package/dist/packages/datadog-api-client-v2/index.js +134 -17
  255. package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
  256. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.d.ts +29 -0
  257. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.js +29 -0
  258. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequest.js.map +1 -0
  259. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.d.ts +41 -0
  260. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.js +42 -0
  261. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestAttributes.js.map +1 -0
  262. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.d.ts +34 -0
  263. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.js +34 -0
  264. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountCreateRequestData.js.map +1 -0
  265. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.d.ts +36 -0
  266. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.js +41 -0
  267. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResourceAttributes.js.map +1 -0
  268. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponse.d.ts +29 -0
  269. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponse.js +28 -0
  270. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponse.js.map +1 -0
  271. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.d.ts +37 -0
  272. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.js +37 -0
  273. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseAttributes.js.map +1 -0
  274. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.d.ts +38 -0
  275. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.js +39 -0
  276. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountResponseData.js.map +1 -0
  277. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountType.d.ts +7 -0
  278. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountType.js +10 -0
  279. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountType.js.map +1 -0
  280. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.d.ts +29 -0
  281. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.js +29 -0
  282. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequest.js.map +1 -0
  283. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.d.ts +36 -0
  284. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.js +43 -0
  285. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestAttributes.js.map +1 -0
  286. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.d.ts +34 -0
  287. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.js +34 -0
  288. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountUpdateRequestData.js.map +1 -0
  289. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.d.ts +29 -0
  290. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.js +28 -0
  291. package/dist/packages/datadog-api-client-v2/models/ConfluentAccountsResponse.js.map +1 -0
  292. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequest.d.ts +29 -0
  293. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequest.js +29 -0
  294. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequest.js.map +1 -0
  295. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.d.ts +32 -0
  296. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.js +37 -0
  297. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestAttributes.js.map +1 -0
  298. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.d.ts +38 -0
  299. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.js +39 -0
  300. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceRequestData.js.map +1 -0
  301. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponse.d.ts +29 -0
  302. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponse.js +28 -0
  303. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponse.js.map +1 -0
  304. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.d.ts +32 -0
  305. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.js +38 -0
  306. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseAttributes.js.map +1 -0
  307. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.d.ts +38 -0
  308. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.js +39 -0
  309. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceResponseData.js.map +1 -0
  310. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceType.d.ts +7 -0
  311. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceType.js +10 -0
  312. package/dist/packages/datadog-api-client-v2/models/ConfluentResourceType.js.map +1 -0
  313. package/dist/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.d.ts +29 -0
  314. package/dist/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.js +28 -0
  315. package/dist/packages/datadog-api-client-v2/models/ConfluentResourcesResponse.js.map +1 -0
  316. package/dist/packages/datadog-api-client-v2/models/Event.js +1 -0
  317. package/dist/packages/datadog-api-client-v2/models/Event.js.map +1 -1
  318. package/dist/packages/datadog-api-client-v2/models/EventAttributes.js +2 -0
  319. package/dist/packages/datadog-api-client-v2/models/EventAttributes.js.map +1 -1
  320. package/dist/packages/datadog-api-client-v2/models/HTTPLogItem.d.ts +3 -3
  321. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.d.ts +8 -0
  322. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js +11 -0
  323. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js.map +1 -0
  324. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.d.ts +12 -0
  325. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js +3 -0
  326. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js.map +1 -0
  327. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.d.ts +43 -0
  328. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js +44 -0
  329. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js.map +1 -0
  330. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.d.ts +7 -0
  331. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js +10 -0
  332. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js.map +1 -0
  333. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.d.ts +34 -0
  334. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js +34 -0
  335. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js.map +1 -0
  336. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.d.ts +32 -0
  337. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js +39 -0
  338. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js.map +1 -0
  339. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.d.ts +7 -0
  340. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js +10 -0
  341. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js.map +1 -0
  342. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.d.ts +34 -0
  343. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js +34 -0
  344. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js.map +1 -0
  345. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.d.ts +7 -0
  346. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js +10 -0
  347. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js.map +1 -0
  348. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.d.ts +29 -0
  349. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js +28 -0
  350. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js.map +1 -0
  351. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.d.ts +7 -0
  352. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js +10 -0
  353. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js.map +1 -0
  354. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.d.ts +12 -0
  355. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js +3 -0
  356. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js.map +1 -0
  357. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.d.ts +38 -0
  358. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js +37 -0
  359. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js.map +1 -0
  360. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.d.ts +32 -0
  361. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js +29 -0
  362. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js.map +1 -0
  363. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.d.ts +35 -0
  364. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js +33 -0
  365. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js.map +1 -0
  366. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.d.ts +32 -0
  367. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js +39 -0
  368. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js.map +1 -0
  369. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.d.ts +34 -0
  370. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js +33 -0
  371. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js.map +1 -0
  372. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.d.ts +11 -0
  373. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js +3 -0
  374. package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js.map +1 -0
  375. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.d.ts +2 -1
  376. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js +2 -1
  377. package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js.map +1 -1
  378. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.d.ts +1 -5
  379. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js +0 -4
  380. package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js.map +1 -1
  381. package/dist/packages/datadog-api-client-v2/models/IncidentResponseIncludedItem.d.ts +2 -1
  382. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.d.ts +5 -5
  383. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js +4 -4
  384. package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js.map +1 -1
  385. package/dist/packages/datadog-api-client-v2/models/IncidentUpdateAttributes.d.ts +0 -4
  386. package/dist/packages/datadog-api-client-v2/models/IncidentUpdateAttributes.js +0 -5
  387. package/dist/packages/datadog-api-client-v2/models/IncidentUpdateAttributes.js.map +1 -1
  388. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.d.ts +7 -0
  389. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js +10 -0
  390. package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js.map +1 -0
  391. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.d.ts +38 -0
  392. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js +36 -0
  393. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js.map +1 -0
  394. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.d.ts +29 -0
  395. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js +28 -0
  396. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js.map +1 -0
  397. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.d.ts +33 -0
  398. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js +32 -0
  399. package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js.map +1 -0
  400. package/dist/packages/datadog-api-client-v2/models/MonitorType.js +4 -0
  401. package/dist/packages/datadog-api-client-v2/models/MonitorType.js.map +1 -1
  402. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +186 -10
  403. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
  404. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.d.ts +29 -0
  405. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js +29 -0
  406. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js.map +1 -0
  407. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.d.ts +33 -0
  408. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js +34 -0
  409. package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js.map +1 -0
  410. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.d.ts +4 -61
  411. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js +0 -67
  412. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js.map +1 -1
  413. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.d.ts +4 -46
  414. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js +0 -49
  415. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js.map +1 -1
  416. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.d.ts +2 -1
  417. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js +2 -1
  418. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js.map +1 -1
  419. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.d.ts +5 -90
  420. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js +0 -93
  421. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js.map +1 -1
  422. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.d.ts +69 -0
  423. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js +70 -0
  424. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js.map +1 -0
  425. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.d.ts +49 -0
  426. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js +50 -0
  427. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js.map +1 -0
  428. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.d.ts +97 -0
  429. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js +96 -0
  430. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js.map +1 -0
  431. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponseQuery.d.ts +53 -0
  432. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponseQuery.js +53 -0
  433. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponseQuery.js.map +1 -0
  434. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.d.ts +7 -0
  435. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js +10 -0
  436. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js.map +1 -0
  437. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.d.ts +69 -0
  438. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js +70 -0
  439. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js.map +1 -0
  440. package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.d.ts → SecurityMonitoringStandardRuleQuery.d.ts} +4 -4
  441. package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.js → SecurityMonitoringStandardRuleQuery.js} +9 -9
  442. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleQuery.js.map +1 -0
  443. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.d.ts +97 -0
  444. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js +96 -0
  445. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js.map +1 -0
  446. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionCreateResponse.d.ts +29 -0
  447. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionCreateResponse.js +28 -0
  448. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionCreateResponse.js.map +1 -0
  449. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionData.d.ts +33 -0
  450. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionData.js +32 -0
  451. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionData.js.map +1 -0
  452. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionDataAttributes.d.ts +34 -0
  453. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionDataAttributes.js +32 -0
  454. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionDataAttributes.js.map +1 -0
  455. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionGetResponse.d.ts +29 -0
  456. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionGetResponse.js +28 -0
  457. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionGetResponse.js.map +1 -0
  458. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionMeta.d.ts +40 -0
  459. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionMeta.js +45 -0
  460. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionMeta.js.map +1 -0
  461. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionSchema.d.ts +12 -0
  462. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionSchema.js +3 -0
  463. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionSchema.js.map +1 -0
  464. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1.d.ts +64 -0
  465. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1.js +58 -0
  466. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1.js.map +1 -0
  467. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Contact.d.ts +32 -0
  468. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Contact.js +38 -0
  469. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Contact.js.map +1 -0
  470. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Info.d.ts +40 -0
  471. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Info.js +46 -0
  472. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Info.js.map +1 -0
  473. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Integrations.d.ts +28 -0
  474. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Integrations.js +33 -0
  475. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Integrations.js.map +1 -0
  476. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Org.d.ts +32 -0
  477. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Org.js +37 -0
  478. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Org.js.map +1 -0
  479. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Resource.d.ts +37 -0
  480. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Resource.js +39 -0
  481. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Resource.js.map +1 -0
  482. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1ResourceType.d.ts +15 -0
  483. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1ResourceType.js +18 -0
  484. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1ResourceType.js.map +1 -0
  485. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Version.d.ts +7 -0
  486. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Version.js +10 -0
  487. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV1Version.js.map +1 -0
  488. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2.d.ts +76 -0
  489. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2.js +70 -0
  490. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2.js.map +1 -0
  491. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Contact.d.ts +12 -0
  492. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Contact.js +3 -0
  493. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Contact.js.map +1 -0
  494. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Doc.d.ts +36 -0
  495. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Doc.js +43 -0
  496. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Doc.js.map +1 -0
  497. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Email.d.ts +37 -0
  498. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Email.js +39 -0
  499. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Email.js.map +1 -0
  500. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2EmailType.d.ts +7 -0
  501. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2EmailType.js +10 -0
  502. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2EmailType.js.map +1 -0
  503. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Integrations.d.ts +33 -0
  504. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Integrations.js +32 -0
  505. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Integrations.js.map +1 -0
  506. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Link.d.ts +37 -0
  507. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Link.js +39 -0
  508. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Link.js.map +1 -0
  509. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2LinkType.d.ts +15 -0
  510. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2LinkType.js +18 -0
  511. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2LinkType.js.map +1 -0
  512. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Opsgenie.d.ts +33 -0
  513. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Opsgenie.js +33 -0
  514. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Opsgenie.js.map +1 -0
  515. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2OpsgenieRegion.d.ts +8 -0
  516. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2OpsgenieRegion.js +11 -0
  517. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2OpsgenieRegion.js.map +1 -0
  518. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Repo.d.ts +36 -0
  519. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Repo.js +43 -0
  520. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Repo.js.map +1 -0
  521. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Slack.d.ts +37 -0
  522. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Slack.js +38 -0
  523. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Slack.js.map +1 -0
  524. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2SlackType.d.ts +7 -0
  525. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2SlackType.js +10 -0
  526. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2SlackType.js.map +1 -0
  527. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Version.d.ts +7 -0
  528. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Version.js +10 -0
  529. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionV2Version.js.map +1 -0
  530. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsCreateRequest.d.ts +11 -0
  531. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsCreateRequest.js +3 -0
  532. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsCreateRequest.js.map +1 -0
  533. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsListResponse.d.ts +29 -0
  534. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsListResponse.js +28 -0
  535. package/dist/packages/datadog-api-client-v2/models/ServiceDefinitionsListResponse.js.map +1 -0
  536. package/dist/version.d.ts +1 -1
  537. package/dist/version.js +1 -1
  538. package/package.json +1 -1
  539. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryCreate.js.map +0 -1
@@ -70,7 +70,6 @@ var http_1 = require("../../datadog-api-client-common/http/http");
70
70
  var logger_1 = require("../../../logger");
71
71
  var ObjectSerializer_1 = require("../models/ObjectSerializer");
72
72
  var exception_1 = require("../../datadog-api-client-common/exception");
73
- var util_1 = require("../../datadog-api-client-common/util");
74
73
  var IncidentsApiRequestFactory = /** @class */ (function (_super) {
75
74
  __extends(IncidentsApiRequestFactory, _super);
76
75
  function IncidentsApiRequestFactory() {
@@ -167,6 +166,40 @@ var IncidentsApiRequestFactory = /** @class */ (function (_super) {
167
166
  });
168
167
  });
169
168
  };
169
+ IncidentsApiRequestFactory.prototype.listIncidentAttachments = function (incidentId, include, filterAttachmentType, _options) {
170
+ return __awaiter(this, void 0, void 0, function () {
171
+ var _config, localVarPath, requestContext;
172
+ return __generator(this, function (_a) {
173
+ _config = _options || this.configuration;
174
+ logger_1.logger.warn("Using unstable operation 'listIncidentAttachments'");
175
+ if (!_config.unstableOperations["v2.listIncidentAttachments"]) {
176
+ throw new Error("Unstable operation 'listIncidentAttachments' is disabled");
177
+ }
178
+ // verify required parameter 'incidentId' is not null or undefined
179
+ if (incidentId === null || incidentId === undefined) {
180
+ throw new baseapi_1.RequiredError("Required parameter incidentId was null or undefined when calling listIncidentAttachments.");
181
+ }
182
+ localVarPath = "/api/v2/incidents/{incident_id}/attachments".replace("{" + "incident_id" + "}", encodeURIComponent(String(incidentId)));
183
+ requestContext = (0, configuration_1.getServer)(_config, "v2.IncidentsApi.listIncidentAttachments").makeRequestContext(localVarPath, http_1.HttpMethod.GET);
184
+ requestContext.setHeaderParam("Accept", "application/json");
185
+ requestContext.setHttpConfig(_config.httpConfig);
186
+ // Query Params
187
+ if (include !== undefined) {
188
+ requestContext.setQueryParam("include", ObjectSerializer_1.ObjectSerializer.serialize(include, "Array<IncidentAttachmentRelatedObject>", ""));
189
+ }
190
+ if (filterAttachmentType !== undefined) {
191
+ requestContext.setQueryParam("filter[attachment_type]", ObjectSerializer_1.ObjectSerializer.serialize(filterAttachmentType, "Array<IncidentAttachmentAttachmentType>", ""));
192
+ }
193
+ // Apply auth methods
194
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
195
+ "AuthZ",
196
+ "apiKeyAuth",
197
+ "appKeyAuth",
198
+ ]);
199
+ return [2 /*return*/, requestContext];
200
+ });
201
+ });
202
+ };
170
203
  IncidentsApiRequestFactory.prototype.listIncidents = function (include, pageSize, pageOffset, _options) {
171
204
  return __awaiter(this, void 0, void 0, function () {
172
205
  var _config, localVarPath, requestContext;
@@ -241,6 +274,46 @@ var IncidentsApiRequestFactory = /** @class */ (function (_super) {
241
274
  });
242
275
  });
243
276
  };
277
+ IncidentsApiRequestFactory.prototype.updateIncidentAttachments = function (incidentId, body, include, _options) {
278
+ return __awaiter(this, void 0, void 0, function () {
279
+ var _config, localVarPath, requestContext, contentType, serializedBody;
280
+ return __generator(this, function (_a) {
281
+ _config = _options || this.configuration;
282
+ logger_1.logger.warn("Using unstable operation 'updateIncidentAttachments'");
283
+ if (!_config.unstableOperations["v2.updateIncidentAttachments"]) {
284
+ throw new Error("Unstable operation 'updateIncidentAttachments' is disabled");
285
+ }
286
+ // verify required parameter 'incidentId' is not null or undefined
287
+ if (incidentId === null || incidentId === undefined) {
288
+ throw new baseapi_1.RequiredError("Required parameter incidentId was null or undefined when calling updateIncidentAttachments.");
289
+ }
290
+ // verify required parameter 'body' is not null or undefined
291
+ if (body === null || body === undefined) {
292
+ throw new baseapi_1.RequiredError("Required parameter body was null or undefined when calling updateIncidentAttachments.");
293
+ }
294
+ localVarPath = "/api/v2/incidents/{incident_id}/attachments".replace("{" + "incident_id" + "}", encodeURIComponent(String(incidentId)));
295
+ requestContext = (0, configuration_1.getServer)(_config, "v2.IncidentsApi.updateIncidentAttachments").makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
296
+ requestContext.setHeaderParam("Accept", "application/json");
297
+ requestContext.setHttpConfig(_config.httpConfig);
298
+ // Query Params
299
+ if (include !== undefined) {
300
+ requestContext.setQueryParam("include", ObjectSerializer_1.ObjectSerializer.serialize(include, "Array<IncidentAttachmentRelatedObject>", ""));
301
+ }
302
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
303
+ "application/json",
304
+ ]);
305
+ requestContext.setHeaderParam("Content-Type", contentType);
306
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "IncidentAttachmentUpdateRequest", ""), contentType);
307
+ requestContext.setBody(serializedBody);
308
+ // Apply auth methods
309
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
310
+ "apiKeyAuth",
311
+ "appKeyAuth",
312
+ ]);
313
+ return [2 /*return*/, requestContext];
314
+ });
315
+ });
316
+ };
244
317
  return IncidentsApiRequestFactory;
245
318
  }(baseapi_1.BaseAPIRequestFactory));
246
319
  exports.IncidentsApiRequestFactory = IncidentsApiRequestFactory;
@@ -256,83 +329,50 @@ var IncidentsApiResponseProcessor = /** @class */ (function () {
256
329
  */
257
330
  IncidentsApiResponseProcessor.prototype.createIncident = function (response) {
258
331
  return __awaiter(this, void 0, void 0, function () {
259
- 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_7, _0, _1, _2, _3, body;
260
- return __generator(this, function (_4) {
261
- switch (_4.label) {
332
+ var contentType, body_1, _a, _b, _c, _d, bodyText, _e, _f, body_2, body_3, _g, _h, _j, _k, body;
333
+ return __generator(this, function (_l) {
334
+ switch (_l.label) {
262
335
  case 0:
263
336
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
264
- if (!(0, util_1.isCodeInRange)("201", response.httpStatusCode)) return [3 /*break*/, 2];
337
+ if (!(response.httpStatusCode == 201)) return [3 /*break*/, 2];
265
338
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
266
339
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
267
340
  return [4 /*yield*/, response.body.text()];
268
341
  case 1:
269
- body_1 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
270
- "IncidentResponse",
271
- ""]);
342
+ body_1 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
343
+ "IncidentResponse"]);
272
344
  return [2 /*return*/, body_1];
273
345
  case 2:
274
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
275
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
276
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
346
+ if (!(response.httpStatusCode == 400 ||
347
+ response.httpStatusCode == 401 ||
348
+ response.httpStatusCode == 403 ||
349
+ response.httpStatusCode == 404 ||
350
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
351
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
277
352
  return [4 /*yield*/, response.body.text()];
278
353
  case 3:
279
- body_2 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
280
- "APIErrorResponse",
281
- ""]);
282
- throw new exception_1.ApiException(400, body_2);
354
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
355
+ try {
356
+ body_2 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
357
+ }
358
+ catch (error) {
359
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
360
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
361
+ }
362
+ throw new exception_1.ApiException(response.httpStatusCode, body_2);
283
363
  case 4:
284
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
285
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
286
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
364
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
365
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
366
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
287
367
  return [4 /*yield*/, response.body.text()];
288
368
  case 5:
289
- body_3 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
290
- "APIErrorResponse",
291
- ""]);
292
- throw new exception_1.ApiException(401, body_3);
293
- case 6:
294
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
295
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
296
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
297
- return [4 /*yield*/, response.body.text()];
298
- case 7:
299
- body_4 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
300
- "APIErrorResponse",
301
- ""]);
302
- throw new exception_1.ApiException(403, body_4);
303
- case 8:
304
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
305
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
306
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
307
- return [4 /*yield*/, response.body.text()];
308
- case 9:
309
- body_5 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
310
- "APIErrorResponse",
311
- ""]);
312
- throw new exception_1.ApiException(404, body_5);
313
- case 10:
314
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
315
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
316
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
317
- return [4 /*yield*/, response.body.text()];
318
- case 11:
319
- body_6 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
320
- "APIErrorResponse",
321
- ""]);
322
- throw new exception_1.ApiException(429, body_6);
323
- case 12:
324
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
325
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
326
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
327
- return [4 /*yield*/, response.body.text()];
328
- case 13:
329
- body_7 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
369
+ body_3 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
330
370
  "IncidentResponse",
331
371
  ""]);
332
- return [2 /*return*/, body_7];
333
- case 14: return [4 /*yield*/, response.body.text()];
334
- case 15:
335
- body = (_4.sent()) || "";
372
+ return [2 /*return*/, body_3];
373
+ case 6: return [4 /*yield*/, response.body.text()];
374
+ case 7:
375
+ body = (_l.sent()) || "";
336
376
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
337
377
  }
338
378
  });
@@ -347,76 +387,44 @@ var IncidentsApiResponseProcessor = /** @class */ (function () {
347
387
  */
348
388
  IncidentsApiResponseProcessor.prototype.deleteIncident = function (response) {
349
389
  return __awaiter(this, void 0, void 0, function () {
350
- var contentType, body_8, _a, _b, _c, _d, body_9, _e, _f, _g, _h, body_10, _j, _k, _l, _m, body_11, _o, _p, _q, _r, body_12, _s, _t, _u, _v, body_13, _w, _x, _y, _z, body;
351
- return __generator(this, function (_0) {
352
- switch (_0.label) {
390
+ var contentType, bodyText, _a, _b, body_4, body_5, _c, _d, _e, _f, body;
391
+ return __generator(this, function (_g) {
392
+ switch (_g.label) {
353
393
  case 0:
354
394
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
355
- if ((0, util_1.isCodeInRange)("204", response.httpStatusCode)) {
395
+ if (response.httpStatusCode == 204) {
356
396
  return [2 /*return*/];
357
397
  }
358
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 2];
359
- _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
360
- _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
398
+ if (!(response.httpStatusCode == 400 ||
399
+ response.httpStatusCode == 401 ||
400
+ response.httpStatusCode == 403 ||
401
+ response.httpStatusCode == 404 ||
402
+ response.httpStatusCode == 429)) return [3 /*break*/, 2];
403
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).parse;
361
404
  return [4 /*yield*/, response.body.text()];
362
405
  case 1:
363
- body_8 = _b.apply(_a, [_d.apply(_c, [_0.sent(), contentType]),
364
- "APIErrorResponse",
365
- ""]);
366
- throw new exception_1.ApiException(400, body_8);
406
+ bodyText = _b.apply(_a, [_g.sent(), contentType]);
407
+ try {
408
+ body_4 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
409
+ }
410
+ catch (error) {
411
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
412
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
413
+ }
414
+ throw new exception_1.ApiException(response.httpStatusCode, body_4);
367
415
  case 2:
368
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 4];
369
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
370
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
416
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 4];
417
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).deserialize;
418
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
371
419
  return [4 /*yield*/, response.body.text()];
372
420
  case 3:
373
- body_9 = _f.apply(_e, [_h.apply(_g, [_0.sent(), contentType]),
374
- "APIErrorResponse",
375
- ""]);
376
- throw new exception_1.ApiException(401, body_9);
377
- case 4:
378
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 6];
379
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
380
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
381
- return [4 /*yield*/, response.body.text()];
382
- case 5:
383
- body_10 = _k.apply(_j, [_m.apply(_l, [_0.sent(), contentType]),
384
- "APIErrorResponse",
385
- ""]);
386
- throw new exception_1.ApiException(403, body_10);
387
- case 6:
388
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 8];
389
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
390
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
391
- return [4 /*yield*/, response.body.text()];
392
- case 7:
393
- body_11 = _p.apply(_o, [_r.apply(_q, [_0.sent(), contentType]),
394
- "APIErrorResponse",
395
- ""]);
396
- throw new exception_1.ApiException(404, body_11);
397
- case 8:
398
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 10];
399
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
400
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
401
- return [4 /*yield*/, response.body.text()];
402
- case 9:
403
- body_12 = _t.apply(_s, [_v.apply(_u, [_0.sent(), contentType]),
404
- "APIErrorResponse",
405
- ""]);
406
- throw new exception_1.ApiException(429, body_12);
407
- case 10:
408
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 12];
409
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
410
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
411
- return [4 /*yield*/, response.body.text()];
412
- case 11:
413
- body_13 = _x.apply(_w, [_z.apply(_y, [_0.sent(), contentType]),
421
+ body_5 = _d.apply(_c, [_f.apply(_e, [_g.sent(), contentType]),
414
422
  "void",
415
423
  ""]);
416
- return [2 /*return*/, body_13];
417
- case 12: return [4 /*yield*/, response.body.text()];
418
- case 13:
419
- body = (_0.sent()) || "";
424
+ return [2 /*return*/, body_5];
425
+ case 4: return [4 /*yield*/, response.body.text()];
426
+ case 5:
427
+ body = (_g.sent()) || "";
420
428
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
421
429
  }
422
430
  });
@@ -431,83 +439,108 @@ var IncidentsApiResponseProcessor = /** @class */ (function () {
431
439
  */
432
440
  IncidentsApiResponseProcessor.prototype.getIncident = function (response) {
433
441
  return __awaiter(this, void 0, void 0, function () {
434
- var contentType, body_14, _a, _b, _c, _d, body_15, _e, _f, _g, _h, body_16, _j, _k, _l, _m, body_17, _o, _p, _q, _r, body_18, _s, _t, _u, _v, body_19, _w, _x, _y, _z, body_20, _0, _1, _2, _3, body;
435
- return __generator(this, function (_4) {
436
- switch (_4.label) {
442
+ var contentType, body_6, _a, _b, _c, _d, bodyText, _e, _f, body_7, body_8, _g, _h, _j, _k, body;
443
+ return __generator(this, function (_l) {
444
+ switch (_l.label) {
437
445
  case 0:
438
446
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
439
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
447
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
440
448
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
441
449
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
442
450
  return [4 /*yield*/, response.body.text()];
443
451
  case 1:
444
- body_14 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
445
- "IncidentResponse",
446
- ""]);
447
- return [2 /*return*/, body_14];
452
+ body_6 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
453
+ "IncidentResponse"]);
454
+ return [2 /*return*/, body_6];
448
455
  case 2:
449
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
450
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
451
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
456
+ if (!(response.httpStatusCode == 400 ||
457
+ response.httpStatusCode == 401 ||
458
+ response.httpStatusCode == 403 ||
459
+ response.httpStatusCode == 404 ||
460
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
461
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
452
462
  return [4 /*yield*/, response.body.text()];
453
463
  case 3:
454
- body_15 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
455
- "APIErrorResponse",
456
- ""]);
457
- throw new exception_1.ApiException(400, body_15);
464
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
465
+ try {
466
+ body_7 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
467
+ }
468
+ catch (error) {
469
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
470
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
471
+ }
472
+ throw new exception_1.ApiException(response.httpStatusCode, body_7);
458
473
  case 4:
459
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
460
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
461
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
474
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
475
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
476
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
462
477
  return [4 /*yield*/, response.body.text()];
463
478
  case 5:
464
- body_16 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
465
- "APIErrorResponse",
479
+ body_8 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
480
+ "IncidentResponse",
466
481
  ""]);
467
- throw new exception_1.ApiException(401, body_16);
468
- case 6:
469
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
470
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
471
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
472
- return [4 /*yield*/, response.body.text()];
482
+ return [2 /*return*/, body_8];
483
+ case 6: return [4 /*yield*/, response.body.text()];
473
484
  case 7:
474
- body_17 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
475
- "APIErrorResponse",
476
- ""]);
477
- throw new exception_1.ApiException(403, body_17);
478
- case 8:
479
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
480
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
481
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
485
+ body = (_l.sent()) || "";
486
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
487
+ }
488
+ });
489
+ });
490
+ };
491
+ /**
492
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
493
+ * to the expected objects
494
+ *
495
+ * @params response Response returned by the server for a request to listIncidentAttachments
496
+ * @throws ApiException if the response code was not in [200, 299]
497
+ */
498
+ IncidentsApiResponseProcessor.prototype.listIncidentAttachments = function (response) {
499
+ return __awaiter(this, void 0, void 0, function () {
500
+ var contentType, body_9, _a, _b, _c, _d, bodyText, _e, _f, body_10, body_11, _g, _h, _j, _k, body;
501
+ return __generator(this, function (_l) {
502
+ switch (_l.label) {
503
+ case 0:
504
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
505
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
506
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
507
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
482
508
  return [4 /*yield*/, response.body.text()];
483
- case 9:
484
- body_18 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
485
- "APIErrorResponse",
486
- ""]);
487
- throw new exception_1.ApiException(404, body_18);
488
- case 10:
489
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
490
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
491
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
509
+ case 1:
510
+ body_9 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
511
+ "IncidentAttachmentsResponse"]);
512
+ return [2 /*return*/, body_9];
513
+ case 2:
514
+ if (!(response.httpStatusCode == 400 ||
515
+ response.httpStatusCode == 401 ||
516
+ response.httpStatusCode == 403 ||
517
+ response.httpStatusCode == 404 ||
518
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
519
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
492
520
  return [4 /*yield*/, response.body.text()];
493
- case 11:
494
- body_19 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
495
- "APIErrorResponse",
496
- ""]);
497
- throw new exception_1.ApiException(429, body_19);
498
- case 12:
499
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
500
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
501
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
521
+ case 3:
522
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
523
+ try {
524
+ body_10 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
525
+ }
526
+ catch (error) {
527
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
528
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
529
+ }
530
+ throw new exception_1.ApiException(response.httpStatusCode, body_10);
531
+ case 4:
532
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
533
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
534
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
502
535
  return [4 /*yield*/, response.body.text()];
503
- case 13:
504
- body_20 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
505
- "IncidentResponse",
536
+ case 5:
537
+ body_11 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
538
+ "IncidentAttachmentsResponse",
506
539
  ""]);
507
- return [2 /*return*/, body_20];
508
- case 14: return [4 /*yield*/, response.body.text()];
509
- case 15:
510
- body = (_4.sent()) || "";
540
+ return [2 /*return*/, body_11];
541
+ case 6: return [4 /*yield*/, response.body.text()];
542
+ case 7:
543
+ body = (_l.sent()) || "";
511
544
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
512
545
  }
513
546
  });
@@ -522,83 +555,50 @@ var IncidentsApiResponseProcessor = /** @class */ (function () {
522
555
  */
523
556
  IncidentsApiResponseProcessor.prototype.listIncidents = function (response) {
524
557
  return __awaiter(this, void 0, void 0, function () {
525
- var contentType, body_21, _a, _b, _c, _d, body_22, _e, _f, _g, _h, body_23, _j, _k, _l, _m, body_24, _o, _p, _q, _r, body_25, _s, _t, _u, _v, body_26, _w, _x, _y, _z, body_27, _0, _1, _2, _3, body;
526
- return __generator(this, function (_4) {
527
- switch (_4.label) {
558
+ var contentType, body_12, _a, _b, _c, _d, bodyText, _e, _f, body_13, body_14, _g, _h, _j, _k, body;
559
+ return __generator(this, function (_l) {
560
+ switch (_l.label) {
528
561
  case 0:
529
562
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
530
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
563
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
531
564
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
532
565
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
533
566
  return [4 /*yield*/, response.body.text()];
534
567
  case 1:
535
- body_21 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
536
- "IncidentsResponse",
537
- ""]);
538
- return [2 /*return*/, body_21];
568
+ body_12 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
569
+ "IncidentsResponse"]);
570
+ return [2 /*return*/, body_12];
539
571
  case 2:
540
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
541
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
542
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
572
+ if (!(response.httpStatusCode == 400 ||
573
+ response.httpStatusCode == 401 ||
574
+ response.httpStatusCode == 403 ||
575
+ response.httpStatusCode == 404 ||
576
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
577
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
543
578
  return [4 /*yield*/, response.body.text()];
544
579
  case 3:
545
- body_22 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
546
- "APIErrorResponse",
547
- ""]);
548
- throw new exception_1.ApiException(400, body_22);
580
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
581
+ try {
582
+ body_13 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
583
+ }
584
+ catch (error) {
585
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
586
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
587
+ }
588
+ throw new exception_1.ApiException(response.httpStatusCode, body_13);
549
589
  case 4:
550
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
551
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
552
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
590
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
591
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
592
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
553
593
  return [4 /*yield*/, response.body.text()];
554
594
  case 5:
555
- body_23 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
556
- "APIErrorResponse",
557
- ""]);
558
- throw new exception_1.ApiException(401, body_23);
559
- case 6:
560
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
561
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
562
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
563
- return [4 /*yield*/, response.body.text()];
564
- case 7:
565
- body_24 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
566
- "APIErrorResponse",
567
- ""]);
568
- throw new exception_1.ApiException(403, body_24);
569
- case 8:
570
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
571
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
572
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
573
- return [4 /*yield*/, response.body.text()];
574
- case 9:
575
- body_25 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
576
- "APIErrorResponse",
577
- ""]);
578
- throw new exception_1.ApiException(404, body_25);
579
- case 10:
580
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
581
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
582
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
583
- return [4 /*yield*/, response.body.text()];
584
- case 11:
585
- body_26 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
586
- "APIErrorResponse",
587
- ""]);
588
- throw new exception_1.ApiException(429, body_26);
589
- case 12:
590
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
591
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
592
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
593
- return [4 /*yield*/, response.body.text()];
594
- case 13:
595
- body_27 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
595
+ body_14 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
596
596
  "IncidentsResponse",
597
597
  ""]);
598
- return [2 /*return*/, body_27];
599
- case 14: return [4 /*yield*/, response.body.text()];
600
- case 15:
601
- body = (_4.sent()) || "";
598
+ return [2 /*return*/, body_14];
599
+ case 6: return [4 /*yield*/, response.body.text()];
600
+ case 7:
601
+ body = (_l.sent()) || "";
602
602
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
603
603
  }
604
604
  });
@@ -613,83 +613,108 @@ var IncidentsApiResponseProcessor = /** @class */ (function () {
613
613
  */
614
614
  IncidentsApiResponseProcessor.prototype.updateIncident = function (response) {
615
615
  return __awaiter(this, void 0, void 0, function () {
616
- var contentType, body_28, _a, _b, _c, _d, body_29, _e, _f, _g, _h, body_30, _j, _k, _l, _m, body_31, _o, _p, _q, _r, body_32, _s, _t, _u, _v, body_33, _w, _x, _y, _z, body_34, _0, _1, _2, _3, body;
617
- return __generator(this, function (_4) {
618
- switch (_4.label) {
616
+ var contentType, body_15, _a, _b, _c, _d, bodyText, _e, _f, body_16, body_17, _g, _h, _j, _k, body;
617
+ return __generator(this, function (_l) {
618
+ switch (_l.label) {
619
619
  case 0:
620
620
  contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
621
- if (!(0, util_1.isCodeInRange)("200", response.httpStatusCode)) return [3 /*break*/, 2];
621
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
622
622
  _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
623
623
  _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
624
624
  return [4 /*yield*/, response.body.text()];
625
625
  case 1:
626
- body_28 = _b.apply(_a, [_d.apply(_c, [_4.sent(), contentType]),
627
- "IncidentResponse",
628
- ""]);
629
- return [2 /*return*/, body_28];
626
+ body_15 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
627
+ "IncidentResponse"]);
628
+ return [2 /*return*/, body_15];
630
629
  case 2:
631
- if (!(0, util_1.isCodeInRange)("400", response.httpStatusCode)) return [3 /*break*/, 4];
632
- _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
633
- _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
630
+ if (!(response.httpStatusCode == 400 ||
631
+ response.httpStatusCode == 401 ||
632
+ response.httpStatusCode == 403 ||
633
+ response.httpStatusCode == 404 ||
634
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
635
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
634
636
  return [4 /*yield*/, response.body.text()];
635
637
  case 3:
636
- body_29 = _f.apply(_e, [_h.apply(_g, [_4.sent(), contentType]),
637
- "APIErrorResponse",
638
- ""]);
639
- throw new exception_1.ApiException(400, body_29);
638
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
639
+ try {
640
+ body_16 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
641
+ }
642
+ catch (error) {
643
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
644
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
645
+ }
646
+ throw new exception_1.ApiException(response.httpStatusCode, body_16);
640
647
  case 4:
641
- if (!(0, util_1.isCodeInRange)("401", response.httpStatusCode)) return [3 /*break*/, 6];
642
- _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
643
- _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
648
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
649
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
650
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
644
651
  return [4 /*yield*/, response.body.text()];
645
652
  case 5:
646
- body_30 = _k.apply(_j, [_m.apply(_l, [_4.sent(), contentType]),
647
- "APIErrorResponse",
653
+ body_17 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
654
+ "IncidentResponse",
648
655
  ""]);
649
- throw new exception_1.ApiException(401, body_30);
650
- case 6:
651
- if (!(0, util_1.isCodeInRange)("403", response.httpStatusCode)) return [3 /*break*/, 8];
652
- _p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
653
- _r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
654
- return [4 /*yield*/, response.body.text()];
656
+ return [2 /*return*/, body_17];
657
+ case 6: return [4 /*yield*/, response.body.text()];
655
658
  case 7:
656
- body_31 = _p.apply(_o, [_r.apply(_q, [_4.sent(), contentType]),
657
- "APIErrorResponse",
658
- ""]);
659
- throw new exception_1.ApiException(403, body_31);
660
- case 8:
661
- if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 10];
662
- _t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
663
- _v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
659
+ body = (_l.sent()) || "";
660
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
661
+ }
662
+ });
663
+ });
664
+ };
665
+ /**
666
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
667
+ * to the expected objects
668
+ *
669
+ * @params response Response returned by the server for a request to updateIncidentAttachments
670
+ * @throws ApiException if the response code was not in [200, 299]
671
+ */
672
+ IncidentsApiResponseProcessor.prototype.updateIncidentAttachments = function (response) {
673
+ return __awaiter(this, void 0, void 0, function () {
674
+ var contentType, body_18, _a, _b, _c, _d, bodyText, _e, _f, body_19, body_20, _g, _h, _j, _k, body;
675
+ return __generator(this, function (_l) {
676
+ switch (_l.label) {
677
+ case 0:
678
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
679
+ if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
680
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
681
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
664
682
  return [4 /*yield*/, response.body.text()];
665
- case 9:
666
- body_32 = _t.apply(_s, [_v.apply(_u, [_4.sent(), contentType]),
667
- "APIErrorResponse",
668
- ""]);
669
- throw new exception_1.ApiException(404, body_32);
670
- case 10:
671
- if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 12];
672
- _x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
673
- _z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
683
+ case 1:
684
+ body_18 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
685
+ "IncidentAttachmentUpdateResponse"]);
686
+ return [2 /*return*/, body_18];
687
+ case 2:
688
+ if (!(response.httpStatusCode == 400 ||
689
+ response.httpStatusCode == 401 ||
690
+ response.httpStatusCode == 403 ||
691
+ response.httpStatusCode == 404 ||
692
+ response.httpStatusCode == 429)) return [3 /*break*/, 4];
693
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
674
694
  return [4 /*yield*/, response.body.text()];
675
- case 11:
676
- body_33 = _x.apply(_w, [_z.apply(_y, [_4.sent(), contentType]),
677
- "APIErrorResponse",
678
- ""]);
679
- throw new exception_1.ApiException(429, body_33);
680
- case 12:
681
- if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 14];
682
- _1 = (_0 = ObjectSerializer_1.ObjectSerializer).deserialize;
683
- _3 = (_2 = ObjectSerializer_1.ObjectSerializer).parse;
695
+ case 3:
696
+ bodyText = _f.apply(_e, [_l.sent(), contentType]);
697
+ try {
698
+ body_19 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
699
+ }
700
+ catch (error) {
701
+ logger_1.logger.info("Got error deserializing error: ".concat(error));
702
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
703
+ }
704
+ throw new exception_1.ApiException(response.httpStatusCode, body_19);
705
+ case 4:
706
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
707
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
708
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
684
709
  return [4 /*yield*/, response.body.text()];
685
- case 13:
686
- body_34 = _1.apply(_0, [_3.apply(_2, [_4.sent(), contentType]),
687
- "IncidentResponse",
710
+ case 5:
711
+ body_20 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
712
+ "IncidentAttachmentUpdateResponse",
688
713
  ""]);
689
- return [2 /*return*/, body_34];
690
- case 14: return [4 /*yield*/, response.body.text()];
691
- case 15:
692
- body = (_4.sent()) || "";
714
+ return [2 /*return*/, body_20];
715
+ case 6: return [4 /*yield*/, response.body.text()];
716
+ case 7:
717
+ body = (_l.sent()) || "";
693
718
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
694
719
  }
695
720
  });
@@ -751,6 +776,21 @@ var IncidentsApi = /** @class */ (function () {
751
776
  });
752
777
  });
753
778
  };
779
+ /**
780
+ * Get all attachments for a given incident.
781
+ * @param param The request object
782
+ */
783
+ IncidentsApi.prototype.listIncidentAttachments = function (param, options) {
784
+ var _this = this;
785
+ var requestContextPromise = this.requestFactory.listIncidentAttachments(param.incidentId, param.include, param.filterAttachmentType, options);
786
+ return requestContextPromise.then(function (requestContext) {
787
+ return _this.configuration.httpApi
788
+ .send(requestContext)
789
+ .then(function (responseContext) {
790
+ return _this.responseProcessor.listIncidentAttachments(responseContext);
791
+ });
792
+ });
793
+ };
754
794
  /**
755
795
  * Get all incidents for the user's organization.
756
796
  * @param param The request object
@@ -843,6 +883,21 @@ var IncidentsApi = /** @class */ (function () {
843
883
  });
844
884
  });
845
885
  };
886
+ /**
887
+ * The bulk update endpoint for creating, updating, and deleting attachments for a given incident.
888
+ * @param param The request object
889
+ */
890
+ IncidentsApi.prototype.updateIncidentAttachments = function (param, options) {
891
+ var _this = this;
892
+ var requestContextPromise = this.requestFactory.updateIncidentAttachments(param.incidentId, param.body, param.include, options);
893
+ return requestContextPromise.then(function (requestContext) {
894
+ return _this.configuration.httpApi
895
+ .send(requestContext)
896
+ .then(function (responseContext) {
897
+ return _this.responseProcessor.updateIncidentAttachments(responseContext);
898
+ });
899
+ });
900
+ };
846
901
  return IncidentsApi;
847
902
  }());
848
903
  exports.IncidentsApi = IncidentsApi;