@signalhousellc/sdk 1.0.37 → 1.0.38

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.37",
3
+ "version": "1.0.38",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -119,11 +119,14 @@ export class Campaigns {
119
119
  * @param {number} [params.page] - The page number for pagination
120
120
  * @param {number} [params.limit] - The number of items per page
121
121
  * @param {string} [params.status] - The status of the campaign to filter by
122
+ * @param {string} [params.search] - Search term to filter campaigns by campaignId or brandId
123
+ * @param {string} [params.sortBy] - Field to sort by (e.g. "createdAt", "campaignId", "brandId", "groupId", "subgroupId", "usecase", "status")
124
+ * @param {string} [params.sortOrder] - Sort direction ("asc" or "desc")
122
125
  * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
123
- * @returns {Promise<Array>} The response from the server
126
+ * @returns {Promise<Array|Object>} The response from the server - array when unpaginated, or { data, total, page, limit, totalPages } when paginated
124
127
  */
125
- async getCampaigns({ id, brandId, subgroupId, groupId, page, limit, status, options = {} }) {
126
- const filters = { id, brandId, subgroupId, groupId, page, limit, status };
128
+ async getCampaigns({ id, brandId, subgroupId, groupId, page, limit, status, search, sortBy, sortOrder, options = {} }) {
129
+ const filters = { id, brandId, subgroupId, groupId, page, limit, status, search, sortBy, sortOrder };
127
130
  const queryString = this.client._getQueryString(filters);
128
131
  return this.client(`/campaign${queryString}`, { method: "GET", ...options });
129
132
  }