@activepieces/piece-savvycal 0.0.2 → 0.1.0
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 +5 -5
- package/src/i18n/de.json +73 -94
- package/src/i18n/es.json +73 -94
- package/src/i18n/fr.json +81 -75
- package/src/i18n/ja.json +73 -94
- package/src/i18n/nl.json +72 -93
- package/src/i18n/pt.json +73 -94
- package/src/i18n/ru.json +74 -0
- package/src/i18n/translation.json +45 -13
- package/src/i18n/vi.json +74 -0
- package/src/i18n/zh.json +40 -61
- package/src/index.d.ts +3 -2
- package/src/index.js +27 -36
- package/src/index.js.map +1 -1
- package/src/lib/actions/cancel-event.d.ts +3 -1
- package/src/lib/actions/cancel-event.js +3 -3
- package/src/lib/actions/cancel-event.js.map +1 -1
- package/src/lib/actions/create-event.d.ts +10 -2
- package/src/lib/actions/create-event.js +32 -17
- package/src/lib/actions/create-event.js.map +1 -1
- package/src/lib/actions/delete-scheduling-link.d.ts +10 -0
- package/src/lib/actions/delete-scheduling-link.js +67 -0
- package/src/lib/actions/delete-scheduling-link.js.map +1 -0
- package/src/lib/actions/duplicate-scheduling-link.d.ts +10 -0
- package/src/lib/actions/duplicate-scheduling-link.js +63 -0
- package/src/lib/actions/duplicate-scheduling-link.js.map +1 -0
- package/src/lib/actions/find-events-by-email.d.ts +3 -1
- package/src/lib/actions/find-events-by-email.js +3 -3
- package/src/lib/actions/find-events-by-email.js.map +1 -1
- package/src/lib/actions/get-current-user.d.ts +3 -1
- package/src/lib/actions/get-current-user.js +3 -3
- package/src/lib/actions/get-current-user.js.map +1 -1
- package/src/lib/actions/get-event.d.ts +3 -1
- package/src/lib/actions/get-event.js +3 -3
- package/src/lib/actions/get-event.js.map +1 -1
- package/src/lib/actions/get-link-slots.d.ts +10 -0
- package/src/lib/actions/get-link-slots.js +70 -0
- package/src/lib/actions/get-link-slots.js.map +1 -0
- package/src/lib/actions/get-scheduling-link.d.ts +10 -0
- package/src/lib/actions/get-scheduling-link.js +63 -0
- package/src/lib/actions/get-scheduling-link.js.map +1 -0
- package/src/lib/actions/get-workflow-rules.d.ts +7 -0
- package/src/lib/actions/get-workflow-rules.js +50 -0
- package/src/lib/actions/get-workflow-rules.js.map +1 -0
- package/src/lib/actions/list-events.d.ts +10 -3
- package/src/lib/actions/list-events.js +70 -24
- package/src/lib/actions/list-events.js.map +1 -1
- package/src/lib/actions/list-scheduling-links.d.ts +7 -1
- package/src/lib/actions/list-scheduling-links.js +30 -17
- package/src/lib/actions/list-scheduling-links.js.map +1 -1
- package/src/lib/actions/list-workflows.d.ts +3 -0
- package/src/lib/actions/list-workflows.js +35 -0
- package/src/lib/actions/list-workflows.js.map +1 -0
- package/src/lib/actions/toggle-scheduling-link.d.ts +10 -0
- package/src/lib/actions/toggle-scheduling-link.js +63 -0
- package/src/lib/actions/toggle-scheduling-link.js.map +1 -0
- package/src/lib/auth.d.ts +14 -0
- package/src/lib/auth.js +59 -0
- package/src/lib/auth.js.map +1 -0
- package/src/lib/common/index.d.ts +13 -0
- package/src/lib/common/index.js +98 -29
- package/src/lib/common/index.js.map +1 -1
- package/src/lib/triggers/new-event.d.ts +36 -4
- package/src/lib/triggers/new-event.js +85 -18
- package/src/lib/triggers/new-event.js.map +1 -1
- package/src/lib/triggers/new-poll-response.d.ts +18 -0
- package/src/lib/triggers/new-poll-response.js +81 -0
- package/src/lib/triggers/new-poll-response.js.map +1 -0
- package/src/lib/triggers/workflow-action-triggered.d.ts +10 -0
- package/src/lib/triggers/workflow-action-triggered.js +65 -0
- package/src/lib/triggers/workflow-action-triggered.js.map +1 -0
- package/src/lib/common/webhook-trigger-factory.d.ts +0 -7
- package/src/lib/common/webhook-trigger-factory.js +0 -96
- package/src/lib/common/webhook-trigger-factory.js.map +0 -1
- package/src/lib/triggers/booking-canceled.d.ts +0 -1
- package/src/lib/triggers/booking-canceled.js +0 -11
- package/src/lib/triggers/booking-canceled.js.map +0 -1
- package/src/lib/triggers/booking-rescheduled.d.ts +0 -1
- package/src/lib/triggers/booking-rescheduled.js +0 -11
- package/src/lib/triggers/booking-rescheduled.js.map +0 -1
- package/src/lib/triggers/new-booking.d.ts +0 -1
- package/src/lib/triggers/new-booking.js +0 -11
- package/src/lib/triggers/new-booking.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AppConnectionType } from '@activepieces/shared';
|
|
2
|
+
export declare const savvyCalAuth: (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>)[];
|
|
5
|
+
export type SavvyCalAuthValue = {
|
|
6
|
+
type: AppConnectionType.OAUTH2;
|
|
7
|
+
access_token: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: AppConnectionType.CUSTOM_AUTH;
|
|
10
|
+
props: {
|
|
11
|
+
token: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function getToken(auth: SavvyCalAuthValue): string;
|
package/src/lib/auth.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.savvyCalAuth = void 0;
|
|
4
|
+
exports.getToken = getToken;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
+
const shared_1 = require("@activepieces/shared");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
const common_1 = require("./common");
|
|
10
|
+
exports.savvyCalAuth = [
|
|
11
|
+
pieces_framework_1.PieceAuth.OAuth2({
|
|
12
|
+
description: 'Connect your SavvyCal account using OAuth2.',
|
|
13
|
+
authUrl: 'https://savvycal.com/oauth/authorize',
|
|
14
|
+
tokenUrl: 'https://savvycal.com/oauth/token',
|
|
15
|
+
required: true,
|
|
16
|
+
scope: [],
|
|
17
|
+
}),
|
|
18
|
+
pieces_framework_1.PieceAuth.CustomAuth({
|
|
19
|
+
displayName: 'Personal Access Token',
|
|
20
|
+
description: `To get your SavvyCal API token:
|
|
21
|
+
1. Log in to your SavvyCal account at https://savvycal.com
|
|
22
|
+
2. Go to **Settings > Developers**
|
|
23
|
+
3. Under **Personal Tokens**, click **Create a token**
|
|
24
|
+
4. Give it a name, then click the **...** menu next to it to view the token
|
|
25
|
+
5. Copy the **Private Key** (starts with \`pt_secret_\`) — not the Public Key
|
|
26
|
+
|
|
27
|
+
**Note:** Keep this token secret — it gives full access to your SavvyCal account.`,
|
|
28
|
+
required: true,
|
|
29
|
+
props: {
|
|
30
|
+
token: pieces_framework_1.PieceAuth.SecretText({
|
|
31
|
+
displayName: 'Personal Access Token',
|
|
32
|
+
description: 'Your SavvyCal Personal Access Token (Private Key).',
|
|
33
|
+
required: true,
|
|
34
|
+
}),
|
|
35
|
+
},
|
|
36
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
37
|
+
try {
|
|
38
|
+
yield pieces_common_1.httpClient.sendRequest({
|
|
39
|
+
method: pieces_common_1.HttpMethod.GET,
|
|
40
|
+
url: `${common_1.SAVVYCAL_BASE_URL}/me`,
|
|
41
|
+
authentication: {
|
|
42
|
+
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
43
|
+
token: auth.token,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return { valid: true };
|
|
47
|
+
}
|
|
48
|
+
catch (_b) {
|
|
49
|
+
return { valid: false, error: 'Invalid token. Please check your Personal Access Token and try again.' };
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
];
|
|
54
|
+
function getToken(auth) {
|
|
55
|
+
if (auth.type === shared_1.AppConnectionType.OAUTH2)
|
|
56
|
+
return auth.access_token;
|
|
57
|
+
return auth.props.token;
|
|
58
|
+
}
|
|
59
|
+
//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,IAAI,IAAI,CAAC,IAAI,KAAK,0BAAiB,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC,YAAY,CAAC;IACrE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAC1B,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { HttpMethod, HttpMessageBody, HttpResponse } from '@activepieces/pieces-common';
|
|
2
|
+
import { DropdownOption } from '@activepieces/pieces-framework';
|
|
2
3
|
export declare const SAVVYCAL_BASE_URL = "https://api.savvycal.com/v1";
|
|
4
|
+
export declare function verifyWebhookSignature(secret: string, signatureHeader: string, rawBody: unknown): boolean;
|
|
3
5
|
export declare function savvyCalApiCall<T extends HttpMessageBody>({ token, method, path, body, queryParams, }: {
|
|
4
6
|
token: string;
|
|
5
7
|
method: HttpMethod;
|
|
@@ -12,6 +14,10 @@ export declare function savvyCalPaginatedCall<T>({ token, path, queryParams, }:
|
|
|
12
14
|
path: string;
|
|
13
15
|
queryParams?: Record<string, string>;
|
|
14
16
|
}): Promise<T[]>;
|
|
17
|
+
export declare function buildTeamOptions(token: string): Promise<DropdownOption<string>[]>;
|
|
18
|
+
export declare function buildWorkflowOptions(token: string): Promise<DropdownOption<string>[]>;
|
|
19
|
+
export declare function buildLinkOptions(token: string, teamId?: string | null): Promise<DropdownOption<string>[]>;
|
|
20
|
+
export declare function flattenLink(link: SavvyCalSchedulingLink): Record<string, unknown>;
|
|
15
21
|
export declare function flattenEvent(event: SavvyCalEvent): Record<string, unknown>;
|
|
16
22
|
export interface SavvyCalAttendee {
|
|
17
23
|
id: string;
|
|
@@ -26,6 +32,7 @@ export interface SavvyCalAttendee {
|
|
|
26
32
|
}
|
|
27
33
|
export interface SavvyCalEvent {
|
|
28
34
|
id: string;
|
|
35
|
+
uuid: string | null;
|
|
29
36
|
summary: string | null;
|
|
30
37
|
description: string | null;
|
|
31
38
|
duration: number;
|
|
@@ -58,6 +65,11 @@ export interface SavvyCalEvent {
|
|
|
58
65
|
amount_total: number | null;
|
|
59
66
|
} | null;
|
|
60
67
|
}
|
|
68
|
+
export interface SavvyCalScope {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
slug: string;
|
|
72
|
+
}
|
|
61
73
|
export interface SavvyCalSchedulingLink {
|
|
62
74
|
id: string;
|
|
63
75
|
name: string;
|
|
@@ -67,4 +79,5 @@ export interface SavvyCalSchedulingLink {
|
|
|
67
79
|
duration: number | null;
|
|
68
80
|
created_at: string;
|
|
69
81
|
updated_at: string;
|
|
82
|
+
scope: SavvyCalScope | null;
|
|
70
83
|
}
|
package/src/lib/common/index.js
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SAVVYCAL_BASE_URL = void 0;
|
|
4
|
+
exports.verifyWebhookSignature = verifyWebhookSignature;
|
|
4
5
|
exports.savvyCalApiCall = savvyCalApiCall;
|
|
5
6
|
exports.savvyCalPaginatedCall = savvyCalPaginatedCall;
|
|
7
|
+
exports.buildTeamOptions = buildTeamOptions;
|
|
8
|
+
exports.buildWorkflowOptions = buildWorkflowOptions;
|
|
9
|
+
exports.buildLinkOptions = buildLinkOptions;
|
|
10
|
+
exports.flattenLink = flattenLink;
|
|
6
11
|
exports.flattenEvent = flattenEvent;
|
|
7
12
|
const tslib_1 = require("tslib");
|
|
13
|
+
const crypto = tslib_1.__importStar(require("crypto"));
|
|
8
14
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
15
|
exports.SAVVYCAL_BASE_URL = 'https://api.savvycal.com/v1';
|
|
16
|
+
function verifyWebhookSignature(secret, signatureHeader, rawBody) {
|
|
17
|
+
const bodyString = typeof rawBody === 'string' ? rawBody : Buffer.isBuffer(rawBody) ? rawBody.toString('utf8') : JSON.stringify(rawBody);
|
|
18
|
+
// Node's digest('hex') and SavvyCal both use lowercase hex — do not uppercase either side.
|
|
19
|
+
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(bodyString).digest('hex');
|
|
20
|
+
try {
|
|
21
|
+
// Normalise casing before constant-time comparison to guard against case mismatches.
|
|
22
|
+
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signatureHeader.toLowerCase()));
|
|
23
|
+
}
|
|
24
|
+
catch (_a) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
10
28
|
function savvyCalApiCall(_a) {
|
|
11
29
|
return tslib_1.__awaiter(this, arguments, void 0, function* ({ token, method, path, body, queryParams, }) {
|
|
12
|
-
console.log("sdfsd", token);
|
|
13
30
|
return pieces_common_1.httpClient.sendRequest({
|
|
14
31
|
method,
|
|
15
32
|
url: `${exports.SAVVYCAL_BASE_URL}${path}`,
|
|
@@ -42,41 +59,93 @@ function savvyCalPaginatedCall(_a) {
|
|
|
42
59
|
return results;
|
|
43
60
|
});
|
|
44
61
|
}
|
|
62
|
+
function buildTeamOptions(token) {
|
|
63
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const links = yield savvyCalPaginatedCall({ token, path: '/links' });
|
|
65
|
+
const seenIds = new Set();
|
|
66
|
+
const options = [{ label: 'Personal', value: 'personal' }];
|
|
67
|
+
for (const link of links) {
|
|
68
|
+
if (link.scope && !seenIds.has(link.scope.id)) {
|
|
69
|
+
seenIds.add(link.scope.id);
|
|
70
|
+
options.push({ label: link.scope.name, value: link.scope.id });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return options;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function buildWorkflowOptions(token) {
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const workflows = yield savvyCalPaginatedCall({ token, path: '/workflows' });
|
|
79
|
+
return workflows.map((w) => ({ label: w.name, value: w.id }));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function buildLinkOptions(token, teamId) {
|
|
83
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
const links = yield savvyCalPaginatedCall({ token, path: '/links' });
|
|
85
|
+
const filtered = teamId
|
|
86
|
+
? teamId === 'personal'
|
|
87
|
+
? links.filter((l) => l.scope === null)
|
|
88
|
+
: links.filter((l) => { var _a; return ((_a = l.scope) === null || _a === void 0 ? void 0 : _a.id) === teamId; })
|
|
89
|
+
: links;
|
|
90
|
+
return filtered.map((l) => ({ label: `${l.name} (${l.slug})`, value: l.id }));
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function flattenLink(link) {
|
|
94
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
95
|
+
return {
|
|
96
|
+
id: link.id,
|
|
97
|
+
name: link.name,
|
|
98
|
+
slug: link.slug,
|
|
99
|
+
url: (_a = link.url) !== null && _a !== void 0 ? _a : null,
|
|
100
|
+
active: (_b = link.active) !== null && _b !== void 0 ? _b : null,
|
|
101
|
+
duration_minutes: (_c = link.duration) !== null && _c !== void 0 ? _c : null,
|
|
102
|
+
team_id: (_e = (_d = link.scope) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : null,
|
|
103
|
+
team_name: (_g = (_f = link.scope) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : null,
|
|
104
|
+
created_at: link.created_at,
|
|
105
|
+
updated_at: link.updated_at,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
45
108
|
function flattenEvent(event) {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
|
|
47
|
-
const scheduler = (
|
|
109
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
110
|
+
const scheduler = (_b = (_a = event.attendees) === null || _a === void 0 ? void 0 : _a.find((a) => !a.is_organizer)) !== null && _b !== void 0 ? _b : null;
|
|
111
|
+
const organizer = (_d = (_c = event.attendees) === null || _c === void 0 ? void 0 : _c.find((a) => a.is_organizer)) !== null && _d !== void 0 ? _d : null;
|
|
48
112
|
return {
|
|
49
113
|
id: event.id,
|
|
50
|
-
|
|
51
|
-
|
|
114
|
+
uuid: (_e = event.uuid) !== null && _e !== void 0 ? _e : null,
|
|
115
|
+
summary: (_f = event.summary) !== null && _f !== void 0 ? _f : null,
|
|
116
|
+
description: (_g = event.description) !== null && _g !== void 0 ? _g : null,
|
|
52
117
|
state: event.state,
|
|
53
118
|
start_at: event.start_at,
|
|
54
119
|
end_at: event.end_at,
|
|
55
|
-
duration_minutes: (
|
|
56
|
-
url: (
|
|
57
|
-
location: (
|
|
58
|
-
is_group_session: (
|
|
120
|
+
duration_minutes: (_h = event.duration) !== null && _h !== void 0 ? _h : null,
|
|
121
|
+
url: (_j = event.url) !== null && _j !== void 0 ? _j : null,
|
|
122
|
+
location: (_k = event.location) !== null && _k !== void 0 ? _k : null,
|
|
123
|
+
is_group_session: (_l = event.is_group_session) !== null && _l !== void 0 ? _l : null,
|
|
59
124
|
created_at: event.created_at,
|
|
60
|
-
canceled_at: (
|
|
61
|
-
cancel_reason: (
|
|
62
|
-
rescheduled_at: (
|
|
63
|
-
reschedule_reason: (
|
|
64
|
-
original_start_at: (
|
|
65
|
-
original_end_at: (
|
|
66
|
-
scheduling_link_id: (
|
|
67
|
-
scheduling_link_name: (
|
|
68
|
-
scheduling_link_slug: (
|
|
69
|
-
attendee_display_name: (
|
|
70
|
-
attendee_first_name: (
|
|
71
|
-
attendee_last_name: (
|
|
72
|
-
attendee_email: (
|
|
73
|
-
attendee_phone: (
|
|
74
|
-
attendee_time_zone: (
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
125
|
+
canceled_at: (_m = event.canceled_at) !== null && _m !== void 0 ? _m : null,
|
|
126
|
+
cancel_reason: (_o = event.cancel_reason) !== null && _o !== void 0 ? _o : null,
|
|
127
|
+
rescheduled_at: (_p = event.rescheduled_at) !== null && _p !== void 0 ? _p : null,
|
|
128
|
+
reschedule_reason: (_q = event.reschedule_reason) !== null && _q !== void 0 ? _q : null,
|
|
129
|
+
original_start_at: (_r = event.original_start_at) !== null && _r !== void 0 ? _r : null,
|
|
130
|
+
original_end_at: (_s = event.original_end_at) !== null && _s !== void 0 ? _s : null,
|
|
131
|
+
scheduling_link_id: (_u = (_t = event.link) === null || _t === void 0 ? void 0 : _t.id) !== null && _u !== void 0 ? _u : null,
|
|
132
|
+
scheduling_link_name: (_w = (_v = event.link) === null || _v === void 0 ? void 0 : _v.name) !== null && _w !== void 0 ? _w : null,
|
|
133
|
+
scheduling_link_slug: (_y = (_x = event.link) === null || _x === void 0 ? void 0 : _x.slug) !== null && _y !== void 0 ? _y : null,
|
|
134
|
+
attendee_display_name: (_z = scheduler === null || scheduler === void 0 ? void 0 : scheduler.display_name) !== null && _z !== void 0 ? _z : null,
|
|
135
|
+
attendee_first_name: (_0 = scheduler === null || scheduler === void 0 ? void 0 : scheduler.first_name) !== null && _0 !== void 0 ? _0 : null,
|
|
136
|
+
attendee_last_name: (_1 = scheduler === null || scheduler === void 0 ? void 0 : scheduler.last_name) !== null && _1 !== void 0 ? _1 : null,
|
|
137
|
+
attendee_email: (_2 = scheduler === null || scheduler === void 0 ? void 0 : scheduler.email) !== null && _2 !== void 0 ? _2 : null,
|
|
138
|
+
attendee_phone: (_3 = scheduler === null || scheduler === void 0 ? void 0 : scheduler.phone_number) !== null && _3 !== void 0 ? _3 : null,
|
|
139
|
+
attendee_time_zone: (_4 = scheduler === null || scheduler === void 0 ? void 0 : scheduler.time_zone) !== null && _4 !== void 0 ? _4 : null,
|
|
140
|
+
organizer_display_name: (_5 = organizer === null || organizer === void 0 ? void 0 : organizer.display_name) !== null && _5 !== void 0 ? _5 : null,
|
|
141
|
+
organizer_first_name: (_6 = organizer === null || organizer === void 0 ? void 0 : organizer.first_name) !== null && _6 !== void 0 ? _6 : null,
|
|
142
|
+
organizer_last_name: (_7 = organizer === null || organizer === void 0 ? void 0 : organizer.last_name) !== null && _7 !== void 0 ? _7 : null,
|
|
143
|
+
organizer_email: (_8 = organizer === null || organizer === void 0 ? void 0 : organizer.email) !== null && _8 !== void 0 ? _8 : null,
|
|
144
|
+
conferencing_type: (_10 = (_9 = event.conferencing) === null || _9 === void 0 ? void 0 : _9.type) !== null && _10 !== void 0 ? _10 : null,
|
|
145
|
+
conferencing_join_url: (_12 = (_11 = event.conferencing) === null || _11 === void 0 ? void 0 : _11.join_url) !== null && _12 !== void 0 ? _12 : null,
|
|
146
|
+
conferencing_meeting_id: (_14 = (_13 = event.conferencing) === null || _13 === void 0 ? void 0 : _13.meeting_id) !== null && _14 !== void 0 ? _14 : null,
|
|
147
|
+
payment_state: (_16 = (_15 = event.payment) === null || _15 === void 0 ? void 0 : _15.state) !== null && _16 !== void 0 ? _16 : null,
|
|
148
|
+
payment_amount_total_cents: (_18 = (_17 = event.payment) === null || _17 === void 0 ? void 0 : _17.amount_total) !== null && _18 !== void 0 ? _18 : null,
|
|
80
149
|
};
|
|
81
150
|
}
|
|
82
151
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAMA,wDAUC;AAED,0CAuBC;AAED,sDA+BC;AAED,4CAWC;AAED,oDAGC;AAED,4CAQC;AAED,kCAaC;AAED,oCAyCC;;AAhKD,uDAAiC;AACjC,+DAAwH;AAG3G,QAAA,iBAAiB,GAAG,6BAA6B,CAAC;AAE/D,SAAgB,sBAAsB,CAAC,MAAc,EAAE,eAAuB,EAA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CAAE,UAAU,mCAAI,IAAI;QACnD,mBAAmB,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,mCAAI,IAAI;QACjD,eAAe,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,mCAAI,IAAI;QACzC,iBAAiB,EAAE,OAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,IAAI,qCAAI,IAAI;QACnD,qBAAqB,EAAE,OAAA,OAAA,KAAK,CAAC,YAAY,4CAAE,QAAQ,qCAAI,IAAI;QAC3D,uBAAuB,EAAE,OAAA,OAAA,KAAK,CAAC,YAAY,4CAAE,UAAU,qCAAI,IAAI;QAC/D,aAAa,EAAE,OAAA,OAAA,KAAK,CAAC,OAAO,4CAAE,KAAK,qCAAI,IAAI;QAC3C,0BAA0B,EAAE,OAAA,OAAA,KAAK,CAAC,OAAO,4CAAE,YAAY,qCAAI,IAAI;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,42 @@
|
|
|
1
1
|
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newEventTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").
|
|
2
|
+
export declare const newEventTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>)[], {
|
|
3
5
|
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
-
|
|
6
|
+
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>)[]>;
|
|
9
|
+
link_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
10
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
11
|
+
}>)[]>;
|
|
12
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
13
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
14
|
+
}>)[], {
|
|
5
15
|
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
6
|
-
|
|
16
|
+
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, 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
|
+
link_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
20
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
21
|
+
}>)[]>;
|
|
22
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
23
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
24
|
+
}>)[], {
|
|
7
25
|
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
8
|
-
|
|
26
|
+
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
27
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
28
|
+
}>)[]>;
|
|
29
|
+
link_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
30
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
31
|
+
}>)[]>;
|
|
32
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
33
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
34
|
+
}>)[], {
|
|
9
35
|
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
36
|
+
team_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
37
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
38
|
+
}>)[]>;
|
|
39
|
+
link_ids: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
40
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
41
|
+
}>)[]>;
|
|
10
42
|
}>;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
7
|
const common_1 = require("../common");
|
|
8
|
-
const
|
|
8
|
+
const auth_1 = require("../auth");
|
|
9
9
|
const EVENT_TYPES = [
|
|
10
10
|
{ label: 'Event Created', value: 'event.created' },
|
|
11
11
|
{ label: 'Event Requested', value: 'event.requested' },
|
|
@@ -14,21 +14,19 @@ const EVENT_TYPES = [
|
|
|
14
14
|
{ label: 'Event Rescheduled', value: 'event.rescheduled' },
|
|
15
15
|
{ label: 'Event Changed', value: 'event.changed' },
|
|
16
16
|
{ label: 'Event Canceled', value: 'event.canceled' },
|
|
17
|
-
{ label: 'Checkout Pending', value: 'checkout.pending' },
|
|
18
|
-
{ label: 'Checkout Expired', value: 'checkout.expired' },
|
|
19
|
-
{ label: 'Checkout Completed', value: 'checkout.completed' },
|
|
20
|
-
{ label: 'Attendee Added', value: 'attendee.added' },
|
|
21
|
-
{ label: 'Attendee Canceled', value: 'attendee.canceled' },
|
|
22
|
-
{ label: 'Attendee Rescheduled', value: 'attendee.rescheduled' },
|
|
23
|
-
{ label: 'Poll Response Created', value: 'poll_response.created' },
|
|
24
|
-
{ label: 'Poll Response Updated', value: 'poll_response.updated' },
|
|
25
|
-
{ label: 'Workflow Action Triggered', value: 'action.triggered' },
|
|
17
|
+
{ label: 'Checkout Pending', value: 'event.checkout.pending' },
|
|
18
|
+
{ label: 'Checkout Expired', value: 'event.checkout.expired' },
|
|
19
|
+
{ label: 'Checkout Completed', value: 'event.checkout.completed' },
|
|
20
|
+
{ label: 'Attendee Added', value: 'event.attendee.added' },
|
|
21
|
+
{ label: 'Attendee Canceled', value: 'event.attendee.canceled' },
|
|
22
|
+
{ label: 'Attendee Rescheduled', value: 'event.attendee.rescheduled' },
|
|
26
23
|
];
|
|
24
|
+
const EVENT_VALUES = EVENT_TYPES.map((t) => t.value);
|
|
27
25
|
exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
28
|
-
auth:
|
|
26
|
+
auth: auth_1.savvyCalAuth,
|
|
29
27
|
name: 'new_event',
|
|
30
28
|
displayName: 'New Event',
|
|
31
|
-
description: 'Triggers
|
|
29
|
+
description: 'Triggers when a SavvyCal event occurs. Select one or more event types, or leave empty to trigger on all types.',
|
|
32
30
|
props: {
|
|
33
31
|
event_types: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
34
32
|
displayName: 'Event Types',
|
|
@@ -38,10 +36,47 @@ exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
|
38
36
|
options: EVENT_TYPES,
|
|
39
37
|
},
|
|
40
38
|
}),
|
|
39
|
+
team_id: pieces_framework_1.Property.Dropdown({
|
|
40
|
+
auth: auth_1.savvyCalAuth,
|
|
41
|
+
displayName: 'Team',
|
|
42
|
+
description: 'Filter scheduling links by team. Leave empty to show all teams.',
|
|
43
|
+
refreshers: [],
|
|
44
|
+
required: false,
|
|
45
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
46
|
+
if (!auth)
|
|
47
|
+
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
48
|
+
try {
|
|
49
|
+
const options = yield (0, common_1.buildTeamOptions)((0, auth_1.getToken)(auth));
|
|
50
|
+
return { disabled: false, options };
|
|
51
|
+
}
|
|
52
|
+
catch (_b) {
|
|
53
|
+
return { disabled: true, options: [], placeholder: 'Failed to load teams.' };
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
}),
|
|
57
|
+
link_ids: pieces_framework_1.Property.MultiSelectDropdown({
|
|
58
|
+
auth: auth_1.savvyCalAuth,
|
|
59
|
+
displayName: 'Scheduling Links',
|
|
60
|
+
description: 'Only trigger for events on the selected scheduling links. Leave empty to trigger for all links.',
|
|
61
|
+
refreshers: ['team_id'],
|
|
62
|
+
required: false,
|
|
63
|
+
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth, team_id }) {
|
|
64
|
+
if (!auth)
|
|
65
|
+
return { disabled: true, options: [], placeholder: 'Please connect your account first' };
|
|
66
|
+
try {
|
|
67
|
+
const options = yield (0, common_1.buildLinkOptions)((0, auth_1.getToken)(auth), team_id);
|
|
68
|
+
return { disabled: false, options };
|
|
69
|
+
}
|
|
70
|
+
catch (_b) {
|
|
71
|
+
return { disabled: true, options: [], placeholder: 'Failed to load scheduling links.' };
|
|
72
|
+
}
|
|
73
|
+
}),
|
|
74
|
+
}),
|
|
41
75
|
},
|
|
42
76
|
sampleData: {
|
|
43
77
|
event_type: 'event.created',
|
|
44
78
|
id: 'evt_abc123',
|
|
79
|
+
uuid: '550e8400-e29b-41d4-a716-446655440000',
|
|
45
80
|
summary: '30 Minute Meeting with Jane Doe',
|
|
46
81
|
description: null,
|
|
47
82
|
state: 'confirmed',
|
|
@@ -67,6 +102,10 @@ exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
|
67
102
|
attendee_email: 'jane@example.com',
|
|
68
103
|
attendee_phone: null,
|
|
69
104
|
attendee_time_zone: 'America/Chicago',
|
|
105
|
+
organizer_display_name: 'John Smith',
|
|
106
|
+
organizer_first_name: 'John',
|
|
107
|
+
organizer_last_name: 'Smith',
|
|
108
|
+
organizer_email: 'john@company.com',
|
|
70
109
|
conferencing_type: 'zoom',
|
|
71
110
|
conferencing_join_url: 'https://zoom.us/j/123456789',
|
|
72
111
|
conferencing_meeting_id: '123456789',
|
|
@@ -77,12 +116,13 @@ exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
|
77
116
|
onEnable(context) {
|
|
78
117
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
79
118
|
const response = yield (0, common_1.savvyCalApiCall)({
|
|
80
|
-
token: context.auth
|
|
119
|
+
token: (0, auth_1.getToken)(context.auth),
|
|
81
120
|
method: pieces_common_1.HttpMethod.POST,
|
|
82
121
|
path: '/webhooks',
|
|
83
122
|
body: { url: context.webhookUrl },
|
|
84
123
|
});
|
|
85
124
|
yield context.store.put('webhookId', response.body.id);
|
|
125
|
+
yield context.store.put('webhookSecret', response.body.secret);
|
|
86
126
|
});
|
|
87
127
|
},
|
|
88
128
|
onDisable(context) {
|
|
@@ -90,7 +130,7 @@ exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
|
90
130
|
const webhookId = yield context.store.get('webhookId');
|
|
91
131
|
if (webhookId) {
|
|
92
132
|
yield (0, common_1.savvyCalApiCall)({
|
|
93
|
-
token: context.auth
|
|
133
|
+
token: (0, auth_1.getToken)(context.auth),
|
|
94
134
|
method: pieces_common_1.HttpMethod.DELETE,
|
|
95
135
|
path: `/webhooks/${webhookId}`,
|
|
96
136
|
});
|
|
@@ -99,24 +139,51 @@ exports.newEventTrigger = (0, pieces_framework_1.createTrigger)({
|
|
|
99
139
|
},
|
|
100
140
|
run(context) {
|
|
101
141
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
142
|
+
var _a, _b;
|
|
143
|
+
const secret = yield context.store.get('webhookSecret');
|
|
144
|
+
const signature = context.payload.headers['x-savvycal-signature'];
|
|
145
|
+
if (secret && (!signature || !(0, common_1.verifyWebhookSignature)(secret, signature, context.payload.rawBody))) {
|
|
146
|
+
return [];
|
|
147
|
+
}
|
|
102
148
|
const body = context.payload.body;
|
|
103
149
|
if (!(body === null || body === void 0 ? void 0 : body.payload))
|
|
104
150
|
return [];
|
|
151
|
+
// Only handle event.* types — poll.response.* and workflow.action.triggered
|
|
152
|
+
// have different payload structures and are handled by their own triggers.
|
|
153
|
+
if (!EVENT_VALUES.includes(body.type))
|
|
154
|
+
return [];
|
|
105
155
|
const selectedTypes = context.propsValue.event_types;
|
|
106
156
|
if (selectedTypes && selectedTypes.length > 0 && !selectedTypes.includes(body.type))
|
|
107
157
|
return [];
|
|
108
|
-
|
|
158
|
+
const selectedLinkIds = context.propsValue.link_ids;
|
|
159
|
+
const linkId = (_b = (_a = body.payload) === null || _a === void 0 ? void 0 : _a.link) === null || _b === void 0 ? void 0 : _b.id;
|
|
160
|
+
if (selectedLinkIds && selectedLinkIds.length > 0 && linkId != null && !selectedLinkIds.includes(linkId))
|
|
161
|
+
return [];
|
|
162
|
+
const payload = (0, common_1.flattenEvent)(body.payload);
|
|
163
|
+
return [Object.assign({ event_type: body.type }, payload)];
|
|
109
164
|
});
|
|
110
165
|
},
|
|
111
166
|
test(context) {
|
|
112
167
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
var _a;
|
|
169
|
+
const selectedTypes = context.propsValue.event_types;
|
|
170
|
+
const selectedLinkIds = context.propsValue.link_ids;
|
|
171
|
+
const queryParams = { limit: '10' };
|
|
172
|
+
if (selectedLinkIds && selectedLinkIds.length === 1)
|
|
173
|
+
queryParams['link_id'] = selectedLinkIds[0];
|
|
113
174
|
const response = yield (0, common_1.savvyCalApiCall)({
|
|
114
|
-
token: context.auth
|
|
175
|
+
token: (0, auth_1.getToken)(context.auth),
|
|
115
176
|
method: pieces_common_1.HttpMethod.GET,
|
|
116
177
|
path: '/events',
|
|
117
|
-
queryParams
|
|
178
|
+
queryParams,
|
|
118
179
|
});
|
|
119
|
-
|
|
180
|
+
const events = selectedLinkIds && selectedLinkIds.length > 1
|
|
181
|
+
? response.body.entries.filter((e) => { var _a, _b; return selectedLinkIds.includes((_b = (_a = e.link) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : ''); })
|
|
182
|
+
: response.body.entries;
|
|
183
|
+
// Honour the user's first selected type so the preview matches what they'll actually receive;
|
|
184
|
+
// fall back to event.created when no filter is set.
|
|
185
|
+
const previewType = (_a = selectedTypes === null || selectedTypes === void 0 ? void 0 : selectedTypes[0]) !== null && _a !== void 0 ? _a : 'event.created';
|
|
186
|
+
return events.slice(0, 5).map((e) => (Object.assign({ event_type: previewType }, (0, common_1.flattenEvent)(e))));
|
|
120
187
|
});
|
|
121
188
|
},
|
|
122
189
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,+DAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"new-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,+DAAyD;AACzD,sCAAqI;AACrI,kCAAiD;AAEjD,MAAM,WAAW,GAAG;IAClB,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACtD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACpD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACpD,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAC1D,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACpD,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC9D,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,wBAAwB,EAAE;IAC9D,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,0BAA0B,EAAE;IAClE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,sBAAsB,EAAE;IAC1D,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,yBAAyB,EAAE;IAChE,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,4BAA4B,EAAE;CACvE,CAAC;AAEF,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,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C,EAAE,EAAE,CAAC,iBAAG,UAAU,EAAE,WAAW,IAAK,IAAA,qBAAY,EAAC,CAAC,CAAC,EAAG,CAAC,CAAC;QAC1F,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
+
export declare const newPollResponseTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
3
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>)[], {
|
|
5
|
+
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
6
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
7
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
8
|
+
}>)[], {
|
|
9
|
+
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
11
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
12
|
+
}>)[], {
|
|
13
|
+
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
14
|
+
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
15
|
+
token: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
16
|
+
}>)[], {
|
|
17
|
+
event_types: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
18
|
+
}>;
|