washday-sdk 1.6.80 → 1.6.81
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 +2 -0
- package/dist/api/routes/get.js +42 -0
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -119,6 +119,8 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
119
119
|
updateRouteById: routesEndpoints.putModule.updateRouteById,
|
|
120
120
|
getRoutesByDriver: routesEndpoints.getModule.getRoutesByDriver,
|
|
121
121
|
getRoutes: routesEndpoints.getModule.getRoutes,
|
|
122
|
+
getRoutesPage: routesEndpoints.getModule.getRoutesPage,
|
|
123
|
+
getRoutesByStorePage: routesEndpoints.getModule.getRoutesByStorePage,
|
|
122
124
|
startRoute: routesEndpoints.postModule.startRoute,
|
|
123
125
|
reorderRouteOrders: routesEndpoints.patchModule.reorderRouteOrders,
|
|
124
126
|
});
|
package/dist/api/routes/get.js
CHANGED
|
@@ -61,6 +61,24 @@ export const getRoutesByStore = function (storeId) {
|
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
+
export const getRoutesByStorePage = function (storeId_1) {
|
|
65
|
+
return __awaiter(this, arguments, void 0, function* (storeId, query = {}) {
|
|
66
|
+
try {
|
|
67
|
+
const config = {
|
|
68
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
69
|
+
};
|
|
70
|
+
const queryParams = generateQueryParamsStr([
|
|
71
|
+
'pageNum',
|
|
72
|
+
'limit',
|
|
73
|
+
], query);
|
|
74
|
+
return yield this.axiosInstance.get(`${GET_STORE_ROUTES_BY_ID.replace(':id', storeId)}?${queryParams}`, config);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
console.error('Error fetching getRoutesByStorePage:', error);
|
|
78
|
+
throw error;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
};
|
|
64
82
|
export const getRouteByIdV2 = function (routeId) {
|
|
65
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
84
|
try {
|
|
@@ -129,3 +147,27 @@ export const getRoutes = function () {
|
|
|
129
147
|
}
|
|
130
148
|
});
|
|
131
149
|
};
|
|
150
|
+
export const getRoutesPage = function () {
|
|
151
|
+
return __awaiter(this, arguments, void 0, function* (query = {}) {
|
|
152
|
+
try {
|
|
153
|
+
const config = {
|
|
154
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
155
|
+
};
|
|
156
|
+
const queryParams = generateQueryParamsStr([
|
|
157
|
+
'scope',
|
|
158
|
+
'storeIds',
|
|
159
|
+
'status',
|
|
160
|
+
'driver',
|
|
161
|
+
'createdFrom',
|
|
162
|
+
'createdTo',
|
|
163
|
+
'pageNum',
|
|
164
|
+
'limit',
|
|
165
|
+
], query);
|
|
166
|
+
return yield this.axiosInstance.get(`${GET_ROUTE}?${queryParams}`, config);
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
console.error('Error fetching getRoutesPage:', error);
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
};
|