washday-sdk 1.6.8 → 1.6.10
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/csv/get.js +2 -2
- package/dist/api/index.js +4 -2
- package/dist/api/stores/get.js +15 -0
- package/dist/api/stores/put.js +14 -0
- package/package.json +1 -1
- package/src/api/csv/get.ts +2 -2
- package/src/api/index.ts +4 -2
- package/src/api/stores/get.ts +14 -0
- package/src/api/stores/put.ts +14 -0
- package/src/interfaces/Api.ts +4 -2
package/dist/api/csv/get.js
CHANGED
|
@@ -379,8 +379,8 @@ export const exportScheduledDeliveriesReport = function (companyId, params) {
|
|
|
379
379
|
const config = {
|
|
380
380
|
headers: {
|
|
381
381
|
Authorization: `Bearer ${this.apiToken}`,
|
|
382
|
-
'Content-Type': '
|
|
383
|
-
'Content-disposition': 'attachment; filename=[file.
|
|
382
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
383
|
+
'Content-disposition': 'attachment; filename=[file.xlsx]'
|
|
384
384
|
},
|
|
385
385
|
params: {
|
|
386
386
|
responseType: 'blob'
|
package/dist/api/index.js
CHANGED
|
@@ -13,9 +13,9 @@ import { deleteStoreStaffById } from "./staff/delete";
|
|
|
13
13
|
import { getStoreStaff, getStoreStaffById } from "./staff/get";
|
|
14
14
|
import { createStoreStaff } from "./staff/post";
|
|
15
15
|
import { updateStoreStaffById } from "./staff/put";
|
|
16
|
-
import { getOrderSequence, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "./stores/get";
|
|
16
|
+
import { getOrderSequence, getPaymentFees, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "./stores/get";
|
|
17
17
|
import { copyStore, createStore, createStoreImage } from "./stores/post";
|
|
18
|
-
import { deleteStoreById, setOrderSequence, updateStoreById } from "./stores/put";
|
|
18
|
+
import { deleteStoreById, setOrderSequence, updatePaymentFees, updateStoreById } from "./stores/put";
|
|
19
19
|
import { createCFDISuscrptionCheckoutSession, createCreateSuscriptionCheckoutSession, createCustomerPortalSession, createGetMoreCheckoutSession } from "./stripe/post";
|
|
20
20
|
import { deleteSupplyById } from "./supplies/delete";
|
|
21
21
|
import { getSupplies, getSupplyById, getSupplyHistory } from "./supplies/get";
|
|
@@ -173,6 +173,8 @@ const WashdayClient = function WashdayClient(apiToken, env = 'PROD', clientId, c
|
|
|
173
173
|
deleteStoreById: deleteStoreById,
|
|
174
174
|
getOrderSequence: getOrderSequence,
|
|
175
175
|
setOrderSequence: setOrderSequence,
|
|
176
|
+
getPaymentFees: getPaymentFees,
|
|
177
|
+
updatePaymentFees: updatePaymentFees,
|
|
176
178
|
});
|
|
177
179
|
this.products = bindMethods(this, {
|
|
178
180
|
getById: productsEndpoints.getModule.getById,
|
package/dist/api/stores/get.js
CHANGED
|
@@ -122,3 +122,18 @@ export const getOrderSequence = function (storeId) {
|
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
};
|
|
125
|
+
export const getPaymentFees = function (storeId) {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
try {
|
|
128
|
+
const config = {
|
|
129
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
130
|
+
};
|
|
131
|
+
return yield this.axiosInstance.get(`${GET_SET_STORES}/${storeId}/payment-fees`, config)
|
|
132
|
+
.then(response => { var _a; return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.data) || {}; });
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
console.error('Error fetching getPaymentFees:', error);
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
};
|
package/dist/api/stores/put.js
CHANGED
|
@@ -56,3 +56,17 @@ export const setOrderSequence = function (storeId, data) {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
};
|
|
59
|
+
export const updatePaymentFees = function (storeId, data) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
try {
|
|
62
|
+
const config = {
|
|
63
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
64
|
+
};
|
|
65
|
+
return yield this.axiosInstance.put(`${GET_SET_STORES}/${storeId}/payment-fees`, data, config);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
console.error('Error fetching updatePaymentFees:', error);
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
};
|
package/package.json
CHANGED
package/src/api/csv/get.ts
CHANGED
|
@@ -417,8 +417,8 @@ export const exportScheduledDeliveriesReport = async function (this: WashdayClie
|
|
|
417
417
|
const config = {
|
|
418
418
|
headers: {
|
|
419
419
|
Authorization: `Bearer ${this.apiToken}`,
|
|
420
|
-
'Content-Type': '
|
|
421
|
-
'Content-disposition': 'attachment; filename=[file.
|
|
420
|
+
'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
421
|
+
'Content-disposition': 'attachment; filename=[file.xlsx]'
|
|
422
422
|
},
|
|
423
423
|
params: {
|
|
424
424
|
responseType: 'blob'
|
package/src/api/index.ts
CHANGED
|
@@ -14,9 +14,9 @@ import { deleteStoreStaffById } from "./staff/delete";
|
|
|
14
14
|
import { getStoreStaff, getStoreStaffById } from "./staff/get";
|
|
15
15
|
import { createStoreStaff } from "./staff/post";
|
|
16
16
|
import { updateStoreStaffById } from "./staff/put";
|
|
17
|
-
import { getOrderSequence, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "./stores/get";
|
|
17
|
+
import { getOrderSequence, getPaymentFees, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "./stores/get";
|
|
18
18
|
import { copyStore, createStore, createStoreImage } from "./stores/post";
|
|
19
|
-
import { deleteStoreById, setOrderSequence, updateStoreById } from "./stores/put";
|
|
19
|
+
import { deleteStoreById, setOrderSequence, updatePaymentFees, updateStoreById } from "./stores/put";
|
|
20
20
|
import { createCFDISuscrptionCheckoutSession, createCreateSuscriptionCheckoutSession, createCustomerPortalSession, createGetMoreCheckoutSession } from "./stripe/post";
|
|
21
21
|
import { deleteSupplyById } from "./supplies/delete";
|
|
22
22
|
import { getSupplies, getSupplyById, getSupplyHistory } from "./supplies/get";
|
|
@@ -180,6 +180,8 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
180
180
|
deleteStoreById: deleteStoreById,
|
|
181
181
|
getOrderSequence: getOrderSequence,
|
|
182
182
|
setOrderSequence: setOrderSequence,
|
|
183
|
+
getPaymentFees: getPaymentFees,
|
|
184
|
+
updatePaymentFees: updatePaymentFees,
|
|
183
185
|
});
|
|
184
186
|
this.products = bindMethods(this, {
|
|
185
187
|
getById: productsEndpoints.getModule.getById,
|
package/src/api/stores/get.ts
CHANGED
|
@@ -104,3 +104,17 @@ export const getOrderSequence = async function (this: WashdayClientInstance, sto
|
|
|
104
104
|
throw error;
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
export const getPaymentFees = async function (this: WashdayClientInstance, storeId: string): Promise<any> {
|
|
110
|
+
try {
|
|
111
|
+
const config = {
|
|
112
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
113
|
+
};
|
|
114
|
+
return await this.axiosInstance.get(`${GET_SET_STORES}/${storeId}/payment-fees`, config)
|
|
115
|
+
.then(response => response.data?.data || {});
|
|
116
|
+
} catch (error) {
|
|
117
|
+
console.error('Error fetching getPaymentFees:', error);
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
};
|
package/src/api/stores/put.ts
CHANGED
|
@@ -45,4 +45,18 @@ export const setOrderSequence = async function (this: WashdayClientInstance, sto
|
|
|
45
45
|
console.error('Error fetching setOrderSequence:', error);
|
|
46
46
|
throw error;
|
|
47
47
|
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const updatePaymentFees = async function (this: WashdayClientInstance, storeId: string, data: {
|
|
51
|
+
paymentFees: any[]
|
|
52
|
+
}): Promise<any> {
|
|
53
|
+
try {
|
|
54
|
+
const config = {
|
|
55
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
56
|
+
};
|
|
57
|
+
return await this.axiosInstance.put(`${GET_SET_STORES}/${storeId}/payment-fees`, data, config);
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error('Error fetching updatePaymentFees:', error);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
48
62
|
};
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -13,9 +13,9 @@ import { deleteStoreStaffById } from "../api/staff/delete";
|
|
|
13
13
|
import { getStoreStaff, getStoreStaffById } from "../api/staff/get";
|
|
14
14
|
import { createStoreStaff } from "../api/staff/post";
|
|
15
15
|
import { updateStoreStaffById } from "../api/staff/put";
|
|
16
|
-
import { getOrderSequence, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "../api/stores/get";
|
|
16
|
+
import { getOrderSequence, getPaymentFees, getStoreById, getStoreImages, getStoreReviewLink, getStores, getStoresByIdCustomersApp, getStoresByName } from "../api/stores/get";
|
|
17
17
|
import { copyStore, createStore, createStoreImage } from "../api/stores/post";
|
|
18
|
-
import { deleteStoreById, setOrderSequence, updateStoreById } from "../api/stores/put";
|
|
18
|
+
import { deleteStoreById, setOrderSequence, updatePaymentFees, updateStoreById } from "../api/stores/put";
|
|
19
19
|
import { createCFDISuscrptionCheckoutSession, createCreateSuscriptionCheckoutSession, createCustomerPortalSession, createGetMoreCheckoutSession } from "../api/stripe/post";
|
|
20
20
|
import { deleteSupplyById } from "../api/supplies/delete";
|
|
21
21
|
import { getSupplies, getSupplyById, getSupplyHistory } from "../api/supplies/get";
|
|
@@ -165,6 +165,8 @@ export interface WashdayClientInstance {
|
|
|
165
165
|
deleteStoreById: typeof deleteStoreById;
|
|
166
166
|
getOrderSequence: typeof getOrderSequence;
|
|
167
167
|
setOrderSequence: typeof setOrderSequence;
|
|
168
|
+
getPaymentFees: typeof getPaymentFees;
|
|
169
|
+
updatePaymentFees: typeof updatePaymentFees;
|
|
168
170
|
};
|
|
169
171
|
products: {
|
|
170
172
|
getById: typeof productsEndpoints.getModule.getById;
|