diff --git a/lib/kv.ts b/lib/kv.ts index 7336abf..782b3c4 100644 --- a/lib/kv.ts +++ b/lib/kv.ts @@ -2,6 +2,14 @@ import axios, { AxiosError } from "axios"; import { InputClientOptions, defaultOptions } from "./clientOpts"; import { ApiError, ErrorData } from "./helpers/error"; +export type KV = { + id?: string; + userId?: string; + key: string; + value: string; + createdAt?: string; +}; + export async function set( key: string, value: string, @@ -56,7 +64,7 @@ export async function get(key: string, clientOptions: InputClientOptions = {}): } } -export async function all(clientOptions: InputClientOptions = {}): Promise { +export async function all(clientOptions: InputClientOptions = {}): Promise { try { const { token, endpoint } = await defaultOptions(clientOptions); @@ -104,7 +112,7 @@ export type KVClient = { get: (key: string) => Promise; set: (key: string, value: string) => Promise; del: (key: string) => Promise; - all: () => Promise; + all: () => Promise; }; export default function client(clientOptions: InputClientOptions = {}): KVClient {