pubky-app-specs 0.5.1 → 0.5.2-rc2
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/index.cjs +8 -5
- package/index.js +9 -6
- package/package.json +1 -1
- package/pubky_app_specs.d.ts +49 -4
- package/pubky_app_specs_bg.wasm +0 -0
package/index.cjs
CHANGED
|
@@ -1674,25 +1674,28 @@ class PubkySpecsBuilder {
|
|
|
1674
1674
|
* a name and optional description.
|
|
1675
1675
|
*
|
|
1676
1676
|
* Convenience wrapper around `createPost` that builds the
|
|
1677
|
-
* `PubkyAppCollectionContent` envelope (`{ name, description, items
|
|
1678
|
-
* JSON-serializes it into `content` internally, so
|
|
1679
|
-
* have to stringify the envelope themselves.
|
|
1677
|
+
* `PubkyAppCollectionContent` envelope (`{ name, description, items,
|
|
1678
|
+
* cover_image }`) and JSON-serializes it into `content` internally, so
|
|
1679
|
+
* JS callers don't have to stringify the envelope themselves.
|
|
1680
1680
|
*
|
|
1681
1681
|
* `parent` and `embed` are not supported for Collection posts — the
|
|
1682
1682
|
* validator rejects them — so this helper omits those arguments.
|
|
1683
1683
|
* @param {string} name
|
|
1684
1684
|
* @param {string | null} [description]
|
|
1685
1685
|
* @param {string[] | null} [items]
|
|
1686
|
+
* @param {string | null} [cover_image]
|
|
1686
1687
|
* @returns {PostResult}
|
|
1687
1688
|
*/
|
|
1688
|
-
createCollectionPost(name, description, items) {
|
|
1689
|
+
createCollectionPost(name, description, items, cover_image) {
|
|
1689
1690
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1690
1691
|
const len0 = WASM_VECTOR_LEN;
|
|
1691
1692
|
var ptr1 = isLikeNone(description) ? 0 : passStringToWasm0(description, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1692
1693
|
var len1 = WASM_VECTOR_LEN;
|
|
1693
1694
|
var ptr2 = isLikeNone(items) ? 0 : passArrayJsValueToWasm0(items, wasm.__wbindgen_malloc);
|
|
1694
1695
|
var len2 = WASM_VECTOR_LEN;
|
|
1695
|
-
|
|
1696
|
+
var ptr3 = isLikeNone(cover_image) ? 0 : passStringToWasm0(cover_image, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1697
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1698
|
+
const ret = wasm.pubkyspecsbuilder_createCollectionPost(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1696
1699
|
if (ret[2]) {
|
|
1697
1700
|
throw takeFromExternrefTable0(ret[1]);
|
|
1698
1701
|
}
|