firebase-admin package

Firebase 네임스페이스 API(기존)

기능

기능 설명
앱(이름)
앱체크(app) 기본 앱 또는 특정 앱에 대한 AppCheck 서비스를 가져옵니다. admin.appCheck() 인수 없이 호출하여 기본 앱의 AppCheck 서비스에 액세스하거나 admin.appCheck(app) 로 호출하여 특정 앱과 연결된 AppCheck 서비스에 액세스할 수 있습니다.
인증(앱) 기본 앱 또는 특정 앱에 대한 인증 서비스를 가져옵니다. admin.auth() 인수 없이 호출하여 기본 앱의 인증 서비스에 액세스하거나 admin.auth(app) 로 호출하여 특정 앱과 연결된 인증 서비스에 액세스할 수 있습니다.
데이터베이스(앱) 기본 앱 또는 특정 앱에 대한 데이터베이스 서비스를 가져옵니다. admin.database() 인수 없이 호출하여 기본 앱의 Database 서비스에 액세스하거나 admin.database(app) 로 호출하여 특정 앱과 연결된 Database 서비스에 액세스할 수 있습니다. admin.databaseDatabase 서비스와 관련된 전역 상수 및 메서드에 액세스하는 데 사용할 수 있는 네임스페이스이기도 합니다.
파이어스토어(앱)
초기화App(옵션, 이름)
설치(앱) 기본 앱 또는 특정 앱에 대한 설치 서비스를 가져옵니다. admin.installations() 인수 없이 호출하여 기본 앱의 설치 서비스에 액세스하거나 admin.installations(app) 로 호출하여 특정 앱과 연결된 설치 서비스에 액세스할 수 있습니다.
인스턴스 ID(앱) 기본 앱 또는 특정 앱에 대한 InstanceId 서비스를 가져옵니다. admin.instanceId() 인수 없이 호출하여 기본 앱의 InstanceId 서비스에 액세스하거나 admin.instanceId(app) 로 호출하여 특정 앱과 연결된 InstanceId 서비스에 액세스할 수 있습니다.
머신러닝(앱) 기본 앱 또는 지정된 앱에 대한 MachineLearning 서비스를 가져옵니다. admin.machineLearning() 인수 없이 호출하여 기본 앱의 MachineLearning 서비스에 액세스하거나 admin.machineLearning(app) 으로 호출하여 특정 앱과 연결된 MachineLearning 서비스에 액세스할 수 있습니다.
메시징(앱) 기본 앱 또는 특정 앱에 대한 메시징 서비스를 가져옵니다. admin.messaging() 인수 없이 호출하여 기본 앱의 Messaging 서비스에 액세스하거나 admin.messaging(app) 으로 호출하여 특정 앱과 연결된 Messaging 서비스에 액세스할 수 있습니다.
프로젝트관리(앱) 기본 앱 또는 지정된 앱에 대한 ProjectManagement 서비스를 가져옵니다. admin.projectManagement() 인수 없이 호출하여 기본 앱의 ProjectManagement 서비스에 액세스하거나 admin.projectManagement(app) 로 호출하여 특정 앱과 연결된 ProjectManagement 서비스에 액세스할 수 있습니다.
원격 구성(앱) 기본 앱 또는 특정 앱에 대한 RemoteConfig 서비스를 가져옵니다. admin.remoteConfig() 인수 없이 호출하여 기본 앱의 RemoteConfig 서비스에 액세스하거나 admin.remoteConfig(app) 로 호출하여 특정 앱과 연결된 RemoteConfig 서비스에 액세스할 수 있습니다.
보안규칙(앱) 기본 앱 또는 지정된 앱에 대한 SecurityRules 서비스를 가져옵니다. admin.securityRules() 인수 없이 호출하여 기본 앱의 SecurityRules 서비스에 액세스하거나 admin.securityRules(app) 로 호출하여 특정 앱과 연결된 SecurityRules 서비스에 액세스할 수 있습니다.
저장공간(앱) 기본 앱 또는 특정 앱에 대한 저장소 서비스를 가져옵니다. admin.storage() 인수 없이 호출하여 기본 앱의 Storage 서비스에 액세스하거나 admin.storage(app) 로 호출하여 특정 앱과 연결된 Storage 서비스에 액세스할 수 있습니다.

인터페이스

상호 작용 설명
앱옵션 초기화App() 에 전달할 수 있는 옵션 .
FirebaseArrayIndex오류 오류가 발생한 항목을 가져오는 데 사용할 수 있는 FirebaseError 객체와 색인을 모두 포함하는 복합 유형입니다.
Firebase오류 FirebaseError 는 표준 JavaScript Error 객체의 하위 클래스입니다. 메시지 문자열 및 스택 추적 외에도 문자열 코드가 포함되어 있습니다.
GoogleOAuth액세스 토큰 Google OAuth 2.0 액세스 토큰용 인터페이스입니다.
서비스 계정

네임스페이스

네임스페이스 설명
앱체크
인증
신임장
데이터 베이스
소방서
설치
인스턴스 ID
기계 학습
메시징
프로젝트 관리
원격 구성
보안규칙
저장

변수

변하기 쉬운 설명
SDK_VERSION

앱()

서명:

export declare function app(name?: string): app.App;

매개변수

매개변수 유형 설명
이름

보고:

앱.앱

앱체크()

기본 앱 또는 특정 앱에 대한 AppCheck 서비스를 가져옵니다.

admin.appCheck() 인수 없이 호출하여 기본 앱의 AppCheck 서비스에 액세스하거나 admin.appCheck(app) 로 호출하여 특정 앱과 연결된 AppCheck 서비스에 액세스할 수 있습니다.

서명:

export declare function appCheck(app?: App): appCheck.AppCheck;

매개변수

매개변수 유형 설명
AppCheck 서비스를 반환할 선택적 앱입니다. 제공하지 않을 경우 기본 AppCheck 서비스를 반환합니다.

보고:

appCheck.AppCheck

앱이 제공되지 않은 경우 기본 AppCheck 서비스 또는 제공된 앱과 연결된 AppCheck 서비스입니다.

실시예 1

// Get the `AppCheck` service for the default app
var defaultAppCheck = admin.appCheck();

실시예 2

// Get the `AppCheck` service for a given app
var otherAppCheck = admin.appCheck(otherApp);

인증()

기본 앱 또는 특정 앱에 대한 인증 서비스를 가져옵니다.

admin.auth() 인수 없이 호출하여 기본 앱의 인증 서비스에 액세스하거나 admin.auth(app) 로 호출하여 특정 앱과 연결된 인증 서비스에 액세스할 수 있습니다.

서명:

export declare function auth(app?: App): auth.Auth;

매개변수

매개변수 유형 설명

보고:

인증.인증

실시예 1

// Get the Auth service for the default app
var defaultAuth = admin.auth();

실시예 2

// Get the Auth service for a given app
var otherAuth = admin.auth(otherApp);

데이터 베이스()

기본 앱 또는 특정 앱에 대한 데이터베이스 서비스를 가져옵니다.

admin.database() 인수 없이 호출하여 기본 앱의 Database 서비스에 액세스하거나 admin.database(app) 로 호출하여 특정 앱과 연결된 Database 서비스에 액세스할 수 있습니다.

admin.databaseDatabase 서비스와 관련된 전역 상수 및 메서드에 액세스하는 데 사용할 수 있는 네임스페이스이기도 합니다.

서명:

export declare function database(app?: App): database.Database;

매개변수

매개변수 유형 설명

보고:

데이터베이스.데이터베이스

앱이 제공되지 않은 경우 기본 Database 서비스이거나 제공된 앱과 연결된 Database 서비스입니다.

실시예 1

// Get the Database service for the default app
var defaultDatabase = admin.database();

실시예 2

// Get the Database service for a specific app
var otherDatabase = admin.database(app);

소방서()

서명:

export declare function firestore(app?: App): _firestore.Firestore;

매개변수

매개변수 유형 설명

보고:

_firestore.Firestore

초기화앱()

서명:

export declare function initializeApp(options?: AppOptions, name?: string): app.App;

매개변수

매개변수 유형 설명
옵션 앱옵션
이름

보고:

앱.앱

설치()

기본 앱 또는 특정 앱에 대한 설치 서비스를 가져옵니다.

admin.installations() 인수 없이 호출하여 기본 앱의 설치 서비스에 액세스하거나 admin.installations(app) 로 호출하여 특정 앱과 연결된 설치 서비스에 액세스할 수 있습니다.

서명:

export declare function installations(app?: App): installations.Installations;

매개변수

매개변수 유형 설명
Installations 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 Installations 서비스가 반환됩니다.

보고:

설치.설치

앱이 제공되지 않은 경우 기본 Installations 서비스이거나 제공된 앱과 연결된 Installations 서비스입니다.

실시예 1

// Get the Installations service for the default app
var defaultInstallations = admin.installations();

실시예 2

// Get the Installations service for a given app
var otherInstallations = admin.installations(otherApp);

인스턴스 ID()

기본 앱 또는 특정 앱에 대한 InstanceId 서비스를 가져옵니다.

admin.instanceId() 인수 없이 호출하여 기본 앱의 InstanceId 서비스에 액세스하거나 admin.instanceId(app) 로 호출하여 특정 앱과 연결된 InstanceId 서비스에 액세스할 수 있습니다.

서명:

export declare function instanceId(app?: App): instanceId.InstanceId;

매개변수

매개변수 유형 설명
InstanceId 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 InstanceId 서비스가 반환됩니다.

보고:

인스턴스 ID.인스턴스 ID

앱이 제공되지 않은 경우 기본 InstanceId 서비스 또는 제공된 앱과 연결된 InstanceId 서비스입니다.

실시예 1

// Get the Instance ID service for the default app
var defaultInstanceId = admin.instanceId();

실시예 2

// Get the Instance ID service for a given app
var otherInstanceId = admin.instanceId(otherApp);

기계학습()

기본 앱 또는 지정된 앱에 대한 MachineLearning 서비스를 가져옵니다.

admin.machineLearning() 인수 없이 호출하여 기본 앱의 MachineLearning 서비스에 액세스하거나 admin.machineLearning(app) 으로 호출하여 특정 앱과 연결된 MachineLearning 서비스에 액세스할 수 있습니다.

서명:

export declare function machineLearning(app?: App): machineLearning.MachineLearning;

매개변수

매개변수 유형 설명
MachineLearning 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 MachineLearning 서비스가 반환됩니다.

보고:

machineLearning.MachineLearning

앱이 제공되지 않은 경우 기본 MachineLearning 서비스이거나 제공된 앱과 연결된 MachineLearning 서비스입니다.

실시예 1

// Get the MachineLearning service for the default app
var defaultMachineLearning = admin.machineLearning();

실시예 2

// Get the MachineLearning service for a given app
var otherMachineLearning = admin.machineLearning(otherApp);

메시징()

기본 앱 또는 특정 앱에 대한 메시징 서비스를 가져옵니다.

admin.messaging() 인수 없이 호출하여 기본 앱의 Messaging 서비스에 액세스하거나 admin.messaging(app) 으로 호출하여 특정 앱과 연결된 Messaging 서비스에 액세스할 수 있습니다.

서명:

export declare function messaging(app?: App): messaging.Messaging;

매개변수

매개변수 유형 설명
Messaging 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 Messaging 서비스가 반환됩니다.

보고:

메시징.메시징

앱이 제공되지 않은 경우 기본 Messaging 서비스이거나 제공된 앱과 연결된 Messaging 서비스입니다.

실시예 1

// Get the Messaging service for the default app
var defaultMessaging = admin.messaging();

실시예 2

// Get the Messaging service for a given app
var otherMessaging = admin.messaging(otherApp);

프로젝트 관리()

기본 앱 또는 지정된 앱에 대한 ProjectManagement 서비스를 가져옵니다.

admin.projectManagement() 인수 없이 호출하여 기본 앱의 ProjectManagement 서비스에 액세스하거나 admin.projectManagement(app) 로 호출하여 특정 앱과 연결된 ProjectManagement 서비스에 액세스할 수 있습니다.

서명:

export declare function projectManagement(app?: App): projectManagement.ProjectManagement;

매개변수

매개변수 유형 설명
ProjectManagement 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 ProjectManagement 서비스가 반환됩니다. *

보고:

프로젝트관리.프로젝트관리

앱이 제공되지 않은 경우 기본 ProjectManagement 서비스 또는 제공된 앱과 연결된 ProjectManagement 서비스입니다.

실시예 1

// Get the ProjectManagement service for the default app
var defaultProjectManagement = admin.projectManagement();

실시예 2

// Get the ProjectManagement service for a given app
var otherProjectManagement = admin.projectManagement(otherApp);

원격구성()

기본 앱 또는 특정 앱에 대한 RemoteConfig 서비스를 가져옵니다.

admin.remoteConfig() 인수 없이 호출하여 기본 앱의 RemoteConfig 서비스에 액세스하거나 admin.remoteConfig(app) 로 호출하여 특정 앱과 연결된 RemoteConfig 서비스에 액세스할 수 있습니다.

서명:

export declare function remoteConfig(app?: App): remoteConfig.RemoteConfig;

매개변수

매개변수 유형 설명
RemoteConfig 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 RemoteConfig 서비스가 반환됩니다.

보고:

원격구성.원격구성

앱이 제공되지 않은 경우 기본 RemoteConfig 서비스 또는 제공된 앱과 연결된 RemoteConfig 서비스입니다.

실시예 1

// Get the `RemoteConfig` service for the default app
var defaultRemoteConfig = admin.remoteConfig();

실시예 2

// Get the `RemoteConfig` service for a given app
var otherRemoteConfig = admin.remoteConfig(otherApp);

보안규칙()

기본 앱 또는 지정된 앱에 대한 SecurityRules 서비스를 가져옵니다.

admin.securityRules() 인수 없이 호출하여 기본 앱의 SecurityRules 서비스에 액세스하거나 admin.securityRules(app) 로 호출하여 특정 앱과 연결된 SecurityRules 서비스에 액세스할 수 있습니다.

서명:

export declare function securityRules(app?: App): securityRules.SecurityRules;

매개변수

매개변수 유형 설명
SecurityRules 서비스를 반환할 선택적 앱입니다. 제공되지 않으면 기본 SecurityRules 서비스가 반환됩니다.

보고:

securityRules.SecurityRules

앱이 제공되지 않은 경우 기본 SecurityRules 서비스 또는 제공된 앱과 연결된 SecurityRules 서비스입니다.

실시예 1

// Get the SecurityRules service for the default app
var defaultSecurityRules = admin.securityRules();

실시예 2

// Get the SecurityRules service for a given app
var otherSecurityRules = admin.securityRules(otherApp);

저장()

기본 앱 또는 특정 앱에 대한 저장소 서비스를 가져옵니다.

admin.storage() 인수 없이 호출하여 기본 앱의 Storage 서비스에 액세스하거나 admin.storage(app) 로 호출하여 특정 앱과 연결된 Storage 서비스에 액세스할 수 있습니다.

서명:

export declare function storage(app?: App): storage.Storage;

매개변수

매개변수 유형 설명

보고:

저장.저장

실시예 1

// Get the Storage service for the default app
var defaultStorage = admin.storage();

실시예 2

// Get the Storage service for a given app
var otherStorage = admin.storage(otherApp);

서명:

apps: (app.App | null)[]

SDK_VERSION

서명:

SDK_VERSION: string