polarity-integration-utils
    Preparing search index...

    Interface Integration<TStartupResult, TDetails>

    interface Integration<TStartupResult = unknown, TDetails = unknown> {
        doLookup: (
            entities: {
                channels: { channel_name: string; id: number }[];
                displayValue: string;
                hashType?: "" | "md5" | "sha1" | "sha256" | "sha512";
                IPType?: "" | "IPv4" | "IPv6";
                isDomain: boolean;
                isEmail: boolean;
                isHash: boolean;
                isHex: boolean;
                isHTMLTag: boolean;
                isIP: boolean;
                isIPv4: boolean;
                isIPv6: boolean;
                isMD5: boolean;
                isPrivateIP: boolean;
                isSHA1: boolean;
                isSHA256: boolean;
                isSHA512: boolean;
                isURL: boolean;
                latitude: number;
                longitude: number;
                requestContext: { isUserInitiated: boolean; requestType: "onDemand" };
                type?:
                    | "string"
                    | "custom"
                    | "email"
                    | "url"
                    | "IP"
                    | "IPv4"
                    | "IPv4CIDR"
                    | "IPv6"
                    | "MAC"
                    | "MD5"
                    | "SHA1"
                    | "SHA256"
                    | "cve"
                    | "domain"
                    | "hash"
                    | "*"
                    | `custom.${string}`;
                types: (
                    | "string"
                    | "custom"
                    | "email"
                    | "url"
                    | "IP"
                    | "IPv4"
                    | "IPv4CIDR"
                    | "IPv6"
                    | "MAC"
                    | "MD5"
                    | "SHA1"
                    | "SHA256"
                    | "cve"
                    | "domain"
                    | "hash"
                    | "*"
                    | `custom.${string}`
                )[];
                value: string;
            }[],
            options: DoLookupUserOptions,
            context: IntegrationContext,
        ) => Promise<void | IntegrationError | DoLookupResult<TDetails>>;
        onDetails?: (
            lookupObject: Result<TDetails>,
            options: DoLookupUserOptions,
            context: IntegrationContext,
        ) => Promise<unknown>;
        onMessage?: (
            payload: unknown,
            options: DoLookupUserOptions,
            context: IntegrationContext,
        ) => Promise<unknown>;
        startup: (logger: Logger) => Promise<TStartupResult>;
        validateOptions: (
            options: ValidateOptionsUserOptions,
            context: IntegrationContext,
        ) => IntegrationError[];
    }

    Type Parameters

    • TStartupResult = unknown
    • TDetails = unknown
    Index

    Properties

    doLookup: (
        entities: {
            channels: { channel_name: string; id: number }[];
            displayValue: string;
            hashType?: "" | "md5" | "sha1" | "sha256" | "sha512";
            IPType?: "" | "IPv4" | "IPv6";
            isDomain: boolean;
            isEmail: boolean;
            isHash: boolean;
            isHex: boolean;
            isHTMLTag: boolean;
            isIP: boolean;
            isIPv4: boolean;
            isIPv6: boolean;
            isMD5: boolean;
            isPrivateIP: boolean;
            isSHA1: boolean;
            isSHA256: boolean;
            isSHA512: boolean;
            isURL: boolean;
            latitude: number;
            longitude: number;
            requestContext: { isUserInitiated: boolean; requestType: "onDemand" };
            type?:
                | "string"
                | "custom"
                | "email"
                | "url"
                | "IP"
                | "IPv4"
                | "IPv4CIDR"
                | "IPv6"
                | "MAC"
                | "MD5"
                | "SHA1"
                | "SHA256"
                | "cve"
                | "domain"
                | "hash"
                | "*"
                | `custom.${string}`;
            types: (
                | "string"
                | "custom"
                | "email"
                | "url"
                | "IP"
                | "IPv4"
                | "IPv4CIDR"
                | "IPv6"
                | "MAC"
                | "MD5"
                | "SHA1"
                | "SHA256"
                | "cve"
                | "domain"
                | "hash"
                | "*"
                | `custom.${string}`
            )[];
            value: string;
        }[],
        options: DoLookupUserOptions,
        context: IntegrationContext,
    ) => Promise<void | IntegrationError | DoLookupResult<TDetails>>
    onDetails?: (
        lookupObject: Result<TDetails>,
        options: DoLookupUserOptions,
        context: IntegrationContext,
    ) => Promise<unknown>
    onMessage?: (
        payload: unknown,
        options: DoLookupUserOptions,
        context: IntegrationContext,
    ) => Promise<unknown>
    startup: (logger: Logger) => Promise<TStartupResult>
    validateOptions: (
        options: ValidateOptionsUserOptions,
        context: IntegrationContext,
    ) => IntegrationError[]