@ahomevilla-hotel/node-sdk 1.1.3 → 1.1.5
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 +942 -74
- 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 = {
|
|
@@ -1792,7 +1965,19 @@ export interface HotelRoom {
|
|
|
1792
1965
|
* @type {RoomDetail}
|
|
1793
1966
|
* @memberof HotelRoom
|
|
1794
1967
|
*/
|
|
1795
|
-
'detail'
|
|
1968
|
+
'detail'?: RoomDetail;
|
|
1969
|
+
/**
|
|
1970
|
+
* List of bookings
|
|
1971
|
+
* @type {Array<Booking>}
|
|
1972
|
+
* @memberof HotelRoom
|
|
1973
|
+
*/
|
|
1974
|
+
'bookings'?: Array<Booking>;
|
|
1975
|
+
/**
|
|
1976
|
+
*
|
|
1977
|
+
* @type {HotelRoomCount}
|
|
1978
|
+
* @memberof HotelRoom
|
|
1979
|
+
*/
|
|
1980
|
+
'_count'?: HotelRoomCount;
|
|
1796
1981
|
}
|
|
1797
1982
|
|
|
1798
1983
|
export const HotelRoomStatusEnum = {
|
|
@@ -1804,6 +1989,19 @@ export const HotelRoomStatusEnum = {
|
|
|
1804
1989
|
|
|
1805
1990
|
export type HotelRoomStatusEnum = typeof HotelRoomStatusEnum[keyof typeof HotelRoomStatusEnum];
|
|
1806
1991
|
|
|
1992
|
+
/**
|
|
1993
|
+
* Count of bookings
|
|
1994
|
+
* @export
|
|
1995
|
+
* @interface HotelRoomCount
|
|
1996
|
+
*/
|
|
1997
|
+
export interface HotelRoomCount {
|
|
1998
|
+
/**
|
|
1999
|
+
*
|
|
2000
|
+
* @type {number}
|
|
2001
|
+
* @memberof HotelRoomCount
|
|
2002
|
+
*/
|
|
2003
|
+
'bookings'?: number;
|
|
2004
|
+
}
|
|
1807
2005
|
/**
|
|
1808
2006
|
*
|
|
1809
2007
|
* @export
|
|
@@ -1861,6 +2059,19 @@ export interface ImageUploadResponseDto {
|
|
|
1861
2059
|
*/
|
|
1862
2060
|
'publicId': string;
|
|
1863
2061
|
}
|
|
2062
|
+
/**
|
|
2063
|
+
*
|
|
2064
|
+
* @export
|
|
2065
|
+
* @interface ImmediateDeleteRoomsDto
|
|
2066
|
+
*/
|
|
2067
|
+
export interface ImmediateDeleteRoomsDto {
|
|
2068
|
+
/**
|
|
2069
|
+
* List of room ids to delete
|
|
2070
|
+
* @type {Array<string>}
|
|
2071
|
+
* @memberof ImmediateDeleteRoomsDto
|
|
2072
|
+
*/
|
|
2073
|
+
'ids': Array<string>;
|
|
2074
|
+
}
|
|
1864
2075
|
/**
|
|
1865
2076
|
*
|
|
1866
2077
|
* @export
|
|
@@ -2311,7 +2522,7 @@ export interface QueryUsersDto {
|
|
|
2311
2522
|
*/
|
|
2312
2523
|
'filters'?: string;
|
|
2313
2524
|
/**
|
|
2314
|
-
* JSON string of SortUserDto
|
|
2525
|
+
* JSON string of SortUserDto
|
|
2315
2526
|
* @type {string}
|
|
2316
2527
|
* @memberof QueryUsersDto
|
|
2317
2528
|
*/
|
|
@@ -3547,6 +3758,12 @@ export interface User {
|
|
|
3547
3758
|
* @memberof User
|
|
3548
3759
|
*/
|
|
3549
3760
|
'updatedAt': string;
|
|
3761
|
+
/**
|
|
3762
|
+
*
|
|
3763
|
+
* @type {string}
|
|
3764
|
+
* @memberof User
|
|
3765
|
+
*/
|
|
3766
|
+
'name': string;
|
|
3550
3767
|
/**
|
|
3551
3768
|
*
|
|
3552
3769
|
* @type {string}
|
|
@@ -3559,6 +3776,24 @@ export interface User {
|
|
|
3559
3776
|
* @memberof User
|
|
3560
3777
|
*/
|
|
3561
3778
|
'phone': string;
|
|
3779
|
+
/**
|
|
3780
|
+
* The user birth date
|
|
3781
|
+
* @type {string}
|
|
3782
|
+
* @memberof User
|
|
3783
|
+
*/
|
|
3784
|
+
'birth_date'?: string;
|
|
3785
|
+
/**
|
|
3786
|
+
*
|
|
3787
|
+
* @type {string}
|
|
3788
|
+
* @memberof User
|
|
3789
|
+
*/
|
|
3790
|
+
'gender'?: UserGenderEnum;
|
|
3791
|
+
/**
|
|
3792
|
+
* User avatar
|
|
3793
|
+
* @type {Image}
|
|
3794
|
+
* @memberof User
|
|
3795
|
+
*/
|
|
3796
|
+
'avatar'?: Image;
|
|
3562
3797
|
/**
|
|
3563
3798
|
*
|
|
3564
3799
|
* @type {boolean}
|
|
@@ -3583,12 +3818,6 @@ export interface User {
|
|
|
3583
3818
|
* @memberof User
|
|
3584
3819
|
*/
|
|
3585
3820
|
'is_blocked': boolean;
|
|
3586
|
-
/**
|
|
3587
|
-
*
|
|
3588
|
-
* @type {string}
|
|
3589
|
-
* @memberof User
|
|
3590
|
-
*/
|
|
3591
|
-
'name': string;
|
|
3592
3821
|
/**
|
|
3593
3822
|
*
|
|
3594
3823
|
* @type {string}
|
|
@@ -3597,6 +3826,12 @@ export interface User {
|
|
|
3597
3826
|
'role': UserRoleEnum;
|
|
3598
3827
|
}
|
|
3599
3828
|
|
|
3829
|
+
export const UserGenderEnum = {
|
|
3830
|
+
Male: 'MALE',
|
|
3831
|
+
Female: 'FEMALE'
|
|
3832
|
+
} as const;
|
|
3833
|
+
|
|
3834
|
+
export type UserGenderEnum = typeof UserGenderEnum[keyof typeof UserGenderEnum];
|
|
3600
3835
|
export const UserIdentifierTypeEnum = {
|
|
3601
3836
|
Email: 'EMAIL',
|
|
3602
3837
|
Phone: 'PHONE'
|
|
@@ -3614,96 +3849,286 @@ export type UserRoleEnum = typeof UserRoleEnum[keyof typeof UserRoleEnum];
|
|
|
3614
3849
|
/**
|
|
3615
3850
|
*
|
|
3616
3851
|
* @export
|
|
3617
|
-
* @interface
|
|
3852
|
+
* @interface UserDetail
|
|
3618
3853
|
*/
|
|
3619
|
-
export interface
|
|
3854
|
+
export interface UserDetail {
|
|
3620
3855
|
/**
|
|
3621
3856
|
*
|
|
3622
|
-
* @type {
|
|
3623
|
-
* @memberof
|
|
3857
|
+
* @type {string}
|
|
3858
|
+
* @memberof UserDetail
|
|
3624
3859
|
*/
|
|
3625
|
-
'
|
|
3860
|
+
'id': string;
|
|
3626
3861
|
/**
|
|
3627
|
-
*
|
|
3628
|
-
* @type {
|
|
3629
|
-
* @memberof
|
|
3862
|
+
* Soft delete flag
|
|
3863
|
+
* @type {boolean}
|
|
3864
|
+
* @memberof UserDetail
|
|
3630
3865
|
*/
|
|
3631
|
-
'
|
|
3632
|
-
}
|
|
3633
|
-
/**
|
|
3634
|
-
*
|
|
3635
|
-
* @export
|
|
3636
|
-
* @interface UsersPaginationResultDtoMeta
|
|
3637
|
-
*/
|
|
3638
|
-
export interface UsersPaginationResultDtoMeta {
|
|
3866
|
+
'isDeleted': boolean;
|
|
3639
3867
|
/**
|
|
3640
|
-
*
|
|
3641
|
-
* @type {
|
|
3642
|
-
* @memberof
|
|
3868
|
+
* Soft delete timestamp
|
|
3869
|
+
* @type {string}
|
|
3870
|
+
* @memberof UserDetail
|
|
3643
3871
|
*/
|
|
3644
|
-
'
|
|
3872
|
+
'deletedAt': string | null;
|
|
3645
3873
|
/**
|
|
3646
3874
|
*
|
|
3647
|
-
* @type {
|
|
3648
|
-
* @memberof
|
|
3875
|
+
* @type {string}
|
|
3876
|
+
* @memberof UserDetail
|
|
3649
3877
|
*/
|
|
3650
|
-
'
|
|
3878
|
+
'createdAt': string;
|
|
3651
3879
|
/**
|
|
3652
3880
|
*
|
|
3653
|
-
* @type {
|
|
3654
|
-
* @memberof
|
|
3881
|
+
* @type {string}
|
|
3882
|
+
* @memberof UserDetail
|
|
3655
3883
|
*/
|
|
3656
|
-
'
|
|
3884
|
+
'updatedAt': string;
|
|
3657
3885
|
/**
|
|
3658
3886
|
*
|
|
3659
|
-
* @type {
|
|
3660
|
-
* @memberof
|
|
3887
|
+
* @type {string}
|
|
3888
|
+
* @memberof UserDetail
|
|
3661
3889
|
*/
|
|
3662
|
-
'
|
|
3663
|
-
}
|
|
3664
|
-
/**
|
|
3665
|
-
*
|
|
3666
|
-
* @export
|
|
3667
|
-
* @interface VerificationEmailDto
|
|
3668
|
-
*/
|
|
3669
|
-
export interface VerificationEmailDto {
|
|
3890
|
+
'name': string;
|
|
3670
3891
|
/**
|
|
3671
|
-
*
|
|
3892
|
+
*
|
|
3672
3893
|
* @type {string}
|
|
3673
|
-
* @memberof
|
|
3894
|
+
* @memberof UserDetail
|
|
3674
3895
|
*/
|
|
3675
|
-
'
|
|
3896
|
+
'email': string;
|
|
3676
3897
|
/**
|
|
3677
|
-
*
|
|
3898
|
+
*
|
|
3678
3899
|
* @type {string}
|
|
3679
|
-
* @memberof
|
|
3900
|
+
* @memberof UserDetail
|
|
3680
3901
|
*/
|
|
3681
|
-
'
|
|
3902
|
+
'phone': string;
|
|
3682
3903
|
/**
|
|
3683
|
-
*
|
|
3904
|
+
* The user birth date
|
|
3684
3905
|
* @type {string}
|
|
3685
|
-
* @memberof
|
|
3906
|
+
* @memberof UserDetail
|
|
3686
3907
|
*/
|
|
3687
|
-
'
|
|
3908
|
+
'birth_date'?: string;
|
|
3688
3909
|
/**
|
|
3689
|
-
*
|
|
3910
|
+
*
|
|
3690
3911
|
* @type {string}
|
|
3691
|
-
* @memberof
|
|
3912
|
+
* @memberof UserDetail
|
|
3692
3913
|
*/
|
|
3693
|
-
'
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3914
|
+
'gender'?: UserDetailGenderEnum;
|
|
3915
|
+
/**
|
|
3916
|
+
* User avatar
|
|
3917
|
+
* @type {Image}
|
|
3918
|
+
* @memberof UserDetail
|
|
3919
|
+
*/
|
|
3920
|
+
'avatar'?: Image;
|
|
3921
|
+
/**
|
|
3922
|
+
*
|
|
3923
|
+
* @type {boolean}
|
|
3924
|
+
* @memberof UserDetail
|
|
3925
|
+
*/
|
|
3926
|
+
'verified_email': boolean;
|
|
3927
|
+
/**
|
|
3928
|
+
*
|
|
3929
|
+
* @type {boolean}
|
|
3930
|
+
* @memberof UserDetail
|
|
3931
|
+
*/
|
|
3932
|
+
'verified_phone': boolean;
|
|
3933
|
+
/**
|
|
3934
|
+
*
|
|
3935
|
+
* @type {string}
|
|
3936
|
+
* @memberof UserDetail
|
|
3937
|
+
*/
|
|
3938
|
+
'identifier_type': UserDetailIdentifierTypeEnum;
|
|
3939
|
+
/**
|
|
3940
|
+
*
|
|
3941
|
+
* @type {boolean}
|
|
3942
|
+
* @memberof UserDetail
|
|
3943
|
+
*/
|
|
3944
|
+
'is_blocked': boolean;
|
|
3945
|
+
/**
|
|
3946
|
+
*
|
|
3947
|
+
* @type {string}
|
|
3948
|
+
* @memberof UserDetail
|
|
3949
|
+
*/
|
|
3950
|
+
'role': UserDetailRoleEnum;
|
|
3951
|
+
/**
|
|
3952
|
+
* Date when user was blocked
|
|
3953
|
+
* @type {string}
|
|
3954
|
+
* @memberof UserDetail
|
|
3955
|
+
*/
|
|
3956
|
+
'blocked_at'?: string;
|
|
3957
|
+
/**
|
|
3958
|
+
* Reason for blocking the user
|
|
3959
|
+
* @type {string}
|
|
3960
|
+
* @memberof UserDetail
|
|
3961
|
+
*/
|
|
3962
|
+
'blocked_reason'?: string;
|
|
3963
|
+
/**
|
|
3964
|
+
* Reason for deleting the user
|
|
3965
|
+
* @type {string}
|
|
3966
|
+
* @memberof UserDetail
|
|
3967
|
+
*/
|
|
3968
|
+
'deleted_reason'?: string;
|
|
3969
|
+
/**
|
|
3970
|
+
* Stored identity (email/phone) before deletion
|
|
3971
|
+
* @type {string}
|
|
3972
|
+
* @memberof UserDetail
|
|
3973
|
+
*/
|
|
3974
|
+
'deleted_identity'?: string;
|
|
3975
|
+
/**
|
|
3976
|
+
* Whether the user is active
|
|
3977
|
+
* @type {boolean}
|
|
3978
|
+
* @memberof UserDetail
|
|
3979
|
+
*/
|
|
3980
|
+
'is_active': boolean;
|
|
3981
|
+
/**
|
|
3982
|
+
* ID of the branch where user works (for staff)
|
|
3983
|
+
* @type {string}
|
|
3984
|
+
* @memberof UserDetail
|
|
3985
|
+
*/
|
|
3986
|
+
'branchId'?: string;
|
|
3987
|
+
/**
|
|
3988
|
+
* Branch details where user works
|
|
3989
|
+
* @type {Branch}
|
|
3990
|
+
* @memberof UserDetail
|
|
3991
|
+
*/
|
|
3992
|
+
'working_at'?: Branch;
|
|
3993
|
+
/**
|
|
3994
|
+
* User bookings history
|
|
3995
|
+
* @type {Array<Booking>}
|
|
3996
|
+
* @memberof UserDetail
|
|
3997
|
+
*/
|
|
3998
|
+
'bookings': Array<Booking>;
|
|
3999
|
+
/**
|
|
4000
|
+
* User loyalty points
|
|
4001
|
+
* @type {number}
|
|
4002
|
+
* @memberof UserDetail
|
|
4003
|
+
*/
|
|
4004
|
+
'loyalty_points': number;
|
|
4005
|
+
/**
|
|
4006
|
+
* History of blocks received by user
|
|
4007
|
+
* @type {Array<BlockActivity>}
|
|
4008
|
+
* @memberof UserDetail
|
|
4009
|
+
*/
|
|
4010
|
+
'blockHistory': Array<BlockActivity>;
|
|
4011
|
+
/**
|
|
4012
|
+
* History of blocks given by user
|
|
4013
|
+
* @type {Array<BlockActivity>}
|
|
4014
|
+
* @memberof UserDetail
|
|
4015
|
+
*/
|
|
4016
|
+
'blockedByMe': Array<BlockActivity>;
|
|
4017
|
+
}
|
|
4018
|
+
|
|
4019
|
+
export const UserDetailGenderEnum = {
|
|
4020
|
+
Male: 'MALE',
|
|
4021
|
+
Female: 'FEMALE'
|
|
4022
|
+
} as const;
|
|
4023
|
+
|
|
4024
|
+
export type UserDetailGenderEnum = typeof UserDetailGenderEnum[keyof typeof UserDetailGenderEnum];
|
|
4025
|
+
export const UserDetailIdentifierTypeEnum = {
|
|
4026
|
+
Email: 'EMAIL',
|
|
4027
|
+
Phone: 'PHONE'
|
|
4028
|
+
} as const;
|
|
4029
|
+
|
|
4030
|
+
export type UserDetailIdentifierTypeEnum = typeof UserDetailIdentifierTypeEnum[keyof typeof UserDetailIdentifierTypeEnum];
|
|
4031
|
+
export const UserDetailRoleEnum = {
|
|
4032
|
+
User: 'USER',
|
|
4033
|
+
Staff: 'STAFF',
|
|
4034
|
+
Admin: 'ADMIN'
|
|
4035
|
+
} as const;
|
|
4036
|
+
|
|
4037
|
+
export type UserDetailRoleEnum = typeof UserDetailRoleEnum[keyof typeof UserDetailRoleEnum];
|
|
4038
|
+
|
|
4039
|
+
/**
|
|
4040
|
+
*
|
|
4041
|
+
* @export
|
|
4042
|
+
* @interface UsersPaginationResultDto
|
|
4043
|
+
*/
|
|
4044
|
+
export interface UsersPaginationResultDto {
|
|
4045
|
+
/**
|
|
4046
|
+
*
|
|
4047
|
+
* @type {Array<User>}
|
|
4048
|
+
* @memberof UsersPaginationResultDto
|
|
4049
|
+
*/
|
|
4050
|
+
'data': Array<User>;
|
|
4051
|
+
/**
|
|
4052
|
+
*
|
|
4053
|
+
* @type {UsersPaginationResultDtoMeta}
|
|
4054
|
+
* @memberof UsersPaginationResultDto
|
|
4055
|
+
*/
|
|
4056
|
+
'meta': UsersPaginationResultDtoMeta;
|
|
4057
|
+
}
|
|
4058
|
+
/**
|
|
4059
|
+
*
|
|
4060
|
+
* @export
|
|
4061
|
+
* @interface UsersPaginationResultDtoMeta
|
|
4062
|
+
*/
|
|
4063
|
+
export interface UsersPaginationResultDtoMeta {
|
|
4064
|
+
/**
|
|
4065
|
+
*
|
|
4066
|
+
* @type {number}
|
|
4067
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4068
|
+
*/
|
|
4069
|
+
'total'?: number;
|
|
4070
|
+
/**
|
|
4071
|
+
*
|
|
4072
|
+
* @type {number}
|
|
4073
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4074
|
+
*/
|
|
4075
|
+
'page'?: number;
|
|
4076
|
+
/**
|
|
4077
|
+
*
|
|
4078
|
+
* @type {number}
|
|
4079
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4080
|
+
*/
|
|
4081
|
+
'pageSize'?: number;
|
|
4082
|
+
/**
|
|
4083
|
+
*
|
|
4084
|
+
* @type {number}
|
|
4085
|
+
* @memberof UsersPaginationResultDtoMeta
|
|
4086
|
+
*/
|
|
4087
|
+
'totalPages'?: number;
|
|
4088
|
+
}
|
|
4089
|
+
/**
|
|
4090
|
+
*
|
|
4091
|
+
* @export
|
|
4092
|
+
* @interface VerificationEmailDto
|
|
4093
|
+
*/
|
|
4094
|
+
export interface VerificationEmailDto {
|
|
4095
|
+
/**
|
|
4096
|
+
* Email address to send verification code
|
|
4097
|
+
* @type {string}
|
|
4098
|
+
* @memberof VerificationEmailDto
|
|
4099
|
+
*/
|
|
4100
|
+
'to': string;
|
|
4101
|
+
/**
|
|
4102
|
+
* Verification code to be sent
|
|
4103
|
+
* @type {string}
|
|
4104
|
+
* @memberof VerificationEmailDto
|
|
4105
|
+
*/
|
|
4106
|
+
'code': string;
|
|
4107
|
+
/**
|
|
4108
|
+
* Language for email template
|
|
4109
|
+
* @type {string}
|
|
4110
|
+
* @memberof VerificationEmailDto
|
|
4111
|
+
*/
|
|
4112
|
+
'lang'?: VerificationEmailDtoLangEnum;
|
|
4113
|
+
/**
|
|
4114
|
+
* Type of verification email
|
|
4115
|
+
* @type {string}
|
|
4116
|
+
* @memberof VerificationEmailDto
|
|
4117
|
+
*/
|
|
4118
|
+
'type': VerificationEmailDtoTypeEnum;
|
|
4119
|
+
}
|
|
4120
|
+
|
|
4121
|
+
export const VerificationEmailDtoLangEnum = {
|
|
4122
|
+
En: 'en',
|
|
4123
|
+
Vi: 'vi'
|
|
4124
|
+
} as const;
|
|
4125
|
+
|
|
4126
|
+
export type VerificationEmailDtoLangEnum = typeof VerificationEmailDtoLangEnum[keyof typeof VerificationEmailDtoLangEnum];
|
|
4127
|
+
export const VerificationEmailDtoTypeEnum = {
|
|
4128
|
+
VerifyAccount: 'VERIFY_ACCOUNT',
|
|
4129
|
+
ForgotPassword: 'FORGOT_PASSWORD'
|
|
4130
|
+
} as const;
|
|
4131
|
+
|
|
3707
4132
|
export type VerificationEmailDtoTypeEnum = typeof VerificationEmailDtoTypeEnum[keyof typeof VerificationEmailDtoTypeEnum];
|
|
3708
4133
|
|
|
3709
4134
|
/**
|
|
@@ -8709,7 +9134,7 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8709
9134
|
roomControllerFindManyByBranchId: async (branchId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
8710
9135
|
// verify required parameter 'branchId' is not null or undefined
|
|
8711
9136
|
assertParamExists('roomControllerFindManyByBranchId', 'branchId', branchId)
|
|
8712
|
-
const localVarPath = `/api/rooms/{branchId}`
|
|
9137
|
+
const localVarPath = `/api/rooms/in-branch/{branchId}`
|
|
8713
9138
|
.replace(`{${"branchId"}}`, encodeURIComponent(String(branchId)));
|
|
8714
9139
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
8715
9140
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -8767,6 +9192,42 @@ export const RoomsApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
8767
9192
|
options: localVarRequestOptions,
|
|
8768
9193
|
};
|
|
8769
9194
|
},
|
|
9195
|
+
/**
|
|
9196
|
+
*
|
|
9197
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9198
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9199
|
+
* @param {*} [options] Override http request option.
|
|
9200
|
+
* @throws {RequiredError}
|
|
9201
|
+
*/
|
|
9202
|
+
roomControllerPermanentDelete: async (immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9203
|
+
// verify required parameter 'immediateDeleteRoomsDto' is not null or undefined
|
|
9204
|
+
assertParamExists('roomControllerPermanentDelete', 'immediateDeleteRoomsDto', immediateDeleteRoomsDto)
|
|
9205
|
+
const localVarPath = `/api/rooms/permanent-delete`;
|
|
9206
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9207
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9208
|
+
let baseOptions;
|
|
9209
|
+
if (configuration) {
|
|
9210
|
+
baseOptions = configuration.baseOptions;
|
|
9211
|
+
}
|
|
9212
|
+
|
|
9213
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
9214
|
+
const localVarHeaderParameter = {} as any;
|
|
9215
|
+
const localVarQueryParameter = {} as any;
|
|
9216
|
+
|
|
9217
|
+
|
|
9218
|
+
|
|
9219
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9220
|
+
|
|
9221
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9222
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9223
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9224
|
+
localVarRequestOptions.data = serializeDataIfNeeded(immediateDeleteRoomsDto, localVarRequestOptions, configuration)
|
|
9225
|
+
|
|
9226
|
+
return {
|
|
9227
|
+
url: toPathString(localVarUrlObj),
|
|
9228
|
+
options: localVarRequestOptions,
|
|
9229
|
+
};
|
|
9230
|
+
},
|
|
8770
9231
|
/**
|
|
8771
9232
|
*
|
|
8772
9233
|
* @summary Soft delete a room
|
|
@@ -8952,6 +9413,19 @@ export const RoomsApiFp = function(configuration?: Configuration) {
|
|
|
8952
9413
|
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerFindOne']?.[localVarOperationServerIndex]?.url;
|
|
8953
9414
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
8954
9415
|
},
|
|
9416
|
+
/**
|
|
9417
|
+
*
|
|
9418
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9419
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9420
|
+
* @param {*} [options] Override http request option.
|
|
9421
|
+
* @throws {RequiredError}
|
|
9422
|
+
*/
|
|
9423
|
+
async roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
9424
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.roomControllerPermanentDelete(immediateDeleteRoomsDto, options);
|
|
9425
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9426
|
+
const localVarOperationServerBasePath = operationServerMap['RoomsApi.roomControllerPermanentDelete']?.[localVarOperationServerIndex]?.url;
|
|
9427
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9428
|
+
},
|
|
8955
9429
|
/**
|
|
8956
9430
|
*
|
|
8957
9431
|
* @summary Soft delete a room
|
|
@@ -9054,6 +9528,16 @@ export const RoomsApiFactory = function (configuration?: Configuration, basePath
|
|
|
9054
9528
|
roomControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<HotelRoom> {
|
|
9055
9529
|
return localVarFp.roomControllerFindOne(id, options).then((request) => request(axios, basePath));
|
|
9056
9530
|
},
|
|
9531
|
+
/**
|
|
9532
|
+
*
|
|
9533
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9534
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9535
|
+
* @param {*} [options] Override http request option.
|
|
9536
|
+
* @throws {RequiredError}
|
|
9537
|
+
*/
|
|
9538
|
+
roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
9539
|
+
return localVarFp.roomControllerPermanentDelete(immediateDeleteRoomsDto, options).then((request) => request(axios, basePath));
|
|
9540
|
+
},
|
|
9057
9541
|
/**
|
|
9058
9542
|
*
|
|
9059
9543
|
* @summary Soft delete a room
|
|
@@ -9157,6 +9641,18 @@ export class RoomsApi extends BaseAPI {
|
|
|
9157
9641
|
return RoomsApiFp(this.configuration).roomControllerFindOne(id, options).then((request) => request(this.axios, this.basePath));
|
|
9158
9642
|
}
|
|
9159
9643
|
|
|
9644
|
+
/**
|
|
9645
|
+
*
|
|
9646
|
+
* @summary ADMIN - Delete rooms permanently
|
|
9647
|
+
* @param {ImmediateDeleteRoomsDto} immediateDeleteRoomsDto
|
|
9648
|
+
* @param {*} [options] Override http request option.
|
|
9649
|
+
* @throws {RequiredError}
|
|
9650
|
+
* @memberof RoomsApi
|
|
9651
|
+
*/
|
|
9652
|
+
public roomControllerPermanentDelete(immediateDeleteRoomsDto: ImmediateDeleteRoomsDto, options?: RawAxiosRequestConfig) {
|
|
9653
|
+
return RoomsApiFp(this.configuration).roomControllerPermanentDelete(immediateDeleteRoomsDto, options).then((request) => request(this.axios, this.basePath));
|
|
9654
|
+
}
|
|
9655
|
+
|
|
9160
9656
|
/**
|
|
9161
9657
|
*
|
|
9162
9658
|
* @summary Soft delete a room
|
|
@@ -9203,12 +9699,166 @@ export class RoomsApi extends BaseAPI {
|
|
|
9203
9699
|
*/
|
|
9204
9700
|
export const UsersApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
9205
9701
|
return {
|
|
9702
|
+
/**
|
|
9703
|
+
*
|
|
9704
|
+
* @summary Get detailed user information (Admin only)
|
|
9705
|
+
* @param {string} id
|
|
9706
|
+
* @param {*} [options] Override http request option.
|
|
9707
|
+
* @throws {RequiredError}
|
|
9708
|
+
*/
|
|
9709
|
+
usersControllerAdminGetUserDetail: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9710
|
+
// verify required parameter 'id' is not null or undefined
|
|
9711
|
+
assertParamExists('usersControllerAdminGetUserDetail', 'id', id)
|
|
9712
|
+
const localVarPath = `/api/users/admin/{id}`
|
|
9713
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9714
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9715
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9716
|
+
let baseOptions;
|
|
9717
|
+
if (configuration) {
|
|
9718
|
+
baseOptions = configuration.baseOptions;
|
|
9719
|
+
}
|
|
9720
|
+
|
|
9721
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
9722
|
+
const localVarHeaderParameter = {} as any;
|
|
9723
|
+
const localVarQueryParameter = {} as any;
|
|
9724
|
+
|
|
9725
|
+
|
|
9726
|
+
|
|
9727
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9728
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9729
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9730
|
+
|
|
9731
|
+
return {
|
|
9732
|
+
url: toPathString(localVarUrlObj),
|
|
9733
|
+
options: localVarRequestOptions,
|
|
9734
|
+
};
|
|
9735
|
+
},
|
|
9736
|
+
/**
|
|
9737
|
+
*
|
|
9738
|
+
* @summary Update user information (Admin only)
|
|
9739
|
+
* @param {string} id
|
|
9740
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
9741
|
+
* @param {*} [options] Override http request option.
|
|
9742
|
+
* @throws {RequiredError}
|
|
9743
|
+
*/
|
|
9744
|
+
usersControllerAdminUpdateUser: async (id: string, adminUpdateUserDto: AdminUpdateUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9745
|
+
// verify required parameter 'id' is not null or undefined
|
|
9746
|
+
assertParamExists('usersControllerAdminUpdateUser', 'id', id)
|
|
9747
|
+
// verify required parameter 'adminUpdateUserDto' is not null or undefined
|
|
9748
|
+
assertParamExists('usersControllerAdminUpdateUser', 'adminUpdateUserDto', adminUpdateUserDto)
|
|
9749
|
+
const localVarPath = `/api/users/admin/{id}`
|
|
9750
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9751
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9752
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9753
|
+
let baseOptions;
|
|
9754
|
+
if (configuration) {
|
|
9755
|
+
baseOptions = configuration.baseOptions;
|
|
9756
|
+
}
|
|
9757
|
+
|
|
9758
|
+
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
|
|
9759
|
+
const localVarHeaderParameter = {} as any;
|
|
9760
|
+
const localVarQueryParameter = {} as any;
|
|
9761
|
+
|
|
9762
|
+
|
|
9763
|
+
|
|
9764
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9765
|
+
|
|
9766
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9767
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9768
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9769
|
+
localVarRequestOptions.data = serializeDataIfNeeded(adminUpdateUserDto, localVarRequestOptions, configuration)
|
|
9770
|
+
|
|
9771
|
+
return {
|
|
9772
|
+
url: toPathString(localVarUrlObj),
|
|
9773
|
+
options: localVarRequestOptions,
|
|
9774
|
+
};
|
|
9775
|
+
},
|
|
9776
|
+
/**
|
|
9777
|
+
*
|
|
9778
|
+
* @summary Block or unblock a user
|
|
9779
|
+
* @param {string} id
|
|
9780
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
9781
|
+
* @param {*} [options] Override http request option.
|
|
9782
|
+
* @throws {RequiredError}
|
|
9783
|
+
*/
|
|
9784
|
+
usersControllerBlockUser: async (id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9785
|
+
// verify required parameter 'id' is not null or undefined
|
|
9786
|
+
assertParamExists('usersControllerBlockUser', 'id', id)
|
|
9787
|
+
// verify required parameter 'blockOrUnblockUserDto' is not null or undefined
|
|
9788
|
+
assertParamExists('usersControllerBlockUser', 'blockOrUnblockUserDto', blockOrUnblockUserDto)
|
|
9789
|
+
const localVarPath = `/api/users/block-action/{id}`
|
|
9790
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9791
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9792
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9793
|
+
let baseOptions;
|
|
9794
|
+
if (configuration) {
|
|
9795
|
+
baseOptions = configuration.baseOptions;
|
|
9796
|
+
}
|
|
9797
|
+
|
|
9798
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
9799
|
+
const localVarHeaderParameter = {} as any;
|
|
9800
|
+
const localVarQueryParameter = {} as any;
|
|
9801
|
+
|
|
9802
|
+
|
|
9803
|
+
|
|
9804
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9805
|
+
|
|
9806
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9807
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9808
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9809
|
+
localVarRequestOptions.data = serializeDataIfNeeded(blockOrUnblockUserDto, localVarRequestOptions, configuration)
|
|
9810
|
+
|
|
9811
|
+
return {
|
|
9812
|
+
url: toPathString(localVarUrlObj),
|
|
9813
|
+
options: localVarRequestOptions,
|
|
9814
|
+
};
|
|
9815
|
+
},
|
|
9816
|
+
/**
|
|
9817
|
+
*
|
|
9818
|
+
* @summary Soft delete a user (Admin only)
|
|
9819
|
+
* @param {string} id
|
|
9820
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
9821
|
+
* @param {*} [options] Override http request option.
|
|
9822
|
+
* @throws {RequiredError}
|
|
9823
|
+
*/
|
|
9824
|
+
usersControllerDeleteUser: async (id: string, deleteUserDto: DeleteUserDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9825
|
+
// verify required parameter 'id' is not null or undefined
|
|
9826
|
+
assertParamExists('usersControllerDeleteUser', 'id', id)
|
|
9827
|
+
// verify required parameter 'deleteUserDto' is not null or undefined
|
|
9828
|
+
assertParamExists('usersControllerDeleteUser', 'deleteUserDto', deleteUserDto)
|
|
9829
|
+
const localVarPath = `/api/users/{id}`
|
|
9830
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9831
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9832
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9833
|
+
let baseOptions;
|
|
9834
|
+
if (configuration) {
|
|
9835
|
+
baseOptions = configuration.baseOptions;
|
|
9836
|
+
}
|
|
9837
|
+
|
|
9838
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
9839
|
+
const localVarHeaderParameter = {} as any;
|
|
9840
|
+
const localVarQueryParameter = {} as any;
|
|
9841
|
+
|
|
9842
|
+
|
|
9843
|
+
|
|
9844
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
9845
|
+
|
|
9846
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9847
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9848
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9849
|
+
localVarRequestOptions.data = serializeDataIfNeeded(deleteUserDto, localVarRequestOptions, configuration)
|
|
9850
|
+
|
|
9851
|
+
return {
|
|
9852
|
+
url: toPathString(localVarUrlObj),
|
|
9853
|
+
options: localVarRequestOptions,
|
|
9854
|
+
};
|
|
9855
|
+
},
|
|
9206
9856
|
/**
|
|
9207
9857
|
*
|
|
9208
9858
|
* @param {number} [page]
|
|
9209
9859
|
* @param {number} [pageSize]
|
|
9210
9860
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9211
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
9861
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9212
9862
|
* @param {*} [options] Override http request option.
|
|
9213
9863
|
* @throws {RequiredError}
|
|
9214
9864
|
*/
|
|
@@ -9243,6 +9893,40 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
9243
9893
|
|
|
9244
9894
|
|
|
9245
9895
|
|
|
9896
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9897
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9898
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
9899
|
+
|
|
9900
|
+
return {
|
|
9901
|
+
url: toPathString(localVarUrlObj),
|
|
9902
|
+
options: localVarRequestOptions,
|
|
9903
|
+
};
|
|
9904
|
+
},
|
|
9905
|
+
/**
|
|
9906
|
+
*
|
|
9907
|
+
* @summary Restore a deleted user (Admin only)
|
|
9908
|
+
* @param {string} id
|
|
9909
|
+
* @param {*} [options] Override http request option.
|
|
9910
|
+
* @throws {RequiredError}
|
|
9911
|
+
*/
|
|
9912
|
+
usersControllerRestoreUser: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
9913
|
+
// verify required parameter 'id' is not null or undefined
|
|
9914
|
+
assertParamExists('usersControllerRestoreUser', 'id', id)
|
|
9915
|
+
const localVarPath = `/api/users/{id}/restore`
|
|
9916
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
9917
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
9918
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
9919
|
+
let baseOptions;
|
|
9920
|
+
if (configuration) {
|
|
9921
|
+
baseOptions = configuration.baseOptions;
|
|
9922
|
+
}
|
|
9923
|
+
|
|
9924
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
9925
|
+
const localVarHeaderParameter = {} as any;
|
|
9926
|
+
const localVarQueryParameter = {} as any;
|
|
9927
|
+
|
|
9928
|
+
|
|
9929
|
+
|
|
9246
9930
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
9247
9931
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
9248
9932
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -9262,12 +9946,67 @@ export const UsersApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
9262
9946
|
export const UsersApiFp = function(configuration?: Configuration) {
|
|
9263
9947
|
const localVarAxiosParamCreator = UsersApiAxiosParamCreator(configuration)
|
|
9264
9948
|
return {
|
|
9949
|
+
/**
|
|
9950
|
+
*
|
|
9951
|
+
* @summary Get detailed user information (Admin only)
|
|
9952
|
+
* @param {string} id
|
|
9953
|
+
* @param {*} [options] Override http request option.
|
|
9954
|
+
* @throws {RequiredError}
|
|
9955
|
+
*/
|
|
9956
|
+
async usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserDetail>> {
|
|
9957
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerAdminGetUserDetail(id, options);
|
|
9958
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9959
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerAdminGetUserDetail']?.[localVarOperationServerIndex]?.url;
|
|
9960
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9961
|
+
},
|
|
9962
|
+
/**
|
|
9963
|
+
*
|
|
9964
|
+
* @summary Update user information (Admin only)
|
|
9965
|
+
* @param {string} id
|
|
9966
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
9967
|
+
* @param {*} [options] Override http request option.
|
|
9968
|
+
* @throws {RequiredError}
|
|
9969
|
+
*/
|
|
9970
|
+
async usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserDetail>> {
|
|
9971
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerAdminUpdateUser(id, adminUpdateUserDto, options);
|
|
9972
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9973
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerAdminUpdateUser']?.[localVarOperationServerIndex]?.url;
|
|
9974
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9975
|
+
},
|
|
9976
|
+
/**
|
|
9977
|
+
*
|
|
9978
|
+
* @summary Block or unblock a user
|
|
9979
|
+
* @param {string} id
|
|
9980
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
9981
|
+
* @param {*} [options] Override http request option.
|
|
9982
|
+
* @throws {RequiredError}
|
|
9983
|
+
*/
|
|
9984
|
+
async usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
9985
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerBlockUser(id, blockOrUnblockUserDto, options);
|
|
9986
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
9987
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerBlockUser']?.[localVarOperationServerIndex]?.url;
|
|
9988
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9989
|
+
},
|
|
9990
|
+
/**
|
|
9991
|
+
*
|
|
9992
|
+
* @summary Soft delete a user (Admin only)
|
|
9993
|
+
* @param {string} id
|
|
9994
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
9995
|
+
* @param {*} [options] Override http request option.
|
|
9996
|
+
* @throws {RequiredError}
|
|
9997
|
+
*/
|
|
9998
|
+
async usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
|
9999
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerDeleteUser(id, deleteUserDto, options);
|
|
10000
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
10001
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerDeleteUser']?.[localVarOperationServerIndex]?.url;
|
|
10002
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10003
|
+
},
|
|
9265
10004
|
/**
|
|
9266
10005
|
*
|
|
9267
10006
|
* @param {number} [page]
|
|
9268
10007
|
* @param {number} [pageSize]
|
|
9269
10008
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9270
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10009
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9271
10010
|
* @param {*} [options] Override http request option.
|
|
9272
10011
|
* @throws {RequiredError}
|
|
9273
10012
|
*/
|
|
@@ -9277,6 +10016,19 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
9277
10016
|
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerGetUsers']?.[localVarOperationServerIndex]?.url;
|
|
9278
10017
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
9279
10018
|
},
|
|
10019
|
+
/**
|
|
10020
|
+
*
|
|
10021
|
+
* @summary Restore a deleted user (Admin only)
|
|
10022
|
+
* @param {string} id
|
|
10023
|
+
* @param {*} [options] Override http request option.
|
|
10024
|
+
* @throws {RequiredError}
|
|
10025
|
+
*/
|
|
10026
|
+
async usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> {
|
|
10027
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.usersControllerRestoreUser(id, options);
|
|
10028
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
10029
|
+
const localVarOperationServerBasePath = operationServerMap['UsersApi.usersControllerRestoreUser']?.[localVarOperationServerIndex]?.url;
|
|
10030
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
10031
|
+
},
|
|
9280
10032
|
}
|
|
9281
10033
|
};
|
|
9282
10034
|
|
|
@@ -9287,18 +10039,71 @@ export const UsersApiFp = function(configuration?: Configuration) {
|
|
|
9287
10039
|
export const UsersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
9288
10040
|
const localVarFp = UsersApiFp(configuration)
|
|
9289
10041
|
return {
|
|
10042
|
+
/**
|
|
10043
|
+
*
|
|
10044
|
+
* @summary Get detailed user information (Admin only)
|
|
10045
|
+
* @param {string} id
|
|
10046
|
+
* @param {*} [options] Override http request option.
|
|
10047
|
+
* @throws {RequiredError}
|
|
10048
|
+
*/
|
|
10049
|
+
usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig): AxiosPromise<UserDetail> {
|
|
10050
|
+
return localVarFp.usersControllerAdminGetUserDetail(id, options).then((request) => request(axios, basePath));
|
|
10051
|
+
},
|
|
10052
|
+
/**
|
|
10053
|
+
*
|
|
10054
|
+
* @summary Update user information (Admin only)
|
|
10055
|
+
* @param {string} id
|
|
10056
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
10057
|
+
* @param {*} [options] Override http request option.
|
|
10058
|
+
* @throws {RequiredError}
|
|
10059
|
+
*/
|
|
10060
|
+
usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig): AxiosPromise<UserDetail> {
|
|
10061
|
+
return localVarFp.usersControllerAdminUpdateUser(id, adminUpdateUserDto, options).then((request) => request(axios, basePath));
|
|
10062
|
+
},
|
|
10063
|
+
/**
|
|
10064
|
+
*
|
|
10065
|
+
* @summary Block or unblock a user
|
|
10066
|
+
* @param {string} id
|
|
10067
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
10068
|
+
* @param {*} [options] Override http request option.
|
|
10069
|
+
* @throws {RequiredError}
|
|
10070
|
+
*/
|
|
10071
|
+
usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
10072
|
+
return localVarFp.usersControllerBlockUser(id, blockOrUnblockUserDto, options).then((request) => request(axios, basePath));
|
|
10073
|
+
},
|
|
10074
|
+
/**
|
|
10075
|
+
*
|
|
10076
|
+
* @summary Soft delete a user (Admin only)
|
|
10077
|
+
* @param {string} id
|
|
10078
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
10079
|
+
* @param {*} [options] Override http request option.
|
|
10080
|
+
* @throws {RequiredError}
|
|
10081
|
+
*/
|
|
10082
|
+
usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig): AxiosPromise<User> {
|
|
10083
|
+
return localVarFp.usersControllerDeleteUser(id, deleteUserDto, options).then((request) => request(axios, basePath));
|
|
10084
|
+
},
|
|
9290
10085
|
/**
|
|
9291
10086
|
*
|
|
9292
10087
|
* @param {number} [page]
|
|
9293
10088
|
* @param {number} [pageSize]
|
|
9294
10089
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9295
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10090
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9296
10091
|
* @param {*} [options] Override http request option.
|
|
9297
10092
|
* @throws {RequiredError}
|
|
9298
10093
|
*/
|
|
9299
10094
|
usersControllerGetUsers(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<UsersPaginationResultDto> {
|
|
9300
10095
|
return localVarFp.usersControllerGetUsers(page, pageSize, filters, sort, options).then((request) => request(axios, basePath));
|
|
9301
10096
|
},
|
|
10097
|
+
/**
|
|
10098
|
+
*
|
|
10099
|
+
* @summary Restore a deleted user (Admin only)
|
|
10100
|
+
* @param {string} id
|
|
10101
|
+
* @param {*} [options] Override http request option.
|
|
10102
|
+
* @throws {RequiredError}
|
|
10103
|
+
*/
|
|
10104
|
+
usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig): AxiosPromise<User> {
|
|
10105
|
+
return localVarFp.usersControllerRestoreUser(id, options).then((request) => request(axios, basePath));
|
|
10106
|
+
},
|
|
9302
10107
|
};
|
|
9303
10108
|
};
|
|
9304
10109
|
|
|
@@ -9309,12 +10114,63 @@ export const UsersApiFactory = function (configuration?: Configuration, basePath
|
|
|
9309
10114
|
* @extends {BaseAPI}
|
|
9310
10115
|
*/
|
|
9311
10116
|
export class UsersApi extends BaseAPI {
|
|
10117
|
+
/**
|
|
10118
|
+
*
|
|
10119
|
+
* @summary Get detailed user information (Admin only)
|
|
10120
|
+
* @param {string} id
|
|
10121
|
+
* @param {*} [options] Override http request option.
|
|
10122
|
+
* @throws {RequiredError}
|
|
10123
|
+
* @memberof UsersApi
|
|
10124
|
+
*/
|
|
10125
|
+
public usersControllerAdminGetUserDetail(id: string, options?: RawAxiosRequestConfig) {
|
|
10126
|
+
return UsersApiFp(this.configuration).usersControllerAdminGetUserDetail(id, options).then((request) => request(this.axios, this.basePath));
|
|
10127
|
+
}
|
|
10128
|
+
|
|
10129
|
+
/**
|
|
10130
|
+
*
|
|
10131
|
+
* @summary Update user information (Admin only)
|
|
10132
|
+
* @param {string} id
|
|
10133
|
+
* @param {AdminUpdateUserDto} adminUpdateUserDto
|
|
10134
|
+
* @param {*} [options] Override http request option.
|
|
10135
|
+
* @throws {RequiredError}
|
|
10136
|
+
* @memberof UsersApi
|
|
10137
|
+
*/
|
|
10138
|
+
public usersControllerAdminUpdateUser(id: string, adminUpdateUserDto: AdminUpdateUserDto, options?: RawAxiosRequestConfig) {
|
|
10139
|
+
return UsersApiFp(this.configuration).usersControllerAdminUpdateUser(id, adminUpdateUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10140
|
+
}
|
|
10141
|
+
|
|
10142
|
+
/**
|
|
10143
|
+
*
|
|
10144
|
+
* @summary Block or unblock a user
|
|
10145
|
+
* @param {string} id
|
|
10146
|
+
* @param {BlockOrUnblockUserDto} blockOrUnblockUserDto
|
|
10147
|
+
* @param {*} [options] Override http request option.
|
|
10148
|
+
* @throws {RequiredError}
|
|
10149
|
+
* @memberof UsersApi
|
|
10150
|
+
*/
|
|
10151
|
+
public usersControllerBlockUser(id: string, blockOrUnblockUserDto: BlockOrUnblockUserDto, options?: RawAxiosRequestConfig) {
|
|
10152
|
+
return UsersApiFp(this.configuration).usersControllerBlockUser(id, blockOrUnblockUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10153
|
+
}
|
|
10154
|
+
|
|
10155
|
+
/**
|
|
10156
|
+
*
|
|
10157
|
+
* @summary Soft delete a user (Admin only)
|
|
10158
|
+
* @param {string} id
|
|
10159
|
+
* @param {DeleteUserDto} deleteUserDto
|
|
10160
|
+
* @param {*} [options] Override http request option.
|
|
10161
|
+
* @throws {RequiredError}
|
|
10162
|
+
* @memberof UsersApi
|
|
10163
|
+
*/
|
|
10164
|
+
public usersControllerDeleteUser(id: string, deleteUserDto: DeleteUserDto, options?: RawAxiosRequestConfig) {
|
|
10165
|
+
return UsersApiFp(this.configuration).usersControllerDeleteUser(id, deleteUserDto, options).then((request) => request(this.axios, this.basePath));
|
|
10166
|
+
}
|
|
10167
|
+
|
|
9312
10168
|
/**
|
|
9313
10169
|
*
|
|
9314
10170
|
* @param {number} [page]
|
|
9315
10171
|
* @param {number} [pageSize]
|
|
9316
10172
|
* @param {string} [filters] JSON string of FilterUserDto
|
|
9317
|
-
* @param {string} [sort] JSON string of SortUserDto
|
|
10173
|
+
* @param {string} [sort] JSON string of SortUserDto
|
|
9318
10174
|
* @param {*} [options] Override http request option.
|
|
9319
10175
|
* @throws {RequiredError}
|
|
9320
10176
|
* @memberof UsersApi
|
|
@@ -9322,6 +10178,18 @@ export class UsersApi extends BaseAPI {
|
|
|
9322
10178
|
public usersControllerGetUsers(page?: number, pageSize?: number, filters?: string, sort?: string, options?: RawAxiosRequestConfig) {
|
|
9323
10179
|
return UsersApiFp(this.configuration).usersControllerGetUsers(page, pageSize, filters, sort, options).then((request) => request(this.axios, this.basePath));
|
|
9324
10180
|
}
|
|
10181
|
+
|
|
10182
|
+
/**
|
|
10183
|
+
*
|
|
10184
|
+
* @summary Restore a deleted user (Admin only)
|
|
10185
|
+
* @param {string} id
|
|
10186
|
+
* @param {*} [options] Override http request option.
|
|
10187
|
+
* @throws {RequiredError}
|
|
10188
|
+
* @memberof UsersApi
|
|
10189
|
+
*/
|
|
10190
|
+
public usersControllerRestoreUser(id: string, options?: RawAxiosRequestConfig) {
|
|
10191
|
+
return UsersApiFp(this.configuration).usersControllerRestoreUser(id, options).then((request) => request(this.axios, this.basePath));
|
|
10192
|
+
}
|
|
9325
10193
|
}
|
|
9326
10194
|
|
|
9327
10195
|
|