UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

18 lines (16 loc) 714 B
// src/schemas/common/property-schemas/stix-timestamp.ts import { z } from "zod/v4"; var stixTimestampSchema = z.iso.datetime({ error: "Invalid STIX timestamp format: must be an RFC3339 timestamp with a timezone specification of 'Z'." }).refine((val) => val.endsWith("Z"), { message: "STIX timestamps must use 'Z' timezone specification" }).meta({ description: "Represents timestamps across the CTI specifications. The format is an RFC3339 timestamp, with a required timezone specification of 'Z'." }); var stixCreatedTimestampSchema = stixTimestampSchema; var stixModifiedTimestampSchema = stixTimestampSchema; export { stixTimestampSchema, stixCreatedTimestampSchema, stixModifiedTimestampSchema };