@burdenoff/fe-libs 2026.601.9 → 2026.601.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.
|
@@ -46,6 +46,16 @@ export interface GraphQLFetchOptions {
|
|
|
46
46
|
extraHeaders?: Record<string, string>;
|
|
47
47
|
/** AbortSignal for cancellation */
|
|
48
48
|
signal?: AbortSignal;
|
|
49
|
+
/**
|
|
50
|
+
* Skip the global backend-error event (the "[Burdenoff backend error]"
|
|
51
|
+
* console log + the user-facing error toast/banner) for this call. Use for
|
|
52
|
+
* fire-and-forget / non-critical telemetry that handles its own errors and
|
|
53
|
+
* whose failure is not actionable for the user (e.g. recordProductVisit) —
|
|
54
|
+
* such ops can fail transiently (cold subgraph) or race a not-yet-attached
|
|
55
|
+
* token during bootstrap, and surfacing that as a backend error is pure noise.
|
|
56
|
+
* The returned `errors` are still available to the caller.
|
|
57
|
+
*/
|
|
58
|
+
suppressGlobalErrorEvent?: boolean;
|
|
49
59
|
}
|
|
50
60
|
export interface GraphQLResponse<T = unknown> {
|
|
51
61
|
data: T | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/shared/graphql/fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBnD,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAA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AC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAYP;AAED;;;;6EAI6E;AAC7E,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAEpD;AAED,6EAA6E;AAC7E,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAEvD;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAEjD;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAElD;AAgKD,uCAAuC;AACvC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAK5E;AAmBD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAuOD,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,OAAO,CAAC,CAyElB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,YAAY,CAAC,CAAC,GAAG,OAAO,EAC5C,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAqI7B"}
|
|
@@ -307,52 +307,52 @@ function Q(e, t, n) {
|
|
|
307
307
|
i && (r.delete(n), i.timer &&= (clearTimeout(i.timer), null), X(e, t, i.requests));
|
|
308
308
|
}
|
|
309
309
|
async function $(e) {
|
|
310
|
-
let { gateway: t, query: n, variables: r, operationName: i, authToken: a, workspaceToken: o, workspaceId: c, organizationId: p, tenantId: m, projectId: _, locale: v, baseUrl: S, extraHeaders: C, signal: T } = e,
|
|
310
|
+
let { gateway: t, query: n, variables: r, operationName: i, authToken: a, workspaceToken: o, workspaceId: c, organizationId: p, tenantId: m, projectId: _, locale: v, baseUrl: S, extraHeaders: C, signal: T, suppressGlobalErrorEvent: E } = e, O = l(A(t, S)), j = a && !y(a) ? a : h(), M = v ?? x(), N = D({
|
|
311
311
|
workspaceId: c,
|
|
312
312
|
organizationId: p,
|
|
313
313
|
tenantId: m,
|
|
314
314
|
projectId: _
|
|
315
|
-
}),
|
|
316
|
-
|
|
317
|
-
let
|
|
318
|
-
if (
|
|
315
|
+
}), P = { "Content-Type": "application/json" };
|
|
316
|
+
j && (P.Authorization = `Bearer ${j}`), M && (P["Accept-Language"] = M);
|
|
317
|
+
let F = b();
|
|
318
|
+
if (F?.country && (P["X-Geo-Country"] = F.country), F?.currency && (P["X-Geo-Currency"] = F.currency), F?.timezone && (P["X-Geo-Timezone"] = F.timezone), t === "workspace" ? o !== !1 : o) {
|
|
319
319
|
let e = typeof o == "string" ? o : g();
|
|
320
|
-
e && !u(e,
|
|
321
|
-
url:
|
|
322
|
-
authToken:
|
|
323
|
-
workspaceId:
|
|
324
|
-
organizationId:
|
|
325
|
-
projectId:
|
|
326
|
-
locale:
|
|
320
|
+
e && !u(e, N) && (e = null), !e && o === !0 && /^\s*mutation\b/.test(n) && (e = await k({
|
|
321
|
+
url: O,
|
|
322
|
+
authToken: j,
|
|
323
|
+
workspaceId: N.workspaceId,
|
|
324
|
+
organizationId: N.organizationId,
|
|
325
|
+
projectId: N.projectId,
|
|
326
|
+
locale: M,
|
|
327
327
|
signal: T,
|
|
328
328
|
currentQuery: n
|
|
329
|
-
})), e && (
|
|
329
|
+
})), e && (P["X-Workspace-Authorization"] = `Bearer ${e}`);
|
|
330
330
|
}
|
|
331
331
|
if (t === "workspace" || c) {
|
|
332
|
-
let e =
|
|
333
|
-
e && (
|
|
332
|
+
let e = N.workspaceId;
|
|
333
|
+
e && (P["x-workspace-id"] = e);
|
|
334
334
|
}
|
|
335
335
|
if (t === "global" || p) {
|
|
336
|
-
let e =
|
|
337
|
-
e && (
|
|
336
|
+
let e = N.organizationId;
|
|
337
|
+
e && (P["x-org-id"] = e);
|
|
338
338
|
}
|
|
339
339
|
if (m) {
|
|
340
340
|
let e = typeof m == "string" ? m : w();
|
|
341
|
-
e && (
|
|
341
|
+
e && (P["x-tenant-id"] = e);
|
|
342
342
|
}
|
|
343
343
|
if (t === "workspace" || _) {
|
|
344
|
-
let e =
|
|
345
|
-
e && (
|
|
344
|
+
let e = N.projectId;
|
|
345
|
+
e && (P["x-project-id"] = e);
|
|
346
346
|
}
|
|
347
|
-
let
|
|
348
|
-
|
|
349
|
-
let
|
|
350
|
-
r && (
|
|
347
|
+
let I = s(C);
|
|
348
|
+
I && Object.assign(P, I);
|
|
349
|
+
let L = { query: n };
|
|
350
|
+
r && (L.variables = r), i && (L.operationName = i);
|
|
351
351
|
try {
|
|
352
|
-
let e = await Z(
|
|
353
|
-
return f(), e.errors?.length && d({ errors: e.errors }, { operationName: i }), e;
|
|
352
|
+
let e = await Z(O, P, L, T);
|
|
353
|
+
return f(), e.errors?.length && !E && d({ errors: e.errors }, { operationName: i }), e;
|
|
354
354
|
} catch (e) {
|
|
355
|
-
throw d(e, {
|
|
355
|
+
throw E || d(e, {
|
|
356
356
|
operationName: i,
|
|
357
357
|
fallbackMessage: "We could not reach the server. Please check your connection and try again."
|
|
358
358
|
}), e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecordProductVisit.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useRecordProductVisit.ts"],"names":[],"mappings":"AAmDA,UAAU,yBAAyB;IACjC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAkCD,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,yBAA8B,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useRecordProductVisit.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useRecordProductVisit.ts"],"names":[],"mappings":"AAmDA,UAAU,yBAAyB;IACjC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAkCD,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,yBAA8B,GAAG,IAAI,CAwEnF"}
|