NZ Legislation Tool API - v1.2.0
    Preparing search index...

    Function setConfig

    • Set a configuration value with validation

      Type Parameters

      • K extends requiredKeys<
            baseObjectOutputType<
                {
                    apiKey: ZodEffects<ZodDefault<ZodString>, string, string | undefined>;
                    baseUrl: ZodDefault<ZodEffects<ZodString, string, string>>;
                    cacheEnabled: ZodDefault<ZodBoolean>;
                    cacheTTL: ZodDefault<ZodNumber>;
                    outputFormat: ZodDefault<ZodEnum<["table", "json", "csv"]>>;
                    rateLimitPerMinute: ZodDefault<ZodNumber>;
                    timeout: ZodDefault<ZodNumber>;
                    verbose: ZodDefault<ZodBoolean>;
                },
            >,
        >

      Parameters

      • key: K
      • value: {
            apiKey: string;
            baseUrl: string;
            cacheEnabled: boolean;
            cacheTTL: number;
            outputFormat: "json" | "table" | "csv";
            rateLimitPerMinute: number;
            timeout: number;
            verbose: boolean;
        }[K]

      Returns void