Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ module.exports = {
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
},
{
"selector": "variable",
"modifiers": ["const"],
"format": ["PascalCase", "camelCase", "UPPER_CASE"],
"filter": {
"regex": "ErrorCode$", // Matches only if it ends exactly with ErrorCode
"match": true,
},
},
{
"selector": "parameter",
"format": ["camelCase"],
Expand Down
24 changes: 24 additions & 0 deletions etc/firebase-admin.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ export namespace database {
const ServerValue: rtdb.ServerValue;
}

// @public
export interface ErrorInfo {
cause?: Error;
code: string;
httpResponse?: HttpResponse;
message: string;
}

// @public
export interface FirebaseArrayIndexError {
error: FirebaseError;
Expand All @@ -228,12 +236,19 @@ export interface FirebaseArrayIndexError {

// @public
export interface FirebaseError {
cause?: Error;
code: string;
httpResponse?: HttpResponse;
message: string;
stack?: string;
toJSON(): object;
}

// @public
export class FirebaseError extends Error implements FirebaseError {
constructor(errorInfo: ErrorInfo);
}

// @public (undocumented)
export function firestore(app?: App): _firestore.Firestore;

Expand Down Expand Up @@ -299,6 +314,15 @@ export interface GoogleOAuthAccessToken {
expires_in: number;
}

// @public
export interface HttpResponse {
data?: string | object;
headers: {
[key: string]: any;
};
status: number;
}

// @public (undocumented)
export function initializeApp(options?: AppOptions, name?: string): app.App;

Expand Down
24 changes: 24 additions & 0 deletions etc/firebase-admin.app-check.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,22 @@ export class AppCheck {
verifyToken(appCheckToken: string, options?: VerifyAppCheckTokenOptions): Promise<VerifyAppCheckTokenResponse>;
}

// @public
export const AppCheckErrorCode: {
readonly ABORTED: "aborted";
readonly INVALID_ARGUMENT: "invalid-argument";
readonly INVALID_CREDENTIAL: "invalid-credential";
readonly INTERNAL: "internal-error";
readonly PERMISSION_DENIED: "permission-denied";
readonly UNAUTHENTICATED: "unauthenticated";
readonly NOT_FOUND: "not-found";
readonly APP_CHECK_TOKEN_EXPIRED: "app-check-token-expired";
readonly UNKNOWN: "unknown-error";
};

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

// @public
export interface AppCheckToken {
token: string;
Expand All @@ -39,6 +55,14 @@ export interface DecodedAppCheckToken {
sub: string;
}

// Warning: (ae-forgotten-export) The symbol "PrefixedFirebaseError" needs to be exported by the entry point index.d.ts
//
// @public
export class FirebaseAppCheckError extends PrefixedFirebaseError {
// 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 function getAppCheck(app?: App): AppCheck;

Expand Down
65 changes: 41 additions & 24 deletions etc/firebase-admin.app.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,22 @@ export interface App {
}

// @public
export class AppErrorCodes {
// (undocumented)
static APP_DELETED: string;
// (undocumented)
static DUPLICATE_APP: string;
// (undocumented)
static INTERNAL_ERROR: string;
// (undocumented)
static INVALID_APP_NAME: string;
// (undocumented)
static INVALID_APP_OPTIONS: string;
// (undocumented)
static INVALID_ARGUMENT: string;
// (undocumented)
static INVALID_CREDENTIAL: string;
// (undocumented)
static NETWORK_ERROR: string;
// (undocumented)
static NETWORK_TIMEOUT: string;
// (undocumented)
static NO_APP: string;
// (undocumented)
static UNABLE_TO_PARSE_RESPONSE: string;
}
export const AppErrorCode: {
readonly APP_DELETED: "app-deleted";
readonly DUPLICATE_APP: "duplicate-app";
readonly INVALID_ARGUMENT: "invalid-argument";
readonly INTERNAL_ERROR: "internal-error";
readonly INVALID_APP_NAME: "invalid-app-name";
readonly INVALID_APP_OPTIONS: "invalid-app-options";
readonly INVALID_CREDENTIAL: "invalid-credential";
readonly NETWORK_ERROR: "network-error";
readonly NETWORK_TIMEOUT: "network-timeout";
readonly NO_APP: "no-app";
readonly UNABLE_TO_PARSE_RESPONSE: "unable-to-parse-response";
};

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

// @public
export function applicationDefault(httpAgent?: Agent): Credential;
Expand All @@ -63,10 +55,19 @@ export interface Credential {
// @public
export function deleteApp(app: App): Promise<void>;

// @public
export interface ErrorInfo {
cause?: Error;
code: string;
httpResponse?: HttpResponse;
message: string;
}

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

// @public
Expand All @@ -77,12 +78,19 @@ export interface FirebaseArrayIndexError {

// @public
export interface FirebaseError {
cause?: Error;
code: string;
httpResponse?: HttpResponse;
message: string;
stack?: string;
toJSON(): object;
}

// @public
export class FirebaseError extends Error implements FirebaseError {
constructor(errorInfo: ErrorInfo);
}

// @public
export function getApp(appName?: string): App;

Expand All @@ -97,6 +105,15 @@ export interface GoogleOAuthAccessToken {
expires_in: number;
}

// @public
export interface HttpResponse {
data?: string | object;
headers: {
[key: string]: any;
};
status: number;
}

// @public
export function initializeApp(options?: AppOptions, appName?: string): App;

Expand Down
Loading
Loading