@activepieces/piece-resend 0.4.2 → 0.4.3
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/package.json +7 -12
- package/src/index.js +14 -102
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/cancel-scheduled-email.action.d.ts +0 -4
- package/src/lib/actions/cancel-scheduled-email.action.d.ts.map +0 -1
- package/src/lib/actions/cancel-scheduled-email.action.js +0 -33
- package/src/lib/actions/cancel-scheduled-email.action.js.map +0 -1
- package/src/lib/actions/create-audience.action.d.ts +0 -4
- package/src/lib/actions/create-audience.action.d.ts.map +0 -1
- package/src/lib/actions/create-audience.action.js +0 -34
- package/src/lib/actions/create-audience.action.js.map +0 -1
- package/src/lib/actions/create-broadcast.action.d.ts +0 -11
- package/src/lib/actions/create-broadcast.action.d.ts.map +0 -1
- package/src/lib/actions/create-broadcast.action.js +0 -84
- package/src/lib/actions/create-broadcast.action.js.map +0 -1
- package/src/lib/actions/create-contact.action.d.ts +0 -8
- package/src/lib/actions/create-contact.action.d.ts.map +0 -1
- package/src/lib/actions/create-contact.action.js +0 -47
- package/src/lib/actions/create-contact.action.js.map +0 -1
- package/src/lib/actions/create-domain.action.d.ts +0 -5
- package/src/lib/actions/create-domain.action.d.ts.map +0 -1
- package/src/lib/actions/create-domain.action.js +0 -61
- package/src/lib/actions/create-domain.action.js.map +0 -1
- package/src/lib/actions/delete-audience.action.d.ts +0 -4
- package/src/lib/actions/delete-audience.action.d.ts.map +0 -1
- package/src/lib/actions/delete-audience.action.js +0 -30
- package/src/lib/actions/delete-audience.action.js.map +0 -1
- package/src/lib/actions/delete-broadcast.action.d.ts +0 -4
- package/src/lib/actions/delete-broadcast.action.d.ts.map +0 -1
- package/src/lib/actions/delete-broadcast.action.js +0 -30
- package/src/lib/actions/delete-broadcast.action.js.map +0 -1
- package/src/lib/actions/delete-contact.action.d.ts +0 -5
- package/src/lib/actions/delete-contact.action.d.ts.map +0 -1
- package/src/lib/actions/delete-contact.action.js +0 -31
- package/src/lib/actions/delete-contact.action.js.map +0 -1
- package/src/lib/actions/delete-domain.action.d.ts +0 -4
- package/src/lib/actions/delete-domain.action.d.ts.map +0 -1
- package/src/lib/actions/delete-domain.action.js +0 -30
- package/src/lib/actions/delete-domain.action.js.map +0 -1
- package/src/lib/actions/get-email-status.action.d.ts +0 -4
- package/src/lib/actions/get-email-status.action.d.ts.map +0 -1
- package/src/lib/actions/get-email-status.action.js +0 -36
- package/src/lib/actions/get-email-status.action.js.map +0 -1
- package/src/lib/actions/list-audiences.action.d.ts +0 -2
- package/src/lib/actions/list-audiences.action.d.ts.map +0 -1
- package/src/lib/actions/list-audiences.action.js +0 -27
- package/src/lib/actions/list-audiences.action.js.map +0 -1
- package/src/lib/actions/list-broadcasts.action.d.ts +0 -2
- package/src/lib/actions/list-broadcasts.action.d.ts.map +0 -1
- package/src/lib/actions/list-broadcasts.action.js +0 -42
- package/src/lib/actions/list-broadcasts.action.js.map +0 -1
- package/src/lib/actions/list-contacts.action.d.ts +0 -4
- package/src/lib/actions/list-contacts.action.d.ts.map +0 -1
- package/src/lib/actions/list-contacts.action.js +0 -30
- package/src/lib/actions/list-contacts.action.js.map +0 -1
- package/src/lib/actions/list-domains.action.d.ts +0 -2
- package/src/lib/actions/list-domains.action.d.ts.map +0 -1
- package/src/lib/actions/list-domains.action.js +0 -38
- package/src/lib/actions/list-domains.action.js.map +0 -1
- package/src/lib/actions/list-emails.action.d.ts +0 -2
- package/src/lib/actions/list-emails.action.d.ts.map +0 -1
- package/src/lib/actions/list-emails.action.js +0 -41
- package/src/lib/actions/list-emails.action.js.map +0 -1
- package/src/lib/actions/reschedule-email.action.d.ts +0 -5
- package/src/lib/actions/reschedule-email.action.d.ts.map +0 -1
- package/src/lib/actions/reschedule-email.action.js +0 -39
- package/src/lib/actions/reschedule-email.action.js.map +0 -1
- package/src/lib/actions/send-batch-emails.action.d.ts +0 -5
- package/src/lib/actions/send-batch-emails.action.d.ts.map +0 -1
- package/src/lib/actions/send-batch-emails.action.js +0 -113
- package/src/lib/actions/send-batch-emails.action.js.map +0 -1
- package/src/lib/actions/send-broadcast.action.d.ts +0 -5
- package/src/lib/actions/send-broadcast.action.d.ts.map +0 -1
- package/src/lib/actions/send-broadcast.action.js +0 -39
- package/src/lib/actions/send-broadcast.action.js.map +0 -1
- package/src/lib/actions/send-email.d.ts +0 -12
- package/src/lib/actions/send-email.d.ts.map +0 -1
- package/src/lib/actions/send-email.js +0 -103
- package/src/lib/actions/send-email.js.map +0 -1
- package/src/lib/actions/update-contact.action.d.ts +0 -8
- package/src/lib/actions/update-contact.action.d.ts.map +0 -1
- package/src/lib/actions/update-contact.action.js +0 -54
- package/src/lib/actions/update-contact.action.js.map +0 -1
- package/src/lib/actions/verify-domain.action.d.ts +0 -4
- package/src/lib/actions/verify-domain.action.d.ts.map +0 -1
- package/src/lib/actions/verify-domain.action.js +0 -30
- package/src/lib/actions/verify-domain.action.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -7
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -93
- package/src/lib/common/props.js.map +0 -1
- package/src/lib/triggers/email-bounced.trigger.d.ts +0 -11
- package/src/lib/triggers/email-bounced.trigger.d.ts.map +0 -1
- package/src/lib/triggers/email-bounced.trigger.js +0 -138
- package/src/lib/triggers/email-bounced.trigger.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-audience.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-audience.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAmC;AAEtB,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,yCAAyC;IACtD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,yRAAyR,EAAE,UAAU,EAAE,KAAK,EAAE;IACzU,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAK1C;gBACD,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,kCAAkC;gBACvC,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;gBAClF,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE;aAChC,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const createBroadcast: 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
|
-
from: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
reply_to: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
7
|
-
preview_text: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
content_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
9
|
-
content: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=create-broadcast.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-broadcast.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-broadcast.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;;;;;EAsE1B,CAAC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createBroadcast = 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.createBroadcast = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'create_broadcast',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Create Broadcast',
|
|
13
|
-
description: 'Create a new broadcast email to send to an audience',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Creates a draft broadcast email (subject and body) targeting a Resend audience and returns its ID. Use this to prepare a campaign; it only creates the draft and does not deliver anything — pair it with Send Broadcast to actually send. Requires the audience ID and a sender on a verified domain. Not idempotent — each call creates a new broadcast.', idempotent: false },
|
|
16
|
-
props: {
|
|
17
|
-
audience_id: props_1.resendProps.audienceId,
|
|
18
|
-
from: pieces_framework_1.Property.ShortText({
|
|
19
|
-
displayName: 'From',
|
|
20
|
-
description: 'Sender address. Must be from a verified domain. Use "Name <email@yourdomain.com>" for a friendly name.',
|
|
21
|
-
required: true,
|
|
22
|
-
}),
|
|
23
|
-
subject: pieces_framework_1.Property.ShortText({ displayName: 'Subject', required: true }),
|
|
24
|
-
name: pieces_framework_1.Property.ShortText({
|
|
25
|
-
displayName: 'Broadcast Name',
|
|
26
|
-
description: 'Internal label for this broadcast. Not visible to recipients.',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
reply_to: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'Reply To',
|
|
31
|
-
description: 'Email address recipients will reply to.',
|
|
32
|
-
required: false,
|
|
33
|
-
}),
|
|
34
|
-
preview_text: pieces_framework_1.Property.ShortText({
|
|
35
|
-
displayName: 'Preview Text',
|
|
36
|
-
description: 'Short summary shown in email clients below the subject line.',
|
|
37
|
-
required: false,
|
|
38
|
-
}),
|
|
39
|
-
content_type: pieces_framework_1.Property.StaticDropdown({
|
|
40
|
-
displayName: 'Content Type',
|
|
41
|
-
required: true,
|
|
42
|
-
options: {
|
|
43
|
-
options: [
|
|
44
|
-
{ label: 'HTML', value: 'html' },
|
|
45
|
-
{ label: 'Plain Text', value: 'text' },
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
}),
|
|
49
|
-
content: pieces_framework_1.Property.LongText({
|
|
50
|
-
displayName: 'Content',
|
|
51
|
-
description: 'Email body. Use HTML markup if Content Type is HTML.',
|
|
52
|
-
required: true,
|
|
53
|
-
}),
|
|
54
|
-
},
|
|
55
|
-
run(_a) {
|
|
56
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
57
|
-
const body = {
|
|
58
|
-
audience_id: propsValue.audience_id,
|
|
59
|
-
from: propsValue.from,
|
|
60
|
-
subject: propsValue.subject,
|
|
61
|
-
};
|
|
62
|
-
if (propsValue.content_type === 'html') {
|
|
63
|
-
body['html'] = propsValue.content;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
body['text'] = propsValue.content;
|
|
67
|
-
}
|
|
68
|
-
if (propsValue.name)
|
|
69
|
-
body['name'] = propsValue.name;
|
|
70
|
-
if (propsValue.reply_to)
|
|
71
|
-
body['reply_to'] = propsValue.reply_to;
|
|
72
|
-
if (propsValue.preview_text)
|
|
73
|
-
body['preview_text'] = propsValue.preview_text;
|
|
74
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
75
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
76
|
-
url: 'https://api.resend.com/broadcasts',
|
|
77
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
78
|
-
body,
|
|
79
|
-
});
|
|
80
|
-
return response.body;
|
|
81
|
-
});
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
//# sourceMappingURL=create-broadcast.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-broadcast.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-broadcast.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAmC;AACnC,2CAA8C;AAEjC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4VAA4V,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5Y,KAAK,EAAE;QACL,WAAW,EAAE,mBAAW,CAAC,UAAU;QACnC,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,wGAAwG;YAC1G,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACvE,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,gBAAgB;YAC7B,WAAW,EAAE,+DAA+D;YAC5E,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAA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AAC,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,mCAAmC;gBACxC,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,8 +0,0 @@
|
|
|
1
|
-
export declare const createContact: 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
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<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").CheckboxProperty<false>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=create-contact.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-contact.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;;;;EAiCxB,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createContact = 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.createContact = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'create_contact',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Create Contact',
|
|
13
|
-
description: 'Add a contact to a Resend audience',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Adds a new contact (email plus optional name and subscription status) to a specific Resend audience. Use this to grow a mailing list; requires the target audience ID (use List Audiences to find it). Not idempotent — each call creates a new contact, so guard against re-adding the same email.', idempotent: false },
|
|
16
|
-
props: {
|
|
17
|
-
audience_id: props_1.resendProps.audienceId,
|
|
18
|
-
email: pieces_framework_1.Property.ShortText({ displayName: 'Email', required: true }),
|
|
19
|
-
first_name: pieces_framework_1.Property.ShortText({ displayName: 'First Name', required: false }),
|
|
20
|
-
last_name: pieces_framework_1.Property.ShortText({ displayName: 'Last Name', required: false }),
|
|
21
|
-
unsubscribed: pieces_framework_1.Property.Checkbox({
|
|
22
|
-
displayName: 'Unsubscribed',
|
|
23
|
-
description: 'If true, the contact will be unsubscribed from all broadcasts',
|
|
24
|
-
required: false,
|
|
25
|
-
defaultValue: false,
|
|
26
|
-
}),
|
|
27
|
-
},
|
|
28
|
-
run(_a) {
|
|
29
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
30
|
-
const body = { email: propsValue.email };
|
|
31
|
-
if (propsValue.first_name)
|
|
32
|
-
body['first_name'] = propsValue.first_name;
|
|
33
|
-
if (propsValue.last_name)
|
|
34
|
-
body['last_name'] = propsValue.last_name;
|
|
35
|
-
if (propsValue.unsubscribed !== undefined)
|
|
36
|
-
body['unsubscribed'] = propsValue.unsubscribed;
|
|
37
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
38
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
39
|
-
url: `https://api.resend.com/audiences/${propsValue.audience_id}/contacts`,
|
|
40
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
41
|
-
body,
|
|
42
|
-
});
|
|
43
|
-
return response.body;
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=create-contact.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-contact.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,oCAAoC;IACjD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,qSAAqS,EAAE,UAAU,EAAE,KAAK,EAAE;IACrV,KAAK,EAAE;QACL,WAAW,EAAE,mBAAW,CAAC,UAAU;QACnC,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QACnE,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC9E,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;QAC5E,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,+DAA+D;YAC5E,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;SACpB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,IAAI,GAA4B,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC;YAClE,IAAI,UAAU,CAAC,UAAU;gBAAE,IAAI,CAAC,YAAY,CAAC,GAAG,UAAU,CAAC,UAAU,CAAC;YACtE,IAAI,UAAU,CAAC,SAAS;gBAAE,IAAI,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC;YACnE,IAAI,UAAU,CAAC,YAAY,KAAK,SAAS;gBAAE,IAAI,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,YAAY,CAAC;YAE1F,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAiC;gBAC5E,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,oCAAoC,UAAU,CAAC,WAAW,WAAW;gBAC1E,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,5 +0,0 @@
|
|
|
1
|
-
export declare const createDomain: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
region: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=create-domain.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-domain.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-domain.action.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY;;;EA0DvB,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDomain = 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.createDomain = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'create_domain',
|
|
10
|
-
auth: __1.resendAuth,
|
|
11
|
-
displayName: 'Create Domain',
|
|
12
|
-
description: 'Add a sending domain to your Resend account and get the DNS records to verify it',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: { description: 'Registers a new sending domain on the Resend account and returns the DNS records that must be added to verify it. Use this as the first step in setting up a custom sending domain before triggering verification. Not idempotent — each call attempts to create a new domain entry.', idempotent: false },
|
|
15
|
-
props: {
|
|
16
|
-
name: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Domain Name',
|
|
18
|
-
description: 'The domain you want to send from, e.g. mail.yourdomain.com',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
region: pieces_framework_1.Property.StaticDropdown({
|
|
22
|
-
displayName: 'Region',
|
|
23
|
-
description: 'AWS region for email delivery. Defaults to US East.',
|
|
24
|
-
required: false,
|
|
25
|
-
options: {
|
|
26
|
-
options: [
|
|
27
|
-
{ label: 'US East (N. Virginia)', value: 'us-east-1' },
|
|
28
|
-
{ label: 'EU West (Ireland)', value: 'eu-west-1' },
|
|
29
|
-
{ label: 'Asia Pacific (Tokyo)', value: 'ap-northeast-1' },
|
|
30
|
-
{ label: 'South America (São Paulo)', value: 'sa-east-1' },
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
}),
|
|
34
|
-
},
|
|
35
|
-
run(_a) {
|
|
36
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
37
|
-
var _b, _c, _d, _e;
|
|
38
|
-
const body = { name: propsValue.name };
|
|
39
|
-
if (propsValue.region)
|
|
40
|
-
body['region'] = propsValue.region;
|
|
41
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
42
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
43
|
-
url: 'https://api.resend.com/domains',
|
|
44
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
45
|
-
body,
|
|
46
|
-
});
|
|
47
|
-
const d = response.body;
|
|
48
|
-
return {
|
|
49
|
-
id: d.id,
|
|
50
|
-
name: d.name,
|
|
51
|
-
status: d.status,
|
|
52
|
-
region: d.region,
|
|
53
|
-
created_at: d.created_at,
|
|
54
|
-
sending: (_c = (_b = d.capabilities) === null || _b === void 0 ? void 0 : _b.sending) !== null && _c !== void 0 ? _c : '',
|
|
55
|
-
receiving: (_e = (_d = d.capabilities) === null || _d === void 0 ? void 0 : _d.receiving) !== null && _e !== void 0 ? _e : '',
|
|
56
|
-
dns_records: d.records,
|
|
57
|
-
};
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=create-domain.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-domain.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-domain.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyF;AACzF,6BAAmC;AAEtB,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,kFAAkF;IAC/F,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,sRAAsR,EAAE,UAAU,EAAE,KAAK,EAAE;IACtU,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,C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C,CAAC,YAAY,0CAAE,SAAS,mCAAI,EAAE;gBAC1C,WAAW,EAAE,CAAC,CAAC,OAAO;aACvB,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const deleteAudience: 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=delete-audience.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-audience.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-audience.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;EAkBzB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteAudience = 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.deleteAudience = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'delete_audience',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Delete Audience',
|
|
13
|
-
description: 'Permanently delete an audience and all its contacts',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Permanently deletes an entire audience and all of its contacts from Resend, identified by audience ID. Use this to remove a whole mailing list; this is destructive and cannot be undone. Effectively idempotent — once deleted, repeating the call has no further effect.', 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.DELETE,
|
|
23
|
-
url: `https://api.resend.com/audiences/${propsValue.audience_id}`,
|
|
24
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
25
|
-
});
|
|
26
|
-
return response.body;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=delete-audience.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-audience.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-audience.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyF;AACzF,6BAAmC;AACnC,2CAA8C;AAEjC,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,qDAAqD;IAClE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,4QAA4Q,EAAE,UAAU,EAAE,IAAI,EAAE;IAC3T,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,CAAmD;gBAC9F,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,oCAAoC,UAAU,CAAC,WAAW,EAAE;gBACjE,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const deleteBroadcast: 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
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=delete-broadcast.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-broadcast.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-broadcast.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;EAkB1B,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteBroadcast = 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.deleteBroadcast = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'delete_broadcast',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Delete Broadcast',
|
|
13
|
-
description: 'Permanently delete a broadcast from your Resend account',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Permanently deletes a broadcast from the Resend account, identified by broadcast ID. Use this to remove a draft or unwanted campaign; only broadcasts that have not been sent can be deleted. Effectively idempotent — once deleted, repeating the call has no further effect.', idempotent: true },
|
|
16
|
-
props: {
|
|
17
|
-
broadcast_id: props_1.resendProps.broadcastId,
|
|
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.DELETE,
|
|
23
|
-
url: `https://api.resend.com/broadcasts/${propsValue.broadcast_id}`,
|
|
24
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
25
|
-
});
|
|
26
|
-
return response.body;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=delete-broadcast.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-broadcast.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-broadcast.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyF;AACzF,6BAAmC;AACnC,2CAA8C;AAEjC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,yDAAyD;IACtE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,gRAAgR,EAAE,UAAU,EAAE,IAAI,EAAE;IAC/T,KAAK,EAAE;QACL,YAAY,EAAE,mBAAW,CAAC,WAAW;KACtC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAmD;gBAC9F,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,qCAAqC,UAAU,CAAC,YAAY,EAAE;gBACnE,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const deleteContact: 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
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=delete-contact.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-contact.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-contact.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;;EAuBxB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteContact = 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.deleteContact = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'delete_contact',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Delete Contact',
|
|
13
|
-
description: 'Remove a contact from an audience',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Permanently removes a contact from a Resend audience, identified by audience ID and contact ID. Use this to delete a subscriber from a list. Effectively idempotent — once removed, repeating the call has no further effect.', idempotent: true },
|
|
16
|
-
props: {
|
|
17
|
-
audience_id: props_1.resendProps.audienceId,
|
|
18
|
-
contact_id: props_1.resendProps.contactId,
|
|
19
|
-
},
|
|
20
|
-
run(_a) {
|
|
21
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
22
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
23
|
-
method: pieces_common_1.HttpMethod.DELETE,
|
|
24
|
-
url: `https://api.resend.com/audiences/${propsValue.audience_id}/contacts/${propsValue.contact_id}`,
|
|
25
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
26
|
-
});
|
|
27
|
-
return response.body;
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=delete-contact.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-contact.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-contact.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+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,mCAAmC;IAChD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,+NAA+N,EAAE,UAAU,EAAE,IAAI,EAAE;IAC9Q,KAAK,EAAE;QACL,WAAW,EAAE,mBAAW,CAAC,UAAU;QACnC,UAAU,EAAE,mBAAW,CAAC,SAAS;KAClC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAI1C;gBACD,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,oCAAoC,UAAU,CAAC,WAAW,aAAa,UAAU,CAAC,UAAU,EAAE;gBACnG,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const deleteDomain: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
domain_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=delete-domain.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domain.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/delete-domain.action.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;EAkBvB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteDomain = 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.deleteDomain = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'delete_domain',
|
|
11
|
-
auth: __1.resendAuth,
|
|
12
|
-
displayName: 'Delete Domain',
|
|
13
|
-
description: 'Remove a domain from your Resend account',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: { description: 'Permanently removes a sending domain from the Resend account, identified by its domain ID. Use this to decommission a domain you no longer send from. Effectively idempotent — once deleted, repeating the call has no further effect.', idempotent: true },
|
|
16
|
-
props: {
|
|
17
|
-
domain_id: props_1.resendProps.domainId,
|
|
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.DELETE,
|
|
23
|
-
url: `https://api.resend.com/domains/${propsValue.domain_id}`,
|
|
24
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
25
|
-
});
|
|
26
|
-
return response.body;
|
|
27
|
-
});
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=delete-domain.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-domain.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/delete-domain.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,0CAA0C;IACvD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wOAAwO,EAAE,UAAU,EAAE,IAAI,EAAE;IACvR,KAAK,EAAE;QACL,SAAS,EAAE,mBAAW,CAAC,QAAQ;KAChC;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAmD;gBAC9F,MAAM,EAAE,0BAAU,CAAC,MAAM;gBACzB,GAAG,EAAE,kCAAkC,UAAU,CAAC,SAAS,EAAE;gBAC7D,cAAc,EAAE,EAAE,IAAI,EAAE,kCAAkB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;aACnF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const getEmailStatus: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
email_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=get-email-status.action.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-email-status.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/get-email-status.action.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,cAAc;;EAyBzB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEmailStatus = 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.getEmailStatus = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'get_email_status',
|
|
10
|
-
auth: __1.resendAuth,
|
|
11
|
-
displayName: 'Get Email Status',
|
|
12
|
-
description: 'Retrieve the delivery status of a sent email',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: { description: 'Looks up the current delivery status and details of a single previously sent email by its Resend email ID. Use this to check whether a specific email was delivered, bounced, or is still scheduled. Read-only and idempotent; requires the email ID returned when the email was sent.', idempotent: true },
|
|
15
|
-
props: {
|
|
16
|
-
email_id: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Email ID',
|
|
18
|
-
description: 'The ID returned when you sent the email',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
22
|
-
run(_a) {
|
|
23
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
24
|
-
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
25
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
26
|
-
url: `https://api.resend.com/emails/${propsValue.email_id}`,
|
|
27
|
-
authentication: {
|
|
28
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
29
|
-
token: auth.secret_text,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
return response.body;
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=get-email-status.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-email-status.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/get-email-status.action.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAmC;AAEtB,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,8CAA8C;IAC3D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wRAAwR,EAAE,UAAU,EAAE,IAAI,EAAE;IACvU,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,UAAU;YACvB,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,iCAAiC,UAAU,CAAC,QAAQ,EAAE;gBAC3D,cAAc,EAAE;oBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;oBACrC,KAAK,EAAE,IAAI,CAAC,WAAW;iBACxB;aACF,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-audiences.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-audiences.action.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,yHAkBxB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listAudiences = 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.listAudiences = (0, pieces_framework_1.createAction)({
|
|
9
|
-
name: 'list_audiences',
|
|
10
|
-
auth: __1.resendAuth,
|
|
11
|
-
displayName: 'List Audiences',
|
|
12
|
-
description: 'Retrieve all contact audiences in your Resend account',
|
|
13
|
-
audience: 'both',
|
|
14
|
-
aiMetadata: { description: 'Retrieves all contact audiences (mailing lists) in the connected Resend account, including each audience\'s ID and name. Use this to discover an audience ID needed by contact and broadcast actions (e.g. Create Contact, List Contacts, Create Broadcast). 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/audiences',
|
|
21
|
-
authentication: { type: pieces_common_1.AuthenticationType.BEARER_TOKEN, token: auth.secret_text },
|
|
22
|
-
});
|
|
23
|
-
return response.body.data;
|
|
24
|
-
});
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=list-audiences.action.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-audiences.action.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-audiences.action.ts"],"names":[],"mappings":";;;;AAAA,qEAA8D;AAC9D,+DAAyF;AACzF,6BAAmC;AAEtB,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,cAAU;IAChB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,uDAAuD;IACpE,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,EAAE,WAAW,EAAE,wRAAwR,EAAE,UAAU,EAAE,IAAI,EAAE;IACvU,KAAK,EAAE,EAAE;IACH,GAAG;qEAAC,EAAE,IAAI,EAAE;YAChB,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAE1C;gBACD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,kCAAkC;gBACvC,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-broadcasts.action.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-broadcasts.action.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,cAAc,yHA4BzB,CAAC"}
|
|
@@ -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
|
|
@@ -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BAChF,YAAY,EAAE,MAAA,CAAC,CAAC,YAAY,mCAAI,EAAE;oBAClC,MAAM,EAAE,CAAC,CAAC,MAAM;oBAChB,UAAU,EAAE,CAAC,CAAC,UAAU;oBACxB,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"}
|