@signalhousellc/sdk 1.0.36 → 1.0.37

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.36",
3
+ "version": "1.0.37",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -56,11 +56,16 @@ export class Users {
56
56
  * @param {Object} params - The parameters for getting users
57
57
  * @param {string} [params.email] - Filter users by email (partial match)
58
58
  * @param {string} [params.userType] - Filter users by type (user, service)
59
+ * @param {number} [params.page] - Page number for pagination
60
+ * @param {number} [params.limit] - Items per page
61
+ * @param {string} [params.search] - Search users by email (case-insensitive)
62
+ * @param {string} [params.sortBy] - Field to sort by (createdAt, email, activeGroupId, companyName, status, _id)
63
+ * @param {string} [params.sortOrder] - Sort direction (asc, desc)
59
64
  * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
60
65
  * @returns {Promise<Object>} - A promise that resolves to the list of users
61
66
  */
62
- getUsers: async ({ email, userType, options = {} }) => {
63
- const filters = { email, userType };
67
+ getUsers: async ({ email, userType, page, limit, search, sortBy, sortOrder, options = {} }) => {
68
+ const filters = { email, userType, page, limit, search, sortBy, sortOrder };
64
69
  const queryString = this.client._getQueryString(filters);
65
70
  return this.client(`/user${queryString}`, { method: "GET", ...options });
66
71
  },
@@ -89,11 +94,16 @@ export class Users {
89
94
  * @param {string} [params.id] - Filter by user ID
90
95
  * @param {string} [params.groupId] - Filter by group ID
91
96
  * @param {string} [params.userType] - Filter by user type (user, service)
97
+ * @param {number} [params.page] - Page number for pagination
98
+ * @param {number} [params.limit] - Items per page
99
+ * @param {string} [params.search] - Search users by email (case-insensitive)
100
+ * @param {string} [params.sortBy] - Field to sort by (createdAt, email, activeGroupId, companyName, status, _id)
101
+ * @param {string} [params.sortOrder] - Sort direction (asc, desc)
92
102
  * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
93
103
  * @returns {Promise<Object>} - A promise that resolves to the list of users
94
104
  */
95
- async getUsers({ id, groupId, userType, options = {} }) {
96
- const filters = { id, groupId, userType };
105
+ async getUsers({ id, groupId, userType, page, limit, search, sortBy, sortOrder, options = {} }) {
106
+ const filters = { id, groupId, userType, page, limit, search, sortBy, sortOrder };
97
107
  const queryString = this.client._getQueryString(filters);
98
108
  return this.client(`/user${queryString}`, { method: "GET", ...options });
99
109
  }