diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
| commit | 8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch) | |
| tree | 05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core')
5 files changed, 177 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/AppCheckTokenProvider.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/AppCheckTokenProvider.d.ts new file mode 100644 index 0000000..aa6110c --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/AppCheckTokenProvider.d.ts @@ -0,0 +1,31 @@ +/** + * @license + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseApp } from '@firebase/app'; +import { AppCheckInternalComponentName, AppCheckTokenListener, AppCheckTokenResult } from '@firebase/app-check-interop-types'; +import { Provider } from '@firebase/component'; +/** + * @internal + * Abstraction around AppCheck's token fetching capabilities. + */ +export declare class AppCheckTokenProvider { + private appCheckProvider?; + private appCheck?; + private serverAppAppCheckToken?; + constructor(app: FirebaseApp, appCheckProvider?: Provider<AppCheckInternalComponentName>); + getToken(): Promise<AppCheckTokenResult>; + addTokenChangeListener(listener: AppCheckTokenListener): void; +} diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/FirebaseAuthProvider.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/FirebaseAuthProvider.d.ts new file mode 100644 index 0000000..8e05fc2 --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/FirebaseAuthProvider.d.ts @@ -0,0 +1,34 @@ +/** + * @license + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseOptions } from '@firebase/app-types'; +import { FirebaseAuthInternalName, FirebaseAuthTokenData } from '@firebase/auth-interop-types'; +import { Provider } from '@firebase/component'; +export interface AuthTokenProvider { + getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData | null>; + addTokenChangeListener(listener: AuthTokenListener): void; +} +export type AuthTokenListener = (token: string | null) => void; +export declare class FirebaseAuthProvider implements AuthTokenProvider { + private _appName; + private _options; + private _authProvider; + private _auth; + constructor(_appName: string, _options: FirebaseOptions, _authProvider: Provider<FirebaseAuthInternalName>); + getToken(forceRefresh: boolean): Promise<FirebaseAuthTokenData | null>; + addTokenChangeListener(listener: AuthTokenListener): void; + removeTokenChangeListener(listener: (token: string | null) => void): void; +} diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/QueryManager.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/QueryManager.d.ts new file mode 100644 index 0000000..95b7a33 --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/QueryManager.d.ts @@ -0,0 +1,36 @@ +/** + * @license + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { DataConnectSubscription, OnErrorSubscription, OnResultSubscription, QueryPromise, QueryRef } from '../api/query'; +import { OperationRef, OpResult } from '../api/Reference'; +import { DataConnectTransport } from '../network'; +import { DataConnectError } from './error'; +interface TrackedQuery<Data, Variables> { + ref: Omit<OperationRef<Data, Variables>, 'dataConnect'>; + subscriptions: Array<DataConnectSubscription<Data, Variables>>; + currentCache: OpResult<Data> | null; + lastError: DataConnectError | null; +} +export declare class QueryManager { + private transport; + _queries: Map<string, TrackedQuery<unknown, unknown>>; + constructor(transport: DataConnectTransport); + track<Data, Variables>(queryName: string, variables: Variables, initialCache?: OpResult<Data>): TrackedQuery<Data, Variables>; + addSubscription<Data, Variables>(queryRef: OperationRef<Data, Variables>, onResultCallback: OnResultSubscription<Data, Variables>, onErrorCallback?: OnErrorSubscription, initialCache?: OpResult<Data>): () => void; + executeQuery<Data, Variables>(queryRef: QueryRef<Data, Variables>): QueryPromise<Data, Variables>; + enableEmulator(host: string, port: number): void; +} +export {}; diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/error.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/error.d.ts new file mode 100644 index 0000000..3609a0b --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/error.d.ts @@ -0,0 +1,53 @@ +/** + * @license + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { FirebaseError } from '@firebase/util'; +export type DataConnectErrorCode = 'other' | 'already-initialized' | 'not-initialized' | 'not-supported' | 'invalid-argument' | 'partial-error' | 'unauthorized'; +export type Code = DataConnectErrorCode; +export declare const Code: { + OTHER: DataConnectErrorCode; + ALREADY_INITIALIZED: DataConnectErrorCode; + NOT_INITIALIZED: DataConnectErrorCode; + NOT_SUPPORTED: DataConnectErrorCode; + INVALID_ARGUMENT: DataConnectErrorCode; + PARTIAL_ERROR: DataConnectErrorCode; + UNAUTHORIZED: DataConnectErrorCode; +}; +/** An error returned by a DataConnect operation. */ +export declare class DataConnectError extends FirebaseError { + /** @internal */ + readonly name: string; + constructor(code: Code, message: string); + /** @internal */ + toString(): string; +} +/** An error returned by a DataConnect operation. */ +export declare class DataConnectOperationError extends DataConnectError { + /** @internal */ + readonly name: string; + /** The response received from the backend. */ + readonly response: DataConnectOperationFailureResponse; + /** @hideconstructor */ + constructor(message: string, response: DataConnectOperationFailureResponse); +} +export interface DataConnectOperationFailureResponse { + readonly data?: Record<string, unknown> | null; + readonly errors: DataConnectOperationFailureResponseErrorInfo[]; +} +export interface DataConnectOperationFailureResponseErrorInfo { + readonly message: string; + readonly path: Array<string | number>; +} diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/version.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/version.d.ts new file mode 100644 index 0000000..76d8740 --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/core/version.d.ts @@ -0,0 +1,23 @@ +/** + * @license + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** The semver (www.semver.org) version of the SDK. */ +export declare let SDK_VERSION: string; +/** + * SDK_VERSION should be set before any database instance is created + * @internal + */ +export declare function setSDKVersion(version: string): void; |
