washday-sdk 0.0.114 → 0.0.116

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.
@@ -21,3 +21,27 @@ export const appleLogin = function (params) {
21
21
  }
22
22
  });
23
23
  };
24
+ export const customerRegularLogin = function (params) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ try {
27
+ const config = {};
28
+ return yield axiosInstance.post(`${GET_AUTH}/login`, params, config);
29
+ }
30
+ catch (error) {
31
+ console.error('Error fetching customerRegularLogin:', error);
32
+ throw error;
33
+ }
34
+ });
35
+ };
36
+ export const customerSignUp = function (params) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ try {
39
+ const config = {};
40
+ return yield axiosInstance.post(`${GET_AUTH}/signUp`, params, config);
41
+ }
42
+ catch (error) {
43
+ console.error('Error fetching customerSignUp:', error);
44
+ throw error;
45
+ }
46
+ });
47
+ };
@@ -15,7 +15,7 @@ export const deleteCashUpReport = function (storeId, id) {
15
15
  const config = {
16
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
17
  };
18
- return yield axiosInstance.get(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
18
+ return yield axiosInstance.delete(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
19
19
  }
20
20
  catch (error) {
21
21
  console.error('Error fetching:', error);
package/dist/api/index.js CHANGED
@@ -73,6 +73,8 @@ const WashdayClient = function WashdayClient(apiToken) {
73
73
  });
74
74
  this.auth = bindMethods(this, {
75
75
  appleLogin: authEndpoints.postModule.appleLogin,
76
+ customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
77
+ customerSignUp: authEndpoints.postModule.customerSignUp,
76
78
  });
77
79
  this.orders = bindMethods(this, {
78
80
  getList: ordersEndpoints.getModule.getList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -17,3 +17,35 @@ export const appleLogin = async function (this: WashdayClientInstance, params: {
17
17
  throw error;
18
18
  }
19
19
  };
20
+
21
+ export const customerRegularLogin = async function (this: WashdayClientInstance, params: {
22
+ companyId: string;
23
+ storeId: string;
24
+ email: string;
25
+ password: string;
26
+ }): Promise<any> {
27
+ try {
28
+ const config = {};
29
+ return await axiosInstance.post(`${GET_AUTH}/login`, params, config);
30
+ } catch (error) {
31
+ console.error('Error fetching customerRegularLogin:', error);
32
+ throw error;
33
+ }
34
+ };
35
+
36
+ export const customerSignUp = async function (this: WashdayClientInstance, params: {
37
+ storeId: string;
38
+ companyId: string;
39
+ name: string;
40
+ phone: string;
41
+ email: string;
42
+ password: string;
43
+ }): Promise<any> {
44
+ try {
45
+ const config = {};
46
+ return await axiosInstance.post(`${GET_AUTH}/signUp`, params, config);
47
+ } catch (error) {
48
+ console.error('Error fetching customerSignUp:', error);
49
+ throw error;
50
+ }
51
+ };
@@ -7,7 +7,7 @@ export const deleteCashUpReport = async function (this: WashdayClientInstance, s
7
7
  const config = {
8
8
  headers: { Authorization: `Bearer ${this.apiToken}` }
9
9
  };
10
- return await axiosInstance.get(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
10
+ return await axiosInstance.delete(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
11
11
  } catch (error) {
12
12
  console.error('Error fetching:', error);
13
13
  throw error;
package/src/api/index.ts CHANGED
@@ -79,6 +79,8 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
79
79
  });
80
80
  this.auth = bindMethods(this, {
81
81
  appleLogin: authEndpoints.postModule.appleLogin,
82
+ customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
83
+ customerSignUp: authEndpoints.postModule.customerSignUp,
82
84
  });
83
85
  this.orders = bindMethods(this, {
84
86
  getList: ordersEndpoints.getModule.getList,
@@ -55,6 +55,8 @@ export interface WashdayClientInstance {
55
55
  }
56
56
  auth: {
57
57
  appleLogin: typeof authEndpoints.postModule.appleLogin;
58
+ customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
59
+ customerSignUp: typeof authEndpoints.postModule.customerSignUp;
58
60
  }
59
61
  review: {
60
62
  getList: typeof reviewsEndpoints.getModule.getList;