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/network | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network')
4 files changed, 157 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/fetch.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/fetch.d.ts new file mode 100644 index 0000000..80d65c2 --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/fetch.d.ts @@ -0,0 +1,27 @@ +/** + * @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 { CallerSdkType } from './transport'; +export declare function initializeFetch(fetchImpl: typeof fetch): void; +export interface DataConnectFetchBody<T> { + name: string; + operationName: string; + variables: T; +} +export declare function dcFetch<T, U>(url: string, body: DataConnectFetchBody<U>, { signal }: AbortController, appId: string | null, accessToken: string | null, appCheckToken: string | null, _isUsingGen: boolean, _callerSdkType: CallerSdkType, _isUsingEmulator: boolean): Promise<{ + data: T; + errors: Error[]; +}>; diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/index.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/index.d.ts new file mode 100644 index 0000000..e3afb7c --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/index.d.ts @@ -0,0 +1,17 @@ +/** + * @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. + */ +export * from './transport'; diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/index.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/index.d.ts new file mode 100644 index 0000000..e1823db --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/index.d.ts @@ -0,0 +1,52 @@ +/** + * @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 { DataConnectOptions, TransportOptions } from '../../api/DataConnect'; +import { AppCheckTokenProvider } from '../../core/AppCheckTokenProvider'; +import { AuthTokenProvider } from '../../core/FirebaseAuthProvider'; +/** + * enum representing different flavors of the SDK used by developers + * use the CallerSdkType for type-checking, and the CallerSdkTypeEnum for value-checking/assigning + */ +export type CallerSdkType = 'Base' | 'Generated' | 'TanstackReactCore' | 'GeneratedReact' | 'TanstackAngularCore' | 'GeneratedAngular'; +export declare const CallerSdkTypeEnum: { + readonly Base: "Base"; + readonly Generated: "Generated"; + readonly TanstackReactCore: "TanstackReactCore"; + readonly GeneratedReact: "GeneratedReact"; + readonly TanstackAngularCore: "TanstackAngularCore"; + readonly GeneratedAngular: "GeneratedAngular"; +}; +/** + * @internal + */ +export interface DataConnectTransport { + invokeQuery<T, U>(queryName: string, body?: U): Promise<{ + data: T; + errors: Error[]; + }>; + invokeMutation<T, U>(queryName: string, body?: U): Promise<{ + data: T; + errors: Error[]; + }>; + useEmulator(host: string, port?: number, sslEnabled?: boolean): void; + onTokenChanged: (token: string | null) => void; + _setCallerSdkType(callerSdkType: CallerSdkType): void; +} +/** + * @internal + */ +export type TransportClass = new (options: DataConnectOptions, apiKey?: string, appId?: string, authProvider?: AuthTokenProvider, appCheckProvider?: AppCheckTokenProvider, transportOptions?: TransportOptions, _isUsingGen?: boolean, _callerSdkType?: CallerSdkType) => DataConnectTransport; diff --git a/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/rest.d.ts b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/rest.d.ts new file mode 100644 index 0000000..64a8922 --- /dev/null +++ b/frontend-old/node_modules/@firebase/data-connect/dist/node-esm/src/network/transport/rest.d.ts @@ -0,0 +1,61 @@ +/** + * @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 { DataConnectOptions, TransportOptions } from '../../api/DataConnect'; +import { AppCheckTokenProvider } from '../../core/AppCheckTokenProvider'; +import { AuthTokenProvider } from '../../core/FirebaseAuthProvider'; +import { CallerSdkType, DataConnectTransport } from '.'; +export declare class RESTTransport implements DataConnectTransport { + private apiKey?; + private appId?; + private authProvider?; + private appCheckProvider?; + private _isUsingGen; + private _callerSdkType; + private _host; + private _port; + private _location; + private _connectorName; + private _secure; + private _project; + private _serviceName; + private _accessToken; + private _appCheckToken; + private _lastToken; + private _isUsingEmulator; + constructor(options: DataConnectOptions, apiKey?: string | undefined, appId?: string, authProvider?: AuthTokenProvider | undefined, appCheckProvider?: AppCheckTokenProvider | undefined, transportOptions?: TransportOptions | undefined, _isUsingGen?: boolean, _callerSdkType?: CallerSdkType); + get endpointUrl(): string; + useEmulator(host: string, port?: number, isSecure?: boolean): void; + onTokenChanged(newToken: string | null): void; + getWithAuth(forceToken?: boolean): Promise<string>; + _setLastToken(lastToken: string | null): void; + withRetry<T>(promiseFactory: () => Promise<{ + data: T; + errors: Error[]; + }>, retry?: boolean): Promise<{ + data: T; + errors: Error[]; + }>; + invokeQuery: <T, U>(queryName: string, body?: U) => Promise<{ + data: T; + errors: Error[]; + }>; + invokeMutation: <T, U>(queryName: string, body?: U) => Promise<{ + data: T; + errors: Error[]; + }>; + _setCallerSdkType(callerSdkType: CallerSdkType): void; +} |
