@activepieces/piece-sendpulse 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 (38) hide show
  1. package/package.json +7 -22
  2. package/src/index.js +13 -56
  3. package/README.md +0 -7
  4. package/src/index.d.ts +0 -4
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/add-subscriber.d.ts +0 -12
  7. package/src/lib/actions/add-subscriber.js +0 -82
  8. package/src/lib/actions/add-subscriber.js.map +0 -1
  9. package/src/lib/actions/change-variable-for-subscriber.d.ts +0 -15
  10. package/src/lib/actions/change-variable-for-subscriber.js +0 -144
  11. package/src/lib/actions/change-variable-for-subscriber.js.map +0 -1
  12. package/src/lib/actions/delete-contact.d.ts +0 -6
  13. package/src/lib/actions/delete-contact.js +0 -49
  14. package/src/lib/actions/delete-contact.js.map +0 -1
  15. package/src/lib/actions/unsubscribe-user.d.ts +0 -10
  16. package/src/lib/actions/unsubscribe-user.js +0 -64
  17. package/src/lib/actions/unsubscribe-user.js.map +0 -1
  18. package/src/lib/actions/update-subscriber.d.ts +0 -12
  19. package/src/lib/actions/update-subscriber.js +0 -100
  20. package/src/lib/actions/update-subscriber.js.map +0 -1
  21. package/src/lib/common/auth.d.ts +0 -4
  22. package/src/lib/common/auth.js +0 -38
  23. package/src/lib/common/auth.js.map +0 -1
  24. package/src/lib/common/client.d.ts +0 -13
  25. package/src/lib/common/client.js +0 -63
  26. package/src/lib/common/client.js.map +0 -1
  27. package/src/lib/common/props.d.ts +0 -4
  28. package/src/lib/common/props.js +0 -54
  29. package/src/lib/common/props.js.map +0 -1
  30. package/src/lib/triggers/new-subscriber.d.ts +0 -34
  31. package/src/lib/triggers/new-subscriber.js +0 -117
  32. package/src/lib/triggers/new-subscriber.js.map +0 -1
  33. package/src/lib/triggers/new-unsubscriber.d.ts +0 -34
  34. package/src/lib/triggers/new-unsubscriber.js +0 -121
  35. package/src/lib/triggers/new-unsubscriber.js.map +0 -1
  36. package/src/lib/triggers/updated-subscriber.d.ts +0 -34
  37. package/src/lib/triggers/updated-subscriber.js +0 -142
  38. package/src/lib/triggers/updated-subscriber.js.map +0 -1
@@ -1,34 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newSubscriberTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
- }>>;
10
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
15
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
16
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
- }>>;
18
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
19
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
21
- }>, {
22
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
23
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
24
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
25
- }>>;
26
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
27
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
28
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
29
- }>, {
30
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
31
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
32
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
33
- }>>;
34
- }>;
@@ -1,117 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newSubscriberTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const client_1 = require("../common/client");
8
- const props_1 = require("../common/props");
9
- const pieces_common_1 = require("@activepieces/pieces-common");
10
- exports.newSubscriberTrigger = (0, pieces_framework_1.createTrigger)({
11
- auth: auth_1.sendpulseAuth,
12
- name: 'new_subscriber',
13
- displayName: 'New Subscriber',
14
- description: 'Fires when new subscriber is added',
15
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
16
- props: {
17
- mailingListId: props_1.mailingListDropdown,
18
- },
19
- onEnable(context) {
20
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
- var _a;
22
- const { mailingListId } = context.propsValue;
23
- try {
24
- const webhookResponse = yield (0, client_1.sendpulseApiCall)({
25
- method: pieces_common_1.HttpMethod.POST,
26
- auth: context.auth.props,
27
- resourceUri: '/v2/email-service/webhook',
28
- body: {
29
- url: context.webhookUrl,
30
- actions: ['new_emails'],
31
- },
32
- });
33
- if (webhookResponse.success && ((_a = webhookResponse.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
34
- const webhook = webhookResponse.data.find(w => w.action === 'new_emails');
35
- if (webhook) {
36
- yield context.store.put('webhook_id', webhook.id);
37
- yield context.store.put('mailing_list_id', mailingListId);
38
- }
39
- }
40
- else {
41
- throw new Error('Failed to create webhook');
42
- }
43
- }
44
- catch (error) {
45
- throw new Error(`Failed to enable new subscriber trigger: ${error.message}`);
46
- }
47
- });
48
- },
49
- onDisable(context) {
50
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
51
- try {
52
- const webhookId = yield context.store.get('webhook_id');
53
- if (webhookId) {
54
- yield (0, client_1.sendpulseApiCall)({
55
- method: pieces_common_1.HttpMethod.DELETE,
56
- auth: context.auth.props,
57
- resourceUri: `/v2/email-service/webhook/${webhookId}`,
58
- });
59
- yield context.store.delete('webhook_id');
60
- yield context.store.delete('mailing_list_id');
61
- }
62
- }
63
- catch (error) {
64
- console.warn('Failed to delete webhook during disable:', error);
65
- }
66
- });
67
- },
68
- run(context) {
69
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
70
- const storedListId = yield context.store.get('mailing_list_id');
71
- const payload = context.payload.body;
72
- const payloads = Array.isArray(payload) ? payload : [payload];
73
- const results = [];
74
- for (const item of payloads) {
75
- if (item.event === 'new_emails' && item.book_id === storedListId) {
76
- results.push({
77
- id: `${item.email}_${item.timestamp}`,
78
- email: item.email,
79
- mailingListId: item.book_id,
80
- source: item.source,
81
- variables: item.variables || {},
82
- addedAt: new Date(parseInt(item.timestamp) * 1000).toISOString(),
83
- timestamp: item.timestamp,
84
- });
85
- }
86
- }
87
- return results;
88
- });
89
- },
90
- test() {
91
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
92
- return [
93
- {
94
- id: 'demo@example.com_1496827625',
95
- email: 'demo@example.com',
96
- mailingListId: '123456',
97
- source: 'address book',
98
- variables: {},
99
- addedAt: new Date().toISOString(),
100
- timestamp: '1496827625',
101
- },
102
- ];
103
- });
104
- },
105
- sampleData: {
106
- id: 'subscriber@example.com_1496827625',
107
- email: 'subscriber@example.com',
108
- mailingListId: '123456',
109
- source: 'subscription form',
110
- variables: {
111
- name: 'John Doe',
112
- },
113
- addedAt: '2023-06-01T12:00:00.000Z',
114
- timestamp: '1496827625',
115
- },
116
- });
117
- //# sourceMappingURL=new-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-subscriber.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sendpulse/src/lib/triggers/new-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,yCAA+C;AAC/C,6CAAoD;AACpD,2CAAsD;AACtD,+DAAyD;AAE5C,QAAA,oBAAoB,GAAG,IAAA,gCAAa,EAAC;IAChD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,oCAAoC;IACjD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE;QACL,aAAa,EAAE,2BAAmB;KACnC;IAEK,QAAQ,CAAC,OAAO;;;YACpB,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7C,IAAI,CAAC;gBACH,MAAM,eAAe,GAAG,MAAM,IAAA,yBAAgB,EAG3C;oBACD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;oBACxB,WAAW,EAAE,2BAA2B;oBACxC,IAAI,EAAE;wBACJ,GAAG,EAAE,OAAO,CAAC,UAAU;wBACvB,OAAO,EAAE,CAAC,YAAY,CAAC;qBACxB;iBACF,CAAC,CAAC;gBAEH,IAAI,eAAe,CAAC,OAAO,IAAI,CAAA,MAAA,eAAe,CAAC,IAAI,0CAAE,MAAM,IAAG,CAAC,EAAE,CAAC;oBAChE,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,YAAY,CAAC,CAAC;oBAC1E,IAAI,OAAO,EAAE,CAAC;wBACZ,MAAM,OAAO,CAAC,KAAK,CAAC,G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C,SAAS,EAAE,YAAY;KACxB;CACF,CAAC,CAAC"}
@@ -1,34 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newUnsubscriberTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
- }>>;
10
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
15
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
16
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
- }>>;
18
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
19
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
21
- }>, {
22
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
23
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
24
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
25
- }>>;
26
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
27
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
28
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
29
- }>, {
30
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
31
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
32
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
33
- }>>;
34
- }>;
@@ -1,121 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.newUnsubscriberTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const client_1 = require("../common/client");
8
- const props_1 = require("../common/props");
9
- const pieces_common_1 = require("@activepieces/pieces-common");
10
- exports.newUnsubscriberTrigger = (0, pieces_framework_1.createTrigger)({
11
- auth: auth_1.sendpulseAuth,
12
- name: 'new_unsubscriber',
13
- displayName: 'New Unsubscriber',
14
- description: 'Fires when subscriber unsubscribes',
15
- type: pieces_framework_1.TriggerStrategy.WEBHOOK,
16
- props: {
17
- mailingListId: props_1.mailingListDropdown,
18
- },
19
- onEnable(context) {
20
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
21
- var _a;
22
- const { mailingListId } = context.propsValue;
23
- try {
24
- const webhookResponse = yield (0, client_1.sendpulseApiCall)({
25
- method: pieces_common_1.HttpMethod.POST,
26
- auth: context.auth.props,
27
- resourceUri: '/v2/email-service/webhook',
28
- body: {
29
- url: context.webhookUrl,
30
- actions: ['unsubscribe'],
31
- },
32
- });
33
- if (webhookResponse.success && ((_a = webhookResponse.data) === null || _a === void 0 ? void 0 : _a.length) > 0) {
34
- const webhook = webhookResponse.data.find(w => w.action === 'unsubscribe');
35
- if (webhook) {
36
- yield context.store.put('webhook_id', webhook.id);
37
- yield context.store.put('mailing_list_id', mailingListId);
38
- }
39
- }
40
- else {
41
- throw new Error('Failed to create webhook');
42
- }
43
- }
44
- catch (error) {
45
- throw new Error(`Failed to enable unsubscriber trigger: ${error.message}`);
46
- }
47
- });
48
- },
49
- onDisable(context) {
50
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
51
- try {
52
- const webhookId = yield context.store.get('webhook_id');
53
- if (webhookId) {
54
- yield (0, client_1.sendpulseApiCall)({
55
- method: pieces_common_1.HttpMethod.DELETE,
56
- auth: context.auth.props,
57
- resourceUri: `/v2/email-service/webhook/${webhookId}`,
58
- });
59
- yield context.store.delete('webhook_id');
60
- yield context.store.delete('mailing_list_id');
61
- }
62
- }
63
- catch (error) {
64
- console.warn('Failed to delete webhook during disable:', error);
65
- }
66
- });
67
- },
68
- run(context) {
69
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
70
- const storedListId = yield context.store.get('mailing_list_id');
71
- const payload = context.payload.body;
72
- const payloads = Array.isArray(payload) ? payload : [payload];
73
- const results = [];
74
- for (const item of payloads) {
75
- if (item.event === 'unsubscribe' && item.book_id === storedListId) {
76
- results.push({
77
- id: `${item.email}_${item.timestamp}`,
78
- email: item.email,
79
- mailingListId: item.book_id,
80
- taskId: item.task_id,
81
- fromAll: item.from_all === '1',
82
- reason: item.reason || 'No reason provided',
83
- categories: item.categories || '',
84
- unsubscribedAt: new Date(parseInt(item.timestamp) * 1000).toISOString(),
85
- timestamp: item.timestamp,
86
- });
87
- }
88
- }
89
- return results;
90
- });
91
- },
92
- test() {
93
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
94
- return [
95
- {
96
- id: 'test-unsubscribe@example.com_1496827872',
97
- email: 'test-unsubscribe@example.com',
98
- mailingListId: '123456',
99
- taskId: '3668141',
100
- fromAll: true,
101
- reason: 'User clicked unsubscribe link',
102
- categories: '',
103
- unsubscribedAt: new Date().toISOString(),
104
- timestamp: '1496827872',
105
- },
106
- ];
107
- });
108
- },
109
- sampleData: {
110
- id: 'unsub@example.com_1496827872',
111
- email: 'unsub@example.com',
112
- mailingListId: '123456',
113
- taskId: '3668141',
114
- fromAll: false,
115
- reason: 'Manual unsubscribe',
116
- categories: 'newsletter',
117
- unsubscribedAt: '2023-06-01T12:30:00.000Z',
118
- timestamp: '1496827872',
119
- },
120
- });
121
- //# sourceMappingURL=new-unsubscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new-unsubscriber.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sendpulse/src/lib/triggers/new-unsubscriber.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,yCAA+C;AAC/C,6CAAoD;AACpD,2CAAsD;AACtD,+DAAyD;AAE5C,QAAA,sBAAsB,GAAG,IAAA,gCAAa,EAAC;IAClD,IAAI,EAAE,oBAAa;IACnB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,oCAAoC;IACjD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAC7B,KAAK,EAAE;QACL,aAAa,EAAE,2BAAmB;KACnC;IAEK,QAAQ,CAAC,OAAO;;;YACpB,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;YAE7C,IAAI,CAAC;gBACH,MAAM,eAAe,GAAG,MAAM,IAAA,yBAAgB,EAG3C;oBACD,MAAM,EAAE,0BAAU,CAAC,IAAI;oBACvB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;oBACxB,WAAW,EAAE,2BAA2B;oBACxC,IAAI,EAAE;wBACJ,GAAG,EAAE,OAAO,CAAC,UAAU;wBACvB,OAAO,EAAE,CAAC,aAAa,CAAC;qBACzB;iBACF,CAAC,CAAC;gBAEH,IAAI,eAAe,CAAC,OAAO,IAAI,CAAA,MAAA,eAAe,CAAC,IAAI,0CAAE,MAAM,IAAG,CAAC,EAAE,CAAC;oBAChE,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,M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,SAAS,EAAE,YAAY;iBACxB;aACF,CAAC;QACJ,CAAC;KAAA;IAED,UAAU,EAAE;QACV,EAAE,EAAE,8BAA8B;QAClC,KAAK,EAAE,mBAAmB;QAC1B,aAAa,EAAE,QAAQ;QACvB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,YAAY;QACxB,cAAc,EAAE,0BAA0B;QAC1C,SAAS,EAAE,YAAY;KACxB;CACF,CAAC,CAAC"}
@@ -1,34 +0,0 @@
1
- import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const updatedSubscriberTrigger: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
5
- }>, {
6
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
7
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
- }>>;
10
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").CustomAuthProperty<{
11
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
13
- }>, {
14
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
15
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
16
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
17
- }>>;
18
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").CustomAuthProperty<{
19
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
21
- }>, {
22
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
23
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
24
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
25
- }>>;
26
- }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").CustomAuthProperty<{
27
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
28
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
29
- }>, {
30
- mailingListId: import("@activepieces/pieces-framework").DropdownProperty<number, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
31
- clientId: import("@activepieces/pieces-framework").SecretTextProperty<true>;
32
- clientSecret: import("@activepieces/pieces-framework").SecretTextProperty<true>;
33
- }>>;
34
- }>;
@@ -1,142 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updatedSubscriberTrigger = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("../common/auth");
7
- const client_1 = require("../common/client");
8
- const props_1 = require("../common/props");
9
- const pieces_common_1 = require("@activepieces/pieces-common");
10
- function detectChanges(previous, current) {
11
- const changes = {};
12
- const allKeys = new Set([...Object.keys(previous), ...Object.keys(current)]);
13
- for (const key of allKeys) {
14
- if (JSON.stringify(previous[key]) !== JSON.stringify(current[key])) {
15
- changes[key] = {
16
- from: previous[key],
17
- to: current[key],
18
- };
19
- }
20
- }
21
- return changes;
22
- }
23
- exports.updatedSubscriberTrigger = (0, pieces_framework_1.createTrigger)({
24
- auth: auth_1.sendpulseAuth,
25
- name: 'updated_subscriber',
26
- displayName: 'Updated Subscriber',
27
- description: 'Fires when subscriber details change (polling)',
28
- type: pieces_framework_1.TriggerStrategy.POLLING,
29
- props: {
30
- mailingListId: props_1.mailingListDropdown,
31
- },
32
- onEnable(context) {
33
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
34
- yield context.store.put('mailing_list_id', String(context.propsValue.mailingListId));
35
- yield context.store.put('last_check', Date.now().toString());
36
- });
37
- },
38
- onDisable(context) {
39
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
- yield context.store.delete('mailing_list_id');
41
- yield context.store.delete('last_check');
42
- yield context.store.delete('subscribers_cache');
43
- });
44
- },
45
- run(context) {
46
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
47
- const mailingListId = yield context.store.get('mailing_list_id');
48
- if (!mailingListId) {
49
- return [];
50
- }
51
- try {
52
- const currentSubscribers = yield (0, client_1.sendpulseApiCall)({
53
- method: pieces_common_1.HttpMethod.GET,
54
- auth: context.auth.props,
55
- resourceUri: `/addressbooks/${mailingListId}/emails`,
56
- });
57
- const cachedSubscribers = yield context.store.get('subscribers_cache');
58
- if (!cachedSubscribers) {
59
- yield context.store.put('subscribers_cache', JSON.stringify(currentSubscribers));
60
- return [];
61
- }
62
- const previousSubscribers = JSON.parse(cachedSubscribers);
63
- const changes = [];
64
- for (const current of currentSubscribers) {
65
- const previous = previousSubscribers.find((p) => p.email === current.email);
66
- if (previous) {
67
- const hasChanges = JSON.stringify(current) !== JSON.stringify(previous);
68
- if (hasChanges) {
69
- changes.push({
70
- id: `${current.email}_${Date.now()}`,
71
- email: current.email,
72
- mailingListId,
73
- previousData: previous,
74
- currentData: current,
75
- updatedAt: new Date().toISOString(),
76
- changes: detectChanges(previous, current),
77
- });
78
- }
79
- }
80
- }
81
- yield context.store.put('subscribers_cache', JSON.stringify(currentSubscribers));
82
- yield context.store.put('last_check', Date.now().toString());
83
- return changes;
84
- }
85
- catch (error) {
86
- console.error('Error checking for subscriber updates:', error);
87
- return [];
88
- }
89
- });
90
- },
91
- test() {
92
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
93
- return [
94
- {
95
- id: 'test-updated@example.com_1234567890',
96
- email: 'test-updated@example.com',
97
- mailingListId: '123456',
98
- previousData: {
99
- email: 'test-updated@example.com',
100
- variables: { name: 'Old Name' },
101
- },
102
- currentData: {
103
- email: 'test-updated@example.com',
104
- variables: { name: 'New Name' },
105
- },
106
- updatedAt: new Date().toISOString(),
107
- changes: {
108
- 'variables.name': {
109
- from: 'Old Name',
110
- to: 'New Name',
111
- },
112
- },
113
- },
114
- ];
115
- });
116
- },
117
- sampleData: {
118
- id: 'updated-user@example.com_1234567890',
119
- email: 'updated-user@example.com',
120
- mailingListId: '123456',
121
- previousData: {
122
- email: 'updated-user@example.com',
123
- variables: { phone: '+1234567890', name: 'John' },
124
- },
125
- currentData: {
126
- email: 'updated-user@example.com',
127
- variables: { phone: '+0987654321', name: 'John Updated' },
128
- },
129
- updatedAt: '2023-06-01T12:30:00.000Z',
130
- changes: {
131
- 'variables.phone': {
132
- from: '+1234567890',
133
- to: '+0987654321',
134
- },
135
- 'variables.name': {
136
- from: 'John',
137
- to: 'John Updated',
138
- },
139
- },
140
- },
141
- });
142
- //# sourceMappingURL=updated-subscriber.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updated-subscriber.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/sendpulse/src/lib/triggers/updated-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qEAGwC;AACxC,yCAA+C;AAC/C,6CAAoD;AACpD,2CAAsD;AACtD,+DAAyD;AAEzD,SAAS,aAAa,CAAC,QAAa,EAAE,OAAY;IAChD,MAAM,OAAO,GAA2C,EAAE,CAAC;IAE3D,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7E,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAA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