@tagsamurai/fats-api-services 1.1.0-dev-alpha.11 → 1.1.0-dev-alpha.12
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
CHANGED
|
@@ -338,6 +338,11 @@ const UserServices = {
|
|
|
338
338
|
getUserDetailTransactionRoleList: (id, params) => {
|
|
339
339
|
return API$L.get(`/user-detail/${id}/transaction-role-list`, { params });
|
|
340
340
|
},
|
|
341
|
+
getUserDetailTransactionRoleListOptions: (userId, params) => {
|
|
342
|
+
return API$L.get(`/user-detail/${userId}/transaction-role-list/options`, {
|
|
343
|
+
params
|
|
344
|
+
});
|
|
345
|
+
},
|
|
341
346
|
postUserDetailAddTransactionRole: (userId, data) => {
|
|
342
347
|
return API$L.post(`/users/${userId}/add-transaction-role`, data);
|
|
343
348
|
},
|
|
@@ -399,23 +404,23 @@ const SubUserServices = {
|
|
|
399
404
|
headers
|
|
400
405
|
});
|
|
401
406
|
},
|
|
402
|
-
getBorrowedAsset: (
|
|
403
|
-
return API$K.get(`/${
|
|
407
|
+
getBorrowedAsset: (subUserId, params) => {
|
|
408
|
+
return API$K.get(`/${subUserId}/borrowed-asset`, {
|
|
404
409
|
params
|
|
405
410
|
});
|
|
406
411
|
},
|
|
407
|
-
getBorrowedAssetOptions: (
|
|
408
|
-
return API$K.get(`/${
|
|
412
|
+
getBorrowedAssetOptions: (subUserId, params) => {
|
|
413
|
+
return API$K.get(`/${subUserId}/borrowed-asset/options`, {
|
|
409
414
|
params
|
|
410
415
|
});
|
|
411
416
|
},
|
|
412
|
-
getAssignedAsset: (
|
|
413
|
-
return API$K.get(`/${
|
|
417
|
+
getAssignedAsset: (subUserId, params) => {
|
|
418
|
+
return API$K.get(`/${subUserId}/assigned-asset`, {
|
|
414
419
|
params
|
|
415
420
|
});
|
|
416
421
|
},
|
|
417
|
-
getAssignedAssetOptions: (
|
|
418
|
-
return API$K.get(`/${
|
|
422
|
+
getAssignedAssetOptions: (subUserId, params) => {
|
|
423
|
+
return API$K.get(`/${subUserId}/assigned-asset/options`, {
|
|
419
424
|
params
|
|
420
425
|
});
|
|
421
426
|
}
|
package/api-services.system.js
CHANGED
|
@@ -346,6 +346,11 @@ System.register(["axios"], function(exports, module) {
|
|
|
346
346
|
getUserDetailTransactionRoleList: (id, params) => {
|
|
347
347
|
return API$L.get(`/user-detail/${id}/transaction-role-list`, { params });
|
|
348
348
|
},
|
|
349
|
+
getUserDetailTransactionRoleListOptions: (userId, params) => {
|
|
350
|
+
return API$L.get(`/user-detail/${userId}/transaction-role-list/options`, {
|
|
351
|
+
params
|
|
352
|
+
});
|
|
353
|
+
},
|
|
349
354
|
postUserDetailAddTransactionRole: (userId, data) => {
|
|
350
355
|
return API$L.post(`/users/${userId}/add-transaction-role`, data);
|
|
351
356
|
},
|
|
@@ -407,23 +412,23 @@ System.register(["axios"], function(exports, module) {
|
|
|
407
412
|
headers
|
|
408
413
|
});
|
|
409
414
|
},
|
|
410
|
-
getBorrowedAsset: (
|
|
411
|
-
return API$K.get(`/${
|
|
415
|
+
getBorrowedAsset: (subUserId, params) => {
|
|
416
|
+
return API$K.get(`/${subUserId}/borrowed-asset`, {
|
|
412
417
|
params
|
|
413
418
|
});
|
|
414
419
|
},
|
|
415
|
-
getBorrowedAssetOptions: (
|
|
416
|
-
return API$K.get(`/${
|
|
420
|
+
getBorrowedAssetOptions: (subUserId, params) => {
|
|
421
|
+
return API$K.get(`/${subUserId}/borrowed-asset/options`, {
|
|
417
422
|
params
|
|
418
423
|
});
|
|
419
424
|
},
|
|
420
|
-
getAssignedAsset: (
|
|
421
|
-
return API$K.get(`/${
|
|
425
|
+
getAssignedAsset: (subUserId, params) => {
|
|
426
|
+
return API$K.get(`/${subUserId}/assigned-asset`, {
|
|
422
427
|
params
|
|
423
428
|
});
|
|
424
429
|
},
|
|
425
|
-
getAssignedAssetOptions: (
|
|
426
|
-
return API$K.get(`/${
|
|
430
|
+
getAssignedAssetOptions: (subUserId, params) => {
|
|
431
|
+
return API$K.get(`/${subUserId}/assigned-asset/options`, {
|
|
427
432
|
params
|
|
428
433
|
});
|
|
429
434
|
}
|
package/package.json
CHANGED
package/src/dto/user.dto.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { RolePermission } from './role.dto';
|
|
|
5
5
|
import { Group } from '../types/group.type';
|
|
6
6
|
import { PermissionType } from '../types/role.type';
|
|
7
7
|
import { TransactionLogType } from './transactionLog.dto';
|
|
8
|
+
type CommonResponse = {
|
|
9
|
+
status: number;
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
8
12
|
export interface CreateUserDTO {
|
|
9
13
|
firstName: string;
|
|
10
14
|
lastName: string;
|
|
@@ -57,6 +61,16 @@ export type TransactionRoleFilterParams = {
|
|
|
57
61
|
roleType?: string;
|
|
58
62
|
group?: string;
|
|
59
63
|
};
|
|
64
|
+
export type TransactionRoleOptionsFetchParams = {
|
|
65
|
+
transactionOptions?: boolean;
|
|
66
|
+
roleNameOptions?: boolean;
|
|
67
|
+
};
|
|
68
|
+
export type GetUserDetailTransactionRoleListOptionsResponse = CommonResponse & {
|
|
69
|
+
data: {
|
|
70
|
+
transactionOptions: Option[];
|
|
71
|
+
roleNameOptions: Option[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
60
74
|
export type TransactionRoleFetchParams = TableParams & TransactionRoleFilterParams;
|
|
61
75
|
export type GetUserLogAssignmentOptionsResponse = FetchResponse & {
|
|
62
76
|
data: {
|
|
@@ -222,3 +236,4 @@ export type GetUserAssetOptionsResponse = FetchOptionResponse<{
|
|
|
222
236
|
}>;
|
|
223
237
|
export type UserAssetBorrowedFetchParams = TableParams & UserAssetBorrowedFilterParams;
|
|
224
238
|
export type UserAssetAssignedFetchParams = TableParams & UserAssetAssignedFilterParams;
|
|
239
|
+
export {};
|
|
@@ -9,9 +9,9 @@ declare const SubUserServices: {
|
|
|
9
9
|
putSubUserSetActiveBulk: (userId: string, data: SetActiveBulkSubUserDTO) => Promise<AxiosResponse>;
|
|
10
10
|
deleteSubUser: (userId: string, subUserIds: string[]) => Promise<AxiosResponse>;
|
|
11
11
|
putEditSubUser: (userId: string, subUserId: string, data: EditSubUserDTO) => Promise<AxiosResponse>;
|
|
12
|
-
getBorrowedAsset: (
|
|
13
|
-
getBorrowedAssetOptions: (
|
|
14
|
-
getAssignedAsset: (
|
|
15
|
-
getAssignedAssetOptions: (
|
|
12
|
+
getBorrowedAsset: (subUserId: string, params: Record<string, unknown>) => Promise<AxiosResponse>;
|
|
13
|
+
getBorrowedAssetOptions: (subUserId: string, params: Record<string, unknown>) => Promise<AxiosResponse>;
|
|
14
|
+
getAssignedAsset: (subUserId: string, params: Record<string, unknown>) => Promise<AxiosResponse>;
|
|
15
|
+
getAssignedAssetOptions: (subUserId: string, params: Record<string, unknown>) => Promise<AxiosResponse>;
|
|
16
16
|
};
|
|
17
17
|
export default SubUserServices;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { GetTransactionAdminLogOptionsResponse, UserOptionBoolean, TransactionLogFetchParams, TransactionLogLoadingFilters, TransactionRoleFetchParams, UserFetchParams, FetchUserOptionResponse, SetActiveBulkUserDTO, PutAssignGroupRole, AddTransactionRoleDTO, RemoveTransactionRoleDTO, EditTransactionRoleDTO, UserAssetAssignedFetchParams, UserAssetBorrowedFetchParams, UserAssetBorrowedLoadingFilters, UserAssetAssignedLoadingFilters, GetUserAssetOptionsResponse, SetActiveUserRoleDTO } from '../dto/user.dto';
|
|
2
|
+
import { GetTransactionAdminLogOptionsResponse, UserOptionBoolean, TransactionLogFetchParams, TransactionLogLoadingFilters, TransactionRoleFetchParams, UserFetchParams, FetchUserOptionResponse, SetActiveBulkUserDTO, PutAssignGroupRole, AddTransactionRoleDTO, RemoveTransactionRoleDTO, EditTransactionRoleDTO, UserAssetAssignedFetchParams, UserAssetBorrowedFetchParams, UserAssetBorrowedLoadingFilters, UserAssetAssignedLoadingFilters, GetUserAssetOptionsResponse, SetActiveUserRoleDTO, TransactionRoleOptionsFetchParams, GetUserDetailTransactionRoleListOptionsResponse } from '../dto/user.dto';
|
|
3
3
|
import { FetchDetailResponse, FetchListResponse } from '../types/fetchResponse.type';
|
|
4
4
|
import { User, UserAssetAssigned, UserAssetBorrowed, UserDetail } from '../types/user.type';
|
|
5
5
|
import { UserTransactionRole } from '../types/userTransactionRole.type';
|
|
@@ -25,6 +25,7 @@ declare const UserServices: {
|
|
|
25
25
|
*/
|
|
26
26
|
getUserDetailSystemRoles: (id: string, params?: Record<string, unknown>, permissionType?: string) => Promise<AxiosResponse>;
|
|
27
27
|
getUserDetailTransactionRoleList: (id: string, params: TransactionRoleFetchParams) => Promise<AxiosResponse<FetchListResponse<UserTransactionRole>>>;
|
|
28
|
+
getUserDetailTransactionRoleListOptions: (userId: string, params: TransactionRoleOptionsFetchParams) => Promise<AxiosResponse<GetUserDetailTransactionRoleListOptionsResponse>>;
|
|
28
29
|
postUserDetailAddTransactionRole: (userId: string, data: AddTransactionRoleDTO) => Promise<AxiosResponse>;
|
|
29
30
|
deleteUserDetailTransactionRole: (userId: string, body: RemoveTransactionRoleDTO) => Promise<AxiosResponse>;
|
|
30
31
|
putUserDetailEditTransactionRole: (userId: string, data: EditTransactionRoleDTO) => Promise<AxiosResponse>;
|