Skip to content

Commit 1003b8d

Browse files
authored
Remove functions-types-exp and clean up stray app-types-exp (#4511)
1 parent 6a86a1b commit 1003b8d

File tree

23 files changed

+64
-325
lines changed

23 files changed

+64
-325
lines changed

.changeset/config.json

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@firebase/auth-types-exp",
2121
"@firebase/functions-compat",
2222
"@firebase/functions-exp",
23-
"@firebase/functions-types-exp",
2423
"@firebase/installations-exp",
2524
"@firebase/installations-types-exp",
2625
"@firebase/installations-compat",

common/api-review/functions-exp.api.md

+30-13
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,47 @@
55
```ts
66

77
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';
149

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+
}
1822

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';
2025

2126
// @public
2227
export function getFunctions(app: FirebaseApp, regionOrCustomDomain?: string): Functions;
2328

24-
export { HttpsCallable }
29+
// @public
30+
export interface HttpsCallable {
31+
// (undocumented)
32+
(data?: {} | null): Promise<HttpsCallableResult>;
33+
}
2534

2635
// @public
2736
export function httpsCallable(functionsInstance: Functions, name: string, options?: HttpsCallableOptions): HttpsCallable;
2837

29-
export { HttpsCallableOptions }
38+
// @public
39+
export interface HttpsCallableOptions {
40+
// (undocumented)
41+
timeout?: number;
42+
}
3043

31-
export { HttpsCallableResult }
44+
// @public
45+
export interface HttpsCallableResult {
46+
// (undocumented)
47+
readonly data: unknown;
48+
}
3249

3350
// @public
3451
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;

common/api-review/functions-types-exp.api.md

-67
This file was deleted.

common/api-review/storage-types.api.md

-156
This file was deleted.

packages-exp/functions-compat/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"dependencies": {
5050
"@firebase/component": "0.2.0",
5151
"@firebase/functions-exp": "0.0.900",
52-
"@firebase/functions-types-exp": "0.0.900",
5352
"@firebase/messaging-types": "0.5.0",
5453
"@firebase/util": "0.3.4",
5554
"tslib": "^1.11.1"

packages-exp/functions-compat/src/callable.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import { expect } from 'chai';
18-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
18+
import { FunctionsErrorCode } from '@firebase/functions-exp';
1919
import { createTestService } from '../test/utils';
2020
import { firebase, FirebaseApp } from '@firebase/app-compat';
2121

packages-exp/functions-compat/src/register.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
InstanceFactory,
2727
ComponentContainer
2828
} from '@firebase/component';
29-
import { Functions as FunctionsServiceExp } from '@firebase/functions-types-exp';
29+
import { Functions as FunctionsServiceExp } from '@firebase/functions-exp';
3030

3131
declare module '@firebase/component' {
3232
interface NameServiceMapping {

packages-exp/functions-compat/src/service.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515
* limitations under the License.
1616
*/
1717

18-
import {
19-
httpsCallable as httpsCallableExp,
20-
useFunctionsEmulator as useFunctionsEmulatorExp
21-
} from '@firebase/functions-exp';
2218
import { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';
2319
import {
20+
httpsCallable as httpsCallableExp,
21+
useFunctionsEmulator as useFunctionsEmulatorExp,
2422
HttpsCallableOptions,
2523
Functions as FunctionsServiceExp
26-
} from '@firebase/functions-types-exp';
24+
} from '@firebase/functions-exp';
2725
import { FirebaseApp } from '@firebase/app-compat';
2826
import { FirebaseError } from '@firebase/util';
2927

packages-exp/functions-exp/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"typings": "dist/functions-exp-public.d.ts",
5353
"dependencies": {
5454
"@firebase/component": "0.2.0",
55-
"@firebase/functions-types-exp": "0.0.900",
5655
"@firebase/messaging-types": "0.5.0",
5756
"@firebase/util": "0.3.4",
5857
"node-fetch": "2.6.1",

packages-exp/functions-exp/src/api.ts

+2-16
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,15 @@ import { _getProvider, FirebaseApp } from '@firebase/app-exp';
1919
import { FUNCTIONS_TYPE } from './constants';
2020

2121
import { Provider } from '@firebase/component';
22-
import {
23-
Functions,
24-
HttpsCallableOptions,
25-
HttpsCallable,
26-
HttpsCallableResult,
27-
FunctionsError,
28-
FunctionsErrorCode
29-
} from '@firebase/functions-types-exp';
22+
import { Functions, HttpsCallableOptions, HttpsCallable } from './public-types';
3023
import {
3124
FunctionsService,
3225
DEFAULT_REGION,
3326
useFunctionsEmulator as _useFunctionsEmulator,
3427
httpsCallable as _httpsCallable
3528
} from './service';
3629

37-
export {
38-
Functions,
39-
HttpsCallableOptions,
40-
HttpsCallable,
41-
HttpsCallableResult,
42-
FunctionsError,
43-
FunctionsErrorCode
44-
};
30+
export * from './public-types';
4531

4632
/**
4733
* Returns a Functions instance for the given app.

packages-exp/functions-exp/src/callable.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { expect } from 'chai';
1818
import * as sinon from 'sinon';
1919
import { FirebaseApp } from '@firebase/app-exp';
20-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
20+
import { FunctionsErrorCode } from './public-types';
2121
import {
2222
Provider,
2323
ComponentContainer,

packages-exp/functions-exp/src/error.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
18+
import { FunctionsErrorCode } from './public-types';
1919
import { decode } from './serializer';
2020
import { HttpResponseBody } from './service';
2121
import { FirebaseError } from '@firebase/util';

0 commit comments

Comments
 (0)