import type { AppEventsPayload } from '@cloudcommerce/types'; import * as functions from 'firebase-functions/v1'; type PubSubHandler = (json: TMessage, context: functions.EventContext, message: functions.pubsub.Message) => Promise; type ApiEventHandler = PubSubHandler; type ExecOptions = { eventMaxAgeMs?: number; memory?: '128MB' | '256MB' | '512MB' | '1GB'; maxInstances?: number; timeoutSeconds?: number; }; declare const createPubSubFunction: (pubSubTopic: string, fn: PubSubHandler, { eventMaxAgeMs, memory, maxInstances, timeoutSeconds, }?: ExecOptions) => functions.CloudFunction; declare const createAppEventsFunction: (appNameOrId: string | number, fn: ApiEventHandler, options?: ExecOptions, isSkipMiddleware?: boolean) => functions.CloudFunction; export default createPubSubFunction; export { createPubSubFunction, createAppEventsFunction }; export type { PubSubHandler, ApiEventHandler };