nnews-react 0.3.8 → 0.3.10

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/index.d.ts CHANGED
@@ -815,6 +815,7 @@ export declare const NAMESPACE = "nnews";
815
815
 
816
816
  export declare interface NNewsConfig {
817
817
  apiUrl: string;
818
+ tenantId?: string;
818
819
  apiClient?: AxiosInstance;
819
820
  headers?: Record<string, string>;
820
821
  language?: string;
package/dist/index.js CHANGED
@@ -35901,16 +35901,17 @@ function dP({ config: e, children: t }) {
35901
35901
  }
35902
35902
  });
35903
35903
  o.interceptors.request.use((u) => {
35904
- var h, f, p;
35905
- const d = i.current.headers;
35906
- return d && Object.entries(d).forEach(([g, b]) => {
35907
- b && u.headers.set(g, b);
35908
- }), console.log("[NNews] Request interceptor:", {
35904
+ var h, f, p, g;
35905
+ const d = i.current;
35906
+ return d.headers && Object.entries(d.headers).forEach(([b, y]) => {
35907
+ y && u.headers.set(b, y);
35908
+ }), d.tenantId && u.headers.set("X-Tenant-Id", d.tenantId), console.log("[NNews] Request interceptor:", {
35909
35909
  method: (h = u.method) == null ? void 0 : h.toUpperCase(),
35910
35910
  url: `${u.baseURL || ""}${u.url || ""}`,
35911
35911
  headers: {
35912
35912
  Authorization: ((f = u.headers) == null ? void 0 : f.Authorization) || "(not set)",
35913
- "Content-Type": ((p = u.headers) == null ? void 0 : p["Content-Type"]) || "(not set)"
35913
+ "Content-Type": ((p = u.headers) == null ? void 0 : p["Content-Type"]) || "(not set)",
35914
+ "X-Tenant-Id": ((g = u.headers) == null ? void 0 : g["X-Tenant-Id"]) || "(not set)"
35914
35915
  }
35915
35916
  }), u;
35916
35917
  });
@@ -35922,7 +35923,7 @@ function dP({ config: e, children: t }) {
35922
35923
  categoryApi: l,
35923
35924
  tagApi: c
35924
35925
  };
35925
- }, [e.apiUrl, e.apiClient]);
35926
+ }, [e.apiUrl, e.apiClient, e.tenantId]);
35926
35927
  return /* @__PURE__ */ N(vy, { i18n: n, children: /* @__PURE__ */ N(ub.Provider, { value: s, children: t }) });
35927
35928
  }
35928
35929
  function ls() {