@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
174 lines (171 loc) • 7.8 kB
text/typescript
import { z } from 'zod/v4';
declare const extensibleGroupSchema: z.ZodObject<{
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created: z.core.$ZodBranded<z.ZodISODateTime, "StixCreatedTimestamp">;
modified: z.core.$ZodBranded<z.ZodISODateTime, "StixModifiedTimestamp">;
created_by_ref: z.ZodOptional<z.ZodString>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
revoked: z.ZodOptional<z.ZodBoolean>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
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>>>;
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>]>>>;
name: z.ZodString;
x_mitre_attack_spec_version: z.ZodString;
x_mitre_version: z.ZodString;
x_mitre_old_attack_id: z.ZodOptional<z.ZodString>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
id: z.ZodString;
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">;
description: z.ZodOptional<z.ZodString>;
external_references: 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>>;
x_mitre_domains: z.ZodArray<z.ZodEnum<{
"enterprise-attack": "enterprise-attack";
"mobile-attack": "mobile-attack";
"ics-attack": "ics-attack";
}>>;
x_mitre_contributors: z.ZodOptional<z.ZodArray<z.ZodString>>;
x_mitre_modified_by_ref: z.ZodOptional<z.ZodLiteral<`identity--${string}`>>;
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
first_seen: z.ZodOptional<z.ZodISODateTime>;
last_seen: z.ZodOptional<z.ZodISODateTime>;
goals: z.ZodOptional<z.ZodArray<z.ZodString>>;
resource_level: z.ZodOptional<z.ZodEnum<{
individual: "individual";
organization: "organization";
club: "club";
contest: "contest";
team: "team";
government: "government";
}>>;
primary_motivation: z.ZodOptional<z.ZodEnum<{
accidental: "accidental";
coercion: "coercion";
dominance: "dominance";
ideology: "ideology";
notoriety: "notoriety";
"organizational-gain": "organizational-gain";
"personal-gain": "personal-gain";
"personal-satisfaction": "personal-satisfaction";
revenge: "revenge";
unpredictable: "unpredictable";
}>>;
secondary_motivations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
accidental: "accidental";
coercion: "coercion";
dominance: "dominance";
ideology: "ideology";
notoriety: "notoriety";
"organizational-gain": "organizational-gain";
"personal-gain": "personal-gain";
"personal-satisfaction": "personal-satisfaction";
revenge: "revenge";
unpredictable: "unpredictable";
}>>>;
}, z.core.$strict>;
declare const groupSchema: z.ZodObject<{
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created: z.core.$ZodBranded<z.ZodISODateTime, "StixCreatedTimestamp">;
modified: z.core.$ZodBranded<z.ZodISODateTime, "StixModifiedTimestamp">;
created_by_ref: z.ZodOptional<z.ZodString>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
revoked: z.ZodOptional<z.ZodBoolean>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
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>>>;
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>]>>>;
name: z.ZodString;
x_mitre_attack_spec_version: z.ZodString;
x_mitre_version: z.ZodString;
x_mitre_old_attack_id: z.ZodOptional<z.ZodString>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
id: z.ZodString;
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">;
description: z.ZodOptional<z.ZodString>;
external_references: 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>>;
x_mitre_domains: z.ZodArray<z.ZodEnum<{
"enterprise-attack": "enterprise-attack";
"mobile-attack": "mobile-attack";
"ics-attack": "ics-attack";
}>>;
x_mitre_contributors: z.ZodOptional<z.ZodArray<z.ZodString>>;
x_mitre_modified_by_ref: z.ZodOptional<z.ZodLiteral<`identity--${string}`>>;
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
first_seen: z.ZodOptional<z.ZodISODateTime>;
last_seen: z.ZodOptional<z.ZodISODateTime>;
goals: z.ZodOptional<z.ZodArray<z.ZodString>>;
resource_level: z.ZodOptional<z.ZodEnum<{
individual: "individual";
organization: "organization";
club: "club";
contest: "contest";
team: "team";
government: "government";
}>>;
primary_motivation: z.ZodOptional<z.ZodEnum<{
accidental: "accidental";
coercion: "coercion";
dominance: "dominance";
ideology: "ideology";
notoriety: "notoriety";
"organizational-gain": "organizational-gain";
"personal-gain": "personal-gain";
"personal-satisfaction": "personal-satisfaction";
revenge: "revenge";
unpredictable: "unpredictable";
}>>;
secondary_motivations: z.ZodOptional<z.ZodArray<z.ZodEnum<{
accidental: "accidental";
coercion: "coercion";
dominance: "dominance";
ideology: "ideology";
notoriety: "notoriety";
"organizational-gain": "organizational-gain";
"personal-gain": "personal-gain";
"personal-satisfaction": "personal-satisfaction";
revenge: "revenge";
unpredictable: "unpredictable";
}>>>;
}, z.core.$strict>;
type Group = z.infer<typeof extensibleGroupSchema>;
export { type Group, extensibleGroupSchema, groupSchema };