@jugarhoy/api 1.0.9 → 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.
@@ -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
+
@@ -0,0 +1,197 @@
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 { CreateClubPlaceRequest } from './CreateClubPlaceRequest';
17
+ import {
18
+ CreateClubPlaceRequestFromJSON,
19
+ CreateClubPlaceRequestFromJSONTyped,
20
+ CreateClubPlaceRequestToJSON,
21
+ CreateClubPlaceRequestToJSONTyped,
22
+ } from './CreateClubPlaceRequest';
23
+ import type { DominantSide } from './DominantSide';
24
+ import {
25
+ DominantSideFromJSON,
26
+ DominantSideFromJSONTyped,
27
+ DominantSideToJSON,
28
+ DominantSideToJSONTyped,
29
+ } from './DominantSide';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface CreatePlaySearchRequest
35
+ */
36
+ export interface CreatePlaySearchRequest {
37
+ /**
38
+ *
39
+ * @type {CreateClubPlaceRequest}
40
+ * @memberof CreatePlaySearchRequest
41
+ */
42
+ clubPlace: CreateClubPlaceRequest;
43
+ /**
44
+ *
45
+ * @type {Date}
46
+ * @memberof CreatePlaySearchRequest
47
+ */
48
+ matchDateTime: Date;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof CreatePlaySearchRequest
53
+ */
54
+ duration: CreatePlaySearchRequestDurationEnum;
55
+ /**
56
+ *
57
+ * @type {string}
58
+ * @memberof CreatePlaySearchRequest
59
+ */
60
+ gender?: string | null;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof CreatePlaySearchRequest
65
+ */
66
+ category?: string | null;
67
+ /**
68
+ *
69
+ * @type {DominantSide}
70
+ * @memberof CreatePlaySearchRequest
71
+ */
72
+ dominantSide?: DominantSide;
73
+ /**
74
+ *
75
+ * @type {number}
76
+ * @memberof CreatePlaySearchRequest
77
+ */
78
+ quota: number;
79
+ /**
80
+ *
81
+ * @type {Date}
82
+ * @memberof CreatePlaySearchRequest
83
+ */
84
+ registrationDeadline: Date;
85
+ /**
86
+ *
87
+ * @type {number}
88
+ * @memberof CreatePlaySearchRequest
89
+ */
90
+ price?: number | null;
91
+ /**
92
+ *
93
+ * @type {string}
94
+ * @memberof CreatePlaySearchRequest
95
+ */
96
+ currency?: string | null;
97
+ /**
98
+ *
99
+ * @type {string}
100
+ * @memberof CreatePlaySearchRequest
101
+ */
102
+ paymentMethod: string;
103
+ /**
104
+ *
105
+ * @type {string}
106
+ * @memberof CreatePlaySearchRequest
107
+ */
108
+ notes?: string | null;
109
+ /**
110
+ *
111
+ * @type {string}
112
+ * @memberof CreatePlaySearchRequest
113
+ */
114
+ reserveId?: string | null;
115
+ }
116
+
117
+
118
+ /**
119
+ * @export
120
+ */
121
+ export const CreatePlaySearchRequestDurationEnum = {
122
+ NUMBER_15: 15,
123
+ NUMBER_30: 30,
124
+ NUMBER_45: 45,
125
+ NUMBER_60: 60,
126
+ NUMBER_90: 90,
127
+ NUMBER_120: 120
128
+ } as const;
129
+ export type CreatePlaySearchRequestDurationEnum = typeof CreatePlaySearchRequestDurationEnum[keyof typeof CreatePlaySearchRequestDurationEnum];
130
+
131
+
132
+ /**
133
+ * Check if a given object implements the CreatePlaySearchRequest interface.
134
+ */
135
+ export function instanceOfCreatePlaySearchRequest(value: object): value is CreatePlaySearchRequest {
136
+ if (!('clubPlace' in value) || value['clubPlace'] === undefined) return false;
137
+ if (!('matchDateTime' in value) || value['matchDateTime'] === undefined) return false;
138
+ if (!('duration' in value) || value['duration'] === undefined) return false;
139
+ if (!('quota' in value) || value['quota'] === undefined) return false;
140
+ if (!('registrationDeadline' in value) || value['registrationDeadline'] === undefined) return false;
141
+ if (!('paymentMethod' in value) || value['paymentMethod'] === undefined) return false;
142
+ return true;
143
+ }
144
+
145
+ export function CreatePlaySearchRequestFromJSON(json: any): CreatePlaySearchRequest {
146
+ return CreatePlaySearchRequestFromJSONTyped(json, false);
147
+ }
148
+
149
+ export function CreatePlaySearchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePlaySearchRequest {
150
+ if (json == null) {
151
+ return json;
152
+ }
153
+ return {
154
+
155
+ 'clubPlace': CreateClubPlaceRequestFromJSON(json['clubPlace']),
156
+ 'matchDateTime': (new Date(json['matchDateTime'])),
157
+ 'duration': json['duration'],
158
+ 'gender': json['gender'] == null ? undefined : json['gender'],
159
+ 'category': json['category'] == null ? undefined : json['category'],
160
+ 'dominantSide': json['dominantSide'] == null ? undefined : DominantSideFromJSON(json['dominantSide']),
161
+ 'quota': json['quota'],
162
+ 'registrationDeadline': (new Date(json['registrationDeadline'])),
163
+ 'price': json['price'] == null ? undefined : json['price'],
164
+ 'currency': json['currency'] == null ? undefined : json['currency'],
165
+ 'paymentMethod': json['paymentMethod'],
166
+ 'notes': json['notes'] == null ? undefined : json['notes'],
167
+ 'reserveId': json['reserveId'] == null ? undefined : json['reserveId'],
168
+ };
169
+ }
170
+
171
+ export function CreatePlaySearchRequestToJSON(json: any): CreatePlaySearchRequest {
172
+ return CreatePlaySearchRequestToJSONTyped(json, false);
173
+ }
174
+
175
+ export function CreatePlaySearchRequestToJSONTyped(value?: CreatePlaySearchRequest | null, ignoreDiscriminator: boolean = false): any {
176
+ if (value == null) {
177
+ return value;
178
+ }
179
+
180
+ return {
181
+
182
+ 'clubPlace': CreateClubPlaceRequestToJSON(value['clubPlace']),
183
+ 'matchDateTime': ((value['matchDateTime']).toISOString()),
184
+ 'duration': value['duration'],
185
+ 'gender': value['gender'],
186
+ 'category': value['category'],
187
+ 'dominantSide': DominantSideToJSON(value['dominantSide']),
188
+ 'quota': value['quota'],
189
+ 'registrationDeadline': ((value['registrationDeadline']).toISOString()),
190
+ 'price': value['price'],
191
+ 'currency': value['currency'],
192
+ 'paymentMethod': value['paymentMethod'],
193
+ 'notes': value['notes'],
194
+ 'reserveId': value['reserveId'],
195
+ };
196
+ }
197
+
@@ -0,0 +1,53 @@
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
+ * Dominant hand/side of a player
18
+ * @export
19
+ */
20
+ export const DominantSide = {
21
+ Left: 'LEFT',
22
+ Right: 'RIGHT'
23
+ } as const;
24
+ export type DominantSide = typeof DominantSide[keyof typeof DominantSide];
25
+
26
+
27
+ export function instanceOfDominantSide(value: any): boolean {
28
+ for (const key in DominantSide) {
29
+ if (Object.prototype.hasOwnProperty.call(DominantSide, key)) {
30
+ if (DominantSide[key as keyof typeof DominantSide] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+
38
+ export function DominantSideFromJSON(json: any): DominantSide {
39
+ return DominantSideFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function DominantSideFromJSONTyped(json: any, ignoreDiscriminator: boolean): DominantSide {
43
+ return json as DominantSide;
44
+ }
45
+
46
+ export function DominantSideToJSON(value?: DominantSide | null): any {
47
+ return value as any;
48
+ }
49
+
50
+ export function DominantSideToJSONTyped(value: any, ignoreDiscriminator: boolean): DominantSide {
51
+ return value as DominantSide;
52
+ }
53
+
@@ -0,0 +1,159 @@
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 { RegistrationStatus } from './RegistrationStatus';
17
+ import {
18
+ RegistrationStatusFromJSON,
19
+ RegistrationStatusFromJSONTyped,
20
+ RegistrationStatusToJSON,
21
+ RegistrationStatusToJSONTyped,
22
+ } from './RegistrationStatus';
23
+ import type { PlayRegistrationType } from './PlayRegistrationType';
24
+ import {
25
+ PlayRegistrationTypeFromJSON,
26
+ PlayRegistrationTypeFromJSONTyped,
27
+ PlayRegistrationTypeToJSON,
28
+ PlayRegistrationTypeToJSONTyped,
29
+ } from './PlayRegistrationType';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface PlayRegistration
35
+ */
36
+ export interface PlayRegistration {
37
+ /**
38
+ * Unique identifier for the registration
39
+ * @type {string}
40
+ * @memberof PlayRegistration
41
+ */
42
+ id: string;
43
+ /**
44
+ * ID of the user registering
45
+ * @type {string}
46
+ * @memberof PlayRegistration
47
+ */
48
+ userId: string;
49
+ /**
50
+ *
51
+ * @type {PlayRegistrationType}
52
+ * @memberof PlayRegistration
53
+ */
54
+ type: PlayRegistrationType;
55
+ /**
56
+ * ID of the PlaySearch (if type is FALTA1)
57
+ * @type {string}
58
+ * @memberof PlayRegistration
59
+ */
60
+ playSearchId?: string | null;
61
+ /**
62
+ * ID of the PlaySubscription (if type is TOURNAMENT)
63
+ * @type {string}
64
+ * @memberof PlayRegistration
65
+ */
66
+ subscriptionId?: string | null;
67
+ /**
68
+ * ID of the Reserve (for future WEEKLY_MATCH)
69
+ * @type {string}
70
+ * @memberof PlayRegistration
71
+ */
72
+ reserveId?: string | null;
73
+ /**
74
+ *
75
+ * @type {RegistrationStatus}
76
+ * @memberof PlayRegistration
77
+ */
78
+ status: RegistrationStatus;
79
+ /**
80
+ * Queue position for auto-promotion
81
+ * @type {number}
82
+ * @memberof PlayRegistration
83
+ */
84
+ registrationOrder: number;
85
+ /**
86
+ *
87
+ * @type {Date}
88
+ * @memberof PlayRegistration
89
+ */
90
+ createdAt?: Date;
91
+ /**
92
+ *
93
+ * @type {Date}
94
+ * @memberof PlayRegistration
95
+ */
96
+ updatedAt?: Date;
97
+ }
98
+
99
+
100
+
101
+ /**
102
+ * Check if a given object implements the PlayRegistration interface.
103
+ */
104
+ export function instanceOfPlayRegistration(value: object): value is PlayRegistration {
105
+ if (!('id' in value) || value['id'] === undefined) return false;
106
+ if (!('userId' in value) || value['userId'] === undefined) return false;
107
+ if (!('type' in value) || value['type'] === undefined) return false;
108
+ if (!('status' in value) || value['status'] === undefined) return false;
109
+ if (!('registrationOrder' in value) || value['registrationOrder'] === undefined) return false;
110
+ return true;
111
+ }
112
+
113
+ export function PlayRegistrationFromJSON(json: any): PlayRegistration {
114
+ return PlayRegistrationFromJSONTyped(json, false);
115
+ }
116
+
117
+ export function PlayRegistrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlayRegistration {
118
+ if (json == null) {
119
+ return json;
120
+ }
121
+ return {
122
+
123
+ 'id': json['id'],
124
+ 'userId': json['userId'],
125
+ 'type': PlayRegistrationTypeFromJSON(json['type']),
126
+ 'playSearchId': json['playSearchId'] == null ? undefined : json['playSearchId'],
127
+ 'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
128
+ 'reserveId': json['reserveId'] == null ? undefined : json['reserveId'],
129
+ 'status': RegistrationStatusFromJSON(json['status']),
130
+ 'registrationOrder': json['registrationOrder'],
131
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
132
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
133
+ };
134
+ }
135
+
136
+ export function PlayRegistrationToJSON(json: any): PlayRegistration {
137
+ return PlayRegistrationToJSONTyped(json, false);
138
+ }
139
+
140
+ export function PlayRegistrationToJSONTyped(value?: PlayRegistration | null, ignoreDiscriminator: boolean = false): any {
141
+ if (value == null) {
142
+ return value;
143
+ }
144
+
145
+ return {
146
+
147
+ 'id': value['id'],
148
+ 'userId': value['userId'],
149
+ 'type': PlayRegistrationTypeToJSON(value['type']),
150
+ 'playSearchId': value['playSearchId'],
151
+ 'subscriptionId': value['subscriptionId'],
152
+ 'reserveId': value['reserveId'],
153
+ 'status': RegistrationStatusToJSON(value['status']),
154
+ 'registrationOrder': value['registrationOrder'],
155
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
156
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
157
+ };
158
+ }
159
+