Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
db49599
fynk components
Dec 7, 2025
0909007
mod pnpm-lock
Dec 7, 2025
0bf6f75
fynk components except upload contract
Dec 8, 2025
6497d12
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez Dec 8, 2025
9c7660f
fix eslint on package file
Dec 8, 2025
5ff8ca5
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez Dec 9, 2025
dcdd6a7
Update components/fynk/actions/create-contract-from-template/create-c…
sergio-eliot-rodriguez Dec 9, 2025
7a4ac13
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez Dec 9, 2025
ddd15fb
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez Dec 9, 2025
80d1337
Update components/fynk/actions/update-contract-party/update-contract-…
sergio-eliot-rodriguez Dec 9, 2025
ea79f26
performs metadata value check depending on the metadata value type
Dec 9, 2025
1cdd92b
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez Dec 9, 2025
f80fd37
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez Dec 9, 2025
0b95252
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez Dec 9, 2025
54f7fb7
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez Dec 9, 2025
515d32b
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez Dec 9, 2025
5e93ded
add the use of ConfigurationError for error handling
Dec 9, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import fynk from "../../fynk.app.mjs";

export default {
key: "fynk-create-contract-from-template",
name: "Create Contract from Template",
description: "Create a new contract in Fynk based on an existing template. [See the documentation](https://app.fynk.com/v1/docs#/operations/v1.documents.create-from-template).",
version: "0.0.1",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
fynk,
templateUuid: {
propDefinition: [
fynk,
"templateUuid",
],
},
name: {
type: "string",
label: "Name",
description: "The new document's name. If omitted, the name of the template will be used as the new document's name",
optional: true,
},
ownerEmails: {
type: "string[]",
label: "Owner Emails",
description: "Email addresses of the user(s) from your account who should be given ownership of the new document",
optional: true,
},
},
async run({ $ }) {
const {
templateUuid,
name,
ownerEmails,
} = this;

const data = {
template_uuid: templateUuid,
name,
owner_emails: ownerEmails,
};

const response = await this.fynk.createDocumentFromTemplate({
$,
data,
});

$.export("$summary", `Successfully created contract "${response.data.name}" with UUID ${response.data.uuid}`);
return response;
},
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import fynk from "../../fynk.app.mjs";
import { ConfigurationError } from "@pipedream/platform";

export default {
key: "fynk-move-contract-stage",
name: "Move Contract Stage",
description: "Move a contract forward in Fynk's lifecycle. See documentation pages [move document to review stage](https://app.fynk.com/v1/docs#/operations/v1.documents.stage-transitions.review) and [move document to signing stage](https://app.fynk.com/v1/docs#/operations/v1.documents.stage-transitions.signing).",
version: "0.0.1",
annotations: {
destructiveHint: true,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
fynk,
documentUuid: {
propDefinition: [
fynk,
"documentUuid",
],
},
targetStage: {
propDefinition: [
fynk,
"targetStage",
],
},
signatureType: {
type: "string",
label: "Signature Type",
description: "The signature type to use when moving to signing stage. Only used when `Target Stage` is set to `signing`",
optional: true,
options: [
{
label: "Simple Electronic Signature (SES)",
value: "ses",
},
{
label: "Advanced Electronic Signature (AES)",
value: "aes",
},
{
label: "Qualified Electronic Signature (QES)",
value: "qes",
},
],
},
sequentialSigning: {
type: "boolean",
label: "Sequential Signing",
description: "If `true`, signatures will be requested in the order defined by the signatories' `signing_order`. Only used when `Target Stage` is set to `signing`",
optional: true,
},
message: {
type: "string",
label: "Message",
description: "Message to include in the email sent to the document's signatories. This is included in addition to the default email text provided by fynk. Only used when `Target Stage` is set to `signing`",
optional: true,
},
},
async run({ $ }) {
const {
documentUuid,
targetStage,
signatureType,
sequentialSigning,
message,
} = this;

let response;
if (targetStage === "review") {
response = await this.fynk.moveDocumentToReview({
$,
documentUuid,
});
} else if (targetStage === "signing") {
const data = {
signature_type: signatureType,
sequential_signing: sequentialSigning,
message,
};

response = await this.fynk.moveDocumentToSigning({
$,
documentUuid,
data,
});
} else {
throw new ConfigurationError(`Invalid target stage: ${targetStage}`);
}

$.export("$summary", `Successfully moved contract ${documentUuid} to ${targetStage} stage`);
return response;
},
};

Loading
Loading