sevago-library 1.5.6 → 1.5.7

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.
@@ -0,0 +1 @@
1
+ export * from './product-management';
@@ -0,0 +1,2 @@
1
+ export * as productManagementApi from './item-no.api';
2
+ export * from './item-no.entities';
@@ -0,0 +1,6 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { AccessoryItemNoDetail, BaseResponse, FilterHtjItemNoQuery, FinishGoodImageResult, HtjItemNoDetail, HtjItemNoResult, ProductManagementFlatPaginatedResult } from './item-no.entities';
3
+ export declare const getAccessoryItemNoByCode: (axiosProductManagement: AxiosInstance, itemNoCode: string) => Promise<BaseResponse<AccessoryItemNoDetail>>;
4
+ export declare const getHtjItemNoByCode: (axiosProductManagement: AxiosInstance, itemNoCode: string) => Promise<BaseResponse<HtjItemNoDetail>>;
5
+ export declare const getFinishGoodImagesByCode: (axiosProductManagement: AxiosInstance, itemNoCode: string) => Promise<BaseResponse<FinishGoodImageResult>>;
6
+ export declare const filterHtjItemNo: (axiosProductManagement: AxiosInstance, body: FilterHtjItemNoQuery) => Promise<ProductManagementFlatPaginatedResult<HtjItemNoResult>>;
@@ -0,0 +1,70 @@
1
+ export interface BaseResponse<T = any> {
2
+ meta?: any;
3
+ statusCode: number;
4
+ message: string;
5
+ succeeded?: boolean;
6
+ currentPage: number;
7
+ totalPages: number;
8
+ total?: number;
9
+ totalCount: number;
10
+ pageSize: number;
11
+ hasPreviousPage: boolean;
12
+ hasNextPage: boolean;
13
+ list?: T;
14
+ data?: T;
15
+ errors?: Record<keyof T, string[]>;
16
+ }
17
+ export interface AccessoryItemNoDetail {
18
+ id: string;
19
+ itemNoCode: string;
20
+ displayName?: string | null;
21
+ sizeCode?: string | null;
22
+ shapeName?: string | null;
23
+ weight?: number | null;
24
+ mountingType?: string | null;
25
+ mountingTypeName?: string | null;
26
+ currentImageUrl?: string | null;
27
+ unitOfMeasureCode?: string | null;
28
+ unitOfMeasureName?: string | null;
29
+ }
30
+ export interface HtjItemNoDetail {
31
+ id: string;
32
+ itemNoCode: string;
33
+ currentImageUrl?: string | null;
34
+ htjTypeCode?: string | null;
35
+ htjTypeName?: string | null;
36
+ htjTypeNameVi?: string | null;
37
+ materialName?: string | null;
38
+ eyeletSize?: string | null;
39
+ rawMaterialSize?: string | null;
40
+ wireSize?: string | null;
41
+ sizeValue?: string | null;
42
+ weight?: number | null;
43
+ unitOfMeasureCode?: string | null;
44
+ unitOfMeasureName?: string | null;
45
+ }
46
+ export interface ProductManagementFlatPaginatedResult<T> {
47
+ list: T[];
48
+ total: number;
49
+ }
50
+ export interface FilterHtjItemNoQuery {
51
+ page: number;
52
+ take: number;
53
+ keyword?: string;
54
+ filters?: Record<string, string>;
55
+ }
56
+ export interface HtjItemNoResult {
57
+ id: string;
58
+ itemNoCode: string;
59
+ displayName?: string;
60
+ htjTypeCode: string;
61
+ htjTypeName: string;
62
+ htjTypeNameVi: string;
63
+ }
64
+ export interface FinishGoodImageResult {
65
+ itemNoCode: string;
66
+ hasImage: boolean;
67
+ imageUrl?: string;
68
+ hasRenderImage: boolean;
69
+ renderImageUrl?: string;
70
+ }
@@ -1,12 +1,8 @@
1
+ import { AxiosInstance } from 'axios';
1
2
  import { ReactNode } from 'react';
3
+ import { FinishGoodImageResult } from '../../../../apis/product-management';
2
4
  import { ImageGalleryElementProps, ImageGalleryItem } from '../image-gallery';
3
- export interface FinishGoodImageResult {
4
- itemNoCode: string;
5
- hasImage: boolean;
6
- imageUrl?: string;
7
- hasRenderImage: boolean;
8
- renderImageUrl?: string;
9
- }
5
+ export type { FinishGoodImageResult };
10
6
  export type FinishGoodImageGalleryImages = ImageGalleryItem[] | FinishGoodImageResult;
11
7
  export interface FinishGoodImageGalleryElementProps extends Omit<ImageGalleryElementProps, 'images'> {
12
8
  images?: FinishGoodImageGalleryImages;
@@ -18,5 +14,6 @@ export interface FinishGoodImageGalleryElementProps extends Omit<ImageGalleryEle
18
14
  searchDebounceMs?: number;
19
15
  loadingContent?: ReactNode;
20
16
  textEmpty?: string;
17
+ axiosProductManagement?: AxiosInstance;
21
18
  onSearch?: (itemNoCode: string) => void | Promise<void>;
22
19
  }
@@ -1,3 +1,4 @@
1
1
  export {} from './App';
2
+ export * from './apis';
2
3
  export * from './common';
3
4
  export * from './components';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sevago-library",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "Sevago SSO Frontend Library - A comprehensive SSO solution with React components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",