@signalhousellc/sdk 1.0.18 → 1.0.20
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/Billing.js +16 -0
- package/src/domains/Landings.js +16 -0
- package/src/domains/Numbers.js +5 -8
package/package.json
CHANGED
package/src/domains/Billing.js
CHANGED
|
@@ -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
|
}
|
package/src/domains/Landings.js
CHANGED
|
@@ -108,6 +108,22 @@ export class Landings {
|
|
|
108
108
|
* @throws {Error} Throws an error if the landingId parameter is missing
|
|
109
109
|
* @returns {Promise<Object>} - The response from the server after deleting the landing page
|
|
110
110
|
*/
|
|
111
|
+
/**
|
|
112
|
+
* Get a landing page by its associated brand ID
|
|
113
|
+
* @async
|
|
114
|
+
* @roles api, admin, developer, billing, user
|
|
115
|
+
* @param {Object} params - The parameters for getting a landing page by brand
|
|
116
|
+
* @param {string} params.brandId - The brand ID to look up the landing page for
|
|
117
|
+
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
118
|
+
* @throws {Error} Throws an error if the brandId parameter is missing
|
|
119
|
+
* @returns {Promise<Object>} - The landing page object returned from the server
|
|
120
|
+
*/
|
|
121
|
+
async getLandingByBrandId({ brandId, options = {} }) {
|
|
122
|
+
this.client._require({ brandId });
|
|
123
|
+
const safeBrandId = encodeURIComponent(brandId);
|
|
124
|
+
return this.client(`/landing/brand/${safeBrandId}`, { method: "GET", ...options });
|
|
125
|
+
}
|
|
126
|
+
|
|
111
127
|
async deleteLanding({ landingId, options = {} }) {
|
|
112
128
|
this.client._require({ landingId });
|
|
113
129
|
const safeLandingId = encodeURIComponent(landingId);
|
package/src/domains/Numbers.js
CHANGED
|
@@ -171,18 +171,15 @@ export class Numbers {
|
|
|
171
171
|
* @async
|
|
172
172
|
* @roles api, admin, developer, billing, user
|
|
173
173
|
* @param {Object} params - The parameters for searching NPA/NXX data
|
|
174
|
-
* @param {string}
|
|
175
|
-
* @param {string} [params.nxx] - Filter by NXX (central office code, 3 digits)
|
|
174
|
+
* @param {string} params.country - Filter by country code (required)
|
|
176
175
|
* @param {string} [params.state] - Filter by state code (2 characters)
|
|
177
|
-
* @param {string} [params.
|
|
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
|
|
176
|
+
* @param {string} [params.city] - Filter by city name (prefix match, case-insensitive)
|
|
181
177
|
* @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
|
|
182
178
|
* @returns {Promise<Object>} A promise that resolves to matching NPA/NXX records
|
|
183
179
|
*/
|
|
184
|
-
async searchNpaNxx({
|
|
185
|
-
|
|
180
|
+
async searchNpaNxx({ country, state, city, options = {} }) {
|
|
181
|
+
this.client._require({ country });
|
|
182
|
+
const queryString = this.client._getQueryString({ state, country, city });
|
|
186
183
|
return this.client(`/number/lookup${queryString}`, { method: "GET", ...options });
|
|
187
184
|
}
|
|
188
185
|
}
|