Defines TypeScript types for document creation results and client tokens.
// Source: https://github.com/jamsocket/y-sweet | License: MIT | Copyright 2023 Drifting in Space Corp
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Schema of object returned after a successful document creation.
*/
export type DocCreationResult = {
/** A unique identifier for the created document. */
docId: string
}
/**
* An object containing information needed for the client connect to a document.
*
* This value is expected to be passed from your server to your client. Your server
* should obtain this value by calling {@link DocumentManager.getClientToken},
* and then pass it to the client.
*/
export type ClientToken = {
/** The bare URL of the WebSocket endpoint to connect to. The `doc` string will be appended to this. */
url: string
/** The
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key