@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.
@@ -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 = "NEW_WEBINAR_PARTICIPANT";
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
- label: "Instantly",
25
- value: "INSTANTLY"
26
- }, {
27
- label: "Later",
28
- value: "LATER"
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 : (context) => createCoasyTrigger({
36
- triggerName,
37
- webhookUrl: context.webhookUrl,
38
- auth: context.auth,
39
- filter: context.propsValue,
40
- store: context.store
41
- }),
42
- onDisable : (context) => destroyCoasyTrigger({
43
- triggerName,
44
- auth: context.auth,
45
- store: context.store
46
- }),
47
- test: (context) => testCoasyTrigger({
48
- triggerName,
49
- auth: context.auth
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 { 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_ATTEND";
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: 'Triggers when a webinar participant has attended or not attended',
19
+ description:
20
+ 'Triggers when a webinar participant has attended or not attended',
12
21
  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',
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: 'Attented',
30
- value: 'ATTENTED'
33
+ label: 'Attended',
34
+ value: 'ATTENDED',
31
35
  },
32
36
  {
33
- label: 'Not Attented',
34
- value: 'NOT_ATTENTED'
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) => 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
- }),
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 { 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
  });