@tennac-booking/sdk 1.0.71 → 1.0.73

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/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.71
7
+ * The version of the OpenAPI document: 1.0.72
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -614,6 +614,25 @@ export interface BookingPopulated {
614
614
  }
615
615
 
616
616
 
617
+ /**
618
+ *
619
+ * @export
620
+ * @interface BookingPriceBody
621
+ */
622
+ export interface BookingPriceBody {
623
+ /**
624
+ *
625
+ * @type {Array<string>}
626
+ * @memberof BookingPriceBody
627
+ */
628
+ 'slotIds': Array<string>;
629
+ /**
630
+ *
631
+ * @type {Array<string>}
632
+ * @memberof BookingPriceBody
633
+ */
634
+ 'players': Array<string>;
635
+ }
617
636
  /**
618
637
  *
619
638
  * @export
@@ -1185,6 +1204,30 @@ export interface ClubResponse {
1185
1204
  * @memberof ClubResponse
1186
1205
  */
1187
1206
  'sports'?: Array<string>;
1207
+ /**
1208
+ * Autoriser plusieurs réservations en même temps
1209
+ * @type {boolean}
1210
+ * @memberof ClubResponse
1211
+ */
1212
+ 'allowMultipleBookingsAtTheSameTime'?: boolean | null;
1213
+ /**
1214
+ * Limite de réservations simultanées (même créneau)
1215
+ * @type {number}
1216
+ * @memberof ClubResponse
1217
+ */
1218
+ 'sameTimeBookingsLimit'?: number | null;
1219
+ /**
1220
+ * Limite d\'annulation en heures
1221
+ * @type {number}
1222
+ * @memberof ClubResponse
1223
+ */
1224
+ 'cancellationLimitHours'?: number | null;
1225
+ /**
1226
+ * Nombre maximum de réservations par semaine
1227
+ * @type {number}
1228
+ * @memberof ClubResponse
1229
+ */
1230
+ 'maxWeeklyBookings'?: number | null;
1188
1231
  /**
1189
1232
  *
1190
1233
  * @type {ClubResponseCreatedAt}
@@ -3822,6 +3865,30 @@ export interface PartialClubResponse {
3822
3865
  * @memberof PartialClubResponse
3823
3866
  */
3824
3867
  'sports'?: Array<string>;
3868
+ /**
3869
+ * Autoriser plusieurs réservations en même temps
3870
+ * @type {boolean}
3871
+ * @memberof PartialClubResponse
3872
+ */
3873
+ 'allowMultipleBookingsAtTheSameTime'?: boolean;
3874
+ /**
3875
+ * Limite de réservations simultanées (même créneau)
3876
+ * @type {number}
3877
+ * @memberof PartialClubResponse
3878
+ */
3879
+ 'sameTimeBookingsLimit'?: number;
3880
+ /**
3881
+ * Limite d\'annulation en heures
3882
+ * @type {number}
3883
+ * @memberof PartialClubResponse
3884
+ */
3885
+ 'cancellationLimitHours'?: number;
3886
+ /**
3887
+ * Nombre maximum de réservations par semaine
3888
+ * @type {number}
3889
+ * @memberof PartialClubResponse
3890
+ */
3891
+ 'maxWeeklyBookings'?: number;
3825
3892
  /**
3826
3893
  *
3827
3894
  * @type {ClubResponseCreatedAt}
@@ -4159,6 +4226,49 @@ export interface PlayerPaymentInfo {
4159
4226
  }
4160
4227
 
4161
4228
 
4229
+ /**
4230
+ *
4231
+ * @export
4232
+ * @interface PlayerPrice
4233
+ */
4234
+ export interface PlayerPrice {
4235
+ /**
4236
+ *
4237
+ * @type {string}
4238
+ * @memberof PlayerPrice
4239
+ */
4240
+ 'playerId': string;
4241
+ /**
4242
+ *
4243
+ * @type {string}
4244
+ * @memberof PlayerPrice
4245
+ */
4246
+ 'firstName'?: string;
4247
+ /**
4248
+ *
4249
+ * @type {string}
4250
+ * @memberof PlayerPrice
4251
+ */
4252
+ 'lastName'?: string;
4253
+ /**
4254
+ *
4255
+ * @type {Array<SubscriptionInfo>}
4256
+ * @memberof PlayerPrice
4257
+ */
4258
+ 'subscriptions': Array<SubscriptionInfo>;
4259
+ /**
4260
+ *
4261
+ * @type {number}
4262
+ * @memberof PlayerPrice
4263
+ */
4264
+ 'creditAvailablesInCents'?: number;
4265
+ /**
4266
+ *
4267
+ * @type {number}
4268
+ * @memberof PlayerPrice
4269
+ */
4270
+ 'price': number;
4271
+ }
4162
4272
  /**
4163
4273
  *
4164
4274
  * @export
@@ -6626,6 +6736,31 @@ export interface SubscriberPrice {
6626
6736
  */
6627
6737
  'amount': number;
6628
6738
  }
6739
+ /**
6740
+ *
6741
+ * @export
6742
+ * @interface SubscriptionInfo
6743
+ */
6744
+ export interface SubscriptionInfo {
6745
+ /**
6746
+ *
6747
+ * @type {string}
6748
+ * @memberof SubscriptionInfo
6749
+ */
6750
+ 'subscriptionPlanName'?: string;
6751
+ /**
6752
+ *
6753
+ * @type {string}
6754
+ * @memberof SubscriptionInfo
6755
+ */
6756
+ 'subscriptionDescription'?: string;
6757
+ /**
6758
+ *
6759
+ * @type {number}
6760
+ * @memberof SubscriptionInfo
6761
+ */
6762
+ 'reducedAmountInCents'?: number;
6763
+ }
6629
6764
  /**
6630
6765
  *
6631
6766
  * @export
@@ -7721,6 +7856,12 @@ export interface UserProfileResponse {
7721
7856
  * @memberof UserProfileResponse
7722
7857
  */
7723
7858
  'stripeLinks'?: { [key: string]: any; };
7859
+ /**
7860
+ *
7861
+ * @type {Array<SportResponse>}
7862
+ * @memberof UserProfileResponse
7863
+ */
7864
+ 'verifiedSports'?: Array<SportResponse>;
7724
7865
  }
7725
7866
 
7726
7867
 
@@ -7838,6 +7979,45 @@ export const BookingsApiAxiosParamCreator = function (configuration?: Configurat
7838
7979
  options: localVarRequestOptions,
7839
7980
  };
7840
7981
  },
7982
+ /**
7983
+ *
7984
+ * @param {BookingPriceBody} bookingPriceBody
7985
+ * @param {*} [options] Override http request option.
7986
+ * @throws {RequiredError}
7987
+ */
7988
+ getBookingPrice: async (bookingPriceBody: BookingPriceBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7989
+ // verify required parameter 'bookingPriceBody' is not null or undefined
7990
+ assertParamExists('getBookingPrice', 'bookingPriceBody', bookingPriceBody)
7991
+ const localVarPath = `/api/bookings/booking-price`;
7992
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
7993
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
7994
+ let baseOptions;
7995
+ if (configuration) {
7996
+ baseOptions = configuration.baseOptions;
7997
+ }
7998
+
7999
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
8000
+ const localVarHeaderParameter = {} as any;
8001
+ const localVarQueryParameter = {} as any;
8002
+
8003
+ // authentication bearerAuth required
8004
+ // http bearer authentication required
8005
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
8006
+
8007
+
8008
+
8009
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8010
+
8011
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
8012
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8013
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
8014
+ localVarRequestOptions.data = serializeDataIfNeeded(bookingPriceBody, localVarRequestOptions, configuration)
8015
+
8016
+ return {
8017
+ url: toPathString(localVarUrlObj),
8018
+ options: localVarRequestOptions,
8019
+ };
8020
+ },
7841
8021
  /**
7842
8022
  * Recherche des créneaux disponibles pour une réservation rapide
7843
8023
  * @param {number} [latitude]
@@ -7939,6 +8119,18 @@ export const BookingsApiFp = function(configuration?: Configuration) {
7939
8119
  const localVarOperationServerBasePath = operationServerMap['BookingsApi.getBookingHistory']?.[localVarOperationServerIndex]?.url;
7940
8120
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
7941
8121
  },
8122
+ /**
8123
+ *
8124
+ * @param {BookingPriceBody} bookingPriceBody
8125
+ * @param {*} [options] Override http request option.
8126
+ * @throws {RequiredError}
8127
+ */
8128
+ async getBookingPrice(bookingPriceBody: BookingPriceBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<PlayerPrice>>> {
8129
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getBookingPrice(bookingPriceBody, options);
8130
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
8131
+ const localVarOperationServerBasePath = operationServerMap['BookingsApi.getBookingPrice']?.[localVarOperationServerIndex]?.url;
8132
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
8133
+ },
7942
8134
  /**
7943
8135
  * Recherche des créneaux disponibles pour une réservation rapide
7944
8136
  * @param {number} [latitude]
@@ -7979,6 +8171,15 @@ export const BookingsApiFactory = function (configuration?: Configuration, baseP
7979
8171
  getBookingHistory(requestParameters: BookingsApiGetBookingHistoryRequest, options?: RawAxiosRequestConfig): AxiosPromise<BookingHistoryPopulated> {
7980
8172
  return localVarFp.getBookingHistory(requestParameters.bookingId, options).then((request) => request(axios, basePath));
7981
8173
  },
8174
+ /**
8175
+ *
8176
+ * @param {BookingsApiGetBookingPriceRequest} requestParameters Request parameters.
8177
+ * @param {*} [options] Override http request option.
8178
+ * @throws {RequiredError}
8179
+ */
8180
+ getBookingPrice(requestParameters: BookingsApiGetBookingPriceRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<PlayerPrice>> {
8181
+ return localVarFp.getBookingPrice(requestParameters.bookingPriceBody, options).then((request) => request(axios, basePath));
8182
+ },
7982
8183
  /**
7983
8184
  * Recherche des créneaux disponibles pour une réservation rapide
7984
8185
  * @param {BookingsApiGetQuickReservationSlotsRequest} requestParameters Request parameters.
@@ -8005,6 +8206,20 @@ export interface BookingsApiGetBookingHistoryRequest {
8005
8206
  readonly bookingId: string
8006
8207
  }
8007
8208
 
8209
+ /**
8210
+ * Request parameters for getBookingPrice operation in BookingsApi.
8211
+ * @export
8212
+ * @interface BookingsApiGetBookingPriceRequest
8213
+ */
8214
+ export interface BookingsApiGetBookingPriceRequest {
8215
+ /**
8216
+ *
8217
+ * @type {BookingPriceBody}
8218
+ * @memberof BookingsApiGetBookingPrice
8219
+ */
8220
+ readonly bookingPriceBody: BookingPriceBody
8221
+ }
8222
+
8008
8223
  /**
8009
8224
  * Request parameters for getQuickReservationSlots operation in BookingsApi.
8010
8225
  * @export
@@ -8100,6 +8315,17 @@ export class BookingsApi extends BaseAPI {
8100
8315
  return BookingsApiFp(this.configuration).getBookingHistory(requestParameters.bookingId, options).then((request) => request(this.axios, this.basePath));
8101
8316
  }
8102
8317
 
8318
+ /**
8319
+ *
8320
+ * @param {BookingsApiGetBookingPriceRequest} requestParameters Request parameters.
8321
+ * @param {*} [options] Override http request option.
8322
+ * @throws {RequiredError}
8323
+ * @memberof BookingsApi
8324
+ */
8325
+ public getBookingPrice(requestParameters: BookingsApiGetBookingPriceRequest, options?: RawAxiosRequestConfig) {
8326
+ return BookingsApiFp(this.configuration).getBookingPrice(requestParameters.bookingPriceBody, options).then((request) => request(this.axios, this.basePath));
8327
+ }
8328
+
8103
8329
  /**
8104
8330
  * Recherche des créneaux disponibles pour une réservation rapide
8105
8331
  * @param {BookingsApiGetQuickReservationSlotsRequest} requestParameters Request parameters.
@@ -15409,6 +15635,103 @@ export class SportsManagerApi extends BaseAPI {
15409
15635
 
15410
15636
 
15411
15637
 
15638
+ /**
15639
+ * SportsPublicApi - axios parameter creator
15640
+ * @export
15641
+ */
15642
+ export const SportsPublicApiAxiosParamCreator = function (configuration?: Configuration) {
15643
+ return {
15644
+ /**
15645
+ * Récupère tous les sports vérifiés, accessibles publiquement
15646
+ * @param {*} [options] Override http request option.
15647
+ * @throws {RequiredError}
15648
+ */
15649
+ getVerifiedSports: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
15650
+ const localVarPath = `/api/sports/verified`;
15651
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
15652
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
15653
+ let baseOptions;
15654
+ if (configuration) {
15655
+ baseOptions = configuration.baseOptions;
15656
+ }
15657
+
15658
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
15659
+ const localVarHeaderParameter = {} as any;
15660
+ const localVarQueryParameter = {} as any;
15661
+
15662
+
15663
+
15664
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
15665
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
15666
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
15667
+
15668
+ return {
15669
+ url: toPathString(localVarUrlObj),
15670
+ options: localVarRequestOptions,
15671
+ };
15672
+ },
15673
+ }
15674
+ };
15675
+
15676
+ /**
15677
+ * SportsPublicApi - functional programming interface
15678
+ * @export
15679
+ */
15680
+ export const SportsPublicApiFp = function(configuration?: Configuration) {
15681
+ const localVarAxiosParamCreator = SportsPublicApiAxiosParamCreator(configuration)
15682
+ return {
15683
+ /**
15684
+ * Récupère tous les sports vérifiés, accessibles publiquement
15685
+ * @param {*} [options] Override http request option.
15686
+ * @throws {RequiredError}
15687
+ */
15688
+ async getVerifiedSports(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SportResponse>>> {
15689
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getVerifiedSports(options);
15690
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
15691
+ const localVarOperationServerBasePath = operationServerMap['SportsPublicApi.getVerifiedSports']?.[localVarOperationServerIndex]?.url;
15692
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
15693
+ },
15694
+ }
15695
+ };
15696
+
15697
+ /**
15698
+ * SportsPublicApi - factory interface
15699
+ * @export
15700
+ */
15701
+ export const SportsPublicApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
15702
+ const localVarFp = SportsPublicApiFp(configuration)
15703
+ return {
15704
+ /**
15705
+ * Récupère tous les sports vérifiés, accessibles publiquement
15706
+ * @param {*} [options] Override http request option.
15707
+ * @throws {RequiredError}
15708
+ */
15709
+ getVerifiedSports(options?: RawAxiosRequestConfig): AxiosPromise<Array<SportResponse>> {
15710
+ return localVarFp.getVerifiedSports(options).then((request) => request(axios, basePath));
15711
+ },
15712
+ };
15713
+ };
15714
+
15715
+ /**
15716
+ * SportsPublicApi - object-oriented interface
15717
+ * @export
15718
+ * @class SportsPublicApi
15719
+ * @extends {BaseAPI}
15720
+ */
15721
+ export class SportsPublicApi extends BaseAPI {
15722
+ /**
15723
+ * Récupère tous les sports vérifiés, accessibles publiquement
15724
+ * @param {*} [options] Override http request option.
15725
+ * @throws {RequiredError}
15726
+ * @memberof SportsPublicApi
15727
+ */
15728
+ public getVerifiedSports(options?: RawAxiosRequestConfig) {
15729
+ return SportsPublicApiFp(this.configuration).getVerifiedSports(options).then((request) => request(this.axios, this.basePath));
15730
+ }
15731
+ }
15732
+
15733
+
15734
+
15412
15735
  /**
15413
15736
  * SportsStaffApi - axios parameter creator
15414
15737
  * @export
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.71
7
+ * The version of the OpenAPI document: 1.0.72
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.71
7
+ * The version of the OpenAPI document: 1.0.72
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.71
7
+ * The version of the OpenAPI document: 1.0.72
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).