@signalhousellc/sdk 1.0.41 → 1.0.42
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 +1 -1
- package/src/domains/Billing.js +4 -4
- package/src/domains/Messages.js +14 -14
package/package.json
CHANGED
package/src/domains/Billing.js
CHANGED
|
@@ -62,8 +62,8 @@ export class Billing {
|
|
|
62
62
|
* @param {string} [params.campaignId] - The campaign ID to filter by
|
|
63
63
|
* @param {string} [params.entryType] - The type of entry to filter by
|
|
64
64
|
* @param {string} [params.transactionType] - The type of transaction to filter by
|
|
65
|
-
* @param {string} [params.startDate] -
|
|
66
|
-
* @param {string} [params.endDate] -
|
|
65
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
66
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
67
67
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
68
68
|
* @returns {Promise<Array>} The response from the server
|
|
69
69
|
*/
|
|
@@ -190,8 +190,8 @@ export class Billing {
|
|
|
190
190
|
* @param {Object} params - The parameters for filtering the invoice details
|
|
191
191
|
* @param {string} [params.groupId] - The ID of the group to filter by
|
|
192
192
|
* @param {string} [params.subgroupId] - The ID of the subgroup to filter by
|
|
193
|
-
* @param {string} [params.startDate] -
|
|
194
|
-
* @param {string} [params.endDate] -
|
|
193
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
194
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
195
195
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
196
196
|
* @returns {Promise<Object>} The response from the server
|
|
197
197
|
*/
|
package/src/domains/Messages.js
CHANGED
|
@@ -21,8 +21,8 @@ export class Messages {
|
|
|
21
21
|
* @param {string} [params.carrier] - Filter messages by the carrier used for sending
|
|
22
22
|
* @param {string} [params.senderPhoneNumber] - Filter messages by the sender's phone number
|
|
23
23
|
* @param {string} [params.recipientPhoneNumber] - Filter messages by the recipient's phone number
|
|
24
|
-
* @param {string} [params.startDate] -
|
|
25
|
-
* @param {string} [params.endDate] -
|
|
24
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
25
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
26
26
|
* @param {string} [params.sortField] - The field to sort the messages by
|
|
27
27
|
* @param {string} [params.sortOrder] - The order to sort the messages (asc, desc)
|
|
28
28
|
* @param {number} [params.page] - The page number for pagination
|
|
@@ -67,8 +67,8 @@ export class Messages {
|
|
|
67
67
|
* @param {string} [params.campaignId] - Filter analytics by the ID of the associated campaign
|
|
68
68
|
* @param {string} [params.phoneNumber] - Filter analytics by the phone number involved in the messages
|
|
69
69
|
* @param {string} [params.carrier] - Filter analytics by the carrier used for sending
|
|
70
|
-
* @param {string} [params.startDate] -
|
|
71
|
-
* @param {string} [params.endDate] -
|
|
70
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
71
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
72
72
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
73
73
|
* @returns {Promise<Object>} - A promise that resolves to the analytics data
|
|
74
74
|
*/
|
|
@@ -89,8 +89,8 @@ export class Messages {
|
|
|
89
89
|
* @param {string} [params.campaignId] - Filter analytics by the ID of the associated campaign
|
|
90
90
|
* @param {string} [params.phoneNumber] - Filter analytics by the phone number involved in the messages
|
|
91
91
|
* @param {string} [params.carrier] - Filter analytics by the carrier used for sending
|
|
92
|
-
* @param {string} [params.startDate] -
|
|
93
|
-
* @param {string} [params.endDate] -
|
|
92
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
93
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
94
94
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
95
95
|
* @returns {Promise<Array>} - A promise that resolves to an array of analytics snapshot records
|
|
96
96
|
*/
|
|
@@ -111,8 +111,8 @@ export class Messages {
|
|
|
111
111
|
* @param {string} [params.campaignId] - Filter by the ID of the associated campaign
|
|
112
112
|
* @param {string} [params.phoneNumber] - Filter by the phone number
|
|
113
113
|
* @param {string} [params.carrier] - Filter by the carrier
|
|
114
|
-
* @param {string} [params.startDate] -
|
|
115
|
-
* @param {string} [params.endDate] -
|
|
114
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
115
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
116
116
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
117
117
|
* @returns {Promise<Object>} - A promise that resolves to the DNC analytics data (totals, byDate, byPhoneNumber, byCarrier)
|
|
118
118
|
*/
|
|
@@ -133,8 +133,8 @@ export class Messages {
|
|
|
133
133
|
* @param {string} [params.campaignId] - Filter by the ID of the associated campaign
|
|
134
134
|
* @param {string} [params.phoneNumber] - Filter by the phone number
|
|
135
135
|
* @param {string} [params.carrier] - Filter by the carrier
|
|
136
|
-
* @param {string} [params.startDate] -
|
|
137
|
-
* @param {string} [params.endDate] -
|
|
136
|
+
* @param {string} [params.startDate] - ISO-8601 date or timestamp; normalized to start-of-UTC-day (inclusive)
|
|
137
|
+
* @param {string} [params.endDate] - ISO-8601 date or timestamp; normalized to end-of-UTC-day (inclusive). Hourly resolution is not supported
|
|
138
138
|
* @param {number} [params.page] - Page number for pagination
|
|
139
139
|
* @param {number} [params.limit] - Number of records per page
|
|
140
140
|
* @param {string} [params.sortField] - Field to sort by
|
|
@@ -197,7 +197,7 @@ export class Messages {
|
|
|
197
197
|
images,
|
|
198
198
|
options = {},
|
|
199
199
|
}) {
|
|
200
|
-
this.client._require({ senderPhoneNumber, recipientPhoneNumbers
|
|
200
|
+
this.client._require({ senderPhoneNumber, recipientPhoneNumbers });
|
|
201
201
|
|
|
202
202
|
const formData = new FormData();
|
|
203
203
|
|
|
@@ -210,7 +210,7 @@ export class Messages {
|
|
|
210
210
|
formData.append("senderPhoneNumber", senderPhoneNumber);
|
|
211
211
|
|
|
212
212
|
formData.append("recipientPhoneNumber", Array.isArray(recipientPhoneNumbers) ? JSON.stringify(recipientPhoneNumbers) : recipientPhoneNumbers);
|
|
213
|
-
formData.append("messageBody", messageBody);
|
|
213
|
+
if (messageBody) formData.append("messageBody", messageBody);
|
|
214
214
|
|
|
215
215
|
if (mediaUrls && mediaUrls.length > 0) {
|
|
216
216
|
formData.append("mediaUrls", JSON.stringify(mediaUrls));
|
|
@@ -253,7 +253,7 @@ export class Messages {
|
|
|
253
253
|
images,
|
|
254
254
|
options = {},
|
|
255
255
|
}) {
|
|
256
|
-
this.client._require({ senderPhoneNumber, recipientPhoneNumbers
|
|
256
|
+
this.client._require({ senderPhoneNumber, recipientPhoneNumbers });
|
|
257
257
|
|
|
258
258
|
const formData = new FormData();
|
|
259
259
|
|
|
@@ -266,7 +266,7 @@ export class Messages {
|
|
|
266
266
|
formData.append("senderPhoneNumber", senderPhoneNumber);
|
|
267
267
|
|
|
268
268
|
formData.append("recipientPhoneNumber", Array.isArray(recipientPhoneNumbers) ? JSON.stringify(recipientPhoneNumbers) : recipientPhoneNumbers);
|
|
269
|
-
formData.append("messageBody", messageBody);
|
|
269
|
+
if (messageBody) formData.append("messageBody", messageBody);
|
|
270
270
|
|
|
271
271
|
if (mediaUrls && mediaUrls.length > 0) {
|
|
272
272
|
formData.append("mediaUrls", JSON.stringify(mediaUrls));
|