@tagsamurai/fats-api-services 1.0.0-alpha.154 → 1.0.0-alpha.156

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@tagsamurai/fats-api-services",
3
- "version": "1.0.0-alpha.154",
3
+ "version": "1.0.0-alpha.156",
4
4
  "author": "developer.tagsamurai",
5
5
  "description": "Fixed Asset Tag Samurai Services Library",
6
6
  "module": "./api-services.es.js",
@@ -29,6 +29,10 @@ export type GetAssetDetailParams = {
29
29
  export interface RegisterAssetBulkBody {
30
30
  data: AssetFormDto[];
31
31
  }
32
+ export interface RegisterAssetBasicBulkBody {
33
+ group: number;
34
+ data: AssetBasicFormDto[];
35
+ }
32
36
  export type AssetTreeNode = {
33
37
  _id: string;
34
38
  name: string;
@@ -91,6 +95,24 @@ export interface AssetFormDto {
91
95
  customFields: AssetCustomFieldType[];
92
96
  dataAttribute?: AssetTableDto[];
93
97
  }
98
+ export interface AssetBasicFormDto {
99
+ brand: number;
100
+ model: number;
101
+ name: number;
102
+ measurement: number;
103
+ usefulLife?: string;
104
+ category?: number;
105
+ firstImage?: File;
106
+ firstImageBig?: string;
107
+ firstImageMedium?: string;
108
+ firstImageSmall?: string;
109
+ secondImage?: File;
110
+ secondImageBig?: string;
111
+ secondImageMedium?: string;
112
+ secondImageSmall?: string;
113
+ setDefault?: string | number;
114
+ customFields: AssetCustomFieldType[];
115
+ }
94
116
  export interface AssetTableDto {
95
117
  rowId: string;
96
118
  num: number;
@@ -1,5 +1,5 @@
1
1
  import { AxiosResponse } from 'axios';
2
- import { AssetCustomFieldType, AssetFormDto, AssetOptionField, EditUsefulLifeDto, GetAllAssetsOptionBoolean, GetAllAssetsOptionFilter, GetAllAssetsQueryParams, GetAssetDetailParams, GetAvailableAssetsQueryParams, LinkAssetDto, RegisterAssetBulkBody } from '../dto/assetService.dto';
2
+ import { AssetCustomFieldType, AssetFormDto, AssetOptionField, EditUsefulLifeDto, GetAllAssetsOptionBoolean, GetAllAssetsOptionFilter, GetAllAssetsQueryParams, GetAssetDetailParams, GetAvailableAssetsQueryParams, LinkAssetDto, RegisterAssetBasicBulkBody } from '../dto/assetService.dto';
3
3
  import { AccountingFilterParams, AttachmentDto, AttachmentFilterParams, GetLinkedAssetsOptionBoolean, GetLinkedAssetsOptionFilter, LinkedAssetFilterParams, PurchaseDto, PurchaseResponse } from '../dto/assetDetail.dto';
4
4
  import { AssetDataType, AssetDetailDataType } from '../types/asset.type';
5
5
  import { FetchDetailResponse, FetchListResponse, FetchOptionResponse } from '../types/fetchResponse.type';
@@ -16,7 +16,7 @@ declare const AssetServices: {
16
16
  getUnlinkedAssets: (params: GetAvailableAssetsQueryParams) => Promise<AxiosResponse>;
17
17
  getAssetDetail: (id: string, params?: GetAssetDetailParams) => Promise<AxiosResponse<FetchDetailResponse<AssetDetailDataType>>>;
18
18
  getAssetNameTotal: () => Promise<AxiosResponse>;
19
- postRegisterAsset: (body?: RegisterAssetBulkBody) => Promise<AxiosResponse>;
19
+ postRegisterAsset: (body?: RegisterAssetBasicBulkBody) => Promise<AxiosResponse>;
20
20
  putEditAsset: (id?: string, body?: AssetFormDto) => Promise<AxiosResponse>;
21
21
  putEditDetailCustomField: (id?: string, body?: {
22
22
  customFields: AssetCustomFieldType[];
@@ -204,4 +204,17 @@ export interface AssetNameRegister {
204
204
  isVerifiedAll?: boolean;
205
205
  assetPhoto?: File[];
206
206
  }
207
+ export interface AssetBasicRegister {
208
+ _id: string;
209
+ category?: AssetTreeNode;
210
+ asset?: string;
211
+ brand?: string;
212
+ model?: string;
213
+ measurement?: string;
214
+ usefulLife?: number;
215
+ customFieldsByType?: Record<string, AssetCustomFieldType[]>;
216
+ expand?: boolean;
217
+ registeredAssetCount?: number;
218
+ assetPhoto?: File[];
219
+ }
207
220
  export {};