@signalhousellc/sdk 1.0.22 → 1.0.23
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/Numbers.js +11 -9
package/package.json
CHANGED
package/src/domains/Numbers.js
CHANGED
|
@@ -163,25 +163,27 @@ export class Numbers {
|
|
|
163
163
|
* @returns {Promise<Object>} A promise that resolves to the result of the transfer operation
|
|
164
164
|
*/
|
|
165
165
|
async transferPhoneNumbers({ phoneNumbers, newSubgroupId, options = {} }) {
|
|
166
|
+
this.client._require({ phoneNumbers, newSubgroupId });
|
|
166
167
|
return this.client(`/number/transfer`, { method: "POST", body: { phoneNumbers, newSubgroupId }, ...options });
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
/**
|
|
170
|
-
* Search NPA/NXX lookup data with optional filters
|
|
171
|
+
* Search NPA/NXX lookup data with optional filters.
|
|
172
|
+
* At least one search parameter is required.
|
|
173
|
+
* Location filters (country, state, city) cannot be combined with NPA/NXX filters.
|
|
171
174
|
* @async
|
|
172
175
|
* @roles api, admin, developer, billing, user
|
|
173
176
|
* @param {Object} params - The parameters for searching NPA/NXX data
|
|
174
|
-
* @param {string} params.country - Filter by country code
|
|
177
|
+
* @param {string} [params.country] - Filter by country code
|
|
175
178
|
* @param {string} [params.state] - Filter by state code (2 characters)
|
|
176
|
-
* @param {string} [params.city] - Filter by city name (prefix match, case-insensitive)
|
|
177
|
-
* @param {string} [params.
|
|
178
|
-
* @param {string} [params.
|
|
179
|
+
* @param {string} [params.city] - Filter by city name (prefix match, case-insensitive; requires country and state)
|
|
180
|
+
* @param {string} [params.npa] - Area code filter (1-3 digits; cannot combine with location filters)
|
|
181
|
+
* @param {string} [params.nxx] - Central office code filter (1-3 digits; cannot combine with location filters)
|
|
179
182
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
180
|
-
* @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records
|
|
183
|
+
* @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records or unique NPA/NXX arrays
|
|
181
184
|
*/
|
|
182
|
-
async searchNpaNxx({ country, state, city,
|
|
183
|
-
this.client.
|
|
184
|
-
const queryString = this.client._getQueryString({ state, country, city, field, npa });
|
|
185
|
+
async searchNpaNxx({ country, state, city, npa, nxx, options = {} }) {
|
|
186
|
+
const queryString = this.client._getQueryString({ country, state, city, npa, nxx });
|
|
185
187
|
return this.client(`/number/lookup${queryString}`, { method: "GET", ...options });
|
|
186
188
|
}
|
|
187
189
|
|