@kohost/api-client 3.0.0-beta.64 → 3.0.0-beta.66

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.
@@ -1,7 +1,7 @@
1
1
  const { RequestError } = require("../Errors");
2
2
  const Command = require("./Command");
3
3
 
4
- class DiscoverReservationRoomTypeUpsellOptionsCommand extends Command {
4
+ class DiscoverReservationSpaceCategoryAvailabilitiesCommand extends Command {
5
5
  constructor(options) {
6
6
  if (!options) throw new RequestError("options are required");
7
7
  const { id, ...rest } = options;
@@ -9,7 +9,7 @@ class DiscoverReservationRoomTypeUpsellOptionsCommand extends Command {
9
9
  }
10
10
 
11
11
  get name() {
12
- return "DiscoverReservationRoomTypeUpsellOptions";
12
+ return "DiscoverReservationSpaceCategoryAvailabilities";
13
13
  }
14
14
 
15
15
  get routingKey() {
@@ -17,4 +17,4 @@ class DiscoverReservationRoomTypeUpsellOptionsCommand extends Command {
17
17
  }
18
18
  }
19
19
 
20
- module.exports = DiscoverReservationRoomTypeUpsellOptionsCommand;
20
+ module.exports = DiscoverReservationSpaceCategoryAvailabilitiesCommand;
@@ -13,7 +13,7 @@ const CheckInReservationCommand = require("./CheckInReservationCommand");
13
13
  const SendEmailCommand = require("./SendEmailCommand");
14
14
  const SendSMSCommand = require("./SendSMSCommand");
15
15
  const DiscoverReservationsCommand = require("./DiscoverReservationsCommand");
16
- const DiscoverReservationRoomTypeUpsellOptionsCommand = require("./DiscoverReservationRoomTypeUpsellOptionsCommand");
16
+ const DiscoverReservationSpaceCategoryAvailabilitiesCommand = require("./DiscoverReservationSpaceCategoryAvailabilitiesCommand");
17
17
  const DiscoverRoomsCommand = require("./DiscoverRoomsCommand");
18
18
  const DiscoverRoomTypesCommand = require("./DiscoverRoomTypesCommand");
19
19
  const CreateShortLinkCommand = require("./CreateShortLinkCommand");
@@ -41,7 +41,7 @@ module.exports = {
41
41
  SendSMSCommand,
42
42
  SendEmailCommand,
43
43
  DiscoverReservationsCommand,
44
- DiscoverReservationRoomTypeUpsellOptionsCommand,
44
+ DiscoverReservationSpaceCategoryAvailabilitiesCommand,
45
45
  DiscoverRoomsCommand,
46
46
  DiscoverRoomTypesCommand,
47
47
  CreateShortLinkCommand,
@@ -6479,8 +6479,9 @@ var require_axios = __commonJS({
6479
6479
  const descriptors2 = Object.getOwnPropertyDescriptors(obj);
6480
6480
  const reducedDescriptors = {};
6481
6481
  forEach(descriptors2, (descriptor, name) => {
6482
- if (reducer(descriptor, name, obj) !== false) {
6483
- reducedDescriptors[name] = descriptor;
6482
+ let ret;
6483
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
6484
+ reducedDescriptors[name] = ret || descriptor;
6484
6485
  }
6485
6486
  });
6486
6487
  Object.defineProperties(obj, reducedDescriptors);
@@ -7027,9 +7028,6 @@ var require_axios = __commonJS({
7027
7028
  return null;
7028
7029
  }
7029
7030
  __name(formDataToJSON, "formDataToJSON");
7030
- var DEFAULT_CONTENT_TYPE = {
7031
- "Content-Type": void 0
7032
- };
7033
7031
  function stringifySafely(rawValue, parser, encoder) {
7034
7032
  if (utils.isString(rawValue)) {
7035
7033
  try {
@@ -7046,7 +7044,7 @@ var require_axios = __commonJS({
7046
7044
  __name(stringifySafely, "stringifySafely");
7047
7045
  var defaults = {
7048
7046
  transitional: transitionalDefaults,
7049
- adapter: ["xhr", "http"],
7047
+ adapter: platform.isNode ? "http" : "xhr",
7050
7048
  transformRequest: [/* @__PURE__ */ __name(function transformRequest(data, headers) {
7051
7049
  const contentType = headers.getContentType() || "";
7052
7050
  const hasJSONContentType = contentType.indexOf("application/json") > -1;
@@ -7129,16 +7127,14 @@ var require_axios = __commonJS({
7129
7127
  }, "validateStatus"),
7130
7128
  headers: {
7131
7129
  common: {
7132
- "Accept": "application/json, text/plain, */*"
7130
+ "Accept": "application/json, text/plain, */*",
7131
+ "Content-Type": void 0
7133
7132
  }
7134
7133
  }
7135
7134
  };
7136
- utils.forEach(["delete", "get", "head"], /* @__PURE__ */ __name(function forEachMethodNoData(method) {
7135
+ utils.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
7137
7136
  defaults.headers[method] = {};
7138
- }, "forEachMethodNoData"));
7139
- utils.forEach(["post", "put", "patch"], /* @__PURE__ */ __name(function forEachMethodWithData(method) {
7140
- defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
7141
- }, "forEachMethodWithData"));
7137
+ });
7142
7138
  var defaults$1 = defaults;
7143
7139
  var ignoreDuplicateOf = utils.toObjectSet([
7144
7140
  "age",
@@ -7400,7 +7396,15 @@ var require_axios = __commonJS({
7400
7396
  }
7401
7397
  };
7402
7398
  AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
7403
- utils.freezeMethods(AxiosHeaders.prototype);
7399
+ utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
7400
+ let mapped = key[0].toUpperCase() + key.slice(1);
7401
+ return {
7402
+ get: () => value,
7403
+ set(headerValue) {
7404
+ this[mapped] = headerValue;
7405
+ }
7406
+ };
7407
+ });
7404
7408
  utils.freezeMethods(AxiosHeaders);
7405
7409
  var AxiosHeaders$1 = AxiosHeaders;
7406
7410
  function transformData(fns, response) {
@@ -7917,7 +7921,7 @@ var require_axios = __commonJS({
7917
7921
  return config;
7918
7922
  }
7919
7923
  __name(mergeConfig, "mergeConfig");
7920
- var VERSION = "1.4.0";
7924
+ var VERSION = "1.5.0";
7921
7925
  var validators$1 = {};
7922
7926
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
7923
7927
  validators$1[type] = /* @__PURE__ */ __name(function validator2(thing) {
@@ -8025,12 +8029,11 @@ var require_axios = __commonJS({
8025
8029
  }
8026
8030
  }
8027
8031
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
8028
- let contextHeaders;
8029
- contextHeaders = headers && utils.merge(
8032
+ let contextHeaders = headers && utils.merge(
8030
8033
  headers.common,
8031
8034
  headers[config.method]
8032
8035
  );
8033
- contextHeaders && utils.forEach(
8036
+ headers && utils.forEach(
8034
8037
  ["delete", "get", "head", "post", "put", "patch", "common"],
8035
8038
  (method) => {
8036
8039
  delete headers[method];
@@ -8320,6 +8323,7 @@ var require_axios = __commonJS({
8320
8323
  axios.mergeConfig = mergeConfig;
8321
8324
  axios.AxiosHeaders = AxiosHeaders$1;
8322
8325
  axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
8326
+ axios.getAdapter = adapters.getAdapter;
8323
8327
  axios.HttpStatusCode = HttpStatusCode$1;
8324
8328
  axios.default = axios;
8325
8329
  module.exports = axios;