@activepieces/piece-savvycal 0.1.3 → 0.1.5
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 +7 -12
- package/src/index.js +20 -66
- package/src/index.d.ts +0 -3
- package/src/index.js.map +0 -1
- package/src/lib/actions/cancel-event.d.ts +0 -5
- package/src/lib/actions/cancel-event.js +0 -36
- package/src/lib/actions/cancel-event.js.map +0 -1
- package/src/lib/actions/create-event.d.ts +0 -20
- package/src/lib/actions/create-event.js +0 -233
- package/src/lib/actions/create-event.js.map +0 -1
- package/src/lib/actions/delete-scheduling-link.d.ts +0 -10
- package/src/lib/actions/delete-scheduling-link.js +0 -67
- package/src/lib/actions/delete-scheduling-link.js.map +0 -1
- package/src/lib/actions/duplicate-scheduling-link.d.ts +0 -10
- package/src/lib/actions/duplicate-scheduling-link.js +0 -63
- package/src/lib/actions/duplicate-scheduling-link.js.map +0 -1
- package/src/lib/actions/find-events-by-email.d.ts +0 -7
- package/src/lib/actions/find-events-by-email.js +0 -51
- package/src/lib/actions/find-events-by-email.js.map +0 -1
- package/src/lib/actions/get-current-user.d.ts +0 -3
- package/src/lib/actions/get-current-user.js +0 -36
- package/src/lib/actions/get-current-user.js.map +0 -1
- package/src/lib/actions/get-event.d.ts +0 -5
- package/src/lib/actions/get-event.js +0 -32
- package/src/lib/actions/get-event.js.map +0 -1
- package/src/lib/actions/get-link-slots.d.ts +0 -10
- package/src/lib/actions/get-link-slots.js +0 -70
- package/src/lib/actions/get-link-slots.js.map +0 -1
- package/src/lib/actions/get-scheduling-link.d.ts +0 -10
- package/src/lib/actions/get-scheduling-link.js +0 -63
- package/src/lib/actions/get-scheduling-link.js.map +0 -1
- package/src/lib/actions/get-workflow-rules.d.ts +0 -7
- package/src/lib/actions/get-workflow-rules.js +0 -50
- package/src/lib/actions/get-workflow-rules.js.map +0 -1
- package/src/lib/actions/list-events.d.ts +0 -14
- package/src/lib/actions/list-events.js +0 -147
- package/src/lib/actions/list-events.js.map +0 -1
- package/src/lib/actions/list-scheduling-links.d.ts +0 -7
- package/src/lib/actions/list-scheduling-links.js +0 -49
- package/src/lib/actions/list-scheduling-links.js.map +0 -1
- package/src/lib/actions/list-workflows.d.ts +0 -3
- package/src/lib/actions/list-workflows.js +0 -35
- package/src/lib/actions/list-workflows.js.map +0 -1
- package/src/lib/actions/toggle-scheduling-link.d.ts +0 -10
- package/src/lib/actions/toggle-scheduling-link.js +0 -63
- package/src/lib/actions/toggle-scheduling-link.js.map +0 -1
- package/src/lib/auth.d.ts +0 -6
- package/src/lib/auth.js +0 -60
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -98
- package/src/lib/common/index.js +0 -151
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/triggers/new-event.d.ts +0 -42
- package/src/lib/triggers/new-event.js +0 -190
- package/src/lib/triggers/new-event.js.map +0 -1
- package/src/lib/triggers/new-poll-response.d.ts +0 -18
- package/src/lib/triggers/new-poll-response.js +0 -81
- package/src/lib/triggers/new-poll-response.js.map +0 -1
- package/src/lib/triggers/workflow-action-triggered.d.ts +0 -10
- package/src/lib/triggers/workflow-action-triggered.js +0 -65
- package/src/lib/triggers/workflow-action-triggered.js.map +0 -1
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createEventAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../auth");
|
|
9
|
-
exports.createEventAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.savvyCalAuth,
|
|
11
|
-
name: 'create_event',
|
|
12
|
-
displayName: 'Create Event',
|
|
13
|
-
description: 'Books a meeting on a scheduling link at a specific time slot.',
|
|
14
|
-
props: {
|
|
15
|
-
team_id: pieces_framework_1.Property.Dropdown({
|
|
16
|
-
auth: auth_1.savvyCalAuth,
|
|
17
|
-
displayName: 'Team',
|
|
18
|
-
description: 'Filter scheduling links by team. Leave empty to show all teams.',
|
|
19
|
-
refreshers: [],
|
|
20
|
-
required: false,
|
|
21
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
22
|
-
if (!auth)
|
|
23
|
-
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
24
|
-
try {
|
|
25
|
-
const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
|
|
26
|
-
return { disabled: false, options };
|
|
27
|
-
}
|
|
28
|
-
catch (_b) {
|
|
29
|
-
return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
|
|
30
|
-
}
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
33
|
-
link_id: pieces_framework_1.Property.Dropdown({
|
|
34
|
-
auth: auth_1.savvyCalAuth,
|
|
35
|
-
displayName: 'Scheduling Link',
|
|
36
|
-
description: 'Select the scheduling link to book a meeting on.',
|
|
37
|
-
refreshers: ['team_id'],
|
|
38
|
-
required: true,
|
|
39
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
|
|
40
|
-
if (!auth)
|
|
41
|
-
return {
|
|
42
|
-
disabled: true,
|
|
43
|
-
options: [],
|
|
44
|
-
placeholder: 'Please connect your account first',
|
|
45
|
-
};
|
|
46
|
-
try {
|
|
47
|
-
const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
|
|
48
|
-
return { disabled: false, options };
|
|
49
|
-
}
|
|
50
|
-
catch (_b) {
|
|
51
|
-
return {
|
|
52
|
-
disabled: true,
|
|
53
|
-
options: [],
|
|
54
|
-
placeholder: 'Failed to load scheduling links. Check your connection.',
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}),
|
|
58
|
-
}),
|
|
59
|
-
start_at: pieces_framework_1.Property.DateTime({
|
|
60
|
-
displayName: 'Start Time',
|
|
61
|
-
description: 'The start date and time of the meeting. Must match an available slot on the scheduling link.',
|
|
62
|
-
required: true,
|
|
63
|
-
}),
|
|
64
|
-
end_at: pieces_framework_1.Property.DateTime({
|
|
65
|
-
displayName: 'End Time',
|
|
66
|
-
description: 'The End date and time of the meeting',
|
|
67
|
-
required: true,
|
|
68
|
-
}),
|
|
69
|
-
attendee_name: pieces_framework_1.Property.ShortText({
|
|
70
|
-
displayName: 'Attendee Name',
|
|
71
|
-
description: 'Full name of the person booking the meeting.',
|
|
72
|
-
required: true,
|
|
73
|
-
}),
|
|
74
|
-
attendee_email: pieces_framework_1.Property.ShortText({
|
|
75
|
-
displayName: 'Attendee Email',
|
|
76
|
-
description: 'Email address of the person booking the meeting.',
|
|
77
|
-
required: true,
|
|
78
|
-
}),
|
|
79
|
-
time_zone: pieces_framework_1.Property.ShortText({
|
|
80
|
-
displayName: 'Time Zone',
|
|
81
|
-
description: "Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).",
|
|
82
|
-
required: true,
|
|
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
|
-
}),
|
|
112
|
-
},
|
|
113
|
-
run(context) {
|
|
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;
|
|
135
|
-
const response = yield (0, common_1.savvyCalApiCall)({
|
|
136
|
-
token,
|
|
137
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
138
|
-
path: `/links/${link_id}/events`,
|
|
139
|
-
body,
|
|
140
|
-
});
|
|
141
|
-
return (0, common_1.flattenEvent)(response.body);
|
|
142
|
-
});
|
|
143
|
-
},
|
|
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 = ', ';
|
|
233
|
-
//# sourceMappingURL=create-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-event.ts"],"names":[],"mappings":";;;;AAAA,qEAKwC;AACxC,+DAAyD;AACzD,sCAQmB;AACnB,kCAAiD;AAEpC,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,+DAA+D;IAC5E,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,iEAAiE;YAC9E,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI;oBAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;gBACpG,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAgB,EAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;oBACvD,OAAO,EAAE,QAA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CAAI,GAAG,CAAC,EAAE,mCAAI,EAAE;YACzD,KAAK,EAAE,MAAA,MAAA,MAAA,MAAA,GAAG,CAAC,KAAK,mCAAI,GAAG,CAAC,EAAE,mCAAI,GAAG,CAAC,IAAI,mCAAI,GAAG,CAAC,KAAK,mCAAI,EAAE;SAC1D,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAY;IAC1C,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7B,OAAO,CAAC,KAAK,YAAY,IAAI,CAAC,KAAK,cAAc,IAAI,CAAC,KAAK,gBAAgB,CAAC;AAC9E,CAAC;AAED,SAAS,uBAAuB,CAAC,IAAY;IAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7B,OAAO,CACL,CAAC,KAAK,QAAQ;QACd,CAAC,KAAK,aAAa;QACnB,CAAC,KAAK,UAAU;QAChB,CAAC,KAAK,OAAO;QACb,CAAC,KAAK,eAAe;QACrB,CAAC,KAAK,eAAe,CACtB,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACvC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC7B,OAAO,CAAC,KAAK,WAAW,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,WAAW,CAAC;AACpE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC;AACzC,CAAC;AAED,mFAAmF;AACnF,oFAAoF;AACpF,oFAAoF;AACpF,sEAAsE;AACtE,MAAM,4BAA4B,GAAG,IAAI,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const deleteSchedulingLinkAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {
|
|
4
|
-
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
6
|
-
}>)[]>;
|
|
7
|
-
link_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
-
}>)[]>;
|
|
10
|
-
}>;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteSchedulingLinkAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../auth");
|
|
9
|
-
exports.deleteSchedulingLinkAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.savvyCalAuth,
|
|
11
|
-
name: 'delete_scheduling_link',
|
|
12
|
-
displayName: 'Delete Scheduling Link',
|
|
13
|
-
description: 'Permanently deletes a scheduling link from your SavvyCal account.',
|
|
14
|
-
props: {
|
|
15
|
-
team_id: pieces_framework_1.Property.Dropdown({
|
|
16
|
-
auth: auth_1.savvyCalAuth,
|
|
17
|
-
displayName: 'Team',
|
|
18
|
-
description: 'Filter scheduling links by team. Leave empty to show all teams.',
|
|
19
|
-
refreshers: [],
|
|
20
|
-
required: false,
|
|
21
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
22
|
-
if (!auth)
|
|
23
|
-
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
24
|
-
try {
|
|
25
|
-
const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
|
|
26
|
-
return { disabled: false, options };
|
|
27
|
-
}
|
|
28
|
-
catch (_b) {
|
|
29
|
-
return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
|
|
30
|
-
}
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
33
|
-
link_id: pieces_framework_1.Property.Dropdown({
|
|
34
|
-
auth: auth_1.savvyCalAuth,
|
|
35
|
-
displayName: 'Scheduling Link',
|
|
36
|
-
description: 'Select the scheduling link to delete. This action cannot be undone.',
|
|
37
|
-
refreshers: ['team_id'],
|
|
38
|
-
required: true,
|
|
39
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
|
|
40
|
-
if (!auth)
|
|
41
|
-
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
42
|
-
try {
|
|
43
|
-
const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
|
|
44
|
-
return { disabled: false, options };
|
|
45
|
-
}
|
|
46
|
-
catch (_b) {
|
|
47
|
-
return { disabled: true, options: [], placeholder: 'Failed to load scheduling links.' };
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
}),
|
|
51
|
-
},
|
|
52
|
-
run(context) {
|
|
53
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
yield (0, common_1.savvyCalApiCall)({
|
|
55
|
-
token: (0, auth_1.getToken)(context.auth),
|
|
56
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
57
|
-
path: `/links/${context.propsValue.link_id}`,
|
|
58
|
-
});
|
|
59
|
-
return {
|
|
60
|
-
success: true,
|
|
61
|
-
link_id: context.propsValue.link_id,
|
|
62
|
-
message: 'Scheduling link deleted successfully.',
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
//# sourceMappingURL=delete-scheduling-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-scheduling-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-scheduling-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAgF;AAChF,kCAAiD;AAEpC,QAAA,0BAA0B,GAAG,IAAA,+BAAY,EAAC;IACrD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,wBAAwB;IACrC,WAAW,EAAE,mEAAmE;IAChF,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,iEAAiE;YAC9E,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI;oBAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;gBACpG,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAgB,EAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;oBACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;gBACtC,CAAC;gBAAC,WAAM,CAAC;oBACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;gBAC/E,CAAC;YACH,CAAC,CAAA;SACF,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,qEAAqE;YAClF,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAA0B,EAAE,oDAArB,EAAE,IAAI,EAAE,OAAO,EAAE;gBAC/B,IAAI,CAAC,IAAI;oBAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;gBACpG,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAgB,EAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE,OAAwB,CAAC,CAAC;oBACjF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;gBACtC,CAAC;gBAAC,WAAM,CAAC;oBACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;gBAC1F,CAAC;YACH,CAAC,CAAA;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAA,wBAAe,EAAC;gBACpB,KAAK,EAAE,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,CAAC;gBAC7B,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,IAAI,EAAE,UAAU,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE;aAC7C,CAAC,CAAC;YACH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBACnC,OAAO,EAAE,uCAAuC;aACjD,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const duplicateSchedulingLinkAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {
|
|
4
|
-
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
6
|
-
}>)[]>;
|
|
7
|
-
link_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
-
}>)[]>;
|
|
10
|
-
}>;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.duplicateSchedulingLinkAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../auth");
|
|
9
|
-
exports.duplicateSchedulingLinkAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.savvyCalAuth,
|
|
11
|
-
name: 'duplicate_scheduling_link',
|
|
12
|
-
displayName: 'Duplicate Scheduling Link',
|
|
13
|
-
description: 'Creates a copy of an existing scheduling link.',
|
|
14
|
-
props: {
|
|
15
|
-
team_id: pieces_framework_1.Property.Dropdown({
|
|
16
|
-
auth: auth_1.savvyCalAuth,
|
|
17
|
-
displayName: 'Team',
|
|
18
|
-
description: 'Filter scheduling links by team. Leave empty to show all teams.',
|
|
19
|
-
refreshers: [],
|
|
20
|
-
required: false,
|
|
21
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
22
|
-
if (!auth)
|
|
23
|
-
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
24
|
-
try {
|
|
25
|
-
const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
|
|
26
|
-
return { disabled: false, options };
|
|
27
|
-
}
|
|
28
|
-
catch (_b) {
|
|
29
|
-
return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
|
|
30
|
-
}
|
|
31
|
-
}),
|
|
32
|
-
}),
|
|
33
|
-
link_id: pieces_framework_1.Property.Dropdown({
|
|
34
|
-
auth: auth_1.savvyCalAuth,
|
|
35
|
-
displayName: 'Scheduling Link',
|
|
36
|
-
description: 'Select the scheduling link to duplicate.',
|
|
37
|
-
refreshers: ['team_id'],
|
|
38
|
-
required: true,
|
|
39
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
|
|
40
|
-
if (!auth)
|
|
41
|
-
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
42
|
-
try {
|
|
43
|
-
const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
|
|
44
|
-
return { disabled: false, options };
|
|
45
|
-
}
|
|
46
|
-
catch (_b) {
|
|
47
|
-
return { disabled: true, options: [], placeholder: 'Failed to load scheduling links.' };
|
|
48
|
-
}
|
|
49
|
-
}),
|
|
50
|
-
}),
|
|
51
|
-
},
|
|
52
|
-
run(context) {
|
|
53
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const response = yield (0, common_1.savvyCalApiCall)({
|
|
55
|
-
token: (0, auth_1.getToken)(context.auth),
|
|
56
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
57
|
-
path: `/links/${context.propsValue.link_id}/duplicate`,
|
|
58
|
-
});
|
|
59
|
-
return (0, common_1.flattenLink)(response.body);
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=duplicate-scheduling-link.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"duplicate-scheduling-link.js","sourceRoot":"","sources":["../../../../src/lib/actions/duplicate-scheduling-link.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAMmB;AACnB,kCAAiD;AAEpC,QAAA,6BAA6B,GAAG,IAAA,+BAAY,EAAC;IACxD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,gDAAgD;IAC7D,KAAK,EAAE;QACL,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,MAAM;YACnB,WAAW,EAAE,iEAAiE;YAC9E,UAAU,EAAE,EAAE;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;gBACtB,IAAI,CAAC,IAAI;oBAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;gBACpG,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAgB,EAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC,CAAC;oBACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;gBACtC,CAAC;gBAAC,WAAM,CAAC;oBACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;gBAC/E,CAAC;YACH,CAAC,CAAA;SACF,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACzB,IAAI,EAAE,mBAAY;YAClB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EAAE,0CAA0C;YACvD,UAAU,EAAE,CAAC,SAAS,CAAC;YACvB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,KAA0B,EAAE,oDAArB,EAAE,IAAI,EAAE,OAAO,EAAE;gBAC/B,IAAI,CAAC,IAAI;oBAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;gBACpG,IAAI,CAAC;oBACH,MAAM,OAAO,GAAG,MAAM,IAAA,yBAAgB,EAAC,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE,OAAwB,CAAC,CAAC;oBACjF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;gBACtC,CAAC;gBAAC,WAAM,CAAC;oBACP,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;gBAC1F,CAAC;YACH,CAAC,CAAA;SACF,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAyB;gBAC7D,KAAK,EAAE,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,CAAC;gBAC7B,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,UAAU,OAAO,CAAC,UAAU,CAAC,OAAO,YAAY;aACvD,CAAC,CAAC;YACH,OAAO,IAAA,oBAAW,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const findEventsByEmailAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {
|
|
4
|
-
attendee_email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
start_after: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
6
|
-
start_before: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
7
|
-
}>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findEventsByEmailAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const common_1 = require("../common");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
exports.findEventsByEmailAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth: auth_1.savvyCalAuth,
|
|
10
|
-
name: 'find_events_by_email',
|
|
11
|
-
displayName: 'Find Events by Attendee Email',
|
|
12
|
-
description: "Returns all events where the attendee's email matches the given address.",
|
|
13
|
-
props: {
|
|
14
|
-
attendee_email: pieces_framework_1.Property.ShortText({
|
|
15
|
-
displayName: 'Attendee Email',
|
|
16
|
-
description: 'The email address of the attendee to search for.',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
start_after: pieces_framework_1.Property.DateTime({
|
|
20
|
-
displayName: 'Start After',
|
|
21
|
-
description: 'Only search events starting after this date. Use this to limit the search scope and improve performance.',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
start_before: pieces_framework_1.Property.DateTime({
|
|
25
|
-
displayName: 'Start Before',
|
|
26
|
-
description: 'Only search events starting before this date.',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
},
|
|
30
|
-
run(context) {
|
|
31
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const token = (0, auth_1.getToken)(context.auth);
|
|
33
|
-
const { attendee_email, start_after, start_before } = context.propsValue;
|
|
34
|
-
const queryParams = {};
|
|
35
|
-
if (start_after)
|
|
36
|
-
queryParams['start_after'] = start_after;
|
|
37
|
-
if (start_before)
|
|
38
|
-
queryParams['start_before'] = start_before;
|
|
39
|
-
const events = yield (0, common_1.savvyCalPaginatedCall)({
|
|
40
|
-
token,
|
|
41
|
-
path: '/events',
|
|
42
|
-
queryParams,
|
|
43
|
-
});
|
|
44
|
-
const normalizedEmail = attendee_email.toLowerCase().trim();
|
|
45
|
-
return events
|
|
46
|
-
.filter((e) => { var _a; return (_a = e.attendees) === null || _a === void 0 ? void 0 : _a.some((a) => { var _a; return ((_a = a.email) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === normalizedEmail; }); })
|
|
47
|
-
.map(common_1.flattenEvent);
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=find-events-by-email.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-events-by-email.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-events-by-email.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,sCAA+E;AAC/E,kCAAiD;AAEpC,QAAA,uBAAuB,GAAG,IAAA,+BAAY,EAAC;IAClD,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,0EAA0E;IACvF,KAAK,EAAE;QACL,cAAc,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACjC,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC7B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,0GAA0G;YACvH,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,KAAK,GAAG,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAEzE,MAAM,WAAW,GAA2B,EAAE,CAAC;YAC/C,IAAI,WAAW;gBAAE,WAAW,CAAC,aAAa,CAAC,GAAG,WAAW,CAAC;YAC1D,IAAI,YAAY;gBAAE,WAAW,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAE7D,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAqB,EAAgB;gBACxD,KAAK;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW;aACZ,CAAC,CAAC;YAEH,MAAM,eAAe,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;YAC5D,OAAO,MAAM;iBACV,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,SAAS,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,KAAK,0CAAE,WAAW,EAAE,MAAK,eAAe,CAAA,EAAA,CAAC,CAAA,EAAA,CAAC;iBACnF,GAAG,CAAC,qBAAY,CAAC,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const getCurrentUserAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {}>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCurrentUserAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../auth");
|
|
9
|
-
exports.getCurrentUserAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.savvyCalAuth,
|
|
11
|
-
name: 'get_current_user',
|
|
12
|
-
displayName: 'Get Current User',
|
|
13
|
-
description: 'Retrieves the profile of the currently authenticated SavvyCal user.',
|
|
14
|
-
props: {},
|
|
15
|
-
run(context) {
|
|
16
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
var _a, _b, _c;
|
|
18
|
-
const response = yield (0, common_1.savvyCalApiCall)({
|
|
19
|
-
token: (0, auth_1.getToken)(context.auth),
|
|
20
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
21
|
-
path: '/me',
|
|
22
|
-
});
|
|
23
|
-
const user = response.body;
|
|
24
|
-
return {
|
|
25
|
-
id: user.id,
|
|
26
|
-
name: user.name,
|
|
27
|
-
email: user.email,
|
|
28
|
-
slug: (_a = user.slug) !== null && _a !== void 0 ? _a : null,
|
|
29
|
-
time_zone: (_b = user.time_zone) !== null && _b !== void 0 ? _b : null,
|
|
30
|
-
created_at: user.created_at,
|
|
31
|
-
updated_at: (_c = user.updated_at) !== null && _c !== void 0 ? _c : null,
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=get-current-user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-current-user.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-current-user.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyD;AACzD,sCAA4C;AAC5C,kCAAiD;AAEpC,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,qEAAqE;IAClF,KAAK,EAAE,EAAE;IACH,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAQnC;gBACD,KAAK,EAAE,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,CAAC;gBAC7B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,KAAK;aACZ,CAAC,CAAC;YAEH,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC3B,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,MAAA,IAAI,CAAC,IAAI,mCAAI,IAAI;gBACvB,SAAS,EAAE,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI;gBACjC,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,UAAU,EAAE,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI;aACpC,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getEventAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {
|
|
4
|
-
event_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
}>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEventAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const auth_1 = require("../auth");
|
|
9
|
-
exports.getEventAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: auth_1.savvyCalAuth,
|
|
11
|
-
name: 'get_event',
|
|
12
|
-
displayName: 'Get Event',
|
|
13
|
-
description: 'Retrieves the details of a specific scheduled meeting by its ID.',
|
|
14
|
-
props: {
|
|
15
|
-
event_id: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'Event ID',
|
|
17
|
-
description: '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.',
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
run(context) {
|
|
22
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
const response = yield (0, common_1.savvyCalApiCall)({
|
|
24
|
-
token: (0, auth_1.getToken)(context.auth),
|
|
25
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
26
|
-
path: `/events/${context.propsValue.event_id}`,
|
|
27
|
-
});
|
|
28
|
-
return (0, common_1.flattenEvent)(response.body);
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
//# sourceMappingURL=get-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-event.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-event.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,sCAAyE;AACzE,kCAAiD;AAEpC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,mBAAY;IAClB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,kEAAkE;IAC/E,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,oIAAoI;YACjJ,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAe,EAAgB;gBACpD,KAAK,EAAE,IAAA,eAAQ,EAAC,OAAO,CAAC,IAAI,CAAC;gBAC7B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,WAAW,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;aAC/C,CAAC,CAAC;YAEH,OAAO,IAAA,qBAAY,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const getLinkSlotsAction: import("@activepieces/pieces-framework").IAction<(import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
3
|
-
}>)[], {
|
|
4
|
-
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
5
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
6
|
-
}>)[]>;
|
|
7
|
-
link_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
8
|
-
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
9
|
-
}>)[]>;
|
|
10
|
-
}>;
|