import type { Nsid } from "@atcute/lexicons/syntax"; import type { OAuthUserAgent } from "@atcute/oauth-browser-client"; import type { StringRecord } from "$lib/api/records"; import { putRecord } from "$lib/api/write"; const STRING_COLLECTION = "sh.tangled.string" as Nsid; // strings live at a generated tid rkey; put upserts the record at `rkey`. export const putString = async ( agent: OAuthUserAgent, rkey: string, record: StringRecord ): Promise => { await putRecord(agent, STRING_COLLECTION, rkey, record); };