@activepieces/piece-sendinblue 0.0.3 → 0.1.0
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 -8
- package/src/index.d.ts +2 -1
- package/src/index.js +8 -1
- 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 -4
- 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,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-sendinblue",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@sinclair/typebox": "0.26.
|
|
5
|
+
"@sinclair/typebox": "^0.26.3",
|
|
6
6
|
"axios": "1.2.4",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"@activepieces/pieces-framework": "0.
|
|
10
|
-
"@activepieces/shared": "0.
|
|
11
|
-
"
|
|
12
|
-
"tslib": "2.5.3"
|
|
7
|
+
"nanoid": "^3.3.4",
|
|
8
|
+
"@activepieces/pieces-common": "0.1.0",
|
|
9
|
+
"@activepieces/pieces-framework": "0.4.0",
|
|
10
|
+
"@activepieces/shared": "0.4.0",
|
|
11
|
+
"tslib": "1.14.1"
|
|
13
12
|
},
|
|
14
13
|
"main": "./src/index.js",
|
|
15
14
|
"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,19 @@
|
|
|
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
12
|
displayName: "Sendinblue",
|
|
13
|
+
minimumSupportedRelease: '0.5.0',
|
|
8
14
|
logoUrl: "https://cdn.activepieces.com/pieces/sendinblue.png",
|
|
9
15
|
authors: ['kanarelo'],
|
|
16
|
+
auth: exports.sendinblueAuth,
|
|
10
17
|
actions: [create_or_update_contact_1.createOrUpdateContact],
|
|
11
18
|
triggers: [],
|
|
12
19
|
});
|
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,YAAY;IACrB,uBAAuB,EAAE,OAAO;IAClC,OAAO,EAAE,oDAAoD;IAC/D,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,8 +4,9 @@ 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',
|
|
@@ -32,7 +33,6 @@ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
|
32
33
|
]
|
|
33
34
|
},
|
|
34
35
|
props: {
|
|
35
|
-
api_key: props_1.sendInBluePropsContactsProps.api_key,
|
|
36
36
|
email: pieces_framework_1.Property.ShortText({
|
|
37
37
|
displayName: "Email",
|
|
38
38
|
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 +107,7 @@ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
|
107
107
|
url: `https://api.sendinblue.com/v3/contacts`,
|
|
108
108
|
body,
|
|
109
109
|
headers: {
|
|
110
|
-
'api-key': context.
|
|
110
|
+
'api-key': context.auth
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
console.debug("Contact update response", updateResponse);
|
|
@@ -115,7 +115,7 @@ exports.createOrUpdateContact = (0, pieces_framework_1.createAction)({
|
|
|
115
115
|
method: pieces_common_1.HttpMethod.GET,
|
|
116
116
|
url: `https://api.sendinblue.com/v3/contacts/${encodeURI(identifier)}`,
|
|
117
117
|
headers: {
|
|
118
|
-
'api-key': context.
|
|
118
|
+
'api-key': context.auth
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
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,UAAU,EAAE;QACV,IAAI,EACF,EAAE;QACJ,OAAO,EAAE,wBAAwB;QACjC,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AC,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"}
|