@getlatedev/node 0.1.42 → 0.1.44

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/dist/index.js CHANGED
@@ -1117,6 +1117,228 @@ var deleteInboxReviewReply = (options) => {
1117
1117
  url: "/v1/inbox/reviews/{reviewId}/reply"
1118
1118
  });
1119
1119
  };
1120
+ var sendWhatsAppBulk = (options) => {
1121
+ return (options?.client ?? client).post({
1122
+ ...options,
1123
+ url: "/v1/whatsapp/bulk"
1124
+ });
1125
+ };
1126
+ var getWhatsAppContacts = (options) => {
1127
+ return (options?.client ?? client).get({
1128
+ ...options,
1129
+ url: "/v1/whatsapp/contacts"
1130
+ });
1131
+ };
1132
+ var createWhatsAppContact = (options) => {
1133
+ return (options?.client ?? client).post({
1134
+ ...options,
1135
+ url: "/v1/whatsapp/contacts"
1136
+ });
1137
+ };
1138
+ var getWhatsAppContact = (options) => {
1139
+ return (options?.client ?? client).get({
1140
+ ...options,
1141
+ url: "/v1/whatsapp/contacts/{contactId}"
1142
+ });
1143
+ };
1144
+ var updateWhatsAppContact = (options) => {
1145
+ return (options?.client ?? client).put({
1146
+ ...options,
1147
+ url: "/v1/whatsapp/contacts/{contactId}"
1148
+ });
1149
+ };
1150
+ var deleteWhatsAppContact = (options) => {
1151
+ return (options?.client ?? client).delete({
1152
+ ...options,
1153
+ url: "/v1/whatsapp/contacts/{contactId}"
1154
+ });
1155
+ };
1156
+ var importWhatsAppContacts = (options) => {
1157
+ return (options?.client ?? client).post({
1158
+ ...options,
1159
+ url: "/v1/whatsapp/contacts/import"
1160
+ });
1161
+ };
1162
+ var bulkUpdateWhatsAppContacts = (options) => {
1163
+ return (options?.client ?? client).post({
1164
+ ...options,
1165
+ url: "/v1/whatsapp/contacts/bulk"
1166
+ });
1167
+ };
1168
+ var bulkDeleteWhatsAppContacts = (options) => {
1169
+ return (options?.client ?? client).delete({
1170
+ ...options,
1171
+ url: "/v1/whatsapp/contacts/bulk"
1172
+ });
1173
+ };
1174
+ var getWhatsAppGroups = (options) => {
1175
+ return (options?.client ?? client).get({
1176
+ ...options,
1177
+ url: "/v1/whatsapp/groups"
1178
+ });
1179
+ };
1180
+ var renameWhatsAppGroup = (options) => {
1181
+ return (options?.client ?? client).post({
1182
+ ...options,
1183
+ url: "/v1/whatsapp/groups"
1184
+ });
1185
+ };
1186
+ var deleteWhatsAppGroup = (options) => {
1187
+ return (options?.client ?? client).delete({
1188
+ ...options,
1189
+ url: "/v1/whatsapp/groups"
1190
+ });
1191
+ };
1192
+ var getWhatsAppTemplates = (options) => {
1193
+ return (options?.client ?? client).get({
1194
+ ...options,
1195
+ url: "/v1/whatsapp/templates"
1196
+ });
1197
+ };
1198
+ var createWhatsAppTemplate = (options) => {
1199
+ return (options?.client ?? client).post({
1200
+ ...options,
1201
+ url: "/v1/whatsapp/templates"
1202
+ });
1203
+ };
1204
+ var getWhatsAppTemplate = (options) => {
1205
+ return (options?.client ?? client).get({
1206
+ ...options,
1207
+ url: "/v1/whatsapp/templates/{templateName}"
1208
+ });
1209
+ };
1210
+ var updateWhatsAppTemplate = (options) => {
1211
+ return (options?.client ?? client).patch({
1212
+ ...options,
1213
+ url: "/v1/whatsapp/templates/{templateName}"
1214
+ });
1215
+ };
1216
+ var deleteWhatsAppTemplate = (options) => {
1217
+ return (options?.client ?? client).delete({
1218
+ ...options,
1219
+ url: "/v1/whatsapp/templates/{templateName}"
1220
+ });
1221
+ };
1222
+ var getWhatsAppBroadcasts = (options) => {
1223
+ return (options?.client ?? client).get({
1224
+ ...options,
1225
+ url: "/v1/whatsapp/broadcasts"
1226
+ });
1227
+ };
1228
+ var createWhatsAppBroadcast = (options) => {
1229
+ return (options?.client ?? client).post({
1230
+ ...options,
1231
+ url: "/v1/whatsapp/broadcasts"
1232
+ });
1233
+ };
1234
+ var getWhatsAppBroadcast = (options) => {
1235
+ return (options?.client ?? client).get({
1236
+ ...options,
1237
+ url: "/v1/whatsapp/broadcasts/{broadcastId}"
1238
+ });
1239
+ };
1240
+ var deleteWhatsAppBroadcast = (options) => {
1241
+ return (options?.client ?? client).delete({
1242
+ ...options,
1243
+ url: "/v1/whatsapp/broadcasts/{broadcastId}"
1244
+ });
1245
+ };
1246
+ var sendWhatsAppBroadcast = (options) => {
1247
+ return (options?.client ?? client).post({
1248
+ ...options,
1249
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/send"
1250
+ });
1251
+ };
1252
+ var scheduleWhatsAppBroadcast = (options) => {
1253
+ return (options?.client ?? client).post({
1254
+ ...options,
1255
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/schedule"
1256
+ });
1257
+ };
1258
+ var cancelWhatsAppBroadcastSchedule = (options) => {
1259
+ return (options?.client ?? client).delete({
1260
+ ...options,
1261
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/schedule"
1262
+ });
1263
+ };
1264
+ var getWhatsAppBroadcastRecipients = (options) => {
1265
+ return (options?.client ?? client).get({
1266
+ ...options,
1267
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1268
+ });
1269
+ };
1270
+ var addWhatsAppBroadcastRecipients = (options) => {
1271
+ return (options?.client ?? client).patch({
1272
+ ...options,
1273
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1274
+ });
1275
+ };
1276
+ var removeWhatsAppBroadcastRecipients = (options) => {
1277
+ return (options?.client ?? client).delete({
1278
+ ...options,
1279
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1280
+ });
1281
+ };
1282
+ var getWhatsAppBusinessProfile = (options) => {
1283
+ return (options?.client ?? client).get({
1284
+ ...options,
1285
+ url: "/v1/whatsapp/business-profile"
1286
+ });
1287
+ };
1288
+ var updateWhatsAppBusinessProfile = (options) => {
1289
+ return (options?.client ?? client).post({
1290
+ ...options,
1291
+ url: "/v1/whatsapp/business-profile"
1292
+ });
1293
+ };
1294
+ var getWhatsAppPhoneNumbers = (options) => {
1295
+ return (options?.client ?? client).get({
1296
+ ...options,
1297
+ url: "/v1/whatsapp/phone-numbers"
1298
+ });
1299
+ };
1300
+ var searchAvailableWhatsAppNumbers = (options) => {
1301
+ return (options?.client ?? client).get({
1302
+ ...options,
1303
+ url: "/v1/whatsapp/phone-numbers/available"
1304
+ });
1305
+ };
1306
+ var getPreverifiedWhatsAppNumbers = (options) => {
1307
+ return (options?.client ?? client).get({
1308
+ ...options,
1309
+ url: "/v1/whatsapp/phone-numbers/preverified"
1310
+ });
1311
+ };
1312
+ var purchaseWhatsAppPhoneNumber = (options) => {
1313
+ return (options?.client ?? client).post({
1314
+ ...options,
1315
+ url: "/v1/whatsapp/phone-numbers/purchase"
1316
+ });
1317
+ };
1318
+ var getWhatsAppPhoneNumber = (options) => {
1319
+ return (options?.client ?? client).get({
1320
+ ...options,
1321
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}"
1322
+ });
1323
+ };
1324
+ var releaseWhatsAppPhoneNumber = (options) => {
1325
+ return (options?.client ?? client).delete({
1326
+ ...options,
1327
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}"
1328
+ });
1329
+ };
1330
+ var requestWhatsAppVerificationCode = (options) => {
1331
+ return (options?.client ?? client).post({
1332
+ ...options,
1333
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}/request-code"
1334
+ });
1335
+ };
1336
+ var verifyWhatsAppPhoneNumber = (options) => {
1337
+ return (options?.client ?? client).post({
1338
+ ...options,
1339
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}/verify"
1340
+ });
1341
+ };
1120
1342
 
1121
1343
  // src/errors.ts
1122
1344
  var LateApiError = class _LateApiError extends Error {
@@ -1503,6 +1725,53 @@ var Late = class {
1503
1725
  replyToInboxReview,
1504
1726
  deleteInboxReviewReply
1505
1727
  };
1728
+ /**
1729
+ * whatsapp API
1730
+ */
1731
+ this.whatsapp = {
1732
+ sendWhatsAppBulk,
1733
+ getWhatsAppContacts,
1734
+ createWhatsAppContact,
1735
+ getWhatsAppContact,
1736
+ updateWhatsAppContact,
1737
+ deleteWhatsAppContact,
1738
+ importWhatsAppContacts,
1739
+ bulkUpdateWhatsAppContacts,
1740
+ bulkDeleteWhatsAppContacts,
1741
+ getWhatsAppGroups,
1742
+ renameWhatsAppGroup,
1743
+ deleteWhatsAppGroup,
1744
+ getWhatsAppTemplates,
1745
+ createWhatsAppTemplate,
1746
+ getWhatsAppTemplate,
1747
+ updateWhatsAppTemplate,
1748
+ deleteWhatsAppTemplate,
1749
+ getWhatsAppBroadcasts,
1750
+ createWhatsAppBroadcast,
1751
+ getWhatsAppBroadcast,
1752
+ deleteWhatsAppBroadcast,
1753
+ sendWhatsAppBroadcast,
1754
+ scheduleWhatsAppBroadcast,
1755
+ cancelWhatsAppBroadcastSchedule,
1756
+ getWhatsAppBroadcastRecipients,
1757
+ addWhatsAppBroadcastRecipients,
1758
+ removeWhatsAppBroadcastRecipients,
1759
+ getWhatsAppBusinessProfile,
1760
+ updateWhatsAppBusinessProfile
1761
+ };
1762
+ /**
1763
+ * whatsappphonenumbers API
1764
+ */
1765
+ this.whatsappphonenumbers = {
1766
+ getWhatsAppPhoneNumbers,
1767
+ searchAvailableWhatsAppNumbers,
1768
+ getPreverifiedWhatsAppNumbers,
1769
+ purchaseWhatsAppPhoneNumber,
1770
+ getWhatsAppPhoneNumber,
1771
+ releaseWhatsAppPhoneNumber,
1772
+ requestWhatsAppVerificationCode,
1773
+ verifyWhatsAppPhoneNumber
1774
+ };
1506
1775
  const apiKey = options.apiKey ?? process.env["LATE_API_KEY"];
1507
1776
  if (!apiKey) {
1508
1777
  throw new LateApiError(
package/dist/index.mjs CHANGED
@@ -1088,6 +1088,228 @@ var deleteInboxReviewReply = (options) => {
1088
1088
  url: "/v1/inbox/reviews/{reviewId}/reply"
1089
1089
  });
1090
1090
  };
1091
+ var sendWhatsAppBulk = (options) => {
1092
+ return (options?.client ?? client).post({
1093
+ ...options,
1094
+ url: "/v1/whatsapp/bulk"
1095
+ });
1096
+ };
1097
+ var getWhatsAppContacts = (options) => {
1098
+ return (options?.client ?? client).get({
1099
+ ...options,
1100
+ url: "/v1/whatsapp/contacts"
1101
+ });
1102
+ };
1103
+ var createWhatsAppContact = (options) => {
1104
+ return (options?.client ?? client).post({
1105
+ ...options,
1106
+ url: "/v1/whatsapp/contacts"
1107
+ });
1108
+ };
1109
+ var getWhatsAppContact = (options) => {
1110
+ return (options?.client ?? client).get({
1111
+ ...options,
1112
+ url: "/v1/whatsapp/contacts/{contactId}"
1113
+ });
1114
+ };
1115
+ var updateWhatsAppContact = (options) => {
1116
+ return (options?.client ?? client).put({
1117
+ ...options,
1118
+ url: "/v1/whatsapp/contacts/{contactId}"
1119
+ });
1120
+ };
1121
+ var deleteWhatsAppContact = (options) => {
1122
+ return (options?.client ?? client).delete({
1123
+ ...options,
1124
+ url: "/v1/whatsapp/contacts/{contactId}"
1125
+ });
1126
+ };
1127
+ var importWhatsAppContacts = (options) => {
1128
+ return (options?.client ?? client).post({
1129
+ ...options,
1130
+ url: "/v1/whatsapp/contacts/import"
1131
+ });
1132
+ };
1133
+ var bulkUpdateWhatsAppContacts = (options) => {
1134
+ return (options?.client ?? client).post({
1135
+ ...options,
1136
+ url: "/v1/whatsapp/contacts/bulk"
1137
+ });
1138
+ };
1139
+ var bulkDeleteWhatsAppContacts = (options) => {
1140
+ return (options?.client ?? client).delete({
1141
+ ...options,
1142
+ url: "/v1/whatsapp/contacts/bulk"
1143
+ });
1144
+ };
1145
+ var getWhatsAppGroups = (options) => {
1146
+ return (options?.client ?? client).get({
1147
+ ...options,
1148
+ url: "/v1/whatsapp/groups"
1149
+ });
1150
+ };
1151
+ var renameWhatsAppGroup = (options) => {
1152
+ return (options?.client ?? client).post({
1153
+ ...options,
1154
+ url: "/v1/whatsapp/groups"
1155
+ });
1156
+ };
1157
+ var deleteWhatsAppGroup = (options) => {
1158
+ return (options?.client ?? client).delete({
1159
+ ...options,
1160
+ url: "/v1/whatsapp/groups"
1161
+ });
1162
+ };
1163
+ var getWhatsAppTemplates = (options) => {
1164
+ return (options?.client ?? client).get({
1165
+ ...options,
1166
+ url: "/v1/whatsapp/templates"
1167
+ });
1168
+ };
1169
+ var createWhatsAppTemplate = (options) => {
1170
+ return (options?.client ?? client).post({
1171
+ ...options,
1172
+ url: "/v1/whatsapp/templates"
1173
+ });
1174
+ };
1175
+ var getWhatsAppTemplate = (options) => {
1176
+ return (options?.client ?? client).get({
1177
+ ...options,
1178
+ url: "/v1/whatsapp/templates/{templateName}"
1179
+ });
1180
+ };
1181
+ var updateWhatsAppTemplate = (options) => {
1182
+ return (options?.client ?? client).patch({
1183
+ ...options,
1184
+ url: "/v1/whatsapp/templates/{templateName}"
1185
+ });
1186
+ };
1187
+ var deleteWhatsAppTemplate = (options) => {
1188
+ return (options?.client ?? client).delete({
1189
+ ...options,
1190
+ url: "/v1/whatsapp/templates/{templateName}"
1191
+ });
1192
+ };
1193
+ var getWhatsAppBroadcasts = (options) => {
1194
+ return (options?.client ?? client).get({
1195
+ ...options,
1196
+ url: "/v1/whatsapp/broadcasts"
1197
+ });
1198
+ };
1199
+ var createWhatsAppBroadcast = (options) => {
1200
+ return (options?.client ?? client).post({
1201
+ ...options,
1202
+ url: "/v1/whatsapp/broadcasts"
1203
+ });
1204
+ };
1205
+ var getWhatsAppBroadcast = (options) => {
1206
+ return (options?.client ?? client).get({
1207
+ ...options,
1208
+ url: "/v1/whatsapp/broadcasts/{broadcastId}"
1209
+ });
1210
+ };
1211
+ var deleteWhatsAppBroadcast = (options) => {
1212
+ return (options?.client ?? client).delete({
1213
+ ...options,
1214
+ url: "/v1/whatsapp/broadcasts/{broadcastId}"
1215
+ });
1216
+ };
1217
+ var sendWhatsAppBroadcast = (options) => {
1218
+ return (options?.client ?? client).post({
1219
+ ...options,
1220
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/send"
1221
+ });
1222
+ };
1223
+ var scheduleWhatsAppBroadcast = (options) => {
1224
+ return (options?.client ?? client).post({
1225
+ ...options,
1226
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/schedule"
1227
+ });
1228
+ };
1229
+ var cancelWhatsAppBroadcastSchedule = (options) => {
1230
+ return (options?.client ?? client).delete({
1231
+ ...options,
1232
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/schedule"
1233
+ });
1234
+ };
1235
+ var getWhatsAppBroadcastRecipients = (options) => {
1236
+ return (options?.client ?? client).get({
1237
+ ...options,
1238
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1239
+ });
1240
+ };
1241
+ var addWhatsAppBroadcastRecipients = (options) => {
1242
+ return (options?.client ?? client).patch({
1243
+ ...options,
1244
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1245
+ });
1246
+ };
1247
+ var removeWhatsAppBroadcastRecipients = (options) => {
1248
+ return (options?.client ?? client).delete({
1249
+ ...options,
1250
+ url: "/v1/whatsapp/broadcasts/{broadcastId}/recipients"
1251
+ });
1252
+ };
1253
+ var getWhatsAppBusinessProfile = (options) => {
1254
+ return (options?.client ?? client).get({
1255
+ ...options,
1256
+ url: "/v1/whatsapp/business-profile"
1257
+ });
1258
+ };
1259
+ var updateWhatsAppBusinessProfile = (options) => {
1260
+ return (options?.client ?? client).post({
1261
+ ...options,
1262
+ url: "/v1/whatsapp/business-profile"
1263
+ });
1264
+ };
1265
+ var getWhatsAppPhoneNumbers = (options) => {
1266
+ return (options?.client ?? client).get({
1267
+ ...options,
1268
+ url: "/v1/whatsapp/phone-numbers"
1269
+ });
1270
+ };
1271
+ var searchAvailableWhatsAppNumbers = (options) => {
1272
+ return (options?.client ?? client).get({
1273
+ ...options,
1274
+ url: "/v1/whatsapp/phone-numbers/available"
1275
+ });
1276
+ };
1277
+ var getPreverifiedWhatsAppNumbers = (options) => {
1278
+ return (options?.client ?? client).get({
1279
+ ...options,
1280
+ url: "/v1/whatsapp/phone-numbers/preverified"
1281
+ });
1282
+ };
1283
+ var purchaseWhatsAppPhoneNumber = (options) => {
1284
+ return (options?.client ?? client).post({
1285
+ ...options,
1286
+ url: "/v1/whatsapp/phone-numbers/purchase"
1287
+ });
1288
+ };
1289
+ var getWhatsAppPhoneNumber = (options) => {
1290
+ return (options?.client ?? client).get({
1291
+ ...options,
1292
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}"
1293
+ });
1294
+ };
1295
+ var releaseWhatsAppPhoneNumber = (options) => {
1296
+ return (options?.client ?? client).delete({
1297
+ ...options,
1298
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}"
1299
+ });
1300
+ };
1301
+ var requestWhatsAppVerificationCode = (options) => {
1302
+ return (options?.client ?? client).post({
1303
+ ...options,
1304
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}/request-code"
1305
+ });
1306
+ };
1307
+ var verifyWhatsAppPhoneNumber = (options) => {
1308
+ return (options?.client ?? client).post({
1309
+ ...options,
1310
+ url: "/v1/whatsapp/phone-numbers/{phoneNumberId}/verify"
1311
+ });
1312
+ };
1091
1313
 
1092
1314
  // src/errors.ts
1093
1315
  var LateApiError = class _LateApiError extends Error {
@@ -1474,6 +1696,53 @@ var Late = class {
1474
1696
  replyToInboxReview,
1475
1697
  deleteInboxReviewReply
1476
1698
  };
1699
+ /**
1700
+ * whatsapp API
1701
+ */
1702
+ this.whatsapp = {
1703
+ sendWhatsAppBulk,
1704
+ getWhatsAppContacts,
1705
+ createWhatsAppContact,
1706
+ getWhatsAppContact,
1707
+ updateWhatsAppContact,
1708
+ deleteWhatsAppContact,
1709
+ importWhatsAppContacts,
1710
+ bulkUpdateWhatsAppContacts,
1711
+ bulkDeleteWhatsAppContacts,
1712
+ getWhatsAppGroups,
1713
+ renameWhatsAppGroup,
1714
+ deleteWhatsAppGroup,
1715
+ getWhatsAppTemplates,
1716
+ createWhatsAppTemplate,
1717
+ getWhatsAppTemplate,
1718
+ updateWhatsAppTemplate,
1719
+ deleteWhatsAppTemplate,
1720
+ getWhatsAppBroadcasts,
1721
+ createWhatsAppBroadcast,
1722
+ getWhatsAppBroadcast,
1723
+ deleteWhatsAppBroadcast,
1724
+ sendWhatsAppBroadcast,
1725
+ scheduleWhatsAppBroadcast,
1726
+ cancelWhatsAppBroadcastSchedule,
1727
+ getWhatsAppBroadcastRecipients,
1728
+ addWhatsAppBroadcastRecipients,
1729
+ removeWhatsAppBroadcastRecipients,
1730
+ getWhatsAppBusinessProfile,
1731
+ updateWhatsAppBusinessProfile
1732
+ };
1733
+ /**
1734
+ * whatsappphonenumbers API
1735
+ */
1736
+ this.whatsappphonenumbers = {
1737
+ getWhatsAppPhoneNumbers,
1738
+ searchAvailableWhatsAppNumbers,
1739
+ getPreverifiedWhatsAppNumbers,
1740
+ purchaseWhatsAppPhoneNumber,
1741
+ getWhatsAppPhoneNumber,
1742
+ releaseWhatsAppPhoneNumber,
1743
+ requestWhatsAppVerificationCode,
1744
+ verifyWhatsAppPhoneNumber
1745
+ };
1477
1746
  const apiKey = options.apiKey ?? process.env["LATE_API_KEY"];
1478
1747
  if (!apiKey) {
1479
1748
  throw new LateApiError(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "description": "The official Node.js library for the Late API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",