-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Loops.so new components #14226
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
Merged
Loops.so new components #14226
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
34f121e
Delete Contact
GTFalcao 47d48dd
List Mailing Lists
GTFalcao b4548ea
List Custom Fields
GTFalcao c1ae5fc
Version bumps
GTFalcao 6025a7b
pnpm
GTFalcao bccfb74
syntax adjustment
GTFalcao b3afeca
Update components/loops_so/actions/send-transactional-email/send-tran…
GTFalcao 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
There are no files selected for viewing
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
54 changes: 54 additions & 0 deletions
54
components/loops_so/actions/delete-contact/delete-contact.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,54 @@ | ||
| import { ConfigurationError } from "@pipedream/platform"; | ||
| import loops from "../../loops_so.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "loops_so-delete-contact", | ||
| name: "Delete Contact", | ||
| description: "Delete an existing contact. [See the documentation](https://loops.so/docs/api-reference/delete-contact)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| loops, | ||
| infoAlert: { | ||
| type: "alert", | ||
| alertType: "info", | ||
| content: "You can provide either the contact's email address or user ID.", | ||
| }, | ||
| email: { | ||
| propDefinition: [ | ||
| loops, | ||
| "email", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| userId: { | ||
| type: "string", | ||
| label: "User ID", | ||
| description: "User ID of the contact", | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { | ||
| loops, email, userId, | ||
| } = this; | ||
| if (!email && !userId) { | ||
| throw new ConfigurationError("You must provide either the contact's email address or user ID."); | ||
| } | ||
| const response = await loops.deleteContact({ | ||
| $, | ||
| data: { | ||
| email, | ||
| userId, | ||
| }, | ||
| }); | ||
|
|
||
| const summary = response?.success | ||
| ? "Successfully deleted contact" | ||
| : "Failed to delete contact"; | ||
|
|
||
| $.export("$summary", summary); | ||
|
|
||
| return response; | ||
| }, | ||
| }; | ||
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
21 changes: 21 additions & 0 deletions
21
components/loops_so/actions/list-custom-fields/list-custom-fields.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,21 @@ | ||
| import loops from "../../loops_so.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "loops_so-list-custom-fields", | ||
| name: "List Custom Fields", | ||
| description: "List your account's custom contact properties. [See the documentation](https://loops.so/docs/api-reference/list-custom-fields)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| loops, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.loops.listCustomFields({ | ||
| $, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved ${response.length} custom fields`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
21 changes: 21 additions & 0 deletions
21
components/loops_so/actions/list-mailing-lists/list-mailing-lists.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,21 @@ | ||
| import loops from "../../loops_so.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "loops_so-list-mailing-lists", | ||
| name: "List Mailing Lists", | ||
| description: "List your account's mailing lists. [See the documentation](https://loops.so/docs/api-reference/list-mailing-lists)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| loops, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.loops.listMailingLists({ | ||
| $, | ||
| }); | ||
|
|
||
| $.export("$summary", `Successfully retrieved ${response.length} mailing lists`); | ||
|
|
||
| return response; | ||
| }, | ||
| }; |
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.