Skip to content

Commit 28417e6

Browse files
committed
Merge remote-tracking branch 'origin/master' into connect/workflow-sdk-docs
2 parents b73b177 + 1c4a740 commit 28417e6

File tree

85 files changed

+3291
-153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3291
-153
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "wati",
3+
app: "ai_textraction",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/ai_textraction",
3+
"version": "0.0.1",
4+
"description": "Pipedream AI Textraction Components",
5+
"main": "ai_textraction.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"ai_textraction"
9+
],
10+
"homepage": "https://pipedream.com/apps/ai_textraction",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "suitedash",
3+
app: "attractwell",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/attractwell",
3+
"version": "0.0.1",
4+
"description": "Pipedream AttractWell Components",
5+
"main": "attractwell.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"attractwell"
9+
],
10+
"homepage": "https://pipedream.com/apps/attractwell",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "paperform",
3+
app: "deepimage",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};

components/deepimage/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/deepimage",
3+
"version": "0.0.1",
4+
"description": "Pipedream DeepImage Components",
5+
"main": "deepimage.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"deepimage"
9+
],
10+
"homepage": "https://pipedream.com/apps/deepimage",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import constants from "../../common/constants.mjs";
2+
import fakturoid from "../../fakturoid.app.mjs";
3+
4+
export default {
5+
key: "fakturoid-cancel-uncancel-invoice",
6+
name: "Cancel or Uncancel Invoice",
7+
description: "Cancels an existing invoice or revokes previous cancellation. [See the documentation](https://www.fakturoid.cz/api/v3)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
fakturoid,
12+
accountSlug: {
13+
propDefinition: [
14+
fakturoid,
15+
"accountSlug",
16+
],
17+
},
18+
invoiceId: {
19+
propDefinition: [
20+
fakturoid,
21+
"invoiceId",
22+
({ accountSlug }) => ({
23+
accountSlug,
24+
}),
25+
],
26+
},
27+
action: {
28+
type: "string",
29+
label: "Action",
30+
description: "The action to perform on the invoice (cancel or uncancel)",
31+
options: constants.ACTION_OPTIONS,
32+
},
33+
},
34+
async run({ $ }) {
35+
const response = await this.fakturoid.fireInvoice({
36+
$,
37+
accountSlug: this.accountSlug,
38+
invoiceId: this.invoiceId,
39+
params: {
40+
event: this.action,
41+
},
42+
});
43+
44+
$.export("$summary", `${this.action === "cancel"
45+
? "Cancelled"
46+
: "Uncancelled"} invoice with ID ${this.invoiceId}`);
47+
return response;
48+
},
49+
};
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
import constants, { parseObject } from "../../common/constants.mjs";
2+
import fakturoid from "../../fakturoid.app.mjs";
3+
4+
export default {
5+
key: "fakturoid-create-invoice",
6+
name: "Create Invoice",
7+
description: "Creates a new invoice. [See the documentation](https://www.fakturoid.cz/api/v3/invoices)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
fakturoid,
12+
accountSlug: {
13+
propDefinition: [
14+
fakturoid,
15+
"accountSlug",
16+
],
17+
},
18+
customId: {
19+
type: "string",
20+
label: "Custom Id",
21+
description: "Identifier in your application",
22+
optional: true,
23+
},
24+
documentType: {
25+
type: "string",
26+
label: "Document Type",
27+
description: "Type of document",
28+
options: constants.DOCUMENT_TYPE_OPTIONS,
29+
reloadProps: true,
30+
optional: true,
31+
},
32+
subjectId: {
33+
propDefinition: [
34+
fakturoid,
35+
"subjectId",
36+
({ accountSlug }) => ({
37+
accountSlug,
38+
}),
39+
],
40+
},
41+
orderNumber: {
42+
type: "string",
43+
label: "Order Number",
44+
description: "Order number in your application",
45+
optional: true,
46+
},
47+
note: {
48+
type: "string",
49+
label: "Note",
50+
description: "Additional notes for the invoice",
51+
optional: true,
52+
},
53+
due: {
54+
type: "string",
55+
label: "Due",
56+
description: "Invoice due date in number of days from today",
57+
optional: true,
58+
},
59+
issuedOn: {
60+
type: "string",
61+
label: "Issued On",
62+
description: "Date of issue. **Format: YYYY-MM-DD**",
63+
optional: true,
64+
},
65+
taxableFulfillmentDue: {
66+
type: "string",
67+
label: "Taxable Fulfillment Due",
68+
description: "Chargeable event date.",
69+
optional: true,
70+
},
71+
tags: {
72+
type: "string[]",
73+
label: "Tags",
74+
description: "List of tags",
75+
optional: true,
76+
},
77+
roundTotal: {
78+
type: "boolean",
79+
label: "Round Total",
80+
description: "Round total amount (VAT included)",
81+
optional: true,
82+
},
83+
subtotal: {
84+
type: "string",
85+
label: "Subtotal",
86+
description: "Total without VAT",
87+
optional: true,
88+
},
89+
total: {
90+
type: "string",
91+
label: "Total",
92+
description: "Total with VAT",
93+
optional: true,
94+
},
95+
lines: {
96+
type: "string[]",
97+
label: "Lines",
98+
description: "List of object lines to invoice. [See the documentation](https://www.fakturoid.cz/api/v3/invoices#attributes). **Example: {\"name\": \"Hard work\",\"quantity\": \"1.0\",\"unit_name\": \"h\",\"unit_price\": \"40000\",\"vat_rate\": \"21\"}**",
99+
},
100+
},
101+
async additionalProps() {
102+
const props = {};
103+
if (this.documentType === "proforma") {
104+
props.proformaFollowupDocument = {
105+
type: "string",
106+
label: "Proforma Followup Document",
107+
description: "What to issue after a proforma is paid.",
108+
options: constants.PROFORMA_OPTIONS,
109+
optional: true,
110+
};
111+
}
112+
return props;
113+
},
114+
async run({ $ }) {
115+
const response = await this.fakturoid.createInvoice({
116+
$,
117+
accountSlug: this.accountSlug,
118+
data: {
119+
custom_id: this.customId,
120+
document_type: this.documentType,
121+
proforma_followup_document: this.proformaFollowupDocument,
122+
subject_id: this.subjectId,
123+
order_number: this.orderNumber,
124+
note: this.note,
125+
due: this.due,
126+
issued_on: this.issuedOn,
127+
taxable_fulfillment_due: this.taxableFulfillmentDue,
128+
tags: parseObject(this.tags),
129+
round_total: this.roundTotal,
130+
subtotal: this.subtotal && parseFloat(this.subtotal),
131+
total: this.total && parseFloat(this.total),
132+
lines: parseObject(this.lines),
133+
},
134+
});
135+
136+
$.export("$summary", `Successfully created invoice with ID ${response.id}`);
137+
return response;
138+
},
139+
};

0 commit comments

Comments
 (0)