Skip to content

Commit 205ae4b

Browse files
authored
Merge branch 'master' into quickbooks-usability-audit
2 parents 0685893 + a8245f7 commit 205ae4b

File tree

79 files changed

+5572
-22970
lines changed

Some content is hidden

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

79 files changed

+5572
-22970
lines changed

.github/workflows/docs-pr.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Validate MDX Links
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs-v2/pages/**/*.mdx'
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- 'docs-v2/pages/**/*.mdx'
12+
13+
jobs:
14+
validate-links:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: docs-v2
19+
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/[email protected]
23+
with:
24+
# Fetch full history for checking diffs
25+
fetch-depth: 0
26+
27+
- uses: pnpm/[email protected]
28+
with:
29+
version: 9.14.2
30+
31+
- name: Get pnpm store directory
32+
id: pnpm-cache
33+
run: |
34+
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
35+
36+
- uses: actions/cache@v4
37+
name: Setup pnpm cache
38+
with:
39+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
43+
44+
- name: Setup Node Env
45+
uses: actions/[email protected]
46+
with:
47+
node-version: 18
48+
registry-url: https://registry.npmjs.org/
49+
cache: 'pnpm'
50+
51+
- name: Install dependencies
52+
run: pnpm install -r
53+
54+
- name: Run link validator
55+
run: node validate-mdx-links.mjs
56+
env:
57+
DEBUG: ${{ vars.DEBUG }}

.github/workflows/pipedream-sdk-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Node.js
3737
uses: actions/setup-node@v3
3838
with:
39-
node-version: '18'
39+
node-version: '22'
4040

4141
- name: Install dependencies
4242
run: pnpm install
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
import docusign from "../../docusign.app.mjs";
2+
import fs from "fs";
3+
4+
export default {
5+
key: "docusign-download-documents",
6+
name: "Download Documents",
7+
description: "Download the documents of an envelope to the /tmp directory. [See the documentation here](https://developers.docusign.com/docs/esign-rest-api/how-to/download-envelope-documents/)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
docusign,
12+
account: {
13+
propDefinition: [
14+
docusign,
15+
"account",
16+
],
17+
},
18+
envelopeId: {
19+
type: "string",
20+
label: "Envelope ID",
21+
description: "Identifier of the envelope to download documents from",
22+
async options({ prevContext }) {
23+
const baseUri = await this.docusign.getBaseUri({
24+
accountId: this.account,
25+
});
26+
const { startPosition } = prevContext;
27+
const {
28+
envelopes = [], nextUri, endPosition,
29+
} = await this.docusign.listEnvelopes(baseUri, {
30+
start_position: startPosition,
31+
from_date: "2000-01-01",
32+
});
33+
return {
34+
options: envelopes.map(({
35+
envelopeId: value, emailSubject: label,
36+
}) => ({
37+
label,
38+
value,
39+
})),
40+
context: {
41+
startPosition: nextUri
42+
? endPosition + 1
43+
: undefined,
44+
},
45+
};
46+
},
47+
},
48+
downloadType: {
49+
type: "string",
50+
label: "Download Type",
51+
description: "Download envelope documents to the `/tmp` directory",
52+
options: [
53+
{
54+
label: "All Documents (PDF)",
55+
value: "combined",
56+
},
57+
{
58+
label: "All Documents (Zip)",
59+
value: "archive",
60+
},
61+
{
62+
label: "Certificate (PDF)",
63+
value: "certificate",
64+
},
65+
{
66+
label: "Portfolio (PDF)",
67+
value: "portfolio",
68+
},
69+
],
70+
},
71+
filename: {
72+
type: "string",
73+
label: "Filename",
74+
description: "The filename to save the file as in the `/tmp` directory including the file extension (.pdf or .zip)",
75+
},
76+
},
77+
methods: {
78+
getEnvelope($, baseUri, envelopeId) {
79+
return this.docusign._makeRequest({
80+
$,
81+
config: {
82+
url: `${baseUri}envelopes/${envelopeId}`,
83+
},
84+
});
85+
},
86+
async downloadToTmp($, baseUri, documentsUri, filePath) {
87+
const content = await this.docusign._makeRequest({
88+
$,
89+
config: {
90+
url: `${baseUri}${documentsUri.slice(1)}/${this.downloadType}`,
91+
responseType: "arraybuffer",
92+
},
93+
});
94+
const rawcontent = content.toString("base64");
95+
const buffer = Buffer.from(rawcontent, "base64");
96+
fs.writeFileSync(filePath, buffer);
97+
},
98+
},
99+
async run({ $ }) {
100+
const baseUri = await this.docusign.getBaseUri({
101+
accountId: this.account,
102+
});
103+
const envelope = await this.getEnvelope($, baseUri, this.envelopeId);
104+
const filePath = `/tmp/${this.filename}`;
105+
await this.downloadToTmp($, baseUri, envelope.documentsUri, filePath);
106+
107+
$.export("$summary", `Successfully downloaded files to ${filePath}`);
108+
109+
return filePath;
110+
},
111+
};

components/docusign/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/docusign",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Pipedream Docusign Components",
55
"main": "docusign.app.mjs",
66
"keywords": [

components/favro/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import app from "../../favro.app.mjs";
2+
3+
export default {
4+
key: "favro-create-organization",
5+
name: "Create Organization",
6+
description: "Creates a new organization. [See the documentation](https://favro.com/developer/#create-an-organization)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
name: {
12+
propDefinition: [
13+
app,
14+
"name",
15+
],
16+
},
17+
organizationId: {
18+
propDefinition: [
19+
app,
20+
"organizationId",
21+
],
22+
description: "Organization of the user that will be associated with the new organization",
23+
24+
},
25+
userId: {
26+
propDefinition: [
27+
app,
28+
"userId",
29+
(c) => ({
30+
organizationId: c.organizationId,
31+
}),
32+
],
33+
},
34+
role: {
35+
propDefinition: [
36+
app,
37+
"role",
38+
],
39+
},
40+
},
41+
42+
async run({ $ }) {
43+
const response = await this.app.createOrganization({
44+
$,
45+
data: {
46+
name: this.name,
47+
shareToUsers: [
48+
{
49+
userId: this.userId,
50+
role: this.role,
51+
},
52+
],
53+
},
54+
});
55+
56+
$.export("$summary", `Successfully created organization named ${this.name}`);
57+
58+
return response;
59+
},
60+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import app from "../../favro.app.mjs";
2+
3+
export default {
4+
key: "favro-list-users",
5+
name: "List Users",
6+
description: "List all users in the organization. [See the documentation](https://favro.com/developer/#get-all-users)",
7+
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
app,
12+
organizationId: {
13+
propDefinition: [
14+
app,
15+
"organizationId",
16+
],
17+
},
18+
},
19+
20+
async run({ $ }) {
21+
const response = await this.app.listUsers({
22+
$,
23+
organizationId: this.organizationId,
24+
});
25+
26+
$.export("$summary", `Successfully retrieved ${response.entities.length} user(s)`);
27+
28+
return response;
29+
},
30+
};
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import app from "../../favro.app.mjs";
2+
3+
export default {
4+
key: "favro-update-organization",
5+
name: "Update Organization",
6+
description: "Updates an existing organization. [See the documentation](https://favro.com/developer/#update-an-organization)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
organizationId: {
12+
propDefinition: [
13+
app,
14+
"organizationId",
15+
],
16+
},
17+
name: {
18+
propDefinition: [
19+
app,
20+
"name",
21+
],
22+
},
23+
userId: {
24+
propDefinition: [
25+
app,
26+
"userId",
27+
(c) => ({
28+
organizationId: c.organizationId,
29+
}),
30+
],
31+
},
32+
role: {
33+
propDefinition: [
34+
app,
35+
"role",
36+
],
37+
},
38+
},
39+
40+
async run({ $ }) {
41+
const response = await this.app.updateOrganization({
42+
$,
43+
organizationId: this.organizationId,
44+
headers: {
45+
organizationId: this.organizationId,
46+
},
47+
data: {
48+
name: this.name,
49+
shareToUsers: [
50+
{
51+
userId: this.userId,
52+
role: this.role,
53+
},
54+
],
55+
},
56+
});
57+
58+
$.export("$summary", `Successfully updated organization with ID '${this.organizationId}'`);
59+
60+
return response;
61+
},
62+
};

components/favro/app/favro.app.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
USER_ROLES: [
3+
"administrator",
4+
"fullMember",
5+
"externalMember",
6+
"guest",
7+
"disabled",
8+
],
9+
};

0 commit comments

Comments
 (0)