Skip to content

Commit b25e8e3

Browse files
authored
Merge pull request #4 from sendinblue/feature_add-attachment-url-in-templates
Add attachment url in transactional template send
2 parents d85960d + 2145ac5 commit b25e8e3

32 files changed

+266
-55
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ Class | Method | HTTP request | Description
424424
- [SendinBlueApi.SmsCampaignsRecipients](docs/SmsCampaignsRecipients.md)
425425
- [SendinBlueApi.SmtpTemplate](docs/SmtpTemplate.md)
426426
- [SendinBlueApi.SmtpTemplate1](docs/SmtpTemplate1.md)
427+
- [SendinBlueApi.SmtpemailAttachment](docs/SmtpemailAttachment.md)
427428
- [SendinBlueApi.SmtpemailBcc](docs/SmtpemailBcc.md)
428429
- [SendinBlueApi.SmtpemailCc](docs/SmtpemailCc.md)
429430
- [SendinBlueApi.SmtpemailReplyTo](docs/SmtpemailReplyTo.md)
@@ -463,4 +464,4 @@ Be sure to visit the SendinBlue official [documentation website](https://sendinb
463464

464465
If you find a bug, please post the issue on [Github](https://github.com/sendinblue/APIv3-nodejs-library/issues).
465466

466-
As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support).
467+
As always, if you need additional assistance, drop us a note [here](https://account.sendinblue.com/support).

docs/CreateEmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**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]
1515
**recipients** | [**EmailCampaignsRecipients**](EmailCampaignsRecipients.md) | | [optional]
1616
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extensions allowed xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff and rtf | [optional]
17-
**inlineImageActivation** | **Boolean** | Use true to embedded the images in your email. Final size of the email should be less than 5MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false]
17+
**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]
1818
**mirrorActive** | **Boolean** | Use true to enable the mirror link | [optional]
1919
**recurring** | **Boolean** | For trigger campagins use false to make sure a contact receives the same campaign only once | [optional] [default to false]
2020
**type** | **String** | Type of the campaign |

docs/EmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**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]
1515
**recipients** | [**EmailCampaignscampaignIdRecipients**](EmailCampaignscampaignIdRecipients.md) | | [optional]
1616
**attachmentUrl** | **String** | Absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere.Possilbe extension values are xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff and rtf | [optional]
17-
**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 5MB 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]
17+
**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = 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]
1818
**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional]
1919
**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to false]
2020
**footer** | **String** | Footer of the email campaign | [optional]

docs/EmailCampaigns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**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]
1515
**recipients** | [**EmailCampaignsRecipients**](EmailCampaignsRecipients.md) | | [optional]
1616
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extensions allowed xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff and rtf | [optional]
17-
**inlineImageActivation** | **Boolean** | Use true to embedded the images in your email. Final size of the email should be less than 5MB. Campaigns with embedded images can not be sent to more than 5000 contacts | [optional] [default to false]
17+
**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]
1818
**mirrorActive** | **Boolean** | Use true to enable the mirror link | [optional]
1919
**recurring** | **Boolean** | For trigger campagins use false to make sure a contact receives the same campaign only once | [optional] [default to false]
2020
**type** | **String** | Type of the campaign |

docs/SMTPApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ apiInstance.getSmtpReport(opts, callback);
282282

283283
Name | Type | Description | Notes
284284
------------- | ------------- | ------------- | -------------
285-
**limit** | **Number**| Number of documents returned per page | [optional] [default to 100]
285+
**limit** | **Number**| Number of documents returned per page | [optional] [default to 50]
286286
**offset** | **Number**| Index of the first document on the page | [optional] [default to 0]
287287
**startDate** | **Date**| Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | [optional]
288288
**endDate** | **Date**| Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | [optional]
@@ -369,7 +369,7 @@ apiKey.apiKey = 'YOUR API KEY';
369369
var apiInstance = new SendinBlueApi.SMTPApi();
370370

371371
var opts = {
372-
'templateStatus': false, // Boolean | Filter on the status of the template. Active = true, inactive = false
372+
'templateStatus': true, // Boolean | Filter on the status of the template. Active = true, inactive = false
373373
'limit': 50, // Number | Number of documents returned per page
374374
'offset': 0 // Number | Index of the first document in the page
375375
};
@@ -388,8 +388,8 @@ apiInstance.getSmtpTemplates(opts, callback);
388388

389389
Name | Type | Description | Notes
390390
------------- | ------------- | ------------- | -------------
391-
**templateStatus** | **Boolean**| Filter on the status of the template. Active = true, inactive = false | [optional] [default to false]
392-
**limit** | **Number**| Number of documents returned per page | [optional] [default to 500]
391+
**templateStatus** | **Boolean**| Filter on the status of the template. Active = true, inactive = false | [optional]
392+
**limit** | **Number**| Number of documents returned per page | [optional] [default to 50]
393393
**offset** | **Number**| Index of the first document in the page | [optional] [default to 0]
394394

395395
### Return type

docs/SendEmail.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
77
**emailBcc** | **[String]** | Email addresses of the recipients in bcc | [optional]
88
**emailCc** | **[String]** | Email addresses of the recipients in cc | [optional]
99
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
10-
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
10+
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
11+
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
1112
**headers** | **{String: String}** | | [optional]
1213
**attributes** | **{String: String}** | | [optional]
1314

docs/SendEmail1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Name | Type | Description | Notes
77
**emailBcc** | **[String]** | Email addresses of the recipients in bcc | [optional]
88
**emailCc** | **[String]** | Email addresses of the recipients in cc | [optional]
99
**replyTo** | **String** | Email on which campaign recipients will be able to reply to | [optional]
10-
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
10+
**attachmentUrl** | **String** | Absolute url of the attachment (no local file). Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
11+
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the base64 content of the attachment. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
1112
**headers** | **{String: String}** | | [optional]
1213
**attributes** | **{String: String}** | | [optional]
1314

docs/SendSmtpEmail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**textContent** | **String** | Plain Text body of the message | [optional]
1212
**subject** | **String** | Subject of the message |
1313
**replyTo** | [**SmtpemailReplyTo**](SmtpemailReplyTo.md) | | [optional]
14-
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
14+
**attachment** | [**[SmtpemailAttachment]**](SmtpemailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
1515
**headers** | **{String: String}** | | [optional]
1616

1717

docs/SendSmtpEmail1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**textContent** | **String** | Plain Text body of the message | [optional]
1212
**subject** | **String** | Subject of the message |
1313
**replyTo** | [**SmtpemailReplyTo**](SmtpemailReplyTo.md) | | [optional]
14-
**attachment** | [**[SmtptemplatestemplateIdsendAttachment]**](SmtptemplatestemplateIdsendAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
14+
**attachment** | [**[SmtpemailAttachment]**](SmtpemailAttachment.md) | Pass the absolute URL (no local file) or the base64 content of the attachment. Name can be used in both cases to define the attachment name. It is mandatory in case of content. Extension allowed: gif, png, bmp, cgm, jpg, jpeg, tif, tiff, rtf, txt, css, shtml, html, htm, csv, zip, pdf, xml, ods, doc, docx, docm, ics, xls, xlsx, ppt, tar, and ez | [optional]
1515
**headers** | **{String: String}** | | [optional]
1616

1717

docs/SmtpemailAttachment.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SendinBlueApi.SmtpemailAttachment
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**url** | **String** | Absolute url of the attachment (no local file). | [optional]
7+
**content** | **Blob** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
8+
**name** | **String** | Required for content. Name of the attachment | [optional]
9+
10+

docs/SmtptemplatestemplateIdsendAttachment.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**url** | **String** | Absolute url of the attachment (no local file). | [optional]
76
**content** | **Blob** | Base64 encoded chunk data of the attachment generated on the fly | [optional]
87
**name** | **String** | Required for content. Name of the attachment | [optional]
98

docs/TransactionalSMSApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ apiInstance.getSmsEvents(opts, callback);
5252

5353
Name | Type | Description | Notes
5454
------------- | ------------- | ------------- | -------------
55-
**limit** | **Number**| Number of documents per page | [optional] [default to 100]
55+
**limit** | **Number**| Number of documents per page | [optional] [default to 50]
5656
**startDate** | **Date**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the report | [optional]
5757
**endDate** | **Date**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the report | [optional]
5858
**offset** | **Number**| Index of the first document of the page | [optional] [default to 0]

docs/UpdateEmailCampaign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**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]
1515
**recipients** | [**EmailCampaignscampaignIdRecipients**](EmailCampaignscampaignIdRecipients.md) | | [optional]
1616
**attachmentUrl** | **String** | Absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere.Possilbe extension values are xlsx, xls, ods, docx, docm, doc, csv, pdf, txt, gif, jpg, jpeg, png, tif, tiff and rtf | [optional]
17-
**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = true means image can be embedded, in the email. You cannot send a campaign of more than 5MB 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]
17+
**inlineImageActivation** | **Boolean** | Status of inline image. inlineImageActivation = false means image can’t be embedded, & inlineImageActivation = 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]
1818
**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive = false means mirror links are deactivated, & mirrorActive = true means mirror links are activated, in the campaign | [optional]
1919
**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring = false means contact can receive the same Trigger campaign only once, & recurring = true means contact can receive the same Trigger campaign several times | [optional] [default to false]
2020
**footer** | **String** | Footer of the email campaign | [optional]

package.json

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

src/api/SMTPApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
/**
350350
* Get the list of SMTP templates
351351
* @param {Object} opts Optional parameters
352-
* @param {Boolean} opts.templateStatus Filter on the status of the template. Active = true, inactive = false (default to false)
352+
* @param {Boolean} opts.templateStatus Filter on the status of the template. Active = true, inactive = false
353353
* @param {Number} opts.limit Number of documents returned per page (default to 50)
354354
* @param {Number} opts.offset Index of the first document in the page (default to 0)
355355
* @param {module:api/SMTPApi~getSmtpTemplatesCallback} callback The callback function, accepting three arguments: error, data, response

0 commit comments

Comments
 (0)