@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
70 lines (67 loc) • 3.17 kB
TypeScript
import { z } from 'zod/v4';
declare const extensionTypeSchema: z.ZodEnum<{
"new-sdo": "new-sdo";
"new-sco": "new-sco";
"new-sro": "new-sro";
"property-extension": "property-extension";
"toplevel-property-extension": "toplevel-property-extension";
}>;
declare const extensionSchema: 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>>;
type Extension = z.infer<typeof extensionSchema>;
declare const extensionsSchema: 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>]>>;
type Extensions = z.infer<typeof extensionsSchema>;
declare const extensionObjectTypeSchema: z.ZodString;
declare const extensionDefinitionSchema: z.ZodObject<{
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">;
spec_version: z.ZodEnum<{
"2.0": "2.0";
2.1: "2.1";
}>;
created: z.ZodISODateTime;
modified: z.ZodISODateTime;
created_by_ref: z.ZodString;
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>>>;
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
schema: z.ZodString;
version: z.ZodString;
extension_types: z.ZodArray<z.ZodEnum<{
"new-sdo": "new-sdo";
"new-sco": "new-sco";
"new-sro": "new-sro";
"property-extension": "property-extension";
"toplevel-property-extension": "toplevel-property-extension";
}>>;
extension_properties: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strict>;
type ExtensionDefinition = z.infer<typeof extensionDefinitionSchema>;
export { type Extension, type ExtensionDefinition, type Extensions, extensionDefinitionSchema, extensionObjectTypeSchema, extensionSchema, extensionTypeSchema, extensionsSchema };