@jugarhoy/api 1.1.26 → 1.1.27
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/AdminPaymentConfigsApi.ts +37 -0
- package/apis/AdminSubscriptionBillingApi.ts +357 -1
- package/apis/AdminSubscriptionsApi.ts +215 -0
- package/apis/AdminUsersApi.ts +69 -0
- package/apis/AppPlayRegistrationApi.ts +10 -3
- package/apis/BackgroundApi.ts +35 -0
- package/apis/ClubApi.ts +185 -0
- package/apis/ClubPlacesApi.ts +75 -0
- package/apis/TeamsApi.ts +145 -0
- package/apis/index.ts +1 -0
- package/models/ApiAdminPlayPricesPostRequest.ts +2 -3
- package/models/BankCard.ts +109 -0
- package/models/BillingSummaryItemDto.ts +120 -0
- package/models/BulkImportResult.ts +119 -0
- package/models/BulkImportRowError.ts +81 -0
- package/models/BulkMarkBillsPaid200Response.ts +81 -0
- package/models/BulkMarkBillsPaid200ResponseErrorsInner.ts +81 -0
- package/models/ClubMySubscriptionDto.ts +205 -0
- package/models/ClubPlaceRegistrationStatus.ts +91 -0
- package/models/ClubProfileDto.ts +105 -0
- package/models/ClubProfileDtoProfile.ts +227 -0
- package/models/ClubProfileNextMatchDto.ts +128 -0
- package/models/ClubSubscriptionOfferingDto.ts +148 -0
- package/models/CreateCustomerPaymentConfigDto.ts +34 -0
- package/models/CreatePlaySearchRequest.ts +16 -0
- package/models/CreateRecurringGameRequest.ts +8 -0
- package/models/CreateTeamRequest.ts +55 -0
- package/models/CustomerPaymentConfig.ts +35 -0
- package/models/CustomerPaymentConfigDto.ts +35 -0
- package/models/Frequency.ts +3 -1
- package/models/GenerateRecurringGames200Response.ts +73 -0
- package/models/GenerateSubscriptionBillsRequest.ts +14 -5
- package/models/LocationDto.ts +8 -0
- package/models/MarkBillAsPaidRequest.ts +99 -0
- package/models/MyClubClubPlace.ts +128 -0
- package/models/MyClubDefaultLocation.ts +84 -0
- package/models/MyClubDto.ts +177 -0
- package/models/PaymentMethod.ts +2 -1
- package/models/PlayPrice.ts +3 -4
- package/models/PlayRegistrationDTO.ts +15 -0
- package/models/PlayRegistrationDTOPlaySearch.ts +137 -0
- package/models/PlayRegistrationDTOPlaySearchClubPlace.ts +81 -0
- package/models/PlaySearchDTO.ts +8 -0
- package/models/PlaySearchDetailDTO.ts +8 -0
- package/models/PlaySubscription.ts +48 -0
- package/models/PlaySubscriptionCreateDto.ts +48 -0
- package/models/PlaySubscriptionListDto.ts +8 -0
- package/models/PlaySubscriptionType.ts +2 -1
- package/models/RecurringGame.ts +8 -0
- package/models/RecurringGameResponse.ts +16 -0
- package/models/RegisterClubParams.ts +16 -0
- package/models/RegisterForPlaySearchRequest.ts +73 -0
- package/models/Sport.ts +8 -0
- package/models/SubscriptionBill.ts +84 -1
- package/models/SubscriptionBillItemDto.ts +308 -0
- package/models/SubscriptionBillPageDto.ts +101 -0
- package/models/SubscriptionMemberDto.ts +134 -0
- package/models/SubscriptionMembersPageDto.ts +101 -0
- package/models/TeamFeedItemResponse.ts +8 -0
- package/models/TeamMemberResponse.ts +16 -0
- package/models/TeamPreviewResponse.ts +209 -0
- package/models/TeamPreviewResponseCoachesInner.ts +73 -0
- package/models/TeamResponse.ts +32 -0
- package/models/TeamType.ts +3 -2
- package/models/UpdateMemberPaymentConfigRequest.ts +65 -0
- package/models/UpdateRecurringGameRequest.ts +8 -0
- package/models/UpdateTeamRequest.ts +32 -0
- package/models/UploadBillReceipt200Response.ts +65 -0
- package/models/UserDto.ts +3 -4
- package/models/index.ts +28 -0
- package/package.json +1 -1
- package/runtime.ts +1 -1
package/apis/ClubApi.ts
CHANGED
|
@@ -15,7 +15,10 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ClubMySubscriptionDto,
|
|
19
|
+
ClubProfileDto,
|
|
18
20
|
ClubSearchResponse,
|
|
21
|
+
MyClubDto,
|
|
19
22
|
RegisterClub400Response,
|
|
20
23
|
RegisterClub401Response,
|
|
21
24
|
RegisterClub500Response,
|
|
@@ -26,8 +29,14 @@ import type {
|
|
|
26
29
|
Sport,
|
|
27
30
|
} from '../models/index';
|
|
28
31
|
import {
|
|
32
|
+
ClubMySubscriptionDtoFromJSON,
|
|
33
|
+
ClubMySubscriptionDtoToJSON,
|
|
34
|
+
ClubProfileDtoFromJSON,
|
|
35
|
+
ClubProfileDtoToJSON,
|
|
29
36
|
ClubSearchResponseFromJSON,
|
|
30
37
|
ClubSearchResponseToJSON,
|
|
38
|
+
MyClubDtoFromJSON,
|
|
39
|
+
MyClubDtoToJSON,
|
|
31
40
|
RegisterClub400ResponseFromJSON,
|
|
32
41
|
RegisterClub400ResponseToJSON,
|
|
33
42
|
RegisterClub401ResponseFromJSON,
|
|
@@ -46,6 +55,19 @@ import {
|
|
|
46
55
|
SportToJSON,
|
|
47
56
|
} from '../models/index';
|
|
48
57
|
|
|
58
|
+
export interface ApiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRequest {
|
|
59
|
+
clubCode: string;
|
|
60
|
+
subscriptionId: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface GetClubMySubscriptionsRequest {
|
|
64
|
+
clubCode: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface GetClubProfileRequest {
|
|
68
|
+
clubCode: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
49
71
|
export interface RegisterClubRequest {
|
|
50
72
|
registerClubParams: RegisterClubParams;
|
|
51
73
|
}
|
|
@@ -65,6 +87,169 @@ export interface SearchClubsRequest {
|
|
|
65
87
|
*/
|
|
66
88
|
export class ClubApi extends runtime.BaseAPI {
|
|
67
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Request cancellation of a subscription membership
|
|
92
|
+
*/
|
|
93
|
+
async apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRaw(requestParameters: ApiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
94
|
+
if (requestParameters['clubCode'] == null) {
|
|
95
|
+
throw new runtime.RequiredError(
|
|
96
|
+
'clubCode',
|
|
97
|
+
'Required parameter "clubCode" was null or undefined when calling apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPost().'
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
102
|
+
throw new runtime.RequiredError(
|
|
103
|
+
'subscriptionId',
|
|
104
|
+
'Required parameter "subscriptionId" was null or undefined when calling apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPost().'
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const queryParameters: any = {};
|
|
109
|
+
|
|
110
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
111
|
+
|
|
112
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
113
|
+
const token = this.configuration.accessToken;
|
|
114
|
+
const tokenString = await token("bearerAuth", []);
|
|
115
|
+
|
|
116
|
+
if (tokenString) {
|
|
117
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const response = await this.request({
|
|
121
|
+
path: `/api/club/{clubCode}/subscriptions/{subscriptionId}/request-cancellation`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))).replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
122
|
+
method: 'POST',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
|
|
127
|
+
return new runtime.VoidApiResponse(response);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Request cancellation of a subscription membership
|
|
132
|
+
*/
|
|
133
|
+
async apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPost(requestParameters: ApiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
134
|
+
await this.apiClubClubCodeSubscriptionsSubscriptionIdRequestCancellationPostRaw(requestParameters, initOverrides);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Get the authenticated user\'s active subscriptions in a club
|
|
139
|
+
*/
|
|
140
|
+
async getClubMySubscriptionsRaw(requestParameters: GetClubMySubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ClubMySubscriptionDto>>> {
|
|
141
|
+
if (requestParameters['clubCode'] == null) {
|
|
142
|
+
throw new runtime.RequiredError(
|
|
143
|
+
'clubCode',
|
|
144
|
+
'Required parameter "clubCode" was null or undefined when calling getClubMySubscriptions().'
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const queryParameters: any = {};
|
|
149
|
+
|
|
150
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
151
|
+
|
|
152
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
153
|
+
const token = this.configuration.accessToken;
|
|
154
|
+
const tokenString = await token("bearerAuth", []);
|
|
155
|
+
|
|
156
|
+
if (tokenString) {
|
|
157
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const response = await this.request({
|
|
161
|
+
path: `/api/club/{clubCode}/my-subscriptions`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))),
|
|
162
|
+
method: 'GET',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
}, initOverrides);
|
|
166
|
+
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ClubMySubscriptionDtoFromJSON));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Get the authenticated user\'s active subscriptions in a club
|
|
172
|
+
*/
|
|
173
|
+
async getClubMySubscriptions(requestParameters: GetClubMySubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ClubMySubscriptionDto>> {
|
|
174
|
+
const response = await this.getClubMySubscriptionsRaw(requestParameters, initOverrides);
|
|
175
|
+
return await response.value();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Get club profile for the authenticated user
|
|
180
|
+
*/
|
|
181
|
+
async getClubProfileRaw(requestParameters: GetClubProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClubProfileDto>> {
|
|
182
|
+
if (requestParameters['clubCode'] == null) {
|
|
183
|
+
throw new runtime.RequiredError(
|
|
184
|
+
'clubCode',
|
|
185
|
+
'Required parameter "clubCode" was null or undefined when calling getClubProfile().'
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const queryParameters: any = {};
|
|
190
|
+
|
|
191
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
192
|
+
|
|
193
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
194
|
+
const token = this.configuration.accessToken;
|
|
195
|
+
const tokenString = await token("bearerAuth", []);
|
|
196
|
+
|
|
197
|
+
if (tokenString) {
|
|
198
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const response = await this.request({
|
|
202
|
+
path: `/api/club/{clubCode}`.replace(`{${"clubCode"}}`, encodeURIComponent(String(requestParameters['clubCode']))),
|
|
203
|
+
method: 'GET',
|
|
204
|
+
headers: headerParameters,
|
|
205
|
+
query: queryParameters,
|
|
206
|
+
}, initOverrides);
|
|
207
|
+
|
|
208
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ClubProfileDtoFromJSON(jsonValue));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Get club profile for the authenticated user
|
|
213
|
+
*/
|
|
214
|
+
async getClubProfile(requestParameters: GetClubProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClubProfileDto> {
|
|
215
|
+
const response = await this.getClubProfileRaw(requestParameters, initOverrides);
|
|
216
|
+
return await response.value();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Get all clubs the authenticated user is a member of
|
|
221
|
+
*/
|
|
222
|
+
async getMyClubsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MyClubDto>>> {
|
|
223
|
+
const queryParameters: any = {};
|
|
224
|
+
|
|
225
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
226
|
+
|
|
227
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
228
|
+
const token = this.configuration.accessToken;
|
|
229
|
+
const tokenString = await token("bearerAuth", []);
|
|
230
|
+
|
|
231
|
+
if (tokenString) {
|
|
232
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const response = await this.request({
|
|
236
|
+
path: `/api/club/my-clubs`,
|
|
237
|
+
method: 'GET',
|
|
238
|
+
headers: headerParameters,
|
|
239
|
+
query: queryParameters,
|
|
240
|
+
}, initOverrides);
|
|
241
|
+
|
|
242
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MyClubDtoFromJSON));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Get all clubs the authenticated user is a member of
|
|
247
|
+
*/
|
|
248
|
+
async getMyClubs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MyClubDto>> {
|
|
249
|
+
const response = await this.getMyClubsRaw(initOverrides);
|
|
250
|
+
return await response.value();
|
|
251
|
+
}
|
|
252
|
+
|
|
68
253
|
/**
|
|
69
254
|
* Register a new club
|
|
70
255
|
*/
|
|
@@ -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
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ClubPlaceRegistrationStatus,
|
|
19
|
+
} from '../models/index';
|
|
20
|
+
import {
|
|
21
|
+
ClubPlaceRegistrationStatusFromJSON,
|
|
22
|
+
ClubPlaceRegistrationStatusToJSON,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
|
|
25
|
+
export interface GetClubPlaceByPlaceIdRequest {
|
|
26
|
+
placeId: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export class ClubPlacesApi extends runtime.BaseAPI {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Check if a Google Place is registered as a ClubPlace and if it has a verified owner
|
|
36
|
+
*/
|
|
37
|
+
async getClubPlaceByPlaceIdRaw(requestParameters: GetClubPlaceByPlaceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClubPlaceRegistrationStatus>> {
|
|
38
|
+
if (requestParameters['placeId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError(
|
|
40
|
+
'placeId',
|
|
41
|
+
'Required parameter "placeId" was null or undefined when calling getClubPlaceByPlaceId().'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const queryParameters: any = {};
|
|
46
|
+
|
|
47
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
48
|
+
|
|
49
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
50
|
+
const token = this.configuration.accessToken;
|
|
51
|
+
const tokenString = await token("bearerAuth", []);
|
|
52
|
+
|
|
53
|
+
if (tokenString) {
|
|
54
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const response = await this.request({
|
|
58
|
+
path: `/api/app/club-places/by-place-id/{placeId}`.replace(`{${"placeId"}}`, encodeURIComponent(String(requestParameters['placeId']))),
|
|
59
|
+
method: 'GET',
|
|
60
|
+
headers: headerParameters,
|
|
61
|
+
query: queryParameters,
|
|
62
|
+
}, initOverrides);
|
|
63
|
+
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ClubPlaceRegistrationStatusFromJSON(jsonValue));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Check if a Google Place is registered as a ClubPlace and if it has a verified owner
|
|
69
|
+
*/
|
|
70
|
+
async getClubPlaceByPlaceId(requestParameters: GetClubPlaceByPlaceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClubPlaceRegistrationStatus> {
|
|
71
|
+
const response = await this.getClubPlaceByPlaceIdRaw(requestParameters, initOverrides);
|
|
72
|
+
return await response.value();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
}
|
package/apis/TeamsApi.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
RegenerateTeamInviteCode200Response,
|
|
21
21
|
TeamListResponse,
|
|
22
22
|
TeamMemberResponse,
|
|
23
|
+
TeamPreviewResponse,
|
|
23
24
|
TeamResponse,
|
|
24
25
|
UpdateMemberRoleRequest,
|
|
25
26
|
UpdateTeamRequest,
|
|
@@ -35,6 +36,8 @@ import {
|
|
|
35
36
|
TeamListResponseToJSON,
|
|
36
37
|
TeamMemberResponseFromJSON,
|
|
37
38
|
TeamMemberResponseToJSON,
|
|
39
|
+
TeamPreviewResponseFromJSON,
|
|
40
|
+
TeamPreviewResponseToJSON,
|
|
38
41
|
TeamResponseFromJSON,
|
|
39
42
|
TeamResponseToJSON,
|
|
40
43
|
UpdateMemberRoleRequestFromJSON,
|
|
@@ -59,16 +62,29 @@ export interface GetTeamMembersRequest {
|
|
|
59
62
|
teamId: string;
|
|
60
63
|
}
|
|
61
64
|
|
|
65
|
+
export interface GetTeamPlaySearchesRequest {
|
|
66
|
+
teamId: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface GetTeamPreviewRequest {
|
|
70
|
+
inviteCode: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
62
73
|
export interface JoinTeamOperationRequest {
|
|
63
74
|
joinTeamRequest: JoinTeamRequest;
|
|
64
75
|
}
|
|
65
76
|
|
|
77
|
+
export interface JoinTeamAsCoachRequest {
|
|
78
|
+
joinTeamRequest: JoinTeamRequest;
|
|
79
|
+
}
|
|
80
|
+
|
|
66
81
|
export interface LeaveTeamRequest {
|
|
67
82
|
teamId: string;
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
export interface ListTeamsRequest {
|
|
71
86
|
sport?: string;
|
|
87
|
+
customerId?: string;
|
|
72
88
|
limit?: number;
|
|
73
89
|
offset?: number;
|
|
74
90
|
}
|
|
@@ -266,6 +282,87 @@ export class TeamsApi extends runtime.BaseAPI {
|
|
|
266
282
|
return await response.value();
|
|
267
283
|
}
|
|
268
284
|
|
|
285
|
+
/**
|
|
286
|
+
* List team cancha abierta play searches
|
|
287
|
+
*/
|
|
288
|
+
async getTeamPlaySearchesRaw(requestParameters: GetTeamPlaySearchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
289
|
+
if (requestParameters['teamId'] == null) {
|
|
290
|
+
throw new runtime.RequiredError(
|
|
291
|
+
'teamId',
|
|
292
|
+
'Required parameter "teamId" was null or undefined when calling getTeamPlaySearches().'
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const queryParameters: any = {};
|
|
297
|
+
|
|
298
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
299
|
+
|
|
300
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
301
|
+
const token = this.configuration.accessToken;
|
|
302
|
+
const tokenString = await token("bearerAuth", []);
|
|
303
|
+
|
|
304
|
+
if (tokenString) {
|
|
305
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const response = await this.request({
|
|
309
|
+
path: `/api/app/teams/{teamId}/play-searches`.replace(`{${"teamId"}}`, encodeURIComponent(String(requestParameters['teamId']))),
|
|
310
|
+
method: 'GET',
|
|
311
|
+
headers: headerParameters,
|
|
312
|
+
query: queryParameters,
|
|
313
|
+
}, initOverrides);
|
|
314
|
+
|
|
315
|
+
return new runtime.VoidApiResponse(response);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* List team cancha abierta play searches
|
|
320
|
+
*/
|
|
321
|
+
async getTeamPlaySearches(requestParameters: GetTeamPlaySearchesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
322
|
+
await this.getTeamPlaySearchesRaw(requestParameters, initOverrides);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Preview a team by invite code (public, no auth required)
|
|
327
|
+
*/
|
|
328
|
+
async getTeamPreviewRaw(requestParameters: GetTeamPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TeamPreviewResponse>> {
|
|
329
|
+
if (requestParameters['inviteCode'] == null) {
|
|
330
|
+
throw new runtime.RequiredError(
|
|
331
|
+
'inviteCode',
|
|
332
|
+
'Required parameter "inviteCode" was null or undefined when calling getTeamPreview().'
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const queryParameters: any = {};
|
|
337
|
+
|
|
338
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
339
|
+
|
|
340
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
341
|
+
const token = this.configuration.accessToken;
|
|
342
|
+
const tokenString = await token("bearerAuth", []);
|
|
343
|
+
|
|
344
|
+
if (tokenString) {
|
|
345
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const response = await this.request({
|
|
349
|
+
path: `/api/app/teams/preview/{inviteCode}`.replace(`{${"inviteCode"}}`, encodeURIComponent(String(requestParameters['inviteCode']))),
|
|
350
|
+
method: 'GET',
|
|
351
|
+
headers: headerParameters,
|
|
352
|
+
query: queryParameters,
|
|
353
|
+
}, initOverrides);
|
|
354
|
+
|
|
355
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamPreviewResponseFromJSON(jsonValue));
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Preview a team by invite code (public, no auth required)
|
|
360
|
+
*/
|
|
361
|
+
async getTeamPreview(requestParameters: GetTeamPreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TeamPreviewResponse> {
|
|
362
|
+
const response = await this.getTeamPreviewRaw(requestParameters, initOverrides);
|
|
363
|
+
return await response.value();
|
|
364
|
+
}
|
|
365
|
+
|
|
269
366
|
/**
|
|
270
367
|
* Join a team using invite code
|
|
271
368
|
*/
|
|
@@ -310,6 +407,50 @@ export class TeamsApi extends runtime.BaseAPI {
|
|
|
310
407
|
return await response.value();
|
|
311
408
|
}
|
|
312
409
|
|
|
410
|
+
/**
|
|
411
|
+
* Join a team as COACH using the team\'s invite code
|
|
412
|
+
*/
|
|
413
|
+
async joinTeamAsCoachRaw(requestParameters: JoinTeamAsCoachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TeamResponse>> {
|
|
414
|
+
if (requestParameters['joinTeamRequest'] == null) {
|
|
415
|
+
throw new runtime.RequiredError(
|
|
416
|
+
'joinTeamRequest',
|
|
417
|
+
'Required parameter "joinTeamRequest" was null or undefined when calling joinTeamAsCoach().'
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
const queryParameters: any = {};
|
|
422
|
+
|
|
423
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
424
|
+
|
|
425
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
426
|
+
|
|
427
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
428
|
+
const token = this.configuration.accessToken;
|
|
429
|
+
const tokenString = await token("bearerAuth", []);
|
|
430
|
+
|
|
431
|
+
if (tokenString) {
|
|
432
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
const response = await this.request({
|
|
436
|
+
path: `/api/app/teams/join-as-coach`,
|
|
437
|
+
method: 'POST',
|
|
438
|
+
headers: headerParameters,
|
|
439
|
+
query: queryParameters,
|
|
440
|
+
body: JoinTeamRequestToJSON(requestParameters['joinTeamRequest']),
|
|
441
|
+
}, initOverrides);
|
|
442
|
+
|
|
443
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TeamResponseFromJSON(jsonValue));
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Join a team as COACH using the team\'s invite code
|
|
448
|
+
*/
|
|
449
|
+
async joinTeamAsCoach(requestParameters: JoinTeamAsCoachRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TeamResponse> {
|
|
450
|
+
const response = await this.joinTeamAsCoachRaw(requestParameters, initOverrides);
|
|
451
|
+
return await response.value();
|
|
452
|
+
}
|
|
453
|
+
|
|
313
454
|
/**
|
|
314
455
|
* Leave a team
|
|
315
456
|
*/
|
|
@@ -360,6 +501,10 @@ export class TeamsApi extends runtime.BaseAPI {
|
|
|
360
501
|
queryParameters['sport'] = requestParameters['sport'];
|
|
361
502
|
}
|
|
362
503
|
|
|
504
|
+
if (requestParameters['customerId'] != null) {
|
|
505
|
+
queryParameters['customerId'] = requestParameters['customerId'];
|
|
506
|
+
}
|
|
507
|
+
|
|
363
508
|
if (requestParameters['limit'] != null) {
|
|
364
509
|
queryParameters['limit'] = requestParameters['limit'];
|
|
365
510
|
}
|
package/apis/index.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './AppPlaySearchApi';
|
|
|
22
22
|
export * from './AuthApi';
|
|
23
23
|
export * from './BackgroundApi';
|
|
24
24
|
export * from './ClubApi';
|
|
25
|
+
export * from './ClubPlacesApi';
|
|
25
26
|
export * from './CoachApi';
|
|
26
27
|
export * from './CoachPricingApi';
|
|
27
28
|
export * from './CoachWorkspaceApi';
|
|
@@ -30,7 +30,7 @@ export interface ApiAdminPlayPricesPostRequest {
|
|
|
30
30
|
* @type {number}
|
|
31
31
|
* @memberof ApiAdminPlayPricesPostRequest
|
|
32
32
|
*/
|
|
33
|
-
duration
|
|
33
|
+
duration?: number;
|
|
34
34
|
/**
|
|
35
35
|
* Price amount
|
|
36
36
|
* @type {number}
|
|
@@ -79,7 +79,6 @@ export type ApiAdminPlayPricesPostRequestChargeOnEnum = typeof ApiAdminPlayPrice
|
|
|
79
79
|
*/
|
|
80
80
|
export function instanceOfApiAdminPlayPricesPostRequest(value: object): value is ApiAdminPlayPricesPostRequest {
|
|
81
81
|
if (!('name' in value) || value['name'] === undefined) return false;
|
|
82
|
-
if (!('duration' in value) || value['duration'] === undefined) return false;
|
|
83
82
|
if (!('price' in value) || value['price'] === undefined) return false;
|
|
84
83
|
if (!('playSpotIds' in value) || value['playSpotIds'] === undefined) return false;
|
|
85
84
|
if (!('playSpotShiftIds' in value) || value['playSpotShiftIds'] === undefined) return false;
|
|
@@ -98,7 +97,7 @@ export function ApiAdminPlayPricesPostRequestFromJSONTyped(json: any, ignoreDisc
|
|
|
98
97
|
return {
|
|
99
98
|
|
|
100
99
|
'name': json['name'],
|
|
101
|
-
'duration': json['duration'],
|
|
100
|
+
'duration': json['duration'] == null ? undefined : json['duration'],
|
|
102
101
|
'price': json['price'],
|
|
103
102
|
'playSpotIds': json['playSpotIds'],
|
|
104
103
|
'playSpotShiftIds': json['playSpotShiftIds'],
|
|
@@ -0,0 +1,109 @@
|
|
|
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 BankCard
|
|
20
|
+
*/
|
|
21
|
+
export interface BankCard {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier for the bank card
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof BankCard
|
|
26
|
+
*/
|
|
27
|
+
id?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Display name of the bank card
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof BankCard
|
|
32
|
+
*/
|
|
33
|
+
name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Unique code identifier for the bank card
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof BankCard
|
|
38
|
+
*/
|
|
39
|
+
code: string;
|
|
40
|
+
/**
|
|
41
|
+
* URL to the bank card logo image
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof BankCard
|
|
44
|
+
*/
|
|
45
|
+
logoUrl?: string | null;
|
|
46
|
+
/**
|
|
47
|
+
* When this bank card was created
|
|
48
|
+
* @type {Date}
|
|
49
|
+
* @memberof BankCard
|
|
50
|
+
*/
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
/**
|
|
53
|
+
* When this bank card was last updated
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof BankCard
|
|
56
|
+
*/
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the BankCard interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfBankCard(value: object): value is BankCard {
|
|
64
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
65
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
66
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
67
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function BankCardFromJSON(json: any): BankCard {
|
|
72
|
+
return BankCardFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function BankCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): BankCard {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
82
|
+
'name': json['name'],
|
|
83
|
+
'code': json['code'],
|
|
84
|
+
'logoUrl': json['logoUrl'] == null ? undefined : json['logoUrl'],
|
|
85
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
86
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function BankCardToJSON(json: any): BankCard {
|
|
91
|
+
return BankCardToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function BankCardToJSONTyped(value?: BankCard | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'id': value['id'],
|
|
102
|
+
'name': value['name'],
|
|
103
|
+
'code': value['code'],
|
|
104
|
+
'logoUrl': value['logoUrl'],
|
|
105
|
+
'createdAt': ((value['createdAt']).toISOString()),
|
|
106
|
+
'updatedAt': ((value['updatedAt']).toISOString()),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|