@nemphi/sdk 0.2.4609 → 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 +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|