@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.
Files changed (46) hide show
  1. package/apis/AdminClubsApi.ts +118 -0
  2. package/apis/AdminFeaturesApi.ts +264 -0
  3. package/apis/AdminPlaySpotsApi.ts +61 -0
  4. package/apis/AdminReservationsApi.ts +54 -0
  5. package/apis/AdminSubscriptionBillingApi.ts +331 -0
  6. package/apis/AdminSubscriptionsApi.ts +312 -5
  7. package/apis/AuthApi.ts +57 -0
  8. package/apis/index.ts +3 -0
  9. package/models/AddCoachToSubscriptionRequest.ts +66 -0
  10. package/models/AddPlayerToSubscriptionRequest.ts +66 -0
  11. package/models/BlockSpotItem.ts +75 -0
  12. package/models/BlockSpots200Response.ts +73 -0
  13. package/models/BlockSpotsCommand.ts +109 -0
  14. package/models/ChargeOn.ts +1 -1
  15. package/models/ClonePlaySpotRequest.ts +75 -0
  16. package/models/CreateClubForSuperadminParams.ts +227 -0
  17. package/models/CreateClubForSuperadminResponse.ts +83 -0
  18. package/models/CreateClubForSuperadminResponseResult.ts +111 -0
  19. package/models/CreateClubForSuperadminResponseResultAdminUser.ts +73 -0
  20. package/models/CreateFeatureRequest.ts +103 -0
  21. package/models/ExtendSubscriptions200Response.ts +89 -0
  22. package/models/ExtendSubscriptions200ResponseDetailsInner.ts +81 -0
  23. package/models/Feature.ts +18 -0
  24. package/models/GenerateSubscriptionBillsRequest.ts +65 -0
  25. package/models/GetAllShifts200ResponseInner.ts +8 -0
  26. package/models/LinkPaymentToBillRequest.ts +66 -0
  27. package/models/ListAllClubsResponse.ts +83 -0
  28. package/models/ListAllClubsResponseResult.ts +81 -0
  29. package/models/PlayPrice.ts +2 -2
  30. package/models/PlaySpotShift.ts +8 -0
  31. package/models/PlaySubscription.ts +41 -0
  32. package/models/PlaySubscriptionCreateDto.ts +37 -3
  33. package/models/PlaySubscriptionListDto.ts +240 -0
  34. package/models/RequestPasswordReset200Response.ts +65 -0
  35. package/models/RequestPasswordReset500Response.ts +65 -0
  36. package/models/RequestPasswordResetRequest.ts +66 -0
  37. package/models/Reserve.ts +15 -0
  38. package/models/ReserveType.ts +1 -0
  39. package/models/Sport.ts +15 -6
  40. package/models/SubscriptionBill.ts +198 -0
  41. package/models/UpdateBillRequest.ts +91 -0
  42. package/models/UpdateFeatureRequest.ts +91 -0
  43. package/models/UpdateReservationAdminRequest.ts +8 -0
  44. package/models/UserRole.ts +2 -1
  45. package/models/index.ts +24 -0
  46. package/package.json +1 -1
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ListAllClubsResponseResult } from './ListAllClubsResponseResult';
17
+ import {
18
+ ListAllClubsResponseResultFromJSON,
19
+ ListAllClubsResponseResultFromJSONTyped,
20
+ ListAllClubsResponseResultToJSON,
21
+ ListAllClubsResponseResultToJSONTyped,
22
+ } from './ListAllClubsResponseResult';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ListAllClubsResponse
28
+ */
29
+ export interface ListAllClubsResponse {
30
+ /**
31
+ * Whether the operation was successful
32
+ * @type {boolean}
33
+ * @memberof ListAllClubsResponse
34
+ */
35
+ success: boolean;
36
+ /**
37
+ *
38
+ * @type {ListAllClubsResponseResult}
39
+ * @memberof ListAllClubsResponse
40
+ */
41
+ result: ListAllClubsResponseResult;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ListAllClubsResponse interface.
46
+ */
47
+ export function instanceOfListAllClubsResponse(value: object): value is ListAllClubsResponse {
48
+ if (!('success' in value) || value['success'] === undefined) return false;
49
+ if (!('result' in value) || value['result'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function ListAllClubsResponseFromJSON(json: any): ListAllClubsResponse {
54
+ return ListAllClubsResponseFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function ListAllClubsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAllClubsResponse {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'success': json['success'],
64
+ 'result': ListAllClubsResponseResultFromJSON(json['result']),
65
+ };
66
+ }
67
+
68
+ export function ListAllClubsResponseToJSON(json: any): ListAllClubsResponse {
69
+ return ListAllClubsResponseToJSONTyped(json, false);
70
+ }
71
+
72
+ export function ListAllClubsResponseToJSONTyped(value?: ListAllClubsResponse | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'success': value['success'],
80
+ 'result': ListAllClubsResponseResultToJSON(value['result']),
81
+ };
82
+ }
83
+
@@ -0,0 +1,81 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { Customer } from './Customer';
17
+ import {
18
+ CustomerFromJSON,
19
+ CustomerFromJSONTyped,
20
+ CustomerToJSON,
21
+ CustomerToJSONTyped,
22
+ } from './Customer';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ListAllClubsResponseResult
28
+ */
29
+ export interface ListAllClubsResponseResult {
30
+ /**
31
+ * List of all customers/clubs
32
+ * @type {Array<Customer>}
33
+ * @memberof ListAllClubsResponseResult
34
+ */
35
+ customers?: Array<Customer>;
36
+ /**
37
+ * Total number of customers
38
+ * @type {number}
39
+ * @memberof ListAllClubsResponseResult
40
+ */
41
+ total?: number;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the ListAllClubsResponseResult interface.
46
+ */
47
+ export function instanceOfListAllClubsResponseResult(value: object): value is ListAllClubsResponseResult {
48
+ return true;
49
+ }
50
+
51
+ export function ListAllClubsResponseResultFromJSON(json: any): ListAllClubsResponseResult {
52
+ return ListAllClubsResponseResultFromJSONTyped(json, false);
53
+ }
54
+
55
+ export function ListAllClubsResponseResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAllClubsResponseResult {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+
61
+ 'customers': json['customers'] == null ? undefined : ((json['customers'] as Array<any>).map(CustomerFromJSON)),
62
+ 'total': json['total'] == null ? undefined : json['total'],
63
+ };
64
+ }
65
+
66
+ export function ListAllClubsResponseResultToJSON(json: any): ListAllClubsResponseResult {
67
+ return ListAllClubsResponseResultToJSONTyped(json, false);
68
+ }
69
+
70
+ export function ListAllClubsResponseResultToJSONTyped(value?: ListAllClubsResponseResult | null, ignoreDiscriminator: boolean = false): any {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+
75
+ return {
76
+
77
+ 'customers': value['customers'] == null ? undefined : ((value['customers'] as Array<any>).map(CustomerToJSON)),
78
+ 'total': value['total'],
79
+ };
80
+ }
81
+
@@ -82,7 +82,7 @@ export interface PlayPrice {
82
82
  */
83
83
  isSubscription: boolean;
84
84
  /**
85
- * When to charge for this price (per session or monthly)
85
+ * When to charge for this price (per session or per subscription)
86
86
  * @type {string}
87
87
  * @memberof PlayPrice
88
88
  */
@@ -95,7 +95,7 @@ export interface PlayPrice {
95
95
  */
96
96
  export const PlayPriceChargeOnEnum = {
97
97
  Session: 'session',
98
- Monthly: 'monthly'
98
+ Subscription: 'subscription'
99
99
  } as const;
100
100
  export type PlayPriceChargeOnEnum = typeof PlayPriceChargeOnEnum[keyof typeof PlayPriceChargeOnEnum];
101
101
 
@@ -99,6 +99,12 @@ export interface PlaySpotShift {
99
99
  * @memberof PlaySpotShift
100
100
  */
101
101
  durations: Array<number>;
102
+ /**
103
+ * IDs of subscriptions linked to this shift
104
+ * @type {Array<string>}
105
+ * @memberof PlaySpotShift
106
+ */
107
+ subscriptionIds?: Array<string> | null;
102
108
  }
103
109
 
104
110
 
@@ -153,6 +159,7 @@ export function PlaySpotShiftFromJSONTyped(json: any, ignoreDiscriminator: boole
153
159
  'fromHour': json['fromHour'],
154
160
  'toHour': json['toHour'],
155
161
  'durations': json['durations'],
162
+ 'subscriptionIds': json['subscriptionIds'] == null ? undefined : json['subscriptionIds'],
156
163
  };
157
164
  }
158
165
 
@@ -179,6 +186,7 @@ export function PlaySpotShiftToJSONTyped(value?: PlaySpotShift | null, ignoreDis
179
186
  'fromHour': value['fromHour'],
180
187
  'toHour': value['toHour'],
181
188
  'durations': value['durations'],
189
+ 'subscriptionIds': value['subscriptionIds'],
182
190
  };
183
191
  }
184
192
 
@@ -87,6 +87,12 @@ export interface PlaySubscription {
87
87
  * @memberof PlaySubscription
88
88
  */
89
89
  type: PlaySubscriptionType;
90
+ /**
91
+ * Name of the subscription for reference
92
+ * @type {string}
93
+ * @memberof PlaySubscription
94
+ */
95
+ name: string;
90
96
  /**
91
97
  * ID of the user who owns the subscription
92
98
  * @type {string}
@@ -183,6 +189,30 @@ export interface PlaySubscription {
183
189
  * @memberof PlaySubscription
184
190
  */
185
191
  hasConflicts: boolean;
192
+ /**
193
+ * Whether to include the titular (userId) in billing
194
+ * @type {boolean}
195
+ * @memberof PlaySubscription
196
+ */
197
+ billTitular?: boolean;
198
+ /**
199
+ * Number of occurrences in the subscription (denormalized for performance)
200
+ * @type {number}
201
+ * @memberof PlaySubscription
202
+ */
203
+ occurrencesCount?: number;
204
+ /**
205
+ * Number of members in the subscription (denormalized for performance)
206
+ * @type {number}
207
+ * @memberof PlaySubscription
208
+ */
209
+ memberCount?: number;
210
+ /**
211
+ * Number of coaches in the subscription (denormalized for performance)
212
+ * @type {number}
213
+ * @memberof PlaySubscription
214
+ */
215
+ coachesCount?: number;
186
216
  /**
187
217
  * Date when the subscription was created
188
218
  * @type {Date}
@@ -205,6 +235,7 @@ export interface PlaySubscription {
205
235
  export function instanceOfPlaySubscription(value: object): value is PlaySubscription {
206
236
  if (!('customerId' in value) || value['customerId'] === undefined) return false;
207
237
  if (!('type' in value) || value['type'] === undefined) return false;
238
+ if (!('name' in value) || value['name'] === undefined) return false;
208
239
  if (!('userId' in value) || value['userId'] === undefined) return false;
209
240
  if (!('memberIds' in value) || value['memberIds'] === undefined) return false;
210
241
  if (!('startDate' in value) || value['startDate'] === undefined) return false;
@@ -235,6 +266,7 @@ export function PlaySubscriptionFromJSONTyped(json: any, ignoreDiscriminator: bo
235
266
  'id': json['id'] == null ? undefined : json['id'],
236
267
  'customerId': json['customerId'],
237
268
  'type': PlaySubscriptionTypeFromJSON(json['type']),
269
+ 'name': json['name'],
238
270
  'userId': json['userId'],
239
271
  'memberIds': json['memberIds'],
240
272
  'startDate': (new Date(json['startDate'])),
@@ -251,6 +283,10 @@ export function PlaySubscriptionFromJSONTyped(json: any, ignoreDiscriminator: bo
251
283
  'paymentTerms': PaymentTermsFromJSON(json['paymentTerms']),
252
284
  'status': ReserveStatusFromJSON(json['status']),
253
285
  'hasConflicts': json['hasConflicts'],
286
+ 'billTitular': json['billTitular'] == null ? undefined : json['billTitular'],
287
+ 'occurrencesCount': json['occurrencesCount'] == null ? undefined : json['occurrencesCount'],
288
+ 'memberCount': json['memberCount'] == null ? undefined : json['memberCount'],
289
+ 'coachesCount': json['coachesCount'] == null ? undefined : json['coachesCount'],
254
290
  'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
255
291
  'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
256
292
  };
@@ -270,6 +306,7 @@ export function PlaySubscriptionToJSONTyped(value?: PlaySubscription | null, ign
270
306
  'id': value['id'],
271
307
  'customerId': value['customerId'],
272
308
  'type': PlaySubscriptionTypeToJSON(value['type']),
309
+ 'name': value['name'],
273
310
  'userId': value['userId'],
274
311
  'memberIds': value['memberIds'],
275
312
  'startDate': ((value['startDate']).toISOString()),
@@ -286,6 +323,10 @@ export function PlaySubscriptionToJSONTyped(value?: PlaySubscription | null, ign
286
323
  'paymentTerms': PaymentTermsToJSON(value['paymentTerms']),
287
324
  'status': ReserveStatusToJSON(value['status']),
288
325
  'hasConflicts': value['hasConflicts'],
326
+ 'billTitular': value['billTitular'],
327
+ 'occurrencesCount': value['occurrencesCount'],
328
+ 'memberCount': value['memberCount'],
329
+ 'coachesCount': value['coachesCount'],
289
330
  'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
290
331
  'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
291
332
  };
@@ -54,6 +54,12 @@ export interface PlaySubscriptionCreateDto {
54
54
  * @memberof PlaySubscriptionCreateDto
55
55
  */
56
56
  type: PlaySubscriptionType;
57
+ /**
58
+ * Name of the subscription for reference
59
+ * @type {string}
60
+ * @memberof PlaySubscriptionCreateDto
61
+ */
62
+ name: string;
57
63
  /**
58
64
  * Start date of the subscription period
59
65
  * @type {Date}
@@ -90,6 +96,18 @@ export interface PlaySubscriptionCreateDto {
90
96
  * @memberof PlaySubscriptionCreateDto
91
97
  */
92
98
  matchRequirements: MatchRequirements;
99
+ /**
100
+ * User ID of the subscription owner (titular)
101
+ * @type {string}
102
+ * @memberof PlaySubscriptionCreateDto
103
+ */
104
+ userId: string;
105
+ /**
106
+ * Array of member IDs (players who will use the subscription)
107
+ * @type {Array<string>}
108
+ * @memberof PlaySubscriptionCreateDto
109
+ */
110
+ memberIds: Array<string>;
93
111
  /**
94
112
  * Array of coach IDs associated with the subscription
95
113
  * @type {Array<string>}
@@ -101,7 +119,13 @@ export interface PlaySubscriptionCreateDto {
101
119
  * @type {PaymentTerms}
102
120
  * @memberof PlaySubscriptionCreateDto
103
121
  */
104
- paymentTerms: PaymentTerms;
122
+ paymentTerms?: PaymentTerms;
123
+ /**
124
+ * Whether to include the titular (userId) in billing
125
+ * @type {boolean}
126
+ * @memberof PlaySubscriptionCreateDto
127
+ */
128
+ billTitular?: boolean;
105
129
  }
106
130
 
107
131
 
@@ -111,12 +135,14 @@ export interface PlaySubscriptionCreateDto {
111
135
  */
112
136
  export function instanceOfPlaySubscriptionCreateDto(value: object): value is PlaySubscriptionCreateDto {
113
137
  if (!('type' in value) || value['type'] === undefined) return false;
138
+ if (!('name' in value) || value['name'] === undefined) return false;
114
139
  if (!('startDate' in value) || value['startDate'] === undefined) return false;
115
140
  if (!('daysOfWeek' in value) || value['daysOfWeek'] === undefined) return false;
116
141
  if (!('hourFrom' in value) || value['hourFrom'] === undefined) return false;
117
142
  if (!('hourTo' in value) || value['hourTo'] === undefined) return false;
118
143
  if (!('matchRequirements' in value) || value['matchRequirements'] === undefined) return false;
119
- if (!('paymentTerms' in value) || value['paymentTerms'] === undefined) return false;
144
+ if (!('userId' in value) || value['userId'] === undefined) return false;
145
+ if (!('memberIds' in value) || value['memberIds'] === undefined) return false;
120
146
  return true;
121
147
  }
122
148
 
@@ -131,14 +157,18 @@ export function PlaySubscriptionCreateDtoFromJSONTyped(json: any, ignoreDiscrimi
131
157
  return {
132
158
 
133
159
  'type': PlaySubscriptionTypeFromJSON(json['type']),
160
+ 'name': json['name'],
134
161
  'startDate': (new Date(json['startDate'])),
135
162
  'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
136
163
  'daysOfWeek': ((json['daysOfWeek'] as Array<any>).map(DayOfWeekFromJSON)),
137
164
  'hourFrom': json['hourFrom'],
138
165
  'hourTo': json['hourTo'],
139
166
  'matchRequirements': MatchRequirementsFromJSON(json['matchRequirements']),
167
+ 'userId': json['userId'],
168
+ 'memberIds': json['memberIds'],
140
169
  'coachIds': json['coachIds'] == null ? undefined : json['coachIds'],
141
- 'paymentTerms': PaymentTermsFromJSON(json['paymentTerms']),
170
+ 'paymentTerms': json['paymentTerms'] == null ? undefined : PaymentTermsFromJSON(json['paymentTerms']),
171
+ 'billTitular': json['billTitular'] == null ? undefined : json['billTitular'],
142
172
  };
143
173
  }
144
174
 
@@ -154,14 +184,18 @@ export function PlaySubscriptionCreateDtoToJSONTyped(value?: PlaySubscriptionCre
154
184
  return {
155
185
 
156
186
  'type': PlaySubscriptionTypeToJSON(value['type']),
187
+ 'name': value['name'],
157
188
  'startDate': ((value['startDate']).toISOString().substring(0,10)),
158
189
  'endDate': value['endDate'] == null ? undefined : ((value['endDate'] as any).toISOString().substring(0,10)),
159
190
  'daysOfWeek': ((value['daysOfWeek'] as Array<any>).map(DayOfWeekToJSON)),
160
191
  'hourFrom': value['hourFrom'],
161
192
  'hourTo': value['hourTo'],
162
193
  'matchRequirements': MatchRequirementsToJSON(value['matchRequirements']),
194
+ 'userId': value['userId'],
195
+ 'memberIds': value['memberIds'],
163
196
  'coachIds': value['coachIds'],
164
197
  'paymentTerms': PaymentTermsToJSON(value['paymentTerms']),
198
+ 'billTitular': value['billTitular'],
165
199
  };
166
200
  }
167
201
 
@@ -0,0 +1,240 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Jugar Hoy - API
5
+ * API documentation for Jugar Hoy application
6
+ *
7
+ * The version of the OpenAPI document: 1.5.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PlaySubscriptionType } from './PlaySubscriptionType';
17
+ import {
18
+ PlaySubscriptionTypeFromJSON,
19
+ PlaySubscriptionTypeFromJSONTyped,
20
+ PlaySubscriptionTypeToJSON,
21
+ PlaySubscriptionTypeToJSONTyped,
22
+ } from './PlaySubscriptionType';
23
+ import type { ReserveStatus } from './ReserveStatus';
24
+ import {
25
+ ReserveStatusFromJSON,
26
+ ReserveStatusFromJSONTyped,
27
+ ReserveStatusToJSON,
28
+ ReserveStatusToJSONTyped,
29
+ } from './ReserveStatus';
30
+
31
+ /**
32
+ * Lightweight DTO for listing subscriptions without heavy relations
33
+ * @export
34
+ * @interface PlaySubscriptionListDto
35
+ */
36
+ export interface PlaySubscriptionListDto {
37
+ /**
38
+ * Unique identifier for the subscription
39
+ * @type {string}
40
+ * @memberof PlaySubscriptionListDto
41
+ */
42
+ id: string;
43
+ /**
44
+ * ID of the customer where the subscription is valid
45
+ * @type {string}
46
+ * @memberof PlaySubscriptionListDto
47
+ */
48
+ customerId: string;
49
+ /**
50
+ *
51
+ * @type {PlaySubscriptionType}
52
+ * @memberof PlaySubscriptionListDto
53
+ */
54
+ type: PlaySubscriptionType;
55
+ /**
56
+ * Name of the subscription for reference
57
+ * @type {string}
58
+ * @memberof PlaySubscriptionListDto
59
+ */
60
+ name: string;
61
+ /**
62
+ * ID of the user who owns the subscription
63
+ * @type {string}
64
+ * @memberof PlaySubscriptionListDto
65
+ */
66
+ userId: string;
67
+ /**
68
+ * Start date of the subscription period
69
+ * @type {Date}
70
+ * @memberof PlaySubscriptionListDto
71
+ */
72
+ startDate: Date;
73
+ /**
74
+ * End date of the subscription period (optional)
75
+ * @type {Date}
76
+ * @memberof PlaySubscriptionListDto
77
+ */
78
+ endDate?: Date | null;
79
+ /**
80
+ * Frequency of billing
81
+ * @type {string}
82
+ * @memberof PlaySubscriptionListDto
83
+ */
84
+ frequency?: string;
85
+ /**
86
+ * Start time of the subscription in HH:MM format (24-hour)
87
+ * @type {string}
88
+ * @memberof PlaySubscriptionListDto
89
+ */
90
+ hourFrom: string;
91
+ /**
92
+ * End time of the subscription in HH:MM format (24-hour)
93
+ * @type {string}
94
+ * @memberof PlaySubscriptionListDto
95
+ */
96
+ hourTo: string;
97
+ /**
98
+ * Date until which occurrences are valid
99
+ * @type {Date}
100
+ * @memberof PlaySubscriptionListDto
101
+ */
102
+ occurrencesUntil: Date;
103
+ /**
104
+ *
105
+ * @type {ReserveStatus}
106
+ * @memberof PlaySubscriptionListDto
107
+ */
108
+ status: ReserveStatus;
109
+ /**
110
+ * Whether the subscription has scheduling conflicts
111
+ * @type {boolean}
112
+ * @memberof PlaySubscriptionListDto
113
+ */
114
+ hasConflicts: boolean;
115
+ /**
116
+ * Whether to include the titular (userId) in billing
117
+ * @type {boolean}
118
+ * @memberof PlaySubscriptionListDto
119
+ */
120
+ billTitular?: boolean;
121
+ /**
122
+ * Number of occurrences in the subscription
123
+ * @type {number}
124
+ * @memberof PlaySubscriptionListDto
125
+ */
126
+ occurrencesCount: number;
127
+ /**
128
+ * Number of members in the subscription
129
+ * @type {number}
130
+ * @memberof PlaySubscriptionListDto
131
+ */
132
+ memberCount: number;
133
+ /**
134
+ * Number of coaches in the subscription
135
+ * @type {number}
136
+ * @memberof PlaySubscriptionListDto
137
+ */
138
+ coachesCount: number;
139
+ /**
140
+ * Date when the subscription was created
141
+ * @type {Date}
142
+ * @memberof PlaySubscriptionListDto
143
+ */
144
+ createdAt?: Date;
145
+ /**
146
+ * Date when the subscription was last updated
147
+ * @type {Date}
148
+ * @memberof PlaySubscriptionListDto
149
+ */
150
+ updatedAt?: Date;
151
+ }
152
+
153
+
154
+
155
+ /**
156
+ * Check if a given object implements the PlaySubscriptionListDto interface.
157
+ */
158
+ export function instanceOfPlaySubscriptionListDto(value: object): value is PlaySubscriptionListDto {
159
+ if (!('id' in value) || value['id'] === undefined) return false;
160
+ if (!('customerId' in value) || value['customerId'] === undefined) return false;
161
+ if (!('type' in value) || value['type'] === undefined) return false;
162
+ if (!('name' in value) || value['name'] === undefined) return false;
163
+ if (!('userId' in value) || value['userId'] === undefined) return false;
164
+ if (!('startDate' in value) || value['startDate'] === undefined) return false;
165
+ if (!('hourFrom' in value) || value['hourFrom'] === undefined) return false;
166
+ if (!('hourTo' in value) || value['hourTo'] === undefined) return false;
167
+ if (!('occurrencesUntil' in value) || value['occurrencesUntil'] === undefined) return false;
168
+ if (!('status' in value) || value['status'] === undefined) return false;
169
+ if (!('hasConflicts' in value) || value['hasConflicts'] === undefined) return false;
170
+ if (!('occurrencesCount' in value) || value['occurrencesCount'] === undefined) return false;
171
+ if (!('memberCount' in value) || value['memberCount'] === undefined) return false;
172
+ if (!('coachesCount' in value) || value['coachesCount'] === undefined) return false;
173
+ return true;
174
+ }
175
+
176
+ export function PlaySubscriptionListDtoFromJSON(json: any): PlaySubscriptionListDto {
177
+ return PlaySubscriptionListDtoFromJSONTyped(json, false);
178
+ }
179
+
180
+ export function PlaySubscriptionListDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PlaySubscriptionListDto {
181
+ if (json == null) {
182
+ return json;
183
+ }
184
+ return {
185
+
186
+ 'id': json['id'],
187
+ 'customerId': json['customerId'],
188
+ 'type': PlaySubscriptionTypeFromJSON(json['type']),
189
+ 'name': json['name'],
190
+ 'userId': json['userId'],
191
+ 'startDate': (new Date(json['startDate'])),
192
+ 'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
193
+ 'frequency': json['frequency'] == null ? undefined : json['frequency'],
194
+ 'hourFrom': json['hourFrom'],
195
+ 'hourTo': json['hourTo'],
196
+ 'occurrencesUntil': (new Date(json['occurrencesUntil'])),
197
+ 'status': ReserveStatusFromJSON(json['status']),
198
+ 'hasConflicts': json['hasConflicts'],
199
+ 'billTitular': json['billTitular'] == null ? undefined : json['billTitular'],
200
+ 'occurrencesCount': json['occurrencesCount'],
201
+ 'memberCount': json['memberCount'],
202
+ 'coachesCount': json['coachesCount'],
203
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
204
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
205
+ };
206
+ }
207
+
208
+ export function PlaySubscriptionListDtoToJSON(json: any): PlaySubscriptionListDto {
209
+ return PlaySubscriptionListDtoToJSONTyped(json, false);
210
+ }
211
+
212
+ export function PlaySubscriptionListDtoToJSONTyped(value?: PlaySubscriptionListDto | null, ignoreDiscriminator: boolean = false): any {
213
+ if (value == null) {
214
+ return value;
215
+ }
216
+
217
+ return {
218
+
219
+ 'id': value['id'],
220
+ 'customerId': value['customerId'],
221
+ 'type': PlaySubscriptionTypeToJSON(value['type']),
222
+ 'name': value['name'],
223
+ 'userId': value['userId'],
224
+ 'startDate': ((value['startDate']).toISOString()),
225
+ 'endDate': value['endDate'] == null ? undefined : ((value['endDate'] as any).toISOString()),
226
+ 'frequency': value['frequency'],
227
+ 'hourFrom': value['hourFrom'],
228
+ 'hourTo': value['hourTo'],
229
+ 'occurrencesUntil': ((value['occurrencesUntil']).toISOString()),
230
+ 'status': ReserveStatusToJSON(value['status']),
231
+ 'hasConflicts': value['hasConflicts'],
232
+ 'billTitular': value['billTitular'],
233
+ 'occurrencesCount': value['occurrencesCount'],
234
+ 'memberCount': value['memberCount'],
235
+ 'coachesCount': value['coachesCount'],
236
+ 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
237
+ 'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
238
+ };
239
+ }
240
+