-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Fynk components #19393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michelle0927
merged 17 commits into
PipedreamHQ:master
from
sergio-eliot-rodriguez:fynk-components
Dec 10, 2025
Merged
Fynk components #19393
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
db49599
fynk components
0909007
mod pnpm-lock
0bf6f75
fynk components except upload contract
6497d12
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez 9c7660f
fix eslint on package file
5ff8ca5
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez dcdd6a7
Update components/fynk/actions/create-contract-from-template/create-c…
sergio-eliot-rodriguez 7a4ac13
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez ddd15fb
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez 80d1337
Update components/fynk/actions/update-contract-party/update-contract-…
sergio-eliot-rodriguez ea79f26
performs metadata value check depending on the metadata value type
1cdd92b
Merge branch 'PipedreamHQ:master' into fynk-components
sergio-eliot-rodriguez f80fd37
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez 0b95252
Update components/fynk/actions/move-contract-stage/move-contract-stag…
sergio-eliot-rodriguez 54f7fb7
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez 515d32b
Update components/fynk/actions/update-contract-metadata/update-contra…
sergio-eliot-rodriguez 5e93ded
add the use of ConfigurationError for error handling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
components/fynk/actions/create-contract-from-template/create-contract-from-template.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | ||
| }, | ||
| }; | ||
|
|
97 changes: 97 additions & 0 deletions
97
components/fynk/actions/move-contract-stage/move-contract-stage.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| }, | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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; | ||
| }, | ||
michelle0927 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.