@jugarhoy/api 1.1.33 → 1.1.34
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/CoachApi.ts +1199 -42
- package/apis/CoachWorkspaceApi.ts +93 -0
- package/apis/MyActivitiesApi.ts +72 -0
- package/apis/PlayerCoachBookingApi.ts +92 -7
- package/apis/PublicCoachDiscoveryApi.ts +292 -0
- package/apis/SubscriptionsApi.ts +64 -0
- package/apis/index.ts +3 -0
- package/models/AddCoachSubscriptionMemberRequest.ts +97 -0
- package/models/AddShiftWithLocationDto.ts +231 -0
- package/models/AgendaSlotDto.ts +142 -0
- package/models/CoachClassDetailDto.ts +88 -0
- package/models/CoachClassFilters.ts +3 -3
- package/models/CoachClassLocationDto.ts +89 -0
- package/models/CoachLocationRegistrationDto.ts +149 -0
- package/models/CoachPaymentsDto.ts +81 -0
- package/models/CoachProfileDto.ts +104 -0
- package/models/CoachPublicSubscriptionDto.ts +183 -0
- package/models/CoachSearchParams.ts +42 -2
- package/models/CoachShiftInputDto.ts +170 -0
- package/models/CoachShiftRegistrationDto.ts +176 -0
- package/models/CoachTeamPlayerDto.ts +97 -0
- package/models/CoachTrainingTeamDto.ts +121 -0
- package/models/CoachWorkspaceLocationDto.ts +137 -0
- package/models/CoachWorkspaceProfileDto.ts +225 -0
- package/models/CoachWorkspaceShiftDto.ts +201 -0
- package/models/CreatePreReservationDto.ts +110 -0
- package/models/CreateRecurringGameRequest.ts +27 -0
- package/models/DayAgendaDto.ts +89 -0
- package/models/GenerateCoachSubscriptionBillsRequest.ts +74 -0
- package/models/GetCoachMercadoPagoAuthUrl200Response.ts +65 -0
- package/models/GetCoachSubscriptionMemberDebt200ResponseInner.ts +81 -0
- package/models/LinkCoachMercadoPagoRequest.ts +66 -0
- package/models/LinkPreview.ts +97 -0
- package/models/LinkShiftToTeamRequest.ts +65 -0
- package/models/MarkCoachSubscriptionBillPaid200Response.ts +65 -0
- package/models/PlaySubscription.ts +8 -0
- package/models/PublicAgendaSlotDto.ts +102 -0
- package/models/PublicDayAgendaDto.ts +92 -0
- package/models/PublicWeeklyAgendaDto.ts +83 -0
- package/models/RecurringGame.ts +27 -0
- package/models/RecurringGameResponse.ts +29 -0
- package/models/RegisterCoachProfileDto.ts +213 -0
- package/models/RegisterCoachProfileResponseDto.ts +89 -0
- package/models/ReserveStatus.ts +1 -0
- package/models/SubscriptionRequestResponseDto.ts +96 -0
- package/models/TeamResponse.ts +16 -0
- package/models/TrainingSubscriptionDto.ts +167 -0
- package/models/UpcomingActivityDto.ts +217 -0
- package/models/UpdateCoachProfileDto.ts +161 -0
- package/models/UpdateRecurringGameRequest.ts +27 -0
- package/models/UserDto.ts +31 -0
- package/models/UserReserveDto.ts +41 -0
- package/models/WeeklyAgendaDto.ts +81 -0
- package/models/index.ts +34 -0
- package/package.json +1 -1
package/apis/CoachApi.ts
CHANGED
|
@@ -18,12 +18,34 @@ import type {
|
|
|
18
18
|
ActivateCoachProfileRequest,
|
|
19
19
|
AddCoachLocation200Response,
|
|
20
20
|
AddCoachLocationRequest,
|
|
21
|
+
AddCoachSubscriptionMemberRequest,
|
|
22
|
+
AddShiftWithLocationDto,
|
|
23
|
+
BillingSummaryItemDto,
|
|
24
|
+
CoachPaymentsDto,
|
|
25
|
+
CoachShiftInputDto,
|
|
26
|
+
CoachTeamPlayerDto,
|
|
27
|
+
CoachTrainingTeamDto,
|
|
28
|
+
CoachWorkspaceProfileDto,
|
|
29
|
+
CreatePreReservationDto,
|
|
21
30
|
Customer,
|
|
22
31
|
DefineCoachScheduleRequest,
|
|
32
|
+
DeleteShift200Response,
|
|
33
|
+
GenerateCoachSubscriptionBillsRequest,
|
|
34
|
+
GetCoachMercadoPagoAuthUrl200Response,
|
|
35
|
+
GetCoachSubscriptionMemberDebt200ResponseInner,
|
|
36
|
+
LinkCoachMercadoPagoRequest,
|
|
37
|
+
LinkShiftToTeamRequest,
|
|
23
38
|
Location,
|
|
39
|
+
MarkCoachSubscriptionBillPaid200Response,
|
|
24
40
|
PlaySpotShift,
|
|
41
|
+
RegisterCoachProfileDto,
|
|
42
|
+
RegisterCoachProfileResponseDto,
|
|
43
|
+
Reserve,
|
|
25
44
|
SaveCoachBasicInfoRequest,
|
|
45
|
+
SubscriptionBill,
|
|
46
|
+
UpdateCoachProfileDto,
|
|
26
47
|
UserCoachProfile,
|
|
48
|
+
WeeklyAgendaDto,
|
|
27
49
|
} from '../models/index';
|
|
28
50
|
import {
|
|
29
51
|
ActivateCoachProfileRequestFromJSON,
|
|
@@ -32,18 +54,62 @@ import {
|
|
|
32
54
|
AddCoachLocation200ResponseToJSON,
|
|
33
55
|
AddCoachLocationRequestFromJSON,
|
|
34
56
|
AddCoachLocationRequestToJSON,
|
|
57
|
+
AddCoachSubscriptionMemberRequestFromJSON,
|
|
58
|
+
AddCoachSubscriptionMemberRequestToJSON,
|
|
59
|
+
AddShiftWithLocationDtoFromJSON,
|
|
60
|
+
AddShiftWithLocationDtoToJSON,
|
|
61
|
+
BillingSummaryItemDtoFromJSON,
|
|
62
|
+
BillingSummaryItemDtoToJSON,
|
|
63
|
+
CoachPaymentsDtoFromJSON,
|
|
64
|
+
CoachPaymentsDtoToJSON,
|
|
65
|
+
CoachShiftInputDtoFromJSON,
|
|
66
|
+
CoachShiftInputDtoToJSON,
|
|
67
|
+
CoachTeamPlayerDtoFromJSON,
|
|
68
|
+
CoachTeamPlayerDtoToJSON,
|
|
69
|
+
CoachTrainingTeamDtoFromJSON,
|
|
70
|
+
CoachTrainingTeamDtoToJSON,
|
|
71
|
+
CoachWorkspaceProfileDtoFromJSON,
|
|
72
|
+
CoachWorkspaceProfileDtoToJSON,
|
|
73
|
+
CreatePreReservationDtoFromJSON,
|
|
74
|
+
CreatePreReservationDtoToJSON,
|
|
35
75
|
CustomerFromJSON,
|
|
36
76
|
CustomerToJSON,
|
|
37
77
|
DefineCoachScheduleRequestFromJSON,
|
|
38
78
|
DefineCoachScheduleRequestToJSON,
|
|
79
|
+
DeleteShift200ResponseFromJSON,
|
|
80
|
+
DeleteShift200ResponseToJSON,
|
|
81
|
+
GenerateCoachSubscriptionBillsRequestFromJSON,
|
|
82
|
+
GenerateCoachSubscriptionBillsRequestToJSON,
|
|
83
|
+
GetCoachMercadoPagoAuthUrl200ResponseFromJSON,
|
|
84
|
+
GetCoachMercadoPagoAuthUrl200ResponseToJSON,
|
|
85
|
+
GetCoachSubscriptionMemberDebt200ResponseInnerFromJSON,
|
|
86
|
+
GetCoachSubscriptionMemberDebt200ResponseInnerToJSON,
|
|
87
|
+
LinkCoachMercadoPagoRequestFromJSON,
|
|
88
|
+
LinkCoachMercadoPagoRequestToJSON,
|
|
89
|
+
LinkShiftToTeamRequestFromJSON,
|
|
90
|
+
LinkShiftToTeamRequestToJSON,
|
|
39
91
|
LocationFromJSON,
|
|
40
92
|
LocationToJSON,
|
|
93
|
+
MarkCoachSubscriptionBillPaid200ResponseFromJSON,
|
|
94
|
+
MarkCoachSubscriptionBillPaid200ResponseToJSON,
|
|
41
95
|
PlaySpotShiftFromJSON,
|
|
42
96
|
PlaySpotShiftToJSON,
|
|
97
|
+
RegisterCoachProfileDtoFromJSON,
|
|
98
|
+
RegisterCoachProfileDtoToJSON,
|
|
99
|
+
RegisterCoachProfileResponseDtoFromJSON,
|
|
100
|
+
RegisterCoachProfileResponseDtoToJSON,
|
|
101
|
+
ReserveFromJSON,
|
|
102
|
+
ReserveToJSON,
|
|
43
103
|
SaveCoachBasicInfoRequestFromJSON,
|
|
44
104
|
SaveCoachBasicInfoRequestToJSON,
|
|
105
|
+
SubscriptionBillFromJSON,
|
|
106
|
+
SubscriptionBillToJSON,
|
|
107
|
+
UpdateCoachProfileDtoFromJSON,
|
|
108
|
+
UpdateCoachProfileDtoToJSON,
|
|
45
109
|
UserCoachProfileFromJSON,
|
|
46
110
|
UserCoachProfileToJSON,
|
|
111
|
+
WeeklyAgendaDtoFromJSON,
|
|
112
|
+
WeeklyAgendaDtoToJSON,
|
|
47
113
|
} from '../models/index';
|
|
48
114
|
|
|
49
115
|
export interface ActivateCoachProfileOperationRequest {
|
|
@@ -54,14 +120,90 @@ export interface AddCoachLocationOperationRequest {
|
|
|
54
120
|
addCoachLocationRequest: AddCoachLocationRequest;
|
|
55
121
|
}
|
|
56
122
|
|
|
123
|
+
export interface AddCoachSubscriptionMemberOperationRequest {
|
|
124
|
+
subscriptionId: string;
|
|
125
|
+
addCoachSubscriptionMemberRequest: AddCoachSubscriptionMemberRequest;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface AddShiftToLocationRequest {
|
|
129
|
+
locationId: string;
|
|
130
|
+
coachShiftInputDto: CoachShiftInputDto;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface AddShiftWithLocationRequest {
|
|
134
|
+
addShiftWithLocationDto: AddShiftWithLocationDto;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface CreatePreReservationRequest {
|
|
138
|
+
createPreReservationDto: CreatePreReservationDto;
|
|
139
|
+
}
|
|
140
|
+
|
|
57
141
|
export interface DefineCoachScheduleOperationRequest {
|
|
58
142
|
defineCoachScheduleRequest: DefineCoachScheduleRequest;
|
|
59
143
|
}
|
|
60
144
|
|
|
145
|
+
export interface DeleteCoachShiftRequest {
|
|
146
|
+
shiftId: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface GenerateCoachSubscriptionBillsOperationRequest {
|
|
150
|
+
subscriptionId: string;
|
|
151
|
+
generateCoachSubscriptionBillsRequest: GenerateCoachSubscriptionBillsRequest;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface GetCoachSubscriptionBillingSummaryRequest {
|
|
155
|
+
subscriptionId: string;
|
|
156
|
+
billingYear?: number;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface GetCoachSubscriptionMemberDebtRequest {
|
|
160
|
+
subscriptionId: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface GetCoachSubscriptionMembersRequest {
|
|
164
|
+
subscriptionId: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface GetWeeklyAgendaRequest {
|
|
168
|
+
weekStart: Date;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface LinkCoachMercadoPagoOperationRequest {
|
|
172
|
+
linkCoachMercadoPagoRequest: LinkCoachMercadoPagoRequest;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface LinkShiftToTeamOperationRequest {
|
|
176
|
+
shiftId: string;
|
|
177
|
+
linkShiftToTeamRequest: LinkShiftToTeamRequest;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface MarkCoachSubscriptionBillPaidRequest {
|
|
181
|
+
subscriptionId: string;
|
|
182
|
+
memberId: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface RegisterCoachProfileRequest {
|
|
186
|
+
registerCoachProfileDto: RegisterCoachProfileDto;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface RemoveSubscriptionMemberRequest {
|
|
190
|
+
subscriptionId: string;
|
|
191
|
+
memberId: string;
|
|
192
|
+
}
|
|
193
|
+
|
|
61
194
|
export interface SaveCoachBasicInfoOperationRequest {
|
|
62
195
|
saveCoachBasicInfoRequest: SaveCoachBasicInfoRequest;
|
|
63
196
|
}
|
|
64
197
|
|
|
198
|
+
export interface UpdateCoachProfileRequest {
|
|
199
|
+
updateCoachProfileDto: UpdateCoachProfileDto;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface UpdateCoachShiftRequest {
|
|
203
|
+
shiftId: string;
|
|
204
|
+
coachShiftInputDto: CoachShiftInputDto;
|
|
205
|
+
}
|
|
206
|
+
|
|
65
207
|
/**
|
|
66
208
|
*
|
|
67
209
|
*/
|
|
@@ -157,6 +299,193 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
157
299
|
return await response.value();
|
|
158
300
|
}
|
|
159
301
|
|
|
302
|
+
/**
|
|
303
|
+
* Add a member to a coach subscription
|
|
304
|
+
*/
|
|
305
|
+
async addCoachSubscriptionMemberRaw(requestParameters: AddCoachSubscriptionMemberOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
306
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
307
|
+
throw new runtime.RequiredError(
|
|
308
|
+
'subscriptionId',
|
|
309
|
+
'Required parameter "subscriptionId" was null or undefined when calling addCoachSubscriptionMember().'
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
if (requestParameters['addCoachSubscriptionMemberRequest'] == null) {
|
|
314
|
+
throw new runtime.RequiredError(
|
|
315
|
+
'addCoachSubscriptionMemberRequest',
|
|
316
|
+
'Required parameter "addCoachSubscriptionMemberRequest" was null or undefined when calling addCoachSubscriptionMember().'
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const queryParameters: any = {};
|
|
321
|
+
|
|
322
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
323
|
+
|
|
324
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
325
|
+
|
|
326
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
327
|
+
const token = this.configuration.accessToken;
|
|
328
|
+
const tokenString = await token("bearerAuth", []);
|
|
329
|
+
|
|
330
|
+
if (tokenString) {
|
|
331
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const response = await this.request({
|
|
335
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/members`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
336
|
+
method: 'POST',
|
|
337
|
+
headers: headerParameters,
|
|
338
|
+
query: queryParameters,
|
|
339
|
+
body: AddCoachSubscriptionMemberRequestToJSON(requestParameters['addCoachSubscriptionMemberRequest']),
|
|
340
|
+
}, initOverrides);
|
|
341
|
+
|
|
342
|
+
return new runtime.VoidApiResponse(response);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Add a member to a coach subscription
|
|
347
|
+
*/
|
|
348
|
+
async addCoachSubscriptionMember(requestParameters: AddCoachSubscriptionMemberOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
349
|
+
await this.addCoachSubscriptionMemberRaw(requestParameters, initOverrides);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Add a new shift to a coach location
|
|
354
|
+
*/
|
|
355
|
+
async addShiftToLocationRaw(requestParameters: AddShiftToLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
356
|
+
if (requestParameters['locationId'] == null) {
|
|
357
|
+
throw new runtime.RequiredError(
|
|
358
|
+
'locationId',
|
|
359
|
+
'Required parameter "locationId" was null or undefined when calling addShiftToLocation().'
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (requestParameters['coachShiftInputDto'] == null) {
|
|
364
|
+
throw new runtime.RequiredError(
|
|
365
|
+
'coachShiftInputDto',
|
|
366
|
+
'Required parameter "coachShiftInputDto" was null or undefined when calling addShiftToLocation().'
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const queryParameters: any = {};
|
|
371
|
+
|
|
372
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
373
|
+
|
|
374
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
375
|
+
|
|
376
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
377
|
+
const token = this.configuration.accessToken;
|
|
378
|
+
const tokenString = await token("bearerAuth", []);
|
|
379
|
+
|
|
380
|
+
if (tokenString) {
|
|
381
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const response = await this.request({
|
|
385
|
+
path: `/api/app/coach/workspace/locations/{locationId}/shifts`.replace(`{${"locationId"}}`, encodeURIComponent(String(requestParameters['locationId']))),
|
|
386
|
+
method: 'POST',
|
|
387
|
+
headers: headerParameters,
|
|
388
|
+
query: queryParameters,
|
|
389
|
+
body: CoachShiftInputDtoToJSON(requestParameters['coachShiftInputDto']),
|
|
390
|
+
}, initOverrides);
|
|
391
|
+
|
|
392
|
+
return new runtime.VoidApiResponse(response);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Add a new shift to a coach location
|
|
397
|
+
*/
|
|
398
|
+
async addShiftToLocation(requestParameters: AddShiftToLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
399
|
+
await this.addShiftToLocationRaw(requestParameters, initOverrides);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Add a shift, creating the location if it doesn\'t exist
|
|
404
|
+
*/
|
|
405
|
+
async addShiftWithLocationRaw(requestParameters: AddShiftWithLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
406
|
+
if (requestParameters['addShiftWithLocationDto'] == null) {
|
|
407
|
+
throw new runtime.RequiredError(
|
|
408
|
+
'addShiftWithLocationDto',
|
|
409
|
+
'Required parameter "addShiftWithLocationDto" was null or undefined when calling addShiftWithLocation().'
|
|
410
|
+
);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
const queryParameters: any = {};
|
|
414
|
+
|
|
415
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
416
|
+
|
|
417
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
418
|
+
|
|
419
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
420
|
+
const token = this.configuration.accessToken;
|
|
421
|
+
const tokenString = await token("bearerAuth", []);
|
|
422
|
+
|
|
423
|
+
if (tokenString) {
|
|
424
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
const response = await this.request({
|
|
428
|
+
path: `/api/app/coach/workspace/shifts`,
|
|
429
|
+
method: 'POST',
|
|
430
|
+
headers: headerParameters,
|
|
431
|
+
query: queryParameters,
|
|
432
|
+
body: AddShiftWithLocationDtoToJSON(requestParameters['addShiftWithLocationDto']),
|
|
433
|
+
}, initOverrides);
|
|
434
|
+
|
|
435
|
+
return new runtime.VoidApiResponse(response);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Add a shift, creating the location if it doesn\'t exist
|
|
440
|
+
*/
|
|
441
|
+
async addShiftWithLocation(requestParameters: AddShiftWithLocationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
442
|
+
await this.addShiftWithLocationRaw(requestParameters, initOverrides);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Create a coach-initiated pre-reservation for a player
|
|
447
|
+
*/
|
|
448
|
+
async createPreReservationRaw(requestParameters: CreatePreReservationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Reserve>>> {
|
|
449
|
+
if (requestParameters['createPreReservationDto'] == null) {
|
|
450
|
+
throw new runtime.RequiredError(
|
|
451
|
+
'createPreReservationDto',
|
|
452
|
+
'Required parameter "createPreReservationDto" was null or undefined when calling createPreReservation().'
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
const queryParameters: any = {};
|
|
457
|
+
|
|
458
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
459
|
+
|
|
460
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
461
|
+
|
|
462
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
463
|
+
const token = this.configuration.accessToken;
|
|
464
|
+
const tokenString = await token("bearerAuth", []);
|
|
465
|
+
|
|
466
|
+
if (tokenString) {
|
|
467
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
const response = await this.request({
|
|
471
|
+
path: `/api/app/coach/workspace/prereservation`,
|
|
472
|
+
method: 'POST',
|
|
473
|
+
headers: headerParameters,
|
|
474
|
+
query: queryParameters,
|
|
475
|
+
body: CreatePreReservationDtoToJSON(requestParameters['createPreReservationDto']),
|
|
476
|
+
}, initOverrides);
|
|
477
|
+
|
|
478
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ReserveFromJSON));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Create a coach-initiated pre-reservation for a player
|
|
483
|
+
*/
|
|
484
|
+
async createPreReservation(requestParameters: CreatePreReservationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Reserve>> {
|
|
485
|
+
const response = await this.createPreReservationRaw(requestParameters, initOverrides);
|
|
486
|
+
return await response.value();
|
|
487
|
+
}
|
|
488
|
+
|
|
160
489
|
/**
|
|
161
490
|
* Define coach availability schedule (Step 3 of wizard)
|
|
162
491
|
*/
|
|
@@ -202,9 +531,16 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
202
531
|
}
|
|
203
532
|
|
|
204
533
|
/**
|
|
205
|
-
*
|
|
534
|
+
* Delete a coach shift
|
|
206
535
|
*/
|
|
207
|
-
async
|
|
536
|
+
async deleteCoachShiftRaw(requestParameters: DeleteCoachShiftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
537
|
+
if (requestParameters['shiftId'] == null) {
|
|
538
|
+
throw new runtime.RequiredError(
|
|
539
|
+
'shiftId',
|
|
540
|
+
'Required parameter "shiftId" was null or undefined when calling deleteCoachShift().'
|
|
541
|
+
);
|
|
542
|
+
}
|
|
543
|
+
|
|
208
544
|
const queryParameters: any = {};
|
|
209
545
|
|
|
210
546
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -218,31 +554,46 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
218
554
|
}
|
|
219
555
|
}
|
|
220
556
|
const response = await this.request({
|
|
221
|
-
path: `/api/app/coach/
|
|
222
|
-
method: '
|
|
557
|
+
path: `/api/app/coach/workspace/shifts/{shiftId}`.replace(`{${"shiftId"}}`, encodeURIComponent(String(requestParameters['shiftId']))),
|
|
558
|
+
method: 'DELETE',
|
|
223
559
|
headers: headerParameters,
|
|
224
560
|
query: queryParameters,
|
|
225
561
|
}, initOverrides);
|
|
226
562
|
|
|
227
|
-
return new runtime.
|
|
563
|
+
return new runtime.VoidApiResponse(response);
|
|
228
564
|
}
|
|
229
565
|
|
|
230
566
|
/**
|
|
231
|
-
*
|
|
567
|
+
* Delete a coach shift
|
|
232
568
|
*/
|
|
233
|
-
async
|
|
234
|
-
|
|
235
|
-
return await response.value();
|
|
569
|
+
async deleteCoachShift(requestParameters: DeleteCoachShiftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
570
|
+
await this.deleteCoachShiftRaw(requestParameters, initOverrides);
|
|
236
571
|
}
|
|
237
572
|
|
|
238
573
|
/**
|
|
239
|
-
*
|
|
574
|
+
* Generate bills for a subscription period
|
|
240
575
|
*/
|
|
241
|
-
async
|
|
576
|
+
async generateCoachSubscriptionBillsRaw(requestParameters: GenerateCoachSubscriptionBillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionBill>>> {
|
|
577
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
578
|
+
throw new runtime.RequiredError(
|
|
579
|
+
'subscriptionId',
|
|
580
|
+
'Required parameter "subscriptionId" was null or undefined when calling generateCoachSubscriptionBills().'
|
|
581
|
+
);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
if (requestParameters['generateCoachSubscriptionBillsRequest'] == null) {
|
|
585
|
+
throw new runtime.RequiredError(
|
|
586
|
+
'generateCoachSubscriptionBillsRequest',
|
|
587
|
+
'Required parameter "generateCoachSubscriptionBillsRequest" was null or undefined when calling generateCoachSubscriptionBills().'
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
|
|
242
591
|
const queryParameters: any = {};
|
|
243
592
|
|
|
244
593
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
245
594
|
|
|
595
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
596
|
+
|
|
246
597
|
if (this.configuration && this.configuration.accessToken) {
|
|
247
598
|
const token = this.configuration.accessToken;
|
|
248
599
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -252,27 +603,28 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
252
603
|
}
|
|
253
604
|
}
|
|
254
605
|
const response = await this.request({
|
|
255
|
-
path: `/api/app/coach/
|
|
256
|
-
method: '
|
|
606
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/billing/generate`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
607
|
+
method: 'POST',
|
|
257
608
|
headers: headerParameters,
|
|
258
609
|
query: queryParameters,
|
|
610
|
+
body: GenerateCoachSubscriptionBillsRequestToJSON(requestParameters['generateCoachSubscriptionBillsRequest']),
|
|
259
611
|
}, initOverrides);
|
|
260
612
|
|
|
261
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
613
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubscriptionBillFromJSON));
|
|
262
614
|
}
|
|
263
615
|
|
|
264
616
|
/**
|
|
265
|
-
*
|
|
617
|
+
* Generate bills for a subscription period
|
|
266
618
|
*/
|
|
267
|
-
async
|
|
268
|
-
const response = await this.
|
|
619
|
+
async generateCoachSubscriptionBills(requestParameters: GenerateCoachSubscriptionBillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionBill>> {
|
|
620
|
+
const response = await this.generateCoachSubscriptionBillsRaw(requestParameters, initOverrides);
|
|
269
621
|
return await response.value();
|
|
270
622
|
}
|
|
271
623
|
|
|
272
624
|
/**
|
|
273
|
-
* Get
|
|
625
|
+
* Get all unique players from all coach training teams
|
|
274
626
|
*/
|
|
275
|
-
async
|
|
627
|
+
async getAllCoachPlayersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CoachTeamPlayerDto>>> {
|
|
276
628
|
const queryParameters: any = {};
|
|
277
629
|
|
|
278
630
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -286,40 +638,31 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
286
638
|
}
|
|
287
639
|
}
|
|
288
640
|
const response = await this.request({
|
|
289
|
-
path: `/api/app/coach/
|
|
641
|
+
path: `/api/app/coach/workspace/players`,
|
|
290
642
|
method: 'GET',
|
|
291
643
|
headers: headerParameters,
|
|
292
644
|
query: queryParameters,
|
|
293
645
|
}, initOverrides);
|
|
294
646
|
|
|
295
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
647
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CoachTeamPlayerDtoFromJSON));
|
|
296
648
|
}
|
|
297
649
|
|
|
298
650
|
/**
|
|
299
|
-
* Get
|
|
651
|
+
* Get all unique players from all coach training teams
|
|
300
652
|
*/
|
|
301
|
-
async
|
|
302
|
-
const response = await this.
|
|
653
|
+
async getAllCoachPlayers(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CoachTeamPlayerDto>> {
|
|
654
|
+
const response = await this.getAllCoachPlayersRaw(initOverrides);
|
|
303
655
|
return await response.value();
|
|
304
656
|
}
|
|
305
657
|
|
|
306
658
|
/**
|
|
307
|
-
*
|
|
659
|
+
* Get coach\'s customer entity
|
|
308
660
|
*/
|
|
309
|
-
async
|
|
310
|
-
if (requestParameters['saveCoachBasicInfoRequest'] == null) {
|
|
311
|
-
throw new runtime.RequiredError(
|
|
312
|
-
'saveCoachBasicInfoRequest',
|
|
313
|
-
'Required parameter "saveCoachBasicInfoRequest" was null or undefined when calling saveCoachBasicInfo().'
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
|
|
661
|
+
async getCoachCustomerRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Customer>> {
|
|
317
662
|
const queryParameters: any = {};
|
|
318
663
|
|
|
319
664
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
320
665
|
|
|
321
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
322
|
-
|
|
323
666
|
if (this.configuration && this.configuration.accessToken) {
|
|
324
667
|
const token = this.configuration.accessToken;
|
|
325
668
|
const tokenString = await token("bearerAuth", []);
|
|
@@ -329,22 +672,836 @@ export class CoachApi extends runtime.BaseAPI {
|
|
|
329
672
|
}
|
|
330
673
|
}
|
|
331
674
|
const response = await this.request({
|
|
332
|
-
path: `/api/app/coach/
|
|
333
|
-
method: '
|
|
675
|
+
path: `/api/app/coach/customer`,
|
|
676
|
+
method: 'GET',
|
|
334
677
|
headers: headerParameters,
|
|
335
678
|
query: queryParameters,
|
|
336
|
-
body: SaveCoachBasicInfoRequestToJSON(requestParameters['saveCoachBasicInfoRequest']),
|
|
337
679
|
}, initOverrides);
|
|
338
680
|
|
|
339
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
681
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomerFromJSON(jsonValue));
|
|
340
682
|
}
|
|
341
683
|
|
|
342
684
|
/**
|
|
343
|
-
*
|
|
685
|
+
* Get coach\'s customer entity
|
|
344
686
|
*/
|
|
345
|
-
async
|
|
346
|
-
const response = await this.
|
|
687
|
+
async getCoachCustomer(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Customer> {
|
|
688
|
+
const response = await this.getCoachCustomerRaw(initOverrides);
|
|
347
689
|
return await response.value();
|
|
348
690
|
}
|
|
349
691
|
|
|
692
|
+
/**
|
|
693
|
+
* Get coach\'s locations
|
|
694
|
+
*/
|
|
695
|
+
async getCoachLocationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Location>>> {
|
|
696
|
+
const queryParameters: any = {};
|
|
697
|
+
|
|
698
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
699
|
+
|
|
700
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
701
|
+
const token = this.configuration.accessToken;
|
|
702
|
+
const tokenString = await token("bearerAuth", []);
|
|
703
|
+
|
|
704
|
+
if (tokenString) {
|
|
705
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
const response = await this.request({
|
|
709
|
+
path: `/api/app/coach/locations`,
|
|
710
|
+
method: 'GET',
|
|
711
|
+
headers: headerParameters,
|
|
712
|
+
query: queryParameters,
|
|
713
|
+
}, initOverrides);
|
|
714
|
+
|
|
715
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LocationFromJSON));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Get coach\'s locations
|
|
720
|
+
*/
|
|
721
|
+
async getCoachLocations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Location>> {
|
|
722
|
+
const response = await this.getCoachLocationsRaw(initOverrides);
|
|
723
|
+
return await response.value();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Get MercadoPago OAuth authorization URL
|
|
728
|
+
*/
|
|
729
|
+
async getCoachMercadoPagoAuthUrlRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCoachMercadoPagoAuthUrl200Response>> {
|
|
730
|
+
const queryParameters: any = {};
|
|
731
|
+
|
|
732
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
733
|
+
|
|
734
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
735
|
+
const token = this.configuration.accessToken;
|
|
736
|
+
const tokenString = await token("bearerAuth", []);
|
|
737
|
+
|
|
738
|
+
if (tokenString) {
|
|
739
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
const response = await this.request({
|
|
743
|
+
path: `/api/app/coach/payments/mercadopago/auth-url`,
|
|
744
|
+
method: 'GET',
|
|
745
|
+
headers: headerParameters,
|
|
746
|
+
query: queryParameters,
|
|
747
|
+
}, initOverrides);
|
|
748
|
+
|
|
749
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCoachMercadoPagoAuthUrl200ResponseFromJSON(jsonValue));
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
/**
|
|
753
|
+
* Get MercadoPago OAuth authorization URL
|
|
754
|
+
*/
|
|
755
|
+
async getCoachMercadoPagoAuthUrl(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCoachMercadoPagoAuthUrl200Response> {
|
|
756
|
+
const response = await this.getCoachMercadoPagoAuthUrlRaw(initOverrides);
|
|
757
|
+
return await response.value();
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Get coach payment configuration (cash, MercadoPago)
|
|
762
|
+
*/
|
|
763
|
+
async getCoachPaymentsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CoachPaymentsDto>> {
|
|
764
|
+
const queryParameters: any = {};
|
|
765
|
+
|
|
766
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
767
|
+
|
|
768
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
769
|
+
const token = this.configuration.accessToken;
|
|
770
|
+
const tokenString = await token("bearerAuth", []);
|
|
771
|
+
|
|
772
|
+
if (tokenString) {
|
|
773
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
const response = await this.request({
|
|
777
|
+
path: `/api/app/coach/payments`,
|
|
778
|
+
method: 'GET',
|
|
779
|
+
headers: headerParameters,
|
|
780
|
+
query: queryParameters,
|
|
781
|
+
}, initOverrides);
|
|
782
|
+
|
|
783
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CoachPaymentsDtoFromJSON(jsonValue));
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Get coach payment configuration (cash, MercadoPago)
|
|
788
|
+
*/
|
|
789
|
+
async getCoachPayments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CoachPaymentsDto> {
|
|
790
|
+
const response = await this.getCoachPaymentsRaw(initOverrides);
|
|
791
|
+
return await response.value();
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* Get own coach profile
|
|
796
|
+
*/
|
|
797
|
+
async getCoachProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserCoachProfile>> {
|
|
798
|
+
const queryParameters: any = {};
|
|
799
|
+
|
|
800
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
801
|
+
|
|
802
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
803
|
+
const token = this.configuration.accessToken;
|
|
804
|
+
const tokenString = await token("bearerAuth", []);
|
|
805
|
+
|
|
806
|
+
if (tokenString) {
|
|
807
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
const response = await this.request({
|
|
811
|
+
path: `/api/app/coach/profile`,
|
|
812
|
+
method: 'GET',
|
|
813
|
+
headers: headerParameters,
|
|
814
|
+
query: queryParameters,
|
|
815
|
+
}, initOverrides);
|
|
816
|
+
|
|
817
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserCoachProfileFromJSON(jsonValue));
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Get own coach profile
|
|
822
|
+
*/
|
|
823
|
+
async getCoachProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserCoachProfile> {
|
|
824
|
+
const response = await this.getCoachProfileRaw(initOverrides);
|
|
825
|
+
return await response.value();
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Get billing summary for a coach subscription
|
|
830
|
+
*/
|
|
831
|
+
async getCoachSubscriptionBillingSummaryRaw(requestParameters: GetCoachSubscriptionBillingSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<BillingSummaryItemDto>>> {
|
|
832
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
833
|
+
throw new runtime.RequiredError(
|
|
834
|
+
'subscriptionId',
|
|
835
|
+
'Required parameter "subscriptionId" was null or undefined when calling getCoachSubscriptionBillingSummary().'
|
|
836
|
+
);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
const queryParameters: any = {};
|
|
840
|
+
|
|
841
|
+
if (requestParameters['billingYear'] != null) {
|
|
842
|
+
queryParameters['billingYear'] = requestParameters['billingYear'];
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
846
|
+
|
|
847
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
848
|
+
const token = this.configuration.accessToken;
|
|
849
|
+
const tokenString = await token("bearerAuth", []);
|
|
850
|
+
|
|
851
|
+
if (tokenString) {
|
|
852
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
const response = await this.request({
|
|
856
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/billing/summary`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
857
|
+
method: 'GET',
|
|
858
|
+
headers: headerParameters,
|
|
859
|
+
query: queryParameters,
|
|
860
|
+
}, initOverrides);
|
|
861
|
+
|
|
862
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(BillingSummaryItemDtoFromJSON));
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Get billing summary for a coach subscription
|
|
867
|
+
*/
|
|
868
|
+
async getCoachSubscriptionBillingSummary(requestParameters: GetCoachSubscriptionBillingSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<BillingSummaryItemDto>> {
|
|
869
|
+
const response = await this.getCoachSubscriptionBillingSummaryRaw(requestParameters, initOverrides);
|
|
870
|
+
return await response.value();
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Get outstanding debt per member for a subscription
|
|
875
|
+
*/
|
|
876
|
+
async getCoachSubscriptionMemberDebtRaw(requestParameters: GetCoachSubscriptionMemberDebtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetCoachSubscriptionMemberDebt200ResponseInner>>> {
|
|
877
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
878
|
+
throw new runtime.RequiredError(
|
|
879
|
+
'subscriptionId',
|
|
880
|
+
'Required parameter "subscriptionId" was null or undefined when calling getCoachSubscriptionMemberDebt().'
|
|
881
|
+
);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
const queryParameters: any = {};
|
|
885
|
+
|
|
886
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
887
|
+
|
|
888
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
889
|
+
const token = this.configuration.accessToken;
|
|
890
|
+
const tokenString = await token("bearerAuth", []);
|
|
891
|
+
|
|
892
|
+
if (tokenString) {
|
|
893
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
const response = await this.request({
|
|
897
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/billing/member-debt`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
898
|
+
method: 'GET',
|
|
899
|
+
headers: headerParameters,
|
|
900
|
+
query: queryParameters,
|
|
901
|
+
}, initOverrides);
|
|
902
|
+
|
|
903
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetCoachSubscriptionMemberDebt200ResponseInnerFromJSON));
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Get outstanding debt per member for a subscription
|
|
908
|
+
*/
|
|
909
|
+
async getCoachSubscriptionMemberDebt(requestParameters: GetCoachSubscriptionMemberDebtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetCoachSubscriptionMemberDebt200ResponseInner>> {
|
|
910
|
+
const response = await this.getCoachSubscriptionMemberDebtRaw(requestParameters, initOverrides);
|
|
911
|
+
return await response.value();
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* List members of a coach subscription
|
|
916
|
+
*/
|
|
917
|
+
async getCoachSubscriptionMembersRaw(requestParameters: GetCoachSubscriptionMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CoachTeamPlayerDto>>> {
|
|
918
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
919
|
+
throw new runtime.RequiredError(
|
|
920
|
+
'subscriptionId',
|
|
921
|
+
'Required parameter "subscriptionId" was null or undefined when calling getCoachSubscriptionMembers().'
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
const queryParameters: any = {};
|
|
926
|
+
|
|
927
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
928
|
+
|
|
929
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
930
|
+
const token = this.configuration.accessToken;
|
|
931
|
+
const tokenString = await token("bearerAuth", []);
|
|
932
|
+
|
|
933
|
+
if (tokenString) {
|
|
934
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
const response = await this.request({
|
|
938
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/members`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
939
|
+
method: 'GET',
|
|
940
|
+
headers: headerParameters,
|
|
941
|
+
query: queryParameters,
|
|
942
|
+
}, initOverrides);
|
|
943
|
+
|
|
944
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CoachTeamPlayerDtoFromJSON));
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* List members of a coach subscription
|
|
949
|
+
*/
|
|
950
|
+
async getCoachSubscriptionMembers(requestParameters: GetCoachSubscriptionMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CoachTeamPlayerDto>> {
|
|
951
|
+
const response = await this.getCoachSubscriptionMembersRaw(requestParameters, initOverrides);
|
|
952
|
+
return await response.value();
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Get rich coach workspace profile (locations + shifts + team info)
|
|
957
|
+
*/
|
|
958
|
+
async getCoachWorkspaceProfileRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CoachWorkspaceProfileDto>> {
|
|
959
|
+
const queryParameters: any = {};
|
|
960
|
+
|
|
961
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
962
|
+
|
|
963
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
964
|
+
const token = this.configuration.accessToken;
|
|
965
|
+
const tokenString = await token("bearerAuth", []);
|
|
966
|
+
|
|
967
|
+
if (tokenString) {
|
|
968
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
const response = await this.request({
|
|
972
|
+
path: `/api/app/coach/workspace/profile`,
|
|
973
|
+
method: 'GET',
|
|
974
|
+
headers: headerParameters,
|
|
975
|
+
query: queryParameters,
|
|
976
|
+
}, initOverrides);
|
|
977
|
+
|
|
978
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CoachWorkspaceProfileDtoFromJSON(jsonValue));
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Get rich coach workspace profile (locations + shifts + team info)
|
|
983
|
+
*/
|
|
984
|
+
async getCoachWorkspaceProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CoachWorkspaceProfileDto> {
|
|
985
|
+
const response = await this.getCoachWorkspaceProfileRaw(initOverrides);
|
|
986
|
+
return await response.value();
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Get players from the coach\'s default training team
|
|
991
|
+
*/
|
|
992
|
+
async getDefaultTeamPlayersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CoachTeamPlayerDto>>> {
|
|
993
|
+
const queryParameters: any = {};
|
|
994
|
+
|
|
995
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
996
|
+
|
|
997
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
998
|
+
const token = this.configuration.accessToken;
|
|
999
|
+
const tokenString = await token("bearerAuth", []);
|
|
1000
|
+
|
|
1001
|
+
if (tokenString) {
|
|
1002
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
const response = await this.request({
|
|
1006
|
+
path: `/api/app/coach/workspace/team/players`,
|
|
1007
|
+
method: 'GET',
|
|
1008
|
+
headers: headerParameters,
|
|
1009
|
+
query: queryParameters,
|
|
1010
|
+
}, initOverrides);
|
|
1011
|
+
|
|
1012
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CoachTeamPlayerDtoFromJSON));
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* Get players from the coach\'s default training team
|
|
1017
|
+
*/
|
|
1018
|
+
async getDefaultTeamPlayers(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CoachTeamPlayerDto>> {
|
|
1019
|
+
const response = await this.getDefaultTeamPlayersRaw(initOverrides);
|
|
1020
|
+
return await response.value();
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* Get all training teams owned by this coach
|
|
1025
|
+
*/
|
|
1026
|
+
async getMyTrainingTeamsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CoachTrainingTeamDto>>> {
|
|
1027
|
+
const queryParameters: any = {};
|
|
1028
|
+
|
|
1029
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1030
|
+
|
|
1031
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1032
|
+
const token = this.configuration.accessToken;
|
|
1033
|
+
const tokenString = await token("bearerAuth", []);
|
|
1034
|
+
|
|
1035
|
+
if (tokenString) {
|
|
1036
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
const response = await this.request({
|
|
1040
|
+
path: `/api/app/coach/workspace/teams`,
|
|
1041
|
+
method: 'GET',
|
|
1042
|
+
headers: headerParameters,
|
|
1043
|
+
query: queryParameters,
|
|
1044
|
+
}, initOverrides);
|
|
1045
|
+
|
|
1046
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CoachTrainingTeamDtoFromJSON));
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Get all training teams owned by this coach
|
|
1051
|
+
*/
|
|
1052
|
+
async getMyTrainingTeams(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CoachTrainingTeamDto>> {
|
|
1053
|
+
const response = await this.getMyTrainingTeamsRaw(initOverrides);
|
|
1054
|
+
return await response.value();
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
/**
|
|
1058
|
+
* Get weekly agenda (available slots + reservations)
|
|
1059
|
+
*/
|
|
1060
|
+
async getWeeklyAgendaRaw(requestParameters: GetWeeklyAgendaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WeeklyAgendaDto>> {
|
|
1061
|
+
if (requestParameters['weekStart'] == null) {
|
|
1062
|
+
throw new runtime.RequiredError(
|
|
1063
|
+
'weekStart',
|
|
1064
|
+
'Required parameter "weekStart" was null or undefined when calling getWeeklyAgenda().'
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
const queryParameters: any = {};
|
|
1069
|
+
|
|
1070
|
+
if (requestParameters['weekStart'] != null) {
|
|
1071
|
+
queryParameters['weekStart'] = (requestParameters['weekStart'] as any).toISOString().substring(0,10);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1075
|
+
|
|
1076
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1077
|
+
const token = this.configuration.accessToken;
|
|
1078
|
+
const tokenString = await token("bearerAuth", []);
|
|
1079
|
+
|
|
1080
|
+
if (tokenString) {
|
|
1081
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
const response = await this.request({
|
|
1085
|
+
path: `/api/app/coach/workspace/agenda`,
|
|
1086
|
+
method: 'GET',
|
|
1087
|
+
headers: headerParameters,
|
|
1088
|
+
query: queryParameters,
|
|
1089
|
+
}, initOverrides);
|
|
1090
|
+
|
|
1091
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => WeeklyAgendaDtoFromJSON(jsonValue));
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Get weekly agenda (available slots + reservations)
|
|
1096
|
+
*/
|
|
1097
|
+
async getWeeklyAgenda(requestParameters: GetWeeklyAgendaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WeeklyAgendaDto> {
|
|
1098
|
+
const response = await this.getWeeklyAgendaRaw(requestParameters, initOverrides);
|
|
1099
|
+
return await response.value();
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Link MercadoPago account using OAuth authorization code
|
|
1104
|
+
*/
|
|
1105
|
+
async linkCoachMercadoPagoRaw(requestParameters: LinkCoachMercadoPagoOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1106
|
+
if (requestParameters['linkCoachMercadoPagoRequest'] == null) {
|
|
1107
|
+
throw new runtime.RequiredError(
|
|
1108
|
+
'linkCoachMercadoPagoRequest',
|
|
1109
|
+
'Required parameter "linkCoachMercadoPagoRequest" was null or undefined when calling linkCoachMercadoPago().'
|
|
1110
|
+
);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
const queryParameters: any = {};
|
|
1114
|
+
|
|
1115
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1116
|
+
|
|
1117
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1118
|
+
|
|
1119
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1120
|
+
const token = this.configuration.accessToken;
|
|
1121
|
+
const tokenString = await token("bearerAuth", []);
|
|
1122
|
+
|
|
1123
|
+
if (tokenString) {
|
|
1124
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
const response = await this.request({
|
|
1128
|
+
path: `/api/app/coach/payments/mercadopago/link`,
|
|
1129
|
+
method: 'POST',
|
|
1130
|
+
headers: headerParameters,
|
|
1131
|
+
query: queryParameters,
|
|
1132
|
+
body: LinkCoachMercadoPagoRequestToJSON(requestParameters['linkCoachMercadoPagoRequest']),
|
|
1133
|
+
}, initOverrides);
|
|
1134
|
+
|
|
1135
|
+
return new runtime.VoidApiResponse(response);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Link MercadoPago account using OAuth authorization code
|
|
1140
|
+
*/
|
|
1141
|
+
async linkCoachMercadoPago(requestParameters: LinkCoachMercadoPagoOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1142
|
+
await this.linkCoachMercadoPagoRaw(requestParameters, initOverrides);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Link or unlink a team from a group shift
|
|
1147
|
+
*/
|
|
1148
|
+
async linkShiftToTeamRaw(requestParameters: LinkShiftToTeamOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1149
|
+
if (requestParameters['shiftId'] == null) {
|
|
1150
|
+
throw new runtime.RequiredError(
|
|
1151
|
+
'shiftId',
|
|
1152
|
+
'Required parameter "shiftId" was null or undefined when calling linkShiftToTeam().'
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (requestParameters['linkShiftToTeamRequest'] == null) {
|
|
1157
|
+
throw new runtime.RequiredError(
|
|
1158
|
+
'linkShiftToTeamRequest',
|
|
1159
|
+
'Required parameter "linkShiftToTeamRequest" was null or undefined when calling linkShiftToTeam().'
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
const queryParameters: any = {};
|
|
1164
|
+
|
|
1165
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1166
|
+
|
|
1167
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1168
|
+
|
|
1169
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1170
|
+
const token = this.configuration.accessToken;
|
|
1171
|
+
const tokenString = await token("bearerAuth", []);
|
|
1172
|
+
|
|
1173
|
+
if (tokenString) {
|
|
1174
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
const response = await this.request({
|
|
1178
|
+
path: `/api/app/coach/workspace/shifts/{shiftId}/team`.replace(`{${"shiftId"}}`, encodeURIComponent(String(requestParameters['shiftId']))),
|
|
1179
|
+
method: 'PATCH',
|
|
1180
|
+
headers: headerParameters,
|
|
1181
|
+
query: queryParameters,
|
|
1182
|
+
body: LinkShiftToTeamRequestToJSON(requestParameters['linkShiftToTeamRequest']),
|
|
1183
|
+
}, initOverrides);
|
|
1184
|
+
|
|
1185
|
+
return new runtime.VoidApiResponse(response);
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Link or unlink a team from a group shift
|
|
1190
|
+
*/
|
|
1191
|
+
async linkShiftToTeam(requestParameters: LinkShiftToTeamOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1192
|
+
await this.linkShiftToTeamRaw(requestParameters, initOverrides);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Mark all pending bills for a member as paid (cash reconciliation)
|
|
1197
|
+
*/
|
|
1198
|
+
async markCoachSubscriptionBillPaidRaw(requestParameters: MarkCoachSubscriptionBillPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MarkCoachSubscriptionBillPaid200Response>> {
|
|
1199
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
1200
|
+
throw new runtime.RequiredError(
|
|
1201
|
+
'subscriptionId',
|
|
1202
|
+
'Required parameter "subscriptionId" was null or undefined when calling markCoachSubscriptionBillPaid().'
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
if (requestParameters['memberId'] == null) {
|
|
1207
|
+
throw new runtime.RequiredError(
|
|
1208
|
+
'memberId',
|
|
1209
|
+
'Required parameter "memberId" was null or undefined when calling markCoachSubscriptionBillPaid().'
|
|
1210
|
+
);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
const queryParameters: any = {};
|
|
1214
|
+
|
|
1215
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1216
|
+
|
|
1217
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1218
|
+
const token = this.configuration.accessToken;
|
|
1219
|
+
const tokenString = await token("bearerAuth", []);
|
|
1220
|
+
|
|
1221
|
+
if (tokenString) {
|
|
1222
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
const response = await this.request({
|
|
1226
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/billing/mark-paid/{memberId}`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))).replace(`{${"memberId"}}`, encodeURIComponent(String(requestParameters['memberId']))),
|
|
1227
|
+
method: 'PATCH',
|
|
1228
|
+
headers: headerParameters,
|
|
1229
|
+
query: queryParameters,
|
|
1230
|
+
}, initOverrides);
|
|
1231
|
+
|
|
1232
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => MarkCoachSubscriptionBillPaid200ResponseFromJSON(jsonValue));
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/**
|
|
1236
|
+
* Mark all pending bills for a member as paid (cash reconciliation)
|
|
1237
|
+
*/
|
|
1238
|
+
async markCoachSubscriptionBillPaid(requestParameters: MarkCoachSubscriptionBillPaidRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MarkCoachSubscriptionBillPaid200Response> {
|
|
1239
|
+
const response = await this.markCoachSubscriptionBillPaidRaw(requestParameters, initOverrides);
|
|
1240
|
+
return await response.value();
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Creates or updates the complete coach profile, locations, shifts, pricing and auto-creates a TRAINING_GROUP Team. Replaces the 4-step wizard.
|
|
1245
|
+
* Register coach profile in a single call (v2 wizard)
|
|
1246
|
+
*/
|
|
1247
|
+
async registerCoachProfileRaw(requestParameters: RegisterCoachProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RegisterCoachProfileResponseDto>> {
|
|
1248
|
+
if (requestParameters['registerCoachProfileDto'] == null) {
|
|
1249
|
+
throw new runtime.RequiredError(
|
|
1250
|
+
'registerCoachProfileDto',
|
|
1251
|
+
'Required parameter "registerCoachProfileDto" was null or undefined when calling registerCoachProfile().'
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
const queryParameters: any = {};
|
|
1256
|
+
|
|
1257
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1258
|
+
|
|
1259
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1260
|
+
|
|
1261
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1262
|
+
const token = this.configuration.accessToken;
|
|
1263
|
+
const tokenString = await token("bearerAuth", []);
|
|
1264
|
+
|
|
1265
|
+
if (tokenString) {
|
|
1266
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
const response = await this.request({
|
|
1270
|
+
path: `/api/app/coach/register`,
|
|
1271
|
+
method: 'POST',
|
|
1272
|
+
headers: headerParameters,
|
|
1273
|
+
query: queryParameters,
|
|
1274
|
+
body: RegisterCoachProfileDtoToJSON(requestParameters['registerCoachProfileDto']),
|
|
1275
|
+
}, initOverrides);
|
|
1276
|
+
|
|
1277
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RegisterCoachProfileResponseDtoFromJSON(jsonValue));
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Creates or updates the complete coach profile, locations, shifts, pricing and auto-creates a TRAINING_GROUP Team. Replaces the 4-step wizard.
|
|
1282
|
+
* Register coach profile in a single call (v2 wizard)
|
|
1283
|
+
*/
|
|
1284
|
+
async registerCoachProfile(requestParameters: RegisterCoachProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RegisterCoachProfileResponseDto> {
|
|
1285
|
+
const response = await this.registerCoachProfileRaw(requestParameters, initOverrides);
|
|
1286
|
+
return await response.value();
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Remove a member from a coach subscription
|
|
1291
|
+
*/
|
|
1292
|
+
async removeSubscriptionMemberRaw(requestParameters: RemoveSubscriptionMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1293
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
1294
|
+
throw new runtime.RequiredError(
|
|
1295
|
+
'subscriptionId',
|
|
1296
|
+
'Required parameter "subscriptionId" was null or undefined when calling removeSubscriptionMember().'
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
if (requestParameters['memberId'] == null) {
|
|
1301
|
+
throw new runtime.RequiredError(
|
|
1302
|
+
'memberId',
|
|
1303
|
+
'Required parameter "memberId" was null or undefined when calling removeSubscriptionMember().'
|
|
1304
|
+
);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
const queryParameters: any = {};
|
|
1308
|
+
|
|
1309
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1310
|
+
|
|
1311
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1312
|
+
const token = this.configuration.accessToken;
|
|
1313
|
+
const tokenString = await token("bearerAuth", []);
|
|
1314
|
+
|
|
1315
|
+
if (tokenString) {
|
|
1316
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
const response = await this.request({
|
|
1320
|
+
path: `/api/app/coach/workspace/subscriptions/{subscriptionId}/members/{memberId}`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))).replace(`{${"memberId"}}`, encodeURIComponent(String(requestParameters['memberId']))),
|
|
1321
|
+
method: 'DELETE',
|
|
1322
|
+
headers: headerParameters,
|
|
1323
|
+
query: queryParameters,
|
|
1324
|
+
}, initOverrides);
|
|
1325
|
+
|
|
1326
|
+
return new runtime.VoidApiResponse(response);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Remove a member from a coach subscription
|
|
1331
|
+
*/
|
|
1332
|
+
async removeSubscriptionMember(requestParameters: RemoveSubscriptionMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1333
|
+
await this.removeSubscriptionMemberRaw(requestParameters, initOverrides);
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Save basic coach information (Step 1 of wizard)
|
|
1338
|
+
*/
|
|
1339
|
+
async saveCoachBasicInfoRaw(requestParameters: SaveCoachBasicInfoOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserCoachProfile>> {
|
|
1340
|
+
if (requestParameters['saveCoachBasicInfoRequest'] == null) {
|
|
1341
|
+
throw new runtime.RequiredError(
|
|
1342
|
+
'saveCoachBasicInfoRequest',
|
|
1343
|
+
'Required parameter "saveCoachBasicInfoRequest" was null or undefined when calling saveCoachBasicInfo().'
|
|
1344
|
+
);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
const queryParameters: any = {};
|
|
1348
|
+
|
|
1349
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1350
|
+
|
|
1351
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1352
|
+
|
|
1353
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1354
|
+
const token = this.configuration.accessToken;
|
|
1355
|
+
const tokenString = await token("bearerAuth", []);
|
|
1356
|
+
|
|
1357
|
+
if (tokenString) {
|
|
1358
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
const response = await this.request({
|
|
1362
|
+
path: `/api/app/coach/profile/setup/step1`,
|
|
1363
|
+
method: 'POST',
|
|
1364
|
+
headers: headerParameters,
|
|
1365
|
+
query: queryParameters,
|
|
1366
|
+
body: SaveCoachBasicInfoRequestToJSON(requestParameters['saveCoachBasicInfoRequest']),
|
|
1367
|
+
}, initOverrides);
|
|
1368
|
+
|
|
1369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserCoachProfileFromJSON(jsonValue));
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* Save basic coach information (Step 1 of wizard)
|
|
1374
|
+
*/
|
|
1375
|
+
async saveCoachBasicInfo(requestParameters: SaveCoachBasicInfoOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserCoachProfile> {
|
|
1376
|
+
const response = await this.saveCoachBasicInfoRaw(requestParameters, initOverrides);
|
|
1377
|
+
return await response.value();
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/**
|
|
1381
|
+
* Unlink MercadoPago account
|
|
1382
|
+
*/
|
|
1383
|
+
async unlinkCoachMercadoPagoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteShift200Response>> {
|
|
1384
|
+
const queryParameters: any = {};
|
|
1385
|
+
|
|
1386
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1387
|
+
|
|
1388
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1389
|
+
const token = this.configuration.accessToken;
|
|
1390
|
+
const tokenString = await token("bearerAuth", []);
|
|
1391
|
+
|
|
1392
|
+
if (tokenString) {
|
|
1393
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
const response = await this.request({
|
|
1397
|
+
path: `/api/app/coach/payments/mercadopago/unlink`,
|
|
1398
|
+
method: 'POST',
|
|
1399
|
+
headers: headerParameters,
|
|
1400
|
+
query: queryParameters,
|
|
1401
|
+
}, initOverrides);
|
|
1402
|
+
|
|
1403
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteShift200ResponseFromJSON(jsonValue));
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
/**
|
|
1407
|
+
* Unlink MercadoPago account
|
|
1408
|
+
*/
|
|
1409
|
+
async unlinkCoachMercadoPago(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteShift200Response> {
|
|
1410
|
+
const response = await this.unlinkCoachMercadoPagoRaw(initOverrides);
|
|
1411
|
+
return await response.value();
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
/**
|
|
1415
|
+
* Update coach profile (Step 2 fields — bio, categories, specialties, photos, etc.)
|
|
1416
|
+
*/
|
|
1417
|
+
async updateCoachProfileRaw(requestParameters: UpdateCoachProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1418
|
+
if (requestParameters['updateCoachProfileDto'] == null) {
|
|
1419
|
+
throw new runtime.RequiredError(
|
|
1420
|
+
'updateCoachProfileDto',
|
|
1421
|
+
'Required parameter "updateCoachProfileDto" was null or undefined when calling updateCoachProfile().'
|
|
1422
|
+
);
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
const queryParameters: any = {};
|
|
1426
|
+
|
|
1427
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1428
|
+
|
|
1429
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1430
|
+
|
|
1431
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1432
|
+
const token = this.configuration.accessToken;
|
|
1433
|
+
const tokenString = await token("bearerAuth", []);
|
|
1434
|
+
|
|
1435
|
+
if (tokenString) {
|
|
1436
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
const response = await this.request({
|
|
1440
|
+
path: `/api/app/coach/profile`,
|
|
1441
|
+
method: 'PUT',
|
|
1442
|
+
headers: headerParameters,
|
|
1443
|
+
query: queryParameters,
|
|
1444
|
+
body: UpdateCoachProfileDtoToJSON(requestParameters['updateCoachProfileDto']),
|
|
1445
|
+
}, initOverrides);
|
|
1446
|
+
|
|
1447
|
+
return new runtime.VoidApiResponse(response);
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/**
|
|
1451
|
+
* Update coach profile (Step 2 fields — bio, categories, specialties, photos, etc.)
|
|
1452
|
+
*/
|
|
1453
|
+
async updateCoachProfile(requestParameters: UpdateCoachProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1454
|
+
await this.updateCoachProfileRaw(requestParameters, initOverrides);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
/**
|
|
1458
|
+
* Update an existing coach shift
|
|
1459
|
+
*/
|
|
1460
|
+
async updateCoachShiftRaw(requestParameters: UpdateCoachShiftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1461
|
+
if (requestParameters['shiftId'] == null) {
|
|
1462
|
+
throw new runtime.RequiredError(
|
|
1463
|
+
'shiftId',
|
|
1464
|
+
'Required parameter "shiftId" was null or undefined when calling updateCoachShift().'
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
if (requestParameters['coachShiftInputDto'] == null) {
|
|
1469
|
+
throw new runtime.RequiredError(
|
|
1470
|
+
'coachShiftInputDto',
|
|
1471
|
+
'Required parameter "coachShiftInputDto" was null or undefined when calling updateCoachShift().'
|
|
1472
|
+
);
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
const queryParameters: any = {};
|
|
1476
|
+
|
|
1477
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1478
|
+
|
|
1479
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1480
|
+
|
|
1481
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1482
|
+
const token = this.configuration.accessToken;
|
|
1483
|
+
const tokenString = await token("bearerAuth", []);
|
|
1484
|
+
|
|
1485
|
+
if (tokenString) {
|
|
1486
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
const response = await this.request({
|
|
1490
|
+
path: `/api/app/coach/workspace/shifts/{shiftId}`.replace(`{${"shiftId"}}`, encodeURIComponent(String(requestParameters['shiftId']))),
|
|
1491
|
+
method: 'PUT',
|
|
1492
|
+
headers: headerParameters,
|
|
1493
|
+
query: queryParameters,
|
|
1494
|
+
body: CoachShiftInputDtoToJSON(requestParameters['coachShiftInputDto']),
|
|
1495
|
+
}, initOverrides);
|
|
1496
|
+
|
|
1497
|
+
return new runtime.VoidApiResponse(response);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
/**
|
|
1501
|
+
* Update an existing coach shift
|
|
1502
|
+
*/
|
|
1503
|
+
async updateCoachShift(requestParameters: UpdateCoachShiftRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1504
|
+
await this.updateCoachShiftRaw(requestParameters, initOverrides);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
350
1507
|
}
|