UNPKG

@arcane-utils/datastore

Version:

Datastore helper functions.

30 lines (27 loc) 1.74 kB
import { Datastore, Entity, Key } from '@google-cloud/datastore'; declare const INGESTION_EXCLUDE_FROM_INDEXES: { classic: string[]; embedded: string[]; }; declare const PROCESSING_EXCLUDE_FROM_INDEXES: { classic: string[]; embedded: string[]; }; declare const EXPORT_EXCLUDE_FROM_INDEXES_CLASSIC: string[]; declare const EXPORT_EXCLUDE_FROM_INDEXES: { classic: string[]; embedded: string[]; }; declare const PROTECTION_EXCLUDE_FROM_INDEXES: { classic: string[]; }; declare const DATA_EXPORT_KIND = "smart-feeds-data-exports"; declare const DATA_INGESTION_KIND = "smart-feeds-data-ingestions"; declare const DATA_PROCESSING_KIND = "smart-feeds-data-processings"; declare const PROTECTION_KIND = "protection-file-size"; declare const DATA_ALERT_KIND = "alert-file-change"; declare const getDatastoreClient: (gcpProject: string, serviceAccount: string) => Datastore; declare const getEntityExcludeFromIndexes: (entity: Entity, excludeFromIndexes: string[], embeddedKeysToExcludeFromIndex: string[]) => string[]; declare const saveEntity: (kind: string, entityId: string, updatedProperties: any, datastore: Datastore, excludeFromIndexes?: string[], embeddedKeysToExcludeFromIndex?: string[], logger?: any) => Promise<string | undefined>; declare const getEntity: (kind: string, entityId: string, datastore: Datastore, logger?: any, key?: Key | null) => Promise<any>; export { DATA_ALERT_KIND, DATA_EXPORT_KIND, DATA_INGESTION_KIND, DATA_PROCESSING_KIND, EXPORT_EXCLUDE_FROM_INDEXES, EXPORT_EXCLUDE_FROM_INDEXES_CLASSIC, INGESTION_EXCLUDE_FROM_INDEXES, PROCESSING_EXCLUDE_FROM_INDEXES, PROTECTION_EXCLUDE_FROM_INDEXES, PROTECTION_KIND, getDatastoreClient, getEntity, getEntityExcludeFromIndexes, saveEntity };