@coasy/piece-coasy 0.1.0 → 0.1.2-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.
@@ -1,8 +1,16 @@
1
- import { createTrigger, Property, TriggerStrategy } from '@activepieces/pieces-framework';
1
+ import {
2
+ createTrigger,
3
+ Property,
4
+ TriggerStrategy,
5
+ } from '@activepieces/pieces-framework';
2
6
  import { coasyAuth } from '../..';
3
- import { createCoasyTrigger, destroyCoasyTrigger, testCoasyTrigger } from '../common/triggers';
7
+ import {
8
+ createCoasyTrigger,
9
+ destroyCoasyTrigger,
10
+ testCoasyTrigger,
11
+ } from '../common/triggers';
4
12
 
5
- const triggerName = "WEBINAR_PARTICIPANT_REMINDER";
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
- webinarIds: Property.Array({
14
- displayName: 'Webinar IDs',
15
- description: 'IDs of webinar to react to',
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: 'Attented',
30
- value: 'ATTENTED'
32
+ label: 'Attended',
33
+ value: 'ATTENDED',
31
34
  },
32
35
  {
33
- label: 'Not Attented',
34
- value: 'NOT_ATTENTED'
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) => createCoasyTrigger({
43
- triggerName,
44
- webhookUrl: context.webhookUrl,
45
- auth: context.auth,
46
- filter: context.propsValue,
47
- store: context.store
48
- }),
49
- onDisable: (context) => destroyCoasyTrigger({
50
- triggerName,
51
- auth: context.auth,
52
- store: context.store
53
- }),
54
- test: (context) => testCoasyTrigger({
55
- triggerName,
56
- auth: context.auth
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
  });