Skip to content

Remove functions-types-exp and clean up stray app-types-exp #4511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@firebase/auth-types-exp",
"@firebase/functions-compat",
"@firebase/functions-exp",
"@firebase/functions-types-exp",
"@firebase/installations-exp",
"@firebase/installations-types-exp",
"@firebase/installations-compat",
Expand Down
43 changes: 30 additions & 13 deletions common/api-review/functions-exp.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,47 @@
```ts

import { FirebaseApp } from '@firebase/app-exp';
import { Functions } from '@firebase/functions-types-exp';
import { FunctionsError } from '@firebase/functions-types-exp';
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
import { HttpsCallable } from '@firebase/functions-types-exp';
import { HttpsCallableOptions } from '@firebase/functions-types-exp';
import { HttpsCallableResult } from '@firebase/functions-types-exp';
import { FirebaseError } from '@firebase/util';

export { Functions }

export { FunctionsError }
// @public
export interface Functions {
app: FirebaseApp;
customDomain: string | null;
region: string;
}

// @public (undocumented)
export interface FunctionsError extends FirebaseError {
readonly code: FunctionsErrorCode;
readonly details?: unknown;
}

export { FunctionsErrorCode }
// @public
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';

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

export { HttpsCallable }
// @public
export interface HttpsCallable {
// (undocumented)
(data?: {} | null): Promise<HttpsCallableResult>;
}

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

export { HttpsCallableOptions }
// @public
export interface HttpsCallableOptions {
// (undocumented)
timeout?: number;
}

export { HttpsCallableResult }
// @public
export interface HttpsCallableResult {
// (undocumented)
readonly data: unknown;
}

// @public
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
Expand Down
67 changes: 0 additions & 67 deletions common/api-review/functions-types-exp.api.md

This file was deleted.

156 changes: 0 additions & 156 deletions common/api-review/storage-types.api.md

This file was deleted.

1 change: 0 additions & 1 deletion packages-exp/functions-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"dependencies": {
"@firebase/component": "0.2.0",
"@firebase/functions-exp": "0.0.900",
"@firebase/functions-types-exp": "0.0.900",
"@firebase/messaging-types": "0.5.0",
"@firebase/util": "0.3.4",
"tslib": "^1.11.1"
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/functions-compat/src/callable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/
import { expect } from 'chai';
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
import { FunctionsErrorCode } from '@firebase/functions-exp';
import { createTestService } from '../test/utils';
import { firebase, FirebaseApp } from '@firebase/app-compat';

Expand Down
2 changes: 1 addition & 1 deletion packages-exp/functions-compat/src/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
InstanceFactory,
ComponentContainer
} from '@firebase/component';
import { Functions as FunctionsServiceExp } from '@firebase/functions-types-exp';
import { Functions as FunctionsServiceExp } from '@firebase/functions-exp';

declare module '@firebase/component' {
interface NameServiceMapping {
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/functions-compat/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { FirebaseFunctions, HttpsCallable } from '@firebase/functions-types';
import {
HttpsCallableOptions,
Functions as FunctionsServiceExp
} from '@firebase/functions-types-exp';
} from '@firebase/functions-exp';
import { FirebaseApp } from '@firebase/app-compat';
import { FirebaseError } from '@firebase/util';

Expand Down
1 change: 0 additions & 1 deletion packages-exp/functions-exp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"typings": "dist/functions-exp-public.d.ts",
"dependencies": {
"@firebase/component": "0.2.0",
"@firebase/functions-types-exp": "0.0.900",
"@firebase/messaging-types": "0.5.0",
"@firebase/util": "0.3.4",
"node-fetch": "2.6.1",
Expand Down
18 changes: 2 additions & 16 deletions packages-exp/functions-exp/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,15 @@ import { _getProvider, FirebaseApp } from '@firebase/app-exp';
import { FUNCTIONS_TYPE } from './constants';

import { Provider } from '@firebase/component';
import {
Functions,
HttpsCallableOptions,
HttpsCallable,
HttpsCallableResult,
FunctionsError,
FunctionsErrorCode
} from '@firebase/functions-types-exp';
import { Functions, HttpsCallableOptions, HttpsCallable } from './public-types';
import {
FunctionsService,
DEFAULT_REGION,
useFunctionsEmulator as _useFunctionsEmulator,
httpsCallable as _httpsCallable
} from './service';

export {
Functions,
HttpsCallableOptions,
HttpsCallable,
HttpsCallableResult,
FunctionsError,
FunctionsErrorCode
};
export * from './public-types';

/**
* Returns a Functions instance for the given app.
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/functions-exp/src/callable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { expect } from 'chai';
import * as sinon from 'sinon';
import { FirebaseApp } from '@firebase/app-exp';
import { FunctionsErrorCode } from '@firebase/functions-types-exp';
import { FunctionsErrorCode } from './public-types';
import {
Provider,
ComponentContainer,
Expand Down
2 changes: 1 addition & 1 deletion packages-exp/functions-exp/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { FunctionsErrorCode } from '@firebase/functions-types-exp';
import { FunctionsErrorCode } from './public-types';
import { decode } from './serializer';
import { HttpResponseBody } from './service';
import { FirebaseError } from '@firebase/util';
Expand Down
Loading