@coasy/piece-coasy 0.1.0 → 0.1.1-dev.1
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/.eslintrc.json +5 -1
- package/dist/packages/pieces/community/framework/packages/pieces/community/framework/README.md +11 -0
- package/dist/packages/shared/packages/shared/README.md +7 -0
- package/package.json +1 -1
- package/src/lib/actions/create-event-participant.ts +16 -25
- package/src/lib/actions/create-funnel-participant.ts +10 -17
- package/src/lib/actions/create-voucher.ts +5 -13
- package/src/lib/actions/enroll-user-course.ts +19 -29
- package/src/lib/actions/find-event.ts +13 -21
- package/src/lib/common/actions.ts +24 -0
- package/src/lib/common/triggers.ts +40 -25
- package/src/lib/triggers/cancelled-membership.ts +38 -21
- package/src/lib/triggers/cancelled-order-item.ts +48 -21
- package/src/lib/triggers/cancelled-order.ts +52 -21
- package/src/lib/triggers/cancelled-orderprocess.ts +40 -22
- package/src/lib/triggers/cancelled-subscription.ts +38 -21
- package/src/lib/triggers/get-events.ts +27 -20
- package/src/lib/triggers/new-event-participant.ts +43 -21
- package/src/lib/triggers/new-lead.ts +33 -22
- package/src/lib/triggers/new-membership.ts +38 -21
- package/src/lib/triggers/new-order-item.ts +46 -25
- package/src/lib/triggers/new-order.ts +48 -21
- package/src/lib/triggers/new-subscription.ts +38 -21
- package/src/lib/triggers/new-webinar-participant.ts +57 -30
- package/src/lib/triggers/webinar-participant-attend.ts +50 -38
- package/src/lib/triggers/webinar-participant-reminder.ts +48 -37
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createTrigger,
|
|
3
|
+
Property,
|
|
4
|
+
TriggerStrategy,
|
|
5
|
+
} from '@activepieces/pieces-framework';
|
|
2
6
|
import { coasyAuth } from '../..';
|
|
3
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
createCoasyTrigger,
|
|
9
|
+
destroyCoasyTrigger,
|
|
10
|
+
testCoasyTrigger,
|
|
11
|
+
} from '../common/triggers';
|
|
4
12
|
|
|
5
|
-
const triggerName =
|
|
13
|
+
const triggerName = 'NEW_WEBINAR_PARTICIPANT';
|
|
6
14
|
|
|
7
15
|
export const newWebinarParticipant = createTrigger({
|
|
8
16
|
auth: coasyAuth,
|
|
@@ -13,42 +21,61 @@ export const newWebinarParticipant = createTrigger({
|
|
|
13
21
|
webinarIds: Property.Array({
|
|
14
22
|
displayName: 'Webinar IDs',
|
|
15
23
|
description: 'IDs of webinar to react to',
|
|
16
|
-
required: false
|
|
24
|
+
required: false,
|
|
17
25
|
}),
|
|
18
26
|
selectedStartType: Property.StaticDropdown({
|
|
19
27
|
displayName: 'Selected start type',
|
|
20
28
|
description: 'filter only those participants',
|
|
21
29
|
required: false,
|
|
22
30
|
options: {
|
|
23
|
-
options: [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
options: [
|
|
32
|
+
{
|
|
33
|
+
<<<<<<< Updated upstream
|
|
34
|
+
label: 'Upcoming',
|
|
35
|
+
value: 'UPCOMING',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'Attended',
|
|
39
|
+
value: 'ATTENDED',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'Not Attended',
|
|
43
|
+
value: 'NOT_ATTENDED',
|
|
44
|
+
=======
|
|
45
|
+
label: 'Instantly',
|
|
46
|
+
value: 'INSTANTLY',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'Later',
|
|
50
|
+
value: 'LATER',
|
|
51
|
+
>>>>>>> Stashed changes
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
32
56
|
},
|
|
33
57
|
sampleData: {},
|
|
34
58
|
type: TriggerStrategy.WEBHOOK,
|
|
35
|
-
onEnable
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
onEnable: (context) =>
|
|
60
|
+
createCoasyTrigger({
|
|
61
|
+
triggerName,
|
|
62
|
+
webhookUrl: context.webhookUrl,
|
|
63
|
+
auth: context.auth,
|
|
64
|
+
filter: context.propsValue,
|
|
65
|
+
store: context.store,
|
|
66
|
+
}),
|
|
67
|
+
onDisable: (context) =>
|
|
68
|
+
destroyCoasyTrigger({
|
|
69
|
+
triggerName,
|
|
70
|
+
auth: context.auth,
|
|
71
|
+
store: context.store,
|
|
72
|
+
}),
|
|
73
|
+
test: (context) =>
|
|
74
|
+
testCoasyTrigger({
|
|
75
|
+
triggerName,
|
|
76
|
+
auth: context.auth,
|
|
77
|
+
}),
|
|
51
78
|
async run(context) {
|
|
52
79
|
return [context.payload.body];
|
|
53
|
-
}
|
|
80
|
+
},
|
|
54
81
|
});
|
|
@@ -1,61 +1,73 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createTrigger,
|
|
3
|
+
Property,
|
|
4
|
+
TriggerStrategy,
|
|
5
|
+
} from '@activepieces/pieces-framework';
|
|
2
6
|
import { coasyAuth } from '../..';
|
|
3
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
createCoasyTrigger,
|
|
9
|
+
destroyCoasyTrigger,
|
|
10
|
+
testCoasyTrigger,
|
|
11
|
+
} from '../common/triggers';
|
|
4
12
|
|
|
5
|
-
const triggerName =
|
|
13
|
+
const triggerName = 'WEBINAR_PARTICIPANT_ATTEND';
|
|
6
14
|
|
|
7
15
|
export const webinarParticipantAttend = createTrigger({
|
|
8
16
|
auth: coasyAuth,
|
|
9
17
|
name: 'webinarParticipantAttend',
|
|
10
18
|
displayName: 'Webinar Participant Attend',
|
|
11
|
-
description:
|
|
19
|
+
description:
|
|
20
|
+
'Triggers when a webinar participant has attended or not attended',
|
|
12
21
|
props: {
|
|
13
|
-
|
|
14
|
-
displayName: '
|
|
15
|
-
description: '
|
|
16
|
-
required: false
|
|
17
|
-
}),
|
|
18
|
-
status: Property.StaticDropdown({
|
|
19
|
-
displayName: 'Status',
|
|
20
|
-
description: 'filter only participants by',
|
|
22
|
+
selectedStartType: Property.StaticDropdown({
|
|
23
|
+
displayName: 'Selected start type',
|
|
24
|
+
description: 'filter only those participants',
|
|
21
25
|
required: false,
|
|
22
26
|
options: {
|
|
23
27
|
options: [
|
|
24
28
|
{
|
|
25
29
|
label: 'Upcoming',
|
|
26
|
-
value: 'UPCOMING'
|
|
30
|
+
value: 'UPCOMING',
|
|
27
31
|
},
|
|
28
32
|
{
|
|
29
|
-
label: '
|
|
30
|
-
value: '
|
|
33
|
+
label: 'Attended',
|
|
34
|
+
value: 'ATTENDED',
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
|
-
label: 'Not
|
|
34
|
-
value: '
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
})
|
|
37
|
+
label: 'Not Attended',
|
|
38
|
+
value: 'NOT_ATTENDED',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
webinarIds: Property.Array({
|
|
44
|
+
displayName: 'Webinar IDs',
|
|
45
|
+
description: 'IDs of webinar to react to',
|
|
46
|
+
required: false,
|
|
47
|
+
}),
|
|
39
48
|
},
|
|
40
49
|
sampleData: {},
|
|
41
50
|
type: TriggerStrategy.WEBHOOK,
|
|
42
|
-
onEnable: (context) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
onEnable: (context) =>
|
|
52
|
+
createCoasyTrigger({
|
|
53
|
+
triggerName,
|
|
54
|
+
webhookUrl: context.webhookUrl,
|
|
55
|
+
auth: context.auth,
|
|
56
|
+
filter: context.propsValue,
|
|
57
|
+
store: context.store,
|
|
58
|
+
}),
|
|
59
|
+
onDisable: (context) =>
|
|
60
|
+
destroyCoasyTrigger({
|
|
61
|
+
triggerName,
|
|
62
|
+
auth: context.auth,
|
|
63
|
+
store: context.store,
|
|
64
|
+
}),
|
|
65
|
+
test: (context) =>
|
|
66
|
+
testCoasyTrigger({
|
|
67
|
+
triggerName,
|
|
68
|
+
auth: context.auth,
|
|
69
|
+
}),
|
|
58
70
|
async run(context) {
|
|
59
71
|
return [context.payload.body];
|
|
60
|
-
}
|
|
72
|
+
},
|
|
61
73
|
});
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
createTrigger,
|
|
3
|
+
Property,
|
|
4
|
+
TriggerStrategy,
|
|
5
|
+
} from '@activepieces/pieces-framework';
|
|
2
6
|
import { coasyAuth } from '../..';
|
|
3
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
createCoasyTrigger,
|
|
9
|
+
destroyCoasyTrigger,
|
|
10
|
+
testCoasyTrigger,
|
|
11
|
+
} from '../common/triggers';
|
|
4
12
|
|
|
5
|
-
const triggerName =
|
|
13
|
+
const triggerName = 'WEBINAR_PARTICIPANT_REMINDER';
|
|
6
14
|
|
|
7
15
|
export const webinarParticipantReminder = createTrigger({
|
|
8
16
|
auth: coasyAuth,
|
|
@@ -10,52 +18,55 @@ export const webinarParticipantReminder = createTrigger({
|
|
|
10
18
|
displayName: 'Webinar Participant Reminder',
|
|
11
19
|
description: 'Triggers when a webinar participant is reminded',
|
|
12
20
|
props: {
|
|
13
|
-
|
|
14
|
-
displayName: '
|
|
15
|
-
description: '
|
|
16
|
-
required: false
|
|
17
|
-
}),
|
|
18
|
-
status: Property.StaticDropdown({
|
|
19
|
-
displayName: 'Status',
|
|
20
|
-
description: 'filter only participants by',
|
|
21
|
+
selectedStartType: Property.StaticDropdown({
|
|
22
|
+
displayName: 'Selected start type',
|
|
23
|
+
description: 'filter only those participants',
|
|
21
24
|
required: false,
|
|
22
25
|
options: {
|
|
23
26
|
options: [
|
|
24
27
|
{
|
|
25
28
|
label: 'Upcoming',
|
|
26
|
-
value: 'UPCOMING'
|
|
29
|
+
value: 'UPCOMING',
|
|
27
30
|
},
|
|
28
31
|
{
|
|
29
|
-
label: '
|
|
30
|
-
value: '
|
|
32
|
+
label: 'Attended',
|
|
33
|
+
value: 'ATTENDED',
|
|
31
34
|
},
|
|
32
35
|
{
|
|
33
|
-
label: 'Not
|
|
34
|
-
value: '
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
})
|
|
36
|
+
label: 'Not Attended',
|
|
37
|
+
value: 'NOT_ATTENDED',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
webinarIds: Property.Array({
|
|
43
|
+
displayName: 'Webinar IDs',
|
|
44
|
+
description: 'IDs of webinar to react to',
|
|
45
|
+
required: false,
|
|
46
|
+
}),
|
|
39
47
|
},
|
|
40
48
|
sampleData: {},
|
|
41
49
|
type: TriggerStrategy.WEBHOOK,
|
|
42
|
-
onEnable: (context) =>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
onEnable: (context) =>
|
|
51
|
+
createCoasyTrigger({
|
|
52
|
+
triggerName,
|
|
53
|
+
webhookUrl: context.webhookUrl,
|
|
54
|
+
auth: context.auth,
|
|
55
|
+
filter: context.propsValue,
|
|
56
|
+
store: context.store,
|
|
57
|
+
}),
|
|
58
|
+
onDisable: (context) =>
|
|
59
|
+
destroyCoasyTrigger({
|
|
60
|
+
triggerName,
|
|
61
|
+
auth: context.auth,
|
|
62
|
+
store: context.store,
|
|
63
|
+
}),
|
|
64
|
+
test: (context) =>
|
|
65
|
+
testCoasyTrigger({
|
|
66
|
+
triggerName,
|
|
67
|
+
auth: context.auth,
|
|
68
|
+
}),
|
|
58
69
|
async run(context) {
|
|
59
70
|
return [context.payload.body];
|
|
60
|
-
}
|
|
71
|
+
},
|
|
61
72
|
});
|