washday-sdk 0.0.199 → 0.0.201

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.
@@ -154,3 +154,17 @@ export const customersAppChangePassword = function (params) {
154
154
  }
155
155
  });
156
156
  };
157
+ export const pinLogin = function (data) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ try {
160
+ const config = {
161
+ headers: { Authorization: `Bearer ${this.apiToken}` }
162
+ };
163
+ return yield axiosInstance.post(`${REGULAR_USER_AUTH}/pin-login`, data, config);
164
+ }
165
+ catch (error) {
166
+ console.error('Error fetching pinLogin:', error);
167
+ throw error;
168
+ }
169
+ });
170
+ };
package/dist/api/index.js CHANGED
@@ -99,6 +99,7 @@ const WashdayClient = function WashdayClient(apiToken) {
99
99
  customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
100
100
  customerSignUp: authEndpoints.postModule.customerSignUp,
101
101
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
102
+ pinLogin: authEndpoints.postModule.pinLogin,
102
103
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
103
104
  forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
104
105
  customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.199",
3
+ "version": "0.0.201",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -181,4 +181,18 @@ export const customersAppChangePassword = async function (this: WashdayClientIns
181
181
  console.error('Error fetching customerSignUp:', error);
182
182
  throw error;
183
183
  }
184
+ };
185
+
186
+ export const pinLogin = async function (this: WashdayClientInstance, data: {
187
+ pinCode: string;
188
+ }): Promise<any> {
189
+ try {
190
+ const config = {
191
+ headers: { Authorization: `Bearer ${this.apiToken}` }
192
+ };
193
+ return await axiosInstance.post(`${REGULAR_USER_AUTH}/pin-login`, data, config);
194
+ } catch (error) {
195
+ console.error('Error fetching pinLogin:', error);
196
+ throw error;
197
+ }
184
198
  };
package/src/api/index.ts CHANGED
@@ -106,6 +106,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
106
106
  customerRegularLogin: authEndpoints.postModule.customerRegularLogin,
107
107
  customerSignUp: authEndpoints.postModule.customerSignUp,
108
108
  regularUserLogin: authEndpoints.postModule.regularUserLogin,
109
+ pinLogin: authEndpoints.postModule.pinLogin,
109
110
  regularUserTokenLogin: authEndpoints.postModule.regularUserTokenLogin,
110
111
  forgotPassword: authEndpoints.postModule.customersAppForgotPassword,
111
112
  customersAppForgotPassword: authEndpoints.postModule.customersAppForgotPassword,
@@ -11,7 +11,8 @@ export const createPaymentLine = async function (this: WashdayClientInstance, id
11
11
  amountPaid: number,
12
12
  cashierBox: string,
13
13
  paymentMethod: string
14
- paymentDate: Date
14
+ paymentDate: Date,
15
+ pinUserId?: string
15
16
  }): Promise<any> {
16
17
  try {
17
18
  const config = {
@@ -69,6 +70,7 @@ export const bulkCreatePaymentLines = async function (this: WashdayClientInstanc
69
70
  amount: number;
70
71
  cashierBoxId: string;
71
72
  paymentDate: Date;
73
+ pinUserId?: string;
72
74
  }[],
73
75
  }): Promise<AxiosResponse<any, any>> {
74
76
  try {
@@ -43,6 +43,7 @@ export const updateById = async function (this: WashdayClientInstance, id: strin
43
43
  export const updatePaymentLineById = async function (this: WashdayClientInstance, orderId: string, id: string, data: {
44
44
  amountPaid: number
45
45
  updatedDate: Date
46
+ pinUserId?: string
46
47
  }): Promise<any> {
47
48
  try {
48
49
  const config = {
@@ -103,7 +104,8 @@ export const setOrderCleanedBySequence = async function (this: WashdayClientInst
103
104
 
104
105
  export const setOrderCollectedBySequence = async function (this: WashdayClientInstance, sequence: string, storeId: string, data: {
105
106
  collectedDateTime: string;
106
- collectWithAmountDue?: boolean
107
+ collectWithAmountDue?: boolean,
108
+ pinUserId?: string
107
109
  }): Promise<any> {
108
110
  try {
109
111
  const config = {
@@ -4,7 +4,6 @@ import axiosInstance from "../axiosInstance";
4
4
  const GET_SET_USER = 'api/users';
5
5
 
6
6
  export const validateUserPin = async function (this: WashdayClientInstance, data: {
7
- companyId: string,
8
7
  pin: string
9
8
  }): Promise<any> {
10
9
  try {
@@ -69,6 +69,7 @@ export interface WashdayClientInstance {
69
69
  customerRegularLogin: typeof authEndpoints.postModule.customerRegularLogin;
70
70
  customerSignUp: typeof authEndpoints.postModule.customerSignUp;
71
71
  regularUserLogin: typeof authEndpoints.postModule.regularUserLogin;
72
+ pinLogin: typeof authEndpoints.postModule.pinLogin;
72
73
  regularUserTokenLogin: typeof authEndpoints.postModule.regularUserTokenLogin;
73
74
  forgotPassword: typeof authEndpoints.postModule.forgotPassword;
74
75
  customersAppForgotPassword: typeof authEndpoints.postModule.customersAppForgotPassword;