sevago-library 1.5.2 → 1.5.3

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.
@@ -1,10 +1,13 @@
1
1
  import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
2
  import { Environment } from '../enums';
3
+ declare const LOCAL_ENVIRONMENT = "local";
4
+ type LocalEnvironment = typeof LOCAL_ENVIRONMENT;
5
+ type AppEnvironment = Environment | LocalEnvironment;
3
6
  export interface SevagoAxiosClientConfig {
4
7
  baseUrl?: string;
5
8
  env?: Record<string, string | undefined>;
6
9
  envKeys?: string[];
7
- environment?: Environment;
10
+ environment?: AppEnvironment;
8
11
  getAccessToken?: () => Promise<string | undefined> | string | undefined;
9
12
  headers?: Record<string, string>;
10
13
  axiosConfig?: AxiosRequestConfig;
@@ -17,3 +20,4 @@ export declare const getSevagoAxiosConfig: () => SevagoAxiosConfig;
17
20
  export declare const getProductManagementApiBaseUrl: (config?: SevagoAxiosClientConfig) => string;
18
21
  export declare const createSevagoAxiosClient: (baseUrl: string, config?: SevagoAxiosClientConfig) => AxiosInstance;
19
22
  export declare const createProductManagementAxiosClient: (config?: SevagoAxiosClientConfig) => AxiosInstance;
23
+ export {};
@@ -16,6 +16,20 @@ export declare const SSO: {
16
16
  production_vps: string;
17
17
  };
18
18
  export declare const APP_OBJ: {
19
+ SEARCH_IMAGE: {
20
+ path: {
21
+ local: string;
22
+ develop: string;
23
+ staging: string;
24
+ production: string;
25
+ production_vps: string;
26
+ };
27
+ icon: string;
28
+ content: string;
29
+ title: string;
30
+ group: AppGroup;
31
+ color: string;
32
+ };
19
33
  MASTER_DATA: {
20
34
  path: {
21
35
  local: string;
@@ -4,8 +4,13 @@ import { ImageGalleryElementProps, ImageGalleryItem } from '../image-gallery';
4
4
  export interface FinishGoodImageGalleryApiResponse<T> {
5
5
  data?: T;
6
6
  }
7
+ export interface FinishGoodImageResult {
8
+ itemNoCode?: string;
9
+ imageUrl?: string;
10
+ renderImageUrl?: string;
11
+ }
7
12
  export interface FinishGoodImageGalleryApiConfig extends SevagoAxiosClientConfig {
8
- request?: (itemNoCode: string) => Promise<FinishGoodImageGalleryApiResponse<ImageGalleryItem[]> | ImageGalleryItem[]>;
13
+ request?: (itemNoCode: string) => Promise<FinishGoodImageGalleryApiResponse<ImageGalleryItem[] | FinishGoodImageResult> | ImageGalleryItem[]>;
9
14
  onError?: (error: unknown, itemNoCode: string) => void;
10
15
  }
11
16
  export interface FinishGoodImageGalleryElementProps extends Omit<ImageGalleryElementProps, 'images'> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sevago-library",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
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",