Skip to content

Commit 2971b57

Browse files
authored
Merge pull request #43 from sendinblue/feature_emailCampaign-updates
New params added in emailCampaigns
2 parents ea7fea1 + 8a73b51 commit 2971b57

11 files changed

+58
-13
lines changed

docs/CreateEmailCampaign.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Name | Type | Description | Notes
66
**tag** | **String** | Tag of the campaign | [optional]
77
**sender** | [**CreateEmailCampaignSender**](CreateEmailCampaignSender.md) | |
88
**name** | **String** | Name of the campaign |
9-
**htmlContent** | **String** | Mandatory if htmlUrl is empty. Body of the message (HTML) | [optional]
10-
**htmlUrl** | **String** | Mandatory if htmlContent is empty. Url to the message (HTML) | [optional]
9+
**htmlContent** | **String** | Mandatory if htmlUrl and templateId are empty. Body of the message (HTML) | [optional]
10+
**htmlUrl** | **String** | Mandatory if htmlContent and templateId are empty. Url to the message (HTML) | [optional]
11+
**templateId** | **Number** | Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature. | [optional]
1112
**scheduledAt** | **Date** | Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
1213
**subject** | **String** | Subject of the campaign |
1314
**replyTo** | **String** | Email on which the campaign recipients will be able to reply to | [optional]
14-
**toField** | **String** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database | [optional]
15+
**toField** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
1516
**recipients** | [**CreateEmailCampaignRecipients**](CreateEmailCampaignRecipients.md) | | [optional]
1617
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1718
**inlineImageActivation** | **Boolean** | Use true to embedded the images in your email. Final size of the email should be less than 4MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false]
@@ -21,6 +22,7 @@ Name | Type | Description | Notes
2122
**footer** | **String** | Footer of the email campaign | [optional]
2223
**header** | **String** | Header of the email campaign | [optional]
2324
**utmCampaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
25+
**params** | **Object** | Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic' | [optional]
2426

2527

2628
<a name="TypeEnum"></a>

docs/CreateSmtpTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**htmlUrl** | **String** | Url which contents the body of the email message. REQUIRED if htmlContent is empty | [optional]
1111
**subject** | **String** | Subject of the template |
1212
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
13-
**toField** | **String** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
13+
**toField** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter &#39;params&#39; used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
1414
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1515
**isActive** | **Boolean** | Status of template. isActive &#x3D; true means template is active and isActive &#x3D; false means template is inactive | [optional]
1616

docs/UpdateEmailCampaign.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**scheduledAt** | **Date** | UTC date-time on which the campaign has to run (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | [optional]
1212
**subject** | **String** | Subject of the campaign | [optional]
1313
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
14-
**toField** | **String** | This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account | [optional]
14+
**toField** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter &#39;params&#39; used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
1515
**recipients** | [**UpdateEmailCampaignRecipients**](UpdateEmailCampaignRecipients.md) | | [optional]
1616
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1717
**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation &#x3D; false means image can’t be embedded, &amp; inlineImageActivation &#x3D; true means image can be embedded, in the email. You cannot send a campaign of more than 4MB with images embedded in the email. Campaigns with the images embedded in the email must be sent to less than 5000 contacts. | [optional] [default to false]
@@ -20,5 +20,6 @@ Name | Type | Description | Notes
2020
**footer** | **String** | Footer of the email campaign | [optional]
2121
**header** | **String** | Header of the email campaign | [optional]
2222
**utmCampaign** | **String** | Customize the utm_campaign value. If this field is empty, the campaign name will be used. Only alphanumeric characters and spaces are allowed | [optional]
23+
**params** | **Object** | Pass the set of attributes to customize the type &#39;classic&#39; campaign. For example, {&#39;FNAME&#39;:&#39;Joe&#39;, &#39;LNAME&#39;:&#39;Doe&#39;}. | [optional]
2324

2425

docs/UpdateSmtpTemplate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Name | Type | Description | Notes
1010
**htmlUrl** | **String** | Required if htmlContent is empty. URL to the body of the email (HTML) | [optional]
1111
**subject** | **String** | Subject of the email | [optional]
1212
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
13-
**toField** | **String** | To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database | [optional]
13+
**toField** | **String** | To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter &#39;params&#39; used please use {{contact.FNAME}} {{contact.LNAME}} for personalization | [optional]
1414
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff, rtf, bmp, cgm, css, shtml, html, htm, zip, xml, ppt, pptx, tar, ez, ics, mobi, msg, pub and eps | [optional]
1515
**isActive** | **Boolean** | Status of the template. isActive &#x3D; false means template is inactive, isActive &#x3D; true means template is active | [optional]
1616

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sib-api-v3-sdk",
3-
"version": "7.0.2",
3+
"version": "7.0.3",
44
"description": "Official SendinBlue provided RESTFul API V3 nodejs library",
55
"license": "ISC",
66
"main": "src/index.js",

src/model/CreateEmailCampaign.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@
9898
if (data.hasOwnProperty('htmlUrl')) {
9999
obj['htmlUrl'] = ApiClient.convertToType(data['htmlUrl'], 'String');
100100
}
101+
if (data.hasOwnProperty('templateId')) {
102+
obj['templateId'] = ApiClient.convertToType(data['templateId'], 'Number');
103+
}
101104
if (data.hasOwnProperty('scheduledAt')) {
102105
obj['scheduledAt'] = ApiClient.convertToType(data['scheduledAt'], 'Date');
103106
}
@@ -137,6 +140,9 @@
137140
if (data.hasOwnProperty('utmCampaign')) {
138141
obj['utmCampaign'] = ApiClient.convertToType(data['utmCampaign'], 'String');
139142
}
143+
if (data.hasOwnProperty('params')) {
144+
obj['params'] = ApiClient.convertToType(data['params'], Object);
145+
}
140146
}
141147
return obj;
142148
}
@@ -156,15 +162,20 @@
156162
*/
157163
exports.prototype['name'] = undefined;
158164
/**
159-
* Mandatory if htmlUrl is empty. Body of the message (HTML)
165+
* Mandatory if htmlUrl and templateId are empty. Body of the message (HTML)
160166
* @member {String} htmlContent
161167
*/
162168
exports.prototype['htmlContent'] = undefined;
163169
/**
164-
* Mandatory if htmlContent is empty. Url to the message (HTML)
170+
* Mandatory if htmlContent and templateId are empty. Url to the message (HTML)
165171
* @member {String} htmlUrl
166172
*/
167173
exports.prototype['htmlUrl'] = undefined;
174+
/**
175+
* Mandatory if htmlContent and htmlUrl are empty. Id of the SMTP template with status 'active'. Used to copy only its content fetched from htmlContent/htmlUrl to an email campaign for RSS feature.
176+
* @member {Number} templateId
177+
*/
178+
exports.prototype['templateId'] = undefined;
168179
/**
169180
* Sending UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
170181
* @member {Date} scheduledAt
@@ -181,7 +192,7 @@
181192
*/
182193
exports.prototype['replyTo'] = undefined;
183194
/**
184-
* To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, use {FNAME} {LNAME}. These attributes must already exist in your contact database
195+
* To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
185196
* @member {String} toField
186197
*/
187198
exports.prototype['toField'] = undefined;
@@ -231,6 +242,11 @@
231242
* @member {String} utmCampaign
232243
*/
233244
exports.prototype['utmCampaign'] = undefined;
245+
/**
246+
* Pass the set of attributes to customize the type classic campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}. Only available if 'type' is 'classic'
247+
* @member {Object} params
248+
*/
249+
exports.prototype['params'] = undefined;
234250

235251

236252
/**

src/model/CreateSmtpTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
*/
144144
exports.prototype['replyTo'] = undefined;
145145
/**
146-
* This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account
146+
* To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
147147
* @member {String} toField
148148
*/
149149
exports.prototype['toField'] = undefined;

src/model/UpdateEmailCampaign.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
if (data.hasOwnProperty('utmCampaign')) {
130130
obj['utmCampaign'] = ApiClient.convertToType(data['utmCampaign'], 'String');
131131
}
132+
if (data.hasOwnProperty('params')) {
133+
obj['params'] = ApiClient.convertToType(data['params'], Object);
134+
}
132135
}
133136
return obj;
134137
}
@@ -173,7 +176,7 @@
173176
*/
174177
exports.prototype['replyTo'] = undefined;
175178
/**
176-
* This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. To use the contact attributes here, these must already exist in SendinBlue account
179+
* To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
177180
* @member {String} toField
178181
*/
179182
exports.prototype['toField'] = undefined;
@@ -218,6 +221,11 @@
218221
* @member {String} utmCampaign
219222
*/
220223
exports.prototype['utmCampaign'] = undefined;
224+
/**
225+
* Pass the set of attributes to customize the type 'classic' campaign. For example, {'FNAME':'Joe', 'LNAME':'Doe'}.
226+
* @member {Object} params
227+
*/
228+
exports.prototype['params'] = undefined;
221229

222230

223231

src/model/UpdateSmtpTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
*/
141141
exports.prototype['replyTo'] = undefined;
142142
/**
143-
* To personalize the «To» Field, e.g. if you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These attributes must already exist in contacts database
143+
* To personalize the «To» Field. If you want to include the first name and last name of your recipient, add {FNAME} {LNAME}. These contact attributes must already exist in your SendinBlue account. If input parameter 'params' used please use {{contact.FNAME}} {{contact.LNAME}} for personalization
144144
* @member {String} toField
145145
*/
146146
exports.prototype['toField'] = undefined;

test/model/CreateEmailCampaign.spec.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
//expect(instance).to.be();
8888
});
8989

90+
it('should have the property templateId (base name: "templateId")', function() {
91+
// uncomment below and update the code to test the property templateId
92+
//var instane = new SibApiV3Sdk.CreateEmailCampaign();
93+
//expect(instance).to.be();
94+
});
95+
9096
it('should have the property scheduledAt (base name: "scheduledAt")', function() {
9197
// uncomment below and update the code to test the property scheduledAt
9298
//var instane = new SibApiV3Sdk.CreateEmailCampaign();
@@ -165,6 +171,12 @@
165171
//expect(instance).to.be();
166172
});
167173

174+
it('should have the property params (base name: "params")', function() {
175+
// uncomment below and update the code to test the property params
176+
//var instane = new SibApiV3Sdk.CreateEmailCampaign();
177+
//expect(instance).to.be();
178+
});
179+
168180
});
169181

170182
}));

0 commit comments

Comments
 (0)