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/auth/dist/cordova/src/core/persistence | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence')
3 files changed, 122 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/in_memory.d.ts b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/in_memory.d.ts new file mode 100644 index 0000000..60278cd --- /dev/null +++ b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/in_memory.d.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright 2019 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 { Persistence } from '../../model/public_types'; +import { PersistenceInternal, PersistenceType, PersistenceValue, StorageEventListener } from '../persistence'; +export declare class InMemoryPersistence implements PersistenceInternal { + static type: 'NONE'; + readonly type = PersistenceType.NONE; + storage: Record<string, PersistenceValue>; + _isAvailable(): Promise<boolean>; + _set(key: string, value: PersistenceValue): Promise<void>; + _get<T extends PersistenceValue>(key: string): Promise<T | null>; + _remove(key: string): Promise<void>; + _addListener(_key: string, _listener: StorageEventListener): void; + _removeListener(_key: string, _listener: StorageEventListener): void; +} +/** + * An implementation of {@link Persistence} of type 'NONE'. + * + * @public + */ +export declare const inMemoryPersistence: Persistence; diff --git a/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/index.d.ts b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/index.d.ts new file mode 100644 index 0000000..4460f02 --- /dev/null +++ b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/index.d.ts @@ -0,0 +1,42 @@ +/** + * @license + * Copyright 2019 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 { Persistence } from '../../model/public_types'; +export declare const enum PersistenceType { + SESSION = "SESSION", + LOCAL = "LOCAL", + NONE = "NONE", + COOKIE = "COOKIE" +} +export type PersistedBlob = Record<string, unknown>; +export interface Instantiator<T> { + (blob: PersistedBlob): T; +} +export type PersistenceValue = PersistedBlob | string; +export declare const STORAGE_AVAILABLE_KEY = "__sak"; +export interface StorageEventListener { + (value: PersistenceValue | null): void; +} +export interface PersistenceInternal extends Persistence { + type: PersistenceType; + _isAvailable(): Promise<boolean>; + _set(key: string, value: PersistenceValue): Promise<void>; + _get<T extends PersistenceValue>(key: string): Promise<T | null>; + _remove(key: string): Promise<void>; + _addListener(key: string, listener: StorageEventListener): void; + _removeListener(key: string, listener: StorageEventListener): void; + _shouldAllowMigration?: boolean; +} diff --git a/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/persistence_user_manager.d.ts b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/persistence_user_manager.d.ts new file mode 100644 index 0000000..7aca0d8 --- /dev/null +++ b/frontend-old/node_modules/@firebase/auth/dist/cordova/src/core/persistence/persistence_user_manager.d.ts @@ -0,0 +1,45 @@ +/** + * @license + * Copyright 2019 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 { ApiKey, AppName, AuthInternal } from '../../model/auth'; +import { UserInternal } from '../../model/user'; +import { PersistenceInternal } from '../persistence'; +export declare const enum KeyName { + AUTH_USER = "authUser", + AUTH_EVENT = "authEvent", + REDIRECT_USER = "redirectUser", + PERSISTENCE_USER = "persistence" +} +export declare const enum Namespace { + PERSISTENCE = "firebase" +} +export declare function _persistenceKeyName(key: string, apiKey: ApiKey, appName: AppName): string; +export declare class PersistenceUserManager { + persistence: PersistenceInternal; + private readonly auth; + private readonly userKey; + private readonly fullUserKey; + private readonly fullPersistenceKey; + private readonly boundEventHandler; + private constructor(); + setCurrentUser(user: UserInternal): Promise<void>; + getCurrentUser(): Promise<UserInternal | null>; + removeCurrentUser(): Promise<void>; + savePersistenceForRedirect(): Promise<void>; + setPersistence(newPersistence: PersistenceInternal): Promise<void>; + delete(): void; + static create(auth: AuthInternal, persistenceHierarchy: PersistenceInternal[], userKey?: KeyName): Promise<PersistenceUserManager>; +} |
