/** * * Copyright 2020-2026 Splunk Inc. * * 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 * * https://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 { PersistenceType } from '../../types'; import { PersistedSessionState, SessionState } from '../session-manager'; import { StorageOptions } from './providers'; export declare class StorageManager { private readonly options; private readonly cookieStorageProvider; private readonly localStorageProvider; private get storageProvider(); /** * Creates a new StorageManager instance. * The persistence type determines which storage mechanism to use ('cookie' or 'localStorage'). * Domain is required for cookie storage. */ constructor(options: Omit & { persistence: PersistenceType; }); getAnonymousUserId(): string | undefined; getSessionState(): PersistedSessionState | undefined; persistAnonymousUserId(anonymousUserId: string): boolean; persistSessionState(sessionState: SessionState): boolean; }