@tagsamurai/fats-api-services 1.0.0-alpha.265 → 1.0.0-alpha.267

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.
@@ -1392,10 +1392,10 @@ const AuthServices$1 = {
1392
1392
  }
1393
1393
  };
1394
1394
  const DepreciationMethodAPI = createAxiosInstance({
1395
- prefix: "/settings-attribute/v2/depreciaction-method"
1395
+ prefix: "/settings-attribute/v2/depreciation-method"
1396
1396
  });
1397
1397
  const DepreciationGroupAPI = createAxiosInstance({
1398
- prefix: "/settings-attribute/v2/depreciaction-group"
1398
+ prefix: "/settings-attribute/v2/depreciation-group"
1399
1399
  });
1400
1400
  const AccountCodeAPI = createAxiosInstance({
1401
1401
  prefix: "/settings-attribute/v2/account-code"
@@ -1421,7 +1421,7 @@ const AccountingServices = {
1421
1421
  return DepreciationMethodAPI.put("/cancel");
1422
1422
  },
1423
1423
  // Depreciation Group API Services
1424
- getDepreciationList: (params) => {
1424
+ getDepreciationGroupList: (params) => {
1425
1425
  return DepreciationGroupAPI.get("", { params });
1426
1426
  },
1427
1427
  deleteDepreciationGroup: (id) => {
@@ -1399,10 +1399,10 @@ System.register(["axios"], function(exports, module) {
1399
1399
  }
1400
1400
  });
1401
1401
  const DepreciationMethodAPI = createAxiosInstance({
1402
- prefix: "/settings-attribute/v2/depreciaction-method"
1402
+ prefix: "/settings-attribute/v2/depreciation-method"
1403
1403
  });
1404
1404
  const DepreciationGroupAPI = createAxiosInstance({
1405
- prefix: "/settings-attribute/v2/depreciaction-group"
1405
+ prefix: "/settings-attribute/v2/depreciation-group"
1406
1406
  });
1407
1407
  const AccountCodeAPI = createAxiosInstance({
1408
1408
  prefix: "/settings-attribute/v2/account-code"
@@ -1428,7 +1428,7 @@ System.register(["axios"], function(exports, module) {
1428
1428
  return DepreciationMethodAPI.put("/cancel");
1429
1429
  },
1430
1430
  // Depreciation Group API Services
1431
- getDepreciationList: (params) => {
1431
+ getDepreciationGroupList: (params) => {
1432
1432
  return DepreciationGroupAPI.get("", { params });
1433
1433
  },
1434
1434
  deleteDepreciationGroup: (id) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.0.0-alpha.265",
3
+ "version": "1.0.0-alpha.267",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -2,20 +2,21 @@ import { AxiosResponse } from 'axios';
2
2
  import { PostAccountCode } from '../dto/accountCode.dto';
3
3
  import { GetDepreciactionListParams, GetDepreciactionOptionParams, PostDepreciationGroup } from '../dto/depreciationData.dto';
4
4
  import { TableParams } from '../types/dataTable.type';
5
- import { AccountCodeDropdown, DeprecitationGroupDropdown } from '../types/accountCode.type';
6
- import { ShortFetchListResponse } from '../types/fetchResponse.type';
5
+ import { AccountCodeDropdown, AccountCodeList, DepreciationGroupList, DeprecitationGroupDropdown } from '../types/accountCode.type';
6
+ import { FetchDetailResponse, FetchListResponse, ShortFetchListResponse } from '../types/fetchResponse.type';
7
+ import { DepreciationMethod } from '../types/depreciationData.type';
7
8
  declare const AccountingServices: {
8
9
  getDepreciationGroupDropdown: () => Promise<AxiosResponse<ShortFetchListResponse<DeprecitationGroupDropdown>>>;
9
10
  getAccountDropdown: () => Promise<AxiosResponse<ShortFetchListResponse<AccountCodeDropdown>>>;
10
- getDepreciationMethod: () => Promise<AxiosResponse>;
11
+ getDepreciationMethod: () => Promise<AxiosResponse<FetchDetailResponse<DepreciationMethod>>>;
11
12
  changeDepreciationMethod: (body: string) => Promise<AxiosResponse>;
12
13
  cancelChangeDepreciationMethod: () => Promise<AxiosResponse>;
13
- getDepreciationList: (params?: GetDepreciactionListParams) => Promise<AxiosResponse>;
14
+ getDepreciationGroupList: (params?: GetDepreciactionListParams) => Promise<AxiosResponse<FetchListResponse<DepreciationGroupList>>>;
14
15
  deleteDepreciationGroup: (id: string[]) => Promise<AxiosResponse>;
15
16
  createNewDepreciationGroup: (body: PostDepreciationGroup) => Promise<AxiosResponse>;
16
17
  editDepreciationGroup: (body: PostDepreciationGroup, id: string) => Promise<AxiosResponse>;
17
18
  getFilterOptions: (params: GetDepreciactionOptionParams) => Promise<AxiosResponse>;
18
- getAccountCodeList: (params?: TableParams) => Promise<AxiosResponse>;
19
+ getAccountCodeList: (params?: TableParams) => Promise<AxiosResponse<FetchListResponse<AccountCodeList>>>;
19
20
  deleteAccountCode: (id: string[]) => Promise<AxiosResponse>;
20
21
  createNewAccountCode: (body: PostAccountCode) => Promise<AxiosResponse>;
21
22
  editAccountCode: (body: PostAccountCode, id: string) => Promise<AxiosResponse>;
@@ -2,11 +2,24 @@ export type AccountCodeList = {
2
2
  _id: string;
3
3
  code: string;
4
4
  name: string;
5
- key: number;
6
- totalAssets?: number;
7
5
  };
8
6
  export interface DeprecitationGroupDropdown {
9
7
  _id: string;
10
8
  name: string;
11
9
  }
12
10
  export type AccountCodeDropdown = DeprecitationGroupDropdown;
11
+ export interface DepreciationGroupList {
12
+ _id: string;
13
+ name: string;
14
+ key: number;
15
+ updatedAt: string | Date;
16
+ usefulLife: string;
17
+ straightLineRate: string;
18
+ doubleDecreasedRate: string;
19
+ totalAssets: number;
20
+ }
21
+ export interface DeprecitationMethod {
22
+ depreciationMethod: string;
23
+ depreciationMethodUpdatedAt: string | Date;
24
+ pendingDeprecationMethod: string;
25
+ }