@jugarhoy/api 1.0.2 → 1.0.4
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/AdminClubsApi.ts +118 -0
- package/apis/AdminFeaturesApi.ts +264 -0
- package/apis/AdminPlaySpotsApi.ts +61 -0
- package/apis/AdminReservationsApi.ts +54 -0
- package/apis/AdminSubscriptionBillingApi.ts +331 -0
- package/apis/AdminSubscriptionsApi.ts +312 -5
- package/apis/AuthApi.ts +57 -0
- package/apis/UsersApi.ts +51 -0
- package/apis/index.ts +3 -0
- package/models/AddCoachToSubscriptionRequest.ts +66 -0
- package/models/AddPlayerToSubscriptionRequest.ts +66 -0
- package/models/BlockSpotItem.ts +75 -0
- package/models/BlockSpots200Response.ts +73 -0
- package/models/BlockSpotsCommand.ts +109 -0
- package/models/ChargeOn.ts +1 -1
- package/models/ClonePlaySpotRequest.ts +75 -0
- package/models/CreateClubForSuperadminParams.ts +227 -0
- package/models/CreateClubForSuperadminResponse.ts +83 -0
- package/models/CreateClubForSuperadminResponseResult.ts +111 -0
- package/models/CreateClubForSuperadminResponseResultAdminUser.ts +73 -0
- package/models/CreateFeatureRequest.ts +103 -0
- package/models/ExtendSubscriptions200Response.ts +89 -0
- package/models/ExtendSubscriptions200ResponseDetailsInner.ts +81 -0
- package/models/Feature.ts +18 -0
- package/models/GenerateSubscriptionBillsRequest.ts +65 -0
- package/models/GetAllShifts200ResponseInner.ts +8 -0
- package/models/LinkPaymentToBillRequest.ts +66 -0
- package/models/ListAllClubsResponse.ts +83 -0
- package/models/ListAllClubsResponseResult.ts +81 -0
- package/models/PlayPrice.ts +2 -2
- package/models/PlaySpotShift.ts +8 -0
- package/models/PlaySubscription.ts +41 -0
- package/models/PlaySubscriptionCreateDto.ts +37 -3
- package/models/PlaySubscriptionListDto.ts +240 -0
- package/models/RequestPasswordReset200Response.ts +65 -0
- package/models/RequestPasswordReset500Response.ts +65 -0
- package/models/RequestPasswordResetRequest.ts +66 -0
- package/models/Reserve.ts +15 -0
- package/models/ReserveType.ts +1 -0
- package/models/SavePushTokenRequest.ts +66 -0
- package/models/Sport.ts +15 -6
- package/models/SubscriptionBill.ts +198 -0
- package/models/UpdateBillRequest.ts +91 -0
- package/models/UpdateFeatureRequest.ts +91 -0
- package/models/UpdateReservationAdminRequest.ts +8 -0
- package/models/UserRole.ts +2 -1
- package/models/index.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
CreateClubForSuperadminParams,
|
|
19
|
+
CreateClubForSuperadminResponse,
|
|
20
|
+
ListAllClubsResponse,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CreateClubForSuperadminParamsFromJSON,
|
|
24
|
+
CreateClubForSuperadminParamsToJSON,
|
|
25
|
+
CreateClubForSuperadminResponseFromJSON,
|
|
26
|
+
CreateClubForSuperadminResponseToJSON,
|
|
27
|
+
ListAllClubsResponseFromJSON,
|
|
28
|
+
ListAllClubsResponseToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface ApiAdminClubsPostRequest {
|
|
32
|
+
createClubForSuperadminParams: CreateClubForSuperadminParams;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export class AdminClubsApi extends runtime.BaseAPI {
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List all clubs in the system (SUPERADMIN only)
|
|
42
|
+
*/
|
|
43
|
+
async apiAdminClubsGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAllClubsResponse>> {
|
|
44
|
+
const queryParameters: any = {};
|
|
45
|
+
|
|
46
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
47
|
+
|
|
48
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
49
|
+
const token = this.configuration.accessToken;
|
|
50
|
+
const tokenString = await token("bearerAuth", []);
|
|
51
|
+
|
|
52
|
+
if (tokenString) {
|
|
53
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const response = await this.request({
|
|
57
|
+
path: `/api/admin/clubs`,
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
}, initOverrides);
|
|
62
|
+
|
|
63
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListAllClubsResponseFromJSON(jsonValue));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* List all clubs in the system (SUPERADMIN only)
|
|
68
|
+
*/
|
|
69
|
+
async apiAdminClubsGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAllClubsResponse> {
|
|
70
|
+
const response = await this.apiAdminClubsGetRaw(initOverrides);
|
|
71
|
+
return await response.value();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Create a new club with admin user (SUPERADMIN only)
|
|
76
|
+
*/
|
|
77
|
+
async apiAdminClubsPostRaw(requestParameters: ApiAdminClubsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateClubForSuperadminResponse>> {
|
|
78
|
+
if (requestParameters['createClubForSuperadminParams'] == null) {
|
|
79
|
+
throw new runtime.RequiredError(
|
|
80
|
+
'createClubForSuperadminParams',
|
|
81
|
+
'Required parameter "createClubForSuperadminParams" was null or undefined when calling apiAdminClubsPost().'
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const queryParameters: any = {};
|
|
86
|
+
|
|
87
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
88
|
+
|
|
89
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
90
|
+
|
|
91
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
92
|
+
const token = this.configuration.accessToken;
|
|
93
|
+
const tokenString = await token("bearerAuth", []);
|
|
94
|
+
|
|
95
|
+
if (tokenString) {
|
|
96
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const response = await this.request({
|
|
100
|
+
path: `/api/admin/clubs`,
|
|
101
|
+
method: 'POST',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
body: CreateClubForSuperadminParamsToJSON(requestParameters['createClubForSuperadminParams']),
|
|
105
|
+
}, initOverrides);
|
|
106
|
+
|
|
107
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CreateClubForSuperadminResponseFromJSON(jsonValue));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Create a new club with admin user (SUPERADMIN only)
|
|
112
|
+
*/
|
|
113
|
+
async apiAdminClubsPost(requestParameters: ApiAdminClubsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateClubForSuperadminResponse> {
|
|
114
|
+
const response = await this.apiAdminClubsPostRaw(requestParameters, initOverrides);
|
|
115
|
+
return await response.value();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
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
|
+
CreateFeatureRequest,
|
|
19
|
+
Feature,
|
|
20
|
+
UpdateFeatureRequest,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CreateFeatureRequestFromJSON,
|
|
24
|
+
CreateFeatureRequestToJSON,
|
|
25
|
+
FeatureFromJSON,
|
|
26
|
+
FeatureToJSON,
|
|
27
|
+
UpdateFeatureRequestFromJSON,
|
|
28
|
+
UpdateFeatureRequestToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface CreateFeatureOperationRequest {
|
|
32
|
+
createFeatureRequest: CreateFeatureRequest;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeleteFeatureRequest {
|
|
36
|
+
id: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface GetFeatureRequest {
|
|
40
|
+
id: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface UpdateFeatureOperationRequest {
|
|
44
|
+
id: string;
|
|
45
|
+
updateFeatureRequest: UpdateFeatureRequest;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export class AdminFeaturesApi extends runtime.BaseAPI {
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Create a new feature
|
|
55
|
+
*/
|
|
56
|
+
async createFeatureRaw(requestParameters: CreateFeatureOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Feature>> {
|
|
57
|
+
if (requestParameters['createFeatureRequest'] == null) {
|
|
58
|
+
throw new runtime.RequiredError(
|
|
59
|
+
'createFeatureRequest',
|
|
60
|
+
'Required parameter "createFeatureRequest" was null or undefined when calling createFeature().'
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const queryParameters: any = {};
|
|
65
|
+
|
|
66
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
67
|
+
|
|
68
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
69
|
+
|
|
70
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
71
|
+
const token = this.configuration.accessToken;
|
|
72
|
+
const tokenString = await token("bearerAuth", []);
|
|
73
|
+
|
|
74
|
+
if (tokenString) {
|
|
75
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const response = await this.request({
|
|
79
|
+
path: `/api/admin/features`,
|
|
80
|
+
method: 'POST',
|
|
81
|
+
headers: headerParameters,
|
|
82
|
+
query: queryParameters,
|
|
83
|
+
body: CreateFeatureRequestToJSON(requestParameters['createFeatureRequest']),
|
|
84
|
+
}, initOverrides);
|
|
85
|
+
|
|
86
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FeatureFromJSON(jsonValue));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Create a new feature
|
|
91
|
+
*/
|
|
92
|
+
async createFeature(requestParameters: CreateFeatureOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Feature> {
|
|
93
|
+
const response = await this.createFeatureRaw(requestParameters, initOverrides);
|
|
94
|
+
return await response.value();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Delete a feature
|
|
99
|
+
*/
|
|
100
|
+
async deleteFeatureRaw(requestParameters: DeleteFeatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
101
|
+
if (requestParameters['id'] == null) {
|
|
102
|
+
throw new runtime.RequiredError(
|
|
103
|
+
'id',
|
|
104
|
+
'Required parameter "id" was null or undefined when calling deleteFeature().'
|
|
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/admin/features/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
122
|
+
method: 'DELETE',
|
|
123
|
+
headers: headerParameters,
|
|
124
|
+
query: queryParameters,
|
|
125
|
+
}, initOverrides);
|
|
126
|
+
|
|
127
|
+
return new runtime.VoidApiResponse(response);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Delete a feature
|
|
132
|
+
*/
|
|
133
|
+
async deleteFeature(requestParameters: DeleteFeatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
134
|
+
await this.deleteFeatureRaw(requestParameters, initOverrides);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Get all features
|
|
139
|
+
*/
|
|
140
|
+
async getAllFeaturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Feature>>> {
|
|
141
|
+
const queryParameters: any = {};
|
|
142
|
+
|
|
143
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
144
|
+
|
|
145
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
146
|
+
const token = this.configuration.accessToken;
|
|
147
|
+
const tokenString = await token("bearerAuth", []);
|
|
148
|
+
|
|
149
|
+
if (tokenString) {
|
|
150
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
const response = await this.request({
|
|
154
|
+
path: `/api/admin/features`,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
}, initOverrides);
|
|
159
|
+
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FeatureFromJSON));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Get all features
|
|
165
|
+
*/
|
|
166
|
+
async getAllFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Feature>> {
|
|
167
|
+
const response = await this.getAllFeaturesRaw(initOverrides);
|
|
168
|
+
return await response.value();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Get a feature by ID
|
|
173
|
+
*/
|
|
174
|
+
async getFeatureRaw(requestParameters: GetFeatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Feature>> {
|
|
175
|
+
if (requestParameters['id'] == null) {
|
|
176
|
+
throw new runtime.RequiredError(
|
|
177
|
+
'id',
|
|
178
|
+
'Required parameter "id" was null or undefined when calling getFeature().'
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const queryParameters: any = {};
|
|
183
|
+
|
|
184
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
185
|
+
|
|
186
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
187
|
+
const token = this.configuration.accessToken;
|
|
188
|
+
const tokenString = await token("bearerAuth", []);
|
|
189
|
+
|
|
190
|
+
if (tokenString) {
|
|
191
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
const response = await this.request({
|
|
195
|
+
path: `/api/admin/features/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
196
|
+
method: 'GET',
|
|
197
|
+
headers: headerParameters,
|
|
198
|
+
query: queryParameters,
|
|
199
|
+
}, initOverrides);
|
|
200
|
+
|
|
201
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FeatureFromJSON(jsonValue));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Get a feature by ID
|
|
206
|
+
*/
|
|
207
|
+
async getFeature(requestParameters: GetFeatureRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Feature> {
|
|
208
|
+
const response = await this.getFeatureRaw(requestParameters, initOverrides);
|
|
209
|
+
return await response.value();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Updates an existing feature. Note - code field is unchangeable after creation.
|
|
214
|
+
* Update an existing feature
|
|
215
|
+
*/
|
|
216
|
+
async updateFeatureRaw(requestParameters: UpdateFeatureOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
217
|
+
if (requestParameters['id'] == null) {
|
|
218
|
+
throw new runtime.RequiredError(
|
|
219
|
+
'id',
|
|
220
|
+
'Required parameter "id" was null or undefined when calling updateFeature().'
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (requestParameters['updateFeatureRequest'] == null) {
|
|
225
|
+
throw new runtime.RequiredError(
|
|
226
|
+
'updateFeatureRequest',
|
|
227
|
+
'Required parameter "updateFeatureRequest" was null or undefined when calling updateFeature().'
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const queryParameters: any = {};
|
|
232
|
+
|
|
233
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
234
|
+
|
|
235
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
236
|
+
|
|
237
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
238
|
+
const token = this.configuration.accessToken;
|
|
239
|
+
const tokenString = await token("bearerAuth", []);
|
|
240
|
+
|
|
241
|
+
if (tokenString) {
|
|
242
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const response = await this.request({
|
|
246
|
+
path: `/api/admin/features/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
247
|
+
method: 'PUT',
|
|
248
|
+
headers: headerParameters,
|
|
249
|
+
query: queryParameters,
|
|
250
|
+
body: UpdateFeatureRequestToJSON(requestParameters['updateFeatureRequest']),
|
|
251
|
+
}, initOverrides);
|
|
252
|
+
|
|
253
|
+
return new runtime.VoidApiResponse(response);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Updates an existing feature. Note - code field is unchangeable after creation.
|
|
258
|
+
* Update an existing feature
|
|
259
|
+
*/
|
|
260
|
+
async updateFeature(requestParameters: UpdateFeatureOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
261
|
+
await this.updateFeatureRaw(requestParameters, initOverrides);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
}
|
|
@@ -15,11 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
ClonePlaySpotRequest,
|
|
18
19
|
GetAllPlaySpots200ResponseInner,
|
|
19
20
|
PlaySpot,
|
|
20
21
|
PlaySpotDto,
|
|
21
22
|
} from '../models/index';
|
|
22
23
|
import {
|
|
24
|
+
ClonePlaySpotRequestFromJSON,
|
|
25
|
+
ClonePlaySpotRequestToJSON,
|
|
23
26
|
GetAllPlaySpots200ResponseInnerFromJSON,
|
|
24
27
|
GetAllPlaySpots200ResponseInnerToJSON,
|
|
25
28
|
PlaySpotFromJSON,
|
|
@@ -28,6 +31,11 @@ import {
|
|
|
28
31
|
PlaySpotDtoToJSON,
|
|
29
32
|
} from '../models/index';
|
|
30
33
|
|
|
34
|
+
export interface ClonePlaySpotOperationRequest {
|
|
35
|
+
id: string;
|
|
36
|
+
clonePlaySpotRequest: ClonePlaySpotRequest;
|
|
37
|
+
}
|
|
38
|
+
|
|
31
39
|
export interface CreatePlaySpotRequest {
|
|
32
40
|
playSpotDto: PlaySpotDto;
|
|
33
41
|
}
|
|
@@ -54,6 +62,59 @@ export interface UpdatePlaySpotRequest {
|
|
|
54
62
|
*/
|
|
55
63
|
export class AdminPlaySpotsApi extends runtime.BaseAPI {
|
|
56
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Creates a copy of the specified play spot and automatically adds it to all related play-spot-shifts and play-prices
|
|
67
|
+
* Clone an existing play spot with a new name and code
|
|
68
|
+
*/
|
|
69
|
+
async clonePlaySpotRaw(requestParameters: ClonePlaySpotOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PlaySpot>> {
|
|
70
|
+
if (requestParameters['id'] == null) {
|
|
71
|
+
throw new runtime.RequiredError(
|
|
72
|
+
'id',
|
|
73
|
+
'Required parameter "id" was null or undefined when calling clonePlaySpot().'
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (requestParameters['clonePlaySpotRequest'] == null) {
|
|
78
|
+
throw new runtime.RequiredError(
|
|
79
|
+
'clonePlaySpotRequest',
|
|
80
|
+
'Required parameter "clonePlaySpotRequest" was null or undefined when calling clonePlaySpot().'
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const queryParameters: any = {};
|
|
85
|
+
|
|
86
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
87
|
+
|
|
88
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
89
|
+
|
|
90
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
91
|
+
const token = this.configuration.accessToken;
|
|
92
|
+
const tokenString = await token("bearerAuth", []);
|
|
93
|
+
|
|
94
|
+
if (tokenString) {
|
|
95
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const response = await this.request({
|
|
99
|
+
path: `/api/admin/play-spots/{id}/clone`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
|
100
|
+
method: 'POST',
|
|
101
|
+
headers: headerParameters,
|
|
102
|
+
query: queryParameters,
|
|
103
|
+
body: ClonePlaySpotRequestToJSON(requestParameters['clonePlaySpotRequest']),
|
|
104
|
+
}, initOverrides);
|
|
105
|
+
|
|
106
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PlaySpotFromJSON(jsonValue));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Creates a copy of the specified play spot and automatically adds it to all related play-spot-shifts and play-prices
|
|
111
|
+
* Clone an existing play spot with a new name and code
|
|
112
|
+
*/
|
|
113
|
+
async clonePlaySpot(requestParameters: ClonePlaySpotOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PlaySpot> {
|
|
114
|
+
const response = await this.clonePlaySpotRaw(requestParameters, initOverrides);
|
|
115
|
+
return await response.value();
|
|
116
|
+
}
|
|
117
|
+
|
|
57
118
|
/**
|
|
58
119
|
* Create a new play spot
|
|
59
120
|
*/
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
|
+
BlockSpots200Response,
|
|
19
|
+
BlockSpotsCommand,
|
|
18
20
|
CancelReservationRequest,
|
|
19
21
|
GetHourlyReservationStatus200Response,
|
|
20
22
|
InitiateReservationParams,
|
|
@@ -22,6 +24,10 @@ import type {
|
|
|
22
24
|
UpdateReservationAdminRequest,
|
|
23
25
|
} from '../models/index';
|
|
24
26
|
import {
|
|
27
|
+
BlockSpots200ResponseFromJSON,
|
|
28
|
+
BlockSpots200ResponseToJSON,
|
|
29
|
+
BlockSpotsCommandFromJSON,
|
|
30
|
+
BlockSpotsCommandToJSON,
|
|
25
31
|
CancelReservationRequestFromJSON,
|
|
26
32
|
CancelReservationRequestToJSON,
|
|
27
33
|
GetHourlyReservationStatus200ResponseFromJSON,
|
|
@@ -34,6 +40,10 @@ import {
|
|
|
34
40
|
UpdateReservationAdminRequestToJSON,
|
|
35
41
|
} from '../models/index';
|
|
36
42
|
|
|
43
|
+
export interface BlockSpotsRequest {
|
|
44
|
+
blockSpotsCommand: BlockSpotsCommand;
|
|
45
|
+
}
|
|
46
|
+
|
|
37
47
|
export interface CancelReservationOperationRequest {
|
|
38
48
|
cancelReservationRequest: CancelReservationRequest;
|
|
39
49
|
}
|
|
@@ -64,6 +74,50 @@ export interface UpdateReservationAdminOperationRequest {
|
|
|
64
74
|
*/
|
|
65
75
|
export class AdminReservationsApi extends runtime.BaseAPI {
|
|
66
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Block multiple play spots by creating BLOCK type reservations
|
|
79
|
+
*/
|
|
80
|
+
async blockSpotsRaw(requestParameters: BlockSpotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BlockSpots200Response>> {
|
|
81
|
+
if (requestParameters['blockSpotsCommand'] == null) {
|
|
82
|
+
throw new runtime.RequiredError(
|
|
83
|
+
'blockSpotsCommand',
|
|
84
|
+
'Required parameter "blockSpotsCommand" was null or undefined when calling blockSpots().'
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const queryParameters: any = {};
|
|
89
|
+
|
|
90
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
91
|
+
|
|
92
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
93
|
+
|
|
94
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
95
|
+
const token = this.configuration.accessToken;
|
|
96
|
+
const tokenString = await token("bearerAuth", []);
|
|
97
|
+
|
|
98
|
+
if (tokenString) {
|
|
99
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const response = await this.request({
|
|
103
|
+
path: `/api/admin/reservations/block`,
|
|
104
|
+
method: 'POST',
|
|
105
|
+
headers: headerParameters,
|
|
106
|
+
query: queryParameters,
|
|
107
|
+
body: BlockSpotsCommandToJSON(requestParameters['blockSpotsCommand']),
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BlockSpots200ResponseFromJSON(jsonValue));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Block multiple play spots by creating BLOCK type reservations
|
|
115
|
+
*/
|
|
116
|
+
async blockSpots(requestParameters: BlockSpotsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BlockSpots200Response> {
|
|
117
|
+
const response = await this.blockSpotsRaw(requestParameters, initOverrides);
|
|
118
|
+
return await response.value();
|
|
119
|
+
}
|
|
120
|
+
|
|
67
121
|
/**
|
|
68
122
|
* Cancel an existing reservation
|
|
69
123
|
*/
|