Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
30eef06
airtable
andrewjschuang Mar 14, 2023
73ecdad
aws
andrewjschuang Mar 14, 2023
fd3b20c
aws
andrewjschuang Mar 14, 2023
2183fd3
brex
andrewjschuang Mar 14, 2023
cdfaaa2
browserless
andrewjschuang Mar 14, 2023
7b478d3
cisco_webex
andrewjschuang Mar 14, 2023
69165e0
browserless
andrewjschuang Mar 14, 2023
71209c8
cisco_webex
andrewjschuang Mar 14, 2023
90b2af6
cisco_webex
andrewjschuang Mar 14, 2023
fa9284d
clone
andrewjschuang Mar 14, 2023
c6e68d1
confection
andrewjschuang Mar 14, 2023
5ab51d0
discord
andrewjschuang Mar 14, 2023
df9ea1b
discord webhook
andrewjschuang Mar 14, 2023
2e2a4d0
discourse
andrewjschuang Mar 14, 2023
63deb35
google_drive
andrewjschuang Mar 14, 2023
8f2b3be
google_sheets
andrewjschuang Mar 14, 2023
b649c09
netlify
andrewjschuang Mar 14, 2023
d9b47aa
pinterest
andrewjschuang Mar 14, 2023
bdbcc52
pipedream
andrewjschuang Mar 14, 2023
278b62a
reddit
andrewjschuang Mar 14, 2023
e4ebdbf
sentry
andrewjschuang Mar 14, 2023
27779e9
spotify
andrewjschuang Mar 14, 2023
8475a08
twitch
andrewjschuang Mar 14, 2023
a9b8641
verifalia
andrewjschuang Mar 14, 2023
eddb433
xero_accounting_api
andrewjschuang Mar 14, 2023
997f51b
zoom
andrewjschuang Mar 14, 2023
372b419
rss
andrewjschuang Mar 14, 2023
97b9386
pnpm-lock
andrewjschuang Mar 14, 2023
f3b174e
Merge branch 'master' into refactor-axios-imports
andrewjschuang Mar 14, 2023
80c35a2
fix component keys
andrewjschuang Mar 14, 2023
5107014
bump versions
andrewjschuang Mar 14, 2023
2af0f02
fix more component keys
andrewjschuang Mar 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
xero_accounting_api
  • Loading branch information
andrewjschuang committed Mar 14, 2023
commit eddb433bea7bc27cd658d87788197493faa6383b
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// legacy_hash_id: a_k6irBN
import fs from "fs";
import axios from "axios";
import { axios } from "@pipedream/platform";

export default {
key: "xero_accounting_api-download-invoice",
name: "Download Invoice",
description: "Downloads an invoice as pdf file. File will be placed at the action's associated workflow temporary folder.",
version: "0.1.2",
version: "0.2.0",
type: "action",
props: {
xero_accounting_api: {
Expand All @@ -30,7 +30,7 @@ export default {
throw new Error("Must provide tenant_id, invoice_id parameters.");
}

const resp = await axios({
const data = await axios($, {
url: `https://api.xero.com/api.xro/2.0/Invoices/${this.invoice_id}`,
headers: {
"Authorization": `Bearer ${this.xero_accounting_api.$auth.oauth_access_token}`,
Expand All @@ -40,7 +40,7 @@ export default {
responseType: "arraybuffer",
});

const invoicePdf = resp.data.toString("base64");
const invoicePdf = data.toString("base64");
const buffer = Buffer.from(invoicePdf, "base64");
const tmpDir = "/tmp";
const invoicePath = `${tmpDir}/${this.invoice_id}.pdf`;
Expand Down
4 changes: 2 additions & 2 deletions components/xero_accounting_api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/xero_accounting_api",
"version": "0.0.4",
"version": "0.1.0",
"description": "Pipedream Xero Components",
"main": "xero_accounting_api.app.mjs",
"keywords": [
Expand All @@ -10,7 +10,7 @@
"homepage": "https://pipedream.com/apps/xero_accounting_api",
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"dependencies": {
"@pipedream/platform": "^1.2.0"
"@pipedream/platform": "^1.4.0"
},
"publishConfig": {
"access": "public"
Expand Down