@activepieces/piece-savvycal 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/i18n/de.json +128 -72
- package/src/i18n/es.json +129 -73
- package/src/i18n/fr.json +105 -76
- package/src/i18n/ja.json +128 -72
- package/src/i18n/nl.json +128 -72
- package/src/i18n/pt.json +129 -73
- package/src/i18n/translation.json +61 -58
- package/src/i18n/zh.json +98 -42
- package/src/index.js +7 -7
- package/src/index.js.map +1 -1
- package/src/lib/actions/create-event.d.ts +5 -0
- package/src/lib/actions/create-event.js +139 -9
- package/src/lib/actions/create-event.js.map +1 -1
- package/src/lib/actions/list-events.js +6 -0
- package/src/lib/actions/list-events.js.map +1 -1
- package/src/lib/auth.d.ts +2 -10
- package/src/lib/auth.js +4 -3
- package/src/lib/auth.js.map +1 -1
- package/src/lib/common/index.d.ts +15 -0
|
@@ -1,56 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Scheduling tool that lets invitees overlay their calendar when picking a time.": "Scheduling tool that lets invitees overlay their calendar when picking a time.",
|
|
3
|
-
"To get your SavvyCal API token:\n1. Log in to your SavvyCal account at https://savvycal.com\n2. Go to **Settings > Developers**\n3. Under **Personal Tokens**, click **Create a token**\n4. Give it a name, then click the **...** menu next to it to view the token\n5. Copy the **Private Key** (starts with `pt_secret_`) — not the Public Key\n\n**Note:** Keep this token secret — it gives full access to your SavvyCal account.": "To get your SavvyCal API token:\n1. Log in to your SavvyCal account at https://savvycal.com\n2. Go to **Settings > Developers**\n3. Under **Personal Tokens**, click **Create a token**\n4. Give it a name, then click the **...** menu next to it to view the token\n5. Copy the **Private Key** (starts with `pt_secret_`) — not the Public Key\n\n**Note:** Keep this token secret — it gives full access to your SavvyCal account.",
|
|
4
|
-
"Personal Access Token (Private Key)": "Personal Access Token (Private Key)",
|
|
5
|
-
"Get Current User": "Get Current User",
|
|
6
|
-
"List Events": "List Events",
|
|
7
|
-
"Get Event": "Get Event",
|
|
8
|
-
"Cancel Event": "Cancel Event",
|
|
9
3
|
"Create Event": "Create Event",
|
|
4
|
+
"Cancel Event": "Cancel Event",
|
|
5
|
+
"Get Event": "Get Event",
|
|
6
|
+
"List Events": "List Events",
|
|
10
7
|
"Find Events by Attendee Email": "Find Events by Attendee Email",
|
|
11
8
|
"List Scheduling Links": "List Scheduling Links",
|
|
9
|
+
"Get Scheduling Link": "Get Scheduling Link",
|
|
10
|
+
"Get Available Slots": "Get Available Slots",
|
|
11
|
+
"Toggle Scheduling Link": "Toggle Scheduling Link",
|
|
12
|
+
"Duplicate Scheduling Link": "Duplicate Scheduling Link",
|
|
13
|
+
"Delete Scheduling Link": "Delete Scheduling Link",
|
|
14
|
+
"List Workflows": "List Workflows",
|
|
15
|
+
"Get Workflow Rules": "Get Workflow Rules",
|
|
16
|
+
"Get Current User": "Get Current User",
|
|
12
17
|
"Custom API Call": "Custom API Call",
|
|
13
|
-
"Retrieves the profile of the currently authenticated SavvyCal user.": "Retrieves the profile of the currently authenticated SavvyCal user.",
|
|
14
|
-
"Returns a list of scheduled meetings from your SavvyCal account.": "Returns a list of scheduled meetings from your SavvyCal account.",
|
|
15
|
-
"Retrieves the details of a specific scheduled meeting by its ID.": "Retrieves the details of a specific scheduled meeting by its ID.",
|
|
16
|
-
"Cancels a scheduled meeting in SavvyCal.": "Cancels a scheduled meeting in SavvyCal.",
|
|
17
18
|
"Books a meeting on a scheduling link at a specific time slot.": "Books a meeting on a scheduling link at a specific time slot.",
|
|
19
|
+
"Cancels a scheduled meeting in SavvyCal.": "Cancels a scheduled meeting in SavvyCal.",
|
|
20
|
+
"Retrieves the details of a specific scheduled meeting by its ID.": "Retrieves the details of a specific scheduled meeting by its ID.",
|
|
21
|
+
"Returns a list of scheduled meetings from your SavvyCal account.": "Returns a list of scheduled meetings from your SavvyCal account.",
|
|
18
22
|
"Returns all events where the attendee's email matches the given address.": "Returns all events where the attendee's email matches the given address.",
|
|
19
23
|
"Returns all scheduling links configured in your SavvyCal account.": "Returns all scheduling links configured in your SavvyCal account.",
|
|
20
|
-
"Get Scheduling Link": "Get Scheduling Link",
|
|
21
24
|
"Retrieves the details of a specific scheduling link by its ID.": "Retrieves the details of a specific scheduling link by its ID.",
|
|
22
|
-
"Delete Scheduling Link": "Delete Scheduling Link",
|
|
23
|
-
"Permanently deletes a scheduling link from your SavvyCal account.": "Permanently deletes a scheduling link from your SavvyCal account.",
|
|
24
|
-
"Duplicate Scheduling Link": "Duplicate Scheduling Link",
|
|
25
|
-
"Creates a copy of an existing scheduling link.": "Creates a copy of an existing scheduling link.",
|
|
26
|
-
"Toggle Scheduling Link": "Toggle Scheduling Link",
|
|
27
|
-
"Switches a scheduling link between active and disabled states.": "Switches a scheduling link between active and disabled states.",
|
|
28
|
-
"Get Available Slots": "Get Available Slots",
|
|
29
25
|
"Returns available time slots for booking on a scheduling link. Useful for displaying availability or for picking a slot before calling Create Event.": "Returns available time slots for booking on a scheduling link. Useful for displaying availability or for picking a slot before calling Create Event.",
|
|
30
|
-
"
|
|
26
|
+
"Switches a scheduling link between active and disabled states.": "Switches a scheduling link between active and disabled states.",
|
|
27
|
+
"Creates a copy of an existing scheduling link.": "Creates a copy of an existing scheduling link.",
|
|
28
|
+
"Permanently deletes a scheduling link from your SavvyCal account.": "Permanently deletes a scheduling link from your SavvyCal account.",
|
|
31
29
|
"Returns all workflows configured in your SavvyCal account.": "Returns all workflows configured in your SavvyCal account.",
|
|
32
|
-
"Get Workflow Rules": "Get Workflow Rules",
|
|
33
30
|
"Returns the rules configured for a specific workflow.": "Returns the rules configured for a specific workflow.",
|
|
34
|
-
"
|
|
35
|
-
"Select the scheduling link to delete. This action cannot be undone.": "Select the scheduling link to delete. This action cannot be undone.",
|
|
36
|
-
"Select the scheduling link to duplicate.": "Select the scheduling link to duplicate.",
|
|
37
|
-
"Select the scheduling link to toggle.": "Select the scheduling link to toggle.",
|
|
38
|
-
"Select the scheduling link to query slots for.": "Select the scheduling link to query slots for.",
|
|
39
|
-
"Workflow": "Workflow",
|
|
40
|
-
"Select the workflow whose rules you want to retrieve.": "Select the workflow whose rules you want to retrieve.",
|
|
41
|
-
"Failed to load workflows.": "Failed to load workflows.",
|
|
31
|
+
"Retrieves the profile of the currently authenticated SavvyCal user.": "Retrieves the profile of the currently authenticated SavvyCal user.",
|
|
42
32
|
"Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
|
|
43
|
-
"
|
|
44
|
-
"Start After": "Start After",
|
|
45
|
-
"Start Before": "Start Before",
|
|
33
|
+
"Team": "Team",
|
|
46
34
|
"Scheduling Link": "Scheduling Link",
|
|
47
|
-
"Scheduling Links": "Scheduling Links",
|
|
48
|
-
"Maximum Results": "Maximum Results",
|
|
49
|
-
"Event ID": "Event ID",
|
|
50
35
|
"Start Time": "Start Time",
|
|
51
36
|
"End Time": "End Time",
|
|
52
37
|
"Attendee Name": "Attendee Name",
|
|
53
38
|
"Attendee Email": "Attendee Email",
|
|
39
|
+
"Time Zone": "Time Zone",
|
|
40
|
+
"Phone Number": "Phone Number",
|
|
41
|
+
"Custom Fields": "Custom Fields",
|
|
42
|
+
"Metadata": "Metadata",
|
|
43
|
+
"Event ID": "Event ID",
|
|
44
|
+
"State": "State",
|
|
45
|
+
"Start After": "Start After",
|
|
46
|
+
"Start Before": "Start Before",
|
|
47
|
+
"Scheduling Links": "Scheduling Links",
|
|
48
|
+
"Maximum Results": "Maximum Results",
|
|
49
|
+
"Workflow": "Workflow",
|
|
54
50
|
"Method": "Method",
|
|
55
51
|
"Headers": "Headers",
|
|
56
52
|
"Query Parameters": "Query Parameters",
|
|
@@ -60,28 +56,42 @@
|
|
|
60
56
|
"No Error on Failure": "No Error on Failure",
|
|
61
57
|
"Timeout (in seconds)": "Timeout (in seconds)",
|
|
62
58
|
"Follow redirects": "Follow redirects",
|
|
63
|
-
"Filter
|
|
64
|
-
"Only return events that start after this date and time.": "Only return events that start after this date and time.",
|
|
65
|
-
"Only return events that start before this date and time.": "Only return events that start before this date and time.",
|
|
66
|
-
"Only return events booked through the selected scheduling links. Leave empty for all links.": "Only return events booked through the selected scheduling links. Leave empty for all links.",
|
|
67
|
-
"Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.": "Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.",
|
|
68
|
-
"Maximum number of events to return. Leave empty to return all matching events.": "Maximum number of events to return. Leave empty to return all matching events.",
|
|
69
|
-
"The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.": "The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.",
|
|
70
|
-
"The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.": "The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.",
|
|
59
|
+
"Filter scheduling links by team. Leave empty to show all teams.": "Filter scheduling links by team. Leave empty to show all teams.",
|
|
71
60
|
"Select the scheduling link to book a meeting on.": "Select the scheduling link to book a meeting on.",
|
|
72
61
|
"The start date and time of the meeting. Must match an available slot on the scheduling link.": "The start date and time of the meeting. Must match an available slot on the scheduling link.",
|
|
73
62
|
"The End date and time of the meeting": "The End date and time of the meeting",
|
|
74
63
|
"Full name of the person booking the meeting.": "Full name of the person booking the meeting.",
|
|
75
64
|
"Email address of the person booking the meeting.": "Email address of the person booking the meeting.",
|
|
76
|
-
"Time Zone": "Time Zone",
|
|
77
65
|
"Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).": "Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).",
|
|
66
|
+
"Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.": "Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.",
|
|
67
|
+
"Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.": "Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.",
|
|
68
|
+
"Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.": "Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.",
|
|
69
|
+
"The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.": "The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.",
|
|
70
|
+
"The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.": "The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.",
|
|
71
|
+
"Filter events by their current status. Leave empty to return all statuses.": "Filter events by their current status. Leave empty to return all statuses.",
|
|
72
|
+
"Only return events that start after this date and time.": "Only return events that start after this date and time.",
|
|
73
|
+
"Only return events that start before this date and time.": "Only return events that start before this date and time.",
|
|
74
|
+
"Only return events booked through the selected scheduling links. Leave empty for all links.": "Only return events booked through the selected scheduling links. Leave empty for all links.",
|
|
75
|
+
"Maximum number of events to return. Leave empty to return all matching events.": "Maximum number of events to return. Leave empty to return all matching events.",
|
|
78
76
|
"The email address of the attendee to search for.": "The email address of the attendee to search for.",
|
|
79
77
|
"Only search events starting after this date. Use this to limit the search scope and improve performance.": "Only search events starting after this date. Use this to limit the search scope and improve performance.",
|
|
80
78
|
"Only search events starting before this date.": "Only search events starting before this date.",
|
|
79
|
+
"Select the scheduling link to retrieve.": "Select the scheduling link to retrieve.",
|
|
80
|
+
"Select the scheduling link to query slots for.": "Select the scheduling link to query slots for.",
|
|
81
|
+
"Select the scheduling link to toggle.": "Select the scheduling link to toggle.",
|
|
82
|
+
"Select the scheduling link to duplicate.": "Select the scheduling link to duplicate.",
|
|
83
|
+
"Select the scheduling link to delete. This action cannot be undone.": "Select the scheduling link to delete. This action cannot be undone.",
|
|
84
|
+
"Select the workflow whose rules you want to retrieve.": "Select the workflow whose rules you want to retrieve.",
|
|
81
85
|
"Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
|
|
82
86
|
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
83
87
|
"Confirmed": "Confirmed",
|
|
84
88
|
"Canceled": "Canceled",
|
|
89
|
+
"Awaiting Reschedule": "Awaiting Reschedule",
|
|
90
|
+
"Awaiting Checkout": "Awaiting Checkout",
|
|
91
|
+
"Checkout Expired": "Checkout Expired",
|
|
92
|
+
"Awaiting Approval": "Awaiting Approval",
|
|
93
|
+
"Declined": "Declined",
|
|
94
|
+
"Tentative": "Tentative",
|
|
85
95
|
"GET": "GET",
|
|
86
96
|
"POST": "POST",
|
|
87
97
|
"PATCH": "PATCH",
|
|
@@ -93,14 +103,16 @@
|
|
|
93
103
|
"Form Data": "Form Data",
|
|
94
104
|
"Raw": "Raw",
|
|
95
105
|
"New Event": "New Event",
|
|
96
|
-
"Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.": "Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.",
|
|
97
|
-
"Event Types": "Event Types",
|
|
98
|
-
"Select which event types to trigger on. Leave empty to trigger on all event types.": "Select which event types to trigger on. Leave empty to trigger on all event types.",
|
|
99
106
|
"New Poll Response": "New Poll Response",
|
|
107
|
+
"Workflow Action Triggered": "Workflow Action Triggered",
|
|
108
|
+
"Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.": "Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.",
|
|
100
109
|
"Triggers when a poll response is created or updated in SavvyCal.": "Triggers when a poll response is created or updated in SavvyCal.",
|
|
110
|
+
"Triggers when a workflow action is triggered in SavvyCal.": "Triggers when a workflow action is triggered in SavvyCal.",
|
|
111
|
+
"Event Types": "Event Types",
|
|
101
112
|
"Poll Response Types": "Poll Response Types",
|
|
113
|
+
"Select which event types to trigger on. Leave empty to trigger on all event types.": "Select which event types to trigger on. Leave empty to trigger on all event types.",
|
|
114
|
+
"Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.": "Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.",
|
|
102
115
|
"Select which poll response types to trigger on. Leave empty to trigger on all poll response types.": "Select which poll response types to trigger on. Leave empty to trigger on all poll response types.",
|
|
103
|
-
"Triggers when a workflow action is triggered in SavvyCal.": "Triggers when a workflow action is triggered in SavvyCal.",
|
|
104
116
|
"Event Created": "Event Created",
|
|
105
117
|
"Event Requested": "Event Requested",
|
|
106
118
|
"Event Approved": "Event Approved",
|
|
@@ -109,19 +121,10 @@
|
|
|
109
121
|
"Event Changed": "Event Changed",
|
|
110
122
|
"Event Canceled": "Event Canceled",
|
|
111
123
|
"Checkout Pending": "Checkout Pending",
|
|
112
|
-
"Checkout Expired": "Checkout Expired",
|
|
113
124
|
"Checkout Completed": "Checkout Completed",
|
|
114
125
|
"Attendee Added": "Attendee Added",
|
|
115
126
|
"Attendee Canceled": "Attendee Canceled",
|
|
116
127
|
"Attendee Rescheduled": "Attendee Rescheduled",
|
|
117
128
|
"Poll Response Created": "Poll Response Created",
|
|
118
|
-
"Poll Response Updated": "Poll Response Updated"
|
|
119
|
-
|
|
120
|
-
"Please connect your account first": "Please connect your account first",
|
|
121
|
-
"Failed to load scheduling links.": "Failed to load scheduling links.",
|
|
122
|
-
"Failed to load scheduling links. Check your connection.": "Failed to load scheduling links. Check your connection.",
|
|
123
|
-
"Team": "Team",
|
|
124
|
-
"Filter scheduling links by team. Leave empty to show all teams.": "Filter scheduling links by team. Leave empty to show all teams.",
|
|
125
|
-
"Personal": "Personal",
|
|
126
|
-
"Failed to load teams.": "Failed to load teams."
|
|
127
|
-
}
|
|
129
|
+
"Poll Response Updated": "Poll Response Updated"
|
|
130
|
+
}
|
package/src/i18n/zh.json
CHANGED
|
@@ -1,53 +1,118 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"Cancel Event": "Cancel Event",
|
|
4
|
-
"Cancels a scheduled meeting in SavvyCal.": "Cancels a scheduled meeting in SavvyCal.",
|
|
2
|
+
"Scheduling tool that lets invitees overlay their calendar when picking a time.": "Scheduling tool that lets invitees overlay their calendar when picking a time.",
|
|
5
3
|
"Create Event": "Create Event",
|
|
6
|
-
"
|
|
4
|
+
"Cancel Event": "Cancel Event",
|
|
5
|
+
"Get Event": "Get Event",
|
|
6
|
+
"List Events": "List Events",
|
|
7
7
|
"Find Events by Attendee Email": "Find Events by Attendee Email",
|
|
8
|
-
"
|
|
8
|
+
"List Scheduling Links": "List Scheduling Links",
|
|
9
|
+
"Get Scheduling Link": "Get Scheduling Link",
|
|
10
|
+
"Get Available Slots": "Get Available Slots",
|
|
11
|
+
"Toggle Scheduling Link": "Toggle Scheduling Link",
|
|
12
|
+
"Duplicate Scheduling Link": "Duplicate Scheduling Link",
|
|
13
|
+
"Delete Scheduling Link": "Delete Scheduling Link",
|
|
14
|
+
"List Workflows": "List Workflows",
|
|
15
|
+
"Get Workflow Rules": "Get Workflow Rules",
|
|
9
16
|
"Get Current User": "Get Current User",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
17
|
+
"Custom API Call": "自定义 API 呼叫",
|
|
18
|
+
"Books a meeting on a scheduling link at a specific time slot.": "Books a meeting on a scheduling link at a specific time slot.",
|
|
19
|
+
"Cancels a scheduled meeting in SavvyCal.": "Cancels a scheduled meeting in SavvyCal.",
|
|
12
20
|
"Retrieves the details of a specific scheduled meeting by its ID.": "Retrieves the details of a specific scheduled meeting by its ID.",
|
|
13
|
-
"List Events": "List Events",
|
|
14
21
|
"Returns a list of scheduled meetings from your SavvyCal account.": "Returns a list of scheduled meetings from your SavvyCal account.",
|
|
15
|
-
"
|
|
22
|
+
"Returns all events where the attendee's email matches the given address.": "Returns all events where the attendee's email matches the given address.",
|
|
16
23
|
"Returns all scheduling links configured in your SavvyCal account.": "Returns all scheduling links configured in your SavvyCal account.",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
24
|
+
"Retrieves the details of a specific scheduling link by its ID.": "Retrieves the details of a specific scheduling link by its ID.",
|
|
25
|
+
"Returns available time slots for booking on a scheduling link. Useful for displaying availability or for picking a slot before calling Create Event.": "Returns available time slots for booking on a scheduling link. Useful for displaying availability or for picking a slot before calling Create Event.",
|
|
26
|
+
"Switches a scheduling link between active and disabled states.": "Switches a scheduling link between active and disabled states.",
|
|
27
|
+
"Creates a copy of an existing scheduling link.": "Creates a copy of an existing scheduling link.",
|
|
28
|
+
"Permanently deletes a scheduling link from your SavvyCal account.": "Permanently deletes a scheduling link from your SavvyCal account.",
|
|
29
|
+
"Returns all workflows configured in your SavvyCal account.": "Returns all workflows configured in your SavvyCal account.",
|
|
30
|
+
"Returns the rules configured for a specific workflow.": "Returns the rules configured for a specific workflow.",
|
|
31
|
+
"Retrieves the profile of the currently authenticated SavvyCal user.": "Retrieves the profile of the currently authenticated SavvyCal user.",
|
|
32
|
+
"Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
|
|
33
|
+
"Team": "Team",
|
|
22
34
|
"Scheduling Link": "Scheduling Link",
|
|
35
|
+
"Start Time": "开始时间",
|
|
36
|
+
"End Time": "End Time",
|
|
37
|
+
"Attendee Name": "Attendee Name",
|
|
38
|
+
"Attendee Email": "Attendee Email",
|
|
39
|
+
"Time Zone": "Time Zone",
|
|
40
|
+
"Phone Number": "Phone Number",
|
|
41
|
+
"Custom Fields": "Custom Fields",
|
|
42
|
+
"Metadata": "Metadata",
|
|
43
|
+
"Event ID": "Event ID",
|
|
44
|
+
"State": "State",
|
|
45
|
+
"Start After": "Start After",
|
|
46
|
+
"Start Before": "Start Before",
|
|
23
47
|
"Scheduling Links": "Scheduling Links",
|
|
48
|
+
"Maximum Results": "Maximum Results",
|
|
49
|
+
"Workflow": "Workflow",
|
|
50
|
+
"Method": "方法",
|
|
51
|
+
"Headers": "信头",
|
|
52
|
+
"Query Parameters": "查询参数",
|
|
53
|
+
"Body Type": "Body Type",
|
|
54
|
+
"Body": "正文内容",
|
|
55
|
+
"Response is Binary ?": "Response is Binary ?",
|
|
56
|
+
"No Error on Failure": "失败时没有错误",
|
|
57
|
+
"Timeout (in seconds)": "超时(秒)",
|
|
58
|
+
"Follow redirects": "Follow redirects",
|
|
59
|
+
"Filter scheduling links by team. Leave empty to show all teams.": "Filter scheduling links by team. Leave empty to show all teams.",
|
|
24
60
|
"Select the scheduling link to book a meeting on.": "Select the scheduling link to book a meeting on.",
|
|
25
|
-
"Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.": "Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.",
|
|
26
|
-
"Only return events booked through the selected scheduling links. Leave empty for all links.": "Only return events booked through the selected scheduling links. Leave empty for all links.",
|
|
27
|
-
"Start Time": "Start Time",
|
|
28
61
|
"The start date and time of the meeting. Must match an available slot on the scheduling link.": "The start date and time of the meeting. Must match an available slot on the scheduling link.",
|
|
29
|
-
"End Time": "End Time",
|
|
30
62
|
"The End date and time of the meeting": "The End date and time of the meeting",
|
|
31
|
-
"Attendee Name": "Attendee Name",
|
|
32
63
|
"Full name of the person booking the meeting.": "Full name of the person booking the meeting.",
|
|
33
|
-
"Attendee Email": "Attendee Email",
|
|
34
64
|
"Email address of the person booking the meeting.": "Email address of the person booking the meeting.",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
65
|
+
"Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).": "Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).",
|
|
66
|
+
"Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.": "Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.",
|
|
67
|
+
"Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.": "Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.",
|
|
68
|
+
"Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.": "Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.",
|
|
69
|
+
"The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.": "The unique ID of the event to cancel. You can find this from the output of a trigger or the List Events / Get Event actions.",
|
|
70
|
+
"The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.": "The unique ID of the event. You can find this in the event URL in SavvyCal, or from the output of a trigger or List Events action.",
|
|
71
|
+
"Filter events by their current status. Leave empty to return all statuses.": "Filter events by their current status. Leave empty to return all statuses.",
|
|
37
72
|
"Only return events that start after this date and time.": "Only return events that start after this date and time.",
|
|
38
|
-
"Only search events starting after this date. Use this to limit the search scope and improve performance.": "Only search events starting after this date. Use this to limit the search scope and improve performance.",
|
|
39
|
-
"Start Before": "Start Before",
|
|
40
73
|
"Only return events that start before this date and time.": "Only return events that start before this date and time.",
|
|
41
|
-
"Only
|
|
42
|
-
"State": "State",
|
|
43
|
-
"Filter events by their current status. Leave empty to return all statuses.": "Filter events by their current status. Leave empty to return all statuses.",
|
|
44
|
-
"Maximum Results": "Maximum Results",
|
|
74
|
+
"Only return events booked through the selected scheduling links. Leave empty for all links.": "Only return events booked through the selected scheduling links. Leave empty for all links.",
|
|
45
75
|
"Maximum number of events to return. Leave empty to return all matching events.": "Maximum number of events to return. Leave empty to return all matching events.",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
76
|
+
"The email address of the attendee to search for.": "The email address of the attendee to search for.",
|
|
77
|
+
"Only search events starting after this date. Use this to limit the search scope and improve performance.": "Only search events starting after this date. Use this to limit the search scope and improve performance.",
|
|
78
|
+
"Only search events starting before this date.": "Only search events starting before this date.",
|
|
79
|
+
"Select the scheduling link to retrieve.": "Select the scheduling link to retrieve.",
|
|
80
|
+
"Select the scheduling link to query slots for.": "Select the scheduling link to query slots for.",
|
|
81
|
+
"Select the scheduling link to toggle.": "Select the scheduling link to toggle.",
|
|
82
|
+
"Select the scheduling link to duplicate.": "Select the scheduling link to duplicate.",
|
|
83
|
+
"Select the scheduling link to delete. This action cannot be undone.": "Select the scheduling link to delete. This action cannot be undone.",
|
|
84
|
+
"Select the workflow whose rules you want to retrieve.": "Select the workflow whose rules you want to retrieve.",
|
|
85
|
+
"Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
|
|
86
|
+
"Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
|
|
49
87
|
"Confirmed": "Confirmed",
|
|
50
88
|
"Canceled": "Canceled",
|
|
89
|
+
"Awaiting Reschedule": "Awaiting Reschedule",
|
|
90
|
+
"Awaiting Checkout": "Awaiting Checkout",
|
|
91
|
+
"Checkout Expired": "Checkout Expired",
|
|
92
|
+
"Awaiting Approval": "Awaiting Approval",
|
|
93
|
+
"Declined": "Declined",
|
|
94
|
+
"Tentative": "Tentative",
|
|
95
|
+
"GET": "获取",
|
|
96
|
+
"POST": "帖子",
|
|
97
|
+
"PATCH": "PATCH",
|
|
98
|
+
"PUT": "弹出",
|
|
99
|
+
"DELETE": "删除",
|
|
100
|
+
"HEAD": "黑色",
|
|
101
|
+
"None": "无",
|
|
102
|
+
"JSON": "JSON",
|
|
103
|
+
"Form Data": "表单数据",
|
|
104
|
+
"Raw": "原始文件",
|
|
105
|
+
"New Event": "New Event",
|
|
106
|
+
"New Poll Response": "New Poll Response",
|
|
107
|
+
"Workflow Action Triggered": "Workflow Action Triggered",
|
|
108
|
+
"Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.": "Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.",
|
|
109
|
+
"Triggers when a poll response is created or updated in SavvyCal.": "Triggers when a poll response is created or updated in SavvyCal.",
|
|
110
|
+
"Triggers when a workflow action is triggered in SavvyCal.": "Triggers when a workflow action is triggered in SavvyCal.",
|
|
111
|
+
"Event Types": "Event Types",
|
|
112
|
+
"Poll Response Types": "Poll Response Types",
|
|
113
|
+
"Select which event types to trigger on. Leave empty to trigger on all event types.": "Select which event types to trigger on. Leave empty to trigger on all event types.",
|
|
114
|
+
"Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.": "Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.",
|
|
115
|
+
"Select which poll response types to trigger on. Leave empty to trigger on all poll response types.": "Select which poll response types to trigger on. Leave empty to trigger on all poll response types.",
|
|
51
116
|
"Event Created": "Event Created",
|
|
52
117
|
"Event Requested": "Event Requested",
|
|
53
118
|
"Event Approved": "Event Approved",
|
|
@@ -56,19 +121,10 @@
|
|
|
56
121
|
"Event Changed": "Event Changed",
|
|
57
122
|
"Event Canceled": "Event Canceled",
|
|
58
123
|
"Checkout Pending": "Checkout Pending",
|
|
59
|
-
"Checkout Expired": "Checkout Expired",
|
|
60
124
|
"Checkout Completed": "Checkout Completed",
|
|
61
125
|
"Attendee Added": "Attendee Added",
|
|
62
126
|
"Attendee Canceled": "Attendee Canceled",
|
|
63
127
|
"Attendee Rescheduled": "Attendee Rescheduled",
|
|
64
128
|
"Poll Response Created": "Poll Response Created",
|
|
65
|
-
"Poll Response Updated": "Poll Response Updated"
|
|
66
|
-
|
|
67
|
-
"Please connect your account first": "Please connect your account first",
|
|
68
|
-
"Failed to load scheduling links.": "Failed to load scheduling links.",
|
|
69
|
-
"Failed to load scheduling links. Check your connection.": "Failed to load scheduling links. Check your connection.",
|
|
70
|
-
"Team": "Team",
|
|
71
|
-
"Filter scheduling links by team. Leave empty to show all teams.": "Filter scheduling links by team. Leave empty to show all teams.",
|
|
72
|
-
"Personal": "Personal",
|
|
73
|
-
"Failed to load teams.": "Failed to load teams."
|
|
74
|
-
}
|
|
129
|
+
"Poll Response Updated": "Poll Response Updated"
|
|
130
|
+
}
|
package/src/index.js
CHANGED
|
@@ -33,20 +33,20 @@ exports.savvyCal = (0, pieces_framework_1.createPiece)({
|
|
|
33
33
|
auth: auth_1.savvyCalAuth,
|
|
34
34
|
authors: ['bst1n', 'sanket-a11y', 'onyedikachi-david'],
|
|
35
35
|
actions: [
|
|
36
|
-
get_current_user_1.getCurrentUserAction,
|
|
37
|
-
list_events_1.listEventsAction,
|
|
38
|
-
get_event_1.getEventAction,
|
|
39
|
-
cancel_event_1.cancelEventAction,
|
|
40
36
|
create_event_1.createEventAction,
|
|
37
|
+
cancel_event_1.cancelEventAction,
|
|
38
|
+
get_event_1.getEventAction,
|
|
39
|
+
list_events_1.listEventsAction,
|
|
41
40
|
find_events_by_email_1.findEventsByEmailAction,
|
|
42
41
|
list_scheduling_links_1.listSchedulingLinksAction,
|
|
43
42
|
get_scheduling_link_1.getSchedulingLinkAction,
|
|
44
|
-
delete_scheduling_link_1.deleteSchedulingLinkAction,
|
|
45
|
-
duplicate_scheduling_link_1.duplicateSchedulingLinkAction,
|
|
46
|
-
toggle_scheduling_link_1.toggleSchedulingLinkAction,
|
|
47
43
|
get_link_slots_1.getLinkSlotsAction,
|
|
44
|
+
toggle_scheduling_link_1.toggleSchedulingLinkAction,
|
|
45
|
+
duplicate_scheduling_link_1.duplicateSchedulingLinkAction,
|
|
46
|
+
delete_scheduling_link_1.deleteSchedulingLinkAction,
|
|
48
47
|
list_workflows_1.listWorkflowsAction,
|
|
49
48
|
get_workflow_rules_1.getWorkflowRulesAction,
|
|
49
|
+
get_current_user_1.getCurrentUserAction,
|
|
50
50
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
51
51
|
baseUrl: () => common_1.SAVVYCAL_BASE_URL,
|
|
52
52
|
auth: auth_1.savvyCalAuth,
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,+DAAwE;AACxE,iDAAqD;AAErD,qEAAsE;AACtE,2DAA6D;AAC7D,uDAAyD;AACzD,6DAA+D;AAC/D,6DAA+D;AAC/D,6EAA6E;AAC7E,+EAAgF;AAChF,2EAA4E;AAC5E,iFAAkF;AAClF,uFAAwF;AACxF,iFAAkF;AAClF,iEAAkE;AAClE,iEAAmE;AACnE,yEAA0E;AAE1E,wDAA2D;AAC3D,wEAA0E;AAC1E,wFAA0F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ACnB,2CAAsB;QAEtB,uCAAoB;QAEpB,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,0BAAiB;YAChC,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;iBAC1C,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE;QACR,2BAAe;QACf,0CAAsB;QACtB,0DAA8B;KAC/B;CACF,CAAC,CAAC"}
|
|
@@ -12,4 +12,9 @@ export declare const createEventAction: import("@activepieces/pieces-framework")
|
|
|
12
12
|
attendee_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
13
13
|
attendee_email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
14
14
|
time_zone: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
15
|
+
phone_number: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
16
|
+
custom_fields: import("@activepieces/pieces-framework").DynamicProperties<false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
17
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
18
|
+
}>)[]>;
|
|
19
|
+
metadata: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
15
20
|
}>;
|
|
@@ -81,23 +81,153 @@ exports.createEventAction = (0, pieces_framework_1.createAction)({
|
|
|
81
81
|
description: "Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).",
|
|
82
82
|
required: true,
|
|
83
83
|
}),
|
|
84
|
+
phone_number: pieces_framework_1.Property.ShortText({
|
|
85
|
+
displayName: 'Phone Number',
|
|
86
|
+
description: "Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.",
|
|
87
|
+
required: false,
|
|
88
|
+
}),
|
|
89
|
+
custom_fields: pieces_framework_1.Property.DynamicProperties({
|
|
90
|
+
auth: auth_1.savvyCalAuth,
|
|
91
|
+
displayName: 'Custom Fields',
|
|
92
|
+
description: 'Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.',
|
|
93
|
+
required: false,
|
|
94
|
+
refreshers: ['link_id'],
|
|
95
|
+
props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, link_id }) {
|
|
96
|
+
if (!auth || !link_id)
|
|
97
|
+
return {};
|
|
98
|
+
try {
|
|
99
|
+
const fields = yield fetchLinkFields((0, auth_1.getToken)(auth), link_id);
|
|
100
|
+
return buildCustomFieldProps(fields);
|
|
101
|
+
}
|
|
102
|
+
catch (_b) {
|
|
103
|
+
return {};
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
106
|
+
}),
|
|
107
|
+
metadata: pieces_framework_1.Property.Object({
|
|
108
|
+
displayName: 'Metadata',
|
|
109
|
+
description: 'Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.',
|
|
110
|
+
required: false,
|
|
111
|
+
}),
|
|
84
112
|
},
|
|
85
113
|
run(context) {
|
|
86
114
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const token = (0, auth_1.getToken)(context.auth);
|
|
116
|
+
const { link_id, start_at, end_at, attendee_name, attendee_email, time_zone, phone_number, custom_fields, metadata, } = context.propsValue;
|
|
117
|
+
const linkFields = yield fetchLinkFields(token, link_id);
|
|
118
|
+
const submittedFields = serializeCustomFields({
|
|
119
|
+
linkFields,
|
|
120
|
+
customFields: custom_fields,
|
|
121
|
+
});
|
|
122
|
+
const body = {
|
|
123
|
+
start_at,
|
|
124
|
+
end_at,
|
|
125
|
+
display_name: attendee_name,
|
|
126
|
+
email: attendee_email,
|
|
127
|
+
time_zone,
|
|
128
|
+
};
|
|
129
|
+
if (phone_number)
|
|
130
|
+
body['phone_number'] = phone_number;
|
|
131
|
+
if (submittedFields.length > 0)
|
|
132
|
+
body['fields'] = submittedFields;
|
|
133
|
+
if (metadata && Object.keys(metadata).length > 0)
|
|
134
|
+
body['metadata'] = metadata;
|
|
87
135
|
const response = yield (0, common_1.savvyCalApiCall)({
|
|
88
|
-
token
|
|
136
|
+
token,
|
|
89
137
|
method: pieces_common_1.HttpMethod.POST,
|
|
90
|
-
path: `/links/${
|
|
91
|
-
body
|
|
92
|
-
start_at: context.propsValue.start_at,
|
|
93
|
-
end_at: context.propsValue.end_at,
|
|
94
|
-
display_name: context.propsValue.attendee_name,
|
|
95
|
-
email: context.propsValue.attendee_email,
|
|
96
|
-
time_zone: context.propsValue.time_zone,
|
|
97
|
-
},
|
|
138
|
+
path: `/links/${link_id}/events`,
|
|
139
|
+
body,
|
|
98
140
|
});
|
|
99
141
|
return (0, common_1.flattenEvent)(response.body);
|
|
100
142
|
});
|
|
101
143
|
},
|
|
102
144
|
});
|
|
145
|
+
function fetchLinkFields(token, linkId) {
|
|
146
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
var _a;
|
|
148
|
+
const response = yield (0, common_1.savvyCalApiCall)({
|
|
149
|
+
token,
|
|
150
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
151
|
+
path: `/links/${linkId}`,
|
|
152
|
+
});
|
|
153
|
+
return (_a = response.body.fields) !== null && _a !== void 0 ? _a : [];
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function buildCustomFieldProps(fields) {
|
|
157
|
+
var _a;
|
|
158
|
+
const props = {};
|
|
159
|
+
for (const field of fields) {
|
|
160
|
+
if (isHiddenFieldType(field.type))
|
|
161
|
+
continue;
|
|
162
|
+
const params = {
|
|
163
|
+
displayName: field.label,
|
|
164
|
+
required: (_a = field.is_required) !== null && _a !== void 0 ? _a : false,
|
|
165
|
+
};
|
|
166
|
+
const choices = normalizeFieldOptions(field);
|
|
167
|
+
if (isMultiSelectFieldType(field.type)) {
|
|
168
|
+
props[field.id] = pieces_framework_1.Property.StaticMultiSelectDropdown(Object.assign(Object.assign({}, params), { options: { options: choices } }));
|
|
169
|
+
}
|
|
170
|
+
else if (isSingleSelectFieldType(field.type)) {
|
|
171
|
+
props[field.id] = pieces_framework_1.Property.StaticDropdown(Object.assign(Object.assign({}, params), { options: { options: choices } }));
|
|
172
|
+
}
|
|
173
|
+
else if (isLongTextFieldType(field.type)) {
|
|
174
|
+
props[field.id] = pieces_framework_1.Property.LongText(params);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
props[field.id] = pieces_framework_1.Property.ShortText(params);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return props;
|
|
181
|
+
}
|
|
182
|
+
function serializeCustomFields({ linkFields, customFields, }) {
|
|
183
|
+
if (!customFields)
|
|
184
|
+
return [];
|
|
185
|
+
const result = [];
|
|
186
|
+
for (const field of linkFields) {
|
|
187
|
+
const raw = customFields[field.id];
|
|
188
|
+
if (raw === undefined || raw === null || raw === '')
|
|
189
|
+
continue;
|
|
190
|
+
const value = Array.isArray(raw) ? raw.join(MULTI_SELECT_VALUE_DELIMITER) : String(raw);
|
|
191
|
+
result.push({ id: field.id, label: field.label, type: field.type, value });
|
|
192
|
+
}
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
function normalizeFieldOptions(field) {
|
|
196
|
+
var _a, _b;
|
|
197
|
+
const raw = (_b = (_a = field.options) !== null && _a !== void 0 ? _a : field.choices) !== null && _b !== void 0 ? _b : [];
|
|
198
|
+
return raw.map((opt) => {
|
|
199
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
200
|
+
if (typeof opt === 'string')
|
|
201
|
+
return { label: opt, value: opt };
|
|
202
|
+
return {
|
|
203
|
+
label: (_d = (_c = (_b = (_a = opt.label) !== null && _a !== void 0 ? _a : opt.name) !== null && _b !== void 0 ? _b : opt.value) !== null && _c !== void 0 ? _c : opt.id) !== null && _d !== void 0 ? _d : '',
|
|
204
|
+
value: (_h = (_g = (_f = (_e = opt.value) !== null && _e !== void 0 ? _e : opt.id) !== null && _f !== void 0 ? _f : opt.name) !== null && _g !== void 0 ? _g : opt.label) !== null && _h !== void 0 ? _h : '',
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function isMultiSelectFieldType(type) {
|
|
209
|
+
const t = type.toLowerCase();
|
|
210
|
+
return t === 'checkboxes' || t === 'multi_select' || t === 'checkbox_group';
|
|
211
|
+
}
|
|
212
|
+
function isSingleSelectFieldType(type) {
|
|
213
|
+
const t = type.toLowerCase();
|
|
214
|
+
return (t === 'select' ||
|
|
215
|
+
t === 'select_menu' ||
|
|
216
|
+
t === 'dropdown' ||
|
|
217
|
+
t === 'radio' ||
|
|
218
|
+
t === 'radio_buttons' ||
|
|
219
|
+
t === 'single_select');
|
|
220
|
+
}
|
|
221
|
+
function isLongTextFieldType(type) {
|
|
222
|
+
const t = type.toLowerCase();
|
|
223
|
+
return t === 'long_text' || t === 'textarea' || t === 'paragraph';
|
|
224
|
+
}
|
|
225
|
+
function isHiddenFieldType(type) {
|
|
226
|
+
return type.toLowerCase() === 'hidden';
|
|
227
|
+
}
|
|
228
|
+
// SavvyCal's CreateEventRequest documents fields[].value as a string. Multi-select
|
|
229
|
+
// (checkboxes) selections are joined with this delimiter. The exact format SavvyCal
|
|
230
|
+
// expects on the receiving side isn't documented; ", " matches common form-encoding
|
|
231
|
+
// conventions. Adjust here if SavvyCal rejects multi-select payloads.
|
|
232
|
+
const MULTI_SELECT_VALUE_DELIMITER = ', ';
|
|
103
233
|
//# sourceMappingURL=create-event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,+DAAyD;AACzD,s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