@karmaniverous/smoz
    Preparing search index...

    Type Alias FunctionConfig<EventSchema, ResponseSchema, GlobalParams, StageParams, EventTypeMap, EventType>

    FunctionConfig: {
        events?: PropFromUnion<AWS["functions"], string>["events"];
        eventSchema?: EventSchema;
        eventType: EventType;
        fnEnvKeys?: readonly (keyof GlobalParams | keyof StageParams)[];
        functionName: string;
        logger?: ConsoleLogger;
        responseSchema?: ResponseSchema;
    } & (
        EventType extends keyof Pick<BaseEventTypeMap, "rest" | "http">
            ? {
                basePath?: string;
                contentType?: string;
                httpContexts?: readonly HttpContext[];
                method?: MethodKey;
            }
            : {
                basePath?: never;
                contentType?: never;
                httpContexts?: never;
                method?: never;
            }
    )

    FunctionConfig

    • Per-function schemas, env requirements, routing metadata.
    • EventTypeMap binds event tokens (e.g., 'rest'|'http'|'sqs') to runtime shapes.
    • HTTP-only options are permitted only when EventType is an HTTP token.

    Type Parameters

    • EventSchema extends z.ZodType | undefined

      optional Zod schema for event (validated pre‑handler)

    • ResponseSchema extends z.ZodType | undefined
    • GlobalParams extends Record<string, unknown>

      app global params record

    • StageParams extends Record<string, unknown>

      app stage params record

    • EventTypeMap extends BaseEventTypeMap

      event token → runtime type map

    • EventType extends keyof EventTypeMap

      selected event token

    Type Declaration

    • Optionalevents?: PropFromUnion<AWS["functions"], string>["events"]

      Optional extra serverless events (e.g., SQS triggers).

    • OptionaleventSchema?: EventSchema

      Optional Zod schemas applied uniformly across all handlers.

    • eventType: EventType

      Compile-time token selecting the runtime event type (e.g., 'rest' | 'http' | 'sqs').

    • OptionalfnEnvKeys?: readonly (keyof GlobalParams | keyof StageParams)[]

      Optional; defaults to [] wherever consumed.

    • functionName: string

      Unique function name; used across serverless/OpenAPI outputs.

    • Optionallogger?: ConsoleLogger

      Optional logger; wrapper will default to console.

    • OptionalresponseSchema?: ResponseSchema

    optional Zod schema for response (validated post‑handler)

    The SMOZ wrapper reads env keys from this config’s brand and builds a typed options.env, then applies HTTP middleware iff the token is in the app’s HTTP tokens set.