@tagsamurai/fats-api-services 1.0.0-alpha.240 → 1.0.0-alpha.241
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/api-services.es.js +57 -0
- package/api-services.system.js +56 -0
- package/main.d.ts +1 -0
- package/package.json +1 -1
- package/src/dto/accountCode.dto.d.ts +4 -0
- package/src/dto/depreciationData.dto.d.ts +15 -0
- package/src/services/accounting.service.d.ts +19 -0
- package/src/types/accountCode.type.d.ts +7 -0
- package/src/types/depreciationData.type.d.ts +15 -0
package/api-services.es.js
CHANGED
|
@@ -1385,6 +1385,62 @@ const AuthServices$1 = {
|
|
|
1385
1385
|
return API$i.post("/login", body);
|
|
1386
1386
|
}
|
|
1387
1387
|
};
|
|
1388
|
+
const DepreciationMethodAPI = createAxiosInstance({
|
|
1389
|
+
prefix: "/settings-attribute/v2/depreciaction-method"
|
|
1390
|
+
});
|
|
1391
|
+
const DepreciationGroupAPI = createAxiosInstance({
|
|
1392
|
+
prefix: "/settings-attribute/v2/depreciaction-group"
|
|
1393
|
+
});
|
|
1394
|
+
const AccountCodeAPI = createAxiosInstance({
|
|
1395
|
+
prefix: "/settings-attribute/v2/account-code"
|
|
1396
|
+
});
|
|
1397
|
+
const AccountingServices = {
|
|
1398
|
+
// Depreciation Method API Services
|
|
1399
|
+
getDepreciationMethod: () => {
|
|
1400
|
+
return DepreciationMethodAPI.get("");
|
|
1401
|
+
},
|
|
1402
|
+
changeDepreciationMethod: (body) => {
|
|
1403
|
+
return DepreciationMethodAPI.put("", {
|
|
1404
|
+
depreciationMethod: body
|
|
1405
|
+
});
|
|
1406
|
+
},
|
|
1407
|
+
cancelChangeDepreciationMethod: () => {
|
|
1408
|
+
return DepreciationMethodAPI.put("/cancel");
|
|
1409
|
+
},
|
|
1410
|
+
// Depreciation Group API Services
|
|
1411
|
+
getDepreciationList: (params) => {
|
|
1412
|
+
return DepreciationGroupAPI.get("", { params });
|
|
1413
|
+
},
|
|
1414
|
+
deleteDepreciationGroup: (id) => {
|
|
1415
|
+
return DepreciationGroupAPI.delete("", {
|
|
1416
|
+
data: { id }
|
|
1417
|
+
});
|
|
1418
|
+
},
|
|
1419
|
+
createNewDepreciationGroup: (body) => {
|
|
1420
|
+
return DepreciationGroupAPI.post("", body);
|
|
1421
|
+
},
|
|
1422
|
+
editDepreciationGroup: (body, id) => {
|
|
1423
|
+
return DepreciationGroupAPI.put(`/${id}`, body);
|
|
1424
|
+
},
|
|
1425
|
+
getFilterOptions: (params) => {
|
|
1426
|
+
return DepreciationGroupAPI.get("/options", { params });
|
|
1427
|
+
},
|
|
1428
|
+
// Account Code API Services
|
|
1429
|
+
getAccountCodeList: (params) => {
|
|
1430
|
+
return AccountCodeAPI.get("/account-code", { params });
|
|
1431
|
+
},
|
|
1432
|
+
deleteAccountCode: (id) => {
|
|
1433
|
+
return AccountCodeAPI.delete("/account-code", {
|
|
1434
|
+
data: { id }
|
|
1435
|
+
});
|
|
1436
|
+
},
|
|
1437
|
+
createNewAccountCode: (body) => {
|
|
1438
|
+
return AccountCodeAPI.post("/account-code", body);
|
|
1439
|
+
},
|
|
1440
|
+
editAccountCode: (body, id) => {
|
|
1441
|
+
return AccountCodeAPI.put("/account-code/" + id, body);
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1388
1444
|
const API$h = createAxiosInstance({
|
|
1389
1445
|
env: "APP_TAGSAMURAI_API",
|
|
1390
1446
|
prefix: "/settings-attribute/v2/asset-name"
|
|
@@ -2017,6 +2073,7 @@ const TransactionSettingServices = {
|
|
|
2017
2073
|
}
|
|
2018
2074
|
};
|
|
2019
2075
|
export {
|
|
2076
|
+
AccountingServices,
|
|
2020
2077
|
AliasCodeServices,
|
|
2021
2078
|
AssetNameServices,
|
|
2022
2079
|
AssetPolicyServices,
|
package/api-services.system.js
CHANGED
|
@@ -1392,6 +1392,62 @@ System.register(["axios"], function(exports, module) {
|
|
|
1392
1392
|
return API$i.post("/login", body);
|
|
1393
1393
|
}
|
|
1394
1394
|
});
|
|
1395
|
+
const DepreciationMethodAPI = createAxiosInstance({
|
|
1396
|
+
prefix: "/settings-attribute/v2/depreciaction-method"
|
|
1397
|
+
});
|
|
1398
|
+
const DepreciationGroupAPI = createAxiosInstance({
|
|
1399
|
+
prefix: "/settings-attribute/v2/depreciaction-group"
|
|
1400
|
+
});
|
|
1401
|
+
const AccountCodeAPI = createAxiosInstance({
|
|
1402
|
+
prefix: "/settings-attribute/v2/account-code"
|
|
1403
|
+
});
|
|
1404
|
+
const AccountingServices = exports("AccountingServices", {
|
|
1405
|
+
// Depreciation Method API Services
|
|
1406
|
+
getDepreciationMethod: () => {
|
|
1407
|
+
return DepreciationMethodAPI.get("");
|
|
1408
|
+
},
|
|
1409
|
+
changeDepreciationMethod: (body) => {
|
|
1410
|
+
return DepreciationMethodAPI.put("", {
|
|
1411
|
+
depreciationMethod: body
|
|
1412
|
+
});
|
|
1413
|
+
},
|
|
1414
|
+
cancelChangeDepreciationMethod: () => {
|
|
1415
|
+
return DepreciationMethodAPI.put("/cancel");
|
|
1416
|
+
},
|
|
1417
|
+
// Depreciation Group API Services
|
|
1418
|
+
getDepreciationList: (params) => {
|
|
1419
|
+
return DepreciationGroupAPI.get("", { params });
|
|
1420
|
+
},
|
|
1421
|
+
deleteDepreciationGroup: (id) => {
|
|
1422
|
+
return DepreciationGroupAPI.delete("", {
|
|
1423
|
+
data: { id }
|
|
1424
|
+
});
|
|
1425
|
+
},
|
|
1426
|
+
createNewDepreciationGroup: (body) => {
|
|
1427
|
+
return DepreciationGroupAPI.post("", body);
|
|
1428
|
+
},
|
|
1429
|
+
editDepreciationGroup: (body, id) => {
|
|
1430
|
+
return DepreciationGroupAPI.put(`/${id}`, body);
|
|
1431
|
+
},
|
|
1432
|
+
getFilterOptions: (params) => {
|
|
1433
|
+
return DepreciationGroupAPI.get("/options", { params });
|
|
1434
|
+
},
|
|
1435
|
+
// Account Code API Services
|
|
1436
|
+
getAccountCodeList: (params) => {
|
|
1437
|
+
return AccountCodeAPI.get("/account-code", { params });
|
|
1438
|
+
},
|
|
1439
|
+
deleteAccountCode: (id) => {
|
|
1440
|
+
return AccountCodeAPI.delete("/account-code", {
|
|
1441
|
+
data: { id }
|
|
1442
|
+
});
|
|
1443
|
+
},
|
|
1444
|
+
createNewAccountCode: (body) => {
|
|
1445
|
+
return AccountCodeAPI.post("/account-code", body);
|
|
1446
|
+
},
|
|
1447
|
+
editAccountCode: (body, id) => {
|
|
1448
|
+
return AccountCodeAPI.put("/account-code/" + id, body);
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1395
1451
|
const API$h = createAxiosInstance({
|
|
1396
1452
|
env: "APP_TAGSAMURAI_API",
|
|
1397
1453
|
prefix: "/settings-attribute/v2/asset-name"
|
package/main.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { default as GeneralSettingsServices } from './src/services/generalSettin
|
|
|
23
23
|
export { default as CustomFieldServices } from './src/services/customField.service';
|
|
24
24
|
export { default as AssetPolicyServices } from './src/services/assetPolicy.service';
|
|
25
25
|
export { default as AuthServices } from './src/services/moduleAuth.service';
|
|
26
|
+
export { default as AccountingServices } from './src/services/accounting.service';
|
|
26
27
|
export { default as AssetNameServices } from './src/services/oldAssetName.service';
|
|
27
28
|
export { default as AuditServices } from './src/services/oldAudit.service';
|
|
28
29
|
export { default as BrandServices } from './src/services/oldBrand.service';
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type PostDepreciationGroup = {
|
|
2
|
+
name: string;
|
|
3
|
+
usefulLife: number;
|
|
4
|
+
straightLineRate: number;
|
|
5
|
+
doubleDecreasedRate: number;
|
|
6
|
+
};
|
|
7
|
+
export type GetDepreciactionListParams = {
|
|
8
|
+
straightLineRate?: string;
|
|
9
|
+
usefulLife?: string;
|
|
10
|
+
doubleDecreasedRate?: string;
|
|
11
|
+
};
|
|
12
|
+
export type GetDepreciactionOptionParams = {
|
|
13
|
+
straightLineRate?: boolean;
|
|
14
|
+
doubleDecreasedRate?: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { PostAccountCode } from '../dto/accountCode.dto';
|
|
3
|
+
import { GetDepreciactionListParams, GetDepreciactionOptionParams, PostDepreciationGroup } from '../dto/depreciationData.dto';
|
|
4
|
+
import { TableParams } from '../types/dataTable.type';
|
|
5
|
+
declare const AccountingServices: {
|
|
6
|
+
getDepreciationMethod: () => Promise<AxiosResponse>;
|
|
7
|
+
changeDepreciationMethod: (body: string) => Promise<AxiosResponse>;
|
|
8
|
+
cancelChangeDepreciationMethod: () => Promise<AxiosResponse>;
|
|
9
|
+
getDepreciationList: (params?: GetDepreciactionListParams) => Promise<AxiosResponse>;
|
|
10
|
+
deleteDepreciationGroup: (id: string[]) => Promise<AxiosResponse>;
|
|
11
|
+
createNewDepreciationGroup: (body: PostDepreciationGroup) => Promise<AxiosResponse>;
|
|
12
|
+
editDepreciationGroup: (body: PostDepreciationGroup, id: string) => Promise<AxiosResponse>;
|
|
13
|
+
getFilterOptions: (params: GetDepreciactionOptionParams) => Promise<AxiosResponse>;
|
|
14
|
+
getAccountCodeList: (params?: TableParams) => Promise<AxiosResponse>;
|
|
15
|
+
deleteAccountCode: (id: string[]) => Promise<AxiosResponse>;
|
|
16
|
+
createNewAccountCode: (body: PostAccountCode) => Promise<AxiosResponse>;
|
|
17
|
+
editAccountCode: (body: PostAccountCode, id: string) => Promise<AxiosResponse>;
|
|
18
|
+
};
|
|
19
|
+
export default AccountingServices;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type DepreciationMethod = {
|
|
2
|
+
_id: string;
|
|
3
|
+
depreciationMethod: string;
|
|
4
|
+
depreciationMethodUpdatedAt?: string;
|
|
5
|
+
pendingDeprecationMethod?: string;
|
|
6
|
+
};
|
|
7
|
+
export type DepreciationList = {
|
|
8
|
+
_id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
usefulLife: string;
|
|
11
|
+
straightLineRate: string;
|
|
12
|
+
doubleDecreasedRate: string;
|
|
13
|
+
key: number;
|
|
14
|
+
totalAssets?: number;
|
|
15
|
+
};
|