@tennac-booking/sdk 1.0.229 → 1.0.231

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/base.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.231
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/base.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.231
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -32,13 +32,15 @@ exports.COLLECTION_FORMATS = {
32
32
  * @class BaseAPI
33
33
  */
34
34
  class BaseAPI {
35
+ basePath;
36
+ axios;
37
+ configuration;
35
38
  constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
36
- var _a;
37
39
  this.basePath = basePath;
38
40
  this.axios = axios;
39
41
  if (configuration) {
40
42
  this.configuration = configuration;
41
- this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
43
+ this.basePath = configuration.basePath ?? basePath;
42
44
  }
43
45
  }
44
46
  }
@@ -51,6 +53,7 @@ exports.BaseAPI = BaseAPI;
51
53
  * @extends {Error}
52
54
  */
53
55
  class RequiredError extends Error {
56
+ field;
54
57
  constructor(field, msg) {
55
58
  super(msg);
56
59
  this.field = field;
package/dist/common.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.231
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.js CHANGED
@@ -5,22 +5,13 @@
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.231
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
13
13
  * Do not edit the class manually.
14
14
  */
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
15
  Object.defineProperty(exports, "__esModule", { value: true });
25
16
  exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
26
17
  const base_1 = require("./base");
@@ -44,15 +35,13 @@ exports.assertParamExists = assertParamExists;
44
35
  *
45
36
  * @export
46
37
  */
47
- const setApiKeyToObject = function (object, keyParamName, configuration) {
48
- return __awaiter(this, void 0, void 0, function* () {
49
- if (configuration && configuration.apiKey) {
50
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
51
- ? yield configuration.apiKey(keyParamName)
52
- : yield configuration.apiKey;
53
- object[keyParamName] = localVarApiKeyValue;
54
- }
55
- });
38
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
39
+ if (configuration && configuration.apiKey) {
40
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
41
+ ? await configuration.apiKey(keyParamName)
42
+ : await configuration.apiKey;
43
+ object[keyParamName] = localVarApiKeyValue;
44
+ }
56
45
  };
57
46
  exports.setApiKeyToObject = setApiKeyToObject;
58
47
  /**
@@ -69,30 +58,26 @@ exports.setBasicAuthToObject = setBasicAuthToObject;
69
58
  *
70
59
  * @export
71
60
  */
72
- const setBearerAuthToObject = function (object, configuration) {
73
- return __awaiter(this, void 0, void 0, function* () {
74
- if (configuration && configuration.accessToken) {
75
- const accessToken = typeof configuration.accessToken === 'function'
76
- ? yield configuration.accessToken()
77
- : yield configuration.accessToken;
78
- object["Authorization"] = "Bearer " + accessToken;
79
- }
80
- });
61
+ const setBearerAuthToObject = async function (object, configuration) {
62
+ if (configuration && configuration.accessToken) {
63
+ const accessToken = typeof configuration.accessToken === 'function'
64
+ ? await configuration.accessToken()
65
+ : await configuration.accessToken;
66
+ object["Authorization"] = "Bearer " + accessToken;
67
+ }
81
68
  };
82
69
  exports.setBearerAuthToObject = setBearerAuthToObject;
83
70
  /**
84
71
  *
85
72
  * @export
86
73
  */
87
- const setOAuthToObject = function (object, name, scopes, configuration) {
88
- return __awaiter(this, void 0, void 0, function* () {
89
- if (configuration && configuration.accessToken) {
90
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
91
- ? yield configuration.accessToken(name, scopes)
92
- : yield configuration.accessToken;
93
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
94
- }
95
- });
74
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
75
+ if (configuration && configuration.accessToken) {
76
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
77
+ ? await configuration.accessToken(name, scopes)
78
+ : await configuration.accessToken;
79
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
80
+ }
96
81
  };
97
82
  exports.setOAuthToObject = setOAuthToObject;
98
83
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
@@ -153,8 +138,7 @@ exports.toPathString = toPathString;
153
138
  */
154
139
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
155
140
  return (axios = globalAxios, basePath = BASE_PATH) => {
156
- var _a;
157
- 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 });
141
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
158
142
  return axios.request(axiosRequestArgs);
159
143
  };
160
144
  };
@@ -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.231
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.231
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -15,15 +15,75 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.Configuration = void 0;
17
17
  class Configuration {
18
+ /**
19
+ * parameter for apiKey security
20
+ * @param name security name
21
+ * @memberof Configuration
22
+ */
23
+ apiKey;
24
+ /**
25
+ * parameter for basic security
26
+ *
27
+ * @type {string}
28
+ * @memberof Configuration
29
+ */
30
+ username;
31
+ /**
32
+ * parameter for basic security
33
+ *
34
+ * @type {string}
35
+ * @memberof Configuration
36
+ */
37
+ password;
38
+ /**
39
+ * parameter for oauth2 security
40
+ * @param name security name
41
+ * @param scopes oauth2 scope
42
+ * @memberof Configuration
43
+ */
44
+ accessToken;
45
+ /**
46
+ * override base path
47
+ *
48
+ * @type {string}
49
+ * @memberof Configuration
50
+ */
51
+ basePath;
52
+ /**
53
+ * override server index
54
+ *
55
+ * @type {number}
56
+ * @memberof Configuration
57
+ */
58
+ serverIndex;
59
+ /**
60
+ * base options for axios calls
61
+ *
62
+ * @type {any}
63
+ * @memberof Configuration
64
+ */
65
+ baseOptions;
66
+ /**
67
+ * The FormData constructor that will be used to create multipart form data
68
+ * requests. You can inject this here so that execution environments that
69
+ * do not support the FormData class can still run the generated client.
70
+ *
71
+ * @type {new () => FormData}
72
+ */
73
+ formDataCtor;
18
74
  constructor(param = {}) {
19
- var _a;
20
75
  this.apiKey = param.apiKey;
21
76
  this.username = param.username;
22
77
  this.password = param.password;
23
78
  this.accessToken = param.accessToken;
24
79
  this.basePath = param.basePath;
25
80
  this.serverIndex = param.serverIndex;
26
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
81
+ this.baseOptions = {
82
+ ...param.baseOptions,
83
+ headers: {
84
+ ...param.baseOptions?.headers,
85
+ },
86
+ };
27
87
  this.formDataCtor = param.formDataCtor;
28
88
  }
29
89
  /**