-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into issue-12428
- Loading branch information
Showing
55 changed files
with
2,142 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/[email protected].6 | ||
- uses: actions/[email protected].7 | ||
name: Checkout repo | ||
with: | ||
# See https://github.com/actions/checkout#checkout-v2 | ||
|
@@ -48,7 +48,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
@@ -137,7 +137,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
This file contains 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 |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected].6 | ||
- uses: actions/[email protected].7 | ||
name: Checkout repo | ||
with: | ||
# See https://github.com/actions/checkout#checkout-v2 | ||
|
This file contains 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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
@@ -117,7 +117,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
This file contains 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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
This file contains 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 |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: actions/[email protected].6 | ||
- uses: actions/[email protected].7 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.33.6 | ||
|
This file contains 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected].6 | ||
- uses: actions/[email protected].7 | ||
name: Checkout | ||
- uses: Ana06/[email protected] | ||
id: changed_files | ||
|
@@ -35,7 +35,7 @@ jobs: | |
done | ||
echo "files=${files}" >> $GITHUB_ENV | ||
- uses: rojopolis/spellcheck-github-actions@0.37.0 | ||
- uses: rojopolis/spellcheck-github-actions@0.38.0 | ||
name: Spellcheck | ||
if: ${{ env.files }} | ||
with: | ||
|
@@ -48,7 +48,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/[email protected].6 | ||
uses: actions/[email protected].7 | ||
with: | ||
# Full git history is needed to get a proper list of changed files | ||
# within `super-linter` | ||
|
77 changes: 77 additions & 0 deletions
77
components/acymailing/actions/add-update-user/add-update-user.mjs
This file contains 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,77 @@ | ||
import acymailing from "../../acymailing.app.mjs"; | ||
import { parseObject } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
key: "acymailing-add-update-user", | ||
name: "Add or Update User", | ||
description: "Creates a new user or updates an existing user in AcyMailing. If the user exists, will update the user's data with provided information. [See the documentation](https://docs.acymailing.com/v/rest-api/users#create-or-update-a-user)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
acymailing, | ||
email: { | ||
type: "string", | ||
label: "Email", | ||
description: "The email address is used when updating an existing user.", | ||
}, | ||
name: { | ||
type: "string", | ||
label: "Name", | ||
description: "Any character should be available.", | ||
optional: true, | ||
}, | ||
active: { | ||
type: "boolean", | ||
label: "Active", | ||
description: "Defaults to true.", | ||
optional: true, | ||
}, | ||
confirmed: { | ||
type: "boolean", | ||
label: "Confirmed", | ||
description: "The confirmation is related to the \"Require confirmation\" option in the configuration, tab \"Subscription\".", | ||
optional: true, | ||
}, | ||
cmsId: { | ||
type: "integer", | ||
label: "CMS Id", | ||
description: "The cms_id must match the ID of the corresponding Joomla/WordPress user.", | ||
optional: true, | ||
}, | ||
customFields: { | ||
type: "object", | ||
label: "Custom Fields", | ||
description: "An object of field Ids and values.", | ||
optional: true, | ||
}, | ||
triggers: { | ||
type: "boolean", | ||
label: "Triggers", | ||
description: "Defaults to true. Defines if the saving of the user triggers automated tasks like follow-up campaigns and automations.", | ||
optional: true, | ||
}, | ||
sendConf: { | ||
type: "boolean", | ||
label: "Send Conf", | ||
description: "Defaults to true. Defines if the confirmation email should be sent when a new user is created.", | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.acymailing.createUserOrUpdate({ | ||
$, | ||
data: { | ||
email: this.email, | ||
name: this.name, | ||
active: this.active, | ||
confirmed: this.confirmed, | ||
cmsId: this.cmsId, | ||
customFields: parseObject(this.customFields), | ||
triggers: this.triggers, | ||
sendConf: this.sendConf, | ||
}, | ||
}); | ||
$.export("$summary", `Successfully added or updated user with email with Id: ${response.userId}`); | ||
return response; | ||
}, | ||
}; |
This file contains 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,55 @@ | ||
import acymailing from "../../acymailing.app.mjs"; | ||
import { parseObject } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
key: "acymailing-email-user", | ||
name: "Email User", | ||
description: "Sends an email to a single AcyMailing user. The user must exist in the AcyMailing database. [See the documentation](https://docs.acymailing.com/v/rest-api/emails#send-an-email-to-a-user)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
acymailing, | ||
email: { | ||
type: "string", | ||
label: "Email", | ||
description: "The email address of the receiver.", | ||
}, | ||
autoAddUser: { | ||
type: "boolean", | ||
label: "Auto Add User", | ||
description: "Defaults to false. If the email address doesn't match an existing AcyMailing user, one will be automatically created if this option is set to true.", | ||
optional: true, | ||
}, | ||
emailId: { | ||
type: "integer", | ||
label: "Email Id", | ||
description: "The mail ID to send. This is not a campaign ID but the mail ID of the table xxx_acym_mail in the database, or the mail_id of a campaign.", | ||
}, | ||
trackEmail: { | ||
type: "boolean", | ||
label: "Track Email", | ||
description: "Defaults to true. If true, the open/click statistics will be collected for this email.", | ||
optional: true, | ||
}, | ||
params: { | ||
type: "object", | ||
label: "Params", | ||
description: "An object of shortcodes and values to replace in the body of the sent email. Example: { \"shortcode1\": \"value 1\" }. If the body of the sent email contains the text \"{shortcode1}\", it will be replaced by \"value 1\" in the sent version.", | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.acymailing.sendEmailToUser({ | ||
$, | ||
data: { | ||
email: this.email, | ||
autoAddUser: this.autoAddUser, | ||
emailId: this.emailId, | ||
trackEmail: this.trackEmail, | ||
params: parseObject(this.params), | ||
}, | ||
}); | ||
$.export("$summary", `Email successfully sent to ${this.email}`); | ||
return response; | ||
}, | ||
}; |
51 changes: 51 additions & 0 deletions
51
components/acymailing/actions/subscribe-user/subscribe-user.mjs
This file contains 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,51 @@ | ||
import acymailing from "../../acymailing.app.mjs"; | ||
import { parseObject } from "../../common/utils.mjs"; | ||
|
||
export default { | ||
key: "acymailing-subscribe-user", | ||
name: "Subscribe User to Lists", | ||
description: "Subscribes a user to one or more specified lists in AcyMailing. [See the documentation](https://docs.acymailing.com/v/rest-api/subscription#subscribe-users-to-lists)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
acymailing, | ||
emails: { | ||
propDefinition: [ | ||
acymailing, | ||
"emails", | ||
], | ||
}, | ||
listIds: { | ||
propDefinition: [ | ||
acymailing, | ||
"listIds", | ||
], | ||
}, | ||
sendWelcomeEmail: { | ||
type: "boolean", | ||
label: "Send Welcome Email", | ||
description: "Defaults to true. If true, the welcome emails will be sent if the lists have one.", | ||
optional: true, | ||
}, | ||
trigger: { | ||
type: "boolean", | ||
label: "Trigger", | ||
description: "Defaults to true. If you want to trigger or not the automation or follow-up when subscribing the user.", | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.acymailing.subscribeUserToLists({ | ||
$, | ||
data: { | ||
emails: parseObject(this.emails), | ||
listIds: parseObject(this.listIds), | ||
sendWelcomeEmail: this.sendWelcomeEmail, | ||
trigger: this.trigger, | ||
}, | ||
}); | ||
|
||
$.export("$summary", `Successfully subscribed ${this.emails.length} users to lists ${this.listIds.length} lists`); | ||
return response; | ||
}, | ||
}; |
Oops, something went wrong.