/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { RawUUID } from '../../value-objects/id'; export interface RawKitItemBase { ID: string | undefined; Name: string; Hash: Array; } export interface RawLicenseKitItem extends RawKitItemBase { Type: 'license'; AdditionalInfo: string; } export interface RawFileKitItem extends RawKitItemBase { Type: 'file'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; Size: number; ContentType: string; }; } export interface RawDashboardKitItem extends RawKitItemBase { Type: 'dashboard'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; }; } export interface RawMacroKitItem extends RawKitItemBase { Type: 'macro'; AdditionalInfo: { Name: string; Description: string; Expansion: string; }; } export interface RawActionableKitItem extends RawKitItemBase { Type: 'pivot'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; }; } export interface RawPlaybookKitItem extends RawKitItemBase { Type: 'playbook'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; }; } export interface RawResourceKitItem extends RawKitItemBase { Type: 'resource'; AdditionalInfo: { ResourceName?: string; Description: string; Size: number; VersionNumber: number; }; } export interface RawScheduledScriptKitItem extends RawKitItemBase { Type: 'scheduled search'; AdditionalInfo: { Name: string; Description: string; Schedule: string; Script?: string; SearchString?: string; Duration?: number; DefaultDeploymentRules: { Disabled: boolean; /** * If RunImmediately is set to true, we set OneShot = true on the script * as we install it */ RunImmediately: boolean; }; }; } export interface RawSavedQueryKitItem extends RawKitItemBase { Type: 'searchlibrary'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; Query: string; }; } export interface RawTemplateKitItem extends RawKitItemBase { Type: 'template'; AdditionalInfo: { UUID: RawUUID; Name: string; Description: string; }; } export interface RawFlowKitItem extends RawKitItemBase { Type: 'flow'; AdditionalInfo: { Name: string; Description: string; }; } export interface RawAutoExtractorKitItem extends RawKitItemBase { Type: 'autoextractor'; AdditionalInfo: { name: string; desc: string; module: string; tag: string; }; } export interface RawAlertKitItem extends RawKitItemBase { Type: 'alert'; AdditionalInfo: { Name: string; Description: string; }; } export declare type RawKitItem = RawFileKitItem | RawDashboardKitItem | RawLicenseKitItem | RawMacroKitItem | RawActionableKitItem | RawPlaybookKitItem | RawResourceKitItem | RawScheduledScriptKitItem | RawSavedQueryKitItem | RawTemplateKitItem | RawFlowKitItem | RawAutoExtractorKitItem | RawAlertKitItem;