@nemphi/sdk 0.2.4648 → 0.2.4682

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1478,6 +1478,19 @@ export type LiveDocumentPlace = {
1478
1478
  folder_id?: string;
1479
1479
  };
1480
1480
  /** A tag on a document: put there by a person (`manual`) or by Clef (`auto`). */
1481
+ /** One kept version of a live document; `state` only when one version is read. */
1482
+ export interface LiveDocumentVersion {
1483
+ id: string;
1484
+ seq: number;
1485
+ /** A name given by hand; null for a version known by its time. */
1486
+ name: string | null;
1487
+ /** Kept on its own while people edited. */
1488
+ auto: boolean;
1489
+ author_name: string;
1490
+ created_at: string;
1491
+ /** The whole Yjs state as one base64 update. */
1492
+ state?: string;
1493
+ }
1481
1494
  export interface LiveDocumentTag {
1482
1495
  id: string;
1483
1496
  name: string;
@@ -8140,6 +8153,16 @@ export interface NemphiClient {
8140
8153
  pushLiveDocumentUpdate(id: string, update: string): Promise<{
8141
8154
  seq: number;
8142
8155
  }>;
8156
+ /** A document's version history, newest first, without the states. */
8157
+ listLiveDocumentVersions(id: string): Promise<{
8158
+ versions: LiveDocumentVersion[];
8159
+ }>;
8160
+ /** Keeps the document as it is now as a version, named when `name` is not empty. */
8161
+ createLiveDocumentVersion(id: string, name: string): Promise<LiveDocumentVersion>;
8162
+ /** One version with its state. */
8163
+ getLiveDocumentVersion(id: string, versionId: string): Promise<LiveDocumentVersion>;
8164
+ /** Names a version; an empty name takes the name off. */
8165
+ renameLiveDocumentVersion(id: string, versionId: string, name: string): Promise<void>;
8143
8166
  /** Stores a PNG, JPEG, WebP or GIF (10 MiB at most) with a live document. */
8144
8167
  uploadLiveDocumentAsset(id: string, file: Blob, opts?: {
8145
8168
  filename?: string;