@unboundcx/sdk 2.6.14 → 2.6.15
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 +197 -32
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.15",
|
|
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,116 @@ 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.pocEmail] - Point of contact email
|
|
1076
|
+
* @param {string} [params.pocPhone] - Point of contact phone
|
|
1077
|
+
* @param {string} [params.stockSymbol] - Stock symbol for public companies
|
|
1078
|
+
* @param {string} [params.stockExchange] - Stock exchange for public companies
|
|
1079
|
+
* @param {string} [params.website] - Company website
|
|
1080
|
+
* @param {string} [params.vertical] - Business vertical
|
|
1081
|
+
* @param {string} [params.altBusinessId] - Alternative business ID
|
|
1082
|
+
* @param {string} [params.altBusinessIdType] - Alternative business ID type
|
|
1083
|
+
* @param {string} [params.brandRelationship] - Brand relationship
|
|
1084
|
+
* @param {string} [params.businessContactEmail] - Business contact email for 2025 compliance
|
|
1085
|
+
* @param {string} [params.firstName] - First name for 2025 compliance
|
|
1086
|
+
* @param {string} [params.lastName] - Last name for 2025 compliance
|
|
1087
|
+
* @param {string} [params.mobilePhone] - Mobile phone for 2025 compliance
|
|
1088
|
+
* @returns {Promise<Object>} Updated brand details
|
|
1004
1089
|
*/
|
|
1005
|
-
async update(brandId, {
|
|
1090
|
+
async update(brandId, {
|
|
1091
|
+
name,
|
|
1092
|
+
entityType,
|
|
1093
|
+
cspId,
|
|
1094
|
+
companyName,
|
|
1095
|
+
ein,
|
|
1096
|
+
address1,
|
|
1097
|
+
address2,
|
|
1098
|
+
city,
|
|
1099
|
+
state,
|
|
1100
|
+
postalCode,
|
|
1101
|
+
country,
|
|
1102
|
+
pocEmail,
|
|
1103
|
+
pocPhone,
|
|
1104
|
+
stockSymbol,
|
|
1105
|
+
stockExchange,
|
|
1106
|
+
website,
|
|
1107
|
+
vertical,
|
|
1108
|
+
altBusinessId,
|
|
1109
|
+
altBusinessIdType,
|
|
1110
|
+
brandRelationship,
|
|
1111
|
+
businessContactEmail,
|
|
1112
|
+
firstName,
|
|
1113
|
+
lastName,
|
|
1114
|
+
mobilePhone,
|
|
1115
|
+
} = {}) {
|
|
1006
1116
|
this.sdk.validateParams(
|
|
1007
1117
|
{ brandId },
|
|
1008
1118
|
{
|
|
1009
1119
|
brandId: { type: 'string', required: true },
|
|
1120
|
+
name: { type: 'string', required: false },
|
|
1121
|
+
entityType: { type: 'string', required: false },
|
|
1122
|
+
cspId: { type: 'string', required: false },
|
|
1010
1123
|
companyName: { type: 'string', required: false },
|
|
1124
|
+
ein: { type: 'string', required: false },
|
|
1125
|
+
address1: { type: 'string', required: false },
|
|
1126
|
+
address2: { type: 'string', required: false },
|
|
1127
|
+
city: { type: 'string', required: false },
|
|
1128
|
+
state: { type: 'string', required: false },
|
|
1129
|
+
postalCode: { type: 'string', required: false },
|
|
1130
|
+
country: { type: 'string', required: false },
|
|
1131
|
+
pocEmail: { type: 'string', required: false },
|
|
1132
|
+
pocPhone: { type: 'string', required: false },
|
|
1133
|
+
stockSymbol: { type: 'string', required: false },
|
|
1134
|
+
stockExchange: { type: 'string', required: false },
|
|
1011
1135
|
website: { type: 'string', required: false },
|
|
1136
|
+
vertical: { type: 'string', required: false },
|
|
1137
|
+
altBusinessId: { type: 'string', required: false },
|
|
1138
|
+
altBusinessIdType: { type: 'string', required: false },
|
|
1139
|
+
brandRelationship: { type: 'string', required: false },
|
|
1140
|
+
businessContactEmail: { type: 'string', required: false },
|
|
1141
|
+
firstName: { type: 'string', required: false },
|
|
1142
|
+
lastName: { type: 'string', required: false },
|
|
1143
|
+
mobilePhone: { type: 'string', required: false },
|
|
1012
1144
|
},
|
|
1013
1145
|
);
|
|
1014
1146
|
|
|
1015
1147
|
const updateData = {};
|
|
1016
|
-
if (
|
|
1017
|
-
if (
|
|
1148
|
+
if (name !== undefined) updateData.name = name;
|
|
1149
|
+
if (entityType !== undefined) updateData.entityType = entityType;
|
|
1150
|
+
if (cspId !== undefined) updateData.cspId = cspId;
|
|
1151
|
+
if (companyName !== undefined) updateData.companyName = companyName;
|
|
1152
|
+
if (ein !== undefined) updateData.ein = ein;
|
|
1153
|
+
if (address1 !== undefined) updateData.address1 = address1;
|
|
1154
|
+
if (address2 !== undefined) updateData.address2 = address2;
|
|
1155
|
+
if (city !== undefined) updateData.city = city;
|
|
1156
|
+
if (state !== undefined) updateData.state = state;
|
|
1157
|
+
if (postalCode !== undefined) updateData.postalCode = postalCode;
|
|
1158
|
+
if (country !== undefined) updateData.country = country;
|
|
1159
|
+
if (pocEmail !== undefined) updateData.pocEmail = pocEmail;
|
|
1160
|
+
if (pocPhone !== undefined) updateData.pocPhone = pocPhone;
|
|
1161
|
+
if (stockSymbol !== undefined) updateData.stockSymbol = stockSymbol;
|
|
1162
|
+
if (stockExchange !== undefined) updateData.stockExchange = stockExchange;
|
|
1163
|
+
if (website !== undefined) updateData.website = website;
|
|
1164
|
+
if (vertical !== undefined) updateData.vertical = vertical;
|
|
1165
|
+
if (altBusinessId !== undefined) updateData.altBusinessId = altBusinessId;
|
|
1166
|
+
if (altBusinessIdType !== undefined) updateData.altBusinessIdType = altBusinessIdType;
|
|
1167
|
+
if (brandRelationship !== undefined) updateData.brandRelationship = brandRelationship;
|
|
1168
|
+
if (businessContactEmail !== undefined) updateData.businessContactEmail = businessContactEmail;
|
|
1169
|
+
if (firstName !== undefined) updateData.firstName = firstName;
|
|
1170
|
+
if (lastName !== undefined) updateData.lastName = lastName;
|
|
1171
|
+
if (mobilePhone !== undefined) updateData.mobilePhone = mobilePhone;
|
|
1018
1172
|
|
|
1019
1173
|
const options = {
|
|
1020
1174
|
body: updateData,
|
|
@@ -1030,6 +1184,8 @@ export class TenDlcBrandsService {
|
|
|
1030
1184
|
|
|
1031
1185
|
/**
|
|
1032
1186
|
* Delete a 10DLC brand
|
|
1187
|
+
* @param {string} brandId - Brand ID to delete (required)
|
|
1188
|
+
* @returns {Promise<Object>} Deletion confirmation
|
|
1033
1189
|
*/
|
|
1034
1190
|
async delete(brandId) {
|
|
1035
1191
|
this.sdk.validateParams(
|
|
@@ -1047,7 +1203,9 @@ export class TenDlcBrandsService {
|
|
|
1047
1203
|
}
|
|
1048
1204
|
|
|
1049
1205
|
/**
|
|
1050
|
-
* Revet a 10DLC brand
|
|
1206
|
+
* Revet (re-vet) a 10DLC brand - resubmit brand for carrier approval
|
|
1207
|
+
* @param {string} brandId - Brand ID to revet (required)
|
|
1208
|
+
* @returns {Promise<Object>} Revet confirmation and updated brand status
|
|
1051
1209
|
*/
|
|
1052
1210
|
async revet(brandId) {
|
|
1053
1211
|
this.sdk.validateParams(
|
|
@@ -1065,7 +1223,9 @@ export class TenDlcBrandsService {
|
|
|
1065
1223
|
}
|
|
1066
1224
|
|
|
1067
1225
|
/**
|
|
1068
|
-
* Get brand feedback
|
|
1226
|
+
* Get brand feedback from carriers
|
|
1227
|
+
* @param {string} brandId - Brand ID to get feedback for (required)
|
|
1228
|
+
* @returns {Promise<Object>} Brand feedback details from carriers
|
|
1069
1229
|
*/
|
|
1070
1230
|
async getFeedback(brandId) {
|
|
1071
1231
|
this.sdk.validateParams(
|
|
@@ -1083,7 +1243,10 @@ export class TenDlcBrandsService {
|
|
|
1083
1243
|
}
|
|
1084
1244
|
|
|
1085
1245
|
/**
|
|
1086
|
-
* Create external brand vetting
|
|
1246
|
+
* Create external brand vetting for higher throughput approval
|
|
1247
|
+
* @param {string} brandId - Brand ID to create external vetting for (required)
|
|
1248
|
+
* @param {Object} [vettingData] - External vetting data
|
|
1249
|
+
* @returns {Promise<Object>} External vetting creation confirmation
|
|
1087
1250
|
*/
|
|
1088
1251
|
async createExternalVetting(brandId, vettingData) {
|
|
1089
1252
|
this.sdk.validateParams(
|
|
@@ -1108,6 +1271,8 @@ export class TenDlcBrandsService {
|
|
|
1108
1271
|
|
|
1109
1272
|
/**
|
|
1110
1273
|
* Get brand external vetting responses
|
|
1274
|
+
* @param {string} brandId - Brand ID to get vetting responses for (required)
|
|
1275
|
+
* @returns {Promise<Object>} External vetting responses
|
|
1111
1276
|
*/
|
|
1112
1277
|
async getExternalVettingResponses(brandId) {
|
|
1113
1278
|
this.sdk.validateParams(
|