@jugarhoy/api 1.0.0

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.
Files changed (171) hide show
  1. package/apis/AdminCoachesApi.ts +259 -0
  2. package/apis/AdminCustomersApi.ts +374 -0
  3. package/apis/AdminDevicesApi.ts +364 -0
  4. package/apis/AdminLocationsApi.ts +304 -0
  5. package/apis/AdminPaymentConfigsApi.ts +358 -0
  6. package/apis/AdminPlayPricesApi.ts +397 -0
  7. package/apis/AdminPlaySpotShiftsApi.ts +267 -0
  8. package/apis/AdminPlaySpotsApi.ts +307 -0
  9. package/apis/AdminReservationsApi.ts +335 -0
  10. package/apis/AdminSubscriptionsApi.ts +354 -0
  11. package/apis/AdminUsersApi.ts +323 -0
  12. package/apis/AuthApi.ts +196 -0
  13. package/apis/BackgroundApi.ts +66 -0
  14. package/apis/ClubApi.ts +174 -0
  15. package/apis/DevicesApi.ts +136 -0
  16. package/apis/HealthApi.ts +56 -0
  17. package/apis/MercadoPagoApi.ts +111 -0
  18. package/apis/MercadoPagoIPNApi.ts +80 -0
  19. package/apis/PlaySpotsApi.ts +207 -0
  20. package/apis/ReservesApi.ts +366 -0
  21. package/apis/UsersApi.ts +648 -0
  22. package/apis/index.ts +23 -0
  23. package/index.ts +5 -0
  24. package/models/AddMemberToSubscriptionRequest.ts +66 -0
  25. package/models/ApiAdminPlayPricesIdPutRequest.ts +140 -0
  26. package/models/ApiAdminPlayPricesPostRequest.ts +146 -0
  27. package/models/AvailabilityShift.ts +89 -0
  28. package/models/AvailabilityShiftHour.ts +81 -0
  29. package/models/AvailabilityShiftSpot.ts +89 -0
  30. package/models/CancelReservationParams.ts +75 -0
  31. package/models/CancelReservationRequest.ts +66 -0
  32. package/models/CancelReservationResult.ts +89 -0
  33. package/models/ChargeOn.ts +53 -0
  34. package/models/Check200Response.ts +65 -0
  35. package/models/CheckUserExists200Response.ts +73 -0
  36. package/models/ClubDto.ts +164 -0
  37. package/models/ClubSearchParams.ts +119 -0
  38. package/models/ClubSearchParamsGeo.ts +73 -0
  39. package/models/ClubSearchParamsPaging.ts +73 -0
  40. package/models/ClubSearchResponse.ts +88 -0
  41. package/models/ClubSearchResponseDataInner.ts +168 -0
  42. package/models/ClubSearchResponsePagination.ts +89 -0
  43. package/models/Coach.ts +121 -0
  44. package/models/CoachDto.ts +119 -0
  45. package/models/CoachDtoAvailabilityInner.ts +88 -0
  46. package/models/ConfirmReservationParams.ts +74 -0
  47. package/models/ConfirmReservationResponse.ts +83 -0
  48. package/models/ConfirmReservationResponseResult.ts +81 -0
  49. package/models/CreateBasicUserDto.ts +112 -0
  50. package/models/CreateCheckoutPreferenceRequest.ts +104 -0
  51. package/models/CreateCheckoutPreferenceRequestBackUrls.ts +81 -0
  52. package/models/CreateCheckoutPreferenceRequestItemsInner.ts +89 -0
  53. package/models/CreateCustomerPaymentConfigDto.ts +84 -0
  54. package/models/CreateDefault500Response.ts +65 -0
  55. package/models/CreateFromInvite400Response.ts +65 -0
  56. package/models/CreateShiftRequest.ts +153 -0
  57. package/models/CreateUserNotificationDto.ts +93 -0
  58. package/models/Customer.ts +235 -0
  59. package/models/CustomerDocument.ts +128 -0
  60. package/models/CustomerDto.ts +209 -0
  61. package/models/CustomerDtoRefund.ts +103 -0
  62. package/models/CustomerLocationDto.ts +102 -0
  63. package/models/CustomerPaymentConfig.ts +144 -0
  64. package/models/CustomerPaymentConfigDto.ts +85 -0
  65. package/models/CustomerRefund.ts +102 -0
  66. package/models/CustomerStatus.ts +53 -0
  67. package/models/DayOfWeek.ts +58 -0
  68. package/models/DeleteShift200Response.ts +65 -0
  69. package/models/Device.ts +139 -0
  70. package/models/DeviceDto.ts +131 -0
  71. package/models/DeviceState.ts +111 -0
  72. package/models/DeviceType.ts +53 -0
  73. package/models/DominantPlaySide.ts +54 -0
  74. package/models/ErrorResponse.ts +66 -0
  75. package/models/ExpireUnpaidReservationResult.ts +81 -0
  76. package/models/ExpireUnpaidReservations401Response.ts +65 -0
  77. package/models/ExpireUnpaidReservations500Response.ts +65 -0
  78. package/models/Feature.ts +121 -0
  79. package/models/FindOccurrences200Response.ts +91 -0
  80. package/models/Frequency.ts +54 -0
  81. package/models/GenerateCode500Response.ts +65 -0
  82. package/models/GetAllDevices200ResponseInner.ts +154 -0
  83. package/models/GetAllPlaySpots200ResponseInner.ts +213 -0
  84. package/models/GetAllShifts200ResponseInner.ts +199 -0
  85. package/models/GetHourlyReservationStatus200Response.ts +89 -0
  86. package/models/GetHourlyReservationStatus200ResponseHourlyStatusInner.ts +97 -0
  87. package/models/GetMercadoPagoAuthUrl200Response.ts +66 -0
  88. package/models/GetSession401Response.ts +65 -0
  89. package/models/GetSession500Response.ts +65 -0
  90. package/models/HourShiftDetail.ts +81 -0
  91. package/models/InitiateReservationParams.ts +137 -0
  92. package/models/Level.ts +54 -0
  93. package/models/LightControlResponse.ts +83 -0
  94. package/models/Location.ts +209 -0
  95. package/models/LocationDto.ts +204 -0
  96. package/models/ManageLightSwitch200Response.ts +81 -0
  97. package/models/ManageLightSwitch500Response.ts +73 -0
  98. package/models/MatchRequirements.ts +100 -0
  99. package/models/MercadoPagoIPN.ts +135 -0
  100. package/models/NotificationType.ts +55 -0
  101. package/models/Occurrence.ts +84 -0
  102. package/models/PaymentDetail.ts +185 -0
  103. package/models/PaymentMethod.ts +56 -0
  104. package/models/PaymentRefund.ts +111 -0
  105. package/models/PaymentStatus.ts +55 -0
  106. package/models/PaymentTerms.ts +85 -0
  107. package/models/PlayPrice.ts +165 -0
  108. package/models/PlaySpot.ts +197 -0
  109. package/models/PlaySpotAvailabilityDetail.ts +89 -0
  110. package/models/PlaySpotDateSummary.ts +81 -0
  111. package/models/PlaySpotDeviceExecutionState.ts +127 -0
  112. package/models/PlaySpotDto.ts +185 -0
  113. package/models/PlaySpotShift.ts +184 -0
  114. package/models/PlaySpotShortDto.ts +97 -0
  115. package/models/PlaySubscription.ts +293 -0
  116. package/models/PlaySubscriptionCreateDto.ts +167 -0
  117. package/models/PlaySubscriptionParams.ts +114 -0
  118. package/models/PlaySubscriptionType.ts +55 -0
  119. package/models/PlayerCategory.ts +61 -0
  120. package/models/ProcessEmailMessageRequest.ts +66 -0
  121. package/models/ProcessMercadoPagoIPN200Response.ts +73 -0
  122. package/models/ProcessMercadoPagoPaymentParams.ts +83 -0
  123. package/models/ProcessMercadoPagoPaymentResponse.ts +83 -0
  124. package/models/ProcessMercadoPagoPaymentResponseResult.ts +89 -0
  125. package/models/RefundPolicy.ts +54 -0
  126. package/models/RegisterClub400Response.ts +65 -0
  127. package/models/RegisterClub401Response.ts +65 -0
  128. package/models/RegisterClub500Response.ts +65 -0
  129. package/models/RegisterClubParams.ts +191 -0
  130. package/models/RegisterClubResponse.ts +83 -0
  131. package/models/RegisterClubResponseResult.ts +96 -0
  132. package/models/RentHour.ts +73 -0
  133. package/models/ReservationAccessCodeResponse.ts +91 -0
  134. package/models/ReservationAccessCodeResponseResult.ts +107 -0
  135. package/models/ReservationParams.ts +121 -0
  136. package/models/ReservationStatus.ts +55 -0
  137. package/models/Reserve.ts +290 -0
  138. package/models/ReserveDto.ts +207 -0
  139. package/models/ReserveSlotDto.ts +81 -0
  140. package/models/ReserveStatus.ts +57 -0
  141. package/models/ReserveType.ts +58 -0
  142. package/models/SearchClubs400Response.ts +65 -0
  143. package/models/SearchClubs500Response.ts +65 -0
  144. package/models/SetAuthCodeDto.ts +85 -0
  145. package/models/Shift.ts +93 -0
  146. package/models/Sport.ts +61 -0
  147. package/models/SuccessResponse.ts +66 -0
  148. package/models/TimeOfDay.ts +54 -0
  149. package/models/TriggerDeviceAction200Response.ts +81 -0
  150. package/models/TriggerDeviceActionRequest.ts +73 -0
  151. package/models/UpdateReservationAdminRequest.ts +83 -0
  152. package/models/UpdateReserveDto.ts +83 -0
  153. package/models/UpdateUserNotificationDto.ts +73 -0
  154. package/models/User.ts +243 -0
  155. package/models/UserAuth.ts +135 -0
  156. package/models/UserDto.ts +142 -0
  157. package/models/UserNotification.ts +123 -0
  158. package/models/UserNotificationDto.ts +115 -0
  159. package/models/UserRating.ts +75 -0
  160. package/models/UserReserveDto.ts +230 -0
  161. package/models/UserRole.ts +53 -0
  162. package/models/UserSession.ts +129 -0
  163. package/models/UserSessionCustomer.ts +81 -0
  164. package/models/UserSportProfile.ts +117 -0
  165. package/models/UserSportProfileDto.ts +117 -0
  166. package/models/UserType.ts +54 -0
  167. package/models/VerifyPhoneNumber200Response.ts +65 -0
  168. package/models/VerifyPhoneNumberRequest.ts +66 -0
  169. package/models/index.ts +147 -0
  170. package/package.json +35 -0
  171. package/runtime.ts +432 -0
@@ -0,0 +1,135 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { UserRole } from './UserRole';
17
+ import {
18
+ UserRoleFromJSON,
19
+ UserRoleFromJSONTyped,
20
+ UserRoleToJSON,
21
+ UserRoleToJSONTyped,
22
+ } from './UserRole';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UserAuth
28
+ */
29
+ export interface UserAuth {
30
+ /**
31
+ * The unique identifier from the authentication provider
32
+ * @type {string}
33
+ * @memberof UserAuth
34
+ */
35
+ authId: string;
36
+ /**
37
+ * User's email address
38
+ * @type {string}
39
+ * @memberof UserAuth
40
+ */
41
+ email: string;
42
+ /**
43
+ * The authentication provider (e.g., 'firebase_auth')
44
+ * @type {string}
45
+ * @memberof UserAuth
46
+ */
47
+ provider: string;
48
+ /**
49
+ *
50
+ * @type {UserRole}
51
+ * @memberof UserAuth
52
+ */
53
+ role: UserRole;
54
+ /**
55
+ * Customer ID the user is a member of
56
+ * @type {string}
57
+ * @memberof UserAuth
58
+ */
59
+ customerId?: string;
60
+ /**
61
+ * Default location ID the user is associated with
62
+ * @type {string}
63
+ * @memberof UserAuth
64
+ */
65
+ defaultLocationId?: string;
66
+ /**
67
+ * Location IDs the user is associated with
68
+ * @type {Array<string>}
69
+ * @memberof UserAuth
70
+ */
71
+ locationIds?: Array<string>;
72
+ /**
73
+ * Whether this user is the first/default member for the customer
74
+ * @type {boolean}
75
+ * @memberof UserAuth
76
+ */
77
+ isDefaultMember?: boolean;
78
+ }
79
+
80
+
81
+
82
+ /**
83
+ * Check if a given object implements the UserAuth interface.
84
+ */
85
+ export function instanceOfUserAuth(value: object): value is UserAuth {
86
+ if (!('authId' in value) || value['authId'] === undefined) return false;
87
+ if (!('email' in value) || value['email'] === undefined) return false;
88
+ if (!('provider' in value) || value['provider'] === undefined) return false;
89
+ if (!('role' in value) || value['role'] === undefined) return false;
90
+ return true;
91
+ }
92
+
93
+ export function UserAuthFromJSON(json: any): UserAuth {
94
+ return UserAuthFromJSONTyped(json, false);
95
+ }
96
+
97
+ export function UserAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAuth {
98
+ if (json == null) {
99
+ return json;
100
+ }
101
+ return {
102
+
103
+ 'authId': json['auth_id'],
104
+ 'email': json['email'],
105
+ 'provider': json['provider'],
106
+ 'role': UserRoleFromJSON(json['role']),
107
+ 'customerId': json['customerId'] == null ? undefined : json['customerId'],
108
+ 'defaultLocationId': json['defaultLocationId'] == null ? undefined : json['defaultLocationId'],
109
+ 'locationIds': json['locationIds'] == null ? undefined : json['locationIds'],
110
+ 'isDefaultMember': json['isDefaultMember'] == null ? undefined : json['isDefaultMember'],
111
+ };
112
+ }
113
+
114
+ export function UserAuthToJSON(json: any): UserAuth {
115
+ return UserAuthToJSONTyped(json, false);
116
+ }
117
+
118
+ export function UserAuthToJSONTyped(value?: UserAuth | null, ignoreDiscriminator: boolean = false): any {
119
+ if (value == null) {
120
+ return value;
121
+ }
122
+
123
+ return {
124
+
125
+ 'auth_id': value['authId'],
126
+ 'email': value['email'],
127
+ 'provider': value['provider'],
128
+ 'role': UserRoleToJSON(value['role']),
129
+ 'customerId': value['customerId'],
130
+ 'defaultLocationId': value['defaultLocationId'],
131
+ 'locationIds': value['locationIds'],
132
+ 'isDefaultMember': value['isDefaultMember'],
133
+ };
134
+ }
135
+
@@ -0,0 +1,142 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UserDto
20
+ */
21
+ export interface UserDto {
22
+ /**
23
+ * User's first name
24
+ * @type {string}
25
+ * @memberof UserDto
26
+ */
27
+ firstName: string;
28
+ /**
29
+ * User's last name
30
+ * @type {string}
31
+ * @memberof UserDto
32
+ */
33
+ lastName: string;
34
+ /**
35
+ * User's email address
36
+ * @type {string}
37
+ * @memberof UserDto
38
+ */
39
+ email: string;
40
+ /**
41
+ * User's phone number
42
+ * @type {string}
43
+ * @memberof UserDto
44
+ */
45
+ phone: string;
46
+ /**
47
+ * User's date of birth in YYYY-MM-DD format
48
+ * @type {Date}
49
+ * @memberof UserDto
50
+ */
51
+ birthDate: Date;
52
+ /**
53
+ * Base64 encoded string of the user's profile picture
54
+ * @type {string}
55
+ * @memberof UserDto
56
+ */
57
+ avatarBase64?: string;
58
+ /**
59
+ * User's Instagram username
60
+ * @type {string}
61
+ * @memberof UserDto
62
+ */
63
+ instagramHandle?: string;
64
+ /**
65
+ * User's geographical latitude coordinate
66
+ * @type {number}
67
+ * @memberof UserDto
68
+ */
69
+ latitude?: number;
70
+ /**
71
+ * User's geographical longitude coordinate
72
+ * @type {number}
73
+ * @memberof UserDto
74
+ */
75
+ longitude?: number;
76
+ /**
77
+ * Distance to the user in kilometers
78
+ * @type {number}
79
+ * @memberof UserDto
80
+ */
81
+ distanceInKm?: number;
82
+ }
83
+
84
+ /**
85
+ * Check if a given object implements the UserDto interface.
86
+ */
87
+ export function instanceOfUserDto(value: object): value is UserDto {
88
+ if (!('firstName' in value) || value['firstName'] === undefined) return false;
89
+ if (!('lastName' in value) || value['lastName'] === undefined) return false;
90
+ if (!('email' in value) || value['email'] === undefined) return false;
91
+ if (!('phone' in value) || value['phone'] === undefined) return false;
92
+ if (!('birthDate' in value) || value['birthDate'] === undefined) return false;
93
+ return true;
94
+ }
95
+
96
+ export function UserDtoFromJSON(json: any): UserDto {
97
+ return UserDtoFromJSONTyped(json, false);
98
+ }
99
+
100
+ export function UserDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDto {
101
+ if (json == null) {
102
+ return json;
103
+ }
104
+ return {
105
+
106
+ 'firstName': json['firstName'],
107
+ 'lastName': json['lastName'],
108
+ 'email': json['email'],
109
+ 'phone': json['phone'],
110
+ 'birthDate': (new Date(json['birthDate'])),
111
+ 'avatarBase64': json['avatarBase64'] == null ? undefined : json['avatarBase64'],
112
+ 'instagramHandle': json['instagramHandle'] == null ? undefined : json['instagramHandle'],
113
+ 'latitude': json['latitude'] == null ? undefined : json['latitude'],
114
+ 'longitude': json['longitude'] == null ? undefined : json['longitude'],
115
+ 'distanceInKm': json['distanceInKm'] == null ? undefined : json['distanceInKm'],
116
+ };
117
+ }
118
+
119
+ export function UserDtoToJSON(json: any): UserDto {
120
+ return UserDtoToJSONTyped(json, false);
121
+ }
122
+
123
+ export function UserDtoToJSONTyped(value?: UserDto | null, ignoreDiscriminator: boolean = false): any {
124
+ if (value == null) {
125
+ return value;
126
+ }
127
+
128
+ return {
129
+
130
+ 'firstName': value['firstName'],
131
+ 'lastName': value['lastName'],
132
+ 'email': value['email'],
133
+ 'phone': value['phone'],
134
+ 'birthDate': ((value['birthDate']).toISOString().substring(0,10)),
135
+ 'avatarBase64': value['avatarBase64'],
136
+ 'instagramHandle': value['instagramHandle'],
137
+ 'latitude': value['latitude'],
138
+ 'longitude': value['longitude'],
139
+ 'distanceInKm': value['distanceInKm'],
140
+ };
141
+ }
142
+
@@ -0,0 +1,123 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { NotificationType } from './NotificationType';
17
+ import {
18
+ NotificationTypeFromJSON,
19
+ NotificationTypeFromJSONTyped,
20
+ NotificationTypeToJSON,
21
+ NotificationTypeToJSONTyped,
22
+ } from './NotificationType';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UserNotification
28
+ */
29
+ export interface UserNotification {
30
+ /**
31
+ * Unique identifier for the notification preference
32
+ * @type {string}
33
+ * @memberof UserNotification
34
+ */
35
+ id?: string;
36
+ /**
37
+ * ID of the user this notification preference belongs to
38
+ * @type {string}
39
+ * @memberof UserNotification
40
+ */
41
+ userId?: string;
42
+ /**
43
+ *
44
+ * @type {NotificationType}
45
+ * @memberof UserNotification
46
+ */
47
+ type?: NotificationType;
48
+ /**
49
+ * JSON object containing subscription information for this notification type
50
+ * @type {{ [key: string]: any; }}
51
+ * @memberof UserNotification
52
+ */
53
+ subscriptionId?: { [key: string]: any; };
54
+ /**
55
+ * Whether this notification type is enabled for the user
56
+ * @type {boolean}
57
+ * @memberof UserNotification
58
+ */
59
+ enabled?: boolean;
60
+ /**
61
+ * When this notification preference was created
62
+ * @type {Date}
63
+ * @memberof UserNotification
64
+ */
65
+ createdAt?: Date;
66
+ /**
67
+ * When this notification preference was last updated
68
+ * @type {Date}
69
+ * @memberof UserNotification
70
+ */
71
+ updatedAt?: Date;
72
+ }
73
+
74
+
75
+
76
+ /**
77
+ * Check if a given object implements the UserNotification interface.
78
+ */
79
+ export function instanceOfUserNotification(value: object): value is UserNotification {
80
+ return true;
81
+ }
82
+
83
+ export function UserNotificationFromJSON(json: any): UserNotification {
84
+ return UserNotificationFromJSONTyped(json, false);
85
+ }
86
+
87
+ export function UserNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserNotification {
88
+ if (json == null) {
89
+ return json;
90
+ }
91
+ return {
92
+
93
+ 'id': json['id'] == null ? undefined : json['id'],
94
+ 'userId': json['userId'] == null ? undefined : json['userId'],
95
+ 'type': json['type'] == null ? undefined : NotificationTypeFromJSON(json['type']),
96
+ 'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
97
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
98
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
99
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
100
+ };
101
+ }
102
+
103
+ export function UserNotificationToJSON(json: any): UserNotification {
104
+ return UserNotificationToJSONTyped(json, false);
105
+ }
106
+
107
+ export function UserNotificationToJSONTyped(value?: UserNotification | null, ignoreDiscriminator: boolean = false): any {
108
+ if (value == null) {
109
+ return value;
110
+ }
111
+
112
+ return {
113
+
114
+ 'id': value['id'],
115
+ 'userId': value['userId'],
116
+ 'type': NotificationTypeToJSON(value['type']),
117
+ 'subscriptionId': value['subscriptionId'],
118
+ 'enabled': value['enabled'],
119
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
120
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
121
+ };
122
+ }
123
+
@@ -0,0 +1,115 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { NotificationType } from './NotificationType';
17
+ import {
18
+ NotificationTypeFromJSON,
19
+ NotificationTypeFromJSONTyped,
20
+ NotificationTypeToJSON,
21
+ NotificationTypeToJSONTyped,
22
+ } from './NotificationType';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UserNotificationDto
28
+ */
29
+ export interface UserNotificationDto {
30
+ /**
31
+ * Unique identifier for the notification preference
32
+ * @type {string}
33
+ * @memberof UserNotificationDto
34
+ */
35
+ id?: string;
36
+ /**
37
+ *
38
+ * @type {NotificationType}
39
+ * @memberof UserNotificationDto
40
+ */
41
+ type?: NotificationType;
42
+ /**
43
+ * JSON object containing subscription information for this notification type
44
+ * @type {{ [key: string]: any; }}
45
+ * @memberof UserNotificationDto
46
+ */
47
+ subscriptionId?: { [key: string]: any; };
48
+ /**
49
+ * Whether this notification type is enabled for the user
50
+ * @type {boolean}
51
+ * @memberof UserNotificationDto
52
+ */
53
+ enabled?: boolean;
54
+ /**
55
+ * When this notification preference was created
56
+ * @type {Date}
57
+ * @memberof UserNotificationDto
58
+ */
59
+ createdAt?: Date;
60
+ /**
61
+ * When this notification preference was last updated
62
+ * @type {Date}
63
+ * @memberof UserNotificationDto
64
+ */
65
+ updatedAt?: Date;
66
+ }
67
+
68
+
69
+
70
+ /**
71
+ * Check if a given object implements the UserNotificationDto interface.
72
+ */
73
+ export function instanceOfUserNotificationDto(value: object): value is UserNotificationDto {
74
+ return true;
75
+ }
76
+
77
+ export function UserNotificationDtoFromJSON(json: any): UserNotificationDto {
78
+ return UserNotificationDtoFromJSONTyped(json, false);
79
+ }
80
+
81
+ export function UserNotificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserNotificationDto {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+
87
+ 'id': json['id'] == null ? undefined : json['id'],
88
+ 'type': json['type'] == null ? undefined : NotificationTypeFromJSON(json['type']),
89
+ 'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
90
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
91
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
92
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
93
+ };
94
+ }
95
+
96
+ export function UserNotificationDtoToJSON(json: any): UserNotificationDto {
97
+ return UserNotificationDtoToJSONTyped(json, false);
98
+ }
99
+
100
+ export function UserNotificationDtoToJSONTyped(value?: UserNotificationDto | null, ignoreDiscriminator: boolean = false): any {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+
105
+ return {
106
+
107
+ 'id': value['id'],
108
+ 'type': NotificationTypeToJSON(value['type']),
109
+ 'subscriptionId': value['subscriptionId'],
110
+ 'enabled': value['enabled'],
111
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
112
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
113
+ };
114
+ }
115
+
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface UserRating
20
+ */
21
+ export interface UserRating {
22
+ /**
23
+ * The user's rating score
24
+ * @type {number}
25
+ * @memberof UserRating
26
+ */
27
+ rating: number;
28
+ /**
29
+ * Number of reviews received
30
+ * @type {number}
31
+ * @memberof UserRating
32
+ */
33
+ reviewCount: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the UserRating interface.
38
+ */
39
+ export function instanceOfUserRating(value: object): value is UserRating {
40
+ if (!('rating' in value) || value['rating'] === undefined) return false;
41
+ if (!('reviewCount' in value) || value['reviewCount'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function UserRatingFromJSON(json: any): UserRating {
46
+ return UserRatingFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function UserRatingFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserRating {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'rating': json['rating'],
56
+ 'reviewCount': json['reviewCount'],
57
+ };
58
+ }
59
+
60
+ export function UserRatingToJSON(json: any): UserRating {
61
+ return UserRatingToJSONTyped(json, false);
62
+ }
63
+
64
+ export function UserRatingToJSONTyped(value?: UserRating | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'rating': value['rating'],
72
+ 'reviewCount': value['reviewCount'],
73
+ };
74
+ }
75
+