@signalhousellc/sdk 1.0.17 → 1.0.19

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.17",
3
+ "version": "1.0.19",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -151,4 +151,20 @@ export class Billing {
151
151
  const queryString = this.client._getQueryString(filters);
152
152
  return this.client(`/billing/invoiceDetails${queryString}`, { method: "GET", ...options });
153
153
  }
154
+
155
+ /**
156
+ * Get the fee schedule for a specific group
157
+ * @async
158
+ * @roles api, admin, developer, billing, user
159
+ * @param {Object} params - The parameters for getting the fees
160
+ * @param {string} params.groupId - The ID of the group to get fees for
161
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
162
+ * @throws {Error} Throws an error if the groupId parameter is missing
163
+ * @returns {Promise<Object>} The response from the server
164
+ */
165
+ async getFees({ groupId, options = {} }) {
166
+ this.client._require({ groupId });
167
+ const safeGroupId = encodeURIComponent(groupId);
168
+ return this.client(`/billing/fees/${safeGroupId}`, { method: "GET", ...options });
169
+ }
154
170
  }
@@ -165,4 +165,21 @@ 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.country - Filter by country code (required)
175
+ * @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 {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
178
+ * @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records
179
+ */
180
+ async searchNpaNxx({ country, state, city, options = {} }) {
181
+ this.client._require({ country });
182
+ const queryString = this.client._getQueryString({ state, country, city });
183
+ return this.client(`/number/lookup${queryString}`, { method: "GET", ...options });
184
+ }
168
185
  }