washday-sdk 0.0.198 → 0.0.200

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.
@@ -12,7 +12,9 @@ const GET_SET_USER = 'api/users';
12
12
  export const validateUserPin = function (data) {
13
13
  return __awaiter(this, void 0, void 0, function* () {
14
14
  try {
15
- const config = {};
15
+ const config = {
16
+ headers: { Authorization: `Bearer ${this.apiToken}` }
17
+ };
16
18
  return yield axiosInstance.post(`${GET_SET_USER}/validate-pin`, data, config);
17
19
  }
18
20
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.198",
3
+ "version": "0.0.200",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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,11 +4,12 @@ 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
- userId: string,
8
7
  pin: string
9
8
  }): Promise<any> {
10
9
  try {
11
- const config = {};
10
+ const config = {
11
+ headers: { Authorization: `Bearer ${this.apiToken}` }
12
+ };
12
13
  return await axiosInstance.post(`${GET_SET_USER}/validate-pin`, data, config);
13
14
  } catch (error) {
14
15
  console.error('Error fetching validateUserPin:', error);