washday-sdk 0.0.13 → 0.0.14

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": "washday-sdk",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -7,9 +7,15 @@ const REQUEST_PARAMS = {
7
7
  token: 'LOGGED_USER_TOKEN',
8
8
  };
9
9
 
10
- export const getStores = async function (this: WashdayClientInstance): Promise<{ stores: IStore[] }> {
10
+ export const getStores = async function (this: WashdayClientInstance, params: {
11
+ isActive?: string
12
+ }): Promise<{ stores: IStore[] }> {
11
13
  try {
12
14
  REQUEST_PARAMS.token = this.apiToken;
15
+ let queryParams = '';
16
+ if (params.isActive) {
17
+ queryParams += `isActive=${params.isActive}`
18
+ }
13
19
  const response = await axiosInstance.get(`${GET_SET_STORES}`, { params: { ...REQUEST_PARAMS } });
14
20
  return response.data?.data?.stores || [];
15
21
  } catch (error) {