@nemphi/sdk 0.2.4599 → 0.2.4611

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
@@ -1545,6 +1545,16 @@ export interface LiveDocumentState {
1545
1545
  state: string;
1546
1546
  seq: number;
1547
1547
  }
1548
+ /**
1549
+ * A picture stored with a live document. `id` is the bytes' hash and
1550
+ * extension: the editor keeps only the id in the document, and the bytes are
1551
+ * read back through `fetchLiveDocumentAsset`.
1552
+ */
1553
+ export interface LiveDocumentAsset {
1554
+ id: string;
1555
+ content_type: string;
1556
+ size_bytes: number;
1557
+ }
1548
1558
  export interface Document {
1549
1559
  id: string;
1550
1560
  filename: string;
@@ -8115,6 +8125,12 @@ export interface NemphiClient {
8115
8125
  pushLiveDocumentUpdate(id: string, update: string): Promise<{
8116
8126
  seq: number;
8117
8127
  }>;
8128
+ /** Stores a PNG, JPEG, WebP or GIF (10 MiB at most) with a live document. */
8129
+ uploadLiveDocumentAsset(id: string, file: Blob, opts?: {
8130
+ filename?: string;
8131
+ }): Promise<LiveDocumentAsset>;
8132
+ /** A live document's stored picture, as the raw response. */
8133
+ fetchLiveDocumentAsset(id: string, asset: string): Promise<Response>;
8118
8134
  /**
8119
8135
  * A document's own bytes, as a streamable `Response` carrying its stored
8120
8136
  * content type — for showing what was shared, not only its name.
@@ -9343,6 +9359,33 @@ export interface CustomAppDetail extends CustomApp {
9343
9359
  collection: string;
9344
9360
  records: number;
9345
9361
  }[];
9362
+ /** The collections kept in sync with a live spreadsheet (`apps.link_sheet`). */
9363
+ sheets?: CustomAppSheet[];
9364
+ }
9365
+ /**
9366
+ * A collection kept in sync with a live spreadsheet, both ways
9367
+ * (`apps.link_sheet`): which sheet, when it last synced and why the last
9368
+ * sync failed, if it did.
9369
+ */
9370
+ export interface CustomAppSheet {
9371
+ app: string;
9372
+ collection: string;
9373
+ live_document_id: string;
9374
+ title: string;
9375
+ synced_at: string | null;
9376
+ last_error: string | null;
9377
+ }
9378
+ /** One reconciliation of a collection with its sheet (`apps.sync_sheet`). */
9379
+ export interface CustomAppSheetSync {
9380
+ app: string;
9381
+ collection: string;
9382
+ live_document_id: string;
9383
+ status: "synced" | "unchanged" | "too_large";
9384
+ cells_written: number;
9385
+ records_added: number;
9386
+ records_updated: number;
9387
+ records_deleted: number;
9388
+ error?: string;
9346
9389
  }
9347
9390
  /** A file's content, from the draft or from a version (`apps.read_file`). */
9348
9391
  export interface CustomAppFileContent {