-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New Components - add_to_calendar_pro #17332
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
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
32b1d60
wip
michelle0927 c5969a4
wip
michelle0927 66b0e43
actions
michelle0927 650e4be
sources
michelle0927 0bd6461
pnpm-lock.yaml
michelle0927 3ab6ba1
updates
michelle0927 ef8a66b
updates
michelle0927 e7c333e
fix prop
michelle0927 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
67 changes: 67 additions & 0 deletions
67
components/add_to_calendar_pro/actions/create-event-group/create-event-group.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,67 @@ | ||
| import addToCalendarPro from "../../add_to_calendar_pro.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "add_to_calendar_pro-create-event-group", | ||
| name: "Create Event Group", | ||
| description: "Create an event group. [See the documentation](https://docs.add-to-calendar-pro.com/api/groups#add-a-group)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| addToCalendarPro, | ||
| eventGroupName: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "eventGroupName", | ||
| ], | ||
| }, | ||
| internalNote: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "internalNote", | ||
| ], | ||
| }, | ||
| subscriptionCallUrl: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "subscriptionCallUrl", | ||
| ], | ||
| }, | ||
| cta: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "cta", | ||
| ], | ||
| }, | ||
| styleId: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "styleId", | ||
| ], | ||
| }, | ||
| landingPageTemplateId: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "landingPageTemplateId", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.addToCalendarPro.createGroup({ | ||
| $, | ||
| data: { | ||
| name: this.eventGroupName, | ||
| internal_note: this.internalNote, | ||
| subscription: this.subscriptionCallUrl | ||
| ? "external" | ||
| : "no", | ||
| subscription_call_url: this.subscriptionCallUrl, | ||
| cta: this.cta, | ||
| layout: this.styleId, | ||
| landingpage: this.landingPageTemplateId, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully created event group."); | ||
| return response; | ||
| }, | ||
| }; |
131 changes: 131 additions & 0 deletions
131
components/add_to_calendar_pro/actions/create-event/create-event.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,131 @@ | ||
| import addToCalendarPro from "../../add_to_calendar_pro.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "add_to_calendar_pro-create-event", | ||
| name: "Create Event", | ||
| description: "Create an event in a group. [See the documentation](https://docs.add-to-calendar-pro.com/api/events#add-an-event)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| addToCalendarPro, | ||
| groupProKey: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "groupProKey", | ||
| ], | ||
| }, | ||
| name: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "eventName", | ||
| ], | ||
| }, | ||
| startDate: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "startDate", | ||
| ], | ||
| }, | ||
| startTime: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "startTime", | ||
| ], | ||
| }, | ||
| endDate: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "endDate", | ||
| ], | ||
| }, | ||
| endTime: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "endTime", | ||
| ], | ||
| }, | ||
| timeZone: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "timeZone", | ||
| ], | ||
| }, | ||
| description: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "description", | ||
| ], | ||
| }, | ||
| location: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "location", | ||
| ], | ||
| }, | ||
| rsvp: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "rsvp", | ||
| ], | ||
| }, | ||
| distribution: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "distribution", | ||
| ], | ||
| }, | ||
| hideButton: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "hideButton", | ||
| ], | ||
| }, | ||
| cta: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "cta", | ||
| ], | ||
| }, | ||
| styleId: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "styleId", | ||
| ], | ||
| }, | ||
| landingPageTemplateId: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "landingPageTemplateId", | ||
| ], | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const event = await this.addToCalendarPro.createEvent({ | ||
| $, | ||
| data: { | ||
| event_group: this.groupProKey, | ||
| dates: [ | ||
| { | ||
| name: this.name, | ||
| startDate: this.startDate, | ||
| startTime: this.startTime, | ||
| endDate: this.endDate, | ||
| endTime: this.endTime, | ||
| timeZone: this.timeZone, | ||
| description: this.description, | ||
| location: this.location, | ||
| }, | ||
| ], | ||
| rsvp: this.rsvp, | ||
| distribution: this.distribution, | ||
| hideButton: this.hideButton, | ||
| cta: this.cta, | ||
| layout: this.styleId, | ||
| landingpage: this.landingPageTemplateId, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully created event."); | ||
| return event; | ||
| }, | ||
| }; |
105 changes: 105 additions & 0 deletions
105
...add_to_calendar_pro/actions/create-landing-page-template/create-landing-page-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,105 @@ | ||
| import addToCalendarPro from "../../add_to_calendar_pro.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "add_to_calendar_pro-create-landing-page-template", | ||
| name: "Create Landing Page Template", | ||
| description: "Create a landing page template. [See the documentation](https://docs.add-to-calendar-pro.com/api/landingpages#add-a-landing-page-template)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| addToCalendarPro, | ||
| name: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "landingPageTemplateName", | ||
| ], | ||
| }, | ||
| title: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "title", | ||
| ], | ||
| }, | ||
| intro: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "intro", | ||
| ], | ||
| }, | ||
| legal: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "legal", | ||
| ], | ||
| }, | ||
| highlightColor: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "highlightColor", | ||
| ], | ||
| }, | ||
| backgroundColor1: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "backgroundColor1", | ||
| ], | ||
| }, | ||
| backgroundColor2: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "backgroundColor2", | ||
| ], | ||
| }, | ||
| background: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "background", | ||
| ], | ||
| }, | ||
| gradientDirection: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "gradientDirection", | ||
| ], | ||
| }, | ||
| imageRepeat: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "imageRepeat", | ||
| ], | ||
| }, | ||
| metaTitleOverride: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "metaTitleOverride", | ||
| ], | ||
| }, | ||
| metaDescriptionOverride: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "metaDescriptionOverride", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.addToCalendarPro.createLandingPageTemplate({ | ||
| $, | ||
| data: { | ||
| name: this.name, | ||
| title: this.title, | ||
| intro: this.intro, | ||
| legal: this.legal, | ||
| highlight_color: this.highlightColor, | ||
| background_color_1: this.backgroundColor1, | ||
| background_color_2: this.backgroundColor2, | ||
| background: this.background, | ||
| gradient_direction: this.gradientDirection, | ||
| image_repeat: this.imageRepeat, | ||
| meta_title_override: this.metaTitleOverride, | ||
| meta_description_override: this.metaDescriptionOverride, | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully created landing page template."); | ||
| return response; | ||
| }, | ||
| }; |
92 changes: 92 additions & 0 deletions
92
components/add_to_calendar_pro/actions/create-rsvp-template/create-rsvp-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,92 @@ | ||
| import addToCalendarPro from "../../add_to_calendar_pro.app.mjs"; | ||
| import { parseObject } from "../../common/utils.mjs"; | ||
|
|
||
| export default { | ||
| key: "add_to_calendar_pro-create-rsvp-template", | ||
| name: "Create RSVP Template", | ||
| description: "Create an RSVP template. [See the documentation](https://docs.add-to-calendar-pro.com/api/rsvp#add-an-rsvp-template)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| addToCalendarPro, | ||
| rsvpTemplateName: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "rsvpTemplateName", | ||
| ], | ||
| }, | ||
| max: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "rsvpTemplateMax", | ||
| ], | ||
| }, | ||
| maxPP: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "rsvpTemplateMaxPP", | ||
| ], | ||
| }, | ||
| expires: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "expires", | ||
| ], | ||
| }, | ||
| maybeOption: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "maybeOption", | ||
| ], | ||
| }, | ||
| initialConfirmation: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "initialConfirmation", | ||
| ], | ||
| }, | ||
| doi: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "doi", | ||
| ], | ||
| }, | ||
| headline: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "headline", | ||
| ], | ||
| }, | ||
| text: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "text", | ||
| ], | ||
| }, | ||
| fields: { | ||
| propDefinition: [ | ||
| addToCalendarPro, | ||
| "fields", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.addToCalendarPro.createRsvpTemplate({ | ||
| $, | ||
| data: { | ||
| name: this.rsvpTemplateName, | ||
| max: this.max, | ||
| maxpp: this.maxPP, | ||
| expires: this.expires, | ||
| maybe_option: this.maybeOption, | ||
| initial_confirmation: this.initialConfirmation, | ||
| doi: this.doi, | ||
| headline: this.headline, | ||
| text: this.text, | ||
| fields: parseObject(this.fields), | ||
| }, | ||
| }); | ||
| $.export("$summary", "Successfully created RSVP template."); | ||
| return response; | ||
| }, | ||
| }; | ||
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.