@ahomevilla-hotel/node-sdk 1.1.4 → 1.1.6
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.ts +871 -94
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -42,6 +42,34 @@ export interface AddTranslationDto {
|
|
|
42
42
|
*/
|
|
43
43
|
'data': Array<TranslationData>;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @interface AdminUpdateUserDto
|
|
49
|
+
*/
|
|
50
|
+
export interface AdminUpdateUserDto {
|
|
51
|
+
/**
|
|
52
|
+
* The user\'s role.
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof AdminUpdateUserDto
|
|
55
|
+
*/
|
|
56
|
+
'role': AdminUpdateUserDtoRoleEnum;
|
|
57
|
+
/**
|
|
58
|
+
* Filter by branch ID
|
|
59
|
+
* @type {string}
|
|
60
|
+
* @memberof AdminUpdateUserDto
|
|
61
|
+
*/
|
|
62
|
+
'branchId'?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const AdminUpdateUserDtoRoleEnum = {
|
|
66
|
+
User: 'USER',
|
|
67
|
+
Staff: 'STAFF',
|
|
68
|
+
Admin: 'ADMIN'
|
|
69
|
+
} as const;
|
|
70
|
+
|
|
71
|
+
export type AdminUpdateUserDtoRoleEnum = typeof AdminUpdateUserDtoRoleEnum[keyof typeof AdminUpdateUserDtoRoleEnum];
|
|
72
|
+
|
|
45
73
|
/**
|
|
46
74
|
*
|
|
47
75
|
* @export
|
|
@@ -131,6 +159,114 @@ export const AmenityTypeEnum = {
|
|
|
131
159
|
|
|
132
160
|
export type AmenityTypeEnum = typeof AmenityTypeEnum[keyof typeof AmenityTypeEnum];
|
|
133
161
|
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* @export
|
|
165
|
+
* @interface BlockActivity
|
|
166
|
+
*/
|
|
167
|
+
export interface BlockActivity {
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* @type {string}
|
|
171
|
+
* @memberof BlockActivity
|
|
172
|
+
*/
|
|
173
|
+
'id': string;
|
|
174
|
+
/**
|
|
175
|
+
* Soft delete flag
|
|
176
|
+
* @type {boolean}
|
|
177
|
+
* @memberof BlockActivity
|
|
178
|
+
*/
|
|
179
|
+
'isDeleted': boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Soft delete timestamp
|
|
182
|
+
* @type {string}
|
|
183
|
+
* @memberof BlockActivity
|
|
184
|
+
*/
|
|
185
|
+
'deletedAt': string | null;
|
|
186
|
+
/**
|
|
187
|
+
*
|
|
188
|
+
* @type {string}
|
|
189
|
+
* @memberof BlockActivity
|
|
190
|
+
*/
|
|
191
|
+
'createdAt': string;
|
|
192
|
+
/**
|
|
193
|
+
*
|
|
194
|
+
* @type {string}
|
|
195
|
+
* @memberof BlockActivity
|
|
196
|
+
*/
|
|
197
|
+
'updatedAt': string;
|
|
198
|
+
/**
|
|
199
|
+
* ID of user who was blocked/unblocked
|
|
200
|
+
* @type {string}
|
|
201
|
+
* @memberof BlockActivity
|
|
202
|
+
*/
|
|
203
|
+
'userId': string;
|
|
204
|
+
/**
|
|
205
|
+
* Details of user who was blocked/unblocked
|
|
206
|
+
* @type {User}
|
|
207
|
+
* @memberof BlockActivity
|
|
208
|
+
*/
|
|
209
|
+
'user': User;
|
|
210
|
+
/**
|
|
211
|
+
* ID of user who performed the block/unblock action
|
|
212
|
+
* @type {string}
|
|
213
|
+
* @memberof BlockActivity
|
|
214
|
+
*/
|
|
215
|
+
'blockedBy': string;
|
|
216
|
+
/**
|
|
217
|
+
* Details of user who performed the block/unblock action
|
|
218
|
+
* @type {User}
|
|
219
|
+
* @memberof BlockActivity
|
|
220
|
+
*/
|
|
221
|
+
'blockedByUser': User;
|
|
222
|
+
/**
|
|
223
|
+
* Type of action performed (BLOCK/UNBLOCK)
|
|
224
|
+
* @type {string}
|
|
225
|
+
* @memberof BlockActivity
|
|
226
|
+
*/
|
|
227
|
+
'action': BlockActivityActionEnum;
|
|
228
|
+
/**
|
|
229
|
+
* Reason for the block/unblock action
|
|
230
|
+
* @type {string}
|
|
231
|
+
* @memberof BlockActivity
|
|
232
|
+
*/
|
|
233
|
+
'reason': string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export const BlockActivityActionEnum = {
|
|
237
|
+
Block: 'BLOCK',
|
|
238
|
+
Unblock: 'UNBLOCK'
|
|
239
|
+
} as const;
|
|
240
|
+
|
|
241
|
+
export type BlockActivityActionEnum = typeof BlockActivityActionEnum[keyof typeof BlockActivityActionEnum];
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
*
|
|
245
|
+
* @export
|
|
246
|
+
* @interface BlockOrUnblockUserDto
|
|
247
|
+
*/
|
|
248
|
+
export interface BlockOrUnblockUserDto {
|
|
249
|
+
/**
|
|
250
|
+
* The reason for blocking/unblocking the user
|
|
251
|
+
* @type {string}
|
|
252
|
+
* @memberof BlockOrUnblockUserDto
|
|
253
|
+
*/
|
|
254
|
+
'reason': string;
|
|
255
|
+
/**
|
|
256
|
+
* The action to perform (BLOCK or UNBLOCK)
|
|
257
|
+
* @type {string}
|
|
258
|
+
* @memberof BlockOrUnblockUserDto
|
|
259
|
+
*/
|
|
260
|
+
'action': BlockOrUnblockUserDtoActionEnum;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export const BlockOrUnblockUserDtoActionEnum = {
|
|
264
|
+
Block: 'BLOCK',
|
|
265
|
+
Unblock: 'UNBLOCK'
|
|
266
|
+
} as const;
|
|
267
|
+
|
|
268
|
+
export type BlockOrUnblockUserDtoActionEnum = typeof BlockOrUnblockUserDtoActionEnum[keyof typeof BlockOrUnblockUserDtoActionEnum];
|
|
269
|
+
|
|
134
270
|
/**
|
|
135
271
|
*
|
|
136
272
|
* @export
|
|
@@ -1263,6 +1399,19 @@ export interface CreateUserDto {
|
|
|
1263
1399
|
*/
|
|
1264
1400
|
'name': string;
|
|
1265
1401
|
}
|
|
1402
|
+
/**
|
|
1403
|
+
*
|
|
1404
|
+
* @export
|
|
1405
|
+
* @interface DeleteUserDto
|
|
1406
|
+
*/
|
|
1407
|
+
export interface DeleteUserDto {
|
|
1408
|
+
/**
|
|
1409
|
+
* Reason for deleting the user
|
|
1410
|
+
* @type {string}
|
|
1411
|
+
* @memberof DeleteUserDto
|
|
1412
|
+
*/
|
|
1413
|
+
'reason': string;
|
|
1414
|
+
}
|
|
1266
1415
|
/**
|
|
1267
1416
|
*
|
|
1268
1417
|
* @export
|
|
@@ -1658,12 +1807,36 @@ export type FilterRoomDetailDtoBedTypeEnum = typeof FilterRoomDetailDtoBedTypeEn
|
|
|
1658
1807
|
* @interface FilterUserDto
|
|
1659
1808
|
*/
|
|
1660
1809
|
export interface FilterUserDto {
|
|
1810
|
+
/**
|
|
1811
|
+
*
|
|
1812
|
+
* @type {string}
|
|
1813
|
+
* @memberof FilterUserDto
|
|
1814
|
+
*/
|
|
1815
|
+
'keyword'?: string;
|
|
1661
1816
|
/**
|
|
1662
1817
|
*
|
|
1663
1818
|
* @type {string}
|
|
1664
1819
|
* @memberof FilterUserDto
|
|
1665
1820
|
*/
|
|
1666
1821
|
'roles'?: FilterUserDtoRolesEnum;
|
|
1822
|
+
/**
|
|
1823
|
+
*
|
|
1824
|
+
* @type {boolean}
|
|
1825
|
+
* @memberof FilterUserDto
|
|
1826
|
+
*/
|
|
1827
|
+
'is_blocked'?: boolean;
|
|
1828
|
+
/**
|
|
1829
|
+
*
|
|
1830
|
+
* @type {boolean}
|
|
1831
|
+
* @memberof FilterUserDto
|
|
1832
|
+
*/
|
|
1833
|
+
'is_active'?: boolean;
|
|
1834
|
+
/**
|
|
1835
|
+
* Filter by branch ID
|
|
1836
|
+
* @type {string}
|
|
1837
|
+
* @memberof FilterUserDto
|
|
1838
|
+
*/
|
|
1839
|
+
'branchId'?: string;
|
|
1667
1840
|
}
|
|
1668
1841
|
|
|
1669
1842
|
export const FilterUserDtoRolesEnum = {
|
|
@@ -1801,10 +1974,10 @@ export interface HotelRoom {
|
|
|
1801
1974
|
'bookings'?: Array<Booking>;
|
|
1802
1975
|
/**
|
|
1803
1976
|
*
|
|
1804
|
-
* @type {
|
|
1977
|
+
* @type {UserCount}
|
|
1805
1978
|
* @memberof HotelRoom
|
|
1806
1979
|
*/
|
|
1807
|
-
'_count'?:
|
|
1980
|
+
'_count'?: UserCount;
|
|
1808
1981
|
}
|
|
1809
1982
|
|
|
1810
1983
|
export const HotelRoomStatusEnum = {
|
|
@@ -1816,19 +1989,6 @@ export const HotelRoomStatusEnum = {
|
|
|
1816
1989
|
|
|
1817
1990
|
export type HotelRoomStatusEnum = typeof HotelRoomStatusEnum[keyof typeof HotelRoomStatusEnum];
|
|
1818
1991
|
|
|
1819
|
-
/**
|
|
1820
|
-
* Count of bookings
|
|
1821
|
-
* @export
|
|
1822
|
-
* @interface HotelRoomCount
|
|
1823
|
-
*/
|
|
1824
|
-
export interface HotelRoomCount {
|
|
1825
|
-
/**
|
|
1826
|
-
*
|
|
1827
|
-
* @type {number}
|
|
1828
|
-
* @memberof HotelRoomCount
|
|
1829
|
-
*/
|
|
1830
|
-
'bookings'?: number;
|
|
1831
|
-
}
|
|
1832
1992
|
/**
|
|
1833
1993
|
*
|
|
1834
1994
|
* @export
|
|
@@ -2349,7 +2509,7 @@ export interface QueryUsersDto {
|
|
|
2349
2509
|
*/
|
|
2350
2510
|
'filters'?: string;
|
|
2351
2511
|
/**
|
|
2352
|
-
* JSON string of SortUserDto
|
|
2512
|
+
* JSON string of SortUserDto
|
|
2353
2513
|
* @type {string}
|
|
2354
2514
|
* @memberof QueryUsersDto
|
|
2355
2515
|
*/
|
|
@@ -3585,6 +3745,12 @@ export interface User {
|
|
|
3585
3745
|
* @memberof User
|
|
3586
3746
|
*/
|
|
3587
3747
|
'updatedAt': string;
|
|
3748
|
+
/**
|
|
3749
|
+
*
|
|
3750
|
+
* @type {string}
|
|
3751
|
+
* @memberof User
|
|
3752
|
+
*/
|
|
3753
|
+
'name': string;
|
|
3588
3754
|
/**
|
|
3589
3755
|
*
|
|
3590
3756
|
* @type {string}
|
|
@@ -3597,6 +3763,24 @@ export interface User {
|
|
|
3597
3763
|
* @memberof User
|
|
3598
3764
|
*/
|
|
3599
3765
|
'phone': string;
|
|
3766
|
+
/**
|
|
3767
|
+
* The user birth date
|
|
3768
|
+
* @type {string}
|
|
3769
|
+
* @memberof User
|
|
3770
|
+
*/
|
|
3771
|
+
'birth_date'?: string;
|
|
3772
|
+
/**
|
|
3773
|
+
*
|
|
3774
|
+
* @type {string}
|
|
3775
|
+
* @memberof User
|
|
3776
|
+
*/
|
|
3777
|
+
'gender'?: UserGenderEnum;
|
|
3778
|
+
/**
|
|
3779
|
+
* User avatar
|
|
3780
|
+
* @type {Image}
|
|
3781
|
+
* @memberof User
|
|
3782
|
+
*/
|
|
3783
|
+
'avatar'?: Image;
|
|
3600
3784
|
/**
|
|
3601
3785
|
*
|
|
3602
3786
|
* @type {boolean}
|
|
@@ -3626,15 +3810,27 @@ export interface User {
|
|
|
3626
3810
|
* @type {string}
|
|
3627
3811
|
* @memberof User
|
|
3628
3812
|
*/
|
|
3629
|
-
'
|
|
3813
|
+
'role': UserRoleEnum;
|
|
3814
|
+
/**
|
|
3815
|
+
* Branch details where user works
|
|
3816
|
+
* @type {Branch}
|
|
3817
|
+
* @memberof User
|
|
3818
|
+
*/
|
|
3819
|
+
'working_at'?: Branch;
|
|
3630
3820
|
/**
|
|
3631
3821
|
*
|
|
3632
|
-
* @type {
|
|
3822
|
+
* @type {UserCount}
|
|
3633
3823
|
* @memberof User
|
|
3634
3824
|
*/
|
|
3635
|
-
'
|
|
3825
|
+
'_count'?: UserCount;
|
|
3636
3826
|
}
|
|
3637
3827
|
|
|
3828
|
+
export const UserGenderEnum = {
|
|
3829
|
+
Male: 'MALE',
|
|
3830
|
+
Female: 'FEMALE'
|
|
3831
|
+
} as const;
|
|
3832
|
+
|
|
3833
|
+
export type UserGenderEnum = typeof UserGenderEnum[keyof typeof UserGenderEnum];
|
|
3638
3834
|
export const UserIdentifierTypeEnum = {
|
|
3639
3835
|
Email: 'EMAIL',
|
|
3640
3836
|
Phone: 'PHONE'
|
|
@@ -3650,112 +3846,321 @@ export const UserRoleEnum = {
|
|
|
3650
3846
|
export type UserRoleEnum = typeof UserRoleEnum[keyof typeof UserRoleEnum];
|
|
3651
3847
|
|
|
3652
3848
|
/**
|
|
3653
|
-
*
|
|
3849
|
+
* Count of bookings
|
|
3654
3850
|
* @export
|
|
3655
|
-
* @interface
|
|
3851
|
+
* @interface UserCount
|
|
3656
3852
|
*/
|
|
3657
|
-
export interface
|
|
3658
|
-
/**
|
|
3659
|
-
*
|
|
3660
|
-
* @type {Array<User>}
|
|
3661
|
-
* @memberof UsersPaginationResultDto
|
|
3662
|
-
*/
|
|
3663
|
-
'data': Array<User>;
|
|
3853
|
+
export interface UserCount {
|
|
3664
3854
|
/**
|
|
3665
3855
|
*
|
|
3666
|
-
* @type {
|
|
3667
|
-
* @memberof
|
|
3856
|
+
* @type {number}
|
|
3857
|
+
* @memberof UserCount
|
|
3668
3858
|
*/
|
|
3669
|
-
'
|
|
3859
|
+
'bookings'?: number;
|
|
3670
3860
|
}
|
|
3671
3861
|
/**
|
|
3672
3862
|
*
|
|
3673
3863
|
* @export
|
|
3674
|
-
* @interface
|
|
3864
|
+
* @interface UserDetail
|
|
3675
3865
|
*/
|
|
3676
|
-
export interface
|
|
3866
|
+
export interface UserDetail {
|
|
3677
3867
|
/**
|
|
3678
3868
|
*
|
|
3679
|
-
* @type {
|
|
3680
|
-
* @memberof
|
|
3869
|
+
* @type {string}
|
|
3870
|
+
* @memberof UserDetail
|
|
3681
3871
|
*/
|
|
3682
|
-
'
|
|
3872
|
+
'id': string;
|
|
3683
3873
|
/**
|
|
3684
|
-
*
|
|
3685
|
-
* @type {
|
|
3686
|
-
* @memberof
|
|
3874
|
+
* Soft delete flag
|
|
3875
|
+
* @type {boolean}
|
|
3876
|
+
* @memberof UserDetail
|
|
3687
3877
|
*/
|
|
3688
|
-
'
|
|
3878
|
+
'isDeleted': boolean;
|
|
3689
3879
|
/**
|
|
3690
|
-
*
|
|
3691
|
-
* @type {
|
|
3692
|
-
* @memberof
|
|
3880
|
+
* Soft delete timestamp
|
|
3881
|
+
* @type {string}
|
|
3882
|
+
* @memberof UserDetail
|
|
3693
3883
|
*/
|
|
3694
|
-
'
|
|
3884
|
+
'deletedAt': string | null;
|
|
3695
3885
|
/**
|
|
3696
3886
|
*
|
|
3697
|
-
* @type {
|
|
3698
|
-
* @memberof
|
|
3887
|
+
* @type {string}
|
|
3888
|
+
* @memberof UserDetail
|
|
3699
3889
|
*/
|
|
3700
|
-
'
|
|
3701
|
-
}
|
|
3702
|
-
/**
|
|
3703
|
-
*
|
|
3704
|
-
* @export
|
|
3705
|
-
* @interface VerificationEmailDto
|
|
3706
|
-
*/
|
|
3707
|
-
export interface VerificationEmailDto {
|
|
3890
|
+
'createdAt': string;
|
|
3708
3891
|
/**
|
|
3709
|
-
*
|
|
3892
|
+
*
|
|
3710
3893
|
* @type {string}
|
|
3711
|
-
* @memberof
|
|
3894
|
+
* @memberof UserDetail
|
|
3712
3895
|
*/
|
|
3713
|
-
'
|
|
3896
|
+
'updatedAt': string;
|
|
3714
3897
|
/**
|
|
3715
|
-
*
|
|
3898
|
+
*
|
|
3716
3899
|
* @type {string}
|
|
3717
|
-
* @memberof
|
|
3900
|
+
* @memberof UserDetail
|
|
3718
3901
|
*/
|
|
3719
|
-
'
|
|
3902
|
+
'name': string;
|
|
3720
3903
|
/**
|
|
3721
|
-
*
|
|
3904
|
+
*
|
|
3722
3905
|
* @type {string}
|
|
3723
|
-
* @memberof
|
|
3906
|
+
* @memberof UserDetail
|
|
3724
3907
|
*/
|
|
3725
|
-
'
|
|
3908
|
+
'email': string;
|
|
3726
3909
|
/**
|
|
3727
|
-
*
|
|
3910
|
+
*
|
|
3728
3911
|
* @type {string}
|
|
3729
|
-
* @memberof
|
|
3912
|
+
* @memberof UserDetail
|
|
3730
3913
|
*/
|
|
3731
|
-
'
|
|
3732
|
-
}
|
|
3733
|
-
|
|
3734
|
-
export const VerificationEmailDtoLangEnum = {
|
|
3735
|
-
En: 'en',
|
|
3736
|
-
Vi: 'vi'
|
|
3737
|
-
} as const;
|
|
3738
|
-
|
|
3739
|
-
export type VerificationEmailDtoLangEnum = typeof VerificationEmailDtoLangEnum[keyof typeof VerificationEmailDtoLangEnum];
|
|
3740
|
-
export const VerificationEmailDtoTypeEnum = {
|
|
3741
|
-
VerifyAccount: 'VERIFY_ACCOUNT',
|
|
3742
|
-
ForgotPassword: 'FORGOT_PASSWORD'
|
|
3743
|
-
} as const;
|
|
3744
|
-
|
|
3745
|
-
export type VerificationEmailDtoTypeEnum = typeof VerificationEmailDtoTypeEnum[keyof typeof VerificationEmailDtoTypeEnum];
|
|
3746
|
-
|
|
3747
|
-
/**
|
|
3748
|
-
*
|
|
3749
|
-
* @export
|
|
3750
|
-
* @interface VerifyCodeDto
|
|
3751
|
-
*/
|
|
3752
|
-
export interface VerifyCodeDto {
|
|
3914
|
+
'phone': string;
|
|
3753
3915
|
/**
|
|
3754
|
-
*
|
|
3916
|
+
* The user birth date
|
|
3755
3917
|
* @type {string}
|
|
3756
|
-
* @memberof
|
|
3918
|
+
* @memberof UserDetail
|
|
3757
3919
|
*/
|
|
3758
|
-
'
|
|
3920
|
+
'birth_date'?: string;
|
|
3921
|
+
/**
|
|
3922
|
+
*
|
|
3923
|
+
* @type {string}
|
|
3924
|
+
* @memberof UserDetail
|
|
3925
|
+
*/
|
|
3926
|
+
'gender'?: UserDetailGenderEnum;
|
|
3927
|
+
/**
|
|
3928
|
+
* User avatar
|
|
3929
|
+
* @type {Image}
|
|
3930
|
+
* @memberof UserDetail
|
|
3931
|
+
*/
|
|
3932
|
+
'avatar'?: Image;
|
|
3933
|
+
/**
|
|
3934
|
+
*
|
|
3935
|
+
* @type {boolean}
|
|
3936
|
+
* @memberof UserDetail
|
|
3937
|
+
*/
|
|
3938
|
+
'verified_email': boolean;
|
|
3939
|
+
/**
|
|
3940
|
+
*
|
|
3941
|
+
* @type {boolean}
|
|
3942
|
+
* @memberof UserDetail
|
|
3943
|
+
*/
|
|
3944
|
+
'verified_phone': boolean;
|
|
3945
|
+
/**
|
|
3946
|
+
*
|
|
3947
|
+
* @type {string}
|
|
3948
|
+
* @memberof UserDetail
|
|
3949
|
+
*/
|
|
3950
|
+
'identifier_type': UserDetailIdentifierTypeEnum;
|
|
3951
|
+
/**
|
|
3952
|
+
*
|
|
3953
|
+
* @type {boolean}
|
|
3954
|
+
* @memberof UserDetail
|
|
3955
|
+
*/
|
|
3956
|
+
'is_blocked': boolean;
|
|
3957
|
+
/**
|
|
3958
|
+
*
|
|
3959
|
+
* @type {string}
|
|
3960
|
+
* @memberof UserDetail
|
|
3961
|
+
*/
|
|
3962
|
+
'role': UserDetailRoleEnum;
|
|
3963
|
+
/**
|
|
3964
|
+
* Branch details where user works
|
|
3965
|
+
* @type {Branch}
|
|
3966
|
+
* @memberof UserDetail
|
|
3967
|
+
*/
|
|
3968
|
+
'working_at'?: Branch;
|
|
3969
|
+
/**
|
|
3970
|
+
*
|
|
3971
|
+
* @type {UserCount}
|
|
3972
|
+
* @memberof UserDetail
|
|
3973
|
+
*/
|
|
3974
|
+
'_count'?: UserCount;
|
|
3975
|
+
/**
|
|
3976
|
+
* Date when user was blocked
|
|
3977
|
+
* @type {string}
|
|
3978
|
+
* @memberof UserDetail
|
|
3979
|
+
*/
|
|
3980
|
+
'blocked_at'?: string;
|
|
3981
|
+
/**
|
|
3982
|
+
* Reason for blocking the user
|
|
3983
|
+
* @type {string}
|
|
3984
|
+
* @memberof UserDetail
|
|
3985
|
+
*/
|
|
3986
|
+
'blocked_reason'?: string;
|
|
3987
|
+
/**
|
|
3988
|
+
* Reason for deleting the user
|
|
3989
|
+
* @type {string}
|
|
3990
|
+
* @memberof UserDetail
|
|
3991
|
+
*/
|
|
3992
|
+
'deleted_reason'?: string;
|
|
3993
|
+
/**
|
|
3994
|
+
* Stored identity (email/phone) before deletion
|
|
3995
|
+
* @type {string}
|
|
3996
|
+
* @memberof UserDetail
|
|
3997
|
+
*/
|
|
3998
|
+
'deleted_identity'?: string;
|
|
3999
|
+
/**
|
|
4000
|
+
* Whether the user is active
|
|
4001
|
+
* @type {boolean}
|
|
4002
|
+
* @memberof UserDetail
|
|
4003
|
+
*/
|
|
4004
|
+
'is_active': boolean;
|
|
4005
|
+
/**
|
|
4006
|
+
* ID of the branch where user works (for staff)
|
|
4007
|
+
* @type {string}
|
|
4008
|
+
* @memberof UserDetail
|
|
4009
|
+
*/
|
|
4010
|
+
'branchId'?: string;
|
|
4011
|
+
/**
|
|
4012
|
+
* User bookings history
|
|
4013
|
+
* @type {Array<Booking>}
|
|
4014
|
+
* @memberof UserDetail
|
|
4015
|
+
*/
|
|
4016
|
+
'bookings': Array<Booking>;
|
|
4017
|
+
/**
|
|
4018
|
+
* User loyalty points
|
|
4019
|
+
* @type {number}
|
|
4020
|
+
* @memberof UserDetail
|
|
4021
|
+
*/
|
|
4022
|
+
'loyalty_points': number;
|
|
4023
|
+
/**
|
|
4024
|
+
* History of blocks received by user
|
|
4025
|
+
* @type {Array<BlockActivity>}
|
|
4026
|
+
* @memberof UserDetail
|
|
4027
|
+
*/
|
|
4028
|
+
'blockHistory': Array<BlockActivity>;
|
|
4029
|
+
/**
|
|
4030
|
+
* History of blocks given by user
|
|
4031
|
+
* @type {Array<BlockActivity>}
|
|
4032
|
+
* @memberof UserDetail
|
|
4033
|
+
*/
|
|
4034
|
+
'blockedByMe': Array<BlockActivity>;
|
|
4035
|
+
}
|
|
4036
|
+
|
|
4037
|
+
export const UserDetailGenderEnum = {
|
|
4038
|
+
Male: 'MALE',
|
|
4039
|
+
Female: 'FEMALE'
|
|
4040
|
+
} as const;
|
|
4041
|
+
|
|
4042
|
+
export type UserDetailGenderEnum = typeof UserDetailGenderEnum[keyof typeof UserDetailGenderEnum];
|
|
4043
|
+
export const UserDetailIdentifierTypeEnum = {
|
|
4044
|
+
Email: 'EMAIL',
|
|
4045
|
+
Phone: 'PHONE'
|
|
4046
|
+
} as const;
|
|
4047
|
+
|
|
4048
|
+
export type UserDetailIdentifierTypeEnum = typeof UserDetailIdentifierTypeEnum[keyof typeof UserDetailIdentifierTypeEnum];
|
|
4049
|
+
export const UserDetailRoleEnum = {
|
|
4050
|
+
User: 'USER',
|
|
4051
|
+
Staff: 'STAFF',
|
|
4052
|
+
Admin: 'ADMIN'
|
|
4053
|
+
} as const;
|
|
4054
|
+
|
|
4055
|
+
export type UserDetailRoleEnum = typeof UserDetailRoleEnum[keyof typeof UserDetailRoleEnum];
|
|
4056
|
+
|
|
4057
|
+
/**
|
|
4058
|
+
*
|
|
4059
|
+
* @export
|
|
4060
|
+
* @interface UsersPaginationResultDto
|
|
4061
|
+
*/
|
|
4062
|
+
export interface UsersPaginationResultDto {
|
|
4063
|
+
/**
|
|
4064
|
+
*
|
|
4065
|
+
* @type {Array<User>}
|
|
4066
|
+
* @memberof UsersPaginationResultDto
|
|
4067
|
+
*/
|
|
4068
|
+
'data': Array<User>;
|
|
4069
|
+
/**
|
|
4070
|
+
*
|
|
4071
|
+
* @type {UsersPaginationResultDtoMeta}
|
|
4072
|
+
* @memberof UsersPaginationResultDto
|
|
4073
|
+
*/
|
|
4074
|
+
'meta': UsersPaginationResultDtoMeta;
|
|
4075
|
+
}
|
|
4076
|
+
/**
|
|
4077
|
+
*
|
|
4078
|
+
* @export
|
|
4079
|
+
* @interface UsersPaginationResultDtoMeta
|
|
4080
|
+
*/
|
|
4081
|
+
export interface UsersPaginationResultDtoMeta {
|
|
4082
|
+
/**
|
|
4083
|
+
*
|
|
4084
|
+
* @type {number}
|
|
4085
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4086
|
+
*/
|
|
4087
|
+
'total'?: number;
|
|
4088
|
+
/**
|
|
4089
|
+
*
|
|
4090
|
+
* @type {number}
|
|
4091
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4092
|
+
*/
|
|
4093
|
+
'page'?: number;
|
|
4094
|
+
/**
|
|
4095
|
+
*
|
|
4096
|
+
* @type {number}
|
|
4097
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4098
|
+
*/
|
|
4099
|
+
'pageSize'?: number;
|
|
4100
|
+
/**
|
|
4101
|
+
*
|
|
4102
|
+
* @type {number}
|
|
4103
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4104
|
+
*/
|
|
4105
|
+
'totalPages'?: number;
|
|
4106
|
+
}
|
|
4107
|
+
/**
|
|
4108
|
+
*
|
|
4109
|
+
* @export
|
|
4110
|
+
* @interface VerificationEmailDto
|
|
4111
|
+
*/
|
|
4112
|
+
export interface VerificationEmailDto {
|
|
4113
|
+
/**
|
|
4114
|
+
* Email address to send verification code
|
|
4115
|
+
* @type {string}
|
|
4116
|
+
* @memberof VerificationEmailDto
|
|
4117
|
+
*/
|
|
4118
|
+
'to': string;
|
|
4119
|
+
/**
|
|
4120
|
+
* Verification code to be sent
|
|
4121
|
+
* @type {string}
|
|
4122
|
+
* @memberof VerificationEmailDto
|
|
4123
|
+
*/
|
|
4124
|
+
'code': string;
|
|
4125
|
+
/**
|
|
4126
|
+
* Language for email template
|
|
4127
|
+
* @type {string}
|
|
4128
|
+
* @memberof VerificationEmailDto
|
|
4129
|
+
*/
|
|
4130
|
+
'lang'?: VerificationEmailDtoLangEnum;
|
|
4131
|
+
/**
|
|
4132
|
+
* Type of verification email
|
|
4133
|
+
* @type {string}
|
|
4134
|
+
* @memberof VerificationEmailDto
|
|
4135
|
+
*/
|
|
4136
|
+
'type': VerificationEmailDtoTypeEnum;
|
|
4137
|
+
}
|
|
4138
|
+
|
|
4139
|
+
export const VerificationEmailDtoLangEnum = {
|
|
4140
|
+
En: 'en',
|
|
4141
|
+
Vi: 'vi'
|
|
4142
|
+
} as const;
|
|
4143
|
+
|
|
4144
|
+
export type VerificationEmailDtoLangEnum = typeof VerificationEmailDtoLangEnum[keyof typeof VerificationEmailDtoLangEnum];
|
|
4145
|
+
export const VerificationEmailDtoTypeEnum = {
|
|
4146
|
+
VerifyAccount: 'VERIFY_ACCOUNT',
|
|
4147
|
+
ForgotPassword: 'FORGOT_PASSWORD'
|
|
4148
|
+
} as const;
|
|
4149
|
+
|
|
4150
|
+
export type VerificationEmailDtoTypeEnum = typeof VerificationEmailDtoTypeEnum[keyof typeof VerificationEmailDtoTypeEnum];
|
|
4151
|
+
|
|
4152
|
+
/**
|
|
4153
|
+
*
|
|
4154
|
+
* @export
|
|
4155
|
+
* @interface VerifyCodeDto
|
|
4156
|
+
*/
|
|
4157
|
+
export interface VerifyCodeDto {
|
|
4158
|
+
/**
|
|
4159
|
+
* User ID
|
|
4160
|
+
* @type {string}
|
|
4161
|
+
* @memberof VerifyCodeDto
|
|
4162
|
+
*/
|
|
4163
|
+
'userId': string;
|
|
3759
4164
|
/**
|
|
3760
4165
|
* Account type
|
|
3761
4166
|
* @type {string}
|
|
@@ -9312,12 +9717,166 @@ export class RoomsApi extends BaseAPI {
|
|
|
9312
9717
|
*/
|
|
9313
9718
|
export const UsersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
9314
9719
|
return {
|
|
9720
|
+
/**
|
|
9721
|
+
*
|
|
9722
|
+
* @summary Get detailed user information (Admin only)
|
|
9723
|
+
* @param {string} id
|
|
9724
|
+
* @param {*} [options] Override http request option.
|
|
9725
|
+
* @throws {RequiredError}
|
|
9726
|
+
*/
|
|
9727
|
+
usersControllerAdminGetUserDetail: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9728
|
+
// verify required parameter 'id' is not null or undefined
|
|
9729
|
+
assertParamExists('usersControllerAdminGetUserDetail', 'id', id)
|
|
9730
|
+
const localVarPath = `/api/users/admin/{id}`
|
|
9731
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9732
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9733
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9734
|
+
let baseOptions;
|
|
9735
|
+
if (configuration) {
|
|
9736
|
+
baseOptions = configuration.baseOptions;
|
|
9737
|
+
}
|
|
9738
|
+
|
|
9739
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
9740
|
+
const localVarHeaderParameter = {} as any;
|
|
9741
|
+
const localVarQueryParameter = {} as any;
|
|
9742
|
+
|
|
9743
|
+
|
|
9744
|
+
|
|
9745
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9746
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9747
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9748
|
+
|
|
9749
|
+
return {
|
|
9750
|
+
url: toPathString(localVarUrlObj),
|
|
9751
|
+
options: localVarRequestOptions,
|
|
9752
|
+
};
|
|
9753
|
+
},
|
|
9754
|
+
/**
|
|
9755
|
+
*
|
|
9756
|
+
* @summary Update user information (Admin only)
|
|
9757
|
+
* @param {string} id
|
|
9758
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
9759
|
+
* @param {*} [options] Override http request option.
|
|
9760
|
+
* @throws {RequiredError}
|
|
9761
|
+
*/
|
|
9762
|
+
usersControllerAdminUpdateUser: async (id: string, adminUpdateUserDto: AdminUpdateUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9763
|
+
// verify required parameter 'id' is not null or undefined
|
|
9764
|
+
assertParamExists('usersControllerAdminUpdateUser', 'id', id)
|
|
9765
|
+
// verify required parameter 'adminUpdateUserDto' is not null or undefined
|
|
9766
|
+
assertParamExists('usersControllerAdminUpdateUser', 'adminUpdateUserDto', adminUpdateUserDto)
|
|
9767
|
+
const localVarPath = `/api/users/admin/{id}`
|
|
9768
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9769
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9770
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9771
|
+
let baseOptions;
|
|
9772
|
+
if (configuration) {
|
|
9773
|
+
baseOptions = configuration.baseOptions;
|
|
9774
|
+
}
|
|
9775
|
+
|
|
9776
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
9777
|
+
const localVarHeaderParameter = {} as any;
|
|
9778
|
+
const localVarQueryParameter = {} as any;
|
|
9779
|
+
|
|
9780
|
+
|
|
9781
|
+
|
|
9782
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9783
|
+
|
|
9784
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9785
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9786
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9787
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminUpdateUserDto, localVarRequestOptions, configuration)
|
|
9788
|
+
|
|
9789
|
+
return {
|
|
9790
|
+
url: toPathString(localVarUrlObj),
|
|
9791
|
+
options: localVarRequestOptions,
|
|
9792
|
+
};
|
|
9793
|
+
},
|
|
9794
|
+
/**
|
|
9795
|
+
*
|
|
9796
|
+
* @summary Block or unblock a user
|
|
9797
|
+
* @param {string} id
|
|
9798
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
9799
|
+
* @param {*} [options] Override http request option.
|
|
9800
|
+
* @throws {RequiredError}
|
|
9801
|
+
*/
|
|
9802
|
+
usersControllerBlockUser: async (id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9803
|
+
// verify required parameter 'id' is not null or undefined
|
|
9804
|
+
assertParamExists('usersControllerBlockUser', 'id', id)
|
|
9805
|
+
// verify required parameter 'blockOrUnblockUserDto' is not null or undefined
|
|
9806
|
+
assertParamExists('usersControllerBlockUser', 'blockOrUnblockUserDto', blockOrUnblockUserDto)
|
|
9807
|
+
const localVarPath = `/api/users/block-action/{id}`
|
|
9808
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9809
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9810
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9811
|
+
let baseOptions;
|
|
9812
|
+
if (configuration) {
|
|
9813
|
+
baseOptions = configuration.baseOptions;
|
|
9814
|
+
}
|
|
9815
|
+
|
|
9816
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
9817
|
+
const localVarHeaderParameter = {} as any;
|
|
9818
|
+
const localVarQueryParameter = {} as any;
|
|
9819
|
+
|
|
9820
|
+
|
|
9821
|
+
|
|
9822
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9823
|
+
|
|
9824
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9825
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9826
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9827
|
+
localVarRequestOptions.data = serializeDataIfNeeded(blockOrUnblockUserDto, localVarRequestOptions, configuration)
|
|
9828
|
+
|
|
9829
|
+
return {
|
|
9830
|
+
url: toPathString(localVarUrlObj),
|
|
9831
|
+
options: localVarRequestOptions,
|
|
9832
|
+
};
|
|
9833
|
+
},
|
|
9834
|
+
/**
|
|
9835
|
+
*
|
|
9836
|
+
* @summary Soft delete a user (Admin only)
|
|
9837
|
+
* @param {string} id
|
|
9838
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
9839
|
+
* @param {*} [options] Override http request option.
|
|
9840
|
+
* @throws {RequiredError}
|
|
9841
|
+
*/
|
|
9842
|
+
usersControllerDeleteUser: async (id: string, deleteUserDto: DeleteUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9843
|
+
// verify required parameter 'id' is not null or undefined
|
|
9844
|
+
assertParamExists('usersControllerDeleteUser', 'id', id)
|
|
9845
|
+
// verify required parameter 'deleteUserDto' is not null or undefined
|
|
9846
|
+
assertParamExists('usersControllerDeleteUser', 'deleteUserDto', deleteUserDto)
|
|
9847
|
+
const localVarPath = `/api/users/{id}`
|
|
9848
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9849
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9850
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9851
|
+
let baseOptions;
|
|
9852
|
+
if (configuration) {
|
|
9853
|
+
baseOptions = configuration.baseOptions;
|
|
9854
|
+
}
|
|
9855
|
+
|
|
9856
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
9857
|
+
const localVarHeaderParameter = {} as any;
|
|
9858
|
+
const localVarQueryParameter = {} as any;
|
|
9859
|
+
|
|
9860
|
+
|
|
9861
|
+
|
|
9862
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9863
|
+
|
|
9864
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9865
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9866
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9867
|
+
localVarRequestOptions.data = serializeDataIfNeeded(deleteUserDto, localVarRequestOptions, configuration)
|
|
9868
|
+
|
|
9869
|
+
return {
|
|
9870
|
+
url: toPathString(localVarUrlObj),
|
|
9871
|
+
options: localVarRequestOptions,
|
|
9872
|
+
};
|
|
9873
|
+
},
|
|
9315
9874
|
/**
|
|
9316
9875
|
*
|
|
9317
9876
|
* @param {number} [page]
|
|
9318
9877
|
* @param {number} [pageSize]
|
|
9319
9878
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9320
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
9879
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9321
9880
|
* @param {*} [options] Override http request option.
|
|
9322
9881
|
* @throws {RequiredError}
|
|
9323
9882
|
*/
|
|
@@ -9352,6 +9911,40 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
9352
9911
|
|
|
9353
9912
|
|
|
9354
9913
|
|
|
9914
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9915
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9916
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9917
|
+
|
|
9918
|
+
return {
|
|
9919
|
+
url: toPathString(localVarUrlObj),
|
|
9920
|
+
options: localVarRequestOptions,
|
|
9921
|
+
};
|
|
9922
|
+
},
|
|
9923
|
+
/**
|
|
9924
|
+
*
|
|
9925
|
+
* @summary Restore a deleted user (Admin only)
|
|
9926
|
+
* @param {string} id
|
|
9927
|
+
* @param {*} [options] Override http request option.
|
|
9928
|
+
* @throws {RequiredError}
|
|
9929
|
+
*/
|
|
9930
|
+
usersControllerRestoreUser: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9931
|
+
// verify required parameter 'id' is not null or undefined
|
|
9932
|
+
assertParamExists('usersControllerRestoreUser', 'id', id)
|
|
9933
|
+
const localVarPath = `/api/users/{id}/restore`
|
|
9934
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9935
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9936
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9937
|
+
let baseOptions;
|
|
9938
|
+
if (configuration) {
|
|
9939
|
+
baseOptions = configuration.baseOptions;
|
|
9940
|
+
}
|
|
9941
|
+
|
|
9942
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
9943
|
+
const localVarHeaderParameter = {} as any;
|
|
9944
|
+
const localVarQueryParameter = {} as any;
|
|
9945
|
+
|
|
9946
|
+
|
|
9947
|
+
|
|
9355
9948
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9356
9949
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9357
9950
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -9371,12 +9964,67 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
9371
9964
|
export const UsersApiFp = function(configuration?: Configuration) {
|
|
9372
9965
|
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration)
|
|
9373
9966
|
return {
|
|
9967
|
+
/**
|
|
9968
|
+
*
|
|
9969
|
+
* @summary Get detailed user information (Admin only)
|
|
9970
|
+
* @param {string} id
|
|
9971
|
+
* @param {*} [options] Override http request option.
|
|
9972
|
+
* @throws {RequiredError}
|
|
9973
|
+
*/
|
|
9974
|
+
async usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserDetail>> {
|
|
9975
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerAdminGetUserDetail(id, options);
|
|
9976
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9977
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerAdminGetUserDetail']?.[localVarOperationServerIndex]?.url;
|
|
9978
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9979
|
+
},
|
|
9980
|
+
/**
|
|
9981
|
+
*
|
|
9982
|
+
* @summary Update user information (Admin only)
|
|
9983
|
+
* @param {string} id
|
|
9984
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
9985
|
+
* @param {*} [options] Override http request option.
|
|
9986
|
+
* @throws {RequiredError}
|
|
9987
|
+
*/
|
|
9988
|
+
async usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserDetail>> {
|
|
9989
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerAdminUpdateUser(id, adminUpdateUserDto, options);
|
|
9990
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9991
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerAdminUpdateUser']?.[localVarOperationServerIndex]?.url;
|
|
9992
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9993
|
+
},
|
|
9994
|
+
/**
|
|
9995
|
+
*
|
|
9996
|
+
* @summary Block or unblock a user
|
|
9997
|
+
* @param {string} id
|
|
9998
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
9999
|
+
* @param {*} [options] Override http request option.
|
|
10000
|
+
* @throws {RequiredError}
|
|
10001
|
+
*/
|
|
10002
|
+
async usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
10003
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerBlockUser(id, blockOrUnblockUserDto, options);
|
|
10004
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
10005
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerBlockUser']?.[localVarOperationServerIndex]?.url;
|
|
10006
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10007
|
+
},
|
|
10008
|
+
/**
|
|
10009
|
+
*
|
|
10010
|
+
* @summary Soft delete a user (Admin only)
|
|
10011
|
+
* @param {string} id
|
|
10012
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
10013
|
+
* @param {*} [options] Override http request option.
|
|
10014
|
+
* @throws {RequiredError}
|
|
10015
|
+
*/
|
|
10016
|
+
async usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
|
10017
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerDeleteUser(id, deleteUserDto, options);
|
|
10018
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
10019
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerDeleteUser']?.[localVarOperationServerIndex]?.url;
|
|
10020
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10021
|
+
},
|
|
9374
10022
|
/**
|
|
9375
10023
|
*
|
|
9376
10024
|
* @param {number} [page]
|
|
9377
10025
|
* @param {number} [pageSize]
|
|
9378
10026
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9379
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10027
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9380
10028
|
* @param {*} [options] Override http request option.
|
|
9381
10029
|
* @throws {RequiredError}
|
|
9382
10030
|
*/
|
|
@@ -9386,6 +10034,19 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
9386
10034
|
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerGetUsers']?.[localVarOperationServerIndex]?.url;
|
|
9387
10035
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9388
10036
|
},
|
|
10037
|
+
/**
|
|
10038
|
+
*
|
|
10039
|
+
* @summary Restore a deleted user (Admin only)
|
|
10040
|
+
* @param {string} id
|
|
10041
|
+
* @param {*} [options] Override http request option.
|
|
10042
|
+
* @throws {RequiredError}
|
|
10043
|
+
*/
|
|
10044
|
+
async usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
|
10045
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerRestoreUser(id, options);
|
|
10046
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
10047
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerRestoreUser']?.[localVarOperationServerIndex]?.url;
|
|
10048
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10049
|
+
},
|
|
9389
10050
|
}
|
|
9390
10051
|
};
|
|
9391
10052
|
|
|
@@ -9396,18 +10057,71 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
9396
10057
|
export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
9397
10058
|
const localVarFp = UsersApiFp(configuration)
|
|
9398
10059
|
return {
|
|
10060
|
+
/**
|
|
10061
|
+
*
|
|
10062
|
+
* @summary Get detailed user information (Admin only)
|
|
10063
|
+
* @param {string} id
|
|
10064
|
+
* @param {*} [options] Override http request option.
|
|
10065
|
+
* @throws {RequiredError}
|
|
10066
|
+
*/
|
|
10067
|
+
usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UserDetail> {
|
|
10068
|
+
return localVarFp.usersControllerAdminGetUserDetail(id, options).then((request) => request(axios, basePath));
|
|
10069
|
+
},
|
|
10070
|
+
/**
|
|
10071
|
+
*
|
|
10072
|
+
* @summary Update user information (Admin only)
|
|
10073
|
+
* @param {string} id
|
|
10074
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
10075
|
+
* @param {*} [options] Override http request option.
|
|
10076
|
+
* @throws {RequiredError}
|
|
10077
|
+
*/
|
|
10078
|
+
usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig): AxiosPromise<UserDetail> {
|
|
10079
|
+
return localVarFp.usersControllerAdminUpdateUser(id, adminUpdateUserDto, options).then((request) => request(axios, basePath));
|
|
10080
|
+
},
|
|
10081
|
+
/**
|
|
10082
|
+
*
|
|
10083
|
+
* @summary Block or unblock a user
|
|
10084
|
+
* @param {string} id
|
|
10085
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
10086
|
+
* @param {*} [options] Override http request option.
|
|
10087
|
+
* @throws {RequiredError}
|
|
10088
|
+
*/
|
|
10089
|
+
usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
10090
|
+
return localVarFp.usersControllerBlockUser(id, blockOrUnblockUserDto, options).then((request) => request(axios, basePath));
|
|
10091
|
+
},
|
|
10092
|
+
/**
|
|
10093
|
+
*
|
|
10094
|
+
* @summary Soft delete a user (Admin only)
|
|
10095
|
+
* @param {string} id
|
|
10096
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
10097
|
+
* @param {*} [options] Override http request option.
|
|
10098
|
+
* @throws {RequiredError}
|
|
10099
|
+
*/
|
|
10100
|
+
usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig): AxiosPromise<User> {
|
|
10101
|
+
return localVarFp.usersControllerDeleteUser(id, deleteUserDto, options).then((request) => request(axios, basePath));
|
|
10102
|
+
},
|
|
9399
10103
|
/**
|
|
9400
10104
|
*
|
|
9401
10105
|
* @param {number} [page]
|
|
9402
10106
|
* @param {number} [pageSize]
|
|
9403
10107
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9404
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10108
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9405
10109
|
* @param {*} [options] Override http request option.
|
|
9406
10110
|
* @throws {RequiredError}
|
|
9407
10111
|
*/
|
|
9408
10112
|
usersControllerGetUsers(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersPaginationResultDto> {
|
|
9409
10113
|
return localVarFp.usersControllerGetUsers(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
|
|
9410
10114
|
},
|
|
10115
|
+
/**
|
|
10116
|
+
*
|
|
10117
|
+
* @summary Restore a deleted user (Admin only)
|
|
10118
|
+
* @param {string} id
|
|
10119
|
+
* @param {*} [options] Override http request option.
|
|
10120
|
+
* @throws {RequiredError}
|
|
10121
|
+
*/
|
|
10122
|
+
usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig): AxiosPromise<User> {
|
|
10123
|
+
return localVarFp.usersControllerRestoreUser(id, options).then((request) => request(axios, basePath));
|
|
10124
|
+
},
|
|
9411
10125
|
};
|
|
9412
10126
|
};
|
|
9413
10127
|
|
|
@@ -9418,12 +10132,63 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
9418
10132
|
* @extends {BaseAPI}
|
|
9419
10133
|
*/
|
|
9420
10134
|
export class UsersApi extends BaseAPI {
|
|
10135
|
+
/**
|
|
10136
|
+
*
|
|
10137
|
+
* @summary Get detailed user information (Admin only)
|
|
10138
|
+
* @param {string} id
|
|
10139
|
+
* @param {*} [options] Override http request option.
|
|
10140
|
+
* @throws {RequiredError}
|
|
10141
|
+
* @memberof UsersApi
|
|
10142
|
+
*/
|
|
10143
|
+
public usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig) {
|
|
10144
|
+
return UsersApiFp(this.configuration).usersControllerAdminGetUserDetail(id, options).then((request) => request(this.axios, this.basePath));
|
|
10145
|
+
}
|
|
10146
|
+
|
|
10147
|
+
/**
|
|
10148
|
+
*
|
|
10149
|
+
* @summary Update user information (Admin only)
|
|
10150
|
+
* @param {string} id
|
|
10151
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
10152
|
+
* @param {*} [options] Override http request option.
|
|
10153
|
+
* @throws {RequiredError}
|
|
10154
|
+
* @memberof UsersApi
|
|
10155
|
+
*/
|
|
10156
|
+
public usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig) {
|
|
10157
|
+
return UsersApiFp(this.configuration).usersControllerAdminUpdateUser(id, adminUpdateUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10158
|
+
}
|
|
10159
|
+
|
|
10160
|
+
/**
|
|
10161
|
+
*
|
|
10162
|
+
* @summary Block or unblock a user
|
|
10163
|
+
* @param {string} id
|
|
10164
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
10165
|
+
* @param {*} [options] Override http request option.
|
|
10166
|
+
* @throws {RequiredError}
|
|
10167
|
+
* @memberof UsersApi
|
|
10168
|
+
*/
|
|
10169
|
+
public usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig) {
|
|
10170
|
+
return UsersApiFp(this.configuration).usersControllerBlockUser(id, blockOrUnblockUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10171
|
+
}
|
|
10172
|
+
|
|
10173
|
+
/**
|
|
10174
|
+
*
|
|
10175
|
+
* @summary Soft delete a user (Admin only)
|
|
10176
|
+
* @param {string} id
|
|
10177
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
10178
|
+
* @param {*} [options] Override http request option.
|
|
10179
|
+
* @throws {RequiredError}
|
|
10180
|
+
* @memberof UsersApi
|
|
10181
|
+
*/
|
|
10182
|
+
public usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig) {
|
|
10183
|
+
return UsersApiFp(this.configuration).usersControllerDeleteUser(id, deleteUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10184
|
+
}
|
|
10185
|
+
|
|
9421
10186
|
/**
|
|
9422
10187
|
*
|
|
9423
10188
|
* @param {number} [page]
|
|
9424
10189
|
* @param {number} [pageSize]
|
|
9425
10190
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9426
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10191
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9427
10192
|
* @param {*} [options] Override http request option.
|
|
9428
10193
|
* @throws {RequiredError}
|
|
9429
10194
|
* @memberof UsersApi
|
|
@@ -9431,6 +10196,18 @@ export class UsersApi extends BaseAPI {
|
|
|
9431
10196
|
public usersControllerGetUsers(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig) {
|
|
9432
10197
|
return UsersApiFp(this.configuration).usersControllerGetUsers(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
|
|
9433
10198
|
}
|
|
10199
|
+
|
|
10200
|
+
/**
|
|
10201
|
+
*
|
|
10202
|
+
* @summary Restore a deleted user (Admin only)
|
|
10203
|
+
* @param {string} id
|
|
10204
|
+
* @param {*} [options] Override http request option.
|
|
10205
|
+
* @throws {RequiredError}
|
|
10206
|
+
* @memberof UsersApi
|
|
10207
|
+
*/
|
|
10208
|
+
public usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig) {
|
|
10209
|
+
return UsersApiFp(this.configuration).usersControllerRestoreUser(id, options).then((request) => request(this.axios, this.basePath));
|
|
10210
|
+
}
|
|
9434
10211
|
}
|
|
9435
10212
|
|
|
9436
10213
|
|