Beignet API reference
    Preparing search index...

    Interface ProviderConfigDef<CfgSchema>

    Configuration definition for a service provider. Specifies the schema for validating config and optional environment variable prefix.

    interface ProviderConfigDef<CfgSchema extends StandardSchemaV1> {
        envPrefix?: string;
        overrides?: Record<string, unknown>;
        schema: CfgSchema;
    }

    Type Parameters

    Index
    envPrefix?: string

    Optional prefix to read env vars, e.g. "REDIS_". When provided, the implementation will read process.env keys starting with this prefix and pass them to the schema for validation.

    overrides?: Record<string, unknown>

    Field-level config overrides, keyed by schema field name. Defined values are merged over the env-derived (or server-supplied) input before validation, so factory options win over environment variables and still satisfy required fields when the env var is absent. undefined values are ignored.

    schema: CfgSchema

    Standard Schema for validating provider configuration. Can be Zod, Valibot, ArkType, or any Standard Schema compatible library.