@jugarhoy/api 1.1.55 → 1.1.56

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.
@@ -64,6 +64,10 @@ export interface GetLocationByCodeRequest {
64
64
  code: string;
65
65
  }
66
66
 
67
+ export interface GetLocationPaymentMethodsRequest {
68
+ locationId: string;
69
+ }
70
+
67
71
  export interface GetUserReservationRequest {
68
72
  id: string;
69
73
  }
@@ -261,6 +265,39 @@ export class ReservesApi extends runtime.BaseAPI {
261
265
  return await response.value();
262
266
  }
263
267
 
268
+ /**
269
+ * List enabled payment methods for a location\'s customer
270
+ */
271
+ async getLocationPaymentMethodsRaw(requestParameters: GetLocationPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>> {
272
+ if (requestParameters['locationId'] == null) {
273
+ throw new runtime.RequiredError(
274
+ 'locationId',
275
+ 'Required parameter "locationId" was null or undefined when calling getLocationPaymentMethods().'
276
+ );
277
+ }
278
+
279
+ const queryParameters: any = {};
280
+
281
+ const headerParameters: runtime.HTTPHeaders = {};
282
+
283
+ const response = await this.request({
284
+ path: `/api/reservations/location/{locationId}/payment-methods`.replace(`{${"locationId"}}`, encodeURIComponent(String(requestParameters['locationId']))),
285
+ method: 'GET',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ }, initOverrides);
289
+
290
+ return new runtime.JSONApiResponse<any>(response);
291
+ }
292
+
293
+ /**
294
+ * List enabled payment methods for a location\'s customer
295
+ */
296
+ async getLocationPaymentMethods(requestParameters: GetLocationPaymentMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>> {
297
+ const response = await this.getLocationPaymentMethodsRaw(requestParameters, initOverrides);
298
+ return await response.value();
299
+ }
300
+
264
301
  /**
265
302
  * Get a specific user reservation
266
303
  */
@@ -61,6 +61,18 @@ export interface AdminCreatePaymentMethodRequest {
61
61
  * @memberof AdminCreatePaymentMethodRequest
62
62
  */
63
63
  enabled?: boolean;
64
+ /**
65
+ * Whether to charge the Jugar Hoy platform fee for this method (default true)
66
+ * @type {boolean}
67
+ * @memberof AdminCreatePaymentMethodRequest
68
+ */
69
+ hasPlatformFee?: boolean;
70
+ /**
71
+ * When true, a disabled CustomerPaymentConfig is auto-created for new customers on club registration (default false)
72
+ * @type {boolean}
73
+ * @memberof AdminCreatePaymentMethodRequest
74
+ */
75
+ autoSetup?: boolean;
64
76
  }
65
77
 
66
78
  /**
@@ -89,6 +101,8 @@ export function AdminCreatePaymentMethodRequestFromJSONTyped(json: any, ignoreDi
89
101
  'conditions': json['conditions'] == null ? undefined : json['conditions'],
90
102
  'imageUrl': json['imageUrl'] == null ? undefined : json['imageUrl'],
91
103
  'enabled': json['enabled'] == null ? undefined : json['enabled'],
104
+ 'hasPlatformFee': json['hasPlatformFee'] == null ? undefined : json['hasPlatformFee'],
105
+ 'autoSetup': json['autoSetup'] == null ? undefined : json['autoSetup'],
92
106
  };
93
107
  }
94
108
 
@@ -110,6 +124,8 @@ export function AdminCreatePaymentMethodRequestToJSONTyped(value?: AdminCreatePa
110
124
  'conditions': value['conditions'],
111
125
  'imageUrl': value['imageUrl'],
112
126
  'enabled': value['enabled'],
127
+ 'hasPlatformFee': value['hasPlatformFee'],
128
+ 'autoSetup': value['autoSetup'],
113
129
  };
114
130
  }
115
131
 
@@ -55,6 +55,12 @@ export interface AdminUpdatePaymentMethodRequest {
55
55
  * @memberof AdminUpdatePaymentMethodRequest
56
56
  */
57
57
  enabled?: boolean;
58
+ /**
59
+ * When true, a disabled CustomerPaymentConfig is auto-created for new customers on club registration
60
+ * @type {boolean}
61
+ * @memberof AdminUpdatePaymentMethodRequest
62
+ */
63
+ autoSetup?: boolean;
58
64
  }
59
65
 
60
66
  /**
@@ -80,6 +86,7 @@ export function AdminUpdatePaymentMethodRequestFromJSONTyped(json: any, ignoreDi
80
86
  'conditions': json['conditions'] == null ? undefined : json['conditions'],
81
87
  'imageUrl': json['imageUrl'] == null ? undefined : json['imageUrl'],
82
88
  'enabled': json['enabled'] == null ? undefined : json['enabled'],
89
+ 'autoSetup': json['autoSetup'] == null ? undefined : json['autoSetup'],
83
90
  };
84
91
  }
85
92
 
@@ -100,6 +107,7 @@ export function AdminUpdatePaymentMethodRequestToJSONTyped(value?: AdminUpdatePa
100
107
  'conditions': value['conditions'],
101
108
  'imageUrl': value['imageUrl'],
102
109
  'enabled': value['enabled'],
110
+ 'autoSetup': value['autoSetup'],
103
111
  };
104
112
  }
105
113
 
@@ -63,6 +63,12 @@ export interface CreateCustomerPaymentConfigDto {
63
63
  * @memberof CreateCustomerPaymentConfigDto
64
64
  */
65
65
  bankCardId?: string | null;
66
+ /**
67
+ * Club's CBU for weekly service fee debit
68
+ * @type {string}
69
+ * @memberof CreateCustomerPaymentConfigDto
70
+ */
71
+ cbu?: string | null;
66
72
  /**
67
73
  * Whether this payment configuration is enabled
68
74
  * @type {boolean}
@@ -111,6 +117,7 @@ export function CreateCustomerPaymentConfigDtoFromJSONTyped(json: any, ignoreDis
111
117
  'discount': json['discount'] == null ? undefined : json['discount'],
112
118
  'surchargePct': json['surchargePct'] == null ? undefined : json['surchargePct'],
113
119
  'bankCardId': json['bankCardId'] == null ? undefined : json['bankCardId'],
120
+ 'cbu': json['cbu'] == null ? undefined : json['cbu'],
114
121
  'enabled': json['enabled'] == null ? undefined : json['enabled'],
115
122
  'apiKey': json['apiKey'] == null ? undefined : json['apiKey'],
116
123
  'collectorId': json['collectorId'] == null ? undefined : json['collectorId'],
@@ -134,6 +141,7 @@ export function CreateCustomerPaymentConfigDtoToJSONTyped(value?: CreateCustomer
134
141
  'discount': value['discount'],
135
142
  'surchargePct': value['surchargePct'],
136
143
  'bankCardId': value['bankCardId'],
144
+ 'cbu': value['cbu'],
137
145
  'enabled': value['enabled'],
138
146
  'apiKey': value['apiKey'],
139
147
  'collectorId': value['collectorId'],
@@ -75,6 +75,12 @@ export interface CustomerPaymentConfig {
75
75
  * @memberof CustomerPaymentConfig
76
76
  */
77
77
  bankCardId?: string | null;
78
+ /**
79
+ * Club's CBU for weekly service fee debit
80
+ * @type {string}
81
+ * @memberof CustomerPaymentConfig
82
+ */
83
+ cbu?: string | null;
78
84
  /**
79
85
  * Whether the OAuth provider account is linked (e.g. MercadoPago account authorized)
80
86
  * @type {boolean}
@@ -136,6 +142,7 @@ export function CustomerPaymentConfigFromJSONTyped(json: any, ignoreDiscriminato
136
142
  'discount': json['discount'],
137
143
  'surchargePct': json['surchargePct'] == null ? undefined : json['surchargePct'],
138
144
  'bankCardId': json['bankCardId'] == null ? undefined : json['bankCardId'],
145
+ 'cbu': json['cbu'] == null ? undefined : json['cbu'],
139
146
  'linked': json['linked'] == null ? undefined : json['linked'],
140
147
  'enabled': json['enabled'],
141
148
  'createdAt': (new Date(json['createdAt'])),
@@ -162,6 +169,7 @@ export function CustomerPaymentConfigToJSONTyped(value?: CustomerPaymentConfig |
162
169
  'discount': value['discount'],
163
170
  'surchargePct': value['surchargePct'],
164
171
  'bankCardId': value['bankCardId'],
172
+ 'cbu': value['cbu'],
165
173
  'linked': value['linked'],
166
174
  'enabled': value['enabled'],
167
175
  'createdAt': ((value['createdAt']).toISOString()),
@@ -63,6 +63,12 @@ export interface CustomerPaymentConfigDto {
63
63
  * @memberof CustomerPaymentConfigDto
64
64
  */
65
65
  bankCardId?: string | null;
66
+ /**
67
+ * Club's CBU for weekly service fee debit
68
+ * @type {string}
69
+ * @memberof CustomerPaymentConfigDto
70
+ */
71
+ cbu?: string | null;
66
72
  /**
67
73
  * Whether this payment configuration is enabled
68
74
  * @type {boolean}
@@ -101,6 +107,7 @@ export function CustomerPaymentConfigDtoFromJSONTyped(json: any, ignoreDiscrimin
101
107
  'discount': json['discount'],
102
108
  'surchargePct': json['surchargePct'] == null ? undefined : json['surchargePct'],
103
109
  'bankCardId': json['bankCardId'] == null ? undefined : json['bankCardId'],
110
+ 'cbu': json['cbu'] == null ? undefined : json['cbu'],
104
111
  'enabled': json['enabled'],
105
112
  };
106
113
  }
@@ -122,6 +129,7 @@ export function CustomerPaymentConfigDtoToJSONTyped(value?: CustomerPaymentConfi
122
129
  'discount': value['discount'],
123
130
  'surchargePct': value['surchargePct'],
124
131
  'bankCardId': value['bankCardId'],
132
+ 'cbu': value['cbu'],
125
133
  'enabled': value['enabled'],
126
134
  };
127
135
  }
@@ -67,6 +67,18 @@ export interface PaymentMethodInfoDto {
67
67
  * @memberof PaymentMethodInfoDto
68
68
  */
69
69
  enabled?: boolean;
70
+ /**
71
+ * Whether the Jugar Hoy platform fee is charged for this payment method. Set to false for methods with a direct provider agreement (e.g. TRANSFER_CUCURU).
72
+ * @type {boolean}
73
+ * @memberof PaymentMethodInfoDto
74
+ */
75
+ hasPlatformFee?: boolean;
76
+ /**
77
+ * When true, a disabled CustomerPaymentConfig is auto-created for new customers on club registration.
78
+ * @type {boolean}
79
+ * @memberof PaymentMethodInfoDto
80
+ */
81
+ autoSetup?: boolean;
70
82
  }
71
83
 
72
84
  /**
@@ -94,6 +106,8 @@ export function PaymentMethodInfoDtoFromJSONTyped(json: any, ignoreDiscriminator
94
106
  'conditions': json['conditions'] == null ? undefined : json['conditions'],
95
107
  'imageUrl': json['imageUrl'] == null ? undefined : json['imageUrl'],
96
108
  'enabled': json['enabled'] == null ? undefined : json['enabled'],
109
+ 'hasPlatformFee': json['hasPlatformFee'] == null ? undefined : json['hasPlatformFee'],
110
+ 'autoSetup': json['autoSetup'] == null ? undefined : json['autoSetup'],
97
111
  };
98
112
  }
99
113
 
@@ -116,6 +130,8 @@ export function PaymentMethodInfoDtoToJSONTyped(value?: PaymentMethodInfoDto | n
116
130
  'conditions': value['conditions'],
117
131
  'imageUrl': value['imageUrl'],
118
132
  'enabled': value['enabled'],
133
+ 'hasPlatformFee': value['hasPlatformFee'],
134
+ 'autoSetup': value['autoSetup'],
119
135
  };
120
136
  }
121
137
 
@@ -115,6 +115,12 @@ export interface UpcomingActivityDto {
115
115
  * @memberof UpcomingActivityDto
116
116
  */
117
117
  playSearchId?: string | null;
118
+ /**
119
+ * Team ID for PARTIDO_SEMANAL activities
120
+ * @type {string}
121
+ * @memberof UpcomingActivityDto
122
+ */
123
+ teamId?: string | null;
118
124
  }
119
125
 
120
126
 
@@ -137,7 +143,8 @@ export const UpcomingActivityDtoBadgeEnum = {
137
143
  Clase: 'clase',
138
144
  Falta1: 'falta1',
139
145
  CanchaAbierta: 'cancha_abierta',
140
- ClaseLibre: 'clase_libre'
146
+ ClaseLibre: 'clase_libre',
147
+ PartidoSemanal: 'partido_semanal'
141
148
  } as const;
142
149
  export type UpcomingActivityDtoBadgeEnum = typeof UpcomingActivityDtoBadgeEnum[keyof typeof UpcomingActivityDtoBadgeEnum];
143
150
 
@@ -183,6 +190,7 @@ export function UpcomingActivityDtoFromJSONTyped(json: any, ignoreDiscriminator:
183
190
  'personAvatarUrl': json['personAvatarUrl'] == null ? undefined : json['personAvatarUrl'],
184
191
  'reservationId': json['reservationId'] == null ? undefined : json['reservationId'],
185
192
  'playSearchId': json['playSearchId'] == null ? undefined : json['playSearchId'],
193
+ 'teamId': json['teamId'] == null ? undefined : json['teamId'],
186
194
  };
187
195
  }
188
196
 
@@ -213,6 +221,7 @@ export function UpcomingActivityDtoToJSONTyped(value?: UpcomingActivityDto | nul
213
221
  'personAvatarUrl': value['personAvatarUrl'],
214
222
  'reservationId': value['reservationId'],
215
223
  'playSearchId': value['playSearchId'],
224
+ 'teamId': value['teamId'],
216
225
  };
217
226
  }
218
227
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jugarhoy/api",
3
- "version": "1.1.55",
3
+ "version": "1.1.56",
4
4
  "description": "TypeScript SDK for Jugar Hoy API",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
package/runtime.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  */
14
14
 
15
15
 
16
- export const BASE_PATH = "http://localhost:6173".replace(/\/+$/, "");
16
+ export const BASE_PATH = "http://localhost:7173".replace(/\/+$/, "");
17
17
 
18
18
  export interface ConfigurationParameters {
19
19
  basePath?: string; // override base path