Skip to content

Commit 175048c

Browse files
authored
Merge pull request #38 from sendinblue/feature_new-params
Mixed spec updates
2 parents 6c818d4 + 094e339 commit 175048c

9 files changed

+41
-6
lines changed

docs/CreateAttribute.md

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

1010

1111
<a name="TypeEnum"></a>
@@ -18,6 +18,8 @@ Name | Type | Description | Notes
1818

1919
* `float` (value: `"float"`)
2020

21+
* `boolean` (value: `"boolean"`)
22+
2123
* `id` (value: `"id"`)
2224

2325
* `category` (value: `"category"`)

docs/EmailCampaignsApi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ var apiInstance = new SibApiV3Sdk.EmailCampaignsApi();
234234
var opts = {
235235
'type': "type_example", // String | Filter on the type of the campaigns
236236
'status': "status_example", // String | Filter on the status of the campaign
237+
'startDate': new Date("2013-10-20T19:20:30+01:00"), // Date | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
238+
'endDate': new Date("2013-10-20T19:20:30+01:00"), // Date | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' )
237239
'limit': 500, // Number | Number of documents per page
238240
'offset': 0 // Number | Index of the first document in the page
239241
};
@@ -251,6 +253,8 @@ Name | Type | Description | Notes
251253
------------- | ------------- | ------------- | -------------
252254
**type** | **String**| Filter on the type of the campaigns | [optional]
253255
**status** | **String**| Filter on the status of the campaign | [optional]
256+
**startDate** | **Date**| Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; ) | [optional]
257+
**endDate** | **Date**| Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; ) | [optional]
254258
**limit** | **Number**| Number of documents per page | [optional] [default to 500]
255259
**offset** | **Number**| Index of the first document in the page | [optional] [default to 0]
256260

docs/GetExtendedCampaignOverview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ Name | Type | Description | Notes
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. | [optional]
1818
**mirrorActive** | **Boolean** | Status of mirror links in campaign. mirrorActive &#x3D; false means mirror links are deactivated, &amp; mirrorActive &#x3D; true means mirror links are activated, in the campaign | [optional]
1919
**recurring** | **Boolean** | FOR TRIGGER ONLY ! Type of trigger campaign.recurring &#x3D; false means contact can receive the same Trigger campaign only once, &amp; recurring &#x3D; true means contact can receive the same Trigger campaign several times | [optional]
20+
**sentDate** | **Date** | Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if &#39;status&#39; of the campaign is &#39;sent&#39; | [optional]
2021

2122

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.1",
3+
"version": "7.0.2",
44
"description": "Official SendinBlue provided RESTFul API V3 nodejs library",
55
"license": "ISC",
66
"main": "src/index.js",

src/api/EmailCampaignsApi.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@
262262
* @param {Object} opts Optional parameters
263263
* @param {module:model/String} opts.type Filter on the type of the campaigns
264264
* @param {module:model/String} opts.status Filter on the status of the campaign
265+
* @param {Date} opts.startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
266+
* @param {Date} opts.endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
265267
* @param {Number} opts.limit Number of documents per page (default to 500)
266268
* @param {Number} opts.offset Index of the first document in the page (default to 0)
267269
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetEmailCampaigns} and HTTP response
@@ -276,6 +278,8 @@
276278
var queryParams = {
277279
'type': opts['type'],
278280
'status': opts['status'],
281+
'startDate': opts['startDate'],
282+
'endDate': opts['endDate'],
279283
'limit': opts['limit'],
280284
'offset': opts['offset'],
281285
};
@@ -303,6 +307,8 @@
303307
* @param {Object} opts Optional parameters
304308
* @param {module:model/String} opts.type Filter on the type of the campaigns
305309
* @param {module:model/String} opts.status Filter on the status of the campaign
310+
* @param {Date} opts.startDate Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
311+
* @param {Date} opts.endDate Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either &#39;status&#39; not passed and if passed is set to &#39;sent&#39; )
306312
* @param {Number} opts.limit Number of documents per page (default to 500)
307313
* @param {Number} opts.offset Index of the first document in the page (default to 0)
308314
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetEmailCampaigns}

src/model/CreateAttribute.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
*/
8989
exports.prototype['enumeration'] = undefined;
9090
/**
91-
* Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
91+
* Type of the attribute. Use only if the attribute's category is 'normal', 'category' or 'transactional' ( type 'boolean' is only available if the category is 'normal' attribute, type 'id' is only available if the category is 'transactional' attribute & type 'category' is only available if the category is 'category' attribute )
9292
* @member {module:model/CreateAttribute.TypeEnum} type
9393
*/
9494
exports.prototype['type'] = undefined;
@@ -115,6 +115,11 @@
115115
* @const
116116
*/
117117
"float": "float",
118+
/**
119+
* value: "boolean"
120+
* @const
121+
*/
122+
"boolean": "boolean",
118123
/**
119124
* value: "id"
120125
* @const

src/model/GetEmailCampaign.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ exports.prototype['mirrorActive'] = undefined;
222222
*/
223223
exports.prototype['recurring'] = undefined;
224224

225+
/**
226+
* Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
227+
* @member {Date} sentDate
228+
*/
229+
exports.prototype['sentDate'] = undefined;
230+
225231

226232

227233
return exports;

src/model/GetExtendedCampaignOverview.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@
7676
_this['tag'] = tag;
7777
_this['createdAt'] = createdAt;
7878
_this['modifiedAt'] = modifiedAt;
79-
80-
81-
8279
};
8380

8481
/**
@@ -135,6 +132,9 @@
135132
if (data.hasOwnProperty('recurring')) {
136133
obj['recurring'] = ApiClient.convertToType(data['recurring'], 'Boolean');
137134
}
135+
if (data.hasOwnProperty('sentDate')) {
136+
obj['sentDate'] = ApiClient.convertToType(data['sentDate'], 'Date');
137+
}
138138
}
139139
return obj;
140140
}
@@ -208,6 +208,11 @@
208208
* @member {Boolean} recurring
209209
*/
210210
exports.prototype['recurring'] = undefined;
211+
/**
212+
* Sent UTC date-time of the campaign (YYYY-MM-DDTHH:mm:ss.SSSZ). Only available if 'status' of the campaign is 'sent'
213+
* @member {Date} sentDate
214+
*/
215+
exports.prototype['sentDate'] = undefined;
211216

212217
// Implement GetCampaignOverview interface:
213218
/**

test/model/GetExtendedCampaignOverview.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@
141141
//expect(instance).to.be();
142142
});
143143

144+
it('should have the property sentDate (base name: "sentDate")', function() {
145+
// uncomment below and update the code to test the property sentDate
146+
//var instane = new SibApiV3Sdk.GetExtendedCampaignOverview();
147+
//expect(instance).to.be();
148+
});
149+
144150
});
145151

146152
}));

0 commit comments

Comments
 (0)