@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
44 lines (41 loc) • 1.34 kB
JavaScript
import {
attackBaseDomainObjectSchema
} from "./chunk-ZQ5CIHH7.js";
import {
descriptionSchema,
objectMarkingRefsSchema,
xMitreDomainsSchema,
xMitreModifiedByRefSchema
} from "./chunk-Z7F5EWOT.js";
import {
stixCreatedByRefSchema
} from "./chunk-QY7EQ3UO.js";
import {
createStixIdValidator
} from "./chunk-OM2DJ5DL.js";
import {
createStixTypeValidator
} from "./chunk-5JU73PGM.js";
// src/schemas/sdo/data-component.schema.ts
import "zod/v4";
var xMitreDataSourceRefSchema = createStixIdValidator("x-mitre-data-source").meta({
description: "STIX ID of the data source this component is a part of."
});
var extensibleDataComponentSchema = attackBaseDomainObjectSchema.extend({
id: createStixIdValidator("x-mitre-data-component"),
type: createStixTypeValidator("x-mitre-data-component"),
description: descriptionSchema,
// Optional in STIX but required in ATT&CK
created_by_ref: stixCreatedByRefSchema,
// Optional in STIX but required in ATT&CK
object_marking_refs: objectMarkingRefsSchema,
x_mitre_domains: xMitreDomainsSchema,
x_mitre_modified_by_ref: xMitreModifiedByRefSchema,
x_mitre_data_source_ref: xMitreDataSourceRefSchema
}).strict();
var dataComponentSchema = extensibleDataComponentSchema;
export {
xMitreDataSourceRefSchema,
extensibleDataComponentSchema,
dataComponentSchema
};