@activepieces/piece-customer-io 0.1.0 → 0.2.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
CHANGED
|
@@ -1,20 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-customer-io",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@anthropic-ai/sdk": "0.
|
|
6
|
-
"@sinclair/typebox": "0.
|
|
7
|
-
"axios": "1.7.
|
|
8
|
-
"
|
|
9
|
-
"deepmerge": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
5
|
+
"@anthropic-ai/sdk": "0.33.1",
|
|
6
|
+
"@sinclair/typebox": "0.34.11",
|
|
7
|
+
"axios": "1.7.8",
|
|
8
|
+
"axios-retry": "4.4.1",
|
|
9
|
+
"deepmerge-ts": "7.1.0",
|
|
10
|
+
"mime-types": "2.1.35",
|
|
11
|
+
"nanoid": "3.3.8",
|
|
12
|
+
"openai": "4.67.1",
|
|
13
|
+
"replicate": "0.34.1",
|
|
12
14
|
"semver": "7.6.0",
|
|
13
|
-
"
|
|
14
|
-
"@activepieces/pieces-
|
|
15
|
-
"@activepieces/
|
|
16
|
-
"
|
|
15
|
+
"zod": "3.23.8",
|
|
16
|
+
"@activepieces/pieces-common": "0.3.3",
|
|
17
|
+
"@activepieces/pieces-framework": "0.7.42",
|
|
18
|
+
"@activepieces/shared": "0.10.143",
|
|
19
|
+
"tslib": "1.14.1"
|
|
20
|
+
},
|
|
21
|
+
"overrides": {
|
|
22
|
+
"cross-spawn": "7.0.6",
|
|
23
|
+
"@tryfabric/martian": {
|
|
24
|
+
"@notionhq/client": "$@notionhq/client"
|
|
25
|
+
},
|
|
26
|
+
"vite": {
|
|
27
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"resolutions": {
|
|
31
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
17
32
|
},
|
|
18
33
|
"main": "./src/index.js",
|
|
19
|
-
"type": "commonjs"
|
|
34
|
+
"type": "commonjs",
|
|
35
|
+
"types": "./src/index.d.ts"
|
|
20
36
|
}
|
package/src/index.js
CHANGED
|
@@ -59,7 +59,7 @@ exports.customerIo = (0, pieces_framework_1.createPiece)({
|
|
|
59
59
|
auth: exports.customerIOAuth,
|
|
60
60
|
description: 'Create personalized journeys across all channels with our customer engagement platform.',
|
|
61
61
|
categories: [shared_1.PieceCategory.MARKETING],
|
|
62
|
-
minimumSupportedRelease: '0.
|
|
62
|
+
minimumSupportedRelease: '0.30.0',
|
|
63
63
|
logoUrl: 'https://cdn.activepieces.com/pieces/customerio.png',
|
|
64
64
|
authors: ['hamedsh', 'AbuAboud', 'AdamSelene'],
|
|
65
65
|
actions: [
|
|
@@ -4,7 +4,7 @@ export declare const createEvent: import("@activepieces/pieces-framework").IActi
|
|
|
4
4
|
track_api_key: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
5
|
api_bearer_token: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
6
|
}>, {
|
|
7
|
-
|
|
7
|
+
customer_identifier: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
8
|
event_name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
9
9
|
body_type: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
10
10
|
body: import("@activepieces/pieces-framework").DynamicProperties<false>;
|
|
@@ -12,14 +12,14 @@ exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
|
12
12
|
displayName: 'Create Event',
|
|
13
13
|
description: 'Create an event in Customer.io',
|
|
14
14
|
props: {
|
|
15
|
-
|
|
16
|
-
displayName: 'Customer
|
|
17
|
-
description: '
|
|
15
|
+
customer_identifier: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Customer identifier',
|
|
17
|
+
description: 'The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings',
|
|
18
18
|
required: true,
|
|
19
19
|
}),
|
|
20
20
|
event_name: pieces_framework_1.Property.ShortText({
|
|
21
21
|
displayName: 'Event Name',
|
|
22
|
-
description: '
|
|
22
|
+
description: 'The name of the event. This is how you\'ll reference the event in campaigns or segments',
|
|
23
23
|
required: true,
|
|
24
24
|
}),
|
|
25
25
|
body_type: pieces_framework_1.Property.StaticDropdown({
|
|
@@ -76,7 +76,7 @@ exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
|
76
76
|
Authorization: `Basic ${basic_track_api}`,
|
|
77
77
|
'Content-Type': 'application/json',
|
|
78
78
|
};
|
|
79
|
-
const encoded_email = encodeURIComponent(context.propsValue.
|
|
79
|
+
const encoded_email = encodeURIComponent(context.propsValue.customer_identifier);
|
|
80
80
|
const url = common_1.customerIOCommon[context.auth.region || 'us'].trackUrl + 'customers/' + encoded_email + '/events';
|
|
81
81
|
const httprequestdata = {
|
|
82
82
|
method: pieces_common_1.HttpMethod.POST,
|
|
@@ -84,7 +84,6 @@ exports.createEvent = (0, pieces_framework_1.createAction)({
|
|
|
84
84
|
headers,
|
|
85
85
|
body: {
|
|
86
86
|
name: context.propsValue.event_name,
|
|
87
|
-
id: context.propsValue.customer_email,
|
|
88
87
|
data: body ? body['data'] : {},
|
|
89
88
|
},
|
|
90
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_event.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/customer-io/src/lib/actions/create_event.ts"],"names":[],"mappings":";;;;AAAA,qEAA2F;AAC3F,uCAA6C;AAC7C,sCAA6C;AAC7C,+DAAqE;AAExD,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,sBAAc;IACpB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,gCAAgC;IAC7C,KAAK,EAAE;QACL,
|
|
1
|
+
{"version":3,"file":"create_event.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/customer-io/src/lib/actions/create_event.ts"],"names":[],"mappings":";;;;AAAA,qEAA2F;AAC3F,uCAA6C;AAC7C,sCAA6C;AAC7C,+DAAqE;AAExD,QAAA,WAAW,GAAG,IAAA,+BAAY,EAAC;IACtC,IAAI,EAAE,sBAAc;IACpB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,gCAAgC;IAC7C,KAAK,EAAE;QACL,mBAAmB,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACtC,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,oKAAoK;YACjL,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,yFAAyF;YACtG,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,cAAc,CAAC;YACjC,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,6CAA6C;YAC1D,YAAY,EAAE,WAAW;YACzB,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,WAAW;wBAClB,KAAK,EAAE,WAAW;qBACnB;oBACD;wBACE,KAAK,EAAE,MAAM;wBACb,KAAK,EAAE,MAAM;qBACd;iBACF;aACF;SACF,CAAC;QACF,IAAI,EAAE,2BAAQ,CAAC,iBAAiB,CAAC;YAC/B,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,CAAC,WAAW,CAAC;YACzB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,KAAsB,EAAE,oDAAjB,EAAE,SAAS,EAAE;gBACzB,IAAI,CAAC,SAAS;oBAAE,OAAO,EAAE,CAAC;gBAE1B,MAAM,aAAa,GAAG,SAA8B,CAAC;gBAErD,MAAM,MAAM,GAAsB,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