@activepieces/piece-savvycal 0.1.4 → 0.1.6

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.
Files changed (61) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +20 -66
  3. package/src/index.d.ts +0 -3
  4. package/src/index.js.map +0 -1
  5. package/src/lib/actions/cancel-event.d.ts +0 -5
  6. package/src/lib/actions/cancel-event.js +0 -38
  7. package/src/lib/actions/cancel-event.js.map +0 -1
  8. package/src/lib/actions/create-event.d.ts +0 -20
  9. package/src/lib/actions/create-event.js +0 -235
  10. package/src/lib/actions/create-event.js.map +0 -1
  11. package/src/lib/actions/delete-scheduling-link.d.ts +0 -10
  12. package/src/lib/actions/delete-scheduling-link.js +0 -69
  13. package/src/lib/actions/delete-scheduling-link.js.map +0 -1
  14. package/src/lib/actions/duplicate-scheduling-link.d.ts +0 -10
  15. package/src/lib/actions/duplicate-scheduling-link.js +0 -65
  16. package/src/lib/actions/duplicate-scheduling-link.js.map +0 -1
  17. package/src/lib/actions/find-events-by-email.d.ts +0 -7
  18. package/src/lib/actions/find-events-by-email.js +0 -53
  19. package/src/lib/actions/find-events-by-email.js.map +0 -1
  20. package/src/lib/actions/get-current-user.d.ts +0 -3
  21. package/src/lib/actions/get-current-user.js +0 -38
  22. package/src/lib/actions/get-current-user.js.map +0 -1
  23. package/src/lib/actions/get-event.d.ts +0 -5
  24. package/src/lib/actions/get-event.js +0 -34
  25. package/src/lib/actions/get-event.js.map +0 -1
  26. package/src/lib/actions/get-link-slots.d.ts +0 -10
  27. package/src/lib/actions/get-link-slots.js +0 -72
  28. package/src/lib/actions/get-link-slots.js.map +0 -1
  29. package/src/lib/actions/get-scheduling-link.d.ts +0 -10
  30. package/src/lib/actions/get-scheduling-link.js +0 -65
  31. package/src/lib/actions/get-scheduling-link.js.map +0 -1
  32. package/src/lib/actions/get-workflow-rules.d.ts +0 -7
  33. package/src/lib/actions/get-workflow-rules.js +0 -52
  34. package/src/lib/actions/get-workflow-rules.js.map +0 -1
  35. package/src/lib/actions/list-events.d.ts +0 -14
  36. package/src/lib/actions/list-events.js +0 -149
  37. package/src/lib/actions/list-events.js.map +0 -1
  38. package/src/lib/actions/list-scheduling-links.d.ts +0 -7
  39. package/src/lib/actions/list-scheduling-links.js +0 -51
  40. package/src/lib/actions/list-scheduling-links.js.map +0 -1
  41. package/src/lib/actions/list-workflows.d.ts +0 -3
  42. package/src/lib/actions/list-workflows.js +0 -37
  43. package/src/lib/actions/list-workflows.js.map +0 -1
  44. package/src/lib/actions/toggle-scheduling-link.d.ts +0 -10
  45. package/src/lib/actions/toggle-scheduling-link.js +0 -65
  46. package/src/lib/actions/toggle-scheduling-link.js.map +0 -1
  47. package/src/lib/auth.d.ts +0 -6
  48. package/src/lib/auth.js +0 -60
  49. package/src/lib/auth.js.map +0 -1
  50. package/src/lib/common/index.d.ts +0 -98
  51. package/src/lib/common/index.js +0 -151
  52. package/src/lib/common/index.js.map +0 -1
  53. package/src/lib/triggers/new-event.d.ts +0 -42
  54. package/src/lib/triggers/new-event.js +0 -193
  55. package/src/lib/triggers/new-event.js.map +0 -1
  56. package/src/lib/triggers/new-poll-response.d.ts +0 -18
  57. package/src/lib/triggers/new-poll-response.js +0 -84
  58. package/src/lib/triggers/new-poll-response.js.map +0 -1
  59. package/src/lib/triggers/workflow-action-triggered.d.ts +0 -10
  60. package/src/lib/triggers/workflow-action-triggered.js +0 -68
  61. package/src/lib/triggers/workflow-action-triggered.js.map +0 -1
@@ -1,235 +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
- audience: 'both',
15
- aiMetadata: { description: 'Books a new SavvyCal meeting on a given scheduling link for an attendee at a specific start/end time. Use to schedule a booking on the attendee\'s behalf; the chosen time must match an available slot on the link (call Get Available Slots first if unsure). Requires the link id, attendee name/email, and time zone in Olson format. Not idempotent — each call creates a separate booking.', idempotent: false },
16
- props: {
17
- team_id: pieces_framework_1.Property.Dropdown({
18
- auth: auth_1.savvyCalAuth,
19
- displayName: 'Team',
20
- description: 'Filter scheduling links by team. Leave empty to show all teams.',
21
- refreshers: [],
22
- required: false,
23
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
24
- if (!auth)
25
- return { disabled: true, options: [], placeholder: 'Please connect your account first' };
26
- try {
27
- const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
28
- return { disabled: false, options };
29
- }
30
- catch (_b) {
31
- return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
32
- }
33
- }),
34
- }),
35
- link_id: pieces_framework_1.Property.Dropdown({
36
- auth: auth_1.savvyCalAuth,
37
- displayName: 'Scheduling Link',
38
- description: 'Select the scheduling link to book a meeting on.',
39
- refreshers: ['team_id'],
40
- required: true,
41
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
42
- if (!auth)
43
- return {
44
- disabled: true,
45
- options: [],
46
- placeholder: 'Please connect your account first',
47
- };
48
- try {
49
- const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
50
- return { disabled: false, options };
51
- }
52
- catch (_b) {
53
- return {
54
- disabled: true,
55
- options: [],
56
- placeholder: 'Failed to load scheduling links. Check your connection.',
57
- };
58
- }
59
- }),
60
- }),
61
- start_at: pieces_framework_1.Property.DateTime({
62
- displayName: 'Start Time',
63
- description: 'The start date and time of the meeting. Must match an available slot on the scheduling link.',
64
- required: true,
65
- }),
66
- end_at: pieces_framework_1.Property.DateTime({
67
- displayName: 'End Time',
68
- description: 'The End date and time of the meeting',
69
- required: true,
70
- }),
71
- attendee_name: pieces_framework_1.Property.ShortText({
72
- displayName: 'Attendee Name',
73
- description: 'Full name of the person booking the meeting.',
74
- required: true,
75
- }),
76
- attendee_email: pieces_framework_1.Property.ShortText({
77
- displayName: 'Attendee Email',
78
- description: 'Email address of the person booking the meeting.',
79
- required: true,
80
- }),
81
- time_zone: pieces_framework_1.Property.ShortText({
82
- displayName: 'Time Zone',
83
- description: "Attendee's local time zone in Olson format (e.g. America/New_York, Europe/London, Africa/Lagos).",
84
- required: true,
85
- }),
86
- phone_number: pieces_framework_1.Property.ShortText({
87
- displayName: 'Phone Number',
88
- description: "Attendee's phone number in international format (e.g. +15555555555). Required only if the scheduling link asks for it.",
89
- required: false,
90
- }),
91
- custom_fields: pieces_framework_1.Property.DynamicProperties({
92
- auth: auth_1.savvyCalAuth,
93
- displayName: 'Custom Fields',
94
- description: 'Additional questions configured on the scheduling link (e.g. Company, Why are we meeting?). Filled in dynamically based on the selected link.',
95
- required: false,
96
- refreshers: ['link_id'],
97
- props: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, link_id }) {
98
- if (!auth || !link_id)
99
- return {};
100
- try {
101
- const fields = yield fetchLinkFields((0, auth_1.getToken)(auth), link_id);
102
- return buildCustomFieldProps(fields);
103
- }
104
- catch (_b) {
105
- return {};
106
- }
107
- }),
108
- }),
109
- metadata: pieces_framework_1.Property.Object({
110
- displayName: 'Metadata',
111
- description: 'Custom key/value pairs to attach to the event. Useful for tracking the source flow or correlating with external systems.',
112
- required: false,
113
- }),
114
- },
115
- run(context) {
116
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
117
- const token = (0, auth_1.getToken)(context.auth);
118
- const { link_id, start_at, end_at, attendee_name, attendee_email, time_zone, phone_number, custom_fields, metadata, } = context.propsValue;
119
- const linkFields = yield fetchLinkFields(token, link_id);
120
- const submittedFields = serializeCustomFields({
121
- linkFields,
122
- customFields: custom_fields,
123
- });
124
- const body = {
125
- start_at,
126
- end_at,
127
- display_name: attendee_name,
128
- email: attendee_email,
129
- time_zone,
130
- };
131
- if (phone_number)
132
- body['phone_number'] = phone_number;
133
- if (submittedFields.length > 0)
134
- body['fields'] = submittedFields;
135
- if (metadata && Object.keys(metadata).length > 0)
136
- body['metadata'] = metadata;
137
- const response = yield (0, common_1.savvyCalApiCall)({
138
- token,
139
- method: pieces_common_1.HttpMethod.POST,
140
- path: `/links/${link_id}/events`,
141
- body,
142
- });
143
- return (0, common_1.flattenEvent)(response.body);
144
- });
145
- },
146
- });
147
- function fetchLinkFields(token, linkId) {
148
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
149
- var _a;
150
- const response = yield (0, common_1.savvyCalApiCall)({
151
- token,
152
- method: pieces_common_1.HttpMethod.GET,
153
- path: `/links/${linkId}`,
154
- });
155
- return (_a = response.body.fields) !== null && _a !== void 0 ? _a : [];
156
- });
157
- }
158
- function buildCustomFieldProps(fields) {
159
- var _a;
160
- const props = {};
161
- for (const field of fields) {
162
- if (isHiddenFieldType(field.type))
163
- continue;
164
- const params = {
165
- displayName: field.label,
166
- required: (_a = field.is_required) !== null && _a !== void 0 ? _a : false,
167
- };
168
- const choices = normalizeFieldOptions(field);
169
- if (isMultiSelectFieldType(field.type)) {
170
- props[field.id] = pieces_framework_1.Property.StaticMultiSelectDropdown(Object.assign(Object.assign({}, params), { options: { options: choices } }));
171
- }
172
- else if (isSingleSelectFieldType(field.type)) {
173
- props[field.id] = pieces_framework_1.Property.StaticDropdown(Object.assign(Object.assign({}, params), { options: { options: choices } }));
174
- }
175
- else if (isLongTextFieldType(field.type)) {
176
- props[field.id] = pieces_framework_1.Property.LongText(params);
177
- }
178
- else {
179
- props[field.id] = pieces_framework_1.Property.ShortText(params);
180
- }
181
- }
182
- return props;
183
- }
184
- function serializeCustomFields({ linkFields, customFields, }) {
185
- if (!customFields)
186
- return [];
187
- const result = [];
188
- for (const field of linkFields) {
189
- const raw = customFields[field.id];
190
- if (raw === undefined || raw === null || raw === '')
191
- continue;
192
- const value = Array.isArray(raw) ? raw.join(MULTI_SELECT_VALUE_DELIMITER) : String(raw);
193
- result.push({ id: field.id, label: field.label, type: field.type, value });
194
- }
195
- return result;
196
- }
197
- function normalizeFieldOptions(field) {
198
- var _a, _b;
199
- const raw = (_b = (_a = field.options) !== null && _a !== void 0 ? _a : field.choices) !== null && _b !== void 0 ? _b : [];
200
- return raw.map((opt) => {
201
- var _a, _b, _c, _d, _e, _f, _g, _h;
202
- if (typeof opt === 'string')
203
- return { label: opt, value: opt };
204
- return {
205
- 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 : '',
206
- 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 : '',
207
- };
208
- });
209
- }
210
- function isMultiSelectFieldType(type) {
211
- const t = type.toLowerCase();
212
- return t === 'checkboxes' || t === 'multi_select' || t === 'checkbox_group';
213
- }
214
- function isSingleSelectFieldType(type) {
215
- const t = type.toLowerCase();
216
- return (t === 'select' ||
217
- t === 'select_menu' ||
218
- t === 'dropdown' ||
219
- t === 'radio' ||
220
- t === 'radio_buttons' ||
221
- t === 'single_select');
222
- }
223
- function isLongTextFieldType(type) {
224
- const t = type.toLowerCase();
225
- return t === 'long_text' || t === 'textarea' || t === 'paragraph';
226
- }
227
- function isHiddenFieldType(type) {
228
- return type.toLowerCase() === 'hidden';
229
- }
230
- // SavvyCal's CreateEventRequest documents fields[].value as a string. Multi-select
231
- // (checkboxes) selections are joined with this delimiter. The exact format SavvyCal
232
- // expects on the receiving side isn't documented; ", " matches common form-encoding
233
- // conventions. Adjust here if SavvyCal rejects multi-select payloads.
234
- const MULTI_SELECT_VALUE_DELIMITER = ', ';
235
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,kYAAkY,EAAE,UAAU,EAAE,KAAK,EAAE;IAClb,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,E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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,69 +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
- audience: 'both',
15
- aiMetadata: { description: 'Permanently deletes a scheduling link by its id; this cannot be undone. Use only when a link should be fully removed. The first call deletes the link and subsequent calls for the same id will fail, so treat it as a destructive, non-idempotent mutation.', idempotent: false },
16
- props: {
17
- team_id: pieces_framework_1.Property.Dropdown({
18
- auth: auth_1.savvyCalAuth,
19
- displayName: 'Team',
20
- description: 'Filter scheduling links by team. Leave empty to show all teams.',
21
- refreshers: [],
22
- required: false,
23
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
24
- if (!auth)
25
- return { disabled: true, options: [], placeholder: 'Please connect your account first' };
26
- try {
27
- const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
28
- return { disabled: false, options };
29
- }
30
- catch (_b) {
31
- return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
32
- }
33
- }),
34
- }),
35
- link_id: pieces_framework_1.Property.Dropdown({
36
- auth: auth_1.savvyCalAuth,
37
- displayName: 'Scheduling Link',
38
- description: 'Select the scheduling link to delete. This action cannot be undone.',
39
- refreshers: ['team_id'],
40
- required: true,
41
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
42
- if (!auth)
43
- return { disabled: true, options: [], placeholder: 'Please connect your account first' };
44
- try {
45
- const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
46
- return { disabled: false, options };
47
- }
48
- catch (_b) {
49
- return { disabled: true, options: [], placeholder: 'Failed to load scheduling links.' };
50
- }
51
- }),
52
- }),
53
- },
54
- run(context) {
55
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
56
- yield (0, common_1.savvyCalApiCall)({
57
- token: (0, auth_1.getToken)(context.auth),
58
- method: pieces_common_1.HttpMethod.DELETE,
59
- path: `/links/${context.propsValue.link_id}`,
60
- });
61
- return {
62
- success: true,
63
- link_id: context.propsValue.link_id,
64
- message: 'Scheduling link deleted successfully.',
65
- };
66
- });
67
- },
68
- });
69
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,8PAA8P,EAAE,UAAU,EAAE,KAAK,EAAE;IAC9S,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,EA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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,65 +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
- audience: 'both',
15
- aiMetadata: { description: 'Creates a new scheduling link as a copy of an existing one, identified by the source link id. Use to clone a link\'s configuration as a starting point. Not idempotent — each call produces another distinct copy.', idempotent: false },
16
- props: {
17
- team_id: pieces_framework_1.Property.Dropdown({
18
- auth: auth_1.savvyCalAuth,
19
- displayName: 'Team',
20
- description: 'Filter scheduling links by team. Leave empty to show all teams.',
21
- refreshers: [],
22
- required: false,
23
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
24
- if (!auth)
25
- return { disabled: true, options: [], placeholder: 'Please connect your account first' };
26
- try {
27
- const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
28
- return { disabled: false, options };
29
- }
30
- catch (_b) {
31
- return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
32
- }
33
- }),
34
- }),
35
- link_id: pieces_framework_1.Property.Dropdown({
36
- auth: auth_1.savvyCalAuth,
37
- displayName: 'Scheduling Link',
38
- description: 'Select the scheduling link to duplicate.',
39
- refreshers: ['team_id'],
40
- required: true,
41
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
42
- if (!auth)
43
- return { disabled: true, options: [], placeholder: 'Please connect your account first' };
44
- try {
45
- const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
46
- return { disabled: false, options };
47
- }
48
- catch (_b) {
49
- return { disabled: true, options: [], placeholder: 'Failed to load scheduling links.' };
50
- }
51
- }),
52
- }),
53
- },
54
- run(context) {
55
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
56
- const response = yield (0, common_1.savvyCalApiCall)({
57
- token: (0, auth_1.getToken)(context.auth),
58
- method: pieces_common_1.HttpMethod.POST,
59
- path: `/links/${context.propsValue.link_id}/duplicate`,
60
- });
61
- return (0, common_1.flattenLink)(response.body);
62
- });
63
- },
64
- });
65
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,oNAAoN,EAAE,UAAU,EAAE,KAAK,EAAE;IACpQ,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,53 +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
- audience: 'both',
14
- aiMetadata: { description: 'Finds all SavvyCal events that have a given email among their attendees. Use to look up a specific person\'s bookings when you only know their email; optionally narrow with a start-date window to limit the scan. Match is case-insensitive on the attendee email. Read-only and idempotent.', idempotent: true },
15
- props: {
16
- attendee_email: pieces_framework_1.Property.ShortText({
17
- displayName: 'Attendee Email',
18
- description: 'The email address of the attendee to search for.',
19
- required: true,
20
- }),
21
- start_after: pieces_framework_1.Property.DateTime({
22
- displayName: 'Start After',
23
- description: 'Only search events starting after this date. Use this to limit the search scope and improve performance.',
24
- required: false,
25
- }),
26
- start_before: pieces_framework_1.Property.DateTime({
27
- displayName: 'Start Before',
28
- description: 'Only search events starting before this date.',
29
- required: false,
30
- }),
31
- },
32
- run(context) {
33
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
- const token = (0, auth_1.getToken)(context.auth);
35
- const { attendee_email, start_after, start_before } = context.propsValue;
36
- const queryParams = {};
37
- if (start_after)
38
- queryParams['start_after'] = start_after;
39
- if (start_before)
40
- queryParams['start_before'] = start_before;
41
- const events = yield (0, common_1.savvyCalPaginatedCall)({
42
- token,
43
- path: '/events',
44
- queryParams,
45
- });
46
- const normalizedEmail = attendee_email.toLowerCase().trim();
47
- return events
48
- .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; }); })
49
- .map(common_1.flattenEvent);
50
- });
51
- },
52
- });
53
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,gSAAgS,EAAE,UAAU,EAAE,IAAI,EAAE;IAC/U,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,38 +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
- audience: 'both',
15
- aiMetadata: { description: 'Returns the profile of the SavvyCal account the connection is authenticated as (id, name, email, slug, time zone). Use to identify the current user or fetch their default time zone. Read-only and idempotent.', idempotent: true },
16
- props: {},
17
- run(context) {
18
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
- var _a, _b, _c;
20
- const response = yield (0, common_1.savvyCalApiCall)({
21
- token: (0, auth_1.getToken)(context.auth),
22
- method: pieces_common_1.HttpMethod.GET,
23
- path: '/me',
24
- });
25
- const user = response.body;
26
- return {
27
- id: user.id,
28
- name: user.name,
29
- email: user.email,
30
- slug: (_a = user.slug) !== null && _a !== void 0 ? _a : null,
31
- time_zone: (_b = user.time_zone) !== null && _b !== void 0 ? _b : null,
32
- created_at: user.created_at,
33
- updated_at: (_c = user.updated_at) !== null && _c !== void 0 ? _c : null,
34
- };
35
- });
36
- },
37
- });
38
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,iNAAiN,EAAE,UAAU,EAAE,IAAI,EAAE;IAChQ,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,34 +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
- audience: 'both',
15
- aiMetadata: { description: 'Fetches the full details of a single SavvyCal event by its event id. Use to look up a known booking (attendee, times, state, link); obtain the id from a trigger, List Events, or the event URL. Read-only and idempotent.', idempotent: true },
16
- props: {
17
- event_id: pieces_framework_1.Property.ShortText({
18
- displayName: 'Event ID',
19
- 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.',
20
- required: true,
21
- }),
22
- },
23
- run(context) {
24
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
25
- const response = yield (0, common_1.savvyCalApiCall)({
26
- token: (0, auth_1.getToken)(context.auth),
27
- method: pieces_common_1.HttpMethod.GET,
28
- path: `/events/${context.propsValue.event_id}`,
29
- });
30
- return (0, common_1.flattenEvent)(response.body);
31
- });
32
- },
33
- });
34
- //# 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,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4NAA4N,EAAE,UAAU,EAAE,IAAI,EAAE;IAC3Q,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
- }>;