UNPKG

@pipedream/roamresearch

Version:

Pipedream roamresearch Components

42 lines (38 loc) 1.19 kB
import utils from "../../common/utils.mjs"; import app from "../../roamresearch.app.mjs"; export default { key: "roamresearch-append-blocks", name: "Append Blocks", description: "Generic append blocks for Roam Research pages. [See the documentation](https://roamresearch.com/#/app/developer-documentation/page/kjnAseQ-K).", version: "0.0.1", type: "action", props: { app, location: { type: "object", label: "Location", description: "The location to append the block to. [See the documentation](https://roamresearch.com/#/app/developer-documentation/page/kjnAseQ-K).", }, appendData: { type: "string[]", label: "Append Data", description: "The data to append to the block. [See the documentation](https://roamresearch.com/#/app/developer-documentation/page/kjnAseQ-K).", }, }, async run({ $ }) { const { app, location, appendData, } = this; const response = await app.appendBlocks({ $, data: { location, ["append-data"]: utils.parseArray(appendData), }, }); $.export("$summary", "Successfully ran append blocks."); return response; }, };