@activepieces/piece-sendinblue 0.0.3 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -9
- package/src/index.d.ts +2 -1
- package/src/index.js +11 -3
- package/src/index.js.map +1 -1
- package/src/lib/actions/create-or-update-contact.d.ts +9 -1
- package/src/lib/actions/create-or-update-contact.js +4 -26
- package/src/lib/actions/create-or-update-contact.js.map +1 -1
- package/src/lib/common/props.d.ts +0 -3
- package/src/lib/common/props.js +0 -12
- package/src/lib/common/props.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-sendinblue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@sinclair/typebox": "0.26.
|
|
6
|
-
"axios": "1.
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"@activepieces/pieces-common": "0.
|
|
12
|
-
"
|
|
5
|
+
"@sinclair/typebox": "^0.26.3",
|
|
6
|
+
"axios": "1.4.0",
|
|
7
|
+
"dayjs": "^1.11.8",
|
|
8
|
+
"is-base64": "^1.1.0",
|
|
9
|
+
"nanoid": "^3.3.4",
|
|
10
|
+
"semver": "7.5.4",
|
|
11
|
+
"@activepieces/pieces-common": "0.2.2",
|
|
12
|
+
"@activepieces/pieces-framework": "0.6.15",
|
|
13
|
+
"@activepieces/shared": "0.7.4",
|
|
14
|
+
"tslib": "2.6.1"
|
|
13
15
|
},
|
|
14
16
|
"main": "./src/index.js",
|
|
15
17
|
"types": "./src/index.d.ts"
|
package/src/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const sendinblueAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
2
|
+
export declare const sendinblue: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
package/src/index.js
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendinblue = void 0;
|
|
3
|
+
exports.sendinblue = exports.sendinblueAuth = void 0;
|
|
4
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
5
|
const create_or_update_contact_1 = require("./lib/actions/create-or-update-contact");
|
|
6
|
+
exports.sendinblueAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
7
|
+
displayName: "Project API key",
|
|
8
|
+
description: "Your project API key",
|
|
9
|
+
required: true
|
|
10
|
+
});
|
|
6
11
|
exports.sendinblue = (0, pieces_framework_1.createPiece)({
|
|
7
|
-
displayName: "
|
|
8
|
-
|
|
12
|
+
displayName: "Brevo",
|
|
13
|
+
description: "sendinblue",
|
|
14
|
+
minimumSupportedRelease: '0.5.0',
|
|
15
|
+
logoUrl: "https://cdn.activepieces.com/pieces/brevo.png",
|
|
9
16
|
authors: ['kanarelo'],
|
|
17
|
+
auth: exports.sendinblueAuth,
|
|
10
18
|
actions: [create_or_update_contact_1.createOrUpdateContact],
|
|
11
19
|
triggers: [],
|
|
12
20
|
});
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/sendinblue/src/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/pieces/sendinblue/src/index.ts"],"names":[],"mappings":";;;AACA,qEAAwE;AACxE,qFAA+E;AAElE,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,IAAI;CACf,CAAC,CAAA;AAEW,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,OAAO;IACpB,WAAW,EAAC,YAAY;IACpB,uBAAuB,EAAE,OAAO;IAClC,OAAO,EAAE,+CAA+C;IAC1D,OAAO,EAAE,CAAC,UAAU,CAAC;IACrB,IAAI,EAAE,sBAAc;IACpB,OAAO,EAAE,CAAC,gDAAqB,CAAC;IAChC,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
export declare const createOrUpdateContact: import("@activepieces/pieces-framework").
|
|
1
|
+
export declare const createOrUpdateContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
ext_id: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
+
attributes: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
5
|
+
email_blacklisted: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
6
|
+
sms_blacklisted: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
+
list_ids: import("@activepieces/pieces-framework").ArrayProperty<false>;
|
|
8
|
+
smtp_blacklist_sender: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
9
|
+
}>;
|
|
@@ -4,35 +4,13 @@ exports.createOrUpdateContact = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const
|
|
7
|
+
const __1 = require("../..");
|
|
8
8
|
exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
9
|
+
auth: __1.sendinblueAuth,
|
|
9
10
|
name: 'create_or_update_contact',
|
|
10
11
|
displayName: 'Create or Update Contact',
|
|
11
12
|
description: 'Create or update an existing contact',
|
|
12
|
-
sampleData: {
|
|
13
|
-
"id": 42,
|
|
14
|
-
"email": "peggy.rain@example.com",
|
|
15
|
-
"emailBlacklisted": false,
|
|
16
|
-
"smsBlacklisted": false,
|
|
17
|
-
"createdAt": "2017-05-02T16:40:31Z",
|
|
18
|
-
"modifiedAt": "2017-05-02T16:40:31Z",
|
|
19
|
-
"attributes": {
|
|
20
|
-
"FIRST_NAME": "Peggy",
|
|
21
|
-
"LAST_NAME": "Rain",
|
|
22
|
-
"SMS": "3087433387669",
|
|
23
|
-
"CIV": "1",
|
|
24
|
-
"DOB": "1986-04-13",
|
|
25
|
-
"ADDRESS": "987 5th avenue",
|
|
26
|
-
"ZIP_CODE": "87544",
|
|
27
|
-
"CITY": "New-York",
|
|
28
|
-
"AREA": "NY"
|
|
29
|
-
},
|
|
30
|
-
"listIds": [
|
|
31
|
-
40
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
13
|
props: {
|
|
35
|
-
api_key: props_1.sendInBluePropsContactsProps.api_key,
|
|
36
14
|
email: pieces_framework_1.Property.ShortText({
|
|
37
15
|
displayName: "Email",
|
|
38
16
|
description: `Email address of the user. Mandatory if "SMS" field is not passed in "attributes" parameter. Mobile Number in SMS field should be passed with proper country code. For example: {"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}`,
|
|
@@ -107,7 +85,7 @@ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
|
107
85
|
url: `https://api.sendinblue.com/v3/contacts`,
|
|
108
86
|
body,
|
|
109
87
|
headers: {
|
|
110
|
-
'api-key': context.
|
|
88
|
+
'api-key': context.auth
|
|
111
89
|
}
|
|
112
90
|
});
|
|
113
91
|
console.debug("Contact update response", updateResponse);
|
|
@@ -115,7 +93,7 @@ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
|
115
93
|
method: pieces_common_1.HttpMethod.GET,
|
|
116
94
|
url: `https://api.sendinblue.com/v3/contacts/${encodeURI(identifier)}`,
|
|
117
95
|
headers: {
|
|
118
|
-
'api-key': context.
|
|
96
|
+
'api-key': context.auth
|
|
119
97
|
}
|
|
120
98
|
});
|
|
121
99
|
return contactREsponse.body;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-or-update-contact.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/sendinblue/src/lib/actions/create-or-update-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"create-or-update-contact.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/sendinblue/src/lib/actions/create-or-update-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,6BAAuC;AAE1B,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,kBAAc;IAClB,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,sCAAsC;IACnD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,qOAAqO;YAClP,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACzB,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE;wCACmB;YAChC,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE;gBACZ,YAAY,EAAE,EAAE;gBAChB,WAAW,EAAE,EAAE;gBACf,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,EAAE;gBACT,KAAK,EAAE,EAAE;gBACT,SAAS,EAAE,EAAE;gBACb,UAAU,EAAE,EAAE;gBACd,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,EAAE;aACX;SACF,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CA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M,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAC/D,CAAA;YAED,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,UAAU,CAAC,CAAC;YACpD,MAAM,cAAc,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAClD,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,GAAG,EAAE,wCAAwC;gBAC7C,IAAI;gBACJ,OAAO,EAAE;oBACP,SAAS,EAAE,OAAO,CAAC,IAAI;iBACxB;aACF,CAAC,CAAA;YACF,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,cAAc,CAAC,CAAC;YAEzD,MAAM,eAAe,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBACnD,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,0CAA0C,SAAS,CAAC,UAAU,CAAC,EAAE;gBACtE,OAAO,EAAE;oBACP,SAAS,EAAE,OAAO,CAAC,IAAI;iBACxB;aACF,CAAC,CAAA;YACF,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B,CAAC;KAAA;CACJ,CAAC,CAAC"}
|
package/src/lib/common/props.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendInBluePropsContactsProps = void 0;
|
|
4
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
-
exports.sendInBluePropsContactsProps = {
|
|
6
|
-
api_key: pieces_framework_1.Property.SecretText({
|
|
7
|
-
displayName: "Project API key",
|
|
8
|
-
description: "Your project API key",
|
|
9
|
-
required: true
|
|
10
|
-
})
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../../../../../packages/pieces/sendinblue/src/lib/common/props.ts"],"names":[],"mappings":";;;AAAA,qEAA0D;AAE7C,QAAA,4BAA4B,GAAG;IAC1C,OAAO,EAAE,2BAAQ,CAAC,UAAU,CAAC;QAC3B,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,sBAAsB;QACnC,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA"}
|