From 084d78d064166fc6b4f15db97d0c98d1a42f9dc5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 24 Oct 2025 14:48:14 +0000 Subject: [PATCH] Regenerate client from commit 31d12b4 of spec repo --- .generator/schemas/v2/openapi.yaml | 319 ++++++++++++++++++ .../CreateSCAResolveVulnerableSymbols.ts | 29 ++ .../v2/static-analysis/CreateSCAResult.ts | 67 ++++ features/support/scenarios_model_mapping.ts | 14 + features/v2/static_analysis.feature | 24 ++ features/v2/undo.json | 12 + .../configuration.ts | 2 + .../apis/StaticAnalysisApi.ts | 305 +++++++++++++++++ packages/datadog-api-client-v2/index.ts | 32 ++ .../models/ObjectSerializer.ts | 66 ++++ .../models/ResolveVulnerableSymbolsRequest.ts | 47 +++ .../ResolveVulnerableSymbolsRequestData.ts | 59 ++++ ...eVulnerableSymbolsRequestDataAttributes.ts | 46 +++ ...ResolveVulnerableSymbolsRequestDataType.ts | 13 + .../ResolveVulnerableSymbolsResponse.ts | 47 +++ .../ResolveVulnerableSymbolsResponseData.ts | 59 ++++ ...VulnerableSymbolsResponseDataAttributes.ts | 47 +++ ...esolveVulnerableSymbolsResponseDataType.ts | 13 + ...ResolveVulnerableSymbolsResponseResults.ts | 52 +++ ...SymbolsResponseResultsVulnerableSymbols.ts | 52 +++ ...ResponseResultsVulnerableSymbolsSymbols.ts | 56 +++ .../models/ScaRequest.ts | 47 +++ .../models/ScaRequestData.ts | 59 ++++ .../models/ScaRequestDataAttributes.ts | 92 +++++ .../models/ScaRequestDataAttributesCommit.ts | 76 +++++ ...aRequestDataAttributesDependenciesItems.ts | 98 ++++++ ...tributesDependenciesItemsLocationsItems.ts | 62 ++++ ...ndenciesItemsLocationsItemsFilePosition.ts | 57 ++++ ...DependenciesItemsLocationsItemsPosition.ts | 53 +++ ...ciesItemsReachableSymbolPropertiesItems.ts | 51 +++ .../ScaRequestDataAttributesFilesItems.ts | 51 +++ .../ScaRequestDataAttributesRelationsItems.ts | 51 +++ .../ScaRequestDataAttributesRepository.ts | 46 +++ ...questDataAttributesVulnerabilitiesItems.ts | 57 ++++ ...ributesVulnerabilitiesItemsAffectsItems.ts | 46 +++ .../models/ScaRequestDataType.ts | 10 + 36 files changed, 2217 insertions(+) create mode 100644 examples/v2/static-analysis/CreateSCAResolveVulnerableSymbols.ts create mode 100644 examples/v2/static-analysis/CreateSCAResult.ts create mode 100644 features/v2/static_analysis.feature create mode 100644 packages/datadog-api-client-v2/apis/StaticAnalysisApi.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataType.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseData.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataType.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResults.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols.ts create mode 100644 packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestData.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesCommit.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesFilesItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesRelationsItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesRepository.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.ts create mode 100644 packages/datadog-api-client-v2/models/ScaRequestDataType.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2c64bbd7a3fb..8477f098853a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -39409,6 +39409,95 @@ components: type: string x-enum-varnames: - RULESET + ResolveVulnerableSymbolsRequest: + properties: + data: + $ref: '#/components/schemas/ResolveVulnerableSymbolsRequestData' + type: object + ResolveVulnerableSymbolsRequestData: + properties: + attributes: + $ref: '#/components/schemas/ResolveVulnerableSymbolsRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ResolveVulnerableSymbolsRequestDataType' + required: + - type + type: object + ResolveVulnerableSymbolsRequestDataAttributes: + properties: + purls: + items: + type: string + type: array + type: object + ResolveVulnerableSymbolsRequestDataType: + default: resolve-vulnerable-symbols-request + enum: + - resolve-vulnerable-symbols-request + example: resolve-vulnerable-symbols-request + type: string + x-enum-varnames: + - RESOLVE_VULNERABLE_SYMBOLS_REQUEST + ResolveVulnerableSymbolsResponse: + properties: + data: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseData' + type: object + ResolveVulnerableSymbolsResponseData: + properties: + attributes: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseDataType' + required: + - type + type: object + ResolveVulnerableSymbolsResponseDataAttributes: + properties: + results: + items: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResults' + type: array + type: object + ResolveVulnerableSymbolsResponseDataType: + default: resolve-vulnerable-symbols-response + enum: + - resolve-vulnerable-symbols-response + example: resolve-vulnerable-symbols-response + type: string + x-enum-varnames: + - RESOLVE_VULNERABLE_SYMBOLS_RESPONSE + ResolveVulnerableSymbolsResponseResults: + properties: + purl: + type: string + vulnerable_symbols: + items: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols' + type: array + type: object + ResolveVulnerableSymbolsResponseResultsVulnerableSymbols: + properties: + advisory_id: + type: string + symbols: + items: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols' + type: array + type: object + ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object ResourceFilterAttributes: description: Attributes of a resource filter. example: @@ -41843,6 +41932,184 @@ components: example: report_id type: string type: object + ScaRequest: + properties: + data: + $ref: '#/components/schemas/ScaRequestData' + type: object + ScaRequestData: + properties: + attributes: + $ref: '#/components/schemas/ScaRequestDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ScaRequestDataType' + required: + - type + type: object + ScaRequestDataAttributes: + properties: + commit: + $ref: '#/components/schemas/ScaRequestDataAttributesCommit' + dependencies: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItems' + type: array + env: + type: string + files: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesFilesItems' + type: array + relations: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesRelationsItems' + type: array + repository: + $ref: '#/components/schemas/ScaRequestDataAttributesRepository' + service: + type: string + tags: + additionalProperties: + type: string + type: object + vulnerabilities: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesVulnerabilitiesItems' + type: array + type: object + ScaRequestDataAttributesCommit: + properties: + author_date: + type: string + author_email: + type: string + author_name: + type: string + branch: + type: string + committer_email: + type: string + committer_name: + type: string + sha: + type: string + type: object + ScaRequestDataAttributesDependenciesItems: + properties: + exclusions: + items: + type: string + type: array + group: + type: string + is_dev: + type: boolean + is_direct: + type: boolean + language: + type: string + locations: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems' + type: array + name: + type: string + package_manager: + type: string + purl: + type: string + reachable_symbol_properties: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems' + type: array + version: + type: string + type: object + ScaRequestDataAttributesDependenciesItemsLocationsItems: + properties: + block: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition' + name: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition' + namespace: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition' + version: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition' + type: object + ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition: + properties: + end: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition' + file_name: + type: string + start: + $ref: '#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition' + type: object + ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition: + properties: + col: + format: int32 + maximum: 2147483647 + type: integer + line: + format: int32 + maximum: 2147483647 + type: integer + type: object + ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems: + properties: + name: + type: string + value: + type: string + type: object + ScaRequestDataAttributesFilesItems: + properties: + name: + type: string + purl: + type: string + type: object + ScaRequestDataAttributesRelationsItems: + properties: + depends_on: + items: + type: string + type: array + ref: + type: string + type: object + ScaRequestDataAttributesRepository: + properties: + url: + type: string + type: object + ScaRequestDataAttributesVulnerabilitiesItems: + properties: + affects: + items: + $ref: '#/components/schemas/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems' + type: array + bom_ref: + type: string + id: + type: string + type: object + ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems: + properties: + ref: + type: string + type: object + ScaRequestDataType: + default: scarequests + enum: + - scarequests + example: scarequests + type: string + x-enum-varnames: + - SCAREQUESTS ScalarColumn: description: A single column in a scalar query response. oneOf: @@ -76995,6 +77262,56 @@ paths: cursorPath: meta.page.after limitParam: body.data.attributes.page.limit resultsPath: data + /api/v2/static-analysis-sca/dependencies: + post: + operationId: CreateSCAResult + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ScaRequest' + required: true + responses: + '200': + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: Post dependencies for analysis + tags: + - Static Analysis + x-unstable: '**Note**: This endpoint may be subject to changes.' + /api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols: + post: + operationId: CreateSCAResolveVulnerableSymbols + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResolveVulnerableSymbolsRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ResolveVulnerableSymbolsResponse' + description: OK + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: POST request to resolve vulnerable symbols + tags: + - Static Analysis + x-unstable: '**Note**: This endpoint may be subject to changes.' /api/v2/synthetics/settings/on_demand_concurrency_cap: get: description: Get the on-demand concurrency cap. @@ -80526,6 +80843,8 @@ tags: description: Find out more at url: https://docs.datadoghq.com/tracing/metrics/metrics_namespace/ name: Spans Metrics +- description: API for static analysis + name: Static Analysis - description: "Datadog Synthetics uses simulated user requests and browser rendering to help you ensure uptime,\nidentify regional issues, and track your application performance. Datadog Synthetics tests come in\ntwo different flavors, [API tests](https://docs.datadoghq.com/synthetics/api_tests/)\nand diff --git a/examples/v2/static-analysis/CreateSCAResolveVulnerableSymbols.ts b/examples/v2/static-analysis/CreateSCAResolveVulnerableSymbols.ts new file mode 100644 index 000000000000..858d5d4f7737 --- /dev/null +++ b/examples/v2/static-analysis/CreateSCAResolveVulnerableSymbols.ts @@ -0,0 +1,29 @@ +/** + * POST request to resolve vulnerable symbols returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createSCAResolveVulnerableSymbols"] = true; +const apiInstance = new v2.StaticAnalysisApi(configuration); + +const params: v2.StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest = { + body: { + data: { + attributes: { + purls: [], + }, + type: "resolve-vulnerable-symbols-request", + }, + }, +}; + +apiInstance + .createSCAResolveVulnerableSymbols(params) + .then((data: v2.ResolveVulnerableSymbolsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/static-analysis/CreateSCAResult.ts b/examples/v2/static-analysis/CreateSCAResult.ts new file mode 100644 index 000000000000..a07c78b564a2 --- /dev/null +++ b/examples/v2/static-analysis/CreateSCAResult.ts @@ -0,0 +1,67 @@ +/** + * Post dependencies for analysis returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createSCAResult"] = true; +const apiInstance = new v2.StaticAnalysisApi(configuration); + +const params: v2.StaticAnalysisApiCreateSCAResultRequest = { + body: { + data: { + attributes: { + commit: {}, + dependencies: [ + { + exclusions: [], + locations: [ + { + block: { + end: {}, + start: {}, + }, + name: { + end: {}, + start: {}, + }, + namespace: { + end: {}, + start: {}, + }, + version: { + end: {}, + start: {}, + }, + }, + ], + reachableSymbolProperties: [{}], + }, + ], + files: [{}], + relations: [ + { + dependsOn: [], + }, + ], + repository: {}, + vulnerabilities: [ + { + affects: [{}], + }, + ], + }, + type: "scarequests", + }, + }, +}; + +apiInstance + .createSCAResult(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 81fa4d1b3711..3b7897602472 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -8449,6 +8449,20 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "SpansListResponse", }, + "v2.CreateSCAResult": { + "body": { + "type": "ScaRequest", + "format": "", + }, + "operationResponseType": "{}", + }, + "v2.CreateSCAResolveVulnerableSymbols": { + "body": { + "type": "ResolveVulnerableSymbolsRequest", + "format": "", + }, + "operationResponseType": "ResolveVulnerableSymbolsResponse", + }, "v2.GetOnDemandConcurrencyCap": { "operationResponseType": "OnDemandConcurrencyCapResponse", }, diff --git a/features/v2/static_analysis.feature b/features/v2/static_analysis.feature new file mode 100644 index 000000000000..85bf4d83ae13 --- /dev/null +++ b/features/v2/static_analysis.feature @@ -0,0 +1,24 @@ +@endpoint(static-analysis) @endpoint(static-analysis-v2) +Feature: Static Analysis + API for static analysis + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "StaticAnalysis" API + + @generated @skip @team:DataDog/k9-vm-sca + Scenario: POST request to resolve vulnerable symbols returns "OK" response + Given operation "CreateSCAResolveVulnerableSymbols" enabled + And new "CreateSCAResolveVulnerableSymbols" request + And body with value {"data": {"attributes": {"purls": []}, "type": "resolve-vulnerable-symbols-request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Post dependencies for analysis returns "OK" response + Given operation "CreateSCAResult" enabled + And new "CreateSCAResult" request + And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index bb35cea36c2e..5f2144f5fb2d 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3993,6 +3993,18 @@ "type": "safe" } }, + "CreateSCAResult": { + "tag": "Static Analysis", + "undo": { + "type": "safe" + } + }, + "CreateSCAResolveVulnerableSymbols": { + "tag": "Static Analysis", + "undo": { + "type": "safe" + } + }, "GetOnDemandConcurrencyCap": { "tag": "Synthetics", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 770c0eedfc63..675802ad08f9 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -324,6 +324,8 @@ export function createConfiguration( "v2.getSLOReport": false, "v2.getSLOReportJobStatus": false, "v2.getSPARecommendations": false, + "v2.createSCAResolveVulnerableSymbols": false, + "v2.createSCAResult": false, "v2.addMemberTeam": false, "v2.listMemberTeams": false, "v2.removeMemberTeam": false, diff --git a/packages/datadog-api-client-v2/apis/StaticAnalysisApi.ts b/packages/datadog-api-client-v2/apis/StaticAnalysisApi.ts new file mode 100644 index 000000000000..1f571ec63941 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/StaticAnalysisApi.ts @@ -0,0 +1,305 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { ResolveVulnerableSymbolsRequest } from "../models/ResolveVulnerableSymbolsRequest"; +import { ResolveVulnerableSymbolsResponse } from "../models/ResolveVulnerableSymbolsResponse"; +import { ScaRequest } from "../models/ScaRequest"; + +export class StaticAnalysisApiRequestFactory extends BaseAPIRequestFactory { + public async createSCAResolveVulnerableSymbols( + body: ResolveVulnerableSymbolsRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createSCAResolveVulnerableSymbols'"); + if (!_config.unstableOperations["v2.createSCAResolveVulnerableSymbols"]) { + throw new Error( + "Unstable operation 'createSCAResolveVulnerableSymbols' is disabled" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createSCAResolveVulnerableSymbols"); + } + + // Path Params + const localVarPath = + "/api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols"; + + // Make Request Context + const requestContext = _config + .getServer("v2.StaticAnalysisApi.createSCAResolveVulnerableSymbols") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ResolveVulnerableSymbolsRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async createSCAResult( + body: ScaRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createSCAResult'"); + if (!_config.unstableOperations["v2.createSCAResult"]) { + throw new Error("Unstable operation 'createSCAResult' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createSCAResult"); + } + + // Path Params + const localVarPath = "/api/v2/static-analysis-sca/dependencies"; + + // Make Request Context + const requestContext = _config + .getServer("v2.StaticAnalysisApi.createSCAResult") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ScaRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class StaticAnalysisApiResponseProcessor { + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSCAResolveVulnerableSymbols + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSCAResolveVulnerableSymbols( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: ResolveVulnerableSymbolsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResolveVulnerableSymbolsResponse" + ) as ResolveVulnerableSymbolsResponse; + return body; + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ResolveVulnerableSymbolsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ResolveVulnerableSymbolsResponse", + "" + ) as ResolveVulnerableSymbolsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to createSCAResult + * @throws ApiException if the response code was not in [200, 299] + */ + public async createSCAResult(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + return; + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest { + /** + * @type ResolveVulnerableSymbolsRequest + */ + body: ResolveVulnerableSymbolsRequest; +} + +export interface StaticAnalysisApiCreateSCAResultRequest { + /** + * @type ScaRequest + */ + body: ScaRequest; +} + +export class StaticAnalysisApi { + private requestFactory: StaticAnalysisApiRequestFactory; + private responseProcessor: StaticAnalysisApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: StaticAnalysisApiRequestFactory, + responseProcessor?: StaticAnalysisApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new StaticAnalysisApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new StaticAnalysisApiResponseProcessor(); + } + + /** + * @param param The request object + */ + public createSCAResolveVulnerableSymbols( + param: StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createSCAResolveVulnerableSymbols( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createSCAResolveVulnerableSymbols( + responseContext + ); + }); + }); + } + + /** + * @param param The request object + */ + public createSCAResult( + param: StaticAnalysisApiCreateSCAResultRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createSCAResult( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createSCAResult(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 28929834515c..0aceeaa4813f 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -815,6 +815,12 @@ export { SpansMetricsApi, } from "./apis/SpansMetricsApi"; +export { + StaticAnalysisApiCreateSCAResolveVulnerableSymbolsRequest, + StaticAnalysisApiCreateSCAResultRequest, + StaticAnalysisApi, +} from "./apis/StaticAnalysisApi"; + export { SyntheticsApiSetOnDemandConcurrencyCapRequest, SyntheticsApi, @@ -3301,6 +3307,17 @@ export { ReorderRuleResourceDataType } from "./models/ReorderRuleResourceDataTyp export { ReorderRulesetResourceArray } from "./models/ReorderRulesetResourceArray"; export { ReorderRulesetResourceData } from "./models/ReorderRulesetResourceData"; export { ReorderRulesetResourceDataType } from "./models/ReorderRulesetResourceDataType"; +export { ResolveVulnerableSymbolsRequest } from "./models/ResolveVulnerableSymbolsRequest"; +export { ResolveVulnerableSymbolsRequestData } from "./models/ResolveVulnerableSymbolsRequestData"; +export { ResolveVulnerableSymbolsRequestDataAttributes } from "./models/ResolveVulnerableSymbolsRequestDataAttributes"; +export { ResolveVulnerableSymbolsRequestDataType } from "./models/ResolveVulnerableSymbolsRequestDataType"; +export { ResolveVulnerableSymbolsResponse } from "./models/ResolveVulnerableSymbolsResponse"; +export { ResolveVulnerableSymbolsResponseData } from "./models/ResolveVulnerableSymbolsResponseData"; +export { ResolveVulnerableSymbolsResponseDataAttributes } from "./models/ResolveVulnerableSymbolsResponseDataAttributes"; +export { ResolveVulnerableSymbolsResponseDataType } from "./models/ResolveVulnerableSymbolsResponseDataType"; +export { ResolveVulnerableSymbolsResponseResults } from "./models/ResolveVulnerableSymbolsResponseResults"; +export { ResolveVulnerableSymbolsResponseResultsVulnerableSymbols } from "./models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols"; +export { ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols } from "./models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols"; export { ResourceFilterAttributes } from "./models/ResourceFilterAttributes"; export { ResourceFilterRequestType } from "./models/ResourceFilterRequestType"; export { ResponseMetaAttributes } from "./models/ResponseMetaAttributes"; @@ -3522,6 +3539,21 @@ export { ScannedAssetMetadataAsset } from "./models/ScannedAssetMetadataAsset"; export { ScannedAssetMetadataAttributes } from "./models/ScannedAssetMetadataAttributes"; export { ScannedAssetMetadataLastSuccess } from "./models/ScannedAssetMetadataLastSuccess"; export { ScannedAssetsMetadata } from "./models/ScannedAssetsMetadata"; +export { ScaRequest } from "./models/ScaRequest"; +export { ScaRequestData } from "./models/ScaRequestData"; +export { ScaRequestDataAttributes } from "./models/ScaRequestDataAttributes"; +export { ScaRequestDataAttributesCommit } from "./models/ScaRequestDataAttributesCommit"; +export { ScaRequestDataAttributesDependenciesItems } from "./models/ScaRequestDataAttributesDependenciesItems"; +export { ScaRequestDataAttributesDependenciesItemsLocationsItems } from "./models/ScaRequestDataAttributesDependenciesItemsLocationsItems"; +export { ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition } from "./models/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"; +export { ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition } from "./models/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"; +export { ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems } from "./models/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems"; +export { ScaRequestDataAttributesFilesItems } from "./models/ScaRequestDataAttributesFilesItems"; +export { ScaRequestDataAttributesRelationsItems } from "./models/ScaRequestDataAttributesRelationsItems"; +export { ScaRequestDataAttributesRepository } from "./models/ScaRequestDataAttributesRepository"; +export { ScaRequestDataAttributesVulnerabilitiesItems } from "./models/ScaRequestDataAttributesVulnerabilitiesItems"; +export { ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems } from "./models/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems"; +export { ScaRequestDataType } from "./models/ScaRequestDataType"; export { Schedule } from "./models/Schedule"; export { ScheduleCreateRequest } from "./models/ScheduleCreateRequest"; export { ScheduleCreateRequestData } from "./models/ScheduleCreateRequestData"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 5dc075eabb02..e6932296f1cd 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1819,6 +1819,15 @@ import { ReorderRuleResourceArray } from "./ReorderRuleResourceArray"; import { ReorderRuleResourceData } from "./ReorderRuleResourceData"; import { ReorderRulesetResourceArray } from "./ReorderRulesetResourceArray"; import { ReorderRulesetResourceData } from "./ReorderRulesetResourceData"; +import { ResolveVulnerableSymbolsRequest } from "./ResolveVulnerableSymbolsRequest"; +import { ResolveVulnerableSymbolsRequestData } from "./ResolveVulnerableSymbolsRequestData"; +import { ResolveVulnerableSymbolsRequestDataAttributes } from "./ResolveVulnerableSymbolsRequestDataAttributes"; +import { ResolveVulnerableSymbolsResponse } from "./ResolveVulnerableSymbolsResponse"; +import { ResolveVulnerableSymbolsResponseData } from "./ResolveVulnerableSymbolsResponseData"; +import { ResolveVulnerableSymbolsResponseDataAttributes } from "./ResolveVulnerableSymbolsResponseDataAttributes"; +import { ResolveVulnerableSymbolsResponseResults } from "./ResolveVulnerableSymbolsResponseResults"; +import { ResolveVulnerableSymbolsResponseResultsVulnerableSymbols } from "./ResolveVulnerableSymbolsResponseResultsVulnerableSymbols"; +import { ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols } from "./ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols"; import { ResourceFilterAttributes } from "./ResourceFilterAttributes"; import { ResponseMetaAttributes } from "./ResponseMetaAttributes"; import { RestrictionPolicy } from "./RestrictionPolicy"; @@ -1946,6 +1955,20 @@ import { SLOReportPostResponseData } from "./SLOReportPostResponseData"; import { SLOReportStatusGetResponse } from "./SLOReportStatusGetResponse"; import { SLOReportStatusGetResponseAttributes } from "./SLOReportStatusGetResponseAttributes"; import { SLOReportStatusGetResponseData } from "./SLOReportStatusGetResponseData"; +import { ScaRequest } from "./ScaRequest"; +import { ScaRequestData } from "./ScaRequestData"; +import { ScaRequestDataAttributes } from "./ScaRequestDataAttributes"; +import { ScaRequestDataAttributesCommit } from "./ScaRequestDataAttributesCommit"; +import { ScaRequestDataAttributesDependenciesItems } from "./ScaRequestDataAttributesDependenciesItems"; +import { ScaRequestDataAttributesDependenciesItemsLocationsItems } from "./ScaRequestDataAttributesDependenciesItemsLocationsItems"; +import { ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition } from "./ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"; +import { ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition } from "./ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"; +import { ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems } from "./ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems"; +import { ScaRequestDataAttributesFilesItems } from "./ScaRequestDataAttributesFilesItems"; +import { ScaRequestDataAttributesRelationsItems } from "./ScaRequestDataAttributesRelationsItems"; +import { ScaRequestDataAttributesRepository } from "./ScaRequestDataAttributesRepository"; +import { ScaRequestDataAttributesVulnerabilitiesItems } from "./ScaRequestDataAttributesVulnerabilitiesItems"; +import { ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems } from "./ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems"; import { ScalarFormulaQueryRequest } from "./ScalarFormulaQueryRequest"; import { ScalarFormulaQueryResponse } from "./ScalarFormulaQueryResponse"; import { ScalarFormulaRequest } from "./ScalarFormulaRequest"; @@ -3572,6 +3595,12 @@ const enumsMap: { [key: string]: any[] } = { ], ReorderRuleResourceDataType: ["arbitrary_rule"], ReorderRulesetResourceDataType: ["ruleset"], + ResolveVulnerableSymbolsRequestDataType: [ + "resolve-vulnerable-symbols-request", + ], + ResolveVulnerableSymbolsResponseDataType: [ + "resolve-vulnerable-symbols-response", + ], ResourceFilterRequestType: ["csm_resource_filter"], RestrictionPolicyType: ["restriction_policy"], RetentionFilterAllType: [ @@ -3673,6 +3702,7 @@ const enumsMap: { [key: string]: any[] } = { "completed_with_errors", "failed", ], + ScaRequestDataType: ["scarequests"], ScalarColumnTypeGroup: ["group"], ScalarColumnTypeNumber: ["number"], ScalarFormulaRequestType: ["scalar_request"], @@ -6210,6 +6240,20 @@ const typeMap: { [index: string]: any } = { ReorderRuleResourceData: ReorderRuleResourceData, ReorderRulesetResourceArray: ReorderRulesetResourceArray, ReorderRulesetResourceData: ReorderRulesetResourceData, + ResolveVulnerableSymbolsRequest: ResolveVulnerableSymbolsRequest, + ResolveVulnerableSymbolsRequestData: ResolveVulnerableSymbolsRequestData, + ResolveVulnerableSymbolsRequestDataAttributes: + ResolveVulnerableSymbolsRequestDataAttributes, + ResolveVulnerableSymbolsResponse: ResolveVulnerableSymbolsResponse, + ResolveVulnerableSymbolsResponseData: ResolveVulnerableSymbolsResponseData, + ResolveVulnerableSymbolsResponseDataAttributes: + ResolveVulnerableSymbolsResponseDataAttributes, + ResolveVulnerableSymbolsResponseResults: + ResolveVulnerableSymbolsResponseResults, + ResolveVulnerableSymbolsResponseResultsVulnerableSymbols: + ResolveVulnerableSymbolsResponseResultsVulnerableSymbols, + ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols: + ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols, ResourceFilterAttributes: ResourceFilterAttributes, ResponseMetaAttributes: ResponseMetaAttributes, RestrictionPolicy: RestrictionPolicy, @@ -6344,6 +6388,28 @@ const typeMap: { [index: string]: any } = { SLOReportStatusGetResponse: SLOReportStatusGetResponse, SLOReportStatusGetResponseAttributes: SLOReportStatusGetResponseAttributes, SLOReportStatusGetResponseData: SLOReportStatusGetResponseData, + ScaRequest: ScaRequest, + ScaRequestData: ScaRequestData, + ScaRequestDataAttributes: ScaRequestDataAttributes, + ScaRequestDataAttributesCommit: ScaRequestDataAttributesCommit, + ScaRequestDataAttributesDependenciesItems: + ScaRequestDataAttributesDependenciesItems, + ScaRequestDataAttributesDependenciesItemsLocationsItems: + ScaRequestDataAttributesDependenciesItemsLocationsItems, + ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition: + ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition, + ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition: + ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition, + ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems: + ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems, + ScaRequestDataAttributesFilesItems: ScaRequestDataAttributesFilesItems, + ScaRequestDataAttributesRelationsItems: + ScaRequestDataAttributesRelationsItems, + ScaRequestDataAttributesRepository: ScaRequestDataAttributesRepository, + ScaRequestDataAttributesVulnerabilitiesItems: + ScaRequestDataAttributesVulnerabilitiesItems, + ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems: + ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems, ScalarFormulaQueryRequest: ScalarFormulaQueryRequest, ScalarFormulaQueryResponse: ScalarFormulaQueryResponse, ScalarFormulaRequest: ScalarFormulaRequest, diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequest.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequest.ts new file mode 100644 index 000000000000..f3c5dab71583 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequest.ts @@ -0,0 +1,47 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsRequestData } from "./ResolveVulnerableSymbolsRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsRequest { + "data"?: ResolveVulnerableSymbolsRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ResolveVulnerableSymbolsRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestData.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestData.ts new file mode 100644 index 000000000000..d9ae59b22897 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestData.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsRequestDataAttributes } from "./ResolveVulnerableSymbolsRequestDataAttributes"; +import { ResolveVulnerableSymbolsRequestDataType } from "./ResolveVulnerableSymbolsRequestDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsRequestData { + "attributes"?: ResolveVulnerableSymbolsRequestDataAttributes; + "id"?: string; + "type": ResolveVulnerableSymbolsRequestDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ResolveVulnerableSymbolsRequestDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "ResolveVulnerableSymbolsRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataAttributes.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataAttributes.ts new file mode 100644 index 000000000000..a6b19f94cd59 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataAttributes.ts @@ -0,0 +1,46 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsRequestDataAttributes { + "purls"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + purls: { + baseName: "purls", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataType.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataType.ts new file mode 100644 index 000000000000..b0298c92a549 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsRequestDataType.ts @@ -0,0 +1,13 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +export type ResolveVulnerableSymbolsRequestDataType = + | typeof RESOLVE_VULNERABLE_SYMBOLS_REQUEST + | UnparsedObject; +export const RESOLVE_VULNERABLE_SYMBOLS_REQUEST = + "resolve-vulnerable-symbols-request"; diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponse.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponse.ts new file mode 100644 index 000000000000..0fbcaa7bf5e6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponse.ts @@ -0,0 +1,47 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsResponseData } from "./ResolveVulnerableSymbolsResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponse { + "data"?: ResolveVulnerableSymbolsResponseData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ResolveVulnerableSymbolsResponseData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseData.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseData.ts new file mode 100644 index 000000000000..920056bb7ca7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseData.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsResponseDataAttributes } from "./ResolveVulnerableSymbolsResponseDataAttributes"; +import { ResolveVulnerableSymbolsResponseDataType } from "./ResolveVulnerableSymbolsResponseDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponseData { + "attributes"?: ResolveVulnerableSymbolsResponseDataAttributes; + "id"?: string; + "type": ResolveVulnerableSymbolsResponseDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ResolveVulnerableSymbolsResponseDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "ResolveVulnerableSymbolsResponseDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataAttributes.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataAttributes.ts new file mode 100644 index 000000000000..114abda65637 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataAttributes.ts @@ -0,0 +1,47 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsResponseResults } from "./ResolveVulnerableSymbolsResponseResults"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponseDataAttributes { + "results"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + results: { + baseName: "results", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponseDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataType.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataType.ts new file mode 100644 index 000000000000..4d0e992a63cd --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseDataType.ts @@ -0,0 +1,13 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +export type ResolveVulnerableSymbolsResponseDataType = + | typeof RESOLVE_VULNERABLE_SYMBOLS_RESPONSE + | UnparsedObject; +export const RESOLVE_VULNERABLE_SYMBOLS_RESPONSE = + "resolve-vulnerable-symbols-response"; diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResults.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResults.ts new file mode 100644 index 000000000000..8ee6f3725c5e --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResults.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsResponseResultsVulnerableSymbols } from "./ResolveVulnerableSymbolsResponseResultsVulnerableSymbols"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponseResults { + "purl"?: string; + "vulnerableSymbols"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + purl: { + baseName: "purl", + type: "string", + }, + vulnerableSymbols: { + baseName: "vulnerable_symbols", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponseResults.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols.ts new file mode 100644 index 000000000000..51c747a8ff1f --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbols.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols } from "./ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponseResultsVulnerableSymbols { + "advisoryId"?: string; + "symbols"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + advisoryId: { + baseName: "advisory_id", + type: "string", + }, + symbols: { + baseName: "symbols", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponseResultsVulnerableSymbols.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols.ts b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols.ts new file mode 100644 index 000000000000..39eb4971132d --- /dev/null +++ b/packages/datadog-api-client-v2/models/ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols.ts @@ -0,0 +1,56 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols { + "name"?: string; + "type"?: string; + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ResolveVulnerableSymbolsResponseResultsVulnerableSymbolsSymbols.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequest.ts b/packages/datadog-api-client-v2/models/ScaRequest.ts new file mode 100644 index 000000000000..1e3354d3a2a1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequest.ts @@ -0,0 +1,47 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestData } from "./ScaRequestData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequest { + "data"?: ScaRequestData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ScaRequestData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestData.ts b/packages/datadog-api-client-v2/models/ScaRequestData.ts new file mode 100644 index 000000000000..d2998f1b11e4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestData.ts @@ -0,0 +1,59 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributes } from "./ScaRequestDataAttributes"; +import { ScaRequestDataType } from "./ScaRequestDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestData { + "attributes"?: ScaRequestDataAttributes; + "id"?: string; + "type": ScaRequestDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ScaRequestDataAttributes", + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "ScaRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributes.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributes.ts new file mode 100644 index 000000000000..bfc154e21ba0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributes.ts @@ -0,0 +1,92 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributesCommit } from "./ScaRequestDataAttributesCommit"; +import { ScaRequestDataAttributesDependenciesItems } from "./ScaRequestDataAttributesDependenciesItems"; +import { ScaRequestDataAttributesFilesItems } from "./ScaRequestDataAttributesFilesItems"; +import { ScaRequestDataAttributesRelationsItems } from "./ScaRequestDataAttributesRelationsItems"; +import { ScaRequestDataAttributesRepository } from "./ScaRequestDataAttributesRepository"; +import { ScaRequestDataAttributesVulnerabilitiesItems } from "./ScaRequestDataAttributesVulnerabilitiesItems"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributes { + "commit"?: ScaRequestDataAttributesCommit; + "dependencies"?: Array; + "env"?: string; + "files"?: Array; + "relations"?: Array; + "repository"?: ScaRequestDataAttributesRepository; + "service"?: string; + "tags"?: { [key: string]: string }; + "vulnerabilities"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + commit: { + baseName: "commit", + type: "ScaRequestDataAttributesCommit", + }, + dependencies: { + baseName: "dependencies", + type: "Array", + }, + env: { + baseName: "env", + type: "string", + }, + files: { + baseName: "files", + type: "Array", + }, + relations: { + baseName: "relations", + type: "Array", + }, + repository: { + baseName: "repository", + type: "ScaRequestDataAttributesRepository", + }, + service: { + baseName: "service", + type: "string", + }, + tags: { + baseName: "tags", + type: "{ [key: string]: string; }", + }, + vulnerabilities: { + baseName: "vulnerabilities", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesCommit.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesCommit.ts new file mode 100644 index 000000000000..b3b9fb61248d --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesCommit.ts @@ -0,0 +1,76 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesCommit { + "authorDate"?: string; + "authorEmail"?: string; + "authorName"?: string; + "branch"?: string; + "committerEmail"?: string; + "committerName"?: string; + "sha"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + authorDate: { + baseName: "author_date", + type: "string", + }, + authorEmail: { + baseName: "author_email", + type: "string", + }, + authorName: { + baseName: "author_name", + type: "string", + }, + branch: { + baseName: "branch", + type: "string", + }, + committerEmail: { + baseName: "committer_email", + type: "string", + }, + committerName: { + baseName: "committer_name", + type: "string", + }, + sha: { + baseName: "sha", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesCommit.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItems.ts new file mode 100644 index 000000000000..851b5b69ffa1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItems.ts @@ -0,0 +1,98 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributesDependenciesItemsLocationsItems } from "./ScaRequestDataAttributesDependenciesItemsLocationsItems"; +import { ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems } from "./ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesDependenciesItems { + "exclusions"?: Array; + "group"?: string; + "isDev"?: boolean; + "isDirect"?: boolean; + "language"?: string; + "locations"?: Array; + "name"?: string; + "packageManager"?: string; + "purl"?: string; + "reachableSymbolProperties"?: Array; + "version"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + exclusions: { + baseName: "exclusions", + type: "Array", + }, + group: { + baseName: "group", + type: "string", + }, + isDev: { + baseName: "is_dev", + type: "boolean", + }, + isDirect: { + baseName: "is_direct", + type: "boolean", + }, + language: { + baseName: "language", + type: "string", + }, + locations: { + baseName: "locations", + type: "Array", + }, + name: { + baseName: "name", + type: "string", + }, + packageManager: { + baseName: "package_manager", + type: "string", + }, + purl: { + baseName: "purl", + type: "string", + }, + reachableSymbolProperties: { + baseName: "reachable_symbol_properties", + type: "Array", + }, + version: { + baseName: "version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesDependenciesItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItems.ts new file mode 100644 index 000000000000..fc85cbd9a5ff --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItems.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition } from "./ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesDependenciesItemsLocationsItems { + "block"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition; + "name"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition; + "namespace"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition; + "version"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + block: { + baseName: "block", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition", + }, + name: { + baseName: "name", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition", + }, + namespace: { + baseName: "namespace", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition", + }, + version: { + baseName: "version", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesDependenciesItemsLocationsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.ts new file mode 100644 index 000000000000..24afec0d1dd6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.ts @@ -0,0 +1,57 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition } from "./ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition { + "end"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition; + "fileName"?: string; + "start"?: ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + end: { + baseName: "end", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition", + }, + fileName: { + baseName: "file_name", + type: "string", + }, + start: { + baseName: "start", + type: "ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.ts new file mode 100644 index 000000000000..4e42612e1eae --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition { + "col"?: number; + "line"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + col: { + baseName: "col", + type: "number", + format: "int32", + }, + line: { + baseName: "line", + type: "number", + format: "int32", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.ts new file mode 100644 index 000000000000..f386fec298dc --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems { + "name"?: string; + "value"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + }, + value: { + baseName: "value", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesFilesItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesFilesItems.ts new file mode 100644 index 000000000000..6b7eb3e4c130 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesFilesItems.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesFilesItems { + "name"?: string; + "purl"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + name: { + baseName: "name", + type: "string", + }, + purl: { + baseName: "purl", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesFilesItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRelationsItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRelationsItems.ts new file mode 100644 index 000000000000..1536f0103892 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRelationsItems.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesRelationsItems { + "dependsOn"?: Array; + "ref"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + dependsOn: { + baseName: "depends_on", + type: "Array", + }, + ref: { + baseName: "ref", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesRelationsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRepository.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRepository.ts new file mode 100644 index 000000000000..c0f7d06c643f --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesRepository.ts @@ -0,0 +1,46 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesRepository { + "url"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + url: { + baseName: "url", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesRepository.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItems.ts new file mode 100644 index 000000000000..a298bab172d0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItems.ts @@ -0,0 +1,57 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems } from "./ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesVulnerabilitiesItems { + "affects"?: Array; + "bomRef"?: string; + "id"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + affects: { + baseName: "affects", + type: "Array", + }, + bomRef: { + baseName: "bom_ref", + type: "string", + }, + id: { + baseName: "id", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesVulnerabilitiesItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.ts b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.ts new file mode 100644 index 000000000000..34baeab83f0c --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.ts @@ -0,0 +1,46 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +export class ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems { + "ref"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + ref: { + baseName: "ref", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ScaRequestDataType.ts b/packages/datadog-api-client-v2/models/ScaRequestDataType.ts new file mode 100644 index 000000000000..165574e8be59 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ScaRequestDataType.ts @@ -0,0 +1,10 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +export type ScaRequestDataType = typeof SCAREQUESTS | UnparsedObject; +export const SCAREQUESTS = "scarequests";