@signalhousellc/sdk 1.0.16 → 1.0.18
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
CHANGED
|
@@ -21,7 +21,7 @@ export class Notifications {
|
|
|
21
21
|
async getNotifications({ id, groupId, page, limit, status, eventTypes, options = {} }) {
|
|
22
22
|
this.client._require({ "id or groupId": id ?? groupId });
|
|
23
23
|
const queryString = this.client._getQueryString({ id, groupId, page, limit, status, eventTypes });
|
|
24
|
-
return this.client(`/
|
|
24
|
+
return this.client(`/notification${queryString}`, { method: "GET", ...options });
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -36,7 +36,7 @@ export class Notifications {
|
|
|
36
36
|
*/
|
|
37
37
|
async updateNotificationStatus({ ids, status, options = {} }) {
|
|
38
38
|
this.client._require({ ids, status });
|
|
39
|
-
return this.client(`/
|
|
39
|
+
return this.client(`/notification/status`, { method: "PUT", body: { ids, status }, ...options });
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -51,6 +51,6 @@ export class Notifications {
|
|
|
51
51
|
async deleteNotification({ id, options = {} }) {
|
|
52
52
|
this.client._require({ id });
|
|
53
53
|
const safeId = encodeURIComponent(id);
|
|
54
|
-
return this.client(`/
|
|
54
|
+
return this.client(`/notification/${safeId}`, { method: "DELETE", ...options });
|
|
55
55
|
}
|
|
56
56
|
}
|
package/src/domains/Numbers.js
CHANGED
|
@@ -165,4 +165,24 @@ export class Numbers {
|
|
|
165
165
|
async transferPhoneNumbers({ phoneNumbers, newSubgroupId, options = {} }) {
|
|
166
166
|
return this.client(`/number/transfer`, { method: "POST", body: { phoneNumbers, newSubgroupId }, ...options });
|
|
167
167
|
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Search NPA/NXX lookup data with optional filters
|
|
171
|
+
* @async
|
|
172
|
+
* @roles api, admin, developer, billing, user
|
|
173
|
+
* @param {Object} params - The parameters for searching NPA/NXX data
|
|
174
|
+
* @param {string} [params.npa] - Filter by NPA (area code, 3 digits)
|
|
175
|
+
* @param {string} [params.nxx] - Filter by NXX (central office code, 3 digits)
|
|
176
|
+
* @param {string} [params.state] - Filter by state code (2 characters)
|
|
177
|
+
* @param {string} [params.country] - Filter by country code
|
|
178
|
+
* @param {string} [params.city] - Filter by city name
|
|
179
|
+
* @param {number} [params.page] - Page number for pagination
|
|
180
|
+
* @param {number} [params.limit] - Number of results per page
|
|
181
|
+
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
182
|
+
* @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records
|
|
183
|
+
*/
|
|
184
|
+
async searchNpaNxx({ npa, nxx, state, country, city, page, limit, options = {} }) {
|
|
185
|
+
const queryString = this.client._getQueryString({ npa, nxx, state, country, city, page, limit });
|
|
186
|
+
return this.client(`/number/lookup${queryString}`, { method: "GET", ...options });
|
|
187
|
+
}
|
|
168
188
|
}
|