Skip to content

Commit 7af55f1

Browse files
authored
Merge pull request #79 from sendinblue/feature_nodejs_wrapper_update
Feature nodejs wrapper update
2 parents 7a41f31 + 18ba485 commit 7af55f1

File tree

213 files changed

+1128
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+1128
-636
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: node_js
22
node_js:
33
- "6"
4-
- "6.1"
5-
- "5"
6-
- "5.11"
7-
4+
- "8"
5+
- "10"
6+
- "12"

README.md

Lines changed: 66 additions & 74 deletions
Large diffs are not rendered by default.

docs/AccountApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account informations, plans and credits details
7+
[**getAccount**](AccountApi.md#getAccount) | **GET** /account | Get your account information, plan and credits details
88

99

1010
<a name="getAccount"></a>
1111
# **getAccount**
1212
> GetAccount getAccount()
1313
14-
Get your account informations, plans and credits details
14+
Get your account information, plan and credits details
1515

1616
### Example
1717
```javascript

docs/AddContactToList.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**emails** | **[String]** | Emails to add to a list | [optional]
6+
**emails** | **[String]** | Emails to add to a list. You can pass a maximum of 150 emails for addition in one request. If you need to add the emails in bulk, please prefer /contacts/import api. | [optional]
77

88

docs/AttributesApi.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
8-
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
9-
[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
10-
[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
7+
[**createAttribute**](AttributesApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
8+
[**deleteAttribute**](AttributesApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
9+
[**getAttributes**](AttributesApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes
10+
[**updateAttribute**](AttributesApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
1111

1212

1313
<a name="createAttribute"></a>
1414
# **createAttribute**
1515
> createAttribute(attributeCategory, attributeName, createAttribute)
1616
17-
Creates contact attribute
17+
Create contact attribute
1818

1919
### Example
2020
```javascript
@@ -74,7 +74,7 @@ null (empty response body)
7474
# **deleteAttribute**
7575
> deleteAttribute(attributeCategory, attributeName)
7676
77-
Deletes an attribute
77+
Delete an attribute
7878

7979
### Example
8080
```javascript
@@ -131,7 +131,7 @@ null (empty response body)
131131
# **getAttributes**
132132
> GetAttributes getAttributes()
133133
134-
Lists all attributes
134+
List all attributes
135135

136136
### Example
137137
```javascript
@@ -179,7 +179,7 @@ This endpoint does not need any parameter.
179179
# **updateAttribute**
180180
> updateAttribute(attributeCategory, attributeName, updateAttribute)
181181
182-
Updates contact attribute
182+
Update contact attribute
183183

184184
### Example
185185
```javascript

docs/ContactsApi.md

Lines changed: 93 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@ All URIs are relative to *https://api.sendinblue.com/v3*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**addContactToList**](ContactsApi.md#addContactToList) | **POST** /contacts/lists/{listId}/contacts/add | Add existing contacts to a list
8-
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Creates contact attribute
8+
[**createAttribute**](ContactsApi.md#createAttribute) | **POST** /contacts/attributes/{attributeCategory}/{attributeName} | Create contact attribute
99
[**createContact**](ContactsApi.md#createContact) | **POST** /contacts | Create a contact
10+
[**createDoiContact**](ContactsApi.md#createDoiContact) | **POST** /contacts/doubleOptinConfirmation | Create a contact to trigger the DOI workflow from a Landing Page form
1011
[**createFolder**](ContactsApi.md#createFolder) | **POST** /contacts/folders | Create a folder
1112
[**createList**](ContactsApi.md#createList) | **POST** /contacts/lists | Create a list
12-
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Deletes an attribute
13-
[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts/{email} | Deletes a contact
13+
[**deleteAttribute**](ContactsApi.md#deleteAttribute) | **DELETE** /contacts/attributes/{attributeCategory}/{attributeName} | Delete an attribute
14+
[**deleteContact**](ContactsApi.md#deleteContact) | **DELETE** /contacts/{email} | Delete a contact
1415
[**deleteFolder**](ContactsApi.md#deleteFolder) | **DELETE** /contacts/folders/{folderId} | Delete a folder (and all its lists)
1516
[**deleteList**](ContactsApi.md#deleteList) | **DELETE** /contacts/lists/{listId} | Delete a list
16-
[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | Lists all attributes
17-
[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Retrieves contact informations
18-
[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get the campaigns statistics for a contact
17+
[**getAttributes**](ContactsApi.md#getAttributes) | **GET** /contacts/attributes | List all attributes
18+
[**getContactInfo**](ContactsApi.md#getContactInfo) | **GET** /contacts/{email} | Get a contact&#39;s details
19+
[**getContactStats**](ContactsApi.md#getContactStats) | **GET** /contacts/{email}/campaignStats | Get email campaigns&#39; statistics for a contact
1920
[**getContacts**](ContactsApi.md#getContacts) | **GET** /contacts | Get all the contacts
20-
[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get the contacts in a list
21-
[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns folder details
22-
[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get the lists in a folder
23-
[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all the folders
24-
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get the details of a list
21+
[**getContactsFromList**](ContactsApi.md#getContactsFromList) | **GET** /contacts/lists/{listId}/contacts | Get contacts in a list
22+
[**getFolder**](ContactsApi.md#getFolder) | **GET** /contacts/folders/{folderId} | Returns a folder&#39;s details
23+
[**getFolderLists**](ContactsApi.md#getFolderLists) | **GET** /contacts/folders/{folderId}/lists | Get lists in a folder
24+
[**getFolders**](ContactsApi.md#getFolders) | **GET** /contacts/folders | Get all folders
25+
[**getList**](ContactsApi.md#getList) | **GET** /contacts/lists/{listId} | Get a list&#39;s details
2526
[**getLists**](ContactsApi.md#getLists) | **GET** /contacts/lists | Get all the lists
2627
[**importContacts**](ContactsApi.md#importContacts) | **POST** /contacts/import | Import contacts
27-
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Remove existing contacts from a list
28+
[**removeContactFromList**](ContactsApi.md#removeContactFromList) | **POST** /contacts/lists/{listId}/contacts/remove | Delete a contact from a list
2829
[**requestContactExport**](ContactsApi.md#requestContactExport) | **POST** /contacts/export | Export contacts
29-
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Updates contact attribute
30-
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Updates a contact
31-
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a contact folder
30+
[**updateAttribute**](ContactsApi.md#updateAttribute) | **PUT** /contacts/attributes/{attributeCategory}/{attributeName} | Update contact attribute
31+
[**updateContact**](ContactsApi.md#updateContact) | **PUT** /contacts/{email} | Update a contact
32+
[**updateFolder**](ContactsApi.md#updateFolder) | **PUT** /contacts/folders/{folderId} | Update a folder
3233
[**updateList**](ContactsApi.md#updateList) | **PUT** /contacts/lists/{listId} | Update a list
3334

3435

@@ -93,7 +94,7 @@ Name | Type | Description | Notes
9394
# **createAttribute**
9495
> createAttribute(attributeCategory, attributeName, createAttribute)
9596
96-
Creates contact attribute
97+
Create contact attribute
9798

9899
### Example
99100
```javascript
@@ -198,6 +199,60 @@ Name | Type | Description | Notes
198199

199200
[api-key](../README.md#api-key), [partner-key](../README.md#partner-key)
200201

202+
### HTTP request headers
203+
204+
- **Content-Type**: application/json
205+
- **Accept**: application/json
206+
207+
<a name="createDoiContact"></a>
208+
# **createDoiContact**
209+
> createDoiContact(createDoiContact)
210+
211+
Create a contact to trigger the DOI workflow from a Landing Page form
212+
213+
### Example
214+
```javascript
215+
var SibApiV3Sdk = require('sib-api-v3-sdk');
216+
var defaultClient = SibApiV3Sdk.ApiClient.instance;
217+
218+
// Configure API key authorization: api-key
219+
var apiKey = defaultClient.authentications['api-key'];
220+
apiKey.apiKey = 'YOUR API KEY';
221+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
222+
//apikey.apiKeyPrefix = 'Token';
223+
224+
// Configure API key authorization: partner-key
225+
var partnerKey = defaultClient.authentications['partner-key'];
226+
partnerKey.apiKey = 'YOUR API KEY';
227+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
228+
//partnerKey.apiKeyPrefix = 'Token';
229+
230+
var apiInstance = new SibApiV3Sdk.ContactsApi();
231+
232+
var createDoiContact = new SibApiV3Sdk.CreateDoiContact(); // CreateDoiContact | Values to create the DOI contact
233+
234+
apiInstance.createDoiContact(createDoiContact).then(function() {
235+
console.log('API called successfully.');
236+
}, function(error) {
237+
console.error(error);
238+
});
239+
240+
```
241+
242+
### Parameters
243+
244+
Name | Type | Description | Notes
245+
------------- | ------------- | ------------- | -------------
246+
**createDoiContact** | [**CreateDoiContact**](CreateDoiContact.md)| Values to create the DOI contact |
247+
248+
### Return type
249+
250+
null (empty response body)
251+
252+
### Authorization
253+
254+
[api-key](../README.md#api-key), [partner-key](../README.md#partner-key)
255+
201256
### HTTP request headers
202257

203258
- **Content-Type**: application/json
@@ -315,7 +370,7 @@ Name | Type | Description | Notes
315370
# **deleteAttribute**
316371
> deleteAttribute(attributeCategory, attributeName)
317372
318-
Deletes an attribute
373+
Delete an attribute
319374

320375
### Example
321376
```javascript
@@ -372,7 +427,7 @@ null (empty response body)
372427
# **deleteContact**
373428
> deleteContact(email)
374429
375-
Deletes a contact
430+
Delete a contact
376431

377432
### Example
378433
```javascript
@@ -534,7 +589,7 @@ null (empty response body)
534589
# **getAttributes**
535590
> GetAttributes getAttributes()
536591
537-
Lists all attributes
592+
List all attributes
538593

539594
### Example
540595
```javascript
@@ -582,7 +637,7 @@ This endpoint does not need any parameter.
582637
# **getContactInfo**
583638
> GetExtendedContactDetails getContactInfo(email)
584639
585-
Retrieves contact informations
640+
Get a contact&#39;s details
586641

587642
### Example
588643
```javascript
@@ -634,9 +689,9 @@ Name | Type | Description | Notes
634689

635690
<a name="getContactStats"></a>
636691
# **getContactStats**
637-
> GetContactCampaignStats getContactStats(email)
692+
> GetContactCampaignStats getContactStats(email, opts)
638693
639-
Get the campaigns statistics for a contact
694+
Get email campaigns&#39; statistics for a contact
640695

641696
### Example
642697
```javascript
@@ -659,7 +714,11 @@ var apiInstance = new SibApiV3Sdk.ContactsApi();
659714

660715
var email = "email_example"; // String | Email address (urlencoded) of the contact
661716

662-
apiInstance.getContactStats(email).then(function(data) {
717+
var opts = {
718+
'startDate': new Date("2013-10-20"), // Date | Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate
719+
'endDate': new Date("2013-10-20") // Date | Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate
720+
};
721+
apiInstance.getContactStats(email, opts).then(function(data) {
663722
console.log('API called successfully. Returned data: ' + data);
664723
}, function(error) {
665724
console.error(error);
@@ -672,6 +731,8 @@ apiInstance.getContactStats(email).then(function(data) {
672731
Name | Type | Description | Notes
673732
------------- | ------------- | ------------- | -------------
674733
**email** | **String**| Email address (urlencoded) of the contact |
734+
**startDate** | **Date**| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | [optional]
735+
**endDate** | **Date**| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate | [optional]
675736

676737
### Return type
677738

@@ -749,7 +810,7 @@ Name | Type | Description | Notes
749810
# **getContactsFromList**
750811
> GetContacts getContactsFromList(listId, opts)
751812
752-
Get the contacts in a list
813+
Get contacts in a list
753814

754815
### Example
755816
```javascript
@@ -811,7 +872,7 @@ Name | Type | Description | Notes
811872
# **getFolder**
812873
> GetFolder getFolder(folderId)
813874
814-
Returns folder details
875+
Returns a folder&#39;s details
815876

816877
### Example
817878
```javascript
@@ -865,7 +926,7 @@ Name | Type | Description | Notes
865926
# **getFolderLists**
866927
> GetFolderLists getFolderLists(folderId, opts)
867928
868-
Get the lists in a folder
929+
Get lists in a folder
869930

870931
### Example
871932
```javascript
@@ -925,7 +986,7 @@ Name | Type | Description | Notes
925986
# **getFolders**
926987
> GetFolders getFolders(limit, offset)
927988
928-
Get all the folders
989+
Get all folders
929990

930991
### Example
931992
```javascript
@@ -982,7 +1043,7 @@ Name | Type | Description | Notes
9821043
# **getList**
9831044
> GetExtendedList getList(listId)
9841045
985-
Get the details of a list
1046+
Get a list&#39;s details
9861047

9871048
### Example
9881049
```javascript
@@ -1149,7 +1210,7 @@ Name | Type | Description | Notes
11491210
# **removeContactFromList**
11501211
> PostContactInfo removeContactFromList(listId, contactEmails)
11511212
1152-
Remove existing contacts from a list
1213+
Delete a contact from a list
11531214

11541215
### Example
11551216
```javascript
@@ -1262,7 +1323,7 @@ Name | Type | Description | Notes
12621323
# **updateAttribute**
12631324
> updateAttribute(attributeCategory, attributeName, updateAttribute)
12641325
1265-
Updates contact attribute
1326+
Update contact attribute
12661327

12671328
### Example
12681329
```javascript
@@ -1322,7 +1383,7 @@ null (empty response body)
13221383
# **updateContact**
13231384
> updateContact(email, updateContact)
13241385
1325-
Updates a contact
1386+
Update a contact
13261387

13271388
### Example
13281389
```javascript
@@ -1379,7 +1440,7 @@ null (empty response body)
13791440
# **updateFolder**
13801441
> updateFolder(folderId, updateFolder)
13811442
1382-
Update a contact folder
1443+
Update a folder
13831444

13841445
### Example
13851446
```javascript

docs/CreateAttribute.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**value** | **String** | Value of the attribute. Use only if the attribute&#39;s category is &#39;calculated&#39; or &#39;global&#39; | [optional]
6+
**value** | **String** | Value of the attribute. Use only if the attribute&#39;s category is &#39;calculated&#39; or &#39;global&#39; | [optional]
77
**enumeration** | [**[CreateAttributeEnumeration]**](CreateAttributeEnumeration.md) | List of values and labels that the attribute can take. Use only if the attribute&#39;s category is \&quot;category\&quot;. For example, [{\&quot;value\&quot;:1, \&quot;label\&quot;:\&quot;male\&quot;}, {\&quot;value\&quot;:2, \&quot;label\&quot;:\&quot;female\&quot;}] | [optional]
8-
**type** | **String** | Type of the attribute. Use only if the attribute&#39;s category is &#39;normal&#39;, &#39;category&#39; or &#39;transactional&#39; ( type &#39;boolean&#39; is only available if the category is &#39;normal&#39; attribute, type &#39;id&#39; is only available if the category is &#39;transactional&#39; attribute &amp; type &#39;category&#39; is only available if the category is &#39;category&#39; attribute ) | [optional]
8+
**type** | **String** | Type of the attribute. Use only if the attribute&#39;s category is &#39;normal&#39;, &#39;category&#39; or &#39;transactional&#39; ( type &#39;boolean&#39; is only available if the category is &#39;normal&#39; attribute, type &#39;id&#39; is only available if the category is &#39;transactional&#39; attribute &amp; type &#39;category&#39; is only available if the category is &#39;category&#39; attribute ) | [optional]
99

1010

1111
<a name="TypeEnum"></a>
@@ -23,3 +23,7 @@ Name | Type | Description | Notes
2323
* `id` (value: `"id"`)
2424

2525
* `category` (value: `"category"`)
26+
27+
28+
29+

docs/CreateContact.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**email** | **String** | Email address of the user. Mandatory if \&quot;SMS\&quot; field is not passed in \&quot;attributes\&quot; parameter. Mobile Number in \&quot;SMS\&quot; field should be passed with proper country code. For example {\&quot;SMS\&quot;:\&quot;+91xxxxxxxxxx\&quot;} or {\&quot;SMS\&quot;:\&quot;0091xxxxxxxxxx\&quot;} | [optional]
7-
**attributes** | **Object** | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\&quot;FNAME\&quot;:\&quot;Elly\&quot;, \&quot;LNAME\&quot;:\&quot;Roger\&quot;} | [optional]
8-
**emailBlacklisted** | **Boolean** | Set this field to blacklist the contact for emails (emailBlacklisted &#x3D; true) | [optional]
9-
**smsBlacklisted** | **Boolean** | Set this field to blacklist the contact for SMS (smsBlacklisted &#x3D; true) | [optional]
10-
**listIds** | **[Number]** | Ids of the lists to add the contact to | [optional]
6+
**email** | **String** | Email address of the user. Mandatory if \&quot;SMS\&quot; field is not passed in \&quot;attributes\&quot; parameter. Mobile Number in \&quot;SMS\&quot; field should be passed with proper country code. For example {\&quot;SMS\&quot;:\&quot;+91xxxxxxxxxx\&quot;} or {\&quot;SMS\&quot;:\&quot;0091xxxxxxxxxx\&quot;} | [optional]
7+
**attributes** | **Object** | Pass the set of attributes and their values. These attributes must be present in your SendinBlue account. For eg. {\&quot;FNAME\&quot;:\&quot;Elly\&quot;, \&quot;LNAME\&quot;:\&quot;Roger\&quot;} | [optional]
8+
**emailBlacklisted** | **Boolean** | Set this field to blacklist the contact for emails (emailBlacklisted &#x3D; true) | [optional]
9+
**smsBlacklisted** | **Boolean** | Set this field to blacklist the contact for SMS (smsBlacklisted &#x3D; true) | [optional]
10+
**listIds** | **[Number]** | Ids of the lists to add the contact to | [optional]
1111
**updateEnabled** | **Boolean** | Facilitate to update the existing contact in the same request (updateEnabled &#x3D; true) | [optional] [default to false]
12-
**smtpBlacklistSender** | **[String]** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled &#x3D; true ) | [optional]
12+
**smtpBlacklistSender** | **[String]** | transactional email forbidden sender for contact. Use only for email Contact ( only available if updateEnabled &#x3D; true ) | [optional]
13+
14+

0 commit comments

Comments
 (0)