forked from NativeScript/firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
47 lines (36 loc) · 1.46 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import { FunctionsErrorCode, HttpsCallable, HttpsCallableOptions, HttpsErrorCode, IFunctions } from './common';
import { FirebaseApp } from '@nativescript/firebase-core';
export { FunctionsErrorCode, HttpsErrorCode, HttpsCallableOptions, HttpsCallable };
export declare class HttpsError extends Error {
readonly code: FunctionsErrorCode;
readonly details?: any;
readonly native: any;
}
export declare class Functions implements IFunctions {
constructor(app?: FirebaseApp);
httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable;
useEmulator(host: string, port: number);
readonly native: any;
readonly ios: any;
readonly android: any;
useFunctionsEmulatorOrigin(origin: string);
readonly app: FirebaseApp;
}
declare module '@nativescript/firebase-core' {
export interface Firebase extends FirebaseFunctions {}
// Add 'functions' method to FirebaseApp
export interface FirebaseApp extends FirebaseFunctionsApp {}
}
export interface FirebaseFunctions {
static functions(app?: FirebaseApp): Functions;
}
/**
Add Region (Android & iOS) or Custom Domain (iOS only) to Firebase Functions HTTPS call
@param regionOrCustomDomain (string) (optional): Region (Android or iOS) or Custom Domain (iOS only)
@return Functions
@see Supported Regions: https://firebase.google.com/docs/functions/locations
@example firebase().app().functions("us-central1")
*/
export interface FirebaseFunctionsApp {
static functions(regionOrCustomDomain?: string): Functions;
}