@tagsamurai/gsts-api-services 1.0.1-alpha.1 → 1.0.1-alpha.2
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/api-services.es.js +101 -37
- package/api-services.system.js +1 -1
- package/main.d.ts +7 -2
- package/package.json +1 -1
- package/src/dto/logNotification.dto.d.ts +8 -0
- package/src/dto/masterData.dto.d.ts +3 -0
- package/src/dto/user.dto.d.ts +73 -0
- package/src/services/division.service.d.ts +13 -0
- package/src/services/logNotification.service.d.ts +7 -0
- package/src/services/option.service.d.ts +7 -0
- package/src/services/position.service.d.ts +13 -0
- package/src/services/tag.service.d.ts +7 -0
- package/src/services/user.service.d.ts +19 -0
- package/src/types/dataTable.type.d.ts +7 -0
- package/src/types/logNotification.type.d.ts +10 -0
- package/src/types/masterData.type.d.ts +7 -0
- package/src/types/user.type.d.ts +82 -0
- package/src/utils/getBaseURL.util.d.ts +1 -1
- package/src/utils/getImageURL.util.d.ts +1 -1
- package/src/utils/index.d.ts +2 -2
- package/src/services/settingUserGlobal.service.d.ts +0 -7
package/api-services.es.js
CHANGED
|
@@ -1,49 +1,113 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
const {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import I from "axios";
|
|
2
|
+
const S = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_APP_GLOBAL_SETTINGS_API: "https://dev-api.global-settings.tagsamurai.com", VITE_APP_LOGS_NOTIFICATION_API: "https://dev-api-logs-notification.tagsamurai.com", VITE_APP_TAGSAMURAI_API: "https://dev-api.tagsamurai.com" }, u = (e = "APP_TAGSAMURAI_API") => S["VITE_" + e], n = (e = {}, t = !1) => {
|
|
3
|
+
const {
|
|
4
|
+
env: s = "APP_GLOBAL_SETTINGS_API",
|
|
5
|
+
prefix: l = "",
|
|
6
|
+
headers: g = {},
|
|
7
|
+
...A
|
|
8
|
+
} = e, P = `${u(s)}${l}`, a = JSON.parse(localStorage.getItem("user") ?? "{}"), v = a.jwt ?? a.token ?? "";
|
|
9
|
+
return I.create({
|
|
10
|
+
...A,
|
|
11
|
+
baseURL: P,
|
|
12
|
+
headers: t ? g : {
|
|
8
13
|
"Content-Type": "application/json",
|
|
9
|
-
Authorization: `Bearer ${
|
|
10
|
-
...
|
|
14
|
+
Authorization: `Bearer ${v}`,
|
|
15
|
+
...g
|
|
11
16
|
}
|
|
12
17
|
});
|
|
13
|
-
},
|
|
18
|
+
}, m = (e) => e ? `${u("APP_TAGSAMURAI_API")}/file-manager/v2/files/${e}` : void 0, O = (e) => {
|
|
14
19
|
if (!e || typeof e == "string")
|
|
15
20
|
return;
|
|
16
|
-
const
|
|
17
|
-
return Object.keys(e).forEach((
|
|
18
|
-
Array.isArray(e[
|
|
19
|
-
[
|
|
20
|
-
}) : e[
|
|
21
|
-
[
|
|
21
|
+
const t = {};
|
|
22
|
+
return Object.keys(e).forEach((s) => {
|
|
23
|
+
Array.isArray(e[s]) ? e[s].length > 0 && Object.assign(t, {
|
|
24
|
+
[s]: JSON.stringify(e[s])
|
|
25
|
+
}) : e[s] !== void 0 && Object.assign(t, {
|
|
26
|
+
[s]: e[s]
|
|
22
27
|
});
|
|
23
|
-
}),
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
}), t;
|
|
29
|
+
}, c = n({
|
|
30
|
+
prefix: "/v1/global-settings/change-log"
|
|
31
|
+
}), T = {
|
|
32
|
+
getChangelogs: (e) => c.get("", { params: e }),
|
|
33
|
+
getChangelogOptions: (e) => c.get("/options", { params: e })
|
|
34
|
+
}, o = n({
|
|
35
|
+
prefix: "/v1/global-settings/division"
|
|
36
|
+
}), U = {
|
|
37
|
+
getDivisions: (e) => o.get("", { params: e }),
|
|
38
|
+
getDivisionDetail: (e) => o.get(`/${e}`),
|
|
39
|
+
postCreateDivision: (e) => o.post("/", e),
|
|
40
|
+
putEditDivision: (e, t) => o.put(`/${e}`, t),
|
|
41
|
+
deleteDivisions: (e) => {
|
|
42
|
+
const t = { id: JSON.stringify(e) };
|
|
43
|
+
return o.delete("", { params: t });
|
|
30
44
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
}, _ = n({
|
|
46
|
+
env: "APP_LOGS_NOTIFICATION_API",
|
|
47
|
+
prefix: "/v2"
|
|
48
|
+
}), $ = {
|
|
49
|
+
getSessionLogList: (e) => _.get("/session-log", { params: e })
|
|
50
|
+
}, p = n({
|
|
51
|
+
prefix: "/v1/global-settings/option"
|
|
52
|
+
}), h = {
|
|
53
|
+
getPositions: () => p.get("/position"),
|
|
54
|
+
getDivisions: () => p.get("/division")
|
|
55
|
+
}, i = n({
|
|
56
|
+
prefix: "/v1/global-settings/position"
|
|
57
|
+
}), y = {
|
|
58
|
+
getPositions: (e) => i.get("", { params: e }),
|
|
59
|
+
getPositionDetail: (e) => i.get(`/${e}`),
|
|
60
|
+
postCreatePosition: (e) => i.post("/", e),
|
|
61
|
+
putEditPosition: (e, t) => i.put(`/${e}`, t),
|
|
62
|
+
deletePositions: (e) => {
|
|
63
|
+
const t = { id: JSON.stringify(e) };
|
|
64
|
+
return i.delete("", { params: t });
|
|
65
|
+
}
|
|
66
|
+
}, f = n({
|
|
67
|
+
env: "APP_TAGSAMURAI_API",
|
|
68
|
+
prefix: "/tag/v2"
|
|
69
|
+
}), E = {
|
|
70
|
+
getTagInfo: (e) => f.get("/rfid-qr/scan", { params: e })
|
|
71
|
+
}, r = n({
|
|
34
72
|
prefix: "/v1/global-settings/user"
|
|
35
|
-
}), I = {
|
|
36
|
-
postResendUserEmail: (e) => _.post("/resend-email", e)
|
|
37
|
-
}, a = g({
|
|
38
|
-
prefix: "/utility/change-log"
|
|
39
73
|
}), L = {
|
|
40
|
-
|
|
41
|
-
|
|
74
|
+
getUsers: (e) => r.get("", { params: e }),
|
|
75
|
+
getUserDetail: (e) => r.get(`/${e}`),
|
|
76
|
+
getUserSystemLogs: (e, t) => r.get(`/${e}/system-logs`, { params: t }),
|
|
77
|
+
getUserSystemLogOptions: (e, t) => {
|
|
78
|
+
const s = {};
|
|
79
|
+
return s[t] = !0, r.get(`/${e}/system-logs/options`, { params: s });
|
|
80
|
+
},
|
|
81
|
+
postCreateUser: (e) => {
|
|
82
|
+
const t = { "Content-Type": "multipart/form-data" };
|
|
83
|
+
return r.post("", e, { headers: t });
|
|
84
|
+
},
|
|
85
|
+
putEditUser: (e, t) => {
|
|
86
|
+
const s = { "Content-Type": "multipart/form-data" };
|
|
87
|
+
return r.put(`/${e}`, t, { headers: s });
|
|
88
|
+
},
|
|
89
|
+
deleteUsers: (e) => {
|
|
90
|
+
const t = { id: JSON.stringify(e) };
|
|
91
|
+
return r.delete("", { params: t });
|
|
92
|
+
},
|
|
93
|
+
putToggleStatusUsers: (e) => r.put("/active-status", e),
|
|
94
|
+
getUserOptions: (e) => {
|
|
95
|
+
const t = {};
|
|
96
|
+
return t[e] = !0, r.get("/options", { params: t });
|
|
97
|
+
},
|
|
98
|
+
deleteCancelEmailChange: (e) => r.delete(`/cancel-email-change/${e}`),
|
|
99
|
+
postResendEmail: (e) => r.post("/resend-email", e),
|
|
100
|
+
putChangePassword: (e, t) => r.put(`/change-password/${e}`, t)
|
|
42
101
|
};
|
|
43
102
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
103
|
+
T as ChangelogServices,
|
|
104
|
+
U as DivisionServices,
|
|
105
|
+
$ as LogServices,
|
|
106
|
+
h as OptionServices,
|
|
107
|
+
y as PositionServices,
|
|
108
|
+
E as TagServices,
|
|
109
|
+
L as UserServices,
|
|
110
|
+
u as getBaseURL,
|
|
111
|
+
m as getImageURL,
|
|
112
|
+
O as queryParamsStringfy
|
|
49
113
|
};
|
package/api-services.system.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["axios"],function(
|
|
1
|
+
System.register(["axios"],function(n,m){"use strict";var c;return{setters:[a=>{c=a.default}],execute:function(){const a={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_GLOBAL_SETTINGS_API:"https://dev-api.global-settings.tagsamurai.com",VITE_APP_LOGS_NOTIFICATION_API:"https://dev-api-logs-notification.tagsamurai.com",VITE_APP_TAGSAMURAI_API:"https://dev-api.tagsamurai.com"},u=n("getBaseURL",(e="APP_TAGSAMURAI_API")=>a["VITE_"+e]),i=(e={},t=!1)=>{const{env:s="APP_GLOBAL_SETTINGS_API",prefix:I="",headers:A={},...f}=e,_=`${u(s)}${I}`,v=JSON.parse(localStorage.getItem("user")??"{}"),d=v.jwt??v.token??"";return c.create({...f,baseURL:_,headers:t?A:{"Content-Type":"application/json",Authorization:`Bearer ${d}`,...A}})},O=n("getImageURL",e=>e?`${u("APP_TAGSAMURAI_API")}/file-manager/v2/files/${e}`:void 0),T=n("queryParamsStringfy",e=>{if(!e||typeof e=="string")return;const t={};return Object.keys(e).forEach(s=>{Array.isArray(e[s])?e[s].length>0&&Object.assign(t,{[s]:JSON.stringify(e[s])}):e[s]!==void 0&&Object.assign(t,{[s]:e[s]})}),t}),l=i({prefix:"/v1/global-settings/change-log"}),U=n("ChangelogServices",{getChangelogs:e=>l.get("",{params:e}),getChangelogOptions:e=>l.get("/options",{params:e})}),o=i({prefix:"/v1/global-settings/division"}),$=n("DivisionServices",{getDivisions:e=>o.get("",{params:e}),getDivisionDetail:e=>o.get(`/${e}`),postCreateDivision:e=>o.post("/",e),putEditDivision:(e,t)=>o.put(`/${e}`,t),deleteDivisions:e=>{const t={id:JSON.stringify(e)};return o.delete("",{params:t})}}),P=i({env:"APP_LOGS_NOTIFICATION_API",prefix:"/v2"}),y=n("LogServices",{getSessionLogList:e=>P.get("/session-log",{params:e})}),p=i({prefix:"/v1/global-settings/option"}),L=n("OptionServices",{getPositions:()=>p.get("/position"),getDivisions:()=>p.get("/division")}),g=i({prefix:"/v1/global-settings/position"}),h=n("PositionServices",{getPositions:e=>g.get("",{params:e}),getPositionDetail:e=>g.get(`/${e}`),postCreatePosition:e=>g.post("/",e),putEditPosition:(e,t)=>g.put(`/${e}`,t),deletePositions:e=>{const t={id:JSON.stringify(e)};return g.delete("",{params:t})}}),S=i({env:"APP_TAGSAMURAI_API",prefix:"/tag/v2"}),E=n("TagServices",{getTagInfo:e=>S.get("/rfid-qr/scan",{params:e})}),r=i({prefix:"/v1/global-settings/user"}),C=n("UserServices",{getUsers:e=>r.get("",{params:e}),getUserDetail:e=>r.get(`/${e}`),getUserSystemLogs:(e,t)=>r.get(`/${e}/system-logs`,{params:t}),getUserSystemLogOptions:(e,t)=>{const s={};return s[t]=!0,r.get(`/${e}/system-logs/options`,{params:s})},postCreateUser:e=>{const t={"Content-Type":"multipart/form-data"};return r.post("",e,{headers:t})},putEditUser:(e,t)=>{const s={"Content-Type":"multipart/form-data"};return r.put(`/${e}`,t,{headers:s})},deleteUsers:e=>{const t={id:JSON.stringify(e)};return r.delete("",{params:t})},putToggleStatusUsers:e=>r.put("/active-status",e),getUserOptions:e=>{const t={};return t[e]=!0,r.get("/options",{params:t})},deleteCancelEmailChange:e=>r.delete(`/cancel-email-change/${e}`),postResendEmail:e=>r.post("/resend-email",e),putChangePassword:(e,t)=>r.put(`/change-password/${e}`,t)})}}});
|
package/main.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export { default as SettingUserGlobalServices } from './src/services/settingUserGlobal.service';
|
|
2
1
|
export { default as ChangelogServices } from './src/services/changelog.service';
|
|
3
|
-
export {
|
|
2
|
+
export { default as DivisionServices } from './src/services/division.service';
|
|
3
|
+
export { default as LogServices } from './src/services/logNotification.service';
|
|
4
|
+
export { default as OptionServices } from './src/services/option.service';
|
|
5
|
+
export { default as PositionServices } from './src/services/position.service';
|
|
6
|
+
export { default as TagServices } from './src/services/tag.service';
|
|
7
|
+
export { default as UserServices } from './src/services/user.service';
|
|
8
|
+
export { getBaseURL, getImageURL, queryParamsStringfy } from './src/utils';
|
package/package.json
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { FetchDetailResponse, FetchListResponse, FetchResponse } from '../types/fetchResponse.type';
|
|
2
|
+
import { SessionLog } from '../types/logNotification.type';
|
|
3
|
+
import { MasterDataItem } from '../types/masterData.type';
|
|
4
|
+
import { MultiSelectOption } from '../types/options.type';
|
|
5
|
+
import { UserDetail } from '../types/user.type';
|
|
6
|
+
export type GetMasterDataDetailResponse = FetchDetailResponse<MasterDataItem>;
|
|
7
|
+
export type GetOptionResponse = FetchResponse & {
|
|
8
|
+
data: MultiSelectOption[];
|
|
9
|
+
};
|
|
10
|
+
export type GetUserDetailResponse = FetchDetailResponse<UserDetail>;
|
|
11
|
+
export type GetUserOptionsResponse = FetchResponse & {
|
|
12
|
+
data: {
|
|
13
|
+
positionOptions: MultiSelectOption[];
|
|
14
|
+
divisionOptions: MultiSelectOption[];
|
|
15
|
+
modifiedByOptions: MultiSelectOption[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type GetUserSystemLogOptionsResponse = FetchResponse & {
|
|
19
|
+
data: {
|
|
20
|
+
activityOptions: MultiSelectOption[];
|
|
21
|
+
fieldOptions: MultiSelectOption[];
|
|
22
|
+
objectNameOptions: MultiSelectOption[];
|
|
23
|
+
objectOptions: MultiSelectOption[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type GetChangelogOptionsResponse = FetchResponse & {
|
|
27
|
+
data: {
|
|
28
|
+
actionOptions: MultiSelectOption[];
|
|
29
|
+
fieldOptions: MultiSelectOption[];
|
|
30
|
+
modifiedByOptions: MultiSelectOption[];
|
|
31
|
+
objectNameOptions: MultiSelectOption[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type GetSessionLogListResponse = FetchListResponse<SessionLog>;
|
|
35
|
+
export interface CreateUserBody {
|
|
36
|
+
profilePicture?: File;
|
|
37
|
+
firstName: string;
|
|
38
|
+
lastName: string;
|
|
39
|
+
employeeId?: string;
|
|
40
|
+
position?: string;
|
|
41
|
+
division: string;
|
|
42
|
+
email: string;
|
|
43
|
+
isTemporary?: boolean;
|
|
44
|
+
expiryDate?: number;
|
|
45
|
+
phoneNumber: string;
|
|
46
|
+
access: string;
|
|
47
|
+
userTag?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface EditUserBody extends Partial<CreateUserBody> {
|
|
50
|
+
changeProfilePicture: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface GetUserOptionsParam {
|
|
53
|
+
divisionOptions?: boolean;
|
|
54
|
+
positionOptions?: boolean;
|
|
55
|
+
modifiedByOptions?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface PutToggleStatusUsersBody {
|
|
58
|
+
user: string[];
|
|
59
|
+
isActive: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface PostResendEmailBody {
|
|
62
|
+
email: string[];
|
|
63
|
+
}
|
|
64
|
+
export interface PutChangePasswordBody {
|
|
65
|
+
oldPassword: string;
|
|
66
|
+
newPassword: string;
|
|
67
|
+
}
|
|
68
|
+
export interface GetUserSystemLogOptionsParam {
|
|
69
|
+
activityOptions?: boolean;
|
|
70
|
+
fieldOptions?: boolean;
|
|
71
|
+
objectNameOptions?: boolean;
|
|
72
|
+
objectOptions?: boolean;
|
|
73
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { CreateEditMasterDataBody } from '../dto/masterData.dto';
|
|
3
|
+
import { GetMasterDataDetailResponse } from '../dto/user.dto';
|
|
4
|
+
import { FetchListResponse, QueryParams } from '../types/fetchResponse.type';
|
|
5
|
+
import { MasterDataItem } from '../types/masterData.type';
|
|
6
|
+
declare const DivisionServices: {
|
|
7
|
+
getDivisions: (params?: QueryParams) => Promise<AxiosResponse<FetchListResponse<MasterDataItem>>>;
|
|
8
|
+
getDivisionDetail: (id: string) => Promise<AxiosResponse<GetMasterDataDetailResponse>>;
|
|
9
|
+
postCreateDivision: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
|
|
10
|
+
putEditDivision: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
|
|
11
|
+
deleteDivisions: (ids: string[]) => Promise<AxiosResponse>;
|
|
12
|
+
};
|
|
13
|
+
export default DivisionServices;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { SessionLogFetchParams } from '../dto/logNotification.dto';
|
|
3
|
+
import { GetSessionLogListResponse } from '../dto/user.dto';
|
|
4
|
+
declare const LogServices: {
|
|
5
|
+
getSessionLogList: (params: SessionLogFetchParams) => Promise<AxiosResponse<GetSessionLogListResponse>>;
|
|
6
|
+
};
|
|
7
|
+
export default LogServices;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { GetOptionResponse } from '../dto/user.dto';
|
|
3
|
+
declare const OptionServices: {
|
|
4
|
+
getPositions: () => Promise<AxiosResponse<GetOptionResponse>>;
|
|
5
|
+
getDivisions: () => Promise<AxiosResponse<GetOptionResponse>>;
|
|
6
|
+
};
|
|
7
|
+
export default OptionServices;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { CreateEditMasterDataBody } from '../dto/masterData.dto';
|
|
3
|
+
import { GetMasterDataDetailResponse } from '../dto/user.dto';
|
|
4
|
+
import { FetchListResponse, QueryParams } from '../types/fetchResponse.type';
|
|
5
|
+
import { MasterDataItem } from '../types/masterData.type';
|
|
6
|
+
declare const PositionServices: {
|
|
7
|
+
getPositions: (params?: QueryParams) => Promise<AxiosResponse<FetchListResponse<MasterDataItem>>>;
|
|
8
|
+
getPositionDetail: (id: string) => Promise<AxiosResponse<GetMasterDataDetailResponse>>;
|
|
9
|
+
postCreatePosition: (body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
|
|
10
|
+
putEditPosition: (id: string, body: CreateEditMasterDataBody) => Promise<AxiosResponse>;
|
|
11
|
+
deletePositions: (ids: string[]) => Promise<AxiosResponse>;
|
|
12
|
+
};
|
|
13
|
+
export default PositionServices;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
|
+
import { CreateUserBody, EditUserBody, GetUserDetailResponse, GetUserOptionsParam, GetUserOptionsResponse, GetUserSystemLogOptionsParam, GetUserSystemLogOptionsResponse, PostResendEmailBody, PutChangePasswordBody, PutToggleStatusUsersBody } from '../dto/user.dto';
|
|
3
|
+
import { FetchListResponse, QueryParams } from '../types/fetchResponse.type';
|
|
4
|
+
import { SystemLog, UserItem } from '../types/user.type';
|
|
5
|
+
declare const SettingUserGlobalServices: {
|
|
6
|
+
getUsers: (params?: QueryParams) => Promise<AxiosResponse<FetchListResponse<UserItem>>>;
|
|
7
|
+
getUserDetail: (id: string) => Promise<AxiosResponse<GetUserDetailResponse>>;
|
|
8
|
+
getUserSystemLogs: (id: string, params: QueryParams) => Promise<AxiosResponse<FetchListResponse<SystemLog>>>;
|
|
9
|
+
getUserSystemLogOptions: (id: string, optionField: keyof GetUserSystemLogOptionsParam) => Promise<AxiosResponse<GetUserSystemLogOptionsResponse>>;
|
|
10
|
+
postCreateUser: (body: CreateUserBody) => Promise<AxiosResponse>;
|
|
11
|
+
putEditUser: (id: string, body: EditUserBody) => Promise<AxiosResponse>;
|
|
12
|
+
deleteUsers: (ids: string[]) => Promise<AxiosResponse>;
|
|
13
|
+
putToggleStatusUsers: (body: PutToggleStatusUsersBody) => Promise<AxiosResponse>;
|
|
14
|
+
getUserOptions: (optionField: keyof GetUserOptionsParam) => Promise<AxiosResponse<GetUserOptionsResponse>>;
|
|
15
|
+
deleteCancelEmailChange: (id: string) => Promise<AxiosResponse>;
|
|
16
|
+
postResendEmail: (body: PostResendEmailBody) => Promise<AxiosResponse>;
|
|
17
|
+
putChangePassword: (id: string, body: PutChangePasswordBody) => Promise<AxiosResponse>;
|
|
18
|
+
};
|
|
19
|
+
export default SettingUserGlobalServices;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export type UserType = 'Basic' | 'Admin';
|
|
2
|
+
export type User = {
|
|
3
|
+
_id: string;
|
|
4
|
+
key: number;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
userType: UserType;
|
|
8
|
+
position: string;
|
|
9
|
+
division: string;
|
|
10
|
+
email: string;
|
|
11
|
+
employeeId: string;
|
|
12
|
+
phoneNumber: string;
|
|
13
|
+
modifiedBy: {
|
|
14
|
+
_id: string;
|
|
15
|
+
fullName: string;
|
|
16
|
+
key: number;
|
|
17
|
+
};
|
|
18
|
+
updatedAt: Date | string;
|
|
19
|
+
isDeletable: boolean;
|
|
20
|
+
isConfirmed: boolean;
|
|
21
|
+
isDefault: boolean;
|
|
22
|
+
profilePictureSmall: string;
|
|
23
|
+
profilePictureMedium: string;
|
|
24
|
+
profilePictureBig: string;
|
|
25
|
+
exportSystemRole: string;
|
|
26
|
+
exportTransactionRole: string;
|
|
27
|
+
isSelf: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type UserDetail = {
|
|
30
|
+
_id: string;
|
|
31
|
+
isActive: boolean;
|
|
32
|
+
isDefault: boolean;
|
|
33
|
+
profilePictureBig?: string;
|
|
34
|
+
profilePictureMedium?: string;
|
|
35
|
+
profilePictureSmall?: string;
|
|
36
|
+
firstName: string;
|
|
37
|
+
lastName: string;
|
|
38
|
+
email: string;
|
|
39
|
+
pendingEmailChange: string;
|
|
40
|
+
position?: string;
|
|
41
|
+
division: string;
|
|
42
|
+
employeeId?: string;
|
|
43
|
+
phoneNumber: string;
|
|
44
|
+
isTemporary: boolean;
|
|
45
|
+
expiryDate: string;
|
|
46
|
+
access: string[];
|
|
47
|
+
name: string;
|
|
48
|
+
userTag?: string;
|
|
49
|
+
isSelf?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export type UserItem = {
|
|
52
|
+
_id: string;
|
|
53
|
+
isActive: boolean;
|
|
54
|
+
pendingEmail?: string;
|
|
55
|
+
isDefault: boolean;
|
|
56
|
+
profilePicture: string;
|
|
57
|
+
name: string;
|
|
58
|
+
email: string;
|
|
59
|
+
position: string;
|
|
60
|
+
division: string;
|
|
61
|
+
employeeId: string;
|
|
62
|
+
phoneNumber: string;
|
|
63
|
+
modifiedBy: ModifiedBy;
|
|
64
|
+
lastUpdate: string;
|
|
65
|
+
isSelf?: boolean;
|
|
66
|
+
};
|
|
67
|
+
interface ModifiedBy {
|
|
68
|
+
_id: string;
|
|
69
|
+
fullName: string;
|
|
70
|
+
key: number;
|
|
71
|
+
}
|
|
72
|
+
export type SystemLog = {
|
|
73
|
+
_id: string;
|
|
74
|
+
activity: string;
|
|
75
|
+
date: string;
|
|
76
|
+
field: string;
|
|
77
|
+
newValue: string;
|
|
78
|
+
object: string;
|
|
79
|
+
objectName: string;
|
|
80
|
+
oldValue: string;
|
|
81
|
+
};
|
|
82
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Retrieves the base URL from environment variables.
|
|
3
3
|
*
|
|
4
|
-
* @param {string} [env='
|
|
4
|
+
* @param {string} [env='APP_TAGSAMURAI_API'] - The environment variable name without the platform prefix.
|
|
5
5
|
* @returns The base URL for the specified environment.
|
|
6
6
|
* @example 'APP_EXAMPLE_API'
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getImageURL: (name?: string | null
|
|
1
|
+
export declare const getImageURL: (name?: string | null) => string | undefined;
|
package/src/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createAxiosInstance } from './createInstance.util';
|
|
2
|
-
export { queryParamsStringfy } from './queryParamsStringify.util';
|
|
3
|
-
export { getImageURL } from './getImageURL.util';
|
|
4
2
|
export { getBaseURL } from './getBaseURL.util';
|
|
3
|
+
export { getImageURL } from './getImageURL.util';
|
|
4
|
+
export { queryParamsStringfy } from './queryParamsStringify.util';
|