@signalhousellc/sdk 1.0.21 → 1.0.22

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.21",
3
+ "version": "1.0.22",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -174,12 +174,27 @@ export class Numbers {
174
174
  * @param {string} params.country - Filter by country code (required)
175
175
  * @param {string} [params.state] - Filter by state code (2 characters)
176
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")
177
179
  * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
178
180
  * @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records
179
181
  */
180
- async searchNpaNxx({ country, state, city, options = {} }) {
182
+ async searchNpaNxx({ country, state, city, field, npa, options = {} }) {
181
183
  this.client._require({ country });
182
- const queryString = this.client._getQueryString({ state, country, city });
184
+ const queryString = this.client._getQueryString({ state, country, city, field, npa });
183
185
  return this.client(`/number/lookup${queryString}`, { method: "GET", ...options });
184
186
  }
187
+
188
+ /**
189
+ * Batch lookup city/state for NPA/NXX pairs
190
+ * @async
191
+ * @roles api, admin, developer, billing, user
192
+ * @param {Object} params - The parameters for the lookup
193
+ * @param {Array<{npa: string, nxx: string}>} params.entries - NPA/NXX pairs to look up (max 50)
194
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
195
+ * @returns {Promise<Object>} A promise that resolves to an array of {npa, nxx, city, state} objects
196
+ */
197
+ async lookupLocations({ entries, options = {} }) {
198
+ return this.client("/number/lookup/location", { method: "POST", body: { entries }, ...options });
199
+ }
185
200
  }