@tagsamurai/fats-api-services 1.0.0-alpha.121 → 1.0.0-alpha.122
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/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RepairTicketingType } from '../types/assetDetail.type';
|
|
2
|
-
import { FetchListResponse } from '../types/fetchResponse.type';
|
|
1
|
+
import { AccountingType, PurchaseType, RepairTicketingType } from '../types/assetDetail.type';
|
|
2
|
+
import { FetchDetailResponse, FetchListResponse } from '../types/fetchResponse.type';
|
|
3
3
|
import { MultiSelectOption } from '../types/options.type';
|
|
4
4
|
export type AssetDetailTabOptionFilter = {
|
|
5
5
|
auditTypeOptions?: MultiSelectOption[];
|
|
@@ -42,6 +42,10 @@ export type LinkedAssetParams = {
|
|
|
42
42
|
maintenanceAuditStatus?: string[];
|
|
43
43
|
};
|
|
44
44
|
export type LinkedAssetFilterParams = Partial<Record<keyof LinkedAssetParams, string>>;
|
|
45
|
+
export interface AccountingResponseData {
|
|
46
|
+
monthlyDepreciation: AccountingType[];
|
|
47
|
+
totalRecords: number;
|
|
48
|
+
}
|
|
45
49
|
export type AccountingFilterParams = {
|
|
46
50
|
page?: number;
|
|
47
51
|
limit?: number;
|
|
@@ -62,6 +66,9 @@ export type AttachmentFilterParams = {
|
|
|
62
66
|
type?: 'Purchase' | 'Product';
|
|
63
67
|
asset?: string;
|
|
64
68
|
};
|
|
69
|
+
export type PurchaseResponse = FetchDetailResponse<{
|
|
70
|
+
purchase: PurchaseType['purchase'];
|
|
71
|
+
}>;
|
|
65
72
|
export interface PurchaseDto {
|
|
66
73
|
date?: number;
|
|
67
74
|
currency?: string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { AssetCustomFieldType, AssetFormDto, AssetOptionField, GetAllAssetsOptionBoolean, GetAllAssetsQueryParams, GetAssetDetailParams, GetAvailableAssetsQueryParams, LinkAssetDto, RegisterAssetBulkBody } from '../dto/assetService.dto';
|
|
3
3
|
import { GetLinkedAssetFamiliesResponse } from '../types/oldAssetService.type';
|
|
4
|
-
import { AccountingFilterParams, AssetDetailTabOptionBoolean, AttachmentDto, AttachmentFilterParams, LinkedAssetFilterParams, PurchaseDto } from '../dto/assetDetail.dto';
|
|
5
|
-
import { AssetDataFilterParams } from '../types/asset.type';
|
|
4
|
+
import { AccountingFilterParams, AccountingResponseData, AssetDetailTabOptionBoolean, AttachmentDto, AttachmentFilterParams, LinkedAssetFilterParams, PurchaseDto, PurchaseResponse } from '../dto/assetDetail.dto';
|
|
5
|
+
import { AssetDataFilterParams, AssetDataType, AssetDetailDataType } from '../types/asset.type';
|
|
6
|
+
import { FetchDetailResponse, FetchListResponse } from '../types/fetchResponse.type';
|
|
7
|
+
import { AttachmentType, LinkedAssetType } from '../types/assetDetail.type';
|
|
6
8
|
declare const AssetServices: {
|
|
7
9
|
getScanTag: (tag: string) => Promise<AxiosResponse>;
|
|
8
|
-
getAllAssets: (params: GetAllAssetsQueryParams) => Promise<AxiosResponse
|
|
10
|
+
getAllAssets: (params: GetAllAssetsQueryParams) => Promise<AxiosResponse<FetchListResponse<AssetDataType>>>;
|
|
9
11
|
getAllAssetsOptions: (params: GetAllAssetsOptionBoolean) => Promise<AxiosResponse>;
|
|
10
|
-
getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse
|
|
12
|
+
getAvailableAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse<FetchListResponse<AssetDataType>>>;
|
|
11
13
|
getAvailableAssetOptions: (params: GetAllAssetsOptionBoolean) => Promise<AxiosResponse>;
|
|
12
14
|
scanAsset: (tag: string) => Promise<AxiosResponse>;
|
|
13
15
|
getAssetsById: (_id?: string, params?: GetAvailableAssetsQueryParams) => Promise<AxiosResponse>;
|
|
@@ -18,7 +20,7 @@ declare const AssetServices: {
|
|
|
18
20
|
assignedTo?: string;
|
|
19
21
|
}) => Promise<AxiosResponse>;
|
|
20
22
|
getUnlinkedAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse>;
|
|
21
|
-
getAssetDetail: (id: string, params?: GetAssetDetailParams) => Promise<AxiosResponse
|
|
23
|
+
getAssetDetail: (id: string, params?: GetAssetDetailParams) => Promise<AxiosResponse<FetchDetailResponse<AssetDetailDataType>>>;
|
|
22
24
|
getAssetNameTotal: (assetNameId: string) => Promise<AxiosResponse>;
|
|
23
25
|
getLinkedAssetFamily: (id?: string) => Promise<AxiosResponse<GetLinkedAssetFamiliesResponse>>;
|
|
24
26
|
matchAssetWithTag: (id: string, tag?: string) => Promise<AxiosResponse>;
|
|
@@ -27,16 +29,16 @@ declare const AssetServices: {
|
|
|
27
29
|
putEditDetailCustomField: (id?: string, body?: {
|
|
28
30
|
customFields: AssetCustomFieldType[];
|
|
29
31
|
}) => Promise<AxiosResponse>;
|
|
30
|
-
getLinkedAsset: (assetId?: string, params?: LinkedAssetFilterParams) => Promise<AxiosResponse
|
|
31
|
-
getPurchase: (assetId?: string) => Promise<AxiosResponse
|
|
32
|
+
getLinkedAsset: (assetId?: string, params?: LinkedAssetFilterParams) => Promise<AxiosResponse<FetchListResponse<LinkedAssetType>>>;
|
|
33
|
+
getPurchase: (assetId?: string) => Promise<AxiosResponse<PurchaseResponse>>;
|
|
32
34
|
putPurchase: (body: PurchaseDto, assetId?: string) => Promise<AxiosResponse>;
|
|
33
|
-
getAccounting: (assetId?: string, params?: AccountingFilterParams) => Promise<AxiosResponse
|
|
35
|
+
getAccounting: (assetId?: string, params?: AccountingFilterParams) => Promise<AxiosResponse<FetchDetailResponse<AccountingResponseData>>>;
|
|
34
36
|
getAssetOption: (params?: AssetDataFilterParams) => Promise<AxiosResponse>;
|
|
35
37
|
getAssetFamily: (parentId?: string) => Promise<AxiosResponse>;
|
|
36
38
|
getLinkedAssetOption: (parentId?: string, params?: AssetDetailTabOptionBoolean) => Promise<AxiosResponse>;
|
|
37
39
|
putLinkAsset: (body: LinkAssetDto, parentId?: string) => Promise<AxiosResponse>;
|
|
38
40
|
putUnlinkAsset: (body: LinkAssetDto, parentId?: string) => Promise<AxiosResponse>;
|
|
39
|
-
getAttachment: (params?: AttachmentFilterParams) => Promise<AxiosResponse
|
|
41
|
+
getAttachment: (params?: AttachmentFilterParams) => Promise<AxiosResponse<FetchListResponse<AttachmentType>>>;
|
|
40
42
|
postAttachment: (body: AttachmentDto) => Promise<AxiosResponse>;
|
|
41
43
|
putAttachment: (body: AttachmentDto, id?: string) => Promise<AxiosResponse>;
|
|
42
44
|
/**
|
|
@@ -68,6 +68,19 @@ export type AccountingYearDepreciationType = {
|
|
|
68
68
|
formattedAccumulatedDepreciation?: string;
|
|
69
69
|
formattedMonthEndValue?: string;
|
|
70
70
|
};
|
|
71
|
+
export type AttachmentType = {
|
|
72
|
+
_id?: string;
|
|
73
|
+
type?: string;
|
|
74
|
+
asset?: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
file?: string | File;
|
|
77
|
+
updatedAt?: Date;
|
|
78
|
+
createdBy?: {
|
|
79
|
+
_id: string;
|
|
80
|
+
fullName: string;
|
|
81
|
+
key: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
71
84
|
export type RepairTicketingType = {
|
|
72
85
|
num: number;
|
|
73
86
|
_id: string;
|