Skip to content

Files

Latest commit

 

History

History
285 lines (243 loc) · 7.43 KB

firebase-admin.remote-config.api.md

File metadata and controls

285 lines (243 loc) · 7.43 KB

API Report File for "firebase-admin.remote-config"

Do not edit this file. It is a report generated by API Extractor.

import { Agent } from 'http';

// @public
export interface AndCondition {
    conditions?: Array<OneOfCondition>;
}

// @public
export interface CustomSignalCondition {
    customSignalKey?: string;
    customSignalOperator?: CustomSignalOperator;
    targetCustomSignalValues?: string[];
}

// @public
export enum CustomSignalOperator {
    NUMERIC_EQUAL = "NUMERIC_EQUAL",
    NUMERIC_GREATER_EQUAL = "NUMERIC_GREATER_EQUAL",
    NUMERIC_GREATER_THAN = "NUMERIC_GREATER_THAN",
    NUMERIC_LESS_EQUAL = "NUMERIC_LESS_EQUAL",
    NUMERIC_LESS_THAN = "NUMERIC_LESS_THAN",
    NUMERIC_NOT_EQUAL = "NUMERIC_NOT_EQUAL",
    SEMANTIC_VERSION_EQUAL = "SEMANTIC_VERSION_EQUAL",
    SEMANTIC_VERSION_GREATER_EQUAL = "SEMANTIC_VERSION_GREATER_EQUAL",
    SEMANTIC_VERSION_GREATER_THAN = "SEMANTIC_VERSION_GREATER_THAN",
    SEMANTIC_VERSION_LESS_EQUAL = "SEMANTIC_VERSION_LESS_EQUAL",
    SEMANTIC_VERSION_LESS_THAN = "SEMANTIC_VERSION_LESS_THAN",
    SEMANTIC_VERSION_NOT_EQUAL = "SEMANTIC_VERSION_NOT_EQUAL",
    STRING_CONTAINS = "STRING_CONTAINS",
    STRING_CONTAINS_REGEX = "STRING_CONTAINS_REGEX",
    STRING_DOES_NOT_CONTAIN = "STRING_DOES_NOT_CONTAIN",
    STRING_EXACTLY_MATCHES = "STRING_EXACTLY_MATCHES",
    UNKNOWN = "UNKNOWN"
}

// @public
export type DefaultConfig = {
    [key: string]: string | number | boolean;
};

// @public
export type EvaluationContext = UserProvidedSignals & PredefinedSignals;

// @public
export interface ExplicitParameterValue {
    value: string;
}

// @public
export interface FetchResponseData {
    config?: {
        [key: string]: string;
    };
    eTag?: string;
    status: number;
}

// Warning: (ae-forgotten-export) The symbol "App" needs to be exported by the entry point index.d.ts
//
// @public
export function getRemoteConfig(app?: App): RemoteConfig;

// @public
export interface GetServerTemplateOptions {
    defaultConfig?: DefaultConfig;
}

// @public
export interface InAppDefaultValue {
    useInAppDefault: boolean;
}

// @public
export interface InitServerTemplateOptions extends GetServerTemplateOptions {
    template?: ServerTemplateDataType;
}

// @public
export interface ListVersionsOptions {
    endTime?: Date | string;
    endVersionNumber?: string | number;
    pageSize?: number;
    pageToken?: string;
    startTime?: Date | string;
}

// @public
export interface ListVersionsResult {
    nextPageToken?: string;
    versions: Version[];
}

// @public
export interface MicroPercentRange {
    microPercentLowerBound?: number;
    microPercentUpperBound?: number;
}

// @public
export interface NamedCondition {
    condition: OneOfCondition;
    name: string;
}

// @public
export interface OneOfCondition {
    andCondition?: AndCondition;
    customSignal?: CustomSignalCondition;
    false?: Record<string, never>;
    orCondition?: OrCondition;
    percent?: PercentCondition;
    true?: Record<string, never>;
}

// @public
export interface OrCondition {
    conditions?: Array<OneOfCondition>;
}

// @public
export type ParameterValueType = 'STRING' | 'BOOLEAN' | 'NUMBER' | 'JSON';

// @public
export interface PercentCondition {
    microPercent?: number;
    microPercentRange?: MicroPercentRange;
    percentOperator?: PercentConditionOperator;
    seed?: string;
}

// @public
export enum PercentConditionOperator {
    BETWEEN = "BETWEEN",
    GREATER_THAN = "GREATER_THAN",
    LESS_OR_EQUAL = "LESS_OR_EQUAL",
    UNKNOWN = "UNKNOWN"
}

// @public
export type PredefinedSignals = {
    randomizationId?: string;
};

// @public
export class RemoteConfig {
    // (undocumented)
    readonly app: App;
    createTemplateFromJSON(json: string): RemoteConfigTemplate;
    getServerTemplate(options?: GetServerTemplateOptions): Promise<ServerTemplate>;
    getTemplate(): Promise<RemoteConfigTemplate>;
    getTemplateAtVersion(versionNumber: number | string): Promise<RemoteConfigTemplate>;
    initServerTemplate(options?: InitServerTemplateOptions): ServerTemplate;
    listVersions(options?: ListVersionsOptions): Promise<ListVersionsResult>;
    publishTemplate(template: RemoteConfigTemplate, options?: {
        force: boolean;
    }): Promise<RemoteConfigTemplate>;
    rollback(versionNumber: number | string): Promise<RemoteConfigTemplate>;
    validateTemplate(template: RemoteConfigTemplate): Promise<RemoteConfigTemplate>;
}

// @public
export interface RemoteConfigCondition {
    expression: string;
    name: string;
    tagColor?: TagColor;
}

// @public
export class RemoteConfigFetchResponse {
    constructor(app: App, serverConfig: ServerConfig, requestEtag?: string);
    // (undocumented)
    toJSON(): FetchResponseData;
}

// @public
export interface RemoteConfigParameter {
    conditionalValues?: {
        [key: string]: RemoteConfigParameterValue;
    };
    defaultValue?: RemoteConfigParameterValue;
    description?: string;
    valueType?: ParameterValueType;
}

// @public
export interface RemoteConfigParameterGroup {
    description?: string;
    parameters: {
        [key: string]: RemoteConfigParameter;
    };
}

// @public
export type RemoteConfigParameterValue = ExplicitParameterValue | InAppDefaultValue;

// @public
export interface RemoteConfigTemplate {
    conditions: RemoteConfigCondition[];
    readonly etag: string;
    parameterGroups: {
        [key: string]: RemoteConfigParameterGroup;
    };
    parameters: {
        [key: string]: RemoteConfigParameter;
    };
    version?: Version;
}

// @public
export interface RemoteConfigUser {
    email: string;
    imageUrl?: string;
    name?: string;
}

// @public
export interface ServerConfig {
    getAll(): {
        [key: string]: Value;
    };
    getBoolean(key: string): boolean;
    getNumber(key: string): number;
    getString(key: string): string;
    getValue(key: string): Value;
}

// @public
export interface ServerTemplate {
    evaluate(context?: EvaluationContext): ServerConfig;
    load(): Promise<void>;
    set(template: ServerTemplateDataType): void;
    toJSON(): ServerTemplateData;
}

// @public
export interface ServerTemplateData {
    conditions: NamedCondition[];
    readonly etag: string;
    parameters: {
        [key: string]: RemoteConfigParameter;
    };
    version?: Version;
}

// @public
export type ServerTemplateDataType = ServerTemplateData | string;

// @public
export type TagColor = 'BLUE' | 'BROWN' | 'CYAN' | 'DEEP_ORANGE' | 'GREEN' | 'INDIGO' | 'LIME' | 'ORANGE' | 'PINK' | 'PURPLE' | 'TEAL';

// @public
export type UserProvidedSignals = {
    [key: string]: string | number;
};

// @public
export interface Value {
    asBoolean(): boolean;
    asNumber(): number;
    asString(): string;
    getSource(): ValueSource;
}

// @public
export type ValueSource = 'static' | 'default' | 'remote';

// @public
export interface Version {
    description?: string;
    isLegacy?: boolean;
    rollbackSource?: string;
    updateOrigin?: ('REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED' | 'CONSOLE' | 'REST_API' | 'ADMIN_SDK_NODE');
    updateTime?: string;
    updateType?: ('REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED' | 'INCREMENTAL_UPDATE' | 'FORCED_UPDATE' | 'ROLLBACK');
    updateUser?: RemoteConfigUser;
    versionNumber?: string;
}