@capillarytech/creatives-library 8.0.87-alpha.14 → 8.0.87-alpha.15
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
|
@@ -21,17 +21,19 @@ export const transformSmsPayload = (smsData, options = {}) => {
|
|
|
21
21
|
const { smsDeliverySettings } = transformedMessageDetails;
|
|
22
22
|
|
|
23
23
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
module,
|
|
28
|
-
smsMessageContent: {
|
|
24
|
+
centralCommsPayload: {
|
|
25
|
+
ouId: ouId || -1,
|
|
26
|
+
sourceEntityId: actionId,
|
|
29
27
|
channel: "SMS",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
module,
|
|
29
|
+
smsMessageContent: {
|
|
30
|
+
channel: "SMS",
|
|
31
|
+
message: smsData.messageBody || ""
|
|
32
|
+
},
|
|
33
|
+
smsDeliverySettings: smsDeliverySettings || {},
|
|
34
|
+
executionParams: {},
|
|
35
|
+
clientName: clientName || "EMF"
|
|
36
|
+
}
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
39
|
|
|
@@ -58,18 +60,20 @@ export const transformEmailPayload = (emailData, options = {}) => {
|
|
|
58
60
|
const { emailDeliverySettings = {} } = transformedMessageDetails;
|
|
59
61
|
|
|
60
62
|
return {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
module,
|
|
65
|
-
emailMessageContent: {
|
|
63
|
+
centralCommsPayload: {
|
|
64
|
+
ouId: ouId || -1,
|
|
65
|
+
sourceEntityId: actionId,
|
|
66
66
|
channel: "EMAIL",
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
module,
|
|
68
|
+
emailMessageContent: {
|
|
69
|
+
channel: "EMAIL",
|
|
70
|
+
messageBody: emailData.emailBody || "",
|
|
71
|
+
messageSubject: emailData.emailSubject || ""
|
|
72
|
+
},
|
|
73
|
+
emailDeliverySettings: emailDeliverySettings || {},
|
|
74
|
+
executionParams: {},
|
|
75
|
+
clientName: clientName || "EMF"
|
|
76
|
+
}
|
|
73
77
|
};
|
|
74
78
|
};
|
|
75
79
|
|
|
@@ -107,66 +111,68 @@ export const transformMpushPayload = (mpushData, options = {}) => {
|
|
|
107
111
|
};
|
|
108
112
|
|
|
109
113
|
return {
|
|
110
|
-
|
|
111
|
-
ouId: ouId || -1,
|
|
112
|
-
sourceEntityId: actionId,
|
|
113
|
-
clientName: clientName || "VENENO",
|
|
114
|
-
module,
|
|
115
|
-
mpushMessageContent: {
|
|
114
|
+
centralCommsPayload: {
|
|
116
115
|
channel: "PUSH",
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
ouId: ouId || -1,
|
|
117
|
+
sourceEntityId: actionId,
|
|
118
|
+
clientName: clientName || "VENENO",
|
|
119
|
+
module,
|
|
120
|
+
mpushMessageContent: {
|
|
121
|
+
channel: "PUSH",
|
|
122
|
+
messageSubject: mpushData.messageSubject || "",
|
|
123
|
+
androidContent: {
|
|
124
|
+
type: androidContent.type || "TEXT",
|
|
125
|
+
deviceType: "ANDROID",
|
|
126
|
+
title: androidContent.title || "",
|
|
127
|
+
message: androidContent.message || "",
|
|
128
|
+
cta: {
|
|
129
|
+
type: "EXTERNAL_URL",
|
|
130
|
+
actionText: null,
|
|
131
|
+
templateCtaId: null,
|
|
132
|
+
actionLink: androidContent.cta?.actionLink || ""
|
|
133
|
+
},
|
|
134
|
+
expandableDetails: {
|
|
135
|
+
style: androidContent.expandableDetails?.style || "BIG_TEXT",
|
|
136
|
+
message: androidContent.expandableDetails?.message || "",
|
|
137
|
+
ctas: androidContent.expandableDetails?.ctas || [],
|
|
138
|
+
image: androidContent.expandableDetails?.image || "",
|
|
139
|
+
categoryId: androidContent.expandableDetails?.categoryId || ""
|
|
140
|
+
},
|
|
141
|
+
customProperties: androidContent.custom || {}
|
|
128
142
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
143
|
+
iosContent: {
|
|
144
|
+
type: iosContent.type || "TEXT",
|
|
145
|
+
deviceType: "IOS",
|
|
146
|
+
title: iosContent.title || "",
|
|
147
|
+
message: iosContent.message || "",
|
|
148
|
+
cta: {
|
|
149
|
+
type: "EXTERNAL_URL",
|
|
150
|
+
actionText: null,
|
|
151
|
+
templateCtaId: null,
|
|
152
|
+
actionLink: iosContent.cta?.actionLink || ""
|
|
153
|
+
},
|
|
154
|
+
expandableDetails: {
|
|
155
|
+
style: iosContent.expandableDetails?.style || "BIG_TEXT",
|
|
156
|
+
message: iosContent.expandableDetails?.message || "",
|
|
157
|
+
ctas: iosContent.expandableDetails?.ctas || [],
|
|
158
|
+
image: iosContent.expandableDetails?.image || "",
|
|
159
|
+
categoryId: iosContent.expandableDetails?.categoryId || ""
|
|
160
|
+
},
|
|
161
|
+
customProperties: iosContent.custom || {}
|
|
135
162
|
},
|
|
136
|
-
|
|
163
|
+
accountId: mpushData.accountId || 0
|
|
137
164
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
type: "EXTERNAL_URL",
|
|
145
|
-
actionText: null,
|
|
146
|
-
templateCtaId: null,
|
|
147
|
-
actionLink: iosContent.cta?.actionLink || ""
|
|
148
|
-
},
|
|
149
|
-
expandableDetails: {
|
|
150
|
-
style: iosContent.expandableDetails?.style || "BIG_TEXT",
|
|
151
|
-
message: iosContent.expandableDetails?.message || "",
|
|
152
|
-
ctas: iosContent.expandableDetails?.ctas || [],
|
|
153
|
-
image: iosContent.expandableDetails?.image || "",
|
|
154
|
-
categoryId: iosContent.expandableDetails?.categoryId || ""
|
|
165
|
+
mpushDeliverySettings: mobilePushDeliverySettings || {
|
|
166
|
+
additionalSettings: {
|
|
167
|
+
useTinyUrl: false,
|
|
168
|
+
encryptUrl: false,
|
|
169
|
+
linkTrackingEnabled: false,
|
|
170
|
+
userSubscriptionDisabled: false
|
|
155
171
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
mpushDeliverySettings: mobilePushDeliverySettings || {
|
|
161
|
-
additionalSettings: {
|
|
162
|
-
useTinyUrl: false,
|
|
163
|
-
encryptUrl: false,
|
|
164
|
-
linkTrackingEnabled: false,
|
|
165
|
-
userSubscriptionDisabled: false
|
|
166
|
-
},
|
|
167
|
-
channelSettings: {
|
|
168
|
-
channel: "PUSH",
|
|
169
|
-
domainGatewayMapId: options.domainGatewayMapId || 1
|
|
172
|
+
channelSettings: {
|
|
173
|
+
channel: "PUSH",
|
|
174
|
+
domainGatewayMapId: options.domainGatewayMapId || 1
|
|
175
|
+
}
|
|
170
176
|
}
|
|
171
177
|
}
|
|
172
178
|
};
|
|
@@ -198,30 +204,32 @@ export const transformWhatsappPayload = (whatsappData, options = {}) => {
|
|
|
198
204
|
const templateConfigs = whatsappData.templateConfigs || {};
|
|
199
205
|
|
|
200
206
|
return {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
whatsappDeliverySettings: whatsappDeliverySettings || {
|
|
212
|
-
additionalSettings: {
|
|
213
|
-
encryptUrl: false,
|
|
214
|
-
linkTrackingEnabled: false,
|
|
215
|
-
useTinyUrl: false
|
|
207
|
+
centralCommsPayload: {
|
|
208
|
+
ouId: ouId || -1,
|
|
209
|
+
sourceEntityId: actionId,
|
|
210
|
+
channel: "WHATSAPP",
|
|
211
|
+
module,
|
|
212
|
+
whatsappMessageContent: {
|
|
213
|
+
messageBody: whatsappData.messageBody || "",
|
|
214
|
+
accountId: whatsappData.accountId || 0,
|
|
215
|
+
templateConfigs,
|
|
216
|
+
channel: "WHATSAPP"
|
|
216
217
|
},
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
218
|
+
whatsappDeliverySettings: whatsappDeliverySettings || {
|
|
219
|
+
additionalSettings: {
|
|
220
|
+
encryptUrl: false,
|
|
221
|
+
linkTrackingEnabled: false,
|
|
222
|
+
useTinyUrl: false
|
|
223
|
+
},
|
|
224
|
+
channelSettings: {
|
|
225
|
+
channel: "WHATSAPP",
|
|
226
|
+
senderMobNum: whatsappData.senderMobNum || "",
|
|
227
|
+
domainId: whatsappData.domainId || 0
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
executionParams: {},
|
|
231
|
+
clientName: clientName || "VENENO"
|
|
232
|
+
}
|
|
225
233
|
};
|
|
226
234
|
};
|
|
227
235
|
|
|
@@ -17,6 +17,7 @@ export const FTP = "FTP";
|
|
|
17
17
|
export const NO_COMMUNICATION = "NO_COMMUNICATION";
|
|
18
18
|
export const VIBER = "VIBER";
|
|
19
19
|
export const WHATSAPP = "WHATSAPP";
|
|
20
|
+
export const SMALL_CASE_WHATSAPP = "whatsapp";
|
|
20
21
|
export const RCS = "RCS";
|
|
21
22
|
export const ZALO = "ZALO";
|
|
22
23
|
export const INAPP = "INAPP";
|