Function defineOAuthEnvSchema

  • Used to define the env schema for a Connector.

    Type Parameters

    • Properties extends EnvObjectProperties

    Parameters

    • definer: ((t) => Properties)
        • (t): Properties
        • Parameters

          • t: {
                noWhitelabeling: (<T>(schema) => TAddOptional<T>);
                optional: {
                    <T, F>(schema, enable): TOptionalFromMappedResult<T, F>;
                    <T, F>(schema, enable): TOptionalWithFlag<T, F>;
                    <T>(schema): TOptionalFromMappedResult<T, true>;
                    <T>(schema): TAddOptional<T>;
                };
                string: (<Opts>(opts?) => OmitIndexSignature<TString>);
            }
            • noWhitelabeling: (<T>(schema) => TAddOptional<T>)
                • <T>(schema): TAddOptional<T>
                • Type Parameters

                  • T extends TSchema

                  Parameters

                  • schema: T

                  Returns TAddOptional<T>

            • optional: {
                  <T, F>(schema, enable): TOptionalFromMappedResult<T, F>;
                  <T, F>(schema, enable): TOptionalWithFlag<T, F>;
                  <T>(schema): TOptionalFromMappedResult<T, true>;
                  <T>(schema): TAddOptional<T>;
              }
                • <T, F>(schema, enable): TOptionalFromMappedResult<T, F>
                • [Json] Creates a Optional property

                  Type Parameters

                  • T extends TMappedResult<TProperties>

                  • F extends boolean

                  Parameters

                  • schema: T
                  • enable: F

                  Returns TOptionalFromMappedResult<T, F>

                • <T, F>(schema, enable): TOptionalWithFlag<T, F>
                • [Json] Creates a Optional property

                  Type Parameters

                  • T extends TSchema

                  • F extends boolean

                  Parameters

                  • schema: T
                  • enable: F

                  Returns TOptionalWithFlag<T, F>

                • <T>(schema): TOptionalFromMappedResult<T, true>
                • [Json] Creates a Optional property

                  Type Parameters

                  • T extends TMappedResult<TProperties>

                  Parameters

                  • schema: T

                  Returns TOptionalFromMappedResult<T, true>

                • <T>(schema): TAddOptional<T>
                • [Json] Creates a Optional property

                  Type Parameters

                  • T extends TSchema

                  Parameters

                  • schema: T

                  Returns TAddOptional<T>

            • string: (<Opts>(opts?) => OmitIndexSignature<TString>)
                • <Opts>(opts?): OmitIndexSignature<TString>
                • Type Parameters

                  • Opts extends EnvStringOpts

                  Parameters

                  • Optional opts: Opts

                  Returns OmitIndexSignature<TString>

          Returns Properties

    Returns EnvObject<Properties>

    Example

    import { defineAppEnv } from "@rollout/connectors/app-env";

    export const envSchema = defineAppEnv((t) => ({
    MY_APP_CLIENT_ID: t.string(),
    }));