ptechcore_ui 1.0.20 → 1.0.21
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/dist/index.cjs +892 -154
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +980 -186
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -190,6 +190,7 @@ interface User {
|
|
|
190
190
|
last_login: string | null;
|
|
191
191
|
is_superuser: boolean;
|
|
192
192
|
username: string;
|
|
193
|
+
department: number | null;
|
|
193
194
|
first_name: string;
|
|
194
195
|
last_name: string;
|
|
195
196
|
email: string;
|
|
@@ -309,6 +310,19 @@ interface PagesProps {
|
|
|
309
310
|
}
|
|
310
311
|
declare const Pages: React$1.FC<PagesProps>;
|
|
311
312
|
|
|
313
|
+
interface UpdateProfileData {
|
|
314
|
+
first_name?: string;
|
|
315
|
+
last_name?: string;
|
|
316
|
+
email?: string;
|
|
317
|
+
phonenumber?: string;
|
|
318
|
+
job_title?: string;
|
|
319
|
+
department?: string;
|
|
320
|
+
}
|
|
321
|
+
interface ChangePasswordData {
|
|
322
|
+
current_password: string;
|
|
323
|
+
new_password: string;
|
|
324
|
+
confirm_password: string;
|
|
325
|
+
}
|
|
312
326
|
declare const UserServices: {
|
|
313
327
|
addUser: (data: Partial<User>, token: string) => Promise<unknown>;
|
|
314
328
|
getUsers: (token: string) => Promise<unknown>;
|
|
@@ -320,6 +334,11 @@ declare const UserServices: {
|
|
|
320
334
|
getEntityUsers: (entityId: number, token: string) => Promise<unknown>;
|
|
321
335
|
getuserEntitiesAccess: (id: number, token: string) => Promise<unknown>;
|
|
322
336
|
addUserToEntity: (entityId: number, userId: number, token: string) => Promise<unknown>;
|
|
337
|
+
updateMyProfile: (data: UpdateProfileData) => Promise<unknown>;
|
|
338
|
+
updateProfilePicture: (file: File) => Promise<unknown>;
|
|
339
|
+
deleteProfilePicture: () => Promise<unknown>;
|
|
340
|
+
changePassword: (data: ChangePasswordData) => Promise<unknown>;
|
|
341
|
+
getMyProfile: () => Promise<unknown>;
|
|
323
342
|
};
|
|
324
343
|
|
|
325
344
|
interface SendOtpPayload {
|
|
@@ -607,6 +626,8 @@ declare class FetchApi {
|
|
|
607
626
|
static get<T>(url: string, token?: string): Promise<T>;
|
|
608
627
|
static put<T>(url: string, payload?: any, token?: string): Promise<T>;
|
|
609
628
|
static delete<T>(url: string, token?: string): Promise<T>;
|
|
629
|
+
static uploadFile<T>(url: string, formData: FormData, token?: string): Promise<T>;
|
|
630
|
+
static patch<T>(url: string, payload?: any, token?: string): Promise<T>;
|
|
610
631
|
}
|
|
611
632
|
|
|
612
633
|
type AlertVariant = 'danger' | 'warning' | 'info' | 'success';
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,7 @@ interface User {
|
|
|
190
190
|
last_login: string | null;
|
|
191
191
|
is_superuser: boolean;
|
|
192
192
|
username: string;
|
|
193
|
+
department: number | null;
|
|
193
194
|
first_name: string;
|
|
194
195
|
last_name: string;
|
|
195
196
|
email: string;
|
|
@@ -309,6 +310,19 @@ interface PagesProps {
|
|
|
309
310
|
}
|
|
310
311
|
declare const Pages: React$1.FC<PagesProps>;
|
|
311
312
|
|
|
313
|
+
interface UpdateProfileData {
|
|
314
|
+
first_name?: string;
|
|
315
|
+
last_name?: string;
|
|
316
|
+
email?: string;
|
|
317
|
+
phonenumber?: string;
|
|
318
|
+
job_title?: string;
|
|
319
|
+
department?: string;
|
|
320
|
+
}
|
|
321
|
+
interface ChangePasswordData {
|
|
322
|
+
current_password: string;
|
|
323
|
+
new_password: string;
|
|
324
|
+
confirm_password: string;
|
|
325
|
+
}
|
|
312
326
|
declare const UserServices: {
|
|
313
327
|
addUser: (data: Partial<User>, token: string) => Promise<unknown>;
|
|
314
328
|
getUsers: (token: string) => Promise<unknown>;
|
|
@@ -320,6 +334,11 @@ declare const UserServices: {
|
|
|
320
334
|
getEntityUsers: (entityId: number, token: string) => Promise<unknown>;
|
|
321
335
|
getuserEntitiesAccess: (id: number, token: string) => Promise<unknown>;
|
|
322
336
|
addUserToEntity: (entityId: number, userId: number, token: string) => Promise<unknown>;
|
|
337
|
+
updateMyProfile: (data: UpdateProfileData) => Promise<unknown>;
|
|
338
|
+
updateProfilePicture: (file: File) => Promise<unknown>;
|
|
339
|
+
deleteProfilePicture: () => Promise<unknown>;
|
|
340
|
+
changePassword: (data: ChangePasswordData) => Promise<unknown>;
|
|
341
|
+
getMyProfile: () => Promise<unknown>;
|
|
323
342
|
};
|
|
324
343
|
|
|
325
344
|
interface SendOtpPayload {
|
|
@@ -607,6 +626,8 @@ declare class FetchApi {
|
|
|
607
626
|
static get<T>(url: string, token?: string): Promise<T>;
|
|
608
627
|
static put<T>(url: string, payload?: any, token?: string): Promise<T>;
|
|
609
628
|
static delete<T>(url: string, token?: string): Promise<T>;
|
|
629
|
+
static uploadFile<T>(url: string, formData: FormData, token?: string): Promise<T>;
|
|
630
|
+
static patch<T>(url: string, payload?: any, token?: string): Promise<T>;
|
|
610
631
|
}
|
|
611
632
|
|
|
612
633
|
type AlertVariant = 'danger' | 'warning' | 'info' | 'success';
|