firebase-admin package

Firebase 네임스페이스화된 API (기존).

Functions

함수 설명
앱(이름)
appCheck(앱) 기본 앱 또는 특정 앱의 AppCheck 서비스를 가져옵니다.admin.appCheck()를 호출할 때 인수 없이 기본 앱의 AppCheck 서비스에 액세스하거나 admin.appCheck(app)를 호출하여 특정 앱과 연결된 AppCheck 서비스에 액세스할 수 있습니다.
auth(앱) 기본 앱 또는 특정 앱의 Auth 서비스를 가져옵니다.admin.auth()는 기본 앱의 Auth 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.auth(app)로 호출하여 특정 앱과 연결된 Auth 서비스에 액세스할 수 있습니다.
데이터베이스(앱) 기본 앱 또는 특정 앱의 Database 서비스를 가져옵니다.admin.database()는 기본 앱의 Database 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.database(app)로 호출하여 특정 앱과 연결된 Database 서비스에 액세스할 수 있습니다.admin.databaseDatabase 서비스와 연결된 전역 상수 및 메서드에 액세스하는 데 사용할 수 있는 네임스페이스이기도 합니다.
firestore(앱)
initializeApp(옵션, 이름)
설치(앱) 기본 앱 또는 특정 앱의 Installations 서비스를 가져옵니다.admin.installations()는 기본 앱의 Installations 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.installations(app)로 호출하여 특정 앱과 연결된 설치 서비스에 액세스할 수 있습니다.
instanceId(앱) 기본 앱 또는 특정 앱의 InstanceId 서비스를 가져옵니다.admin.instanceId()는 기본 앱의 InstanceId 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.instanceId(app)으로 호출하여 특정 앱과 연결된 InstanceId 서비스에 액세스할 수 있습니다.
머신러닝(앱) 기본 앱 또는 특정 앱의 MachineLearning 서비스를 가져옵니다.admin.machineLearning()는 기본 앱의 MachineLearning 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.machineLearning(app)로 호출하여 특정 앱과 연결된 MachineLearning 서비스에 액세스할 수 있습니다.
메시지(앱) 기본 앱 또는 지정된 앱의 메시지 서비스를 가져옵니다.admin.messaging()는 기본 앱의 Messaging 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.messaging(app)로 호출하여 특정 앱과 연결된 Messaging 서비스에 액세스할 수 있습니다.
projectManagement(앱) 기본 앱 또는 지정된 앱의 ProjectManagement 서비스를 가져옵니다.admin.projectManagement()는 기본 앱의 ProjectManagement 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.projectManagement(app)로 호출하여 특정 앱과 연결된 ProjectManagement 서비스에 액세스할 수 있습니다.
remoteConfig(앱) 기본 앱 또는 지정된 앱의 RemoteConfig 서비스를 가져옵니다.admin.remoteConfig()는 기본 앱의 RemoteConfig 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.remoteConfig(app)로 호출하여 특정 앱과 연결된 RemoteConfig 서비스에 액세스할 수 있습니다.
securityRules(앱) 기본 앱 또는 특정 앱의 SecurityRules 서비스를 가져옵니다.admin.securityRules()는 기본 앱의 SecurityRules 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.securityRules(app)로 호출하여 특정 앱과 연결된 SecurityRules 서비스에 액세스할 수 있습니다.
storage(앱) 기본 앱 또는 특정 앱의 Storage 서비스를 가져옵니다.admin.storage()는 기본 앱의 Storage 서비스에 액세스하기 위한 인수 없이 호출하거나 admin.storage(app)로 호출하여 특정 앱과 연결된 Storage 서비스에 액세스할 수 있습니다.

인터페이스

인터페이스 설명
AppOptions initializeApp()에 전달할 수 있는 옵션
FirebaseArrayIndexError FirebaseError 객체와 오류가 발생한 항목을 가져오는 데 사용할 수 있는 색인을 모두 포함하는 복합 유형입니다.
FirebaseError FirebaseError는 표준 자바스크립트 Error 객체의 서브클래스입니다. 여기에는 메시지 문자열과 스택 트레이스 외에도 문자열 코드가 포함됩니다.
GoogleOAuthAccessToken Google OAuth 2.0 액세스 토큰용 인터페이스입니다.
서비스 계정

네임스페이스

네임스페이스 설명
app
appCheck
인증
사용자 인증 정보
데이터베이스
firestore
설치 수
인스턴스 ID
머신러닝
메시지
프로젝트 관리
원격 구성
securityRules
스토리지

변수

변수 설명
SDK_VERSION

앱(이름)

서명:

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

매개변수

매개변수 유형 설명
name 문자열

반환:

앱 앱

appCheck(앱)

기본 앱 또는 지정된 앱의 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);

auth(앱)

기본 앱 또는 특정 앱의 Auth 서비스를 가져옵니다.

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

서명:

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);

데이터베이스(앱)

기본 앱 또는 지정된 앱의 Database 서비스를 가져옵니다.

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);

Firestore(앱)

서명:

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

매개변수

매개변수 유형 설명

반환:

_firestore.Firestore

initializeApp(옵션, 이름)

서명:

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

매개변수

매개변수 유형 설명
옵션 AppOptions
name 문자열

반환:

앱 앱

설치(앱)

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

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

서명:

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

매개변수

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

반환:

installs.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);

instanceId(앱)

기본 앱 또는 지정된 앱의 InstanceId 서비스를 가져옵니다.

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

서명:

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

매개변수

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

반환:

instanceId.InstanceId

제공된 앱이 없는 경우 기본 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);

머신러닝(앱)

기본 앱 또는 특정 앱의 머신러닝 서비스를 가져옵니다.

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);

메시지(앱)

기본 앱 또는 지정된 앱의 Messaging 서비스를 가져옵니다.

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

서명:

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

매개변수

매개변수 유형 설명
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(앱)

기본 앱 또는 특정 앱의 ProjectManagement 서비스를 가져옵니다.

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

서명:

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

매개변수

매개변수 유형 설명
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

제공된 앱이 없는 경우 기본 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(앱)

기본 앱 또는 특정 앱에 대한 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);

storage(앱)

기본 앱 또는 특정 앱의 Storage 서비스를 가져옵니다.

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

서명:

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

매개변수

매개변수 유형 설명

반환:

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 버전

서명:

SDK_VERSION: string