|
1 | | -import {FirebaseApp} from "@nativescript/firebase-core"; |
2 | | - |
3 | | -export type FunctionsErrorCode = |
4 | | - | 'ok' |
5 | | - | 'cancelled' |
6 | | - | 'unknown' |
7 | | - | 'invalid-argument' |
8 | | - | 'deadline-exceeded' |
9 | | - | 'not-found' |
10 | | - | 'already-exists' |
11 | | - | 'permission-denied' |
12 | | - | 'resource-exhausted' |
13 | | - | 'failed-precondition' |
14 | | - | 'aborted' |
15 | | - | 'out-of-range' |
16 | | - | 'unimplemented' |
17 | | - | 'internal' |
18 | | - | 'unavailable' |
19 | | - | 'data-loss' |
20 | | - | 'unauthenticated'; |
| 1 | +import { FirebaseApp } from '@nativescript/firebase-core'; |
21 | 2 |
|
| 3 | +export type FunctionsErrorCode = 'ok' | 'cancelled' | 'unknown' | 'invalid-argument' | 'deadline-exceeded' | 'not-found' | 'already-exists' | 'permission-denied' | 'resource-exhausted' | 'failed-precondition' | 'aborted' | 'out-of-range' | 'unimplemented' | 'internal' | 'unavailable' | 'data-loss' | 'unauthenticated'; |
22 | 4 |
|
23 | 5 | export interface HttpsCallableOptions { |
24 | | - timeout?: number; |
| 6 | + timeout?: number; |
25 | 7 | } |
26 | 8 |
|
27 | 9 | export type HttpsCallableResult = any; |
28 | 10 |
|
29 | | - |
30 | 11 | export interface HttpsCallable { |
31 | | - (data?: any): Promise<HttpsCallableResult>; |
| 12 | + (data?: any): Promise<HttpsCallableResult>; |
32 | 13 | } |
33 | 14 |
|
34 | | - |
35 | 15 | export enum HttpsErrorCode { |
36 | | - OK = 'ok', |
37 | | - CANCELLED = 'cancelled', |
38 | | - UNKNOWN = 'unknown', |
39 | | - INVALID_ARGUMENT = 'invalid-argument', |
40 | | - DEADLINE_EXCEEDED = 'deadline-exceeded', |
41 | | - NOT_FOUND = 'not-found', |
42 | | - ALREADY_EXISTS = 'already-exists', |
43 | | - PERMISSION_DENIED = 'permission-denied', |
44 | | - UNAUTHENTICATED = 'unauthenticated', |
45 | | - RESOURCE_EXHAUSTED = 'resource-exhausted', |
46 | | - FAILED_PRECONDITION = 'failed-precondition', |
47 | | - ABORTED = 'aborted', |
48 | | - OUT_OF_RANGE = 'out-of-range', |
49 | | - UNIMPLEMENTED = 'unimplemented', |
50 | | - INTERNAL = 'internal', |
51 | | - UNAVAILABLE = 'unavailable', |
52 | | - DATA_LOSS = 'data-loss' |
| 16 | + OK = 'ok', |
| 17 | + CANCELLED = 'cancelled', |
| 18 | + UNKNOWN = 'unknown', |
| 19 | + INVALID_ARGUMENT = 'invalid-argument', |
| 20 | + DEADLINE_EXCEEDED = 'deadline-exceeded', |
| 21 | + NOT_FOUND = 'not-found', |
| 22 | + ALREADY_EXISTS = 'already-exists', |
| 23 | + PERMISSION_DENIED = 'permission-denied', |
| 24 | + UNAUTHENTICATED = 'unauthenticated', |
| 25 | + RESOURCE_EXHAUSTED = 'resource-exhausted', |
| 26 | + FAILED_PRECONDITION = 'failed-precondition', |
| 27 | + ABORTED = 'aborted', |
| 28 | + OUT_OF_RANGE = 'out-of-range', |
| 29 | + UNIMPLEMENTED = 'unimplemented', |
| 30 | + INTERNAL = 'internal', |
| 31 | + UNAVAILABLE = 'unavailable', |
| 32 | + DATA_LOSS = 'data-loss', |
53 | 33 | } |
54 | 34 |
|
55 | | - |
56 | 35 | export interface IFunctions { |
57 | | - app: FirebaseApp; |
58 | | - |
59 | | - httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable; |
| 36 | + app: FirebaseApp; |
60 | 37 |
|
61 | | - useEmulator(host: string, port: number); |
| 38 | + httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable; |
62 | 39 |
|
63 | | - useFunctionsEmulatorOrigin(origin: string); |
| 40 | + useEmulator(host: string, port: number); |
64 | 41 | } |
0 commit comments