@unboundcx/sdk 2.6.14 → 2.6.16
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/services/messaging.js +205 -32
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.16",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
package/services/messaging.js
CHANGED
|
@@ -923,51 +923,107 @@ export class TenDlcBrandsService {
|
|
|
923
923
|
|
|
924
924
|
/**
|
|
925
925
|
* Create a new 10DLC brand
|
|
926
|
+
* @param {Object} params - Brand parameters
|
|
927
|
+
* @param {string} params.name - Brand display name (required)
|
|
928
|
+
* @param {string} params.entityType - Entity type: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT (required)
|
|
929
|
+
* @param {string} [params.cspId] - CSP ID for resellers
|
|
930
|
+
* @param {string} params.companyName - Company name (required)
|
|
931
|
+
* @param {string} [params.ein] - Employer Identification Number
|
|
932
|
+
* @param {string} params.address1 - Street address (required)
|
|
933
|
+
* @param {string} [params.address2] - Street address line 2
|
|
934
|
+
* @param {string} params.city - City (required)
|
|
935
|
+
* @param {string} params.state - State (required)
|
|
936
|
+
* @param {string} params.postalCode - Postal code (required)
|
|
937
|
+
* @param {string} params.country - Country (required)
|
|
938
|
+
* @param {string} [params.pocFirstName] - Point of contact first name
|
|
939
|
+
* @param {string} [params.pocLastName] - Point of contact last name
|
|
940
|
+
* @param {string} params.pocEmail - Point of contact email (required)
|
|
941
|
+
* @param {string} params.pocPhone - Point of contact phone (required)
|
|
942
|
+
* @param {string} [params.stockSymbol] - Stock symbol for public companies
|
|
943
|
+
* @param {string} [params.stockExchange] - Stock exchange for public companies
|
|
944
|
+
* @param {string} [params.website] - Company website
|
|
945
|
+
* @param {string} params.vertical - Business vertical (required)
|
|
946
|
+
* @param {string} [params.altBusinessId] - Alternative business ID
|
|
947
|
+
* @param {string} [params.altBusinessIdType] - Alternative business ID type
|
|
948
|
+
* @param {string} [params.brandRelationship] - Brand relationship
|
|
949
|
+
* @returns {Promise<Object>} Created brand details
|
|
926
950
|
*/
|
|
927
951
|
async create({
|
|
952
|
+
name,
|
|
953
|
+
entityType,
|
|
954
|
+
cspId,
|
|
928
955
|
companyName,
|
|
929
956
|
ein,
|
|
930
|
-
|
|
957
|
+
address1,
|
|
958
|
+
address2,
|
|
959
|
+
city,
|
|
960
|
+
state,
|
|
961
|
+
postalCode,
|
|
962
|
+
country,
|
|
963
|
+
pocFirstName,
|
|
964
|
+
pocLastName,
|
|
965
|
+
pocEmail,
|
|
966
|
+
pocPhone,
|
|
931
967
|
stockSymbol,
|
|
932
968
|
stockExchange,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
helpMessage,
|
|
939
|
-
helpKeywords,
|
|
969
|
+
website,
|
|
970
|
+
vertical,
|
|
971
|
+
altBusinessId,
|
|
972
|
+
altBusinessIdType,
|
|
973
|
+
brandRelationship,
|
|
940
974
|
}) {
|
|
941
975
|
this.sdk.validateParams(
|
|
942
|
-
{ companyName },
|
|
976
|
+
{ name, entityType, companyName, address1, city, state, postalCode, country, pocEmail, pocPhone, vertical },
|
|
943
977
|
{
|
|
978
|
+
name: { type: 'string', required: true },
|
|
979
|
+
entityType: { type: 'string', required: true },
|
|
980
|
+
cspId: { type: 'string', required: false },
|
|
944
981
|
companyName: { type: 'string', required: true },
|
|
945
982
|
ein: { type: 'string', required: false },
|
|
946
|
-
|
|
983
|
+
address1: { type: 'string', required: true },
|
|
984
|
+
address2: { type: 'string', required: false },
|
|
985
|
+
city: { type: 'string', required: true },
|
|
986
|
+
state: { type: 'string', required: true },
|
|
987
|
+
postalCode: { type: 'string', required: true },
|
|
988
|
+
country: { type: 'string', required: true },
|
|
989
|
+
pocFirstName: { type: 'string', required: false },
|
|
990
|
+
pocLastName: { type: 'string', required: false },
|
|
991
|
+
pocEmail: { type: 'string', required: true },
|
|
992
|
+
pocPhone: { type: 'string', required: true },
|
|
947
993
|
stockSymbol: { type: 'string', required: false },
|
|
948
994
|
stockExchange: { type: 'string', required: false },
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
helpMessage: { type: 'string', required: false },
|
|
955
|
-
helpKeywords: { type: 'array', required: false },
|
|
995
|
+
website: { type: 'string', required: false },
|
|
996
|
+
vertical: { type: 'string', required: true },
|
|
997
|
+
altBusinessId: { type: 'string', required: false },
|
|
998
|
+
altBusinessIdType: { type: 'string', required: false },
|
|
999
|
+
brandRelationship: { type: 'string', required: false },
|
|
956
1000
|
},
|
|
957
1001
|
);
|
|
958
1002
|
|
|
959
|
-
const brandData = {
|
|
1003
|
+
const brandData = {
|
|
1004
|
+
name,
|
|
1005
|
+
entityType,
|
|
1006
|
+
companyName,
|
|
1007
|
+
address1,
|
|
1008
|
+
city,
|
|
1009
|
+
state,
|
|
1010
|
+
postalCode,
|
|
1011
|
+
country,
|
|
1012
|
+
pocEmail,
|
|
1013
|
+
pocPhone,
|
|
1014
|
+
vertical,
|
|
1015
|
+
};
|
|
1016
|
+
if (cspId) brandData.cspId = cspId;
|
|
960
1017
|
if (ein) brandData.ein = ein;
|
|
961
|
-
if (
|
|
1018
|
+
if (address2) brandData.address2 = address2;
|
|
1019
|
+
if (pocFirstName) brandData.pocFirstName = pocFirstName;
|
|
1020
|
+
if (pocLastName) brandData.pocLastName = pocLastName;
|
|
962
1021
|
if (stockSymbol) brandData.stockSymbol = stockSymbol;
|
|
963
1022
|
if (stockExchange) brandData.stockExchange = stockExchange;
|
|
964
|
-
if (
|
|
965
|
-
if (
|
|
966
|
-
if (
|
|
967
|
-
if (
|
|
968
|
-
if (optOutKeywords) brandData.optOutKeywords = optOutKeywords;
|
|
969
|
-
if (helpMessage) brandData.helpMessage = helpMessage;
|
|
970
|
-
if (helpKeywords) brandData.helpKeywords = helpKeywords;
|
|
1023
|
+
if (website) brandData.website = website;
|
|
1024
|
+
if (altBusinessId) brandData.altBusinessId = altBusinessId;
|
|
1025
|
+
if (altBusinessIdType) brandData.altBusinessIdType = altBusinessIdType;
|
|
1026
|
+
if (brandRelationship) brandData.brandRelationship = brandRelationship;
|
|
971
1027
|
|
|
972
1028
|
const options = {
|
|
973
1029
|
body: brandData,
|
|
@@ -983,6 +1039,8 @@ export class TenDlcBrandsService {
|
|
|
983
1039
|
|
|
984
1040
|
/**
|
|
985
1041
|
* Get a 10DLC brand by ID
|
|
1042
|
+
* @param {string} brandId - Brand ID (required)
|
|
1043
|
+
* @returns {Promise<Object>} Brand details
|
|
986
1044
|
*/
|
|
987
1045
|
async get(brandId) {
|
|
988
1046
|
this.sdk.validateParams(
|
|
@@ -1001,20 +1059,124 @@ export class TenDlcBrandsService {
|
|
|
1001
1059
|
|
|
1002
1060
|
/**
|
|
1003
1061
|
* Update a 10DLC brand
|
|
1062
|
+
* @param {string} brandId - Brand ID to update (required)
|
|
1063
|
+
* @param {Object} params - Brand parameters to update
|
|
1064
|
+
* @param {string} [params.name] - Brand display name
|
|
1065
|
+
* @param {string} [params.entityType] - Entity type: PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT
|
|
1066
|
+
* @param {string} [params.cspId] - CSP ID for resellers
|
|
1067
|
+
* @param {string} [params.companyName] - Company name
|
|
1068
|
+
* @param {string} [params.ein] - Employer Identification Number
|
|
1069
|
+
* @param {string} [params.address1] - Street address
|
|
1070
|
+
* @param {string} [params.address2] - Street address line 2
|
|
1071
|
+
* @param {string} [params.city] - City
|
|
1072
|
+
* @param {string} [params.state] - State
|
|
1073
|
+
* @param {string} [params.postalCode] - Postal code
|
|
1074
|
+
* @param {string} [params.country] - Country
|
|
1075
|
+
* @param {string} [params.pocFirstName] - Point of contact first name
|
|
1076
|
+
* @param {string} [params.pocLastName] - Point of contact last name
|
|
1077
|
+
* @param {string} [params.pocEmail] - Point of contact email
|
|
1078
|
+
* @param {string} [params.pocPhone] - Point of contact phone
|
|
1079
|
+
* @param {string} [params.stockSymbol] - Stock symbol for public companies
|
|
1080
|
+
* @param {string} [params.stockExchange] - Stock exchange for public companies
|
|
1081
|
+
* @param {string} [params.website] - Company website
|
|
1082
|
+
* @param {string} [params.vertical] - Business vertical
|
|
1083
|
+
* @param {string} [params.altBusinessId] - Alternative business ID
|
|
1084
|
+
* @param {string} [params.altBusinessIdType] - Alternative business ID type
|
|
1085
|
+
* @param {string} [params.brandRelationship] - Brand relationship
|
|
1086
|
+
* @param {string} [params.businessContactEmail] - Business contact email for 2025 compliance
|
|
1087
|
+
* @param {string} [params.firstName] - First name for 2025 compliance
|
|
1088
|
+
* @param {string} [params.lastName] - Last name for 2025 compliance
|
|
1089
|
+
* @param {string} [params.mobilePhone] - Mobile phone for 2025 compliance
|
|
1090
|
+
* @returns {Promise<Object>} Updated brand details
|
|
1004
1091
|
*/
|
|
1005
|
-
async update(brandId, {
|
|
1092
|
+
async update(brandId, {
|
|
1093
|
+
name,
|
|
1094
|
+
entityType,
|
|
1095
|
+
cspId,
|
|
1096
|
+
companyName,
|
|
1097
|
+
ein,
|
|
1098
|
+
address1,
|
|
1099
|
+
address2,
|
|
1100
|
+
city,
|
|
1101
|
+
state,
|
|
1102
|
+
postalCode,
|
|
1103
|
+
country,
|
|
1104
|
+
pocFirstName,
|
|
1105
|
+
pocLastName,
|
|
1106
|
+
pocEmail,
|
|
1107
|
+
pocPhone,
|
|
1108
|
+
stockSymbol,
|
|
1109
|
+
stockExchange,
|
|
1110
|
+
website,
|
|
1111
|
+
vertical,
|
|
1112
|
+
altBusinessId,
|
|
1113
|
+
altBusinessIdType,
|
|
1114
|
+
brandRelationship,
|
|
1115
|
+
businessContactEmail,
|
|
1116
|
+
firstName,
|
|
1117
|
+
lastName,
|
|
1118
|
+
mobilePhone,
|
|
1119
|
+
} = {}) {
|
|
1006
1120
|
this.sdk.validateParams(
|
|
1007
1121
|
{ brandId },
|
|
1008
1122
|
{
|
|
1009
1123
|
brandId: { type: 'string', required: true },
|
|
1124
|
+
name: { type: 'string', required: false },
|
|
1125
|
+
entityType: { type: 'string', required: false },
|
|
1126
|
+
cspId: { type: 'string', required: false },
|
|
1010
1127
|
companyName: { type: 'string', required: false },
|
|
1128
|
+
ein: { type: 'string', required: false },
|
|
1129
|
+
address1: { type: 'string', required: false },
|
|
1130
|
+
address2: { type: 'string', required: false },
|
|
1131
|
+
city: { type: 'string', required: false },
|
|
1132
|
+
state: { type: 'string', required: false },
|
|
1133
|
+
postalCode: { type: 'string', required: false },
|
|
1134
|
+
country: { type: 'string', required: false },
|
|
1135
|
+
pocFirstName: { type: 'string', required: false },
|
|
1136
|
+
pocLastName: { type: 'string', required: false },
|
|
1137
|
+
pocEmail: { type: 'string', required: false },
|
|
1138
|
+
pocPhone: { type: 'string', required: false },
|
|
1139
|
+
stockSymbol: { type: 'string', required: false },
|
|
1140
|
+
stockExchange: { type: 'string', required: false },
|
|
1011
1141
|
website: { type: 'string', required: false },
|
|
1142
|
+
vertical: { type: 'string', required: false },
|
|
1143
|
+
altBusinessId: { type: 'string', required: false },
|
|
1144
|
+
altBusinessIdType: { type: 'string', required: false },
|
|
1145
|
+
brandRelationship: { type: 'string', required: false },
|
|
1146
|
+
businessContactEmail: { type: 'string', required: false },
|
|
1147
|
+
firstName: { type: 'string', required: false },
|
|
1148
|
+
lastName: { type: 'string', required: false },
|
|
1149
|
+
mobilePhone: { type: 'string', required: false },
|
|
1012
1150
|
},
|
|
1013
1151
|
);
|
|
1014
1152
|
|
|
1015
1153
|
const updateData = {};
|
|
1016
|
-
if (
|
|
1017
|
-
if (
|
|
1154
|
+
if (name !== undefined) updateData.name = name;
|
|
1155
|
+
if (entityType !== undefined) updateData.entityType = entityType;
|
|
1156
|
+
if (cspId !== undefined) updateData.cspId = cspId;
|
|
1157
|
+
if (companyName !== undefined) updateData.companyName = companyName;
|
|
1158
|
+
if (ein !== undefined) updateData.ein = ein;
|
|
1159
|
+
if (address1 !== undefined) updateData.address1 = address1;
|
|
1160
|
+
if (address2 !== undefined) updateData.address2 = address2;
|
|
1161
|
+
if (city !== undefined) updateData.city = city;
|
|
1162
|
+
if (state !== undefined) updateData.state = state;
|
|
1163
|
+
if (postalCode !== undefined) updateData.postalCode = postalCode;
|
|
1164
|
+
if (country !== undefined) updateData.country = country;
|
|
1165
|
+
if (pocFirstName !== undefined) updateData.pocFirstName = pocFirstName;
|
|
1166
|
+
if (pocLastName !== undefined) updateData.pocLastName = pocLastName;
|
|
1167
|
+
if (pocEmail !== undefined) updateData.pocEmail = pocEmail;
|
|
1168
|
+
if (pocPhone !== undefined) updateData.pocPhone = pocPhone;
|
|
1169
|
+
if (stockSymbol !== undefined) updateData.stockSymbol = stockSymbol;
|
|
1170
|
+
if (stockExchange !== undefined) updateData.stockExchange = stockExchange;
|
|
1171
|
+
if (website !== undefined) updateData.website = website;
|
|
1172
|
+
if (vertical !== undefined) updateData.vertical = vertical;
|
|
1173
|
+
if (altBusinessId !== undefined) updateData.altBusinessId = altBusinessId;
|
|
1174
|
+
if (altBusinessIdType !== undefined) updateData.altBusinessIdType = altBusinessIdType;
|
|
1175
|
+
if (brandRelationship !== undefined) updateData.brandRelationship = brandRelationship;
|
|
1176
|
+
if (businessContactEmail !== undefined) updateData.businessContactEmail = businessContactEmail;
|
|
1177
|
+
if (firstName !== undefined) updateData.firstName = firstName;
|
|
1178
|
+
if (lastName !== undefined) updateData.lastName = lastName;
|
|
1179
|
+
if (mobilePhone !== undefined) updateData.mobilePhone = mobilePhone;
|
|
1018
1180
|
|
|
1019
1181
|
const options = {
|
|
1020
1182
|
body: updateData,
|
|
@@ -1030,6 +1192,8 @@ export class TenDlcBrandsService {
|
|
|
1030
1192
|
|
|
1031
1193
|
/**
|
|
1032
1194
|
* Delete a 10DLC brand
|
|
1195
|
+
* @param {string} brandId - Brand ID to delete (required)
|
|
1196
|
+
* @returns {Promise<Object>} Deletion confirmation
|
|
1033
1197
|
*/
|
|
1034
1198
|
async delete(brandId) {
|
|
1035
1199
|
this.sdk.validateParams(
|
|
@@ -1047,7 +1211,9 @@ export class TenDlcBrandsService {
|
|
|
1047
1211
|
}
|
|
1048
1212
|
|
|
1049
1213
|
/**
|
|
1050
|
-
* Revet a 10DLC brand
|
|
1214
|
+
* Revet (re-vet) a 10DLC brand - resubmit brand for carrier approval
|
|
1215
|
+
* @param {string} brandId - Brand ID to revet (required)
|
|
1216
|
+
* @returns {Promise<Object>} Revet confirmation and updated brand status
|
|
1051
1217
|
*/
|
|
1052
1218
|
async revet(brandId) {
|
|
1053
1219
|
this.sdk.validateParams(
|
|
@@ -1065,7 +1231,9 @@ export class TenDlcBrandsService {
|
|
|
1065
1231
|
}
|
|
1066
1232
|
|
|
1067
1233
|
/**
|
|
1068
|
-
* Get brand feedback
|
|
1234
|
+
* Get brand feedback from carriers
|
|
1235
|
+
* @param {string} brandId - Brand ID to get feedback for (required)
|
|
1236
|
+
* @returns {Promise<Object>} Brand feedback details from carriers
|
|
1069
1237
|
*/
|
|
1070
1238
|
async getFeedback(brandId) {
|
|
1071
1239
|
this.sdk.validateParams(
|
|
@@ -1083,7 +1251,10 @@ export class TenDlcBrandsService {
|
|
|
1083
1251
|
}
|
|
1084
1252
|
|
|
1085
1253
|
/**
|
|
1086
|
-
* Create external brand vetting
|
|
1254
|
+
* Create external brand vetting for higher throughput approval
|
|
1255
|
+
* @param {string} brandId - Brand ID to create external vetting for (required)
|
|
1256
|
+
* @param {Object} [vettingData] - External vetting data
|
|
1257
|
+
* @returns {Promise<Object>} External vetting creation confirmation
|
|
1087
1258
|
*/
|
|
1088
1259
|
async createExternalVetting(brandId, vettingData) {
|
|
1089
1260
|
this.sdk.validateParams(
|
|
@@ -1108,6 +1279,8 @@ export class TenDlcBrandsService {
|
|
|
1108
1279
|
|
|
1109
1280
|
/**
|
|
1110
1281
|
* Get brand external vetting responses
|
|
1282
|
+
* @param {string} brandId - Brand ID to get vetting responses for (required)
|
|
1283
|
+
* @returns {Promise<Object>} External vetting responses
|
|
1111
1284
|
*/
|
|
1112
1285
|
async getExternalVettingResponses(brandId) {
|
|
1113
1286
|
this.sdk.validateParams(
|