UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

123 lines (120 loc) 5.17 kB
import { z } from 'zod/v4'; declare const stixDomainObjectSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ "attack-pattern": "attack-pattern"; bundle: "bundle"; campaign: "campaign"; "course-of-action": "course-of-action"; "extension-definition": "extension-definition"; identity: "identity"; "intrusion-set": "intrusion-set"; malware: "malware"; tool: "tool"; "marking-definition": "marking-definition"; "x-mitre-analytic": "x-mitre-analytic"; "x-mitre-data-component": "x-mitre-data-component"; "x-mitre-detection-strategy": "x-mitre-detection-strategy"; "x-mitre-tactic": "x-mitre-tactic"; "x-mitre-asset": "x-mitre-asset"; "x-mitre-data-source": "x-mitre-data-source"; "x-mitre-log-source": "x-mitre-log-source"; "x-mitre-matrix": "x-mitre-matrix"; "x-mitre-collection": "x-mitre-collection"; relationship: "relationship"; file: "file"; artifact: "artifact"; }>; 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>; 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>>>; 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>]>>>; }, z.core.$strict>; declare const stixRelationshipObjectSchema: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ "attack-pattern": "attack-pattern"; bundle: "bundle"; campaign: "campaign"; "course-of-action": "course-of-action"; "extension-definition": "extension-definition"; identity: "identity"; "intrusion-set": "intrusion-set"; malware: "malware"; tool: "tool"; "marking-definition": "marking-definition"; "x-mitre-analytic": "x-mitre-analytic"; "x-mitre-data-component": "x-mitre-data-component"; "x-mitre-detection-strategy": "x-mitre-detection-strategy"; "x-mitre-tactic": "x-mitre-tactic"; "x-mitre-asset": "x-mitre-asset"; "x-mitre-data-source": "x-mitre-data-source"; "x-mitre-log-source": "x-mitre-log-source"; "x-mitre-matrix": "x-mitre-matrix"; "x-mitre-collection": "x-mitre-collection"; relationship: "relationship"; file: "file"; artifact: "artifact"; }>; 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>; 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>>>; 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>]>>>; }, z.core.$strict>; type SDO = z.infer<typeof stixDomainObjectSchema>; type SRO = z.infer<typeof stixRelationshipObjectSchema>; export { type SDO, type SRO, stixDomainObjectSchema, stixRelationshipObjectSchema };