washday-sdk 0.0.112 → 0.0.114
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/cashups/delete.js +25 -15
- package/dist/api/cashups/index.js +1 -1
- package/dist/api/index.js +2 -1
- package/package.json +1 -1
- package/src/api/cashups/delete.ts +14 -14
- package/src/api/cashups/index.ts +1 -1
- package/src/api/index.ts +2 -1
- package/src/interfaces/Api.ts +2 -1
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import axiosInstance from "../axiosInstance";
|
|
11
|
+
const GET_CASH_UP_REPORTS = 'api/cashupreports';
|
|
12
|
+
export const deleteCashUpReport = function (storeId, id) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
try {
|
|
15
|
+
const config = {
|
|
16
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
17
|
+
};
|
|
18
|
+
return yield axiosInstance.get(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error('Error fetching:', error);
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
package/dist/api/index.js
CHANGED
|
@@ -48,7 +48,8 @@ const WashdayClient = function WashdayClient(apiToken) {
|
|
|
48
48
|
getList: cashupsEndpoints.getModule.getList,
|
|
49
49
|
getById: cashupsEndpoints.getModule.getById,
|
|
50
50
|
getPreviewDataForCashClose: cashupsEndpoints.getModule.getPreviewDataForCashClose,
|
|
51
|
-
create: cashupsEndpoints.postModule.create
|
|
51
|
+
create: cashupsEndpoints.postModule.create,
|
|
52
|
+
deleteCashUpReport: cashupsEndpoints.deleteModule.deleteCashUpReport
|
|
52
53
|
});
|
|
53
54
|
this.cfdi = bindMethods(this, {
|
|
54
55
|
getList: cfdiEndpoints.getModule.getList,
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { WashdayClientInstance } from "../../interfaces/Api";
|
|
2
|
+
import axiosInstance from "../axiosInstance";
|
|
3
|
+
const GET_CASH_UP_REPORTS = 'api/cashupreports';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
export const deleteCashUpReport = async function (this: WashdayClientInstance, storeId: string, id: string): Promise<any> {
|
|
6
|
+
try {
|
|
7
|
+
const config = {
|
|
8
|
+
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
9
|
+
};
|
|
10
|
+
return await axiosInstance.get(`${GET_CASH_UP_REPORTS}/${storeId}/${id}`, config);
|
|
11
|
+
} catch (error) {
|
|
12
|
+
console.error('Error fetching:', error);
|
|
13
|
+
throw error;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/api/cashups/index.ts
CHANGED
package/src/api/index.ts
CHANGED
|
@@ -54,7 +54,8 @@ const WashdayClient: WashdayClientConstructor = function WashdayClient(this: Was
|
|
|
54
54
|
getList: cashupsEndpoints.getModule.getList,
|
|
55
55
|
getById: cashupsEndpoints.getModule.getById,
|
|
56
56
|
getPreviewDataForCashClose: cashupsEndpoints.getModule.getPreviewDataForCashClose,
|
|
57
|
-
create: cashupsEndpoints.postModule.create
|
|
57
|
+
create: cashupsEndpoints.postModule.create,
|
|
58
|
+
deleteCashUpReport: cashupsEndpoints.deleteModule.deleteCashUpReport
|
|
58
59
|
});
|
|
59
60
|
this.cfdi = bindMethods(this, {
|
|
60
61
|
getList: cfdiEndpoints.getModule.getList,
|
package/src/interfaces/Api.ts
CHANGED
|
@@ -40,7 +40,8 @@ export interface WashdayClientInstance {
|
|
|
40
40
|
getList: typeof cashupsEndpoints.getModule.getList;
|
|
41
41
|
getById: typeof cashupsEndpoints.getModule.getById;
|
|
42
42
|
getPreviewDataForCashClose: typeof cashupsEndpoints.getModule.getPreviewDataForCashClose;
|
|
43
|
-
create: typeof cashupsEndpoints.postModule.create
|
|
43
|
+
create: typeof cashupsEndpoints.postModule.create,
|
|
44
|
+
deleteCashUpReport: typeof cashupsEndpoints.deleteModule.deleteCashUpReport,
|
|
44
45
|
}
|
|
45
46
|
cfdi: {
|
|
46
47
|
getList: typeof cfdiEndpoints.getModule.getList,
|