@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
165 lines (162 loc) • 10.1 kB
TypeScript
import { z } from 'zod/v4';
declare const xMitreFirstSeenCitationSchema: z.ZodCustom<string, string>;
declare const xMitreLastSeenCitationSchema: z.ZodCustom<string, string>;
type XMitreFirstSeenCitation = z.infer<typeof xMitreFirstSeenCitationSchema>;
type XMitreLastSeenCitation = z.infer<typeof xMitreLastSeenCitationSchema>;
declare const campaignBaseSchema: z.ZodObject<{
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
modified: z.ZodISODateTime;
created_by_ref: z.ZodNonOptional<z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
revoked: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
object_marking_refs: z.ZodNonOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{
lang: z.ZodOptional<z.ZodString>;
marking_ref: z.ZodOptional<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 & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
id: z.ZodString & z.ZodType<`campaign--${string}`, string, z.core.$ZodTypeInternals<`campaign--${string}`, string>>;
type: z.ZodLiteral<"file" | "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-matrix" | "x-mitre-collection" | "relationship" | "artifact">;
description: 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_modified_by_ref: z.ZodLiteral<`identity--${string}`>;
x_mitre_contributors: z.ZodOptional<z.ZodArray<z.ZodString>>;
aliases: z.ZodArray<z.ZodString>;
first_seen: z.ZodISODateTime;
last_seen: z.ZodISODateTime;
x_mitre_first_seen_citation: z.ZodCustom<string, string>;
x_mitre_last_seen_citation: z.ZodCustom<string, string>;
}, z.core.$strict>;
type Campaign = z.infer<typeof campaignBaseSchema>;
type CampaignPartial = Partial<Campaign>;
declare const campaignChecks: (ctx: z.core.ParsePayload<CampaignPartial>) => void;
declare const campaignSchema: z.ZodObject<{
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
modified: z.ZodISODateTime;
created_by_ref: z.ZodNonOptional<z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>>;
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
revoked: z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
lang: z.ZodOptional<z.ZodString>;
object_marking_refs: z.ZodNonOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
granular_markings: z.ZodOptional<z.ZodArray<z.ZodObject<{
lang: z.ZodOptional<z.ZodString>;
marking_ref: z.ZodOptional<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 & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>;
x_mitre_deprecated: z.ZodOptional<z.ZodBoolean>;
id: z.ZodString & z.ZodType<`campaign--${string}`, string, z.core.$ZodTypeInternals<`campaign--${string}`, string>>;
type: z.ZodLiteral<"file" | "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-matrix" | "x-mitre-collection" | "relationship" | "artifact">;
description: 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_modified_by_ref: z.ZodLiteral<`identity--${string}`>;
x_mitre_contributors: z.ZodOptional<z.ZodArray<z.ZodString>>;
aliases: z.ZodArray<z.ZodString>;
first_seen: z.ZodISODateTime;
last_seen: z.ZodISODateTime;
x_mitre_first_seen_citation: z.ZodCustom<string, string>;
x_mitre_last_seen_citation: z.ZodCustom<string, string>;
}, z.core.$strict>;
declare const campaignPartialSchema: z.ZodObject<{
spec_version: z.ZodOptional<z.ZodLiteral<"2.1">>;
created: z.ZodOptional<z.ZodISODateTime>;
modified: z.ZodOptional<z.ZodISODateTime>;
created_by_ref: z.ZodOptional<z.ZodNonOptional<z.ZodOptional<z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>>>>;
labels: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
revoked: z.ZodOptional<z.ZodNonOptional<z.ZodOptional<z.ZodBoolean>>>;
confidence: z.ZodOptional<z.ZodOptional<z.ZodOptional<z.ZodNumber>>>;
lang: z.ZodOptional<z.ZodOptional<z.ZodString>>;
object_marking_refs: z.ZodOptional<z.ZodNonOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>>;
granular_markings: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
lang: z.ZodOptional<z.ZodString>;
marking_ref: z.ZodOptional<z.ZodString>;
selectors: z.ZodArray<z.ZodString>;
}, z.core.$strip>>>>;
extensions: z.ZodOptional<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.ZodOptional<z.ZodString>;
x_mitre_attack_spec_version: z.ZodOptional<z.ZodString>;
x_mitre_version: z.ZodOptional<z.ZodString>;
x_mitre_old_attack_id: z.ZodOptional<z.ZodOptional<z.ZodString & z.ZodType<`MOB-M${number}` | `MOB-S${number}`, string, z.core.$ZodTypeInternals<`MOB-M${number}` | `MOB-S${number}`, string>>>>;
x_mitre_deprecated: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
id: z.ZodOptional<z.ZodString & z.ZodType<`campaign--${string}`, string, z.core.$ZodTypeInternals<`campaign--${string}`, string>>>;
type: z.ZodOptional<z.ZodLiteral<"file" | "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-matrix" | "x-mitre-collection" | "relationship" | "artifact">>;
description: z.ZodOptional<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>>>;
x_mitre_domains: z.ZodOptional<z.ZodArray<z.ZodEnum<{
"enterprise-attack": "enterprise-attack";
"mobile-attack": "mobile-attack";
"ics-attack": "ics-attack";
}>>>;
x_mitre_modified_by_ref: z.ZodOptional<z.ZodLiteral<`identity--${string}`>>;
x_mitre_contributors: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
first_seen: z.ZodOptional<z.ZodISODateTime>;
last_seen: z.ZodOptional<z.ZodISODateTime>;
x_mitre_first_seen_citation: z.ZodOptional<z.ZodCustom<string, string>>;
x_mitre_last_seen_citation: z.ZodOptional<z.ZodCustom<string, string>>;
}, z.core.$strict>;
export { type Campaign, type CampaignPartial, type XMitreFirstSeenCitation, type XMitreLastSeenCitation, campaignBaseSchema, campaignChecks, campaignPartialSchema, campaignSchema, xMitreFirstSeenCitationSchema, xMitreLastSeenCitationSchema };