@karmaniverous/smoz
    Preparing search index...

    Interface AppInit<GlobalParamsSchema, StageParamsSchema, EventTypeMapSchema>

    interface AppInit<
        GlobalParamsSchema extends ZodObj,
        StageParamsSchema extends ZodObj,
        EventTypeMapSchema extends ZodObj,
    > {
        appRootAbs: string;
        eventTypeMapSchema?: EventTypeMapSchema;
        functionDefaults?: { fnEnvKeys?: readonly string[] };
        global: {
            envKeys: readonly (keyof output<GlobalParamsSchema>)[];
            params: output<GlobalParamsSchema>;
        };
        globalParamsSchema: GlobalParamsSchema;
        http?: AppHttpConfig;
        httpEventTypeTokens?: readonly (keyof output<EventTypeMapSchema>)[];
        serverless: {
            defaultHandlerFileExport: string;
            defaultHandlerFileName: string;
            httpContextEventMap: SecurityContextHttpEventMap;
        };
        stage: {
            envKeys: readonly (keyof output<StageParamsSchema>)[];
            params: Record<string, Record<string, unknown>>;
        };
        stageParamsSchema: StageParamsSchema;
    }

    Type Parameters

    • GlobalParamsSchema extends ZodObj
    • StageParamsSchema extends ZodObj
    • EventTypeMapSchema extends ZodObj
    Index

    Properties

    appRootAbs: string
    eventTypeMapSchema?: EventTypeMapSchema
    functionDefaults?: { fnEnvKeys?: readonly string[] }

    Optional defaults applied to every function (merged per registration).

    global: {
        envKeys: readonly (keyof output<GlobalParamsSchema>)[];
        params: output<GlobalParamsSchema>;
    }
    globalParamsSchema: GlobalParamsSchema

    Optional app-level HTTP middleware customization (defaults & profiles).

    httpEventTypeTokens?: readonly (keyof output<EventTypeMapSchema>)[]

    HTTP tokens to treat as HTTP at runtime (widenable). Defaults to ['rest', 'http'].

    serverless: {
        defaultHandlerFileExport: string;
        defaultHandlerFileName: string;
        httpContextEventMap: SecurityContextHttpEventMap;
    }

    Accept raw serverless config; App will parse it internally.

    Type Declaration

    • defaultHandlerFileExport: string
    • defaultHandlerFileName: string

      Used to construct default handler string if missing on a function

    • httpContextEventMap: SecurityContextHttpEventMap

      Context -> event fragment to merge into generated http events

    stage: {
        envKeys: readonly (keyof output<StageParamsSchema>)[];
        params: Record<string, Record<string, unknown>>;
    }

    Type Declaration

    • envKeys: readonly (keyof output<StageParamsSchema>)[]
    • params: Record<string, Record<string, unknown>>

      Accept raw stage param objects; App will parse with (global.partial + stage)

    stageParamsSchema: StageParamsSchema