@activepieces/piece-resend 0.4.2 → 0.4.4

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 (97) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +14 -102
  3. package/src/index.d.ts +0 -3
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/cancel-scheduled-email.action.d.ts +0 -4
  7. package/src/lib/actions/cancel-scheduled-email.action.d.ts.map +0 -1
  8. package/src/lib/actions/cancel-scheduled-email.action.js +0 -33
  9. package/src/lib/actions/cancel-scheduled-email.action.js.map +0 -1
  10. package/src/lib/actions/create-audience.action.d.ts +0 -4
  11. package/src/lib/actions/create-audience.action.d.ts.map +0 -1
  12. package/src/lib/actions/create-audience.action.js +0 -34
  13. package/src/lib/actions/create-audience.action.js.map +0 -1
  14. package/src/lib/actions/create-broadcast.action.d.ts +0 -11
  15. package/src/lib/actions/create-broadcast.action.d.ts.map +0 -1
  16. package/src/lib/actions/create-broadcast.action.js +0 -84
  17. package/src/lib/actions/create-broadcast.action.js.map +0 -1
  18. package/src/lib/actions/create-contact.action.d.ts +0 -8
  19. package/src/lib/actions/create-contact.action.d.ts.map +0 -1
  20. package/src/lib/actions/create-contact.action.js +0 -47
  21. package/src/lib/actions/create-contact.action.js.map +0 -1
  22. package/src/lib/actions/create-domain.action.d.ts +0 -5
  23. package/src/lib/actions/create-domain.action.d.ts.map +0 -1
  24. package/src/lib/actions/create-domain.action.js +0 -61
  25. package/src/lib/actions/create-domain.action.js.map +0 -1
  26. package/src/lib/actions/delete-audience.action.d.ts +0 -4
  27. package/src/lib/actions/delete-audience.action.d.ts.map +0 -1
  28. package/src/lib/actions/delete-audience.action.js +0 -30
  29. package/src/lib/actions/delete-audience.action.js.map +0 -1
  30. package/src/lib/actions/delete-broadcast.action.d.ts +0 -4
  31. package/src/lib/actions/delete-broadcast.action.d.ts.map +0 -1
  32. package/src/lib/actions/delete-broadcast.action.js +0 -30
  33. package/src/lib/actions/delete-broadcast.action.js.map +0 -1
  34. package/src/lib/actions/delete-contact.action.d.ts +0 -5
  35. package/src/lib/actions/delete-contact.action.d.ts.map +0 -1
  36. package/src/lib/actions/delete-contact.action.js +0 -31
  37. package/src/lib/actions/delete-contact.action.js.map +0 -1
  38. package/src/lib/actions/delete-domain.action.d.ts +0 -4
  39. package/src/lib/actions/delete-domain.action.d.ts.map +0 -1
  40. package/src/lib/actions/delete-domain.action.js +0 -30
  41. package/src/lib/actions/delete-domain.action.js.map +0 -1
  42. package/src/lib/actions/get-email-status.action.d.ts +0 -4
  43. package/src/lib/actions/get-email-status.action.d.ts.map +0 -1
  44. package/src/lib/actions/get-email-status.action.js +0 -36
  45. package/src/lib/actions/get-email-status.action.js.map +0 -1
  46. package/src/lib/actions/list-audiences.action.d.ts +0 -2
  47. package/src/lib/actions/list-audiences.action.d.ts.map +0 -1
  48. package/src/lib/actions/list-audiences.action.js +0 -27
  49. package/src/lib/actions/list-audiences.action.js.map +0 -1
  50. package/src/lib/actions/list-broadcasts.action.d.ts +0 -2
  51. package/src/lib/actions/list-broadcasts.action.d.ts.map +0 -1
  52. package/src/lib/actions/list-broadcasts.action.js +0 -42
  53. package/src/lib/actions/list-broadcasts.action.js.map +0 -1
  54. package/src/lib/actions/list-contacts.action.d.ts +0 -4
  55. package/src/lib/actions/list-contacts.action.d.ts.map +0 -1
  56. package/src/lib/actions/list-contacts.action.js +0 -30
  57. package/src/lib/actions/list-contacts.action.js.map +0 -1
  58. package/src/lib/actions/list-domains.action.d.ts +0 -2
  59. package/src/lib/actions/list-domains.action.d.ts.map +0 -1
  60. package/src/lib/actions/list-domains.action.js +0 -38
  61. package/src/lib/actions/list-domains.action.js.map +0 -1
  62. package/src/lib/actions/list-emails.action.d.ts +0 -2
  63. package/src/lib/actions/list-emails.action.d.ts.map +0 -1
  64. package/src/lib/actions/list-emails.action.js +0 -41
  65. package/src/lib/actions/list-emails.action.js.map +0 -1
  66. package/src/lib/actions/reschedule-email.action.d.ts +0 -5
  67. package/src/lib/actions/reschedule-email.action.d.ts.map +0 -1
  68. package/src/lib/actions/reschedule-email.action.js +0 -39
  69. package/src/lib/actions/reschedule-email.action.js.map +0 -1
  70. package/src/lib/actions/send-batch-emails.action.d.ts +0 -5
  71. package/src/lib/actions/send-batch-emails.action.d.ts.map +0 -1
  72. package/src/lib/actions/send-batch-emails.action.js +0 -113
  73. package/src/lib/actions/send-batch-emails.action.js.map +0 -1
  74. package/src/lib/actions/send-broadcast.action.d.ts +0 -5
  75. package/src/lib/actions/send-broadcast.action.d.ts.map +0 -1
  76. package/src/lib/actions/send-broadcast.action.js +0 -39
  77. package/src/lib/actions/send-broadcast.action.js.map +0 -1
  78. package/src/lib/actions/send-email.d.ts +0 -12
  79. package/src/lib/actions/send-email.d.ts.map +0 -1
  80. package/src/lib/actions/send-email.js +0 -103
  81. package/src/lib/actions/send-email.js.map +0 -1
  82. package/src/lib/actions/update-contact.action.d.ts +0 -8
  83. package/src/lib/actions/update-contact.action.d.ts.map +0 -1
  84. package/src/lib/actions/update-contact.action.js +0 -54
  85. package/src/lib/actions/update-contact.action.js.map +0 -1
  86. package/src/lib/actions/verify-domain.action.d.ts +0 -4
  87. package/src/lib/actions/verify-domain.action.d.ts.map +0 -1
  88. package/src/lib/actions/verify-domain.action.js +0 -30
  89. package/src/lib/actions/verify-domain.action.js.map +0 -1
  90. package/src/lib/common/props.d.ts +0 -7
  91. package/src/lib/common/props.d.ts.map +0 -1
  92. package/src/lib/common/props.js +0 -93
  93. package/src/lib/common/props.js.map +0 -1
  94. package/src/lib/triggers/email-bounced.trigger.d.ts +0 -11
  95. package/src/lib/triggers/email-bounced.trigger.d.ts.map +0 -1
  96. package/src/lib/triggers/email-bounced.trigger.js +0 -138
  97. package/src/lib/triggers/email-bounced.trigger.js.map +0 -1
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listBroadcasts = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- exports.listBroadcasts = (0, pieces_framework_1.createAction)({
9
- name: 'list_broadcasts',
10
- auth: __1.resendAuth,
11
- displayName: 'List Broadcasts',
12
- description: 'Retrieve all broadcasts in your Resend account',
13
- audience: 'both',
14
- aiMetadata: { description: 'Retrieves all broadcast campaigns in the connected Resend account, including each broadcast\'s ID, name, audience, subject, and status (draft, scheduled, sent). Use this to find a broadcast ID (e.g. for Send Broadcast or Delete Broadcast) or to check campaign status. Read-only and idempotent.', idempotent: true },
15
- props: {},
16
- run(_a) {
17
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
18
- const response = yield pieces_common_1.httpClient.sendRequest({
19
- method: pieces_common_1.HttpMethod.GET,
20
- url: 'https://api.resend.com/broadcasts',
21
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
22
- });
23
- return response.body.data.map((b) => {
24
- var _a, _b, _c, _d, _e;
25
- return ({
26
- id: b.id,
27
- name: (_a = b.name) !== null && _a !== void 0 ? _a : '',
28
- audience_id: b.audience_id,
29
- from: b.from,
30
- subject: b.subject,
31
- reply_to: Array.isArray(b.reply_to) ? b.reply_to.join(', ') : ((_b = b.reply_to) !== null && _b !== void 0 ? _b : ''),
32
- preview_text: (_c = b.preview_text) !== null && _c !== void 0 ? _c : '',
33
- status: b.status,
34
- created_at: b.created_at,
35
- scheduled_at: (_d = b.scheduled_at) !== null && _d !== void 0 ? _d : '',
36
- sent_at: (_e = b.sent_at) !== null && _e !== void 0 ? _e : '',
37
- });
38
- });
39
- });
40
- },
41
- });
42
- //# sourceMappingURL=list-broadcasts.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-broadcasts.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-broadcasts.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AA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xB,YAAY,EAAE,MAAA,CAAC,CAAC,YAAY,mCAAI,EAAE;oBAClC,OAAO,EAAE,MAAA,CAAC,CAAC,OAAO,mCAAI,EAAE;iBACzB,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- export declare const listContacts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- audience_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- }>;
4
- //# sourceMappingURL=list-contacts.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-contacts.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-contacts.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;EA2BvB,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listContacts = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- const props_1 = require("../common/props");
9
- exports.listContacts = (0, pieces_framework_1.createAction)({
10
- name: 'list_contacts',
11
- auth: __1.resendAuth,
12
- displayName: 'List Contacts',
13
- description: 'Retrieve all contacts in an audience',
14
- audience: 'both',
15
- aiMetadata: { description: 'Retrieves all contacts in a specific Resend audience, including each contact\'s ID, email, name, and subscription status. Use this to discover contact IDs (e.g. to feed Update Contact or Delete Contact) or to inspect a mailing list; requires the audience ID. Read-only and idempotent.', idempotent: true },
16
- props: {
17
- audience_id: props_1.resendProps.audienceId,
18
- },
19
- run(_a) {
20
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
21
- const response = yield pieces_common_1.httpClient.sendRequest({
22
- method: pieces_common_1.HttpMethod.GET,
23
- url: `https://api.resend.com/audiences/${propsValue.audience_id}/contacts`,
24
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
25
- });
26
- return response.body.data;
27
- });
28
- },
29
- });
30
- //# sourceMappingURL=list-contacts.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-contacts.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-contacts.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyF;AACzF,6BAAmC;AACnC,2CAA8C;AAEjC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,8RAA8R,EAAE,UAAU,EAAE,IAAI,EAAE;IAC7U,KAAK,EAAE;QACL,WAAW,EAAE,mBAAW,CAAC,UAAU;KACpC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAS1C;gBACD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,oCAAoC,UAAU,CAAC,WAAW,WAAW;gBAC1E,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const listDomains: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
2
- //# sourceMappingURL=list-domains.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-domains.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-domains.action.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,yHAwBtB,CAAC"}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listDomains = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- exports.listDomains = (0, pieces_framework_1.createAction)({
9
- name: 'list_domains',
10
- auth: __1.resendAuth,
11
- displayName: 'List Domains',
12
- description: 'Retrieve all domains added to your Resend account',
13
- audience: 'both',
14
- aiMetadata: { description: 'Retrieves all sending domains configured on the connected Resend account, including each domain\'s ID, name, verification status, and region. Use this to find a domain ID (e.g. for Verify Domain or Delete Domain) or to check which domains are verified before sending. Read-only and idempotent.', idempotent: true },
15
- props: {},
16
- run(_a) {
17
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
18
- const response = yield pieces_common_1.httpClient.sendRequest({
19
- method: pieces_common_1.HttpMethod.GET,
20
- url: 'https://api.resend.com/domains',
21
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
22
- });
23
- return response.body.data.map((d) => {
24
- var _a, _b, _c, _d;
25
- return ({
26
- id: d.id,
27
- name: d.name,
28
- status: d.status,
29
- region: d.region,
30
- created_at: d.created_at,
31
- sending: (_b = (_a = d.capabilities) === null || _a === void 0 ? void 0 : _a.sending) !== null && _b !== void 0 ? _b : '',
32
- receiving: (_d = (_c = d.capabilities) === null || _c === void 0 ? void 0 : _c.receiving) !== null && _d !== void 0 ? _d : '',
33
- });
34
- });
35
- });
36
- },
37
- });
38
- //# sourceMappingURL=list-domains.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-domains.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-domains.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyF;AACzF,6BAAmC;AAWtB,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,mDAAmD;IAChE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,uSAAuS,EAAE,UAAU,EAAE,IAAI,EAAE;IACtV,KAAK,EAAE,EAAE;IACH,GAAG;qEAAC,EAAE,IAAI,EAAE;YAChB,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAA2B;gBACtE,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,gCAAgC;gBACrC,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;gBAAC,OAAA,CAAC;oBACpC,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,IAAI,EAAE,CAAC,CAAC,IAAI;oBACZ,MAAM,EAAE,CAAC,CAAC,MAAM;oBAChB,MAAM,EAAE,CAAC,CAAC,MAAM;oBAChB,UAAU,EAAE,CAAC,CAAC,UAAU;oBACxB,OAAO,EAAE,MAAA,MAAA,CAAC,CAAC,YAAY,0CAAE,OAAO,mCAAI,EAAE;oBACtC,SAAS,EAAE,MAAA,MAAA,CAAC,CAAC,YAAY,0CAAE,SAAS,mCAAI,EAAE;iBAC3C,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const listEmails: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {}>;
2
- //# sourceMappingURL=list-emails.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-emails.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-emails.action.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,UAAU,yHA2BrB,CAAC"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.listEmails = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- exports.listEmails = (0, pieces_framework_1.createAction)({
9
- name: 'list_emails',
10
- auth: __1.resendAuth,
11
- displayName: 'List Sent Emails',
12
- description: 'Retrieve a list of emails sent from your Resend account',
13
- audience: 'both',
14
- aiMetadata: { description: 'Retrieves the list of emails sent from the connected Resend account, including their IDs, recipients, subjects, and latest delivery event. Use this to discover email IDs (e.g. to feed Get Email Status, Cancel Scheduled Email, or Reschedule Email) or to audit recent sends. Read-only and idempotent.', idempotent: true },
15
- props: {},
16
- run(_a) {
17
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth }) {
18
- const response = yield pieces_common_1.httpClient.sendRequest({
19
- method: pieces_common_1.HttpMethod.GET,
20
- url: 'https://api.resend.com/emails',
21
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
22
- });
23
- return response.body.data.map((email) => {
24
- var _a, _b, _c, _d, _e;
25
- return ({
26
- id: email.id,
27
- from: email.from,
28
- to: ((_a = email.to) !== null && _a !== void 0 ? _a : []).join(', '),
29
- subject: email.subject,
30
- last_event: email.last_event,
31
- created_at: email.created_at,
32
- scheduled_at: (_b = email.scheduled_at) !== null && _b !== void 0 ? _b : '',
33
- cc: ((_c = email.cc) !== null && _c !== void 0 ? _c : []).join(', '),
34
- bcc: ((_d = email.bcc) !== null && _d !== void 0 ? _d : []).join(', '),
35
- reply_to: ((_e = email.reply_to) !== null && _e !== void 0 ? _e : []).join(', '),
36
- });
37
- });
38
- });
39
- },
40
- });
41
- //# sourceMappingURL=list-emails.action.js.map
@@ -1 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CAAC;oBAC/B,GAAG,EAAE,CAAC,MAAA,KAAK,CAAC,GAAG,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;oBACjC,QAAQ,EAAE,CAAC,MAAA,KAAK,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;iBAC5C,CAAC,CAAA;aAAA,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const rescheduleEmail: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- email_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- scheduled_at: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- }>;
5
- //# sourceMappingURL=reschedule-email.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reschedule-email.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/reschedule-email.action.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;EA4B1B,CAAC"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rescheduleEmail = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- exports.rescheduleEmail = (0, pieces_framework_1.createAction)({
9
- name: 'reschedule_email',
10
- auth: __1.resendAuth,
11
- displayName: 'Reschedule Email',
12
- description: 'Update the send time of a scheduled email',
13
- audience: 'both',
14
- aiMetadata: { description: 'Changes the future send time of an already scheduled email, identified by its Resend email ID. Use this to move a pending send to a new time without cancelling and recreating it. Idempotent when called with the same target time; requires an ISO 8601 date-time and only works while the email is still scheduled.', idempotent: true },
15
- props: {
16
- email_id: pieces_framework_1.Property.ShortText({
17
- displayName: 'Email ID',
18
- description: 'The ID of the scheduled email to reschedule. Use "List Sent Emails" to find it.',
19
- required: true,
20
- }),
21
- scheduled_at: pieces_framework_1.Property.ShortText({
22
- displayName: 'New Send Time',
23
- description: 'ISO 8601 date-time for when to send the email, e.g. 2024-12-01T10:00:00Z',
24
- required: true,
25
- }),
26
- },
27
- run(_a) {
28
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
29
- const response = yield pieces_common_1.httpClient.sendRequest({
30
- method: pieces_common_1.HttpMethod.PATCH,
31
- url: `https://api.resend.com/emails/${propsValue.email_id}`,
32
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
33
- body: { scheduled_at: propsValue.scheduled_at },
34
- });
35
- return response.body;
36
- });
37
- },
38
- });
39
- //# sourceMappingURL=reschedule-email.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reschedule-email.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/reschedule-email.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAmC;AAEtB,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,2CAA2C;IACxD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wTAAwT,EAAE,UAAU,EAAE,IAAI,EAAE;IACvW,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,iFAAiF;YAC9F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,0EAA0E;YACvF,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,KAAK;gBACxB,GAAG,EAAE,iCAAiC,UAAU,CAAC,QAAQ,EAAE;gBAC3D,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;gBAClF,IAAI,EAAE,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,EAAE;aAChD,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const sendBatchEmails: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- emails: import("@activepieces/pieces-framework").ArrayProperty<true> | import("@activepieces/pieces-framework").ArrayProperty<false>;
3
- idempotency_key: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
- }>;
5
- //# sourceMappingURL=send-batch-emails.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-batch-emails.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-batch-emails.action.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,eAAe;;;EAoG1B,CAAC"}
@@ -1,113 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendBatchEmails = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- const BASE_URL = 'https://api.resend.com';
9
- exports.sendBatchEmails = (0, pieces_framework_1.createAction)({
10
- name: 'send_batch_emails',
11
- auth: __1.resendAuth,
12
- displayName: 'Send Batch Emails',
13
- description: 'Send up to 100 emails in a single API call',
14
- audience: 'both',
15
- aiMetadata: { description: 'Sends up to 100 distinct emails in one Resend API call, each with its own recipient, subject, and body. Use this instead of Send Email when delivering many independent messages at once. Senders must be on verified domains; pass an idempotency key to guard against duplicate batch sends, otherwise each call sends new emails.', idempotent: false },
16
- props: {
17
- emails: pieces_framework_1.Property.Array({
18
- displayName: 'Emails',
19
- description: 'List of emails to send (max 100). Each email is sent independently with its own recipient, subject, and body.',
20
- required: true,
21
- properties: {
22
- from: pieces_framework_1.Property.ShortText({
23
- displayName: 'From',
24
- description: 'Sender address. Use "Name <email@domain.com>" for a friendly name.',
25
- required: true,
26
- }),
27
- to: pieces_framework_1.Property.ShortText({
28
- displayName: 'To',
29
- description: 'Recipient email address.',
30
- required: true,
31
- }),
32
- subject: pieces_framework_1.Property.ShortText({
33
- displayName: 'Subject',
34
- required: true,
35
- }),
36
- content_type: pieces_framework_1.Property.StaticDropdown({
37
- displayName: 'Content Type',
38
- required: true,
39
- options: {
40
- options: [
41
- { label: 'HTML', value: 'html' },
42
- { label: 'Plain Text', value: 'text' },
43
- ],
44
- },
45
- }),
46
- content: pieces_framework_1.Property.LongText({
47
- displayName: 'Content',
48
- description: 'Email body. Use HTML markup if Content Type is HTML.',
49
- required: true,
50
- }),
51
- reply_to: pieces_framework_1.Property.ShortText({
52
- displayName: 'Reply To',
53
- required: false,
54
- }),
55
- cc: pieces_framework_1.Property.ShortText({
56
- displayName: 'CC',
57
- required: false,
58
- }),
59
- bcc: pieces_framework_1.Property.ShortText({
60
- displayName: 'BCC',
61
- required: false,
62
- }),
63
- },
64
- }),
65
- idempotency_key: pieces_framework_1.Property.ShortText({
66
- displayName: 'Idempotency Key',
67
- description: 'Optional unique key to prevent duplicate sends. Must be unique per request, expires after 24 hours, max 256 characters.',
68
- required: false,
69
- }),
70
- },
71
- run(_a) {
72
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
73
- var _b;
74
- const batch = ((_b = propsValue.emails) !== null && _b !== void 0 ? _b : []).map((item) => {
75
- const email = item;
76
- const payload = {
77
- from: email['from'],
78
- to: email['to'],
79
- subject: email['subject'],
80
- };
81
- if (email['content_type'] === 'html') {
82
- payload['html'] = email['content'];
83
- }
84
- else {
85
- payload['text'] = email['content'];
86
- }
87
- if (email['reply_to'])
88
- payload['reply_to'] = email['reply_to'];
89
- if (email['cc'])
90
- payload['cc'] = email['cc'];
91
- if (email['bcc'])
92
- payload['bcc'] = email['bcc'];
93
- return payload;
94
- });
95
- const extraHeaders = {};
96
- if (propsValue.idempotency_key) {
97
- extraHeaders['Idempotency-Key'] = propsValue.idempotency_key;
98
- }
99
- const response = yield pieces_common_1.httpClient.sendRequest({
100
- method: pieces_common_1.HttpMethod.POST,
101
- url: `${BASE_URL}/emails/batch`,
102
- authentication: {
103
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
104
- token: auth.secret_text,
105
- },
106
- headers: extraHeaders,
107
- body: batch,
108
- });
109
- return response.body.data;
110
- });
111
- },
112
- });
113
- //# sourceMappingURL=send-batch-emails.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-batch-emails.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-batch-emails.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AAEnC,MAAM,QAAQ,GAAG,wBAAwB,CAAC;AAE7B,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,mBAAmB;IAChC,WAAW,EAAE,4CAA4C;IACzD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,sUAAsU,EAAE,UAAU,EAAE,KAAK,EAAE;IACtX,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,+GAA+G;YAC5H,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;oBACvB,WAAW,EAAE,MAAM;oBAC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AAQ,eAAe;gBAC/B,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI,CAAC,WAAW;iBACxB;gBACD,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,KAAK;aACZ,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5B,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const sendBroadcast: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- broadcast_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- scheduled_at: import("@activepieces/pieces-framework").ShortTextProperty<false>;
4
- }>;
5
- //# sourceMappingURL=send-broadcast.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-broadcast.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-broadcast.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;EA4BxB,CAAC"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendBroadcast = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- const props_1 = require("../common/props");
9
- exports.sendBroadcast = (0, pieces_framework_1.createAction)({
10
- name: 'send_broadcast',
11
- auth: __1.resendAuth,
12
- displayName: 'Send Broadcast',
13
- description: 'Send or schedule a broadcast email to its audience',
14
- audience: 'both',
15
- aiMetadata: { description: 'Sends an existing draft broadcast to its entire audience immediately, or schedules it for a future time, identified by broadcast ID. Use this after Create Broadcast to deliver the campaign. Not idempotent — repeating the call can dispatch the broadcast again; optionally pass an ISO 8601 time to schedule rather than send now.', idempotent: false },
16
- props: {
17
- broadcast_id: props_1.resendProps.broadcastId,
18
- scheduled_at: pieces_framework_1.Property.ShortText({
19
- displayName: 'Schedule For',
20
- description: 'ISO 8601 date-time to schedule the send, e.g. 2024-12-01T10:00:00Z. Leave blank to send immediately.',
21
- required: false,
22
- }),
23
- },
24
- run(_a) {
25
- return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
26
- const body = {};
27
- if (propsValue.scheduled_at)
28
- body['scheduled_at'] = propsValue.scheduled_at;
29
- const response = yield pieces_common_1.httpClient.sendRequest({
30
- method: pieces_common_1.HttpMethod.POST,
31
- url: `https://api.resend.com/broadcasts/${propsValue.broadcast_id}/send`,
32
- authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
33
- body,
34
- });
35
- return response.body;
36
- });
37
- },
38
- });
39
- //# sourceMappingURL=send-broadcast.action.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-broadcast.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-broadcast.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAmC;AACnC,2CAA8C;AAEjC,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,oDAAoD;IACjE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wUAAwU,EAAE,UAAU,EAAE,KAAK,EAAE;IACxX,KAAK,EAAE;QACL,YAAY,EAAE,mBAAW,CAAC,WAAW;QACrC,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EACT,sGAAsG;YACxG,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,IAAI,UAAU,CAAC,YAAY;gBAAE,IAAI,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC;YAE5E,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,qCAAqC,UAAU,CAAC,YAAY,OAAO;gBACxE,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;gBAClF,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- export declare const sendEmail: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- to: import("@activepieces/pieces-framework").ArrayProperty<true>;
3
- from_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
4
- from: import("@activepieces/pieces-framework").ShortTextProperty<true>;
5
- bcc: import("@activepieces/pieces-framework").ArrayProperty<false>;
6
- cc: import("@activepieces/pieces-framework").ArrayProperty<false>;
7
- reply_to: import("@activepieces/pieces-framework").ShortTextProperty<false>;
8
- subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
9
- content_type: import("@activepieces/pieces-framework").DropdownProperty<"text" | "html", true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
10
- content: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- }>;
12
- //# sourceMappingURL=send-email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-email.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/send-email.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,SAAS;;;;;;;;;;EAqGpB,CAAC"}
@@ -1,103 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendEmail = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const pieces_common_1 = require("@activepieces/pieces-common");
7
- const __1 = require("../..");
8
- exports.sendEmail = (0, pieces_framework_1.createAction)({
9
- auth: __1.resendAuth,
10
- name: 'send_email',
11
- displayName: 'Send Email',
12
- description: 'Send a text or HTML email',
13
- audience: 'both',
14
- aiMetadata: { description: 'Sends a single transactional email (plain text or HTML) to one or more recipients via Resend. Use this for one-off messages; the sender address must be on a domain you have verified in Resend. Not idempotent — each call sends a new email.', idempotent: false },
15
- props: {
16
- to: pieces_framework_1.Property.Array({
17
- displayName: 'To',
18
- description: 'Emails of the recipients',
19
- required: true,
20
- }),
21
- from_name: pieces_framework_1.Property.ShortText({
22
- displayName: 'Sender Name',
23
- description: 'Sender name',
24
- required: true,
25
- }),
26
- from: pieces_framework_1.Property.ShortText({
27
- displayName: 'Sender Email (From)',
28
- description: 'Sender email',
29
- required: true,
30
- }),
31
- bcc: pieces_framework_1.Property.Array({
32
- displayName: 'BCC',
33
- description: 'List of emails in bcc',
34
- required: false,
35
- }),
36
- cc: pieces_framework_1.Property.Array({
37
- displayName: 'CC',
38
- description: 'List of emails in cc',
39
- required: false,
40
- }),
41
- reply_to: pieces_framework_1.Property.ShortText({
42
- displayName: 'Reply To',
43
- description: 'Email to receive replies on (defaults to sender)',
44
- required: false,
45
- }),
46
- subject: pieces_framework_1.Property.ShortText({
47
- displayName: 'Subject',
48
- description: undefined,
49
- required: true,
50
- }),
51
- content_type: pieces_framework_1.Property.Dropdown({
52
- auth: __1.resendAuth,
53
- displayName: 'Content Type',
54
- refreshers: [],
55
- required: true,
56
- defaultValue: 'html',
57
- options: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
58
- return {
59
- disabled: false,
60
- options: [
61
- { label: 'Plain Text', value: 'text' },
62
- { label: 'HTML', value: 'html' },
63
- ],
64
- };
65
- }),
66
- }),
67
- content: pieces_framework_1.Property.ShortText({
68
- displayName: 'Content',
69
- description: 'HTML is only allowed if you selected HTML as type',
70
- required: true,
71
- }),
72
- },
73
- run(context) {
74
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
75
- const { to, from, from_name, reply_to, subject, content_type, content, cc, bcc, } = context.propsValue;
76
- const requestBody = {
77
- to,
78
- from: from_name ? `${from_name} <${from}>` : from,
79
- reply_to: reply_to !== null && reply_to !== void 0 ? reply_to : from,
80
- cc,
81
- bcc,
82
- subject: subject,
83
- };
84
- if (content_type === 'text') {
85
- requestBody['text'] = content;
86
- }
87
- else if (content_type === 'html') {
88
- requestBody['html'] = content;
89
- }
90
- return yield pieces_common_1.httpClient.sendRequest({
91
- method: pieces_common_1.HttpMethod.POST,
92
- url: `https://api.resend.com/emails`,
93
- body: requestBody,
94
- authentication: {
95
- type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
96
- token: context.auth.secret_text,
97
- },
98
- queryParams: {},
99
- });
100
- });
101
- },
102
- });
103
- //# sourceMappingURL=send-email.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send-email.js","sourceRoot":"","sources":["../../../../src/lib/actions/send-email.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AAEtB,QAAA,SAAS,GAAG,IAAA,+BAAY,EAAC;IACpC,IAAI,EAAE,cAAU;IAChB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,gPAAgP,EAAE,UAAU,EAAE,KAAK,EAAE;IAChS,KAAK,EAAE;QACL,EAAE,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACjB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,aAAa;YAC1B,QAAQ,EAAE,IAAI;SACf,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CAAC,OAAO;;YACf,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,OAAO,EACP,EAAE,EACF,GAAG,GACJ,GAAG,OAAO,CAAC,UAAU,CAAC;YACvB,MAAM,WAAW,GAA4B;gBAC3C,EAAE;gBACF,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI;gBACjD,QAAQ,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI;gBAC1B,EAAE;gBACF,GAAG;gBACH,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;gBAC5B,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;YAChC,CAAC;iBAAM,IAAI,YAAY,KAAK,MAAM,EAAE,CAAC;gBACnC,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;YAChC,CAAC;YACD,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAClC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,+BAA+B;gBACpC,IAAI,EAAE,WAAW;gBACjB,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;iBAChC;gBACD,WAAW,EAAE,EAAE;aAChB,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export declare const updateContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
- audience_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
- contact_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
- first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
5
- last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
6
- unsubscribed: import("@activepieces/pieces-framework").StaticDropdownProperty<boolean, false>;
7
- }>;
8
- //# sourceMappingURL=update-contact.action.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-contact.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-contact.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;EA2CxB,CAAC"}