@jugarhoy/api 1.0.3 → 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/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/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 +24 -0
- package/package.json +1 -1
|
@@ -0,0 +1,331 @@
|
|
|
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
|
+
DeleteShift200Response,
|
|
19
|
+
GenerateSubscriptionBillsRequest,
|
|
20
|
+
LinkPaymentToBillRequest,
|
|
21
|
+
SubscriptionBill,
|
|
22
|
+
UpdateBillRequest,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
DeleteShift200ResponseFromJSON,
|
|
26
|
+
DeleteShift200ResponseToJSON,
|
|
27
|
+
GenerateSubscriptionBillsRequestFromJSON,
|
|
28
|
+
GenerateSubscriptionBillsRequestToJSON,
|
|
29
|
+
LinkPaymentToBillRequestFromJSON,
|
|
30
|
+
LinkPaymentToBillRequestToJSON,
|
|
31
|
+
SubscriptionBillFromJSON,
|
|
32
|
+
SubscriptionBillToJSON,
|
|
33
|
+
UpdateBillRequestFromJSON,
|
|
34
|
+
UpdateBillRequestToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface DeleteBillRequest {
|
|
38
|
+
billId: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface GenerateSubscriptionBillsOperationRequest {
|
|
42
|
+
subscriptionId: string;
|
|
43
|
+
generateSubscriptionBillsRequest?: GenerateSubscriptionBillsRequest;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface GetBillByIdRequest {
|
|
47
|
+
billId: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface GetSubscriptionBillsRequest {
|
|
51
|
+
subscriptionId: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface LinkPaymentToBillOperationRequest {
|
|
55
|
+
billId: string;
|
|
56
|
+
linkPaymentToBillRequest: LinkPaymentToBillRequest;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UpdateBillOperationRequest {
|
|
60
|
+
billId: string;
|
|
61
|
+
updateBillRequest?: UpdateBillRequest;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
*/
|
|
67
|
+
export class AdminSubscriptionBillingApi extends runtime.BaseAPI {
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Delete a bill
|
|
71
|
+
*/
|
|
72
|
+
async deleteBillRaw(requestParameters: DeleteBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteShift200Response>> {
|
|
73
|
+
if (requestParameters['billId'] == null) {
|
|
74
|
+
throw new runtime.RequiredError(
|
|
75
|
+
'billId',
|
|
76
|
+
'Required parameter "billId" was null or undefined when calling deleteBill().'
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const queryParameters: any = {};
|
|
81
|
+
|
|
82
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
83
|
+
|
|
84
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
85
|
+
const token = this.configuration.accessToken;
|
|
86
|
+
const tokenString = await token("bearerAuth", []);
|
|
87
|
+
|
|
88
|
+
if (tokenString) {
|
|
89
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const response = await this.request({
|
|
93
|
+
path: `/api/admin/bills/{billId}`.replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))),
|
|
94
|
+
method: 'DELETE',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
|
|
99
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteShift200ResponseFromJSON(jsonValue));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Delete a bill
|
|
104
|
+
*/
|
|
105
|
+
async deleteBill(requestParameters: DeleteBillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteShift200Response> {
|
|
106
|
+
const response = await this.deleteBillRaw(requestParameters, initOverrides);
|
|
107
|
+
return await response.value();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Generate bills for all members of a subscription for a billing period
|
|
112
|
+
*/
|
|
113
|
+
async generateSubscriptionBillsRaw(requestParameters: GenerateSubscriptionBillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionBill>>> {
|
|
114
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
115
|
+
throw new runtime.RequiredError(
|
|
116
|
+
'subscriptionId',
|
|
117
|
+
'Required parameter "subscriptionId" was null or undefined when calling generateSubscriptionBills().'
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const queryParameters: any = {};
|
|
122
|
+
|
|
123
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
124
|
+
|
|
125
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
126
|
+
|
|
127
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
128
|
+
const token = this.configuration.accessToken;
|
|
129
|
+
const tokenString = await token("bearerAuth", []);
|
|
130
|
+
|
|
131
|
+
if (tokenString) {
|
|
132
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const response = await this.request({
|
|
136
|
+
path: `/api/admin/subscriptions/{subscriptionId}/bills/generate`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
137
|
+
method: 'POST',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
body: GenerateSubscriptionBillsRequestToJSON(requestParameters['generateSubscriptionBillsRequest']),
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
|
|
143
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubscriptionBillFromJSON));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Generate bills for all members of a subscription for a billing period
|
|
148
|
+
*/
|
|
149
|
+
async generateSubscriptionBills(requestParameters: GenerateSubscriptionBillsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionBill>> {
|
|
150
|
+
const response = await this.generateSubscriptionBillsRaw(requestParameters, initOverrides);
|
|
151
|
+
return await response.value();
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Get a specific bill by ID
|
|
156
|
+
*/
|
|
157
|
+
async getBillByIdRaw(requestParameters: GetBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionBill>> {
|
|
158
|
+
if (requestParameters['billId'] == null) {
|
|
159
|
+
throw new runtime.RequiredError(
|
|
160
|
+
'billId',
|
|
161
|
+
'Required parameter "billId" was null or undefined when calling getBillById().'
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
const queryParameters: any = {};
|
|
166
|
+
|
|
167
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
168
|
+
|
|
169
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
170
|
+
const token = this.configuration.accessToken;
|
|
171
|
+
const tokenString = await token("bearerAuth", []);
|
|
172
|
+
|
|
173
|
+
if (tokenString) {
|
|
174
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const response = await this.request({
|
|
178
|
+
path: `/api/admin/bills/{billId}`.replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))),
|
|
179
|
+
method: 'GET',
|
|
180
|
+
headers: headerParameters,
|
|
181
|
+
query: queryParameters,
|
|
182
|
+
}, initOverrides);
|
|
183
|
+
|
|
184
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionBillFromJSON(jsonValue));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Get a specific bill by ID
|
|
189
|
+
*/
|
|
190
|
+
async getBillById(requestParameters: GetBillByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionBill> {
|
|
191
|
+
const response = await this.getBillByIdRaw(requestParameters, initOverrides);
|
|
192
|
+
return await response.value();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Get all bills for a subscription
|
|
197
|
+
*/
|
|
198
|
+
async getSubscriptionBillsRaw(requestParameters: GetSubscriptionBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionBill>>> {
|
|
199
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'subscriptionId',
|
|
202
|
+
'Required parameter "subscriptionId" was null or undefined when calling getSubscriptionBills().'
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const queryParameters: any = {};
|
|
207
|
+
|
|
208
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
209
|
+
|
|
210
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
211
|
+
const token = this.configuration.accessToken;
|
|
212
|
+
const tokenString = await token("bearerAuth", []);
|
|
213
|
+
|
|
214
|
+
if (tokenString) {
|
|
215
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const response = await this.request({
|
|
219
|
+
path: `/api/admin/subscriptions/{subscriptionId}/bills`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
|
|
220
|
+
method: 'GET',
|
|
221
|
+
headers: headerParameters,
|
|
222
|
+
query: queryParameters,
|
|
223
|
+
}, initOverrides);
|
|
224
|
+
|
|
225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubscriptionBillFromJSON));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Get all bills for a subscription
|
|
230
|
+
*/
|
|
231
|
+
async getSubscriptionBills(requestParameters: GetSubscriptionBillsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionBill>> {
|
|
232
|
+
const response = await this.getSubscriptionBillsRaw(requestParameters, initOverrides);
|
|
233
|
+
return await response.value();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Link a payment detail to a bill
|
|
238
|
+
*/
|
|
239
|
+
async linkPaymentToBillRaw(requestParameters: LinkPaymentToBillOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionBill>> {
|
|
240
|
+
if (requestParameters['billId'] == null) {
|
|
241
|
+
throw new runtime.RequiredError(
|
|
242
|
+
'billId',
|
|
243
|
+
'Required parameter "billId" was null or undefined when calling linkPaymentToBill().'
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (requestParameters['linkPaymentToBillRequest'] == null) {
|
|
248
|
+
throw new runtime.RequiredError(
|
|
249
|
+
'linkPaymentToBillRequest',
|
|
250
|
+
'Required parameter "linkPaymentToBillRequest" was null or undefined when calling linkPaymentToBill().'
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const queryParameters: any = {};
|
|
255
|
+
|
|
256
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
257
|
+
|
|
258
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
259
|
+
|
|
260
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
261
|
+
const token = this.configuration.accessToken;
|
|
262
|
+
const tokenString = await token("bearerAuth", []);
|
|
263
|
+
|
|
264
|
+
if (tokenString) {
|
|
265
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
const response = await this.request({
|
|
269
|
+
path: `/api/admin/bills/{billId}/link-payment`.replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))),
|
|
270
|
+
method: 'POST',
|
|
271
|
+
headers: headerParameters,
|
|
272
|
+
query: queryParameters,
|
|
273
|
+
body: LinkPaymentToBillRequestToJSON(requestParameters['linkPaymentToBillRequest']),
|
|
274
|
+
}, initOverrides);
|
|
275
|
+
|
|
276
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionBillFromJSON(jsonValue));
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Link a payment detail to a bill
|
|
281
|
+
*/
|
|
282
|
+
async linkPaymentToBill(requestParameters: LinkPaymentToBillOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionBill> {
|
|
283
|
+
const response = await this.linkPaymentToBillRaw(requestParameters, initOverrides);
|
|
284
|
+
return await response.value();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Update a bill
|
|
289
|
+
*/
|
|
290
|
+
async updateBillRaw(requestParameters: UpdateBillOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionBill>> {
|
|
291
|
+
if (requestParameters['billId'] == null) {
|
|
292
|
+
throw new runtime.RequiredError(
|
|
293
|
+
'billId',
|
|
294
|
+
'Required parameter "billId" was null or undefined when calling updateBill().'
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const queryParameters: any = {};
|
|
299
|
+
|
|
300
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
301
|
+
|
|
302
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
303
|
+
|
|
304
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
305
|
+
const token = this.configuration.accessToken;
|
|
306
|
+
const tokenString = await token("bearerAuth", []);
|
|
307
|
+
|
|
308
|
+
if (tokenString) {
|
|
309
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const response = await this.request({
|
|
313
|
+
path: `/api/admin/bills/{billId}`.replace(`{${"billId"}}`, encodeURIComponent(String(requestParameters['billId']))),
|
|
314
|
+
method: 'PUT',
|
|
315
|
+
headers: headerParameters,
|
|
316
|
+
query: queryParameters,
|
|
317
|
+
body: UpdateBillRequestToJSON(requestParameters['updateBillRequest']),
|
|
318
|
+
}, initOverrides);
|
|
319
|
+
|
|
320
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionBillFromJSON(jsonValue));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Update a bill
|
|
325
|
+
*/
|
|
326
|
+
async updateBill(requestParameters: UpdateBillOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionBill> {
|
|
327
|
+
const response = await this.updateBillRaw(requestParameters, initOverrides);
|
|
328
|
+
return await response.value();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
}
|