UNPKG

@inngest/middleware-encryption

Version:
20 lines (19 loc) 824 B
import { type MiddlewareRegisterReturn } from "inngest"; import { type EncryptionMiddlewareOptions, EncryptionService } from "./middleware"; /** * Encrypts and decrypts data sent to and from Inngest. */ export declare const getEncryptionStages: (opts: EncryptionMiddlewareOptions) => { encrypt: { onFunctionRun: FunctionRunHook; onSendEvent: SendEventHook; }; decrypt: { onFunctionRun: FunctionRunHook; }; }; type FunctionRunHook = NonNullable<MiddlewareRegisterReturn["onFunctionRun"]>; type SendEventHook = NonNullable<MiddlewareRegisterReturn["onSendEvent"]>; export declare const isEncryptedValue: (value: unknown) => value is EncryptionService.EncryptedValue; export declare const isV0EncryptedValue: (value: unknown) => value is EncryptionService.V0EncryptedValue; export {};