@activepieces/piece-elastic-email 0.2.1 → 0.2.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 -13
- package/src/index.js +20 -51
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/add-contact.d.ts +0 -12
- package/src/lib/actions/add-contact.d.ts.map +0 -1
- package/src/lib/actions/add-contact.js +0 -95
- package/src/lib/actions/add-contact.js.map +0 -1
- package/src/lib/actions/create-campaign.d.ts +0 -11
- package/src/lib/actions/create-campaign.d.ts.map +0 -1
- package/src/lib/actions/create-campaign.js +0 -79
- package/src/lib/actions/create-campaign.js.map +0 -1
- package/src/lib/actions/create-contact.d.ts +0 -8
- package/src/lib/actions/create-contact.d.ts.map +0 -1
- package/src/lib/actions/create-contact.js +0 -63
- package/src/lib/actions/create-contact.js.map +0 -1
- package/src/lib/actions/create-segment.d.ts +0 -5
- package/src/lib/actions/create-segment.d.ts.map +0 -1
- package/src/lib/actions/create-segment.js +0 -39
- package/src/lib/actions/create-segment.js.map +0 -1
- package/src/lib/actions/list-campaigns.d.ts +0 -6
- package/src/lib/actions/list-campaigns.d.ts.map +0 -1
- package/src/lib/actions/list-campaigns.js +0 -55
- package/src/lib/actions/list-campaigns.js.map +0 -1
- package/src/lib/actions/list-contacts.d.ts +0 -5
- package/src/lib/actions/list-contacts.d.ts.map +0 -1
- package/src/lib/actions/list-contacts.js +0 -47
- package/src/lib/actions/list-contacts.js.map +0 -1
- package/src/lib/actions/send-email.d.ts +0 -17
- package/src/lib/actions/send-email.d.ts.map +0 -1
- package/src/lib/actions/send-email.js +0 -128
- package/src/lib/actions/send-email.js.map +0 -1
- package/src/lib/actions/unsubscribe-contact.d.ts +0 -4
- package/src/lib/actions/unsubscribe-contact.d.ts.map +0 -1
- package/src/lib/actions/unsubscribe-contact.js +0 -34
- package/src/lib/actions/unsubscribe-contact.js.map +0 -1
- package/src/lib/actions/update-campaign.d.ts +0 -12
- package/src/lib/actions/update-campaign.d.ts.map +0 -1
- package/src/lib/actions/update-campaign.js +0 -89
- package/src/lib/actions/update-campaign.js.map +0 -1
- package/src/lib/actions/update-contact.d.ts +0 -7
- package/src/lib/actions/update-contact.d.ts.map +0 -1
- package/src/lib/actions/update-contact.js +0 -47
- package/src/lib/actions/update-contact.js.map +0 -1
- package/src/lib/auth.d.ts +0 -2
- package/src/lib/auth.d.ts.map +0 -1
- package/src/lib/auth.js +0 -59
- package/src/lib/auth.js.map +0 -1
- package/src/lib/common/client.d.ts +0 -9
- package/src/lib/common/client.d.ts.map +0 -1
- package/src/lib/common/client.js +0 -19
- package/src/lib/common/client.js.map +0 -1
- package/src/lib/common/constants.d.ts +0 -8
- package/src/lib/common/constants.d.ts.map +0 -1
- package/src/lib/common/constants.js +0 -47
- package/src/lib/common/constants.js.map +0 -1
- package/src/lib/common/props.d.ts +0 -6
- package/src/lib/common/props.d.ts.map +0 -1
- package/src/lib/common/props.js +0 -165
- package/src/lib/common/props.js.map +0 -1
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createCampaignAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const constants_1 = require("../common/constants");
|
|
10
|
-
const props_1 = require("../common/props");
|
|
11
|
-
exports.createCampaignAction = (0, pieces_framework_1.createAction)({
|
|
12
|
-
name: 'create_campaign',
|
|
13
|
-
displayName: 'Create Campaign',
|
|
14
|
-
description: 'Create a new email campaign in Elastic Email.',
|
|
15
|
-
auth: auth_1.elasticEmailAuth,
|
|
16
|
-
props: {
|
|
17
|
-
name: pieces_framework_1.Property.ShortText({
|
|
18
|
-
displayName: 'Campaign Name',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
from: pieces_framework_1.Property.ShortText({
|
|
22
|
-
displayName: 'From',
|
|
23
|
-
description: 'Sender email with optional name (e.g. `email@domain.com` or `John Doe <email@domain.com>`).',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
recipientListNames: props_1.listNamesProp,
|
|
27
|
-
recipientSegmentNames: props_1.segmentNamesProp,
|
|
28
|
-
replyTo: pieces_framework_1.Property.ShortText({
|
|
29
|
-
displayName: 'Reply To',
|
|
30
|
-
description: 'Reply-to email address.',
|
|
31
|
-
required: true,
|
|
32
|
-
}),
|
|
33
|
-
status: pieces_framework_1.Property.StaticDropdown({
|
|
34
|
-
displayName: 'Status',
|
|
35
|
-
description: 'Initial campaign status.',
|
|
36
|
-
required: true,
|
|
37
|
-
options: {
|
|
38
|
-
options: constants_1.CAMPAIGN_STATUS_OPTIONS.map((s) => ({ label: s, value: s })),
|
|
39
|
-
},
|
|
40
|
-
}),
|
|
41
|
-
subject: pieces_framework_1.Property.ShortText({
|
|
42
|
-
displayName: 'Subject',
|
|
43
|
-
description: 'Default email subject line.',
|
|
44
|
-
required: false,
|
|
45
|
-
}),
|
|
46
|
-
templateName: props_1.templateNameProp,
|
|
47
|
-
},
|
|
48
|
-
run(_a) {
|
|
49
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
50
|
-
var _b, _c;
|
|
51
|
-
return (0, client_1.elasticEmailRequest)({
|
|
52
|
-
apiKey: auth.secret_text,
|
|
53
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
54
|
-
path: '/campaigns',
|
|
55
|
-
body: {
|
|
56
|
-
Name: propsValue.name,
|
|
57
|
-
Recipients: {
|
|
58
|
-
ListNames: propsValue.recipientListNames && propsValue.recipientListNames.length > 0
|
|
59
|
-
? propsValue.recipientListNames
|
|
60
|
-
: undefined,
|
|
61
|
-
SegmentNames: propsValue.recipientSegmentNames && propsValue.recipientSegmentNames.length > 0
|
|
62
|
-
? propsValue.recipientSegmentNames
|
|
63
|
-
: undefined,
|
|
64
|
-
},
|
|
65
|
-
Content: [
|
|
66
|
-
{
|
|
67
|
-
From: propsValue.from,
|
|
68
|
-
ReplyTo: propsValue.replyTo,
|
|
69
|
-
Subject: (_b = propsValue.subject) !== null && _b !== void 0 ? _b : undefined,
|
|
70
|
-
TemplateName: (_c = propsValue.templateName) !== null && _c !== void 0 ? _c : undefined,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
Status: propsValue.status,
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
//# sourceMappingURL=create-campaign.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-campaign.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-campaign.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AACvD,mDAA8D;AAC9D,2CAIyB;AAEZ,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,+CAA+C;IAC5D,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,eAAe;YAC5B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,kBAAkB,EAAE,qBAAa;QACjC,qBAAqB,EAAE,wBAAgB;QACvC,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,UAAU;YACvB,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AAC,OAAO,mCAAI,SAAS;4BACxC,YAAY,EAAE,MAAA,UAAU,CAAC,YAAY,mCAAI,SAAS;yBACnD;qBACF;oBACD,MAAM,EAAE,UAAU,CAAC,MAAM;iBAC1B;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const createContactAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<"Transactional" | "Engaged" | "Active" | "Bounced" | "Unsubscribed" | "Abuse" | "Inactive" | "Stale" | "NotConfirmed", false>;
|
|
4
|
-
firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
customFields: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
7
|
-
}>;
|
|
8
|
-
//# sourceMappingURL=create-contact.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-contact.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;EAkD9B,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createContactAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const constants_1 = require("../common/constants");
|
|
10
|
-
exports.createContactAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
name: 'create_contact',
|
|
12
|
-
displayName: 'Create Contact',
|
|
13
|
-
description: 'Create a new contact in Elastic Email.',
|
|
14
|
-
auth: auth_1.elasticEmailAuth,
|
|
15
|
-
props: {
|
|
16
|
-
email: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Email',
|
|
18
|
-
description: 'The email address of the contact.',
|
|
19
|
-
required: true,
|
|
20
|
-
}),
|
|
21
|
-
status: pieces_framework_1.Property.StaticDropdown({
|
|
22
|
-
displayName: 'Status',
|
|
23
|
-
description: 'Initial status of the contact.',
|
|
24
|
-
required: false,
|
|
25
|
-
options: {
|
|
26
|
-
options: constants_1.CONTACT_STATUS_OPTIONS.map((s) => ({ label: s, value: s })),
|
|
27
|
-
},
|
|
28
|
-
}),
|
|
29
|
-
firstName: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'First Name',
|
|
31
|
-
required: false,
|
|
32
|
-
}),
|
|
33
|
-
lastName: pieces_framework_1.Property.ShortText({
|
|
34
|
-
displayName: 'Last Name',
|
|
35
|
-
required: false,
|
|
36
|
-
}),
|
|
37
|
-
customFields: pieces_framework_1.Property.Object({
|
|
38
|
-
displayName: 'Custom Fields',
|
|
39
|
-
description: 'Key-value pairs of custom contact fields. Only existing custom fields will be saved.',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
},
|
|
43
|
-
run(_a) {
|
|
44
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
45
|
-
var _b, _c, _d, _e;
|
|
46
|
-
return (0, client_1.elasticEmailRequest)({
|
|
47
|
-
apiKey: auth.secret_text,
|
|
48
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
49
|
-
path: '/contacts',
|
|
50
|
-
body: [
|
|
51
|
-
{
|
|
52
|
-
Email: propsValue.email,
|
|
53
|
-
Status: (_b = propsValue.status) !== null && _b !== void 0 ? _b : undefined,
|
|
54
|
-
FirstName: (_c = propsValue.firstName) !== null && _c !== void 0 ? _c : undefined,
|
|
55
|
-
LastName: (_d = propsValue.lastName) !== null && _d !== void 0 ? _d : undefined,
|
|
56
|
-
CustomFields: (_e = propsValue.customFields) !== null && _e !== void 0 ? _e : undefined,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
//# sourceMappingURL=create-contact.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-contact.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-contact.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AACvD,mDAA6D;AAEhD,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,wCAAwC;IACrD,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,cAAc,CAAC;YAC9B,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,kCAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aACrE;SACF,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC5B,WAAW,EAAE,eAAe;YAC5B,WAAW,EACT,sFAAsF;YACxF,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,OAAO,IAAA,4BAAmB,EAAC;gBACzB,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ;wBACE,KAAK,EAAE,UAAU,CAAC,KAAK;wBACvB,MAAM,EAAE,MAAA,UAAU,CAAC,MAAM,mCAAI,SAAS;wBACtC,SAAS,EAAE,MAAA,UAAU,CAAC,SAAS,mCAAI,SAAS;wBAC5C,QAAQ,EAAE,MAAA,UAAU,CAAC,QAAQ,mCAAI,SAAS;wBAC1C,YAAY,EAAE,MAAA,UAAU,CAAC,YAAY,mCAAI,SAAS;qBACnD;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const createSegmentAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
rule: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=create-segment.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-segment.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-segment.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB;;;EA6B9B,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createSegmentAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.createSegmentAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'create_segment',
|
|
11
|
-
displayName: 'Create Segment',
|
|
12
|
-
description: 'Create a new contact segment in Elastic Email using a SQL-like rule.',
|
|
13
|
-
auth: auth_1.elasticEmailAuth,
|
|
14
|
-
props: {
|
|
15
|
-
name: pieces_framework_1.Property.ShortText({
|
|
16
|
-
displayName: 'Segment Name',
|
|
17
|
-
required: true,
|
|
18
|
-
}),
|
|
19
|
-
rule: pieces_framework_1.Property.ShortText({
|
|
20
|
-
displayName: 'Rule',
|
|
21
|
-
description: 'SQL-like rule to determine which contacts belong to this segment. See https://help.elasticemail.com/en/articles/5162182-segment-rules',
|
|
22
|
-
required: true,
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
run(_a) {
|
|
26
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
27
|
-
return (0, client_1.elasticEmailRequest)({
|
|
28
|
-
apiKey: auth.secret_text,
|
|
29
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
30
|
-
path: '/segments',
|
|
31
|
-
body: {
|
|
32
|
-
Name: propsValue.name,
|
|
33
|
-
Rule: propsValue.rule,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=create-segment.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-segment.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-segment.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AAE1C,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EACT,sEAAsE;IACxE,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,uIAAuI;YACzI,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,OAAO,IAAA,4BAAmB,EAAC;gBACzB,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;iBACtB;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const listCampaignsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
search: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
3
|
-
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
4
|
-
offset: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
5
|
-
}>;
|
|
6
|
-
//# sourceMappingURL=list-campaigns.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-campaigns.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-campaigns.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;EA0C9B,CAAC"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listCampaignsAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const constants_1 = require("../common/constants");
|
|
10
|
-
exports.listCampaignsAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
name: 'list_campaigns',
|
|
12
|
-
displayName: 'List Campaigns',
|
|
13
|
-
description: 'Fetch a paginated list of campaigns from Elastic Email.',
|
|
14
|
-
auth: auth_1.elasticEmailAuth,
|
|
15
|
-
props: {
|
|
16
|
-
search: pieces_framework_1.Property.ShortText({
|
|
17
|
-
displayName: 'Search',
|
|
18
|
-
description: 'Filter campaigns by name.',
|
|
19
|
-
required: false,
|
|
20
|
-
}),
|
|
21
|
-
limit: pieces_framework_1.Property.Number({
|
|
22
|
-
displayName: 'Limit',
|
|
23
|
-
description: 'Maximum number of campaigns to return (max 100).',
|
|
24
|
-
required: false,
|
|
25
|
-
defaultValue: constants_1.DEFAULT_LIMIT,
|
|
26
|
-
}),
|
|
27
|
-
offset: pieces_framework_1.Property.Number({
|
|
28
|
-
displayName: 'Offset',
|
|
29
|
-
description: 'Number of campaigns to skip.',
|
|
30
|
-
required: false,
|
|
31
|
-
defaultValue: 0,
|
|
32
|
-
}),
|
|
33
|
-
},
|
|
34
|
-
run(_a) {
|
|
35
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
36
|
-
const queryParams = {};
|
|
37
|
-
if (propsValue.search) {
|
|
38
|
-
queryParams['search'] = propsValue.search;
|
|
39
|
-
}
|
|
40
|
-
if (propsValue.limit !== undefined) {
|
|
41
|
-
queryParams['limit'] = String(propsValue.limit);
|
|
42
|
-
}
|
|
43
|
-
if (propsValue.offset !== undefined) {
|
|
44
|
-
queryParams['offset'] = String(propsValue.offset);
|
|
45
|
-
}
|
|
46
|
-
return (0, client_1.elasticEmailRequest)({
|
|
47
|
-
apiKey: auth.secret_text,
|
|
48
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
49
|
-
path: '/campaigns',
|
|
50
|
-
queryParams,
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=list-campaigns.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-campaigns.js","sourceRoot":"","sources":["../../../../src/lib/actions/list-campaigns.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AACvD,mDAAoD;AAEvC,QAAA,mBAAmB,GAAG,IAAA,+BAAY,EAAC;IAC9C,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,yDAAyD;IACtE,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,kDAAkD;YAC/D,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,yBAAa;SAC5B,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACtB,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,CAAC;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,WAAW,GAA2B,EAAE,CAAC;YAC/C,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;gBACtB,WAAW,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;YAC5C,CAAC;YACD,IAAI,UAAU,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBACnC,WAAW,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YAClD,CAAC;YACD,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBACpC,WAAW,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACpD,CAAC;YACD,OAAO,IAAA,4BAAmB,EAAC;gBACzB,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,YAAY;gBAClB,WAAW;aACZ,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const listContactsAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
3
|
-
offset: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
4
|
-
}>;
|
|
5
|
-
//# sourceMappingURL=list-contacts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/list-contacts.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB;;;EAkC7B,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.listContactsAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const constants_1 = require("../common/constants");
|
|
10
|
-
exports.listContactsAction = (0, pieces_framework_1.createAction)({
|
|
11
|
-
name: 'list_contacts',
|
|
12
|
-
displayName: 'List Contacts',
|
|
13
|
-
description: 'Fetch a paginated list of contacts from Elastic Email.',
|
|
14
|
-
auth: auth_1.elasticEmailAuth,
|
|
15
|
-
props: {
|
|
16
|
-
limit: pieces_framework_1.Property.Number({
|
|
17
|
-
displayName: 'Limit',
|
|
18
|
-
description: 'Maximum number of contacts to return (max 100).',
|
|
19
|
-
required: false,
|
|
20
|
-
defaultValue: constants_1.DEFAULT_LIMIT,
|
|
21
|
-
}),
|
|
22
|
-
offset: pieces_framework_1.Property.Number({
|
|
23
|
-
displayName: 'Offset',
|
|
24
|
-
description: 'Number of contacts to skip.',
|
|
25
|
-
required: false,
|
|
26
|
-
defaultValue: 0,
|
|
27
|
-
}),
|
|
28
|
-
},
|
|
29
|
-
run(_a) {
|
|
30
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
31
|
-
const queryParams = {};
|
|
32
|
-
if (propsValue.limit !== undefined) {
|
|
33
|
-
queryParams['limit'] = String(propsValue.limit);
|
|
34
|
-
}
|
|
35
|
-
if (propsValue.offset !== undefined) {
|
|
36
|
-
queryParams['offset'] = String(propsValue.offset);
|
|
37
|
-
}
|
|
38
|
-
return (0, client_1.elasticEmailRequest)({
|
|
39
|
-
apiKey: auth.secret_text,
|
|
40
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
41
|
-
path: '/contacts',
|
|
42
|
-
queryParams,
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=list-contacts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-contacts.js","sourceRo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declare const sendEmailAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
recipients: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
3
|
-
from: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
4
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
bodyContentType: import("@activepieces/pieces-framework").StaticDropdownProperty<"HTML" | "PlainText" | "AMP" | "CSS", false>;
|
|
6
|
-
bodyContent: import("@activepieces/pieces-framework").LongTextProperty<false>;
|
|
7
|
-
replyTo: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
templateName: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
9
|
-
merge: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
10
|
-
timeOffset: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
|
-
poolName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
12
|
-
channelName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
13
|
-
encoding: import("@activepieces/pieces-framework").StaticDropdownProperty<"UserProvided" | "None" | "Raw7bit" | "Raw8bit" | "QuotedPrintable" | "Base64" | "Uue", false>;
|
|
14
|
-
trackOpens: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
15
|
-
trackClicks: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
16
|
-
}>;
|
|
17
|
-
//# 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":"AAWA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAwH1B,CAAC"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendEmailAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
const constants_1 = require("../common/constants");
|
|
10
|
-
const props_1 = require("../common/props");
|
|
11
|
-
exports.sendEmailAction = (0, pieces_framework_1.createAction)({
|
|
12
|
-
name: 'send_email',
|
|
13
|
-
displayName: 'Send Email',
|
|
14
|
-
description: 'Send an email to one or more recipients via Elastic Email.',
|
|
15
|
-
auth: auth_1.elasticEmailAuth,
|
|
16
|
-
props: {
|
|
17
|
-
recipients: pieces_framework_1.Property.Array({
|
|
18
|
-
displayName: 'Recipients',
|
|
19
|
-
description: 'List of recipient email addresses.',
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
from: pieces_framework_1.Property.ShortText({
|
|
23
|
-
displayName: 'From',
|
|
24
|
-
description: 'Sender email with optional name (e.g. `email@domain.com` or `John Doe <email@domain.com>`).',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
subject: pieces_framework_1.Property.ShortText({
|
|
28
|
-
displayName: 'Subject',
|
|
29
|
-
description: 'Email subject line.',
|
|
30
|
-
required: false,
|
|
31
|
-
}),
|
|
32
|
-
bodyContentType: pieces_framework_1.Property.StaticDropdown({
|
|
33
|
-
displayName: 'Body Content Type',
|
|
34
|
-
description: 'Type of body content.',
|
|
35
|
-
required: false,
|
|
36
|
-
options: {
|
|
37
|
-
options: constants_1.BODY_CONTENT_TYPE_OPTIONS.map((s) => ({ label: s, value: s })),
|
|
38
|
-
},
|
|
39
|
-
}),
|
|
40
|
-
bodyContent: pieces_framework_1.Property.LongText({
|
|
41
|
-
displayName: 'Body Content',
|
|
42
|
-
description: 'The actual body content of the email.',
|
|
43
|
-
required: false,
|
|
44
|
-
}),
|
|
45
|
-
replyTo: pieces_framework_1.Property.ShortText({
|
|
46
|
-
displayName: 'Reply To',
|
|
47
|
-
description: 'Reply-to email address.',
|
|
48
|
-
required: false,
|
|
49
|
-
}),
|
|
50
|
-
templateName: props_1.templateNameProp,
|
|
51
|
-
merge: pieces_framework_1.Property.Object({
|
|
52
|
-
displayName: 'Merge Fields',
|
|
53
|
-
description: 'Key-value merge fields shared between recipients. Use in email body like {firstname}, {lastname}.',
|
|
54
|
-
required: false,
|
|
55
|
-
}),
|
|
56
|
-
timeOffset: pieces_framework_1.Property.Number({
|
|
57
|
-
displayName: 'Time Offset (minutes)',
|
|
58
|
-
description: 'Delay sending by this many minutes. Maximum is 35 days (50400 minutes).',
|
|
59
|
-
required: false,
|
|
60
|
-
}),
|
|
61
|
-
poolName: pieces_framework_1.Property.ShortText({
|
|
62
|
-
displayName: 'Pool Name',
|
|
63
|
-
description: 'Name of custom IP pool for sending.',
|
|
64
|
-
required: false,
|
|
65
|
-
}),
|
|
66
|
-
channelName: pieces_framework_1.Property.ShortText({
|
|
67
|
-
displayName: 'Channel Name',
|
|
68
|
-
description: 'Name of the sending channel.',
|
|
69
|
-
required: false,
|
|
70
|
-
}),
|
|
71
|
-
encoding: pieces_framework_1.Property.StaticDropdown({
|
|
72
|
-
displayName: 'Encoding',
|
|
73
|
-
description: 'Encoding type for email headers.',
|
|
74
|
-
required: false,
|
|
75
|
-
options: {
|
|
76
|
-
options: constants_1.ENCODING_OPTIONS.map((s) => ({ label: s, value: s })),
|
|
77
|
-
},
|
|
78
|
-
}),
|
|
79
|
-
trackOpens: pieces_framework_1.Property.Checkbox({
|
|
80
|
-
displayName: 'Track Opens',
|
|
81
|
-
description: 'Track email opens. If not set, uses account default.',
|
|
82
|
-
required: false,
|
|
83
|
-
}),
|
|
84
|
-
trackClicks: pieces_framework_1.Property.Checkbox({
|
|
85
|
-
displayName: 'Track Clicks',
|
|
86
|
-
description: 'Track link clicks. If not set, uses account default.',
|
|
87
|
-
required: false,
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
90
|
-
run(_a) {
|
|
91
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
92
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
93
|
-
const recipientEmails = ((_b = propsValue.recipients) !== null && _b !== void 0 ? _b : []).map(String);
|
|
94
|
-
return (0, client_1.elasticEmailRequest)({
|
|
95
|
-
apiKey: auth.secret_text,
|
|
96
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
97
|
-
path: '/emails',
|
|
98
|
-
body: {
|
|
99
|
-
Recipients: recipientEmails.map((email) => ({ Email: email })),
|
|
100
|
-
Content: {
|
|
101
|
-
From: propsValue.from,
|
|
102
|
-
Subject: (_c = propsValue.subject) !== null && _c !== void 0 ? _c : undefined,
|
|
103
|
-
Body: (propsValue.bodyContentType || propsValue.bodyContent)
|
|
104
|
-
? [
|
|
105
|
-
{
|
|
106
|
-
ContentType: propsValue.bodyContentType || 'HTML',
|
|
107
|
-
Body: propsValue.bodyContent,
|
|
108
|
-
},
|
|
109
|
-
]
|
|
110
|
-
: undefined,
|
|
111
|
-
ReplyTo: (_d = propsValue.replyTo) !== null && _d !== void 0 ? _d : undefined,
|
|
112
|
-
TemplateName: (_e = propsValue.templateName) !== null && _e !== void 0 ? _e : undefined,
|
|
113
|
-
Merge: (_f = propsValue.merge) !== null && _f !== void 0 ? _f : undefined,
|
|
114
|
-
},
|
|
115
|
-
Options: {
|
|
116
|
-
TimeOffset: (_g = propsValue.timeOffset) !== null && _g !== void 0 ? _g : undefined,
|
|
117
|
-
PoolName: (_h = propsValue.poolName) !== null && _h !== void 0 ? _h : undefined,
|
|
118
|
-
ChannelName: (_j = propsValue.channelName) !== null && _j !== void 0 ? _j : undefined,
|
|
119
|
-
Encoding: (_k = propsValue.encoding) !== null && _k !== void 0 ? _k : undefined,
|
|
120
|
-
TrackOpens: (_l = propsValue.trackOpens) !== null && _l !== void 0 ? _l : undefined,
|
|
121
|
-
TrackClicks: (_m = propsValue.trackClicks) !== null && _m !== void 0 ? _m : undefined,
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
});
|
|
128
|
-
//# 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,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AACvD,mDAG6B;AAC7B,2CAAmD;AAEtC,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,4DAA4D;IACzE,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,UAAU,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACzB,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,MAAM;YACnB,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,OAAO,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC1B,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,eAAe,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACvC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,uBAAuB;YACpC,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,qCAAyB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;aACxE;SACF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AC,QAAQ,mCAAI,SAAS;wBAC1C,WAAW,EAAE,MAAA,UAAU,CAAC,WAAW,mCAAI,SAAS;wBAChD,QAAQ,EAAE,MAAA,UAAU,CAAC,QAAQ,mCAAI,SAAS;wBAC1C,UAAU,EAAE,MAAA,UAAU,CAAC,UAAU,mCAAI,SAAS;wBAC9C,WAAW,EAAE,MAAA,UAAU,CAAC,WAAW,mCAAI,SAAS;qBACjD;iBACF;aACF,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const unsubscribeContactAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
emails: import("@activepieces/pieces-framework").ArrayProperty<true>;
|
|
3
|
-
}>;
|
|
4
|
-
//# sourceMappingURL=unsubscribe-contact.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unsubscribe-contact.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/unsubscribe-contact.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,wBAAwB;;EAuBnC,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unsubscribeContactAction = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
7
|
-
const auth_1 = require("../auth");
|
|
8
|
-
const client_1 = require("../common/client");
|
|
9
|
-
exports.unsubscribeContactAction = (0, pieces_framework_1.createAction)({
|
|
10
|
-
name: 'unsubscribe_contact',
|
|
11
|
-
displayName: 'Unsubscribe Contact',
|
|
12
|
-
description: 'Unsubscribe one or more email addresses from future emails in Elastic Email.',
|
|
13
|
-
auth: auth_1.elasticEmailAuth,
|
|
14
|
-
props: {
|
|
15
|
-
emails: pieces_framework_1.Property.Array({
|
|
16
|
-
displayName: 'Email Addresses',
|
|
17
|
-
description: 'List of email addresses to unsubscribe.',
|
|
18
|
-
required: true,
|
|
19
|
-
}),
|
|
20
|
-
},
|
|
21
|
-
run(_a) {
|
|
22
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
23
|
-
var _b;
|
|
24
|
-
const emails = ((_b = propsValue.emails) !== null && _b !== void 0 ? _b : []).map(String);
|
|
25
|
-
return (0, client_1.elasticEmailRequest)({
|
|
26
|
-
apiKey: auth.secret_text,
|
|
27
|
-
method: pieces_common_1.HttpMethod.POST,
|
|
28
|
-
path: '/suppressions/unsubscribes',
|
|
29
|
-
body: emails,
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
//# sourceMappingURL=unsubscribe-contact.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unsubscribe-contact.js","sourceRoot":"","sources":["../../../../src/lib/actions/unsubscribe-contact.ts"],"names":[],"mappings":";;;;AAAA,+DAAyD;AACzD,qEAAwE;AAExE,kCAA2C;AAC3C,6CAAuD;AAE1C,QAAA,wBAAwB,GAAG,IAAA,+BAAY,EAAC;IACnD,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,qBAAqB;IAClC,WAAW,EACT,8EAA8E;IAChF,IAAI,EAAE,uBAAgB;IACtB,KAAK,EAAE;QACL,MAAM,EAAE,2BAAQ,CAAC,KAAK,CAAC;YACrB,WAAW,EAAE,iBAAiB;YAC9B,WAAW,EACT,yCAAyC;YAC3C,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;;YAC5B,MAAM,MAAM,GAAG,CAAC,MAAA,UAAU,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACrD,OAAO,IAAA,4BAAmB,EAAC;gBACzB,MAAM,EAAE,IAAI,CAAC,WAAW;gBACxB,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,4BAA4B;gBAClC,IAAI,EAAE,MAAM;aACb,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const updateCampaignAction: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
campaign: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
3
|
-
name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
from: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
recipientListNames: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
6
|
-
recipientSegmentNames: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
7
|
-
replyTo: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
|
-
subject: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
-
templateName: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
10
|
-
status: import("@activepieces/pieces-framework").StaticDropdownProperty<"Active" | "Deleted" | "Processing" | "Sending" | "Completed" | "Paused" | "Cancelled" | "Draft", false>;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=update-campaign.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-campaign.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-campaign.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB;;;;;;;;;;EAyF/B,CAAC"}
|