{"version":3,"sources":["../../src/kv/index.ts"],"sourcesContent":["import type { CollectionConfig } from '../collections/config/types.js'\nimport type { Payload } from '../types/index.js'\n\nexport type KVStoreValue = NonNullable\n\nexport interface KVAdapter {\n /**\n * Clears all entries in the store.\n * @returns A promise that resolves once the store is cleared.\n */\n clear(): Promise\n\n /**\n * Deletes a value from the store by its key.\n * @param key - The key to delete.\n * @returns A promise that resolves once the key is deleted.\n */\n delete(key: string): Promise\n\n /**\n * Retrieves a value from the store by its key.\n * @param key - The key to look up.\n * @returns A promise that resolves to the value, or `null` if not found.\n */\n get(key: string): Promise\n\n /**\n * Checks if a key exists in the store.\n * @param key - The key to check.\n * @returns A promise that resolves to `true` if the key exists, otherwise `false`.\n */\n has(key: string): Promise\n\n /**\n * Retrieves all the keys in the store.\n * @returns A promise that resolves to an array of keys.\n */\n keys(): Promise\n\n /**\n * Sets a value in the store with the given key.\n * @param key - The key to associate with the value.\n * @param value - The value to store.\n * @returns A promise that resolves once the value is stored.\n */\n set(key: string, value: KVStoreValue): Promise\n}\n\nexport interface KVAdapterResult {\n init(args: { payload: Payload }): KVAdapter\n\n /** Adapter can create additional collection if needed */\n kvCollection?: CollectionConfig\n}\n"],"names":[],"mappings":"AAgDA,WAKC"}