@signalhousellc/sdk 1.3.0 → 1.4.0

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.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -183,7 +183,7 @@ export class Messages {
183
183
  * @param {string|string[]} [params.region] - ISO-2 country filter: US, GB or CA (any case of UK/GB/GBR/United Kingdom is accepted for GB); one value, an array, or a comma-separated string; omitted = every region. Only accepted where the environment serves hourly analytics; elsewhere any value is rejected with a 400.
184
184
  * @param {Object[]|string} [params.regionScopes] - Array of OR-ed branches `{ region, channels, brandId?, campaignId?, phoneNumber? }` (channels among tenDLC, virtualLongCode, tollFree, shortCode, p2p); `[]` matches nothing. Sent as JSON unless already a string. Only accepted where the environment serves hourly analytics; elsewhere any value is rejected with a 400.
185
185
  * @param {("day"|"hour")} [params.granularity] - Time-bucket grain of the byDate rows. Omit for day (each row's _id is a "YYYY-MM-DD" date). "hour" buckets by hour (each row's _id is a "YYYY-MM-DD HH:MM:SS" UTC hour) and is capped to a 7-day span. Only accepted where the environment serves hourly analytics; elsewhere any value, including "day", is rejected with a 400 -- omit the parameter unless hour grain is wanted.
186
- * @param {("carrier"|"carrierFamily")} [params.breakdown] - Adds a byBreakdown time × dimension series to the response ({ dimension, rows }: each row is one byDate bucket (_id) for one carrier or carrier family (key), over the top 50 keys by volume, 10DLC only) and caps the span at 31 days. Only accepted where the environment serves hourly analytics; elsewhere any value is rejected with a 400 -- omit the parameter unless it is wanted.
186
+ * @param {("carrier"|"carrierFamily")} [params.breakdown] - Adds a byBreakdown time × dimension series to the response ({ dimension, rows }: each row is one byDate bucket (_id) for one carrier or carrier family (key), over the top 50 keys by volume, excluding P2P) and caps the span at 31 days. Only accepted where the environment serves hourly analytics; elsewhere any value is rejected with a 400 -- omit the parameter unless it is wanted.
187
187
  * @param {("day"|"exact")} [params.dateBounds] - Which contract binds startDate/endDate. "day": each bound is widened to its whole UTC day. "exact": a timestamp is bound as the instant it names and a bare date is its whole UTC day. Omitted: "day".
188
188
  * @param {RequestOptions} [params.options] - Additional options for the request
189
189
  * @returns {Promise<SdkResponse<Array>>} - A promise that resolves to an array of analytics snapshot records. cardTotals and
@@ -229,7 +229,7 @@ export class Messages {
229
229
  }
230
230
 
231
231
  /**
232
- * Get filter dropdown options (subgroups, brands, campaigns, phone numbers) for the Analytics page,
232
+ * Get filter dropdown options (subgroups, brands, campaigns, phone numbers, carriers) for the Analytics page,
233
233
  * scoped to a single group. Sourced from ClickHouse — only items with at least one message are returned.
234
234
  * @async
235
235
  * @roles api, admin, developer, billing, user
@@ -237,7 +237,7 @@ export class Messages {
237
237
  * @param {string} params.groupId - The ID of the group whose filter options to load
238
238
  * @param {string|string[]} [params.region] - ISO-2 country filter: US, GB or CA (any case of UK/GB/GBR/United Kingdom is accepted for GB); one value, an array, or a comma-separated string; omitted = every region. Only accepted where the environment serves hourly analytics; elsewhere any value is rejected with a 400.
239
239
  * @param {RequestOptions} [params.options] - Additional options for the request
240
- * @returns {Promise<SdkResponse<any>>} - A promise that resolves to { subgroups, brands, campaigns, phoneNumbers }. Each phone number carries type (TOLL_FREE, SHORT_CODE, ALPHANUMERIC, VIRTUAL_LONG_NUMBER, ...) and country (ISO-2), null when unknown: TOLL_FREE, SHORT_CODE and ALPHANUMERIC are channels by type; any other US number is 10DLC and a non-US one is a Virtual Long Code.
240
+ * @returns {Promise<SdkResponse<any>>} - A promise that resolves to { subgroups, brands, campaigns, phoneNumbers, carriers }. Each phone number carries type (TOLL_FREE, SHORT_CODE, ALPHANUMERIC, VIRTUAL_LONG_NUMBER, ...) and country (ISO-2), null when unknown: TOLL_FREE, SHORT_CODE and ALPHANUMERIC are channels by type; any other US number is 10DLC and a non-US one is a Virtual Long Code. `carriers` is a plain array of carrier name strings.
241
241
  */
242
242
  async getAnalyticsFilterOptions({ groupId, region, options = {} }) {
243
243
  const filters = { groupId, region };
@@ -323,11 +323,12 @@ export class Numbers {
323
323
  * @param {string} [params.status] - Filter by status (PENDING, IN_PROGRESS, COMPLETED, REJECTED, CANCELLED)
324
324
  * @param {number} [params.page] - The page number for pagination (default: 1)
325
325
  * @param {number} [params.limit] - The number of items per page (default: 20)
326
+ * @param {boolean} [params.excludeDocuments] - When true, leave signatureUrl and billingUrl out of each request (the inline LOA signature and billing statement). Fetch one request with getPortRequestById to read them.
326
327
  * @param {RequestOptions} [params.options] - Additional options for the request
327
328
  * @returns {Promise<SdkResponse<any>>} A promise that resolves to the paginated list of port-in requests
328
329
  */
329
- async getPortRequests({ groupId, phoneNumber, status, page, limit, options = {} } = {}) {
330
- const filters = { groupId, phoneNumber, status, page, limit };
330
+ async getPortRequests({ groupId, phoneNumber, status, page, limit, excludeDocuments, options = {} } = {}) {
331
+ const filters = { groupId, phoneNumber, status, page, limit, excludeDocuments };
331
332
  const queryString = this.client._getQueryString(filters);
332
333
  return this.client(`/number/portin${queryString}`, { method: 'GET', ...options });
333
334
  }