@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
155 lines (152 loc) • 6.68 kB
TypeScript
import { z } from 'zod/v4';
declare const tlpMarkingObjectSchema: z.ZodObject<{
tlp: z.ZodString;
}, z.core.$strict>;
declare const baseMarkingDefinitionSchema: z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
id: z.ZodUUID;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
name: z.ZodString;
definition: z.ZodObject<{
tlp: z.ZodString;
}, z.core.$strict>;
}, z.core.$strip>;
declare const tlpWhiteSchema: z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9">;
name: z.ZodLiteral<"TLP:WHITE">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"white">;
}, z.core.$strip>;
}, z.core.$strict>;
declare const tlpGreenSchema: z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da">;
name: z.ZodLiteral<"TLP:GREEN">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"green">;
}, z.core.$strip>;
}, z.core.$strict>;
declare const tlpAmberSchema: z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82">;
name: z.ZodLiteral<"TLP:AMBER">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"amber">;
}, z.core.$strip>;
}, z.core.$strict>;
declare const tlpRedSchema: z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed">;
name: z.ZodLiteral<"TLP:RED">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"red">;
}, z.core.$strip>;
}, z.core.$strict>;
declare const tlpMarkingDefinitionSchema: z.ZodUnion<readonly [z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--613f2e26-407d-48c7-9eca-b8e91df99dc9">;
name: z.ZodLiteral<"TLP:WHITE">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"white">;
}, z.core.$strip>;
}, z.core.$strict>, z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da">;
name: z.ZodLiteral<"TLP:GREEN">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"green">;
}, z.core.$strip>;
}, z.core.$strict>, z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--f88d31f6-486f-44da-b317-01333bde0b82">;
name: z.ZodLiteral<"TLP:AMBER">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"amber">;
}, z.core.$strip>;
}, z.core.$strict>, z.ZodObject<{
type: z.ZodLiteral<"marking-definition">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
definition_type: z.ZodLiteral<"tlp">;
id: z.ZodLiteral<"marking-definition--5e57c739-391a-4eb3-b6be-7d15ca92d5ed">;
name: z.ZodLiteral<"TLP:RED">;
definition: z.ZodObject<{
tlp: z.ZodLiteral<"red">;
}, z.core.$strip>;
}, z.core.$strict>]>;
type TlpMarkingDefinition = z.infer<typeof tlpMarkingDefinitionSchema>;
type TlpMarkingObject = z.infer<typeof tlpMarkingObjectSchema>;
declare const statementMarkingObjectSchema: z.ZodObject<{
statement: z.ZodString;
}, z.core.$strict>;
declare const markingDefinitionSchema: z.ZodObject<{
type: z.ZodLiteral<"attack-pattern" | "bundle" | "campaign" | "course-of-action" | "extension-definition" | "identity" | "intrusion-set" | "malware" | "tool" | "marking-definition" | "x-mitre-analytic" | "x-mitre-data-component" | "x-mitre-detection-strategy" | "x-mitre-tactic" | "x-mitre-asset" | "x-mitre-data-source" | "x-mitre-log-source" | "x-mitre-matrix" | "x-mitre-collection" | "relationship" | "file" | "artifact">;
id: z.ZodString;
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created_by_ref: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
name: z.ZodOptional<z.ZodString>;
created: z.core.$ZodBranded<z.ZodISODateTime, "StixCreatedTimestamp">;
revoked: z.ZodOptional<z.ZodBoolean>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
external_references: z.ZodOptional<z.ZodArray<z.ZodObject<{
source_name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodURL>;
external_id: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
object_marking_refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{
marking_ref: z.ZodString;
selectors: z.ZodArray<z.ZodString>;
}, z.core.$strip>>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
extensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
extension_type: z.ZodEnum<{
"new-sdo": "new-sdo";
"new-sco": "new-sco";
"new-sro": "new-sro";
"property-extension": "property-extension";
"toplevel-property-extension": "toplevel-property-extension";
}>;
}, z.core.$catchall<z.ZodUnknown>>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
x_mitre_old_attack_id: z.ZodOptional<z.ZodString>;
definition: z.ZodUnion<readonly [z.ZodObject<{
tlp: z.ZodString;
}, z.core.$strict>, z.ZodObject<{
statement: z.ZodString;
}, z.core.$strict>]>;
definition_type: z.ZodEnum<{
tlp: "tlp";
statement: "statement";
}>;
}, z.core.$strict>;
type MarkingDefinition = z.infer<typeof markingDefinitionSchema>;
export { type MarkingDefinition, type TlpMarkingDefinition, type TlpMarkingObject, baseMarkingDefinitionSchema, markingDefinitionSchema, statementMarkingObjectSchema, tlpAmberSchema, tlpGreenSchema, tlpMarkingDefinitionSchema, tlpMarkingObjectSchema, tlpRedSchema, tlpWhiteSchema };