@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.
Files changed (48) 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/UsersApi.ts +51 -0
  9. package/apis/index.ts +3 -0
  10. package/models/AddCoachToSubscriptionRequest.ts +66 -0
  11. package/models/AddPlayerToSubscriptionRequest.ts +66 -0
  12. package/models/BlockSpotItem.ts +75 -0
  13. package/models/BlockSpots200Response.ts +73 -0
  14. package/models/BlockSpotsCommand.ts +109 -0
  15. package/models/ChargeOn.ts +1 -1
  16. package/models/ClonePlaySpotRequest.ts +75 -0
  17. package/models/CreateClubForSuperadminParams.ts +227 -0
  18. package/models/CreateClubForSuperadminResponse.ts +83 -0
  19. package/models/CreateClubForSuperadminResponseResult.ts +111 -0
  20. package/models/CreateClubForSuperadminResponseResultAdminUser.ts +73 -0
  21. package/models/CreateFeatureRequest.ts +103 -0
  22. package/models/ExtendSubscriptions200Response.ts +89 -0
  23. package/models/ExtendSubscriptions200ResponseDetailsInner.ts +81 -0
  24. package/models/Feature.ts +18 -0
  25. package/models/GenerateSubscriptionBillsRequest.ts +65 -0
  26. package/models/GetAllShifts200ResponseInner.ts +8 -0
  27. package/models/LinkPaymentToBillRequest.ts +66 -0
  28. package/models/ListAllClubsResponse.ts +83 -0
  29. package/models/ListAllClubsResponseResult.ts +81 -0
  30. package/models/PlayPrice.ts +2 -2
  31. package/models/PlaySpotShift.ts +8 -0
  32. package/models/PlaySubscription.ts +41 -0
  33. package/models/PlaySubscriptionCreateDto.ts +37 -3
  34. package/models/PlaySubscriptionListDto.ts +240 -0
  35. package/models/RequestPasswordReset200Response.ts +65 -0
  36. package/models/RequestPasswordReset500Response.ts +65 -0
  37. package/models/RequestPasswordResetRequest.ts +66 -0
  38. package/models/Reserve.ts +15 -0
  39. package/models/ReserveType.ts +1 -0
  40. package/models/SavePushTokenRequest.ts +66 -0
  41. package/models/Sport.ts +15 -6
  42. package/models/SubscriptionBill.ts +198 -0
  43. package/models/UpdateBillRequest.ts +91 -0
  44. package/models/UpdateFeatureRequest.ts +91 -0
  45. package/models/UpdateReservationAdminRequest.ts +8 -0
  46. package/models/UserRole.ts +2 -1
  47. package/models/index.ts +25 -0
  48. package/package.json +1 -1
@@ -0,0 +1,198 @@
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 { Frequency } from './Frequency';
17
+ import {
18
+ FrequencyFromJSON,
19
+ FrequencyFromJSONTyped,
20
+ FrequencyToJSON,
21
+ FrequencyToJSONTyped,
22
+ } from './Frequency';
23
+ import type { PaymentStatus } from './PaymentStatus';
24
+ import {
25
+ PaymentStatusFromJSON,
26
+ PaymentStatusFromJSONTyped,
27
+ PaymentStatusToJSON,
28
+ PaymentStatusToJSONTyped,
29
+ } from './PaymentStatus';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface SubscriptionBill
35
+ */
36
+ export interface SubscriptionBill {
37
+ /**
38
+ * Unique identifier for the bill
39
+ * @type {string}
40
+ * @memberof SubscriptionBill
41
+ */
42
+ id: string;
43
+ /**
44
+ * ID of the subscription this bill belongs to
45
+ * @type {string}
46
+ * @memberof SubscriptionBill
47
+ */
48
+ subscriptionId: string;
49
+ /**
50
+ * ID of the member being billed
51
+ * @type {string}
52
+ * @memberof SubscriptionBill
53
+ */
54
+ userId: string;
55
+ /**
56
+ * Start date of the billing period
57
+ * @type {Date}
58
+ * @memberof SubscriptionBill
59
+ */
60
+ billingPeriodStart: Date;
61
+ /**
62
+ * End date of the billing period
63
+ * @type {Date}
64
+ * @memberof SubscriptionBill
65
+ */
66
+ billingPeriodEnd: Date;
67
+ /**
68
+ * Due date for payment (typically period end + 5 days)
69
+ * @type {Date}
70
+ * @memberof SubscriptionBill
71
+ */
72
+ dueDate: Date;
73
+ /**
74
+ *
75
+ * @type {Frequency}
76
+ * @memberof SubscriptionBill
77
+ */
78
+ frequency: Frequency;
79
+ /**
80
+ *
81
+ * @type {PaymentStatus}
82
+ * @memberof SubscriptionBill
83
+ */
84
+ status: PaymentStatus;
85
+ /**
86
+ * Amount to be paid
87
+ * @type {number}
88
+ * @memberof SubscriptionBill
89
+ */
90
+ amount: number;
91
+ /**
92
+ * Currency code (e.g., ARS, USD)
93
+ * @type {string}
94
+ * @memberof SubscriptionBill
95
+ */
96
+ currency: string;
97
+ /**
98
+ * ID of the payment detail when bill is paid
99
+ * @type {string}
100
+ * @memberof SubscriptionBill
101
+ */
102
+ paymentDetailId?: string | null;
103
+ /**
104
+ * Additional notes or comments about the bill
105
+ * @type {string}
106
+ * @memberof SubscriptionBill
107
+ */
108
+ notes?: string | null;
109
+ /**
110
+ * When the bill was created
111
+ * @type {Date}
112
+ * @memberof SubscriptionBill
113
+ */
114
+ createdAt: Date;
115
+ /**
116
+ * When the bill was last updated
117
+ * @type {Date}
118
+ * @memberof SubscriptionBill
119
+ */
120
+ updatedAt: Date;
121
+ }
122
+
123
+
124
+
125
+ /**
126
+ * Check if a given object implements the SubscriptionBill interface.
127
+ */
128
+ export function instanceOfSubscriptionBill(value: object): value is SubscriptionBill {
129
+ if (!('id' in value) || value['id'] === undefined) return false;
130
+ if (!('subscriptionId' in value) || value['subscriptionId'] === undefined) return false;
131
+ if (!('userId' in value) || value['userId'] === undefined) return false;
132
+ if (!('billingPeriodStart' in value) || value['billingPeriodStart'] === undefined) return false;
133
+ if (!('billingPeriodEnd' in value) || value['billingPeriodEnd'] === undefined) return false;
134
+ if (!('dueDate' in value) || value['dueDate'] === undefined) return false;
135
+ if (!('frequency' in value) || value['frequency'] === undefined) return false;
136
+ if (!('status' in value) || value['status'] === undefined) return false;
137
+ if (!('amount' in value) || value['amount'] === undefined) return false;
138
+ if (!('currency' in value) || value['currency'] === undefined) return false;
139
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
140
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
141
+ return true;
142
+ }
143
+
144
+ export function SubscriptionBillFromJSON(json: any): SubscriptionBill {
145
+ return SubscriptionBillFromJSONTyped(json, false);
146
+ }
147
+
148
+ export function SubscriptionBillFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionBill {
149
+ if (json == null) {
150
+ return json;
151
+ }
152
+ return {
153
+
154
+ 'id': json['id'],
155
+ 'subscriptionId': json['subscriptionId'],
156
+ 'userId': json['userId'],
157
+ 'billingPeriodStart': (new Date(json['billingPeriodStart'])),
158
+ 'billingPeriodEnd': (new Date(json['billingPeriodEnd'])),
159
+ 'dueDate': (new Date(json['dueDate'])),
160
+ 'frequency': FrequencyFromJSON(json['frequency']),
161
+ 'status': PaymentStatusFromJSON(json['status']),
162
+ 'amount': json['amount'],
163
+ 'currency': json['currency'],
164
+ 'paymentDetailId': json['paymentDetailId'] == null ? undefined : json['paymentDetailId'],
165
+ 'notes': json['notes'] == null ? undefined : json['notes'],
166
+ 'createdAt': (new Date(json['createdAt'])),
167
+ 'updatedAt': (new Date(json['updatedAt'])),
168
+ };
169
+ }
170
+
171
+ export function SubscriptionBillToJSON(json: any): SubscriptionBill {
172
+ return SubscriptionBillToJSONTyped(json, false);
173
+ }
174
+
175
+ export function SubscriptionBillToJSONTyped(value?: SubscriptionBill | null, ignoreDiscriminator: boolean = false): any {
176
+ if (value == null) {
177
+ return value;
178
+ }
179
+
180
+ return {
181
+
182
+ 'id': value['id'],
183
+ 'subscriptionId': value['subscriptionId'],
184
+ 'userId': value['userId'],
185
+ 'billingPeriodStart': ((value['billingPeriodStart']).toISOString()),
186
+ 'billingPeriodEnd': ((value['billingPeriodEnd']).toISOString()),
187
+ 'dueDate': ((value['dueDate']).toISOString()),
188
+ 'frequency': FrequencyToJSON(value['frequency']),
189
+ 'status': PaymentStatusToJSON(value['status']),
190
+ 'amount': value['amount'],
191
+ 'currency': value['currency'],
192
+ 'paymentDetailId': value['paymentDetailId'],
193
+ 'notes': value['notes'],
194
+ 'createdAt': ((value['createdAt']).toISOString()),
195
+ 'updatedAt': ((value['updatedAt']).toISOString()),
196
+ };
197
+ }
198
+
@@ -0,0 +1,91 @@
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 { PaymentStatus } from './PaymentStatus';
17
+ import {
18
+ PaymentStatusFromJSON,
19
+ PaymentStatusFromJSONTyped,
20
+ PaymentStatusToJSON,
21
+ PaymentStatusToJSONTyped,
22
+ } from './PaymentStatus';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateBillRequest
28
+ */
29
+ export interface UpdateBillRequest {
30
+ /**
31
+ * Additional notes for the bill
32
+ * @type {string}
33
+ * @memberof UpdateBillRequest
34
+ */
35
+ notes?: string;
36
+ /**
37
+ *
38
+ * @type {PaymentStatus}
39
+ * @memberof UpdateBillRequest
40
+ */
41
+ status?: PaymentStatus;
42
+ /**
43
+ * Bill amount
44
+ * @type {number}
45
+ * @memberof UpdateBillRequest
46
+ */
47
+ amount?: number;
48
+ }
49
+
50
+
51
+
52
+ /**
53
+ * Check if a given object implements the UpdateBillRequest interface.
54
+ */
55
+ export function instanceOfUpdateBillRequest(value: object): value is UpdateBillRequest {
56
+ return true;
57
+ }
58
+
59
+ export function UpdateBillRequestFromJSON(json: any): UpdateBillRequest {
60
+ return UpdateBillRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function UpdateBillRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateBillRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'notes': json['notes'] == null ? undefined : json['notes'],
70
+ 'status': json['status'] == null ? undefined : PaymentStatusFromJSON(json['status']),
71
+ 'amount': json['amount'] == null ? undefined : json['amount'],
72
+ };
73
+ }
74
+
75
+ export function UpdateBillRequestToJSON(json: any): UpdateBillRequest {
76
+ return UpdateBillRequestToJSONTyped(json, false);
77
+ }
78
+
79
+ export function UpdateBillRequestToJSONTyped(value?: UpdateBillRequest | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'notes': value['notes'],
87
+ 'status': PaymentStatusToJSON(value['status']),
88
+ 'amount': value['amount'],
89
+ };
90
+ }
91
+
@@ -0,0 +1,91 @@
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 { Sport } from './Sport';
17
+ import {
18
+ SportFromJSON,
19
+ SportFromJSONTyped,
20
+ SportToJSON,
21
+ SportToJSONTyped,
22
+ } from './Sport';
23
+
24
+ /**
25
+ * Note - code field is not updatable
26
+ * @export
27
+ * @interface UpdateFeatureRequest
28
+ */
29
+ export interface UpdateFeatureRequest {
30
+ /**
31
+ * Name of the feature
32
+ * @type {string}
33
+ * @memberof UpdateFeatureRequest
34
+ */
35
+ name?: string;
36
+ /**
37
+ * Description of the feature
38
+ * @type {string}
39
+ * @memberof UpdateFeatureRequest
40
+ */
41
+ description?: string;
42
+ /**
43
+ *
44
+ * @type {Sport}
45
+ * @memberof UpdateFeatureRequest
46
+ */
47
+ sport?: Sport;
48
+ }
49
+
50
+
51
+
52
+ /**
53
+ * Check if a given object implements the UpdateFeatureRequest interface.
54
+ */
55
+ export function instanceOfUpdateFeatureRequest(value: object): value is UpdateFeatureRequest {
56
+ return true;
57
+ }
58
+
59
+ export function UpdateFeatureRequestFromJSON(json: any): UpdateFeatureRequest {
60
+ return UpdateFeatureRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function UpdateFeatureRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateFeatureRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'name': json['name'] == null ? undefined : json['name'],
70
+ 'description': json['description'] == null ? undefined : json['description'],
71
+ 'sport': json['sport'] == null ? undefined : SportFromJSON(json['sport']),
72
+ };
73
+ }
74
+
75
+ export function UpdateFeatureRequestToJSON(json: any): UpdateFeatureRequest {
76
+ return UpdateFeatureRequestToJSONTyped(json, false);
77
+ }
78
+
79
+ export function UpdateFeatureRequestToJSONTyped(value?: UpdateFeatureRequest | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'name': value['name'],
87
+ 'description': value['description'],
88
+ 'sport': SportToJSON(value['sport']),
89
+ };
90
+ }
91
+
@@ -39,6 +39,12 @@ export interface UpdateReservationAdminRequest {
39
39
  * @memberof UpdateReservationAdminRequest
40
40
  */
41
41
  notes?: string | null;
42
+ /**
43
+ * Set to true to manually confirm a pending reservation and bypass payment verification
44
+ * @type {boolean}
45
+ * @memberof UpdateReservationAdminRequest
46
+ */
47
+ forceConfirm?: boolean;
42
48
  }
43
49
 
44
50
 
@@ -62,6 +68,7 @@ export function UpdateReservationAdminRequestFromJSONTyped(json: any, ignoreDisc
62
68
 
63
69
  'paymentMethod': json['paymentMethod'] == null ? undefined : PaymentMethodFromJSON(json['paymentMethod']),
64
70
  'notes': json['notes'] == null ? undefined : json['notes'],
71
+ 'forceConfirm': json['forceConfirm'] == null ? undefined : json['forceConfirm'],
65
72
  };
66
73
  }
67
74
 
@@ -78,6 +85,7 @@ export function UpdateReservationAdminRequestToJSONTyped(value?: UpdateReservati
78
85
 
79
86
  'paymentMethod': PaymentMethodToJSON(value['paymentMethod']),
80
87
  'notes': value['notes'],
88
+ 'forceConfirm': value['forceConfirm'],
81
89
  };
82
90
  }
83
91
 
@@ -19,7 +19,8 @@
19
19
  */
20
20
  export const UserRole = {
21
21
  Admin: 'admin',
22
- User: 'user'
22
+ User: 'user',
23
+ Superadmin: 'superadmin'
23
24
  } as const;
24
25
  export type UserRole = typeof UserRole[keyof typeof UserRole];
25
26
 
package/models/index.ts CHANGED
@@ -1,18 +1,24 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './AddCoachToSubscriptionRequest';
3
4
  export * from './AddMemberToSubscriptionRequest';
5
+ export * from './AddPlayerToSubscriptionRequest';
4
6
  export * from './ApiAdminInvitationsPost200Response';
5
7
  export * from './ApiAdminPlayPricesIdPutRequest';
6
8
  export * from './ApiAdminPlayPricesPostRequest';
7
9
  export * from './AvailabilityShift';
8
10
  export * from './AvailabilityShiftHour';
9
11
  export * from './AvailabilityShiftSpot';
12
+ export * from './BlockSpotItem';
13
+ export * from './BlockSpots200Response';
14
+ export * from './BlockSpotsCommand';
10
15
  export * from './CancelReservationParams';
11
16
  export * from './CancelReservationRequest';
12
17
  export * from './CancelReservationResult';
13
18
  export * from './ChargeOn';
14
19
  export * from './Check200Response';
15
20
  export * from './CheckUserExists200Response';
21
+ export * from './ClonePlaySpotRequest';
16
22
  export * from './ClubDto';
17
23
  export * from './ClubSearchParams';
18
24
  export * from './ClubSearchParamsGeo';
@@ -30,8 +36,13 @@ export * from './CreateBasicUserDto';
30
36
  export * from './CreateCheckoutPreferenceRequest';
31
37
  export * from './CreateCheckoutPreferenceRequestBackUrls';
32
38
  export * from './CreateCheckoutPreferenceRequestItemsInner';
39
+ export * from './CreateClubForSuperadminParams';
40
+ export * from './CreateClubForSuperadminResponse';
41
+ export * from './CreateClubForSuperadminResponseResult';
42
+ export * from './CreateClubForSuperadminResponseResultAdminUser';
33
43
  export * from './CreateCustomerPaymentConfigDto';
34
44
  export * from './CreateDefault500Response';
45
+ export * from './CreateFeatureRequest';
35
46
  export * from './CreateFromInvite400Response';
36
47
  export * from './CreateInvitationDto';
37
48
  export * from './CreateShiftRequest';
@@ -56,10 +67,13 @@ export * from './ErrorResponse';
56
67
  export * from './ExpireUnpaidReservationResult';
57
68
  export * from './ExpireUnpaidReservations401Response';
58
69
  export * from './ExpireUnpaidReservations500Response';
70
+ export * from './ExtendSubscriptions200Response';
71
+ export * from './ExtendSubscriptions200ResponseDetailsInner';
59
72
  export * from './Feature';
60
73
  export * from './FindOccurrences200Response';
61
74
  export * from './Frequency';
62
75
  export * from './GenerateCode500Response';
76
+ export * from './GenerateSubscriptionBillsRequest';
63
77
  export * from './GetAllDevices200ResponseInner';
64
78
  export * from './GetAllPlaySpots200ResponseInner';
65
79
  export * from './GetAllShifts200ResponseInner';
@@ -74,6 +88,9 @@ export * from './InvitationListItem';
74
88
  export * from './InvitationStatus';
75
89
  export * from './Level';
76
90
  export * from './LightControlResponse';
91
+ export * from './LinkPaymentToBillRequest';
92
+ export * from './ListAllClubsResponse';
93
+ export * from './ListAllClubsResponseResult';
77
94
  export * from './Location';
78
95
  export * from './LocationDto';
79
96
  export * from './ManageLightSwitch200Response';
@@ -98,6 +115,7 @@ export * from './PlaySpotShift';
98
115
  export * from './PlaySpotShortDto';
99
116
  export * from './PlaySubscription';
100
117
  export * from './PlaySubscriptionCreateDto';
118
+ export * from './PlaySubscriptionListDto';
101
119
  export * from './PlaySubscriptionParams';
102
120
  export * from './PlaySubscriptionType';
103
121
  export * from './PlayerCategory';
@@ -114,6 +132,9 @@ export * from './RegisterClubParams';
114
132
  export * from './RegisterClubResponse';
115
133
  export * from './RegisterClubResponseResult';
116
134
  export * from './RentHour';
135
+ export * from './RequestPasswordReset200Response';
136
+ export * from './RequestPasswordReset500Response';
137
+ export * from './RequestPasswordResetRequest';
117
138
  export * from './ReservationAccessCodeResponse';
118
139
  export * from './ReservationAccessCodeResponseResult';
119
140
  export * from './ReservationParams';
@@ -123,15 +144,19 @@ export * from './ReserveDto';
123
144
  export * from './ReserveSlotDto';
124
145
  export * from './ReserveStatus';
125
146
  export * from './ReserveType';
147
+ export * from './SavePushTokenRequest';
126
148
  export * from './SearchClubs400Response';
127
149
  export * from './SearchClubs500Response';
128
150
  export * from './SetAuthCodeDto';
129
151
  export * from './Shift';
130
152
  export * from './Sport';
153
+ export * from './SubscriptionBill';
131
154
  export * from './SuccessResponse';
132
155
  export * from './TimeOfDay';
133
156
  export * from './TriggerDeviceAction200Response';
134
157
  export * from './TriggerDeviceActionRequest';
158
+ export * from './UpdateBillRequest';
159
+ export * from './UpdateFeatureRequest';
135
160
  export * from './UpdateReservationAdminRequest';
136
161
  export * from './UpdateReserveDto';
137
162
  export * from './UpdateUserNotificationDto';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",