washday-sdk 0.0.107 → 0.0.109
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/dist/api/index.js +1 -0
- package/dist/api/order/get.js +29 -0
- package/package.json +1 -1
- package/src/api/auth/post.ts +1 -0
- package/src/api/index.ts +1 -0
- package/src/api/order/get.ts +41 -1
- package/src/interfaces/Api.ts +1 -0
package/dist/api/index.js
CHANGED
|
@@ -90,6 +90,7 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
90
90
|
createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
|
|
91
91
|
sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
|
|
92
92
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
93
|
+
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
93
94
|
});
|
|
94
95
|
this.customers = bindMethods(this, {
|
|
95
96
|
getCustomers: customersEndpoints.getModule.getList,
|
package/dist/api/order/get.js
CHANGED
|
@@ -12,6 +12,7 @@ import axiosInstance from "../axiosInstance";
|
|
|
12
12
|
const GET_SET_ORDER = 'api/v2/order';
|
|
13
13
|
const GET_SET_ORDER_CFDI = 'api/v2/orders';
|
|
14
14
|
const GET_HEADER_SUMMARY = 'api/orderHeaderSummary';
|
|
15
|
+
const GET_SET_ORDER_CUSTOMERS_APP = 'api/v2/washdayapp/orders';
|
|
15
16
|
export const getList = function (params) {
|
|
16
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
18
|
try {
|
|
@@ -111,3 +112,31 @@ export const fetchOrdersForCFDI = function (params) {
|
|
|
111
112
|
}
|
|
112
113
|
});
|
|
113
114
|
};
|
|
115
|
+
export const getListCustomersApp = function (params) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
try {
|
|
118
|
+
const config = {
|
|
119
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
120
|
+
};
|
|
121
|
+
const queryParams = generateQueryParamsStr([
|
|
122
|
+
'storeId',
|
|
123
|
+
'status',
|
|
124
|
+
'customerId',
|
|
125
|
+
'fromDate',
|
|
126
|
+
'toDate',
|
|
127
|
+
'sequence',
|
|
128
|
+
'pageNum',
|
|
129
|
+
'limit',
|
|
130
|
+
'sequenceSort',
|
|
131
|
+
'cleanedDateTime',
|
|
132
|
+
'readyDateTime',
|
|
133
|
+
'collectedDateTime',
|
|
134
|
+
], params);
|
|
135
|
+
return yield axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}?${queryParams}`, config);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
console.error('Error fetching getListCustomersApp orders:', error);
|
|
139
|
+
throw error;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
};
|
package/package.json
CHANGED
package/src/api/auth/post.ts
CHANGED
|
@@ -5,6 +5,7 @@ import axiosInstance from "../axiosInstance";
|
|
|
5
5
|
const GET_AUTH = "api/v2/washdayapp/auth"
|
|
6
6
|
|
|
7
7
|
export const appleLogin = async function (this: WashdayClientInstance, params: {
|
|
8
|
+
companyId: string;
|
|
8
9
|
storeId: string;
|
|
9
10
|
credentials: AppleAuthenticationCredential,
|
|
10
11
|
}): Promise<any> {
|
package/src/api/index.ts
CHANGED
|
@@ -96,6 +96,7 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
96
96
|
createPaymentLine: ordersEndpoints.postModule.createPaymentLine,
|
|
97
97
|
sendEmailReceipt: ordersEndpoints.postModule.sendEmailReceipt,
|
|
98
98
|
deletePaymentLineById: ordersEndpoints.deleteModule.deletePaymentLineById,
|
|
99
|
+
getListCustomersApp: ordersEndpoints.getModule.getListCustomersApp,
|
|
99
100
|
});
|
|
100
101
|
this.customers = bindMethods(this, {
|
|
101
102
|
getCustomers: customersEndpoints.getModule.getList,
|
package/src/api/order/get.ts
CHANGED
|
@@ -5,6 +5,7 @@ import axiosInstance from "../axiosInstance";
|
|
|
5
5
|
const GET_SET_ORDER = 'api/v2/order';
|
|
6
6
|
const GET_SET_ORDER_CFDI = 'api/v2/orders';
|
|
7
7
|
const GET_HEADER_SUMMARY = 'api/orderHeaderSummary';
|
|
8
|
+
const GET_SET_ORDER_CUSTOMERS_APP = 'api/v2/washdayapp/orders';
|
|
8
9
|
|
|
9
10
|
export const getList = async function (this: WashdayClientInstance, params: {
|
|
10
11
|
store: string | undefined,
|
|
@@ -119,4 +120,43 @@ export const fetchOrdersForCFDI = async function (this: WashdayClientInstance, p
|
|
|
119
120
|
console.error('Error fetching:', error);
|
|
120
121
|
throw error;
|
|
121
122
|
}
|
|
122
|
-
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const getListCustomersApp = async function (this: WashdayClientInstance, params: {
|
|
126
|
+
storeId: string | undefined,
|
|
127
|
+
status: string | undefined,
|
|
128
|
+
customerId: string | undefined,
|
|
129
|
+
fromDate: string | undefined,
|
|
130
|
+
toDate: string | undefined,
|
|
131
|
+
sequence: string | undefined,
|
|
132
|
+
pageNum: string | undefined,
|
|
133
|
+
limit: string | undefined,
|
|
134
|
+
sequenceSort: string,
|
|
135
|
+
cleanedDateTime: string | undefined,
|
|
136
|
+
readyDateTime: string | undefined,
|
|
137
|
+
collectedDateTime: string | undefined,
|
|
138
|
+
}): Promise<any> {
|
|
139
|
+
try {
|
|
140
|
+
const config = {
|
|
141
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
142
|
+
};
|
|
143
|
+
const queryParams = generateQueryParamsStr([
|
|
144
|
+
'storeId',
|
|
145
|
+
'status',
|
|
146
|
+
'customerId',
|
|
147
|
+
'fromDate',
|
|
148
|
+
'toDate',
|
|
149
|
+
'sequence',
|
|
150
|
+
'pageNum',
|
|
151
|
+
'limit',
|
|
152
|
+
'sequenceSort',
|
|
153
|
+
'cleanedDateTime',
|
|
154
|
+
'readyDateTime',
|
|
155
|
+
'collectedDateTime',
|
|
156
|
+
], params);
|
|
157
|
+
return await axiosInstance.get(`${GET_SET_ORDER_CUSTOMERS_APP}?${queryParams}`, config);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
console.error('Error fetching getListCustomersApp orders:', error);
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
};
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -82,6 +82,7 @@ export interface WashdayClientInstance {
|
|
|
82
82
|
setOrdeDeliveredBySequence: typeof ordersEndpoints.putModule.setOrdeDeliveredBySequence,
|
|
83
83
|
createPaymentLine: typeof ordersEndpoints.postModule.createPaymentLine;
|
|
84
84
|
deletePaymentLineById: typeof ordersEndpoints.deleteModule.deletePaymentLineById;
|
|
85
|
+
getListCustomersApp: typeof ordersEndpoints.getModule.getListCustomersApp;
|
|
85
86
|
};
|
|
86
87
|
customers: {
|
|
87
88
|
getCustomers: typeof customersEndpoints.getModule.getList;
|