Skip to content

Latest commit

 

History

History
82 lines (67 loc) · 2.35 KB

File metadata and controls

82 lines (67 loc) · 2.35 KB

API Report File for "firebase-admin.functions"

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

import { Agent } from 'http';

// @public
export interface AbsoluteDelivery {
    // (undocumented)
    scheduleDelaySeconds?: never;
    scheduleTime?: Date;
}

// @public
export interface DelayDelivery {
    scheduleDelaySeconds?: number;
    // (undocumented)
    scheduleTime?: never;
}

// @public
export type DeliverySchedule = DelayDelivery | AbsoluteDelivery;

// Warning: (ae-forgotten-export) The symbol "FirebaseError" needs to be exported by the entry point index.d.ts
//
// @public
export class FirebaseFunctionsError extends FirebaseError {
    // Warning: (ae-forgotten-export) The symbol "ErrorInfo" needs to be exported by the entry point index.d.ts
    constructor(info: ErrorInfo, message?: string);
}

// @public
export class Functions {
    // Warning: (ae-forgotten-export) The symbol "App" needs to be exported by the entry point index.d.ts
    //
    // (undocumented)
    readonly app: App;
    taskQueue<Args = Record<string, any>>(functionName: string, extensionId?: string): TaskQueue<Args>;
}

// @public
export const FunctionsErrorCode: {
    readonly ABORTED: "aborted";
    readonly INVALID_ARGUMENT: "invalid-argument";
    readonly INVALID_CREDENTIAL: "invalid-credential";
    readonly INTERNAL_ERROR: "internal-error";
    readonly FAILED_PRECONDITION: "failed-precondition";
    readonly PERMISSION_DENIED: "permission-denied";
    readonly UNAUTHENTICATED: "unauthenticated";
    readonly NOT_FOUND: "not-found";
    readonly UNKNOWN_ERROR: "unknown-error";
    readonly TASK_ALREADY_EXISTS: "task-already-exists";
};

// @public
export type FunctionsErrorCode = typeof FunctionsErrorCode[keyof typeof FunctionsErrorCode];

// @public
export function getFunctions(app?: App): Functions;

// @public
export type TaskOptions = DeliverySchedule & TaskOptionsExperimental & {
    dispatchDeadlineSeconds?: number;
    id?: string;
    headers?: Record<string, string>;
};

// @public
export interface TaskOptionsExperimental {
    // @beta
    uri?: string;
}

// @public
export class TaskQueue<Args = Record<string, any>> {
    delete(id: string): Promise<void>;
    enqueue(data: Args, opts?: TaskOptions): Promise<void>;
}