|
5 | 5 | ```ts
|
6 | 6 |
|
7 | 7 | import { FirebaseApp } from '@firebase/app-exp';
|
8 |
| -import { Functions } from '@firebase/functions-types-exp'; |
9 |
| -import { FunctionsError } from '@firebase/functions-types-exp'; |
10 |
| -import { FunctionsErrorCode } from '@firebase/functions-types-exp'; |
11 |
| -import { HttpsCallable } from '@firebase/functions-types-exp'; |
12 |
| -import { HttpsCallableOptions } from '@firebase/functions-types-exp'; |
13 |
| -import { HttpsCallableResult } from '@firebase/functions-types-exp'; |
| 8 | +import { FirebaseError } from '@firebase/util'; |
14 | 9 |
|
15 |
| -export { Functions } |
16 |
| - |
17 |
| -export { FunctionsError } |
| 10 | +// @public |
| 11 | +export interface Functions { |
| 12 | + app: FirebaseApp; |
| 13 | + customDomain: string | null; |
| 14 | + region: string; |
| 15 | +} |
| 16 | + |
| 17 | +// @public (undocumented) |
| 18 | +export interface FunctionsError extends FirebaseError { |
| 19 | + readonly code: FunctionsErrorCode; |
| 20 | + readonly details?: unknown; |
| 21 | +} |
18 | 22 |
|
19 |
| -export { FunctionsErrorCode } |
| 23 | +// @public |
| 24 | +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'; |
20 | 25 |
|
21 | 26 | // @public
|
22 | 27 | export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): Functions;
|
23 | 28 |
|
24 |
| -export { HttpsCallable } |
| 29 | +// @public |
| 30 | +export interface HttpsCallable { |
| 31 | + // (undocumented) |
| 32 | + (data?: {} | null): Promise<HttpsCallableResult>; |
| 33 | +} |
25 | 34 |
|
26 | 35 | // @public
|
27 | 36 | export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
|
28 | 37 |
|
29 |
| -export { HttpsCallableOptions } |
| 38 | +// @public |
| 39 | +export interface HttpsCallableOptions { |
| 40 | + // (undocumented) |
| 41 | + timeout?: number; |
| 42 | +} |
30 | 43 |
|
31 |
| -export { HttpsCallableResult } |
| 44 | +// @public |
| 45 | +export interface HttpsCallableResult { |
| 46 | + // (undocumented) |
| 47 | + readonly data: unknown; |
| 48 | +} |
32 | 49 |
|
33 | 50 | // @public
|
34 | 51 | export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
|
|
0 commit comments