@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalhousellc/sdk",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -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 (required)
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.field] - Return distinct values: "npa" for unique area codes, "nxx" for unique NXXs (requires npa)
178
- * @param {string} [params.npa] - Area code filter (required when field is "nxx")
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, field, npa, options = {} }) {
183
- this.client._require({ country });
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