@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,65 @@
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 GetSession401Response
20
+ */
21
+ export interface GetSession401Response {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetSession401Response
26
+ */
27
+ error?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetSession401Response interface.
32
+ */
33
+ export function instanceOfGetSession401Response(value: object): value is GetSession401Response {
34
+ return true;
35
+ }
36
+
37
+ export function GetSession401ResponseFromJSON(json: any): GetSession401Response {
38
+ return GetSession401ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function GetSession401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSession401Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'error': json['error'] == null ? undefined : json['error'],
48
+ };
49
+ }
50
+
51
+ export function GetSession401ResponseToJSON(json: any): GetSession401Response {
52
+ return GetSession401ResponseToJSONTyped(json, false);
53
+ }
54
+
55
+ export function GetSession401ResponseToJSONTyped(value?: GetSession401Response | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'error': value['error'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,65 @@
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 GetSession500Response
20
+ */
21
+ export interface GetSession500Response {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GetSession500Response
26
+ */
27
+ error?: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the GetSession500Response interface.
32
+ */
33
+ export function instanceOfGetSession500Response(value: object): value is GetSession500Response {
34
+ return true;
35
+ }
36
+
37
+ export function GetSession500ResponseFromJSON(json: any): GetSession500Response {
38
+ return GetSession500ResponseFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function GetSession500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSession500Response {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+
47
+ 'error': json['error'] == null ? undefined : json['error'],
48
+ };
49
+ }
50
+
51
+ export function GetSession500ResponseToJSON(json: any): GetSession500Response {
52
+ return GetSession500ResponseToJSONTyped(json, false);
53
+ }
54
+
55
+ export function GetSession500ResponseToJSONTyped(value?: GetSession500Response | null, ignoreDiscriminator: boolean = false): any {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+
60
+ return {
61
+
62
+ 'error': value['error'],
63
+ };
64
+ }
65
+
@@ -0,0 +1,81 @@
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 HourShiftDetail
20
+ */
21
+ export interface HourShiftDetail {
22
+ /**
23
+ * ID of the play price
24
+ * @type {string}
25
+ * @memberof HourShiftDetail
26
+ */
27
+ playPriceId?: string;
28
+ /**
29
+ * Price for this duration
30
+ * @type {number}
31
+ * @memberof HourShiftDetail
32
+ */
33
+ price?: number;
34
+ /**
35
+ * Duration in minutes
36
+ * @type {number}
37
+ * @memberof HourShiftDetail
38
+ */
39
+ duration?: number;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the HourShiftDetail interface.
44
+ */
45
+ export function instanceOfHourShiftDetail(value: object): value is HourShiftDetail {
46
+ return true;
47
+ }
48
+
49
+ export function HourShiftDetailFromJSON(json: any): HourShiftDetail {
50
+ return HourShiftDetailFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function HourShiftDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): HourShiftDetail {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'playPriceId': json['playPriceId'] == null ? undefined : json['playPriceId'],
60
+ 'price': json['price'] == null ? undefined : json['price'],
61
+ 'duration': json['duration'] == null ? undefined : json['duration'],
62
+ };
63
+ }
64
+
65
+ export function HourShiftDetailToJSON(json: any): HourShiftDetail {
66
+ return HourShiftDetailToJSONTyped(json, false);
67
+ }
68
+
69
+ export function HourShiftDetailToJSONTyped(value?: HourShiftDetail | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'playPriceId': value['playPriceId'],
77
+ 'price': value['price'],
78
+ 'duration': value['duration'],
79
+ };
80
+ }
81
+
@@ -0,0 +1,137 @@
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 { PaymentMethod } from './PaymentMethod';
17
+ import {
18
+ PaymentMethodFromJSON,
19
+ PaymentMethodFromJSONTyped,
20
+ PaymentMethodToJSON,
21
+ PaymentMethodToJSONTyped,
22
+ } from './PaymentMethod';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface InitiateReservationParams
28
+ */
29
+ export interface InitiateReservationParams {
30
+ /**
31
+ * ID of the user making the reservation
32
+ * @type {string}
33
+ * @memberof InitiateReservationParams
34
+ */
35
+ userId: string;
36
+ /**
37
+ * ID of the shift being reserved
38
+ * @type {string}
39
+ * @memberof InitiateReservationParams
40
+ */
41
+ shiftId: string;
42
+ /**
43
+ * ID of the play price for the reservation (optional)
44
+ * @type {string}
45
+ * @memberof InitiateReservationParams
46
+ */
47
+ playPriceId?: string;
48
+ /**
49
+ * ID of the coach
50
+ * @type {string}
51
+ * @memberof InitiateReservationParams
52
+ */
53
+ coachId?: string;
54
+ /**
55
+ * ID of the play spot being reserved
56
+ * @type {string}
57
+ * @memberof InitiateReservationParams
58
+ */
59
+ playSpotId: string;
60
+ /**
61
+ * Start time of the reservation
62
+ * @type {Date}
63
+ * @memberof InitiateReservationParams
64
+ */
65
+ rentedFrom: Date;
66
+ /**
67
+ * Duration of the reservation in minutes
68
+ * @type {number}
69
+ * @memberof InitiateReservationParams
70
+ */
71
+ duration: number;
72
+ /**
73
+ *
74
+ * @type {PaymentMethod}
75
+ * @memberof InitiateReservationParams
76
+ */
77
+ paymentMethod: PaymentMethod;
78
+ }
79
+
80
+
81
+
82
+ /**
83
+ * Check if a given object implements the InitiateReservationParams interface.
84
+ */
85
+ export function instanceOfInitiateReservationParams(value: object): value is InitiateReservationParams {
86
+ if (!('userId' in value) || value['userId'] === undefined) return false;
87
+ if (!('shiftId' in value) || value['shiftId'] === undefined) return false;
88
+ if (!('playSpotId' in value) || value['playSpotId'] === undefined) return false;
89
+ if (!('rentedFrom' in value) || value['rentedFrom'] === undefined) return false;
90
+ if (!('duration' in value) || value['duration'] === undefined) return false;
91
+ if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
92
+ return true;
93
+ }
94
+
95
+ export function InitiateReservationParamsFromJSON(json: any): InitiateReservationParams {
96
+ return InitiateReservationParamsFromJSONTyped(json, false);
97
+ }
98
+
99
+ export function InitiateReservationParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): InitiateReservationParams {
100
+ if (json == null) {
101
+ return json;
102
+ }
103
+ return {
104
+
105
+ 'userId': json['userId'],
106
+ 'shiftId': json['shiftId'],
107
+ 'playPriceId': json['playPriceId'] == null ? undefined : json['playPriceId'],
108
+ 'coachId': json['coachId'] == null ? undefined : json['coachId'],
109
+ 'playSpotId': json['playSpotId'],
110
+ 'rentedFrom': (new Date(json['rentedFrom'])),
111
+ 'duration': json['duration'],
112
+ 'paymentMethod': PaymentMethodFromJSON(json['paymentMethod']),
113
+ };
114
+ }
115
+
116
+ export function InitiateReservationParamsToJSON(json: any): InitiateReservationParams {
117
+ return InitiateReservationParamsToJSONTyped(json, false);
118
+ }
119
+
120
+ export function InitiateReservationParamsToJSONTyped(value?: InitiateReservationParams | null, ignoreDiscriminator: boolean = false): any {
121
+ if (value == null) {
122
+ return value;
123
+ }
124
+
125
+ return {
126
+
127
+ 'userId': value['userId'],
128
+ 'shiftId': value['shiftId'],
129
+ 'playPriceId': value['playPriceId'],
130
+ 'coachId': value['coachId'],
131
+ 'playSpotId': value['playSpotId'],
132
+ 'rentedFrom': ((value['rentedFrom']).toISOString()),
133
+ 'duration': value['duration'],
134
+ 'paymentMethod': PaymentMethodToJSON(value['paymentMethod']),
135
+ };
136
+ }
137
+
@@ -0,0 +1,54 @@
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
+
16
+ /**
17
+ * Represents the skill level of a player or coach
18
+ * @export
19
+ */
20
+ export const Level = {
21
+ Beginner: 'BEGINNER',
22
+ Intermediate: 'INTERMEDIATE',
23
+ Advanced: 'ADVANCED'
24
+ } as const;
25
+ export type Level = typeof Level[keyof typeof Level];
26
+
27
+
28
+ export function instanceOfLevel(value: any): boolean {
29
+ for (const key in Level) {
30
+ if (Object.prototype.hasOwnProperty.call(Level, key)) {
31
+ if (Level[key as keyof typeof Level] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function LevelFromJSON(json: any): Level {
40
+ return LevelFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function LevelFromJSONTyped(json: any, ignoreDiscriminator: boolean): Level {
44
+ return json as Level;
45
+ }
46
+
47
+ export function LevelToJSON(value?: Level | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function LevelToJSONTyped(value: any, ignoreDiscriminator: boolean): Level {
52
+ return value as Level;
53
+ }
54
+
@@ -0,0 +1,83 @@
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 { PlaySpotDeviceExecutionState } from './PlaySpotDeviceExecutionState';
17
+ import {
18
+ PlaySpotDeviceExecutionStateFromJSON,
19
+ PlaySpotDeviceExecutionStateFromJSONTyped,
20
+ PlaySpotDeviceExecutionStateToJSON,
21
+ PlaySpotDeviceExecutionStateToJSONTyped,
22
+ } from './PlaySpotDeviceExecutionState';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LightControlResponse
28
+ */
29
+ export interface LightControlResponse {
30
+ /**
31
+ * Array of states for all processed play spots
32
+ * @type {Array<PlaySpotDeviceExecutionState>}
33
+ * @memberof LightControlResponse
34
+ */
35
+ playSpots: Array<PlaySpotDeviceExecutionState>;
36
+ /**
37
+ * When the operation was performed
38
+ * @type {Date}
39
+ * @memberof LightControlResponse
40
+ */
41
+ timestamp: Date;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the LightControlResponse interface.
46
+ */
47
+ export function instanceOfLightControlResponse(value: object): value is LightControlResponse {
48
+ if (!('playSpots' in value) || value['playSpots'] === undefined) return false;
49
+ if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function LightControlResponseFromJSON(json: any): LightControlResponse {
54
+ return LightControlResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function LightControlResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LightControlResponse {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'playSpots': ((json['playSpots'] as Array<any>).map(PlaySpotDeviceExecutionStateFromJSON)),
64
+ 'timestamp': (new Date(json['timestamp'])),
65
+ };
66
+ }
67
+
68
+ export function LightControlResponseToJSON(json: any): LightControlResponse {
69
+ return LightControlResponseToJSONTyped(json, false);
70
+ }
71
+
72
+ export function LightControlResponseToJSONTyped(value?: LightControlResponse | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'playSpots': ((value['playSpots'] as Array<any>).map(PlaySpotDeviceExecutionStateToJSON)),
80
+ 'timestamp': ((value['timestamp']).toISOString()),
81
+ };
82
+ }
83
+
@@ -0,0 +1,209 @@
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 { Sport } from './Sport';
17
+ import {
18
+ SportFromJSON,
19
+ SportFromJSONTyped,
20
+ SportToJSON,
21
+ SportToJSONTyped,
22
+ } from './Sport';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface Location
28
+ */
29
+ export interface Location {
30
+ /**
31
+ * Unique identifier for the location
32
+ * @type {string}
33
+ * @memberof Location
34
+ */
35
+ id: string;
36
+ /**
37
+ * Customer ID of the location
38
+ * @type {string}
39
+ * @memberof Location
40
+ */
41
+ customerId: string;
42
+ /**
43
+ * Name of the customer
44
+ * @type {string}
45
+ * @memberof Location
46
+ */
47
+ customerName?: string;
48
+ /**
49
+ * Code of the location
50
+ * @type {string}
51
+ * @memberof Location
52
+ */
53
+ code: string;
54
+ /**
55
+ * Display name of the location
56
+ * @type {string}
57
+ * @memberof Location
58
+ */
59
+ name: string;
60
+ /**
61
+ * Description of the location
62
+ * @type {string}
63
+ * @memberof Location
64
+ */
65
+ description?: string;
66
+ /**
67
+ * Types of sports available at the location
68
+ * @type {Array<Sport>}
69
+ * @memberof Location
70
+ */
71
+ sports: Array<Sport>;
72
+ /**
73
+ * Address of the location
74
+ * @type {string}
75
+ * @memberof Location
76
+ */
77
+ address: string;
78
+ /**
79
+ * URL of the map of the location
80
+ * @type {string}
81
+ * @memberof Location
82
+ */
83
+ addressUrl?: string;
84
+ /**
85
+ * Latitude of the location
86
+ * @type {number}
87
+ * @memberof Location
88
+ */
89
+ latitude?: number | null;
90
+ /**
91
+ * Longitude of the location
92
+ * @type {number}
93
+ * @memberof Location
94
+ */
95
+ longitude?: number | null;
96
+ /**
97
+ * Phone number of the location
98
+ * @type {string}
99
+ * @memberof Location
100
+ */
101
+ phone: string;
102
+ /**
103
+ * Email of the location
104
+ * @type {string}
105
+ * @memberof Location
106
+ */
107
+ email: string;
108
+ /**
109
+ * Website of the location
110
+ * @type {string}
111
+ * @memberof Location
112
+ */
113
+ website?: string;
114
+ /**
115
+ * Whether this is the default location for the customer
116
+ * @type {boolean}
117
+ * @memberof Location
118
+ */
119
+ isDefault?: boolean;
120
+ /**
121
+ * Features of the location
122
+ * @type {Array<string>}
123
+ * @memberof Location
124
+ */
125
+ features?: Array<string>;
126
+ /**
127
+ * Rating of the location
128
+ * @type {number}
129
+ * @memberof Location
130
+ */
131
+ rating?: number;
132
+ }
133
+
134
+ /**
135
+ * Check if a given object implements the Location interface.
136
+ */
137
+ export function instanceOfLocation(value: object): value is Location {
138
+ if (!('id' in value) || value['id'] === undefined) return false;
139
+ if (!('customerId' in value) || value['customerId'] === undefined) return false;
140
+ if (!('code' in value) || value['code'] === undefined) return false;
141
+ if (!('name' in value) || value['name'] === undefined) return false;
142
+ if (!('sports' in value) || value['sports'] === undefined) return false;
143
+ if (!('address' in value) || value['address'] === undefined) return false;
144
+ if (!('phone' in value) || value['phone'] === undefined) return false;
145
+ if (!('email' in value) || value['email'] === undefined) return false;
146
+ return true;
147
+ }
148
+
149
+ export function LocationFromJSON(json: any): Location {
150
+ return LocationFromJSONTyped(json, false);
151
+ }
152
+
153
+ export function LocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Location {
154
+ if (json == null) {
155
+ return json;
156
+ }
157
+ return {
158
+
159
+ 'id': json['id'],
160
+ 'customerId': json['customerId'],
161
+ 'customerName': json['customerName'] == null ? undefined : json['customerName'],
162
+ 'code': json['code'],
163
+ 'name': json['name'],
164
+ 'description': json['description'] == null ? undefined : json['description'],
165
+ 'sports': ((json['sports'] as Array<any>).map(SportFromJSON)),
166
+ 'address': json['address'],
167
+ 'addressUrl': json['addressUrl'] == null ? undefined : json['addressUrl'],
168
+ 'latitude': json['latitude'] == null ? undefined : json['latitude'],
169
+ 'longitude': json['longitude'] == null ? undefined : json['longitude'],
170
+ 'phone': json['phone'],
171
+ 'email': json['email'],
172
+ 'website': json['website'] == null ? undefined : json['website'],
173
+ 'isDefault': json['isDefault'] == null ? undefined : json['isDefault'],
174
+ 'features': json['features'] == null ? undefined : json['features'],
175
+ 'rating': json['rating'] == null ? undefined : json['rating'],
176
+ };
177
+ }
178
+
179
+ export function LocationToJSON(json: any): Location {
180
+ return LocationToJSONTyped(json, false);
181
+ }
182
+
183
+ export function LocationToJSONTyped(value?: Location | null, ignoreDiscriminator: boolean = false): any {
184
+ if (value == null) {
185
+ return value;
186
+ }
187
+
188
+ return {
189
+
190
+ 'id': value['id'],
191
+ 'customerId': value['customerId'],
192
+ 'customerName': value['customerName'],
193
+ 'code': value['code'],
194
+ 'name': value['name'],
195
+ 'description': value['description'],
196
+ 'sports': ((value['sports'] as Array<any>).map(SportToJSON)),
197
+ 'address': value['address'],
198
+ 'addressUrl': value['addressUrl'],
199
+ 'latitude': value['latitude'],
200
+ 'longitude': value['longitude'],
201
+ 'phone': value['phone'],
202
+ 'email': value['email'],
203
+ 'website': value['website'],
204
+ 'isDefault': value['isDefault'],
205
+ 'features': value['features'],
206
+ 'rating': value['rating'],
207
+ };
208
+ }
209
+