/** * The source of the incoming payload. */ export declare enum PersistedObjectSource { /** * from the system mapper * * NOTE: Value needs to start with "system-" since we use this * for the `isSystemSource(source)` function. */ SYSTEM_MAPPER = "system-mapper", /** * From an internal system that is not the mapper. For example, * `jupiter-integration-jupiterone`. * * NOTE: Value needs to start with "system-" since we use this * for the `isSystemSource(source)` function. */ SYSTEM_INTERNAL = "system-internal", /** * from a managed integration * * NOTE: Value needs to start with "integration-" since we use this * for the `isIntegrationSource(source)` function. */ INTEGRATION_MANAGED = "integration-managed", /** * from an external integration (a integration not managed by JupiterOne) * * NOTE: Value needs to start with "integration-" since we use this * for the `isIntegrationSource(source)` function. */ INTEGRATION_EXTERNAL = "integration-external", /** * from the public-facing API */ API = "api", /** * from managed powerups * * NOTE: Value needs to start with "powerup-" since we use this * for the `isPowerupSource(source)` function. */ POWERUP_MANAGED = "powerup-managed", /** * from sample data (graph objects generated from the sample-data project) * * NOTE: graph objects that are pulled with this source will maintain their * original source values. */ SAMPLE_DATA = "sample-data" } export declare type PersistedObjectSourceName = 'system-persister' | 'system-mapper' | 'system-internal' | 'integration-managed' | 'integration-external' | 'api' | 'powerup-managed' | 'sample-data'; export declare namespace PersistedObjectSource { function isSystemSource(source: PersistedObjectSourceName): boolean; function isIntegrationSource(source: PersistedObjectSourceName): boolean; function isPowerupSource(source: PersistedObjectSourceName): boolean; function isAPISource(source: PersistedObjectSourceName): boolean; } export declare type PersistedObjectAssignable = { /** * This is the natural Id that each integration assigns. For example: * `AWS:IAM:UserPolicy:abc123:def` */ _key: string; /** * The `_type` property describes * the type of entity/relationship as identified by the integration. * The `_class` property is similar to `_type` but `_class` refers to a * classification that has been standardized and it is not unique to * a single integration. */ _type: string; /** * Integrations can supply one or more *classes* * which can be used to indicate if a particular entity/relationship conforms * to one or more standard classifications. This property is similar to * `_type` except that `_class` refers to a type that has * been standardized while `_type` is an *entity type* that only * has to be unique in the scope of the integration. It is possible * that an entity/relationship has a `_type` value but no `_class` value * in cases where there is no standard classification for a given * entity/relationship. */ _class?: string | string[]; /** * The name that will be displayed for the persisted object * * The value of this field will be used to label vertices/edges * in the UI. */ displayName?: string; /** * The hyperlink URL to the entity source * * The value of this field will be used by the UI to link to the source entity * in a new browser tab. */ webLink?: string; }; /** * Describes the collection of protected properties managed by the persister * when an Entity/Relationship is created, updated, or deleted. */ export declare type PersistedObjectUnassignable = { /** * Id that the persister assigns to an entity/relationship that is stable * across multiple versions. */ _id: string; /** * The account / tenant identifier */ _accountId: string; /** * The source of the persisted object * (e.g. "system-mapper", "integration-managed", etc.) */ _source: PersistedObjectSourceName; /** * Numerical auto-incrementing value */ _version: number; /** * The earliest timestamp for this entity as known by * the security platform (might be different from when entity * was actually created in external system). */ _createdOn: number; /** * The timestamp when this version of the entity was * created (non-null). This is used for point-in-time queries. */ _beginOn: number; /** * The timestamp when this version was replaced with a * new version (null if entity is latest). This property is mutable. * This is used for point-in-time queries. */ _endOn?: number; /** * A flag to indicate that this entity has been soft-deleted. */ _deleted: boolean; /** * If raw data is stored for an entity, a hash of hashes that is used to * evaluate whether or not new raw data has changes. */ _rawDataHashes?: string; }; export declare type PersistedObjectFromIntegrationProperties = { /** * The non-unique `IntegrationInstance.name` provided by a user when they * configure an integration instance. */ _integrationName: string; /** * The ID of the integration definition that created the entity/relationship */ _integrationDefinitionId: string; /** * The unique ID of the *integration instance* that * created this entity/relationship. */ _integrationInstanceId: string; /** * The unique `IntegrationDefinition.integrationType` used to identify data * created by an integration. */ _integrationType: string; /** * The `IntegrationDefinition.integrationClass` used to classify data created * by an integration. */ _integrationClass?: string | string[]; }; export declare type PersistedObjectFromPowerupProperties = { /** * If entity/relationship is from Powerup then `_powerupName` should * be the name of the Powerup (e.g. "endpoint-compliance"). */ _powerupName: string; }; export declare type PersistedGraphObjectProperties = { /** * UUID of the vertex/edge that Neptune assigns. */ _graphObjectId: string; }; /** * `PersistedObjectType` is an enum of the types persisted objects. * This type is used for the `_objectType` property which is needed * if there is a mix of entities and relationships in the same collection. * The indexed search documents currently add `_objectType` in case we * decide to also index relationships and return them alongside * entities in the same search query. */ export declare enum PersistedObjectType { ENTITY = "entity", RELATIONSHIP = "relationship" } export declare type PersistedSearchDocumentProperties = { /** * `_objectType` is either `PersistedObjectType.ENTITY` or * ``PersistedObjectType.RELATIONSHIP` */ _objectType: PersistedObjectType; }; /** * Shared properties between persisted entities and relationships */ export declare type PersistedObject = PersistedObjectUnassignable & PersistedObjectAssignable & Partial & Partial; /** * `PersistedGraphObject` is a `PersistedObject` with additional * `_graphObjectId` property. */ export declare type PersistedGraphObject = PersistedObject & PersistedGraphObjectProperties; /** * `PersistedSearchDocument` describes a persisted entity or * relationship that is put into Elasticsearch index (before * property names are escaped/transformed). * * The `_objectType` property is added in case we * decide to index both entities and relationships and return them * in the same search. */ export declare type PersistedSearchDocument = PersistedGraphObject & PersistedSearchDocumentProperties;