@datadog/datadog-api-client 1.21.0 → 1.22.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 (128) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/packages/datadog-api-client-common/configuration.js +4 -0
  3. package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
  4. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.d.ts +1 -1
  5. package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js +1 -1
  6. package/dist/packages/datadog-api-client-v1/index.d.ts +1 -0
  7. package/dist/packages/datadog-api-client-v1/index.js +12 -10
  8. package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
  9. package/dist/packages/datadog-api-client-v1/models/Dashboard.d.ts +5 -1
  10. package/dist/packages/datadog-api-client-v1/models/Dashboard.js.map +1 -1
  11. package/dist/packages/datadog-api-client-v1/models/DashboardSummaryDefinition.d.ts +2 -0
  12. package/dist/packages/datadog-api-client-v1/models/DashboardSummaryDefinition.js.map +1 -1
  13. package/dist/packages/datadog-api-client-v1/models/Log.d.ts +1 -1
  14. package/dist/packages/datadog-api-client-v1/models/LogsDailyLimitReset.d.ts +32 -0
  15. package/dist/packages/datadog-api-client-v1/models/LogsDailyLimitReset.js +35 -0
  16. package/dist/packages/datadog-api-client-v1/models/LogsDailyLimitReset.js.map +1 -0
  17. package/dist/packages/datadog-api-client-v1/models/LogsIndex.d.ts +9 -0
  18. package/dist/packages/datadog-api-client-v1/models/LogsIndex.js +9 -0
  19. package/dist/packages/datadog-api-client-v1/models/LogsIndex.js.map +1 -1
  20. package/dist/packages/datadog-api-client-v1/models/LogsIndexUpdateRequest.d.ts +9 -0
  21. package/dist/packages/datadog-api-client-v1/models/LogsIndexUpdateRequest.js +9 -0
  22. package/dist/packages/datadog-api-client-v1/models/LogsIndexUpdateRequest.js.map +1 -1
  23. package/dist/packages/datadog-api-client-v1/models/MetricsPayload.d.ts +1 -1
  24. package/dist/packages/datadog-api-client-v1/models/MetricsQueryMetadata.d.ts +1 -1
  25. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +2 -0
  26. package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
  27. package/dist/packages/datadog-api-client-v1/models/SLOCorrectionCreateRequestAttributes.d.ts +1 -1
  28. package/dist/packages/datadog-api-client-v1/models/SLOCorrectionResponseAttributes.d.ts +1 -1
  29. package/dist/packages/datadog-api-client-v1/models/SLOCorrectionUpdateRequestAttributes.d.ts +1 -1
  30. package/dist/packages/datadog-api-client-v1/models/SLOHistoryMetrics.d.ts +2 -2
  31. package/dist/packages/datadog-api-client-v1/models/SLOHistoryMetricsSeries.d.ts +1 -1
  32. package/dist/packages/datadog-api-client-v1/models/SLOHistoryMetricsSeries.js +1 -1
  33. package/dist/packages/datadog-api-client-v1/models/SLOHistoryMonitor.d.ts +1 -1
  34. package/dist/packages/datadog-api-client-v1/models/SLOHistorySLIData.d.ts +1 -1
  35. package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.d.ts +4 -0
  36. package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.js +4 -0
  37. package/dist/packages/datadog-api-client-v1/models/SyntheticsTestRequest.js.map +1 -1
  38. package/dist/packages/datadog-api-client-v1/models/UsageLambdaHour.d.ts +1 -1
  39. package/dist/packages/datadog-api-client-v1/models/UsageLambdaHour.js +1 -1
  40. package/dist/packages/datadog-api-client-v1/models/UsageLambdaResponse.d.ts +1 -1
  41. package/dist/packages/datadog-api-client-v1/models/UsageLambdaResponse.js +1 -1
  42. package/dist/packages/datadog-api-client-v2/apis/APIManagementApi.d.ts +108 -0
  43. package/dist/packages/datadog-api-client-v2/apis/APIManagementApi.js +410 -0
  44. package/dist/packages/datadog-api-client-v2/apis/APIManagementApi.js.map +1 -0
  45. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.d.ts +107 -0
  46. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js +389 -0
  47. package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js.map +1 -1
  48. package/dist/packages/datadog-api-client-v2/apis/TeamsApi.d.ts +5 -0
  49. package/dist/packages/datadog-api-client-v2/apis/TeamsApi.js +30 -0
  50. package/dist/packages/datadog-api-client-v2/apis/TeamsApi.js.map +1 -1
  51. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.d.ts +1 -1
  52. package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js +1 -1
  53. package/dist/packages/datadog-api-client-v2/index.d.ts +22 -1
  54. package/dist/packages/datadog-api-client-v2/index.js +62 -22
  55. package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
  56. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponse.d.ts +29 -0
  57. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponse.js +26 -0
  58. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponse.js.map +1 -0
  59. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseAttributes.d.ts +29 -0
  60. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseAttributes.js +26 -0
  61. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseAttributes.js.map +1 -0
  62. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseData.d.ts +33 -0
  63. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseData.js +31 -0
  64. package/dist/packages/datadog-api-client-v2/models/CreateOpenAPIResponseData.js.map +1 -0
  65. package/dist/packages/datadog-api-client-v2/models/DORADeploymentRequestAttributes.d.ts +4 -0
  66. package/dist/packages/datadog-api-client-v2/models/DORADeploymentRequestAttributes.js +4 -0
  67. package/dist/packages/datadog-api-client-v2/models/DORADeploymentRequestAttributes.js.map +1 -1
  68. package/dist/packages/datadog-api-client-v2/models/DORAIncidentRequestAttributes.d.ts +4 -0
  69. package/dist/packages/datadog-api-client-v2/models/DORAIncidentRequestAttributes.js +4 -0
  70. package/dist/packages/datadog-api-client-v2/models/DORAIncidentRequestAttributes.js.map +1 -1
  71. package/dist/packages/datadog-api-client-v2/models/MetricPayload.d.ts +1 -1
  72. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +39 -0
  73. package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
  74. package/dist/packages/datadog-api-client-v2/models/OpenAPIEndpoint.d.ts +32 -0
  75. package/dist/packages/datadog-api-client-v2/models/OpenAPIEndpoint.js +35 -0
  76. package/dist/packages/datadog-api-client-v2/models/OpenAPIEndpoint.js.map +1 -0
  77. package/dist/packages/datadog-api-client-v2/models/OpenAPIFile.d.ts +29 -0
  78. package/dist/packages/datadog-api-client-v2/models/OpenAPIFile.js +32 -0
  79. package/dist/packages/datadog-api-client-v2/models/OpenAPIFile.js.map +1 -0
  80. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppression.d.ts +38 -0
  81. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppression.js +34 -0
  82. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppression.js.map +1 -0
  83. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionAttributes.d.ts +69 -0
  84. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionAttributes.js +70 -0
  85. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionAttributes.js.map +1 -0
  86. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateAttributes.d.ts +48 -0
  87. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateAttributes.js +56 -0
  88. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateAttributes.js.map +1 -0
  89. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateData.d.ts +34 -0
  90. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateData.js +32 -0
  91. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateData.js.map +1 -0
  92. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateRequest.d.ts +29 -0
  93. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateRequest.js +27 -0
  94. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionCreateRequest.js.map +1 -0
  95. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionResponse.d.ts +29 -0
  96. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionResponse.js +26 -0
  97. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionResponse.js.map +1 -0
  98. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionType.d.ts +11 -0
  99. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionType.js +10 -0
  100. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionType.js.map +1 -0
  101. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateAttributes.d.ts +52 -0
  102. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateAttributes.js +57 -0
  103. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateAttributes.js.map +1 -0
  104. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateData.d.ts +34 -0
  105. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateData.js +32 -0
  106. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateData.js.map +1 -0
  107. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateRequest.d.ts +29 -0
  108. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateRequest.js +27 -0
  109. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionUpdateRequest.js.map +1 -0
  110. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionsResponse.d.ts +29 -0
  111. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionsResponse.js +26 -0
  112. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSuppressionsResponse.js.map +1 -0
  113. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringUser.d.ts +32 -0
  114. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringUser.js +35 -0
  115. package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringUser.js.map +1 -0
  116. package/dist/packages/datadog-api-client-v2/models/SensitiveDataScannerIncludedKeywordConfiguration.d.ts +1 -1
  117. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponse.d.ts +29 -0
  118. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponse.js +26 -0
  119. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponse.js.map +1 -0
  120. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseAttributes.d.ts +29 -0
  121. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseAttributes.js +26 -0
  122. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseAttributes.js.map +1 -0
  123. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseData.d.ts +33 -0
  124. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseData.js +31 -0
  125. package/dist/packages/datadog-api-client-v2/models/UpdateOpenAPIResponseData.js.map +1 -0
  126. package/dist/version.d.ts +1 -1
  127. package/dist/version.js +1 -1
  128. package/package.json +1 -1
@@ -93,6 +93,37 @@ class SecurityMonitoringApiRequestFactory extends baseapi_1.BaseAPIRequestFactor
93
93
  return requestContext;
94
94
  });
95
95
  }
96
+ createSecurityMonitoringSuppression(body, _options) {
97
+ return __awaiter(this, void 0, void 0, function* () {
98
+ const _config = _options || this.configuration;
99
+ // verify required parameter 'body' is not null or undefined
100
+ if (body === null || body === undefined) {
101
+ throw new baseapi_1.RequiredError("body", "createSecurityMonitoringSuppression");
102
+ }
103
+ // Path Params
104
+ const localVarPath = "/api/v2/security_monitoring/configuration/suppressions";
105
+ // Make Request Context
106
+ const requestContext = _config
107
+ .getServer("v2.SecurityMonitoringApi.createSecurityMonitoringSuppression")
108
+ .makeRequestContext(localVarPath, http_1.HttpMethod.POST);
109
+ requestContext.setHeaderParam("Accept", "application/json");
110
+ requestContext.setHttpConfig(_config.httpConfig);
111
+ // Body Params
112
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
113
+ "application/json",
114
+ ]);
115
+ requestContext.setHeaderParam("Content-Type", contentType);
116
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SecurityMonitoringSuppressionCreateRequest", ""), contentType);
117
+ requestContext.setBody(serializedBody);
118
+ // Apply auth methods
119
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
120
+ "AuthZ",
121
+ "apiKeyAuth",
122
+ "appKeyAuth",
123
+ ]);
124
+ return requestContext;
125
+ });
126
+ }
96
127
  deleteSecurityFilter(securityFilterId, _options) {
97
128
  return __awaiter(this, void 0, void 0, function* () {
98
129
  const _config = _options || this.configuration;
@@ -141,6 +172,30 @@ class SecurityMonitoringApiRequestFactory extends baseapi_1.BaseAPIRequestFactor
141
172
  return requestContext;
142
173
  });
143
174
  }
175
+ deleteSecurityMonitoringSuppression(suppressionId, _options) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const _config = _options || this.configuration;
178
+ // verify required parameter 'suppressionId' is not null or undefined
179
+ if (suppressionId === null || suppressionId === undefined) {
180
+ throw new baseapi_1.RequiredError("suppressionId", "deleteSecurityMonitoringSuppression");
181
+ }
182
+ // Path Params
183
+ const localVarPath = "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}".replace("{suppression_id}", encodeURIComponent(String(suppressionId)));
184
+ // Make Request Context
185
+ const requestContext = _config
186
+ .getServer("v2.SecurityMonitoringApi.deleteSecurityMonitoringSuppression")
187
+ .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
188
+ requestContext.setHeaderParam("Accept", "*/*");
189
+ requestContext.setHttpConfig(_config.httpConfig);
190
+ // Apply auth methods
191
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
192
+ "AuthZ",
193
+ "apiKeyAuth",
194
+ "appKeyAuth",
195
+ ]);
196
+ return requestContext;
197
+ });
198
+ }
144
199
  editSecurityMonitoringSignalAssignee(signalId, body, _options) {
145
200
  return __awaiter(this, void 0, void 0, function* () {
146
201
  const _config = _options || this.configuration;
@@ -347,6 +402,30 @@ class SecurityMonitoringApiRequestFactory extends baseapi_1.BaseAPIRequestFactor
347
402
  return requestContext;
348
403
  });
349
404
  }
405
+ getSecurityMonitoringSuppression(suppressionId, _options) {
406
+ return __awaiter(this, void 0, void 0, function* () {
407
+ const _config = _options || this.configuration;
408
+ // verify required parameter 'suppressionId' is not null or undefined
409
+ if (suppressionId === null || suppressionId === undefined) {
410
+ throw new baseapi_1.RequiredError("suppressionId", "getSecurityMonitoringSuppression");
411
+ }
412
+ // Path Params
413
+ const localVarPath = "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}".replace("{suppression_id}", encodeURIComponent(String(suppressionId)));
414
+ // Make Request Context
415
+ const requestContext = _config
416
+ .getServer("v2.SecurityMonitoringApi.getSecurityMonitoringSuppression")
417
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
418
+ requestContext.setHeaderParam("Accept", "application/json");
419
+ requestContext.setHttpConfig(_config.httpConfig);
420
+ // Apply auth methods
421
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
422
+ "AuthZ",
423
+ "apiKeyAuth",
424
+ "appKeyAuth",
425
+ ]);
426
+ return requestContext;
427
+ });
428
+ }
350
429
  listFindings(pageLimit, snapshotTimestamp, pageCursor, filterTags, filterEvaluationChangedAt, filterMuted, filterRuleId, filterRuleName, filterResourceType, filterDiscoveryTimestamp, filterEvaluation, filterStatus, _options) {
351
430
  return __awaiter(this, void 0, void 0, function* () {
352
431
  const _config = _options || this.configuration;
@@ -494,6 +573,26 @@ class SecurityMonitoringApiRequestFactory extends baseapi_1.BaseAPIRequestFactor
494
573
  return requestContext;
495
574
  });
496
575
  }
576
+ listSecurityMonitoringSuppressions(_options) {
577
+ return __awaiter(this, void 0, void 0, function* () {
578
+ const _config = _options || this.configuration;
579
+ // Path Params
580
+ const localVarPath = "/api/v2/security_monitoring/configuration/suppressions";
581
+ // Make Request Context
582
+ const requestContext = _config
583
+ .getServer("v2.SecurityMonitoringApi.listSecurityMonitoringSuppressions")
584
+ .makeRequestContext(localVarPath, http_1.HttpMethod.GET);
585
+ requestContext.setHeaderParam("Accept", "application/json");
586
+ requestContext.setHttpConfig(_config.httpConfig);
587
+ // Apply auth methods
588
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
589
+ "AuthZ",
590
+ "apiKeyAuth",
591
+ "appKeyAuth",
592
+ ]);
593
+ return requestContext;
594
+ });
595
+ }
497
596
  muteFindings(body, _options) {
498
597
  return __awaiter(this, void 0, void 0, function* () {
499
598
  const _config = _options || this.configuration;
@@ -625,6 +724,41 @@ class SecurityMonitoringApiRequestFactory extends baseapi_1.BaseAPIRequestFactor
625
724
  return requestContext;
626
725
  });
627
726
  }
727
+ updateSecurityMonitoringSuppression(suppressionId, body, _options) {
728
+ return __awaiter(this, void 0, void 0, function* () {
729
+ const _config = _options || this.configuration;
730
+ // verify required parameter 'suppressionId' is not null or undefined
731
+ if (suppressionId === null || suppressionId === undefined) {
732
+ throw new baseapi_1.RequiredError("suppressionId", "updateSecurityMonitoringSuppression");
733
+ }
734
+ // verify required parameter 'body' is not null or undefined
735
+ if (body === null || body === undefined) {
736
+ throw new baseapi_1.RequiredError("body", "updateSecurityMonitoringSuppression");
737
+ }
738
+ // Path Params
739
+ const localVarPath = "/api/v2/security_monitoring/configuration/suppressions/{suppression_id}".replace("{suppression_id}", encodeURIComponent(String(suppressionId)));
740
+ // Make Request Context
741
+ const requestContext = _config
742
+ .getServer("v2.SecurityMonitoringApi.updateSecurityMonitoringSuppression")
743
+ .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
744
+ requestContext.setHeaderParam("Accept", "application/json");
745
+ requestContext.setHttpConfig(_config.httpConfig);
746
+ // Body Params
747
+ const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
748
+ "application/json",
749
+ ]);
750
+ requestContext.setHeaderParam("Content-Type", contentType);
751
+ const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "SecurityMonitoringSuppressionUpdateRequest", ""), contentType);
752
+ requestContext.setBody(serializedBody);
753
+ // Apply auth methods
754
+ (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
755
+ "AuthZ",
756
+ "apiKeyAuth",
757
+ "appKeyAuth",
758
+ ]);
759
+ return requestContext;
760
+ });
761
+ }
628
762
  }
629
763
  exports.SecurityMonitoringApiRequestFactory = SecurityMonitoringApiRequestFactory;
630
764
  class SecurityMonitoringApiResponseProcessor {
@@ -703,6 +837,44 @@ class SecurityMonitoringApiResponseProcessor {
703
837
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
704
838
  });
705
839
  }
840
+ /**
841
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
842
+ * to the expected objects
843
+ *
844
+ * @params response Response returned by the server for a request to createSecurityMonitoringSuppression
845
+ * @throws ApiException if the response code was not in [200, 299]
846
+ */
847
+ createSecurityMonitoringSuppression(response) {
848
+ return __awaiter(this, void 0, void 0, function* () {
849
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
850
+ if (response.httpStatusCode == 200) {
851
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse");
852
+ return body;
853
+ }
854
+ if (response.httpStatusCode == 400 ||
855
+ response.httpStatusCode == 403 ||
856
+ response.httpStatusCode == 409 ||
857
+ response.httpStatusCode == 429) {
858
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
859
+ let body;
860
+ try {
861
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
862
+ }
863
+ catch (error) {
864
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
865
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
866
+ }
867
+ throw new exception_1.ApiException(response.httpStatusCode, body);
868
+ }
869
+ // Work around for missing responses in specification, e.g. for petstore.yaml
870
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
871
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse", "");
872
+ return body;
873
+ }
874
+ const body = (yield response.body.text()) || "";
875
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
876
+ });
877
+ }
706
878
  /**
707
879
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
708
880
  * to the expected objects
@@ -775,6 +947,42 @@ class SecurityMonitoringApiResponseProcessor {
775
947
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
776
948
  });
777
949
  }
950
+ /**
951
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
952
+ * to the expected objects
953
+ *
954
+ * @params response Response returned by the server for a request to deleteSecurityMonitoringSuppression
955
+ * @throws ApiException if the response code was not in [200, 299]
956
+ */
957
+ deleteSecurityMonitoringSuppression(response) {
958
+ return __awaiter(this, void 0, void 0, function* () {
959
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
960
+ if (response.httpStatusCode == 204) {
961
+ return;
962
+ }
963
+ if (response.httpStatusCode == 403 ||
964
+ response.httpStatusCode == 404 ||
965
+ response.httpStatusCode == 429) {
966
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
967
+ let body;
968
+ try {
969
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
970
+ }
971
+ catch (error) {
972
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
973
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
974
+ }
975
+ throw new exception_1.ApiException(response.httpStatusCode, body);
976
+ }
977
+ // Work around for missing responses in specification, e.g. for petstore.yaml
978
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
979
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "void", "");
980
+ return body;
981
+ }
982
+ const body = (yield response.body.text()) || "";
983
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
984
+ });
985
+ }
778
986
  /**
779
987
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
780
988
  * to the expected objects
@@ -1034,6 +1242,43 @@ class SecurityMonitoringApiResponseProcessor {
1034
1242
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1035
1243
  });
1036
1244
  }
1245
+ /**
1246
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
1247
+ * to the expected objects
1248
+ *
1249
+ * @params response Response returned by the server for a request to getSecurityMonitoringSuppression
1250
+ * @throws ApiException if the response code was not in [200, 299]
1251
+ */
1252
+ getSecurityMonitoringSuppression(response) {
1253
+ return __awaiter(this, void 0, void 0, function* () {
1254
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1255
+ if (response.httpStatusCode == 200) {
1256
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse");
1257
+ return body;
1258
+ }
1259
+ if (response.httpStatusCode == 403 ||
1260
+ response.httpStatusCode == 404 ||
1261
+ response.httpStatusCode == 429) {
1262
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
1263
+ let body;
1264
+ try {
1265
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
1266
+ }
1267
+ catch (error) {
1268
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
1269
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
1270
+ }
1271
+ throw new exception_1.ApiException(response.httpStatusCode, body);
1272
+ }
1273
+ // Work around for missing responses in specification, e.g. for petstore.yaml
1274
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1275
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse", "");
1276
+ return body;
1277
+ }
1278
+ const body = (yield response.body.text()) || "";
1279
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1280
+ });
1281
+ }
1037
1282
  /**
1038
1283
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
1039
1284
  * to the expected objects
@@ -1179,6 +1424,41 @@ class SecurityMonitoringApiResponseProcessor {
1179
1424
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1180
1425
  });
1181
1426
  }
1427
+ /**
1428
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
1429
+ * to the expected objects
1430
+ *
1431
+ * @params response Response returned by the server for a request to listSecurityMonitoringSuppressions
1432
+ * @throws ApiException if the response code was not in [200, 299]
1433
+ */
1434
+ listSecurityMonitoringSuppressions(response) {
1435
+ return __awaiter(this, void 0, void 0, function* () {
1436
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1437
+ if (response.httpStatusCode == 200) {
1438
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionsResponse");
1439
+ return body;
1440
+ }
1441
+ if (response.httpStatusCode == 403 || response.httpStatusCode == 429) {
1442
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
1443
+ let body;
1444
+ try {
1445
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
1446
+ }
1447
+ catch (error) {
1448
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
1449
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
1450
+ }
1451
+ throw new exception_1.ApiException(response.httpStatusCode, body);
1452
+ }
1453
+ // Work around for missing responses in specification, e.g. for petstore.yaml
1454
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1455
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionsResponse", "");
1456
+ return body;
1457
+ }
1458
+ const body = (yield response.body.text()) || "";
1459
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1460
+ });
1461
+ }
1182
1462
  /**
1183
1463
  * Unwraps the actual response sent by the server from the response context and deserializes the response content
1184
1464
  * to the expected objects
@@ -1333,6 +1613,45 @@ class SecurityMonitoringApiResponseProcessor {
1333
1613
  throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1334
1614
  });
1335
1615
  }
1616
+ /**
1617
+ * Unwraps the actual response sent by the server from the response context and deserializes the response content
1618
+ * to the expected objects
1619
+ *
1620
+ * @params response Response returned by the server for a request to updateSecurityMonitoringSuppression
1621
+ * @throws ApiException if the response code was not in [200, 299]
1622
+ */
1623
+ updateSecurityMonitoringSuppression(response) {
1624
+ return __awaiter(this, void 0, void 0, function* () {
1625
+ const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
1626
+ if (response.httpStatusCode == 200) {
1627
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse");
1628
+ return body;
1629
+ }
1630
+ if (response.httpStatusCode == 400 ||
1631
+ response.httpStatusCode == 403 ||
1632
+ response.httpStatusCode == 404 ||
1633
+ response.httpStatusCode == 409 ||
1634
+ response.httpStatusCode == 429) {
1635
+ const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
1636
+ let body;
1637
+ try {
1638
+ body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
1639
+ }
1640
+ catch (error) {
1641
+ logger_1.logger.info(`Got error deserializing error: ${error}`);
1642
+ throw new exception_1.ApiException(response.httpStatusCode, bodyText);
1643
+ }
1644
+ throw new exception_1.ApiException(response.httpStatusCode, body);
1645
+ }
1646
+ // Work around for missing responses in specification, e.g. for petstore.yaml
1647
+ if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
1648
+ const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "SecurityMonitoringSuppressionResponse", "");
1649
+ return body;
1650
+ }
1651
+ const body = (yield response.body.text()) || "";
1652
+ throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
1653
+ });
1654
+ }
1336
1655
  }
1337
1656
  exports.SecurityMonitoringApiResponseProcessor = SecurityMonitoringApiResponseProcessor;
1338
1657
  class SecurityMonitoringApi {
@@ -1374,6 +1693,20 @@ class SecurityMonitoringApi {
1374
1693
  });
1375
1694
  });
1376
1695
  }
1696
+ /**
1697
+ * Create a new suppression rule.
1698
+ * @param param The request object
1699
+ */
1700
+ createSecurityMonitoringSuppression(param, options) {
1701
+ const requestContextPromise = this.requestFactory.createSecurityMonitoringSuppression(param.body, options);
1702
+ return requestContextPromise.then((requestContext) => {
1703
+ return this.configuration.httpApi
1704
+ .send(requestContext)
1705
+ .then((responseContext) => {
1706
+ return this.responseProcessor.createSecurityMonitoringSuppression(responseContext);
1707
+ });
1708
+ });
1709
+ }
1377
1710
  /**
1378
1711
  * Delete a specific security filter.
1379
1712
  * @param param The request object
@@ -1402,6 +1735,20 @@ class SecurityMonitoringApi {
1402
1735
  });
1403
1736
  });
1404
1737
  }
1738
+ /**
1739
+ * Delete a specific suppression rule.
1740
+ * @param param The request object
1741
+ */
1742
+ deleteSecurityMonitoringSuppression(param, options) {
1743
+ const requestContextPromise = this.requestFactory.deleteSecurityMonitoringSuppression(param.suppressionId, options);
1744
+ return requestContextPromise.then((requestContext) => {
1745
+ return this.configuration.httpApi
1746
+ .send(requestContext)
1747
+ .then((responseContext) => {
1748
+ return this.responseProcessor.deleteSecurityMonitoringSuppression(responseContext);
1749
+ });
1750
+ });
1751
+ }
1405
1752
  /**
1406
1753
  * Modify the triage assignee of a security signal.
1407
1754
  * @param param The request object
@@ -1503,6 +1850,20 @@ class SecurityMonitoringApi {
1503
1850
  });
1504
1851
  });
1505
1852
  }
1853
+ /**
1854
+ * Get the details of a specific suppression rule.
1855
+ * @param param The request object
1856
+ */
1857
+ getSecurityMonitoringSuppression(param, options) {
1858
+ const requestContextPromise = this.requestFactory.getSecurityMonitoringSuppression(param.suppressionId, options);
1859
+ return requestContextPromise.then((requestContext) => {
1860
+ return this.configuration.httpApi
1861
+ .send(requestContext)
1862
+ .then((responseContext) => {
1863
+ return this.responseProcessor.getSecurityMonitoringSuppression(responseContext);
1864
+ });
1865
+ });
1866
+ }
1506
1867
  /**
1507
1868
  * Get a list of CSPM findings.
1508
1869
  *
@@ -1672,6 +2033,20 @@ class SecurityMonitoringApi {
1672
2033
  }
1673
2034
  });
1674
2035
  }
2036
+ /**
2037
+ * Get the list of all suppression rules.
2038
+ * @param param The request object
2039
+ */
2040
+ listSecurityMonitoringSuppressions(options) {
2041
+ const requestContextPromise = this.requestFactory.listSecurityMonitoringSuppressions(options);
2042
+ return requestContextPromise.then((requestContext) => {
2043
+ return this.configuration.httpApi
2044
+ .send(requestContext)
2045
+ .then((responseContext) => {
2046
+ return this.responseProcessor.listSecurityMonitoringSuppressions(responseContext);
2047
+ });
2048
+ });
2049
+ }
1675
2050
  /**
1676
2051
  * Mute or unmute findings.
1677
2052
  * @param param The request object
@@ -1780,6 +2155,20 @@ class SecurityMonitoringApi {
1780
2155
  });
1781
2156
  });
1782
2157
  }
2158
+ /**
2159
+ * Update a specific suppression rule.
2160
+ * @param param The request object
2161
+ */
2162
+ updateSecurityMonitoringSuppression(param, options) {
2163
+ const requestContextPromise = this.requestFactory.updateSecurityMonitoringSuppression(param.suppressionId, param.body, options);
2164
+ return requestContextPromise.then((requestContext) => {
2165
+ return this.configuration.httpApi
2166
+ .send(requestContext)
2167
+ .then((responseContext) => {
2168
+ return this.responseProcessor.updateSecurityMonitoringSuppression(responseContext);
2169
+ });
2170
+ });
2171
+ }
1783
2172
  }
1784
2173
  exports.SecurityMonitoringApi = SecurityMonitoringApi;
1785
2174
  //# sourceMappingURL=SecurityMonitoringApi.js.map