@kohost/api-client 3.0.0-beta.102 → 3.0.0-beta.103

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/defs.js CHANGED
@@ -2546,8 +2546,6 @@ var require_Client = __commonJS({
2546
2546
  super();
2547
2547
  if (!options.url)
2548
2548
  throw new Error("options.url is required");
2549
- if (!options.propertyId)
2550
- throw new Error("options.property is required");
2551
2549
  this.options = options;
2552
2550
  this.isBrowser = typeof window !== "undefined";
2553
2551
  this.isRefreshingToken = false;
@@ -2558,13 +2556,18 @@ var require_Client = __commonJS({
2558
2556
  headers: {
2559
2557
  "Content-Type": "application/json",
2560
2558
  Accept: "application/json",
2561
- [_KohostApiClient.defs.propertyHeader]: options.propertyId,
2562
2559
  ...options.headers
2563
2560
  }
2564
2561
  };
2565
2562
  if (options.apiKey) {
2566
2563
  config.headers[_KohostApiClient.defs.apiKeyHeader] = options.apiKey;
2567
2564
  }
2565
+ if (options.propertyId) {
2566
+ config.headers[_KohostApiClient.defs.propertyHeader] = options.propertyId;
2567
+ }
2568
+ if (options.organizationId) {
2569
+ config.headers[_KohostApiClient.defs.organizationHeader] = options.organizationId;
2570
+ }
2568
2571
  this._http = axios.create(config);
2569
2572
  this._http.interceptors.response.use(
2570
2573
  this._handleResponse.bind(this),
@@ -2574,7 +2577,8 @@ var require_Client = __commonJS({
2574
2577
  static get defs() {
2575
2578
  return {
2576
2579
  apiKeyHeader: "X-Api-Key",
2577
- propertyHeader: "X-Property-Id"
2580
+ propertyHeader: "X-Property-Id",
2581
+ organizationHeader: "X-Organization-Id"
2578
2582
  };
2579
2583
  }
2580
2584
  _handleResponse(response) {