@jugarhoy/api 1.0.8 → 1.0.10
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/apis/AppPlayRegistrationApi.ts +177 -0
- package/apis/AppPlaySearchApi.ts +323 -0
- package/apis/AuthApi.ts +12 -12
- package/apis/NotificationsApi.ts +167 -0
- package/apis/index.ts +3 -0
- package/models/ClubPlace.ts +184 -0
- package/models/CreateClubPlaceRequest.ts +161 -0
- package/models/CreatePlayRegistrationRequest.ts +92 -0
- package/models/CreatePlaySearchRequest.ts +197 -0
- package/models/DominantSide.ts +53 -0
- package/models/MarkNotificationAsRead200Response.ts +65 -0
- package/models/Notification.ts +147 -0
- package/models/NotificationCategory.ts +58 -0
- package/models/NotificationChannelType.ts +55 -0
- package/models/NotificationDto.ts +139 -0
- package/models/NotificationListResponseDto.ts +89 -0
- package/models/NotificationType.ts +5 -5
- package/models/PlayRegistration.ts +159 -0
- package/models/PlayRegistrationDTO.ts +151 -0
- package/models/PlayRegistrationDTOUser.ts +97 -0
- package/models/PlayRegistrationListResponse.ts +97 -0
- package/models/PlayRegistrationType.ts +55 -0
- package/models/PlaySearch.ts +252 -0
- package/models/PlaySearchDTO.ts +266 -0
- package/models/PlaySearchDTOClubPlace.ts +121 -0
- package/models/PlaySearchDetailDTO.ts +296 -0
- package/models/PlaySearchDetailDTOAllOfCounts.ts +73 -0
- package/models/PlaySearchDetailDTOAllOfRegistrations.ts +124 -0
- package/models/PlaySearchDetailDTOAllOfUser.ts +89 -0
- package/models/PlaySearchListResponse.ts +97 -0
- package/models/PlaySearchStatus.ts +56 -0
- package/models/RegistrationStatus.ts +55 -0
- package/models/SubscriptionStatus.ts +58 -0
- package/models/UnreadCountResponseDto.ts +65 -0
- package/models/{UserNotification.ts → UserNotificationConfig.ts} +27 -27
- package/models/index.ts +29 -2
- package/package.json +1 -1
- package/models/RequestPasswordReset200Response.ts +0 -65
|
@@ -0,0 +1,167 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
MarkNotificationAsRead200Response,
|
|
19
|
+
NotificationListResponseDto,
|
|
20
|
+
UnreadCountResponseDto,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
MarkNotificationAsRead200ResponseFromJSON,
|
|
24
|
+
MarkNotificationAsRead200ResponseToJSON,
|
|
25
|
+
NotificationListResponseDtoFromJSON,
|
|
26
|
+
NotificationListResponseDtoToJSON,
|
|
27
|
+
UnreadCountResponseDtoFromJSON,
|
|
28
|
+
UnreadCountResponseDtoToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ListNotificationsRequest {
|
|
32
|
+
limit?: number;
|
|
33
|
+
offset?: number;
|
|
34
|
+
unreadOnly?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface MarkNotificationAsReadRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export class NotificationsApi extends runtime.BaseAPI {
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get count of unread notifications for the current user
|
|
48
|
+
*/
|
|
49
|
+
async getUnreadNotificationsCountRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UnreadCountResponseDto>> {
|
|
50
|
+
const queryParameters: any = {};
|
|
51
|
+
|
|
52
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
53
|
+
|
|
54
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
55
|
+
const token = this.configuration.accessToken;
|
|
56
|
+
const tokenString = await token("bearerAuth", []);
|
|
57
|
+
|
|
58
|
+
if (tokenString) {
|
|
59
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const response = await this.request({
|
|
63
|
+
path: `/api/notifications/unread-count`,
|
|
64
|
+
method: 'GET',
|
|
65
|
+
headers: headerParameters,
|
|
66
|
+
query: queryParameters,
|
|
67
|
+
}, initOverrides);
|
|
68
|
+
|
|
69
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UnreadCountResponseDtoFromJSON(jsonValue));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get count of unread notifications for the current user
|
|
74
|
+
*/
|
|
75
|
+
async getUnreadNotificationsCount(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UnreadCountResponseDto> {
|
|
76
|
+
const response = await this.getUnreadNotificationsCountRaw(initOverrides);
|
|
77
|
+
return await response.value();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* List notifications for the current user
|
|
82
|
+
*/
|
|
83
|
+
async listNotificationsRaw(requestParameters: ListNotificationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<NotificationListResponseDto>> {
|
|
84
|
+
const queryParameters: any = {};
|
|
85
|
+
|
|
86
|
+
if (requestParameters['limit'] != null) {
|
|
87
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (requestParameters['offset'] != null) {
|
|
91
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (requestParameters['unreadOnly'] != null) {
|
|
95
|
+
queryParameters['unreadOnly'] = requestParameters['unreadOnly'];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
99
|
+
|
|
100
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
101
|
+
const token = this.configuration.accessToken;
|
|
102
|
+
const tokenString = await token("bearerAuth", []);
|
|
103
|
+
|
|
104
|
+
if (tokenString) {
|
|
105
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const response = await this.request({
|
|
109
|
+
path: `/api/notifications`,
|
|
110
|
+
method: 'GET',
|
|
111
|
+
headers: headerParameters,
|
|
112
|
+
query: queryParameters,
|
|
113
|
+
}, initOverrides);
|
|
114
|
+
|
|
115
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => NotificationListResponseDtoFromJSON(jsonValue));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* List notifications for the current user
|
|
120
|
+
*/
|
|
121
|
+
async listNotifications(requestParameters: ListNotificationsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<NotificationListResponseDto> {
|
|
122
|
+
const response = await this.listNotificationsRaw(requestParameters, initOverrides);
|
|
123
|
+
return await response.value();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Mark a notification as read
|
|
128
|
+
*/
|
|
129
|
+
async markNotificationAsReadRaw(requestParameters: MarkNotificationAsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkNotificationAsRead200Response>> {
|
|
130
|
+
if (requestParameters['id'] == null) {
|
|
131
|
+
throw new runtime.RequiredError(
|
|
132
|
+
'id',
|
|
133
|
+
'Required parameter "id" was null or undefined when calling markNotificationAsRead().'
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const queryParameters: any = {};
|
|
138
|
+
|
|
139
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
140
|
+
|
|
141
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
142
|
+
const token = this.configuration.accessToken;
|
|
143
|
+
const tokenString = await token("bearerAuth", []);
|
|
144
|
+
|
|
145
|
+
if (tokenString) {
|
|
146
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const response = await this.request({
|
|
150
|
+
path: `/api/notifications/{id}/read`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
151
|
+
method: 'PUT',
|
|
152
|
+
headers: headerParameters,
|
|
153
|
+
query: queryParameters,
|
|
154
|
+
}, initOverrides);
|
|
155
|
+
|
|
156
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkNotificationAsRead200ResponseFromJSON(jsonValue));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Mark a notification as read
|
|
161
|
+
*/
|
|
162
|
+
async markNotificationAsRead(requestParameters: MarkNotificationAsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkNotificationAsRead200Response> {
|
|
163
|
+
const response = await this.markNotificationAsReadRaw(requestParameters, initOverrides);
|
|
164
|
+
return await response.value();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
package/apis/index.ts
CHANGED
|
@@ -17,6 +17,8 @@ export * from './AdminSubscriptionBillingApi';
|
|
|
17
17
|
export * from './AdminSubscriptionsApi';
|
|
18
18
|
export * from './AdminUsersApi';
|
|
19
19
|
export * from './AdminWhatsAppTemplatesApi';
|
|
20
|
+
export * from './AppPlayRegistrationApi';
|
|
21
|
+
export * from './AppPlaySearchApi';
|
|
20
22
|
export * from './AuthApi';
|
|
21
23
|
export * from './BackgroundApi';
|
|
22
24
|
export * from './ClubApi';
|
|
@@ -24,6 +26,7 @@ export * from './DevicesApi';
|
|
|
24
26
|
export * from './HealthApi';
|
|
25
27
|
export * from './MercadoPagoApi';
|
|
26
28
|
export * from './MercadoPagoIPNApi';
|
|
29
|
+
export * from './NotificationsApi';
|
|
27
30
|
export * from './PlaySpotsApi';
|
|
28
31
|
export * from './ReservesApi';
|
|
29
32
|
export * from './UsersApi';
|
|
@@ -0,0 +1,184 @@
|
|
|
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 ClubPlace
|
|
28
|
+
*/
|
|
29
|
+
export interface ClubPlace {
|
|
30
|
+
/**
|
|
31
|
+
* Unique identifier
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ClubPlace
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Google Maps Place ID
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ClubPlace
|
|
40
|
+
*/
|
|
41
|
+
placeId: string;
|
|
42
|
+
/**
|
|
43
|
+
* Array of sports available at this club
|
|
44
|
+
* @type {Array<Sport>}
|
|
45
|
+
* @memberof ClubPlace
|
|
46
|
+
*/
|
|
47
|
+
sports: Array<Sport>;
|
|
48
|
+
/**
|
|
49
|
+
* Name of the club/place
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ClubPlace
|
|
52
|
+
*/
|
|
53
|
+
name: string;
|
|
54
|
+
/**
|
|
55
|
+
* Formatted address from Google Maps
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ClubPlace
|
|
58
|
+
*/
|
|
59
|
+
address: string;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof ClubPlace
|
|
64
|
+
*/
|
|
65
|
+
latitude: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof ClubPlace
|
|
70
|
+
*/
|
|
71
|
+
longitude: number;
|
|
72
|
+
/**
|
|
73
|
+
* Phone number from Google Maps
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof ClubPlace
|
|
76
|
+
*/
|
|
77
|
+
phone?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Website from Google Maps
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof ClubPlace
|
|
82
|
+
*/
|
|
83
|
+
website?: string | null;
|
|
84
|
+
/**
|
|
85
|
+
* Google Places types (e.g., ["gym", "establishment"])
|
|
86
|
+
* @type {Array<string>}
|
|
87
|
+
* @memberof ClubPlace
|
|
88
|
+
*/
|
|
89
|
+
types?: Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
* Google Maps rating
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof ClubPlace
|
|
94
|
+
*/
|
|
95
|
+
rating?: number | null;
|
|
96
|
+
/**
|
|
97
|
+
* Photo URLs from Google Maps
|
|
98
|
+
* @type {Array<string>}
|
|
99
|
+
* @memberof ClubPlace
|
|
100
|
+
*/
|
|
101
|
+
photoUrls?: Array<string>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof ClubPlace
|
|
106
|
+
*/
|
|
107
|
+
createdAt?: Date;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {Date}
|
|
111
|
+
* @memberof ClubPlace
|
|
112
|
+
*/
|
|
113
|
+
updatedAt?: Date;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Check if a given object implements the ClubPlace interface.
|
|
118
|
+
*/
|
|
119
|
+
export function instanceOfClubPlace(value: object): value is ClubPlace {
|
|
120
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
121
|
+
if (!('placeId' in value) || value['placeId'] === undefined) return false;
|
|
122
|
+
if (!('sports' in value) || value['sports'] === undefined) return false;
|
|
123
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
124
|
+
if (!('address' in value) || value['address'] === undefined) return false;
|
|
125
|
+
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
126
|
+
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function ClubPlaceFromJSON(json: any): ClubPlace {
|
|
131
|
+
return ClubPlaceFromJSONTyped(json, false);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function ClubPlaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClubPlace {
|
|
135
|
+
if (json == null) {
|
|
136
|
+
return json;
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
|
|
140
|
+
'id': json['id'],
|
|
141
|
+
'placeId': json['placeId'],
|
|
142
|
+
'sports': ((json['sports'] as Array<any>).map(SportFromJSON)),
|
|
143
|
+
'name': json['name'],
|
|
144
|
+
'address': json['address'],
|
|
145
|
+
'latitude': json['latitude'],
|
|
146
|
+
'longitude': json['longitude'],
|
|
147
|
+
'phone': json['phone'] == null ? undefined : json['phone'],
|
|
148
|
+
'website': json['website'] == null ? undefined : json['website'],
|
|
149
|
+
'types': json['types'] == null ? undefined : json['types'],
|
|
150
|
+
'rating': json['rating'] == null ? undefined : json['rating'],
|
|
151
|
+
'photoUrls': json['photoUrls'] == null ? undefined : json['photoUrls'],
|
|
152
|
+
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
153
|
+
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function ClubPlaceToJSON(json: any): ClubPlace {
|
|
158
|
+
return ClubPlaceToJSONTyped(json, false);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function ClubPlaceToJSONTyped(value?: ClubPlace | null, ignoreDiscriminator: boolean = false): any {
|
|
162
|
+
if (value == null) {
|
|
163
|
+
return value;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
|
|
168
|
+
'id': value['id'],
|
|
169
|
+
'placeId': value['placeId'],
|
|
170
|
+
'sports': ((value['sports'] as Array<any>).map(SportToJSON)),
|
|
171
|
+
'name': value['name'],
|
|
172
|
+
'address': value['address'],
|
|
173
|
+
'latitude': value['latitude'],
|
|
174
|
+
'longitude': value['longitude'],
|
|
175
|
+
'phone': value['phone'],
|
|
176
|
+
'website': value['website'],
|
|
177
|
+
'types': value['types'],
|
|
178
|
+
'rating': value['rating'],
|
|
179
|
+
'photoUrls': value['photoUrls'],
|
|
180
|
+
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
|
181
|
+
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
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 CreateClubPlaceRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateClubPlaceRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Google Maps Place ID
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateClubPlaceRequest
|
|
34
|
+
*/
|
|
35
|
+
placeId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Sport}
|
|
39
|
+
* @memberof CreateClubPlaceRequest
|
|
40
|
+
*/
|
|
41
|
+
sport: Sport;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateClubPlaceRequest
|
|
46
|
+
*/
|
|
47
|
+
name: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof CreateClubPlaceRequest
|
|
52
|
+
*/
|
|
53
|
+
address: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof CreateClubPlaceRequest
|
|
58
|
+
*/
|
|
59
|
+
latitude: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof CreateClubPlaceRequest
|
|
64
|
+
*/
|
|
65
|
+
longitude: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof CreateClubPlaceRequest
|
|
70
|
+
*/
|
|
71
|
+
phone?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof CreateClubPlaceRequest
|
|
76
|
+
*/
|
|
77
|
+
website?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @type {Array<string>}
|
|
81
|
+
* @memberof CreateClubPlaceRequest
|
|
82
|
+
*/
|
|
83
|
+
types?: Array<string>;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof CreateClubPlaceRequest
|
|
88
|
+
*/
|
|
89
|
+
rating?: number | null;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {Array<string>}
|
|
93
|
+
* @memberof CreateClubPlaceRequest
|
|
94
|
+
*/
|
|
95
|
+
photoUrls?: Array<string>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Check if a given object implements the CreateClubPlaceRequest interface.
|
|
102
|
+
*/
|
|
103
|
+
export function instanceOfCreateClubPlaceRequest(value: object): value is CreateClubPlaceRequest {
|
|
104
|
+
if (!('placeId' in value) || value['placeId'] === undefined) return false;
|
|
105
|
+
if (!('sport' in value) || value['sport'] === undefined) return false;
|
|
106
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
107
|
+
if (!('address' in value) || value['address'] === undefined) return false;
|
|
108
|
+
if (!('latitude' in value) || value['latitude'] === undefined) return false;
|
|
109
|
+
if (!('longitude' in value) || value['longitude'] === undefined) return false;
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function CreateClubPlaceRequestFromJSON(json: any): CreateClubPlaceRequest {
|
|
114
|
+
return CreateClubPlaceRequestFromJSONTyped(json, false);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function CreateClubPlaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateClubPlaceRequest {
|
|
118
|
+
if (json == null) {
|
|
119
|
+
return json;
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'placeId': json['placeId'],
|
|
124
|
+
'sport': SportFromJSON(json['sport']),
|
|
125
|
+
'name': json['name'],
|
|
126
|
+
'address': json['address'],
|
|
127
|
+
'latitude': json['latitude'],
|
|
128
|
+
'longitude': json['longitude'],
|
|
129
|
+
'phone': json['phone'] == null ? undefined : json['phone'],
|
|
130
|
+
'website': json['website'] == null ? undefined : json['website'],
|
|
131
|
+
'types': json['types'] == null ? undefined : json['types'],
|
|
132
|
+
'rating': json['rating'] == null ? undefined : json['rating'],
|
|
133
|
+
'photoUrls': json['photoUrls'] == null ? undefined : json['photoUrls'],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function CreateClubPlaceRequestToJSON(json: any): CreateClubPlaceRequest {
|
|
138
|
+
return CreateClubPlaceRequestToJSONTyped(json, false);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function CreateClubPlaceRequestToJSONTyped(value?: CreateClubPlaceRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
142
|
+
if (value == null) {
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return {
|
|
147
|
+
|
|
148
|
+
'placeId': value['placeId'],
|
|
149
|
+
'sport': SportToJSON(value['sport']),
|
|
150
|
+
'name': value['name'],
|
|
151
|
+
'address': value['address'],
|
|
152
|
+
'latitude': value['latitude'],
|
|
153
|
+
'longitude': value['longitude'],
|
|
154
|
+
'phone': value['phone'],
|
|
155
|
+
'website': value['website'],
|
|
156
|
+
'types': value['types'],
|
|
157
|
+
'rating': value['rating'],
|
|
158
|
+
'photoUrls': value['photoUrls'],
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { PlayRegistrationType } from './PlayRegistrationType';
|
|
17
|
+
import {
|
|
18
|
+
PlayRegistrationTypeFromJSON,
|
|
19
|
+
PlayRegistrationTypeFromJSONTyped,
|
|
20
|
+
PlayRegistrationTypeToJSON,
|
|
21
|
+
PlayRegistrationTypeToJSONTyped,
|
|
22
|
+
} from './PlayRegistrationType';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreatePlayRegistrationRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreatePlayRegistrationRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {PlayRegistrationType}
|
|
33
|
+
* @memberof CreatePlayRegistrationRequest
|
|
34
|
+
*/
|
|
35
|
+
type: PlayRegistrationType;
|
|
36
|
+
/**
|
|
37
|
+
* Required if type is FALTA1
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreatePlayRegistrationRequest
|
|
40
|
+
*/
|
|
41
|
+
playSearchId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Required if type is TOURNAMENT
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreatePlayRegistrationRequest
|
|
46
|
+
*/
|
|
47
|
+
subscriptionId?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the CreatePlayRegistrationRequest interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfCreatePlayRegistrationRequest(value: object): value is CreatePlayRegistrationRequest {
|
|
56
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function CreatePlayRegistrationRequestFromJSON(json: any): CreatePlayRegistrationRequest {
|
|
61
|
+
return CreatePlayRegistrationRequestFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function CreatePlayRegistrationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlayRegistrationRequest {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'type': PlayRegistrationTypeFromJSON(json['type']),
|
|
71
|
+
'playSearchId': json['playSearchId'] == null ? undefined : json['playSearchId'],
|
|
72
|
+
'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function CreatePlayRegistrationRequestToJSON(json: any): CreatePlayRegistrationRequest {
|
|
77
|
+
return CreatePlayRegistrationRequestToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function CreatePlayRegistrationRequestToJSONTyped(value?: CreatePlayRegistrationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'type': PlayRegistrationTypeToJSON(value['type']),
|
|
88
|
+
'playSearchId': value['playSearchId'],
|
|
89
|
+
'subscriptionId': value['subscriptionId'],
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|