@tennac-booking/sdk 1.0.229 → 1.0.230

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.
@@ -2,7 +2,7 @@
2
2
  * openapi.json
3
3
  * Pandook API Documentation
4
4
  *
5
- * The version of the OpenAPI document: 1.0.224
5
+ * The version of the OpenAPI document: 1.0.230
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/base.js 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.224
7
+ * The version of the OpenAPI document: 1.0.230
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,13 +29,15 @@ export const COLLECTION_FORMATS = {
29
29
  * @class BaseAPI
30
30
  */
31
31
  export class BaseAPI {
32
+ basePath;
33
+ axios;
34
+ configuration;
32
35
  constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
33
- var _a;
34
36
  this.basePath = basePath;
35
37
  this.axios = axios;
36
38
  if (configuration) {
37
39
  this.configuration = configuration;
38
- this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
40
+ this.basePath = configuration.basePath ?? basePath;
39
41
  }
40
42
  }
41
43
  }
@@ -47,6 +49,7 @@ export class BaseAPI {
47
49
  * @extends {Error}
48
50
  */
49
51
  export class RequiredError extends Error {
52
+ field;
50
53
  constructor(field, msg) {
51
54
  super(msg);
52
55
  this.field = field;
@@ -2,7 +2,7 @@
2
2
  * openapi.json
3
3
  * Pandook API Documentation
4
4
  *
5
- * The version of the OpenAPI document: 1.0.224
5
+ * The version of the OpenAPI document: 1.0.230
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,22 +4,13 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.224
7
+ * The version of the OpenAPI document: 1.0.230
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  import { RequiredError } from "./base";
24
15
  /**
25
16
  *
@@ -40,15 +31,13 @@ export const assertParamExists = function (functionName, paramName, paramValue)
40
31
  *
41
32
  * @export
42
33
  */
43
- export const setApiKeyToObject = function (object, keyParamName, configuration) {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- if (configuration && configuration.apiKey) {
46
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
47
- ? yield configuration.apiKey(keyParamName)
48
- : yield configuration.apiKey;
49
- object[keyParamName] = localVarApiKeyValue;
50
- }
51
- });
34
+ export const setApiKeyToObject = async function (object, keyParamName, configuration) {
35
+ if (configuration && configuration.apiKey) {
36
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
37
+ ? await configuration.apiKey(keyParamName)
38
+ : await configuration.apiKey;
39
+ object[keyParamName] = localVarApiKeyValue;
40
+ }
52
41
  };
53
42
  /**
54
43
  *
@@ -63,29 +52,25 @@ export const setBasicAuthToObject = function (object, configuration) {
63
52
  *
64
53
  * @export
65
54
  */
66
- export const setBearerAuthToObject = function (object, configuration) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- if (configuration && configuration.accessToken) {
69
- const accessToken = typeof configuration.accessToken === 'function'
70
- ? yield configuration.accessToken()
71
- : yield configuration.accessToken;
72
- object["Authorization"] = "Bearer " + accessToken;
73
- }
74
- });
55
+ export const setBearerAuthToObject = async function (object, configuration) {
56
+ if (configuration && configuration.accessToken) {
57
+ const accessToken = typeof configuration.accessToken === 'function'
58
+ ? await configuration.accessToken()
59
+ : await configuration.accessToken;
60
+ object["Authorization"] = "Bearer " + accessToken;
61
+ }
75
62
  };
76
63
  /**
77
64
  *
78
65
  * @export
79
66
  */
80
- export const setOAuthToObject = function (object, name, scopes, configuration) {
81
- return __awaiter(this, void 0, void 0, function* () {
82
- if (configuration && configuration.accessToken) {
83
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
84
- ? yield configuration.accessToken(name, scopes)
85
- : yield configuration.accessToken;
86
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
87
- }
88
- });
67
+ export const setOAuthToObject = async function (object, name, scopes, configuration) {
68
+ if (configuration && configuration.accessToken) {
69
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
70
+ ? await configuration.accessToken(name, scopes)
71
+ : await configuration.accessToken;
72
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
73
+ }
89
74
  };
90
75
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
91
76
  if (parameter == null)
@@ -142,8 +127,7 @@ export const toPathString = function (url) {
142
127
  */
143
128
  export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
144
129
  return (axios = globalAxios, basePath = BASE_PATH) => {
145
- var _a;
146
- const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
130
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
147
131
  return axios.request(axiosRequestArgs);
148
132
  };
149
133
  };
@@ -2,7 +2,7 @@
2
2
  * openapi.json
3
3
  * Pandook API Documentation
4
4
  *
5
- * The version of the OpenAPI document: 1.0.224
5
+ * The version of the OpenAPI document: 1.0.230
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * openapi.json
5
5
  * Pandook API Documentation
6
6
  *
7
- * The version of the OpenAPI document: 1.0.224
7
+ * The version of the OpenAPI document: 1.0.230
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,15 +12,75 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  export class Configuration {
15
+ /**
16
+ * parameter for apiKey security
17
+ * @param name security name
18
+ * @memberof Configuration
19
+ */
20
+ apiKey;
21
+ /**
22
+ * parameter for basic security
23
+ *
24
+ * @type {string}
25
+ * @memberof Configuration
26
+ */
27
+ username;
28
+ /**
29
+ * parameter for basic security
30
+ *
31
+ * @type {string}
32
+ * @memberof Configuration
33
+ */
34
+ password;
35
+ /**
36
+ * parameter for oauth2 security
37
+ * @param name security name
38
+ * @param scopes oauth2 scope
39
+ * @memberof Configuration
40
+ */
41
+ accessToken;
42
+ /**
43
+ * override base path
44
+ *
45
+ * @type {string}
46
+ * @memberof Configuration
47
+ */
48
+ basePath;
49
+ /**
50
+ * override server index
51
+ *
52
+ * @type {number}
53
+ * @memberof Configuration
54
+ */
55
+ serverIndex;
56
+ /**
57
+ * base options for axios calls
58
+ *
59
+ * @type {any}
60
+ * @memberof Configuration
61
+ */
62
+ baseOptions;
63
+ /**
64
+ * The FormData constructor that will be used to create multipart form data
65
+ * requests. You can inject this here so that execution environments that
66
+ * do not support the FormData class can still run the generated client.
67
+ *
68
+ * @type {new () => FormData}
69
+ */
70
+ formDataCtor;
15
71
  constructor(param = {}) {
16
- var _a;
17
72
  this.apiKey = param.apiKey;
18
73
  this.username = param.username;
19
74
  this.password = param.password;
20
75
  this.accessToken = param.accessToken;
21
76
  this.basePath = param.basePath;
22
77
  this.serverIndex = param.serverIndex;
23
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
78
+ this.baseOptions = {
79
+ ...param.baseOptions,
80
+ headers: {
81
+ ...param.baseOptions?.headers,
82
+ },
83
+ };
24
84
  this.formDataCtor = param.formDataCtor;
25
85
  }
26
86
  /**
@@ -2,7 +2,7 @@
2
2
  * openapi.json
3
3
  * Pandook API Documentation
4
4
  *
5
- * The version of the OpenAPI document: 1.0.224
5
+ * The version of the OpenAPI document: 1.0.230
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js 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.224
7
+ * The version of the OpenAPI document: 1.0.230
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * openapi.json
3
3
  * Pandook API Documentation
4
4
  *
5
- * The version of the OpenAPI document: 1.0.224
5
+ * The version of the OpenAPI document: 1.0.230
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * openapi.json
6
6
  * Pandook API Documentation
7
7
  *
8
- * The version of the OpenAPI document: 1.0.224
8
+ * The version of the OpenAPI document: 1.0.230
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -8,7 +8,6 @@ Name | Type | Description | Notes
8
8
  **id** | **string** | | [default to undefined]
9
9
  **name** | **string** | | [optional] [default to undefined]
10
10
  **picture** | **string** | | [optional] [default to undefined]
11
- **bannerPicture** | **string** | | [optional] [default to undefined]
12
11
  **address** | **string** | | [optional] [default to undefined]
13
12
  **location** | **{ [key: string]: any; }** | Construct a type with a set of properties K of type T | [optional] [default to undefined]
14
13
 
@@ -21,7 +20,6 @@ const instance: BookingClubInfo = {
21
20
  id,
22
21
  name,
23
22
  picture,
24
- bannerPicture,
25
23
  address,
26
24
  location,
27
25
  };
@@ -33,7 +33,6 @@ Name | Type | Description | Notes
33
33
  **updatedAt** | **string** | | [default to undefined]
34
34
  **playersCount** | **number** | | [optional] [default to undefined]
35
35
  **clubPicture** | **string** | | [optional] [default to undefined]
36
- **clubBanner** | **string** | | [optional] [default to undefined]
37
36
  **courtName** | **string** | | [optional] [default to undefined]
38
37
  **sportName** | **string** | | [optional] [default to undefined]
39
38
  **startDate** | **string** | | [optional] [default to undefined]
@@ -88,7 +87,6 @@ const instance: BookingSummary = {
88
87
  updatedAt,
89
88
  playersCount,
90
89
  clubPicture,
91
- clubBanner,
92
90
  courtName,
93
91
  sportName,
94
92
  startDate,
@@ -11,7 +11,6 @@ Name | Type | Description | Notes
11
11
  **paymentMethod** | [**PaymentMethod**](PaymentMethod.md) | | [optional] [default to undefined]
12
12
  **useDefaultPaymentMethod** | **boolean** | Indique si l\'utilisateur veut utiliser sa méthode de paiement par défaut | [optional] [default to undefined]
13
13
  **creditToUseInCents** | **number** | | [optional] [default to undefined]
14
- **maxPlayersDesired** | **number** | Pour créneau ouvert: nombre maximal de joueurs souhaités (incluant le créateur) | [optional] [default to undefined]
15
14
 
16
15
  ## Example
17
16
 
@@ -25,7 +24,6 @@ const instance: CreateBookingRequest = {
25
24
  paymentMethod,
26
25
  useDefaultPaymentMethod,
27
26
  creditToUseInCents,
28
- maxPlayersDesired,
29
27
  };
30
28
  ```
31
29
 
@@ -6,11 +6,11 @@
6
6
  Name | Type | Description | Notes
7
7
  ------------ | ------------- | ------------- | -------------
8
8
  **slotIds** | **Array<string>** | ID du créneau à réserver | [default to undefined]
9
- **playerShares** | [**Array<PlayerShare>**](PlayerShare.md) | Liste des parts de paiement par joueur (utiliser ceci OU isCreatorPayingAll) | [optional] [default to undefined]
10
- **isCreatorPayingAll** | **boolean** | Indique si le créateur paie pour tous les joueurs initiaux (incompatible avec playerShares) | [optional] [default to undefined]
9
+ **players** | [**Array<PlayerWithPaymentMethod>**](PlayerWithPaymentMethod.md) | Liste de tous les joueurs avec leurs méthodes de paiement (INCLUT LE CRÉATEUR) | [default to undefined]
10
+ **isCreatorPayingAll** | **boolean** | Indique si le créateur paie pour tous les joueurs | [optional] [default to undefined]
11
11
  **paymentMethod** | [**PaymentMethod**](PaymentMethod.md) | | [optional] [default to undefined]
12
12
  **useDefaultPaymentMethod** | **boolean** | Indique si l\'utilisateur veut utiliser sa méthode de paiement par défaut | [optional] [default to undefined]
13
- **creditToUseInCents** | **number** | Crédit à utiliser en centimes | [optional] [default to undefined]
13
+ **creditToUseInCents** | **number** | | [optional] [default to undefined]
14
14
  **maxPlayersDesired** | **number** | Nombre maximal de joueurs souhaités (incluant le créateur) | [default to undefined]
15
15
  **description** | **string** | Description de la réservation ouverte | [optional] [default to undefined]
16
16
  **minLevel** | **string** | Niveau minimal souhaité pour rejoindre | [optional] [default to undefined]
@@ -22,7 +22,7 @@ import { CreateOpenBookingRequest } from '@tennac-booking/sdk';
22
22
 
23
23
  const instance: CreateOpenBookingRequest = {
24
24
  slotIds,
25
- playerShares,
25
+ players,
26
26
  isCreatorPayingAll,
27
27
  paymentMethod,
28
28
  useDefaultPaymentMethod,
package/docs/JobsApi.md CHANGED
@@ -16,7 +16,7 @@ All URIs are relative to *http://localhost*
16
16
  # **captureExpiringAuthorizations**
17
17
  > JobResult captureExpiringAuthorizations()
18
18
 
19
- Job: Capturer les autorisations de paiement qui expirent bientôt Fréquence recommandée: Toutes les 30 minutes
19
+ Job: Capturer les autorisations de paiement qui expirent bientôt Fréquence recommandée: Toutes les 30 minutes
20
20
 
21
21
  ### Example
22
22
 
@@ -60,7 +60,7 @@ No authorization required
60
60
  # **capturePastReservations**
61
61
  > JobResult capturePastReservations()
62
62
 
63
- Job: Capturer les paiements pour les réservations passées Fréquence recommandée: Toutes les heures
63
+ Job: Capturer les paiements pour les réservations passées Fréquence recommandée: Toutes les heures
64
64
 
65
65
  ### Example
66
66
 
@@ -104,7 +104,7 @@ No authorization required
104
104
  # **expireBookingWaitingPayments**
105
105
  > JobResult expireBookingWaitingPayments()
106
106
 
107
- Job: Expirer les réservations en attente de paiement Fréquence recommandée: Toutes les minutes
107
+ Job: Expirer les réservations en attente de paiement Fréquence recommandée: Toutes les minutes
108
108
 
109
109
  ### Example
110
110
 
@@ -148,7 +148,7 @@ No authorization required
148
148
  # **expireWaitlistPayments**
149
149
  > JobResult expireWaitlistPayments()
150
150
 
151
- Job: Expirer les paiements en attente sur la waitlist Fréquence recommandée: Toutes les minutes
151
+ Job: Expirer les paiements en attente sur la waitlist Fréquence recommandée: Toutes les minutes
152
152
 
153
153
  ### Example
154
154
 
@@ -236,7 +236,7 @@ No authorization required
236
236
  # **maintainSlots**
237
237
  > JobResult maintainSlots()
238
238
 
239
- Job: Maintenir les créneaux (slots) Fréquence recommandée: Une fois par jour (2h du matin)
239
+ Job: Maintenir les créneaux (slots) Fréquence recommandée: Une fois par jour (2h du matin)
240
240
 
241
241
  ### Example
242
242
 
@@ -280,7 +280,7 @@ No authorization required
280
280
  # **releaseOldBookings**
281
281
  > JobResult releaseOldBookings()
282
282
 
283
- Job: Libérer les anciennes réservations Fréquence recommandée: Toutes les minutes
283
+ Job: Libérer les anciennes réservations Fréquence recommandée: Toutes les minutes
284
284
 
285
285
  ### Example
286
286
 
@@ -324,7 +324,7 @@ No authorization required
324
324
  # **sendBookingReminders**
325
325
  > JobResult sendBookingReminders()
326
326
 
327
- Job: Envoyer les rappels de réservation et d\'événements Fréquence recommandée: Toutes les heures
327
+ Job: Envoyer les rappels de réservation et d\'événements Fréquence recommandée: Toutes les heures
328
328
 
329
329
  ### Example
330
330
 
package/index.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.224
7
+ * The version of the OpenAPI document: 1.0.230
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tennac-booking/sdk",
3
- "version": "1.0.229",
3
+ "version": "1.0.230",
4
4
  "description": "OpenAPI client for @tennac-booking/sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {
package/tsconfig.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "declaration": true,
4
- "target": "ES6",
4
+ "target": "es2022",
5
5
  "module": "commonjs",
6
6
  "noImplicitAny": true,
7
7
  "outDir": "dist",