@tennac-booking/sdk 1.0.233 → 1.0.234

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/dist/esm/base.js CHANGED
@@ -29,15 +29,13 @@ export const COLLECTION_FORMATS = {
29
29
  * @class BaseAPI
30
30
  */
31
31
  export class BaseAPI {
32
- basePath;
33
- axios;
34
- configuration;
35
32
  constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
33
+ var _a;
36
34
  this.basePath = basePath;
37
35
  this.axios = axios;
38
36
  if (configuration) {
39
37
  this.configuration = configuration;
40
- this.basePath = configuration.basePath ?? basePath;
38
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
41
39
  }
42
40
  }
43
41
  }
@@ -49,7 +47,6 @@ export class BaseAPI {
49
47
  * @extends {Error}
50
48
  */
51
49
  export class RequiredError extends Error {
52
- field;
53
50
  constructor(field, msg) {
54
51
  super(msg);
55
52
  this.field = field;
@@ -11,6 +11,15 @@
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
+ };
14
23
  import { RequiredError } from "./base";
15
24
  /**
16
25
  *
@@ -31,13 +40,15 @@ export const assertParamExists = function (functionName, paramName, paramValue)
31
40
  *
32
41
  * @export
33
42
  */
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
- }
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
+ });
41
52
  };
42
53
  /**
43
54
  *
@@ -52,25 +63,29 @@ export const setBasicAuthToObject = function (object, configuration) {
52
63
  *
53
64
  * @export
54
65
  */
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
- }
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
+ });
62
75
  };
63
76
  /**
64
77
  *
65
78
  * @export
66
79
  */
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
- }
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
+ });
74
89
  };
75
90
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
91
  if (parameter == null)
@@ -127,7 +142,8 @@ export const toPathString = function (url) {
127
142
  */
128
143
  export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
129
144
  return (axios = globalAxios, basePath = BASE_PATH) => {
130
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
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 });
131
147
  return axios.request(axiosRequestArgs);
132
148
  };
133
149
  };
@@ -12,75 +12,15 @@
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;
71
15
  constructor(param = {}) {
16
+ var _a;
72
17
  this.apiKey = param.apiKey;
73
18
  this.username = param.username;
74
19
  this.password = param.password;
75
20
  this.accessToken = param.accessToken;
76
21
  this.basePath = param.basePath;
77
22
  this.serverIndex = param.serverIndex;
78
- this.baseOptions = {
79
- ...param.baseOptions,
80
- headers: {
81
- ...param.baseOptions?.headers,
82
- },
83
- };
23
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
84
24
  this.formDataCtor = param.formDataCtor;
85
25
  }
86
26
  /**
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/docs/UsersApi.md CHANGED
@@ -943,10 +943,12 @@ const apiInstance = new UsersApi(configuration);
943
943
 
944
944
  let limit: number; // (optional) (default to undefined)
945
945
  let skip: number; // (optional) (default to undefined)
946
+ let timeFilter: 'upcoming' | 'past'; // (optional) (default to undefined)
946
947
 
947
948
  const { status, data } = await apiInstance.getUserBookings(
948
949
  limit,
949
- skip
950
+ skip,
951
+ timeFilter
950
952
  );
951
953
  ```
952
954
 
@@ -956,6 +958,7 @@ const { status, data } = await apiInstance.getUserBookings(
956
958
  |------------- | ------------- | ------------- | -------------|
957
959
  | **limit** | [**number**] | | (optional) defaults to undefined|
958
960
  | **skip** | [**number**] | | (optional) defaults to undefined|
961
+ | **timeFilter** | [**&#39;upcoming&#39; | &#39;past&#39;**]**Array<&#39;upcoming&#39; &#124; &#39;past&#39;>** | | (optional) defaults to undefined|
959
962
 
960
963
 
961
964
  ### Return type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tennac-booking/sdk",
3
- "version": "1.0.233",
3
+ "version": "1.0.234",
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": "es2022",
4
+ "target": "ES6",
5
5
  "module": "commonjs",
6
6
  "noImplicitAny": true,
7
7
  "outDir": "dist",