UNPKG

@mitre-attack/attack-data-model

Version:

A TypeScript API for the MITRE ATT&CK data model

44 lines (41 loc) 1.91 kB
import { DataSourceRegistration } from './data-sources/data-source-registration.cjs'; import { k as AttackDataModel } from './index-CbZsFpbe.cjs'; import './schemas/common/common-properties.cjs'; import 'zod/v4'; import './schemas/common/stix-identifier.cjs'; import './schemas/common/stix-type.cjs'; import './schemas/sro/relationship.schema.cjs'; import './schemas/sdo/stix-bundle.schema.cjs'; import './schemas/sdo/malware.schema.cjs'; import './schemas/sdo/asset.schema.cjs'; import './schemas/sdo/campaign.schema.cjs'; import './schemas/sdo/data-component.schema.cjs'; import './schemas/sdo/log-source.schema.cjs'; import './schemas/sdo/data-source.schema.cjs'; import './schemas/sdo/identity.schema.cjs'; import './schemas/sdo/matrix.schema.cjs'; import './schemas/sdo/tool.schema.cjs'; import './schemas/sdo/tactic.schema.cjs'; import './schemas/sdo/technique.schema.cjs'; import './schemas/sdo/group.schema.cjs'; import './schemas/sdo/mitigation.schema.cjs'; import './schemas/sdo/collection.schema.cjs'; import './schemas/sdo/detection-strategy.schema.cjs'; import './schemas/sdo/analytic.schema.cjs'; import './schemas/smo/marking-definition.schema.cjs'; /** * Registers a new data source by fetching and caching ATT&CK data based on the provided options. * Generates a unique ID for each registered data source. * * @param registration - A DataSourceRegistration object containing the source, domain, version, etc. * @returns The unique ID of the registered data source. */ declare function registerDataSource(registration: DataSourceRegistration): Promise<string>; /** * Returns the data model of the registered data source, given the data source's unique ID. * * @param id - The unique ID of the data model to retrieve. * @returns The corresponding AttackDataModel instance. */ declare function loadDataModel(id: string): AttackDataModel; export { loadDataModel, registerDataSource };