washday-sdk 0.0.151 → 0.0.153

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.
@@ -106,3 +106,27 @@ export const forgotPassword = function (params) {
106
106
  }
107
107
  });
108
108
  };
109
+ export const customersAppForgotPassword = function (companyId, params) {
110
+ return __awaiter(this, void 0, void 0, function* () {
111
+ try {
112
+ const config = {};
113
+ return yield axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/${companyId}/forget-password`, params, config);
114
+ }
115
+ catch (error) {
116
+ console.error('Error fetching customersAppForgotPassword:', error);
117
+ throw error;
118
+ }
119
+ });
120
+ };
121
+ export const customersAppChangePassword = function (params) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ try {
124
+ const config = {};
125
+ return yield axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/change-password`, params, config);
126
+ }
127
+ catch (error) {
128
+ console.error('Error fetching customerSignUp:', error);
129
+ throw error;
130
+ }
131
+ });
132
+ };
@@ -15,7 +15,7 @@ export const getCashierboxesByStoreId = function (storeId, queryParams) {
15
15
  const config = {
16
16
  headers: { Authorization: `Bearer ${this.apiToken}` }
17
17
  };
18
- const response = yield axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams}`, config);
18
+ const response = yield axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams || ''}`, config);
19
19
  return response;
20
20
  }
21
21
  catch (error) {
package/dist/api/index.js CHANGED
@@ -82,7 +82,9 @@ const WashdayClient = function WashdayClient(apiToken) {
82
82
  customerSignUp: authEndpoints.postModule.customerSignUp,
83
83
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
84
84
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
85
- forgotPassword: authEndpoints.postModule.forgotPassword,
85
+ forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
86
+ customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
87
+ customersAppChangePassword: authEndpoints.postModule.customersAppChangePassword,
86
88
  });
87
89
  this.orders = bindMethods(this, {
88
90
  getList: ordersEndpoints.getModule.getList,
@@ -110,7 +112,8 @@ const WashdayClient = function WashdayClient(apiToken) {
110
112
  getRequestedOrdersSummary: ordersEndpoints.getModule.getRequestedOrdersSummary,
111
113
  bulkCancel: ordersEndpoints.putModule.bulkCancel,
112
114
  bulkClean: ordersEndpoints.putModule.bulkClean,
113
- bulkCollect: ordersEndpoints.putModule.bulkCollect
115
+ bulkCollect: ordersEndpoints.putModule.bulkCollect,
116
+ cancelOrderByIdCustomersApp: ordersEndpoints.deleteModule.cancelOrderByIdCustomersApp
114
117
  });
115
118
  this.customers = bindMethods(this, {
116
119
  getCustomers: customersEndpoints.getModule.getList,
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import axiosInstance from "../axiosInstance";
11
11
  const GET_SET_ORDER_PAYMENTLINES = (orderId) => `/api/v2/order/${orderId}/paymentLines`;
12
+ const GET_SET_ORDER_CUSTOMERS_APP = 'api/v2/washdayapp/orders';
12
13
  export const deletePaymentLineById = function (orderId, id) {
13
14
  return __awaiter(this, void 0, void 0, function* () {
14
15
  try {
@@ -23,3 +24,17 @@ export const deletePaymentLineById = function (orderId, id) {
23
24
  }
24
25
  });
25
26
  };
27
+ export const cancelOrderByIdCustomersApp = function (id) {
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ try {
30
+ const config = {
31
+ headers: { Authorization: `Bearer ${this.apiToken}` }
32
+ };
33
+ return yield axiosInstance.delete(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
34
+ }
35
+ catch (error) {
36
+ console.error('Error fetching cancelOrderByIdCustomersApp:', error);
37
+ throw error;
38
+ }
39
+ });
40
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.151",
3
+ "version": "0.0.153",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -121,3 +121,29 @@ export const forgotPassword = async function (this: WashdayClientInstance, param
121
121
  throw error;
122
122
  }
123
123
  };
124
+
125
+
126
+ export const customersAppForgotPassword = async function (this: WashdayClientInstance, companyId: string, params: {
127
+ email: string;
128
+ }): Promise<any> {
129
+ try {
130
+ const config = {};
131
+ return await axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/${companyId}/forget-password`, params, config);
132
+ } catch (error) {
133
+ console.error('Error fetching customersAppForgotPassword:', error);
134
+ throw error;
135
+ }
136
+ };
137
+
138
+ export const customersAppChangePassword = async function (this: WashdayClientInstance, params: {
139
+ password: string
140
+ token: string | null
141
+ }): Promise<any> {
142
+ try {
143
+ const config = {};
144
+ return await axiosInstance.post(`${CUSTOMERSAPP_GET_AUTH}/change-password`, params, config);
145
+ } catch (error) {
146
+ console.error('Error fetching customerSignUp:', error);
147
+ throw error;
148
+ }
149
+ };
@@ -8,7 +8,7 @@ export const getCashierboxesByStoreId = async function (this: WashdayClientInsta
8
8
  const config = {
9
9
  headers: { Authorization: `Bearer ${this.apiToken}` }
10
10
  };
11
- const response = await axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams}`, config);
11
+ const response = await axiosInstance.get(`${GET_SET_CASHIER_BOX(storeId)}?${queryParams || ''}`, config);
12
12
  return response;
13
13
  } catch (error) {
14
14
  console.error('Error fetching getCashierboxesByStoreId:', error);
package/src/api/index.ts CHANGED
@@ -37,6 +37,7 @@ import * as reviewsEndpoints from './reviews';
37
37
  import * as cfdiEndpoints from './cfdi';
38
38
  import * as cashupsEndpoints from './cashups';
39
39
  import { deleteUserById } from "./users/delete";
40
+ import { customersAppChangePassword } from './auth/post';
40
41
 
41
42
  type WashdayClientConstructor = {
42
43
  new(apiToken: string): WashdayClientInstance
@@ -88,7 +89,9 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
88
89
  customerSignUp: authEndpoints.postModule.customerSignUp,
89
90
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
90
91
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
91
- forgotPassword: authEndpoints.postModule.forgotPassword,
92
+ forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
93
+ customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
94
+ customersAppChangePassword: authEndpoints.postModule.customersAppChangePassword,
92
95
  });
93
96
  this.orders = bindMethods(this, {
94
97
  getList: ordersEndpoints.getModule.getList,
@@ -116,7 +119,8 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
116
119
  getRequestedOrdersSummary: ordersEndpoints.getModule.getRequestedOrdersSummary,
117
120
  bulkCancel: ordersEndpoints.putModule.bulkCancel,
118
121
  bulkClean: ordersEndpoints.putModule.bulkClean,
119
- bulkCollect: ordersEndpoints.putModule.bulkCollect
122
+ bulkCollect: ordersEndpoints.putModule.bulkCollect,
123
+ cancelOrderByIdCustomersApp: ordersEndpoints.deleteModule.cancelOrderByIdCustomersApp
120
124
  });
121
125
  this.customers = bindMethods(this, {
122
126
  getCustomers: customersEndpoints.getModule.getList,
@@ -1,6 +1,7 @@
1
1
  import { WashdayClientInstance } from "../../interfaces/Api";
2
2
  import axiosInstance from "../axiosInstance";
3
3
  const GET_SET_ORDER_PAYMENTLINES = (orderId: string) => `/api/v2/order/${orderId}/paymentLines`;
4
+ const GET_SET_ORDER_CUSTOMERS_APP = 'api/v2/washdayapp/orders';
4
5
 
5
6
  export const deletePaymentLineById = async function (this: WashdayClientInstance, orderId: string, id: string): Promise<any> {
6
7
  try {
@@ -13,3 +14,16 @@ export const deletePaymentLineById = async function (this: WashdayClientInstance
13
14
  throw error;
14
15
  }
15
16
  };
17
+
18
+
19
+ export const cancelOrderByIdCustomersApp = async function (this: WashdayClientInstance, id: string): Promise<any> {
20
+ try {
21
+ const config = {
22
+ headers: { Authorization: `Bearer ${this.apiToken}` }
23
+ };
24
+ return await axiosInstance.delete(`${GET_SET_ORDER_CUSTOMERS_APP}/${id}`, config);
25
+ } catch (error) {
26
+ console.error('Error fetching cancelOrderByIdCustomersApp:', error);
27
+ throw error;
28
+ }
29
+ };
@@ -65,6 +65,8 @@ export interface WashdayClientInstance {
65
65
  regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
66
66
  regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
67
67
  forgotPassword: typeof authEndpoints.postModule.forgotPassword;
68
+ customersAppForgotPassword: typeof authEndpoints.postModule.customersAppForgotPassword;
69
+ customersAppChangePassword: typeof authEndpoints.postModule.customersAppChangePassword;
68
70
  }
69
71
  review: {
70
72
  getList: typeof reviewsEndpoints.getModule.getList;
@@ -102,7 +104,8 @@ export interface WashdayClientInstance {
102
104
  getRequestedOrdersSummary: typeof ordersEndpoints.getModule.getRequestedOrdersSummary;
103
105
  bulkCancel: typeof ordersEndpoints.putModule.bulkCancel,
104
106
  bulkClean: typeof ordersEndpoints.putModule.bulkClean,
105
- bulkCollect: typeof ordersEndpoints.putModule.bulkCollect
107
+ bulkCollect: typeof ordersEndpoints.putModule.bulkCollect,
108
+ cancelOrderByIdCustomersApp: typeof ordersEndpoints.deleteModule.cancelOrderByIdCustomersApp;
106
109
  };
107
110
  customers: {
108
111
  getCustomers: typeof customersEndpoints.getModule.getList;
@@ -15,6 +15,8 @@ export interface IStore {
15
15
  state: string,
16
16
  country: string,
17
17
  phone: string,
18
+ phoneCountryCode?: string,
19
+ phoneCountryName?: string,
18
20
  taxesType: string,
19
21
  taxOne?: ITax,
20
22
  isActive: boolean,