UNPKG

@pipedream/lob

Version:

Pipedream Lob Components

21 lines (20 loc) 677 B
import { defineAction } from "@pipedream/types"; import lob from "../../app/lob.app.mjs"; export default defineAction({ key: "lob-list-postcards", name: "List Postcards", description: "Returns a list of your postcards. [See docs here](https://docs.lob.com/#tag/Postcards/operation/postcards_list).", version: "0.0.2", type: "action", props: { lob, }, async run({ $ }) { const response = await this.lob.listAllPostcards(); const suffix = response.length === 1 ? "" : "s"; $.export("$summary", `Successfully listed ${response.length} postcard${suffix}`); return response; }, });