@signalhousellc/sdk 1.0.61 → 1.0.62

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.61",
3
+ "version": "1.0.62",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -61,7 +61,7 @@ export class SignalHouseSDK {
61
61
  this.groups = new Groups(client, this.enableAdmin);
62
62
  this.landings = new Landings(client, multipartClient, this.enableAdmin);
63
63
  this.messages = new Messages(client, multipartClient, this.enableAdmin);
64
- this.numbers = new Numbers(client, this.enableAdmin);
64
+ this.numbers = new Numbers(client, multipartClient, this.enableAdmin);
65
65
  this.onboarding = new Onboarding(client, this.enableAdmin);
66
66
  this.shortlinks = new Shortlinks(client, this.enableAdmin);
67
67
  this.subgroups = new Subgroups(client, this.enableAdmin);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @typedef {string} BrandLookupId - Carrier Brand ID (B… or TFNB…), Mongo `_id`, or internal reference UUID.
2
+ * @typedef {string} BrandLookupId - Carrier Brand ID (B…, TFNB…, or SCB…), Mongo `_id`, or internal reference UUID.
3
3
  * Use on update, delete, revet, vetting, appeal, and transfer routes. Pending brands return `brandId: null`
4
4
  * in read/create responses — poll `GET /brand?id=<Mongo _id>` until a carrier Brand ID is assigned.
5
5
  */
@@ -98,221 +98,289 @@
98
98
  * @property {string} [country] - The country code of the primary contact for the brand (optional, 2-letter code; when "US", state must be a valid 2-letter US state code)
99
99
  */
100
100
 
101
+ /**
102
+ * @typedef {Object} CreateShortCodeBrandData
103
+ * @property {string} subgroupId - The ID of the subgroup to create the brand under.
104
+ * @property {string} displayName - The Short Code brand display name.
105
+ * @property {string} companyName - The official company name.
106
+ * @property {string} street - The street address.
107
+ * @property {string} city - The city.
108
+ * @property {string} state - The state or province.
109
+ * @property {string} postalCode - The postal code.
110
+ * @property {string} country - The 2-letter country code.
111
+ * @property {string} email - The support email address.
112
+ * @property {string} firstName - The contact's first name.
113
+ * @property {string} lastName - The contact's last name.
114
+ * @property {string} website - The company website URL.
115
+ * @property {{ businessRegistrationType: string, legalEntityType: string, taxId: string, countryCode: string, supportPhone: string }} shortCode - Short Code registration details.
116
+ */
117
+
101
118
  export class Brands {
102
- constructor(client, multipartClient, enableAdmin) {
103
- this.client = client;
104
- this.multipartClient = multipartClient;
105
- this.enableAdmin = enableAdmin;
106
- }
119
+ constructor(client, multipartClient, enableAdmin) {
120
+ this.client = client;
121
+ this.multipartClient = multipartClient;
122
+ this.enableAdmin = enableAdmin;
123
+ }
124
+
125
+ /**
126
+ * Get a list of brands with optional filters
127
+ * @async
128
+ * @roles api, admin, developer, user
129
+ * @param {Object} params - The parameters for filtering the brands
130
+ * @param {string} [params.id] - Brand lookup id (carrier Brand ID, Mongo _id, or internal reference)
131
+ * @param {string} [params.subgroupId] - The ID of the subgroup to filter by
132
+ * @param {string} [params.groupId] - The ID of the group to filter by
133
+ * @param {number} [params.page] - The page number for pagination
134
+ * @param {number} [params.limit] - The number of items per page
135
+ * @param {string} [params.status] - The status of the brand to filter by (PENDING_CREATION, PENDING_APPROVAL, UNVERIFIED, VERIFIED, VETTED_VERIFIED, PENDING_DELETE, DELETED)
136
+ * @param {string} [params.registrationType] - Filter by registration type ("TEN_DLC", "TOLL_FREE", or "SHORT_CODE")
137
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
138
+ * @returns {Promise<Array<{ _id: string, brandId: string|null, status: string, registrationType: string, [key: string]: any }>>} Brand records. For 10DLC brands in PENDING_CREATION (or rejected before carrier assignment), brandId is null — poll by _id until status advances and brandId is assigned.
139
+ */
140
+ async getBrands({ id, subgroupId, groupId, page, limit, status, registrationType, options = {} }) {
141
+ const filters = { id, subgroupId, groupId, page, limit, status, registrationType };
142
+ const queryString = this.client._getQueryString(filters);
143
+ return this.client(`/brand${queryString}`, { method: 'GET', ...options });
144
+ }
145
+
146
+ /**
147
+ * Get external vetting information for a brand
148
+ * @async
149
+ * @roles api, admin, developer, user
150
+ * @param {Object} params - The parameters for getting the external vetting information
151
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
152
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
153
+ * @throws {Error} Throws an error if the brandId parameter is missing
154
+ * @returns {Promise<Object>} The response from the server
155
+ */
156
+ async getExternalVetting({ brandId, options = {} }) {
157
+ this.client._require({ brandId });
158
+ const safeBrandId = encodeURIComponent(brandId);
159
+ return this.client(`/brand/externalvetting/${safeBrandId}`, { method: 'GET', ...options });
160
+ }
161
+
162
+ /**
163
+ * Create a new brand
164
+ * @async
165
+ * @roles api, admin, developer, billing, user
166
+ * @param {Object} params - The parameters for creating the brand (see CreateBrandData typedef for details)
167
+ * @param {CreateBrandData} params.brandData - The data for the brand to be created
168
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
169
+ * @throws {Error} Throws an error if the brandData parameter is missing or if required fields in brandData are missing
170
+ * @returns {Promise<Object>} Brand entity. `brandId` is `null` until the carrier assigns a Brand ID — use `_id` to poll status.
171
+ */
172
+ async createBrand({ brandData, options = {} }) {
173
+ this.client._require({ brandData: brandData });
174
+ return this.client(`/brand`, { method: 'POST', body: brandData, ...options });
175
+ }
107
176
 
108
- /**
109
- * Get a list of brands with optional filters
110
- * @async
111
- * @roles api, admin, developer, user
112
- * @param {Object} params - The parameters for filtering the brands
113
- * @param {string} [params.id] - Brand lookup id (carrier Brand ID, Mongo _id, or internal reference)
114
- * @param {string} [params.subgroupId] - The ID of the subgroup to filter by
115
- * @param {string} [params.groupId] - The ID of the group to filter by
116
- * @param {number} [params.page] - The page number for pagination
117
- * @param {number} [params.limit] - The number of items per page
118
- * @param {string} [params.status] - The status of the brand to filter by (PENDING_CREATION, PENDING_APPROVAL, UNVERIFIED, VERIFIED, VETTED_VERIFIED, PENDING_DELETE, DELETED)
119
- * @param {string} [params.registrationType] - Filter by registration type ("TEN_DLC" or "TOLL_FREE")
120
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
121
- * @returns {Promise<Array<{ _id: string, brandId: string|null, status: string, registrationType: string, [key: string]: any }>>} Brand records. For 10DLC brands in PENDING_CREATION (or rejected before carrier assignment), brandId is null — poll by _id until status advances and brandId is assigned.
122
- */
123
- async getBrands({ id, subgroupId, groupId, page, limit, status, registrationType, options = {} }) {
124
- const filters = { id, subgroupId, groupId, page, limit, status, registrationType };
125
- const queryString = this.client._getQueryString(filters);
126
- return this.client(`/brand${queryString}`, { method: "GET", ...options });
127
- }
177
+ /**
178
+ * Create a new Toll-Free (TFN) brand
179
+ * @async
180
+ * @roles api, admin, developer, billing, user
181
+ * @param {Object} params - The parameters for creating the toll-free brand
182
+ * @param {CreateTollFreeBrandData} params.brandData - The data for the toll-free brand to be created (see CreateTollFreeBrandData typedef for details; TFN-specific fields live under brandData.tollFree, and registrationType is forced server-side by the route)
183
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
184
+ * @throws {Error} Throws an error if the brandData parameter is missing
185
+ * @returns {Promise<Object>} Brand entity. For Toll-Free, `brandId` is a TFNB-prefixed id when assigned; otherwise `null` — use `_id` to poll.
186
+ */
187
+ async createTollFreeBrand({ brandData, options = {} }) {
188
+ this.client._require({ brandData });
189
+ return this.client(`/brand/toll-free`, { method: 'POST', body: brandData, ...options });
190
+ }
128
191
 
129
- /**
130
- * Get external vetting information for a brand
131
- * @async
132
- * @roles api, admin, developer, user
133
- * @param {Object} params - The parameters for getting the external vetting information
134
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
135
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
136
- * @throws {Error} Throws an error if the brandId parameter is missing
137
- * @returns {Promise<Object>} The response from the server
138
- */
139
- async getExternalVetting({ brandId, options = {} }) {
140
- this.client._require({ brandId });
141
- const safeBrandId = encodeURIComponent(brandId);
142
- return this.client(`/brand/externalvetting/${safeBrandId}`, { method: "GET", ...options });
143
- }
192
+ /**
193
+ * Create a local Short Code brand for manual Signal House review.
194
+ * @async
195
+ * @roles api, admin, developer, billing, user
196
+ * @param {Object} params - The creation parameters.
197
+ * @param {CreateShortCodeBrandData} params.brandData - The Short Code brand data. The route forces registrationType server-side.
198
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request.
199
+ * @returns {Promise<Object>} A 201-created Short Code brand with a stable SCB-prefixed ID and PENDING_APPROVAL status.
200
+ */
201
+ async createShortCodeBrand({ brandData, options = {} }) {
202
+ this.client._require({ brandData });
203
+ return this.client(`/brand/short-code`, { method: 'POST', body: brandData, ...options });
204
+ }
144
205
 
145
- /**
146
- * Create a new brand
147
- * @async
148
- * @roles api, admin, developer, billing, user
149
- * @param {Object} params - The parameters for creating the brand (see CreateBrandData typedef for details)
150
- * @param {CreateBrandData} params.brandData - The data for the brand to be created
151
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
152
- * @throws {Error} Throws an error if the brandData parameter is missing or if required fields in brandData are missing
153
- * @returns {Promise<Object>} Brand entity. `brandId` is `null` until the carrier assigns a Brand ID — use `_id` to poll status.
154
- */
155
- async createBrand({ brandData, options = {} }) {
156
- this.client._require({ brandData: brandData });
157
- return this.client(`/brand`, { method: "POST", body: brandData, ...options });
158
- }
206
+ /**
207
+ * Approve a pending Short Code brand.
208
+ * @async
209
+ * @roles signalhouse_admin
210
+ * @param {Object} params - The approval parameters.
211
+ * @param {BrandLookupId} params.brandId - The pending Short Code brand lookup ID.
212
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request.
213
+ * @returns {Promise<Object>} The verified Short Code brand.
214
+ */
215
+ async approveShortCodeBrand({ brandId, options = {} }) {
216
+ this.client._require({ brandId });
217
+ return this.client(`/brand/approve/${encodeURIComponent(brandId)}`, { method: 'POST', ...options });
218
+ }
159
219
 
160
- /**
161
- * Create a new Toll-Free (TFN) brand
162
- * @async
163
- * @roles api, admin, developer, billing, user
164
- * @param {Object} params - The parameters for creating the toll-free brand
165
- * @param {CreateTollFreeBrandData} params.brandData - The data for the toll-free brand to be created (see CreateTollFreeBrandData typedef for details; TFN-specific fields live under brandData.tollFree, and registrationType is forced server-side by the route)
166
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
167
- * @throws {Error} Throws an error if the brandData parameter is missing
168
- * @returns {Promise<Object>} Brand entity. For Toll-Free, `brandId` is a TFNB-prefixed id when assigned; otherwise `null` — use `_id` to poll.
169
- */
170
- async createTollFreeBrand({ brandData, options = {} }) {
171
- this.client._require({ brandData });
172
- return this.client(`/brand/toll-free`, { method: "POST", body: brandData, ...options });
173
- }
220
+ /**
221
+ * Reject a pending Short Code brand with a customer-visible reason.
222
+ * @async
223
+ * @roles signalhouse_admin
224
+ * @param {Object} params - The rejection parameters.
225
+ * @param {BrandLookupId} params.brandId - The pending Short Code brand lookup ID.
226
+ * @param {string} params.internalRejectionReason - Required customer-visible rejection reason.
227
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request.
228
+ * @returns {Promise<Object>} The rejected Short Code brand.
229
+ */
230
+ async rejectShortCodeBrand({ brandId, internalRejectionReason, options = {} }) {
231
+ this.client._require({ brandId, internalRejectionReason });
232
+ return this.client(`/brand/reject/${encodeURIComponent(brandId)}`, {
233
+ method: 'POST',
234
+ body: { internalRejectionReason },
235
+ ...options,
236
+ });
237
+ }
174
238
 
175
- /**
176
- * Transfer one or more brands to a different subgroup
177
- * @async
178
- * @roles api, admin, developer, billing, user
179
- * @param {Object} params - The parameters for transferring the brands
180
- * @param {string} params.subgroupId - The ID of the subgroup to transfer the brands to
181
- * @param {BrandLookupId[]} params.brandIds - Brand lookup ids to transfer (carrier id, Mongo `_id`, or internal reference).
182
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
183
- * @throws {Error} Throws an error if the subgroupId or brandIds parameters are missing
184
- * @returns {Promise<Object>} The response from the server
185
- */
186
- async transferBrand({ subgroupId, brandIds, options = {} }) {
187
- this.client._require({ subgroupId, brandIds });
188
- const safeSubgroupId = encodeURIComponent(subgroupId);
189
- return this.client(`/brand/transfer/${safeSubgroupId}`, { method: "POST", body: { brandIds }, ...options });
190
- }
239
+ /**
240
+ * Transfer one or more brands to a different subgroup
241
+ * @async
242
+ * @roles api, admin, developer, billing, user
243
+ * @param {Object} params - The parameters for transferring the brands
244
+ * @param {string} params.subgroupId - The ID of the subgroup to transfer the brands to
245
+ * @param {BrandLookupId[]} params.brandIds - Brand lookup ids to transfer (carrier id, Mongo `_id`, or internal reference).
246
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
247
+ * @throws {Error} Throws an error if the subgroupId or brandIds parameters are missing
248
+ * @returns {Promise<Object>} The response from the server
249
+ */
250
+ async transferBrand({ subgroupId, brandIds, options = {} }) {
251
+ this.client._require({ subgroupId, brandIds });
252
+ const safeSubgroupId = encodeURIComponent(subgroupId);
253
+ return this.client(`/brand/transfer/${safeSubgroupId}`, { method: 'POST', body: { brandIds }, ...options });
254
+ }
191
255
 
192
- /**
193
- * Create external vetting for a brand
194
- * @async
195
- * @roles api, admin, developer, billing, user
196
- * @param {Object} params - The parameters for creating external vetting
197
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
198
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
199
- * @throws {Error} Throws an error if the brandId parameter is missing
200
- * @returns {Promise<Object>} The response from the server
201
- */
202
- async createExternalVetting({ brandId, options = {} }) {
203
- this.client._require({ brandId });
204
- const safeBrandId = encodeURIComponent(brandId);
205
- return this.client(`/brand/externalvetting/${safeBrandId}`, { method: "POST", ...options });
206
- }
256
+ /**
257
+ * Create external vetting for a brand
258
+ * @async
259
+ * @roles api, admin, developer, billing, user
260
+ * @param {Object} params - The parameters for creating external vetting
261
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
262
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
263
+ * @throws {Error} Throws an error if the brandId parameter is missing
264
+ * @returns {Promise<Object>} The response from the server
265
+ */
266
+ async createExternalVetting({ brandId, options = {} }) {
267
+ this.client._require({ brandId });
268
+ const safeBrandId = encodeURIComponent(brandId);
269
+ return this.client(`/brand/externalvetting/${safeBrandId}`, { method: 'POST', ...options });
270
+ }
207
271
 
208
- /**
209
- * Import an existing external vetting record for a brand
210
- *
211
- * Unlike createExternalVetting (which orders a new, billable vetting), this attaches a vetting the
212
- * brand already completed directly with the provider, using the provider-issued vettingId and
213
- * vettingToken. It is synchronous and not billable.
214
- * @async
215
- * @roles api, admin, developer, billing, user
216
- * @param {Object} params - The parameters for importing external vetting
217
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
218
- * @param {string} params.vettingProviderId - The external vetting provider (AEGIS, WMC, CV)
219
- * @param {string} params.vettingId - The provider-issued vetting / transaction ID to import
220
- * @param {string} [params.vettingToken] - The provider-issued vetting token (required by some providers, e.g. AEGIS)
221
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
222
- * @throws {Error} Throws an error if brandId, vettingProviderId, or vettingId is missing
223
- * @returns {Promise<Object>} The response from the server
224
- */
225
- async importExternalVetting({ brandId, vettingProviderId, vettingId, vettingToken, options = {} }) {
226
- this.client._require({ brandId, vettingProviderId, vettingId });
227
- const safeBrandId = encodeURIComponent(brandId);
228
- return this.client(`/brand/externalvetting/import/${safeBrandId}`, { method: "POST", body: { vettingProviderId, vettingId, vettingToken }, ...options });
229
- }
272
+ /**
273
+ * Import an existing external vetting record for a brand
274
+ *
275
+ * Unlike createExternalVetting (which orders a new, billable vetting), this attaches a vetting the
276
+ * brand already completed directly with the provider, using the provider-issued vettingId and
277
+ * vettingToken. It is synchronous and not billable.
278
+ * @async
279
+ * @roles api, admin, developer, billing, user
280
+ * @param {Object} params - The parameters for importing external vetting
281
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
282
+ * @param {string} params.vettingProviderId - The external vetting provider (AEGIS, WMC, CV)
283
+ * @param {string} params.vettingId - The provider-issued vetting / transaction ID to import
284
+ * @param {string} [params.vettingToken] - The provider-issued vetting token (required by some providers, e.g. AEGIS)
285
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
286
+ * @throws {Error} Throws an error if brandId, vettingProviderId, or vettingId is missing
287
+ * @returns {Promise<Object>} The response from the server
288
+ */
289
+ async importExternalVetting({ brandId, vettingProviderId, vettingId, vettingToken, options = {} }) {
290
+ this.client._require({ brandId, vettingProviderId, vettingId });
291
+ const safeBrandId = encodeURIComponent(brandId);
292
+ return this.client(`/brand/externalvetting/import/${safeBrandId}`, {
293
+ method: 'POST',
294
+ body: { vettingProviderId, vettingId, vettingToken },
295
+ ...options,
296
+ });
297
+ }
230
298
 
231
- /**
232
- * Update a brand's information
233
- * @async
234
- * @roles api, admin, developer, billing, user
235
- * @param {Object} params - The parameters for updating the brand (see UpdateBrandData typedef for details)
236
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
237
- * @param {UpdateBrandData} params.brandData - The data for the brand to be updated
238
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
239
- * @throws {Error} Throws an error if the brandId parameter is missing
240
- * @returns {Promise<Object>} The response from the server
241
- */
242
- async updateBrand({ brandId, brandData, options = {} }) {
243
- this.client._require({ brandId });
244
- const safeBrandId = encodeURIComponent(brandId);
245
- return this.client(`/brand/${safeBrandId}`, { method: "PUT", body: brandData, ...options });
246
- }
299
+ /**
300
+ * Update a brand's information
301
+ * @async
302
+ * @roles api, admin, developer, billing, user
303
+ * @param {Object} params - The parameters for updating the brand (see UpdateBrandData typedef for details)
304
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
305
+ * @param {UpdateBrandData} params.brandData - The data for the brand to be updated
306
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
307
+ * @throws {Error} Throws an error if the brandId parameter is missing
308
+ * @returns {Promise<Object>} The response from the server
309
+ */
310
+ async updateBrand({ brandId, brandData, options = {} }) {
311
+ this.client._require({ brandId });
312
+ const safeBrandId = encodeURIComponent(brandId);
313
+ return this.client(`/brand/${safeBrandId}`, { method: 'PUT', body: brandData, ...options });
314
+ }
247
315
 
248
- /**
249
- * Revet a brand that is in UNVERIFIED status due to an update afer it was previously VERIFIED or VETTED_VERIFIED
250
- * @async
251
- * @roles api, admin, developer, billing, user
252
- * @param {Object} params - The parameters for reverting the brand
253
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
254
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
255
- * @throws {Error} Throws an error if the brandId parameter is missing
256
- * @returns {Promise<Object>} The response from the server
257
- */
258
- async revetBrand({ brandId, options = {} }) {
259
- this.client._require({ brandId });
260
- const safeBrandId = encodeURIComponent(brandId);
261
- return this.client(`/brand/revet/${safeBrandId}`, { method: "PUT", ...options });
262
- }
316
+ /**
317
+ * Revet a brand that is in UNVERIFIED status due to an update afer it was previously VERIFIED or VETTED_VERIFIED
318
+ * @async
319
+ * @roles api, admin, developer, billing, user
320
+ * @param {Object} params - The parameters for reverting the brand
321
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
322
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
323
+ * @throws {Error} Throws an error if the brandId parameter is missing
324
+ * @returns {Promise<Object>} The response from the server
325
+ */
326
+ async revetBrand({ brandId, options = {} }) {
327
+ this.client._require({ brandId });
328
+ const safeBrandId = encodeURIComponent(brandId);
329
+ return this.client(`/brand/revet/${safeBrandId}`, { method: 'PUT', ...options });
330
+ }
263
331
 
264
- /**
265
- * Delete a brand (mark it as DELETED). The brand will still be retrievable
266
- * @async
267
- * @roles api, admin, developer, billing, user
268
- * @param {Object} params - The parameters for deleting the brand
269
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
270
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
271
- * @throws {Error} Throws an error if the brandId parameter is missing
272
- * @returns {Promise<Object>} The response from the server
273
- */
274
- async deleteBrand({ brandId, options = {} }) {
275
- this.client._require({ brandId });
276
- const safeBrandId = encodeURIComponent(brandId);
277
- return this.client(`/brand/${safeBrandId}`, { method: "DELETE", ...options });
278
- }
332
+ /**
333
+ * Delete a brand (mark it as DELETED). The brand will still be retrievable
334
+ * @async
335
+ * @roles api, admin, developer, billing, user
336
+ * @param {Object} params - The parameters for deleting the brand
337
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
338
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
339
+ * @throws {Error} Throws an error if the brandId parameter is missing
340
+ * @returns {Promise<Object>} The response from the server
341
+ */
342
+ async deleteBrand({ brandId, options = {} }) {
343
+ this.client._require({ brandId });
344
+ const safeBrandId = encodeURIComponent(brandId);
345
+ return this.client(`/brand/${safeBrandId}`, { method: 'DELETE', ...options });
346
+ }
279
347
 
280
- /**
281
- * Get appeal history for a brand
282
- * @async
283
- * @roles api, admin, developer, billing, user
284
- * @param {Object} params - The parameters for getting the appeal history
285
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
286
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
287
- * @throws {Error} Throws an error if the brandId parameter is missing
288
- * @returns {Promise<Array>} Array of BrandAppeal objects
289
- */
290
- async getAppealHistory({ brandId, options = {} }) {
291
- this.client._require({ brandId });
292
- const safeBrandId = encodeURIComponent(brandId);
293
- return this.client(`/brand/appeal/${safeBrandId}`, { method: "GET", ...options });
294
- }
348
+ /**
349
+ * Get appeal history for a brand
350
+ * @async
351
+ * @roles api, admin, developer, billing, user
352
+ * @param {Object} params - The parameters for getting the appeal history
353
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
354
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
355
+ * @throws {Error} Throws an error if the brandId parameter is missing
356
+ * @returns {Promise<Array>} Array of BrandAppeal objects
357
+ */
358
+ async getAppealHistory({ brandId, options = {} }) {
359
+ this.client._require({ brandId });
360
+ const safeBrandId = encodeURIComponent(brandId);
361
+ return this.client(`/brand/appeal/${safeBrandId}`, { method: 'GET', ...options });
362
+ }
295
363
 
296
- /**
297
- * Submit a brand identity status appeal with supporting documentation
298
- * @async
299
- * @roles api, admin, developer, billing, user
300
- * @param {Object} params - The parameters for submitting the appeal
301
- * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
302
- * @param {Array<string>} params.appealCategories - Array of appeal categories (VERIFY_TAX_ID, VERIFY_NON_PROFIT, VERIFY_GOVERNMENT)
303
- * @param {string} params.explanation - Required explanation justifying the appeal
304
- * @param {File|Blob} params.file - The supporting document file
305
- * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
306
- * @throws {Error} Throws an error if required parameters are missing
307
- * @returns {Promise<Object>} The response from the server
308
- */
309
- async submitAppeal({ brandId, appealCategories, explanation, file, options = {} }) {
310
- this.client._require({ brandId, appealCategories, explanation, file });
311
- const safeBrandId = encodeURIComponent(brandId);
312
- const formData = new FormData();
313
- formData.append("appealCategories", JSON.stringify(appealCategories));
314
- formData.append("explanation", explanation);
315
- formData.append("file", file);
316
- return this.multipartClient(`/brand/appeal/${safeBrandId}`, { method: "POST", body: formData, ...options });
317
- }
364
+ /**
365
+ * Submit a brand identity status appeal with supporting documentation
366
+ * @async
367
+ * @roles api, admin, developer, billing, user
368
+ * @param {Object} params - The parameters for submitting the appeal
369
+ * @param {BrandLookupId} params.brandId - Brand lookup id (carrier Brand ID, Mongo `_id`, or internal reference).
370
+ * @param {Array<string>} params.appealCategories - Array of appeal categories (VERIFY_TAX_ID, VERIFY_NON_PROFIT, VERIFY_GOVERNMENT)
371
+ * @param {string} params.explanation - Required explanation justifying the appeal
372
+ * @param {File|Blob} params.file - The supporting document file
373
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
374
+ * @throws {Error} Throws an error if required parameters are missing
375
+ * @returns {Promise<Object>} The response from the server
376
+ */
377
+ async submitAppeal({ brandId, appealCategories, explanation, file, options = {} }) {
378
+ this.client._require({ brandId, appealCategories, explanation, file });
379
+ const safeBrandId = encodeURIComponent(brandId);
380
+ const formData = new FormData();
381
+ formData.append('appealCategories', JSON.stringify(appealCategories));
382
+ formData.append('explanation', explanation);
383
+ formData.append('file', file);
384
+ return this.multipartClient(`/brand/appeal/${safeBrandId}`, { method: 'POST', body: formData, ...options });
385
+ }
318
386
  }