@mitre-attack/attack-data-model
Version:
A TypeScript API for the MITRE ATT&CK data model
68 lines (65 loc) • 3.39 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 & z.ZodType<`extension-definition--${string}`, string, z.core.$ZodTypeInternals<`extension-definition--${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">;
spec_version: z.ZodLiteral<"2.1">;
created: z.ZodISODateTime;
modified: z.ZodISODateTime;
created_by_ref: z.ZodString & z.ZodType<`identity--${string}`, string, z.core.$ZodTypeInternals<`identity--${string}`, string>>;
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<{
lang: z.ZodOptional<z.ZodString>;
marking_ref: z.ZodOptional<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 };