@burdenoff/microfe-subscriberbot 2026.1023.2 → 2026.1029.1

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.
Files changed (39) hide show
  1. package/dist/subscriberbot/admin/AdminDashboardPage.js +5 -5
  2. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  3. package/dist/subscriberbot/components/PostureOptions.d.ts +10 -0
  4. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -0
  5. package/dist/subscriberbot/components/PostureOptions.js +20 -0
  6. package/dist/subscriberbot/components/PostureOptions.js.map +1 -0
  7. package/dist/subscriberbot/components/index.d.ts +2 -0
  8. package/dist/subscriberbot/components/index.d.ts.map +1 -1
  9. package/dist/subscriberbot/components/index.js +1 -0
  10. package/dist/subscriberbot/hooks/index.d.ts +1 -0
  11. package/dist/subscriberbot/hooks/index.d.ts.map +1 -1
  12. package/dist/subscriberbot/hooks/index.js +2 -1
  13. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts +15 -0
  14. package/dist/subscriberbot/hooks/useAutonomousAgentMode.d.ts.map +1 -0
  15. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js +13 -0
  16. package/dist/subscriberbot/hooks/useAutonomousAgentMode.js.map +1 -0
  17. package/dist/subscriberbot/pages/AssetVaultPage.js +16 -16
  18. package/dist/subscriberbot/pages/DashboardPage.js +23 -23
  19. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  20. package/dist/subscriberbot/pages/InboxPage.js +62 -62
  21. package/dist/subscriberbot/pages/InsightsPage.js +14 -14
  22. package/dist/subscriberbot/pages/InvoicesPage.js +66 -66
  23. package/dist/subscriberbot/pages/WorkflowsPage.js +20 -20
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  25. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +184 -182
  26. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  27. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  28. package/dist/subscriberbot/pages/agents/AgentNewPage.js +77 -79
  29. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  30. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  31. package/dist/subscriberbot/pages/agents/AgentsListPage.js +134 -133
  32. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  33. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +64 -64
  34. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +3 -3
  35. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +18 -18
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +76 -76
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +6 -6
  38. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +7 -7
  39. package/package.json +1 -1
@@ -4,11 +4,11 @@ import { formatCurrency as n, formatDate as r, formatEnumLabel as i, formatInter
4
4
  import { StatusBadge as o } from "../../components/StatusBadge.js";
5
5
  import { EmptyState as s } from "../../components/EmptyState.js";
6
6
  import { Modal as c } from "../../components/Modal.js";
7
- import { ErrorView as l, LoadingView as u, Section as d } from "../../components/StateViews.js";
8
- import { Gauge as f, MiniProgress as p, Timeline as m } from "../../components/viz.js";
7
+ import { useTr as l } from "../../hooks/useTr.js";
8
+ import { ErrorView as u, LoadingView as d, Section as f } from "../../components/StateViews.js";
9
+ import { Gauge as p, MiniProgress as m, Timeline as h } from "../../components/viz.js";
9
10
  import "../../components/index.js";
10
- import { useCancelRelationship as h, useCreateAsset as g, useCreateEntitlement as _, useFileDownloadUrl as v, usePlans as y, useProviders as b, useRelationship as x, useTransitionRelationship as S, useUpdateRelationship as C, useUploadFile as w } from "../../hooks/useSubscriberBotApi.js";
11
- import { useTr as T } from "../../hooks/useTr.js";
11
+ import { useCancelRelationship as g, useCreateAsset as _, useCreateEntitlement as v, useFileDownloadUrl as y, usePlans as b, useProviders as x, useRelationship as S, useTransitionRelationship as C, useUpdateRelationship as w, useUploadFile as T } from "../../hooks/useSubscriberBotApi.js";
12
12
  import { useState as E } from "react";
13
13
  import { Activity as D, ArrowLeft as O, Ban as k, CalendarClock as A, CreditCard as j, Download as M, Paperclip as N, Pause as P, Pencil as F, Play as I, Plus as L, ShieldCheck as R, Tag as ee, Wallet as te } from "lucide-react";
14
14
  import { useParams as ne } from "react-router";
@@ -90,10 +90,10 @@ function Y(e) {
90
90
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
91
91
  }
92
92
  function oe({ relationship: e, onClose: t }) {
93
- let n = T(), r = C(), i = b({ pagination: {
93
+ let n = l(), r = w(), i = x({ pagination: {
94
94
  limit: 100,
95
95
  offset: 0
96
- } }), [a, o] = E(e.label), [s, l] = E(e.providerId ?? ""), [u, d] = E(e.planId ?? ""), [f, p] = E(String(e.amount ?? "")), [m, h] = E(e.currency), [g, _] = E(e.interval), [v, x] = E(Y(e.renewsAt)), [S, w] = E(e.autoRenew), [D, O] = E(e.healthScore == null ? "" : String(e.healthScore)), [k, A] = E(e.notes ?? ""), [j, M] = E(null), N = y(s || void 0), P = (() => {
96
+ } }), [a, o] = E(e.label), [s, u] = E(e.providerId ?? ""), [d, f] = E(e.planId ?? ""), [p, m] = E(String(e.amount ?? "")), [h, g] = E(e.currency), [_, v] = E(e.interval), [y, S] = E(Y(e.renewsAt)), [C, T] = E(e.autoRenew), [D, O] = E(e.healthScore == null ? "" : String(e.healthScore)), [k, A] = E(e.notes ?? ""), [j, M] = E(null), N = b(s || void 0), P = (() => {
97
97
  let t = i.data?.items ?? [];
98
98
  return e.provider && !t.some((t) => t.id === e.provider?.id) ? [e.provider, ...t] : t;
99
99
  })(), F = N.data ?? [];
@@ -109,15 +109,15 @@ function oe({ relationship: e, onClose: t }) {
109
109
  }
110
110
  let o = {
111
111
  label: a.trim(),
112
- interval: g,
113
- autoRenew: S,
114
- currency: m.trim() || "USD",
112
+ interval: _,
113
+ autoRenew: C,
114
+ currency: h.trim() || "USD",
115
115
  notes: k.trim(),
116
116
  ...s ? { providerId: s } : {},
117
- ...u ? { planId: u } : {},
118
- ...f.trim() ? { amount: Number(f) } : {},
117
+ ...d ? { planId: d } : {},
118
+ ...p.trim() ? { amount: Number(p) } : {},
119
119
  ...D.trim() ? { healthScore: Number(D) } : {},
120
- ...v ? { renewsAt: new Date(v).toISOString() } : {}
120
+ ...y ? { renewsAt: new Date(y).toISOString() } : {}
121
121
  };
122
122
  r.mutate({
123
123
  id: e.id,
@@ -162,7 +162,7 @@ function oe({ relationship: e, onClose: t }) {
162
162
  id: "edit-provider",
163
163
  value: s,
164
164
  onChange: (e) => {
165
- l(e.target.value), d("");
165
+ u(e.target.value), f("");
166
166
  },
167
167
  className: H,
168
168
  children: [/* @__PURE__ */ z("option", {
@@ -178,8 +178,8 @@ function oe({ relationship: e, onClose: t }) {
178
178
  children: n("relationships.detail.editModal.planLabel", "Plan")
179
179
  }), /* @__PURE__ */ B("select", {
180
180
  id: "edit-plan",
181
- value: u,
182
- onChange: (e) => d(e.target.value),
181
+ value: d,
182
+ onChange: (e) => f(e.target.value),
183
183
  className: H,
184
184
  disabled: !s || F.length === 0,
185
185
  children: [/* @__PURE__ */ z("option", {
@@ -203,8 +203,8 @@ function oe({ relationship: e, onClose: t }) {
203
203
  type: "number",
204
204
  min: "0",
205
205
  step: "0.01",
206
- value: f,
207
- onChange: (e) => p(e.target.value),
206
+ value: p,
207
+ onChange: (e) => m(e.target.value),
208
208
  className: H
209
209
  })] }),
210
210
  /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
@@ -214,8 +214,8 @@ function oe({ relationship: e, onClose: t }) {
214
214
  }), /* @__PURE__ */ z("input", {
215
215
  id: "edit-currency",
216
216
  type: "text",
217
- value: m,
218
- onChange: (e) => h(e.target.value.toUpperCase()),
217
+ value: h,
218
+ onChange: (e) => g(e.target.value.toUpperCase()),
219
219
  maxLength: 3,
220
220
  className: H
221
221
  })] }),
@@ -225,8 +225,8 @@ function oe({ relationship: e, onClose: t }) {
225
225
  children: n("relationships.detail.editModal.intervalLabel", "Billing interval")
226
226
  }), /* @__PURE__ */ z("select", {
227
227
  id: "edit-interval",
228
- value: g,
229
- onChange: (e) => _(e.target.value),
228
+ value: _,
229
+ onChange: (e) => v(e.target.value),
230
230
  className: H,
231
231
  children: W.map((e) => /* @__PURE__ */ z("option", {
232
232
  value: e,
@@ -245,8 +245,8 @@ function oe({ relationship: e, onClose: t }) {
245
245
  }), /* @__PURE__ */ z("input", {
246
246
  id: "edit-renews",
247
247
  type: "date",
248
- value: v,
249
- onChange: (e) => x(e.target.value),
248
+ value: y,
249
+ onChange: (e) => S(e.target.value),
250
250
  className: H
251
251
  })] }),
252
252
  /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
@@ -268,8 +268,8 @@ function oe({ relationship: e, onClose: t }) {
268
268
  className: "flex items-center gap-2 text-sm text-text-primary",
269
269
  children: [/* @__PURE__ */ z("input", {
270
270
  type: "checkbox",
271
- checked: S,
272
- onChange: (e) => w(e.target.checked),
271
+ checked: C,
272
+ onChange: (e) => T(e.target.checked),
273
273
  className: "size-4 rounded border-border-subtle"
274
274
  }), n("relationships.detail.editModal.autoRenews", "Auto-renews")]
275
275
  })
@@ -306,33 +306,33 @@ function oe({ relationship: e, onClose: t }) {
306
306
  });
307
307
  }
308
308
  function se({ relationshipId: e, onClose: t }) {
309
- let n = T(), r = _(), [i, a] = E(""), [o, s] = E("FEATURE_ACCESS"), [l, u] = E(""), [d, f] = E(""), [p, m] = E(""), [h, g] = E(null);
309
+ let n = l(), r = v(), [i, a] = E(""), [o, s] = E("FEATURE_ACCESS"), [u, d] = E(""), [f, p] = E(""), [m, h] = E(""), [g, _] = E(null);
310
310
  return /* @__PURE__ */ z(c, {
311
311
  title: n("relationships.detail.addEntitlementModal.title", "Add entitlement"),
312
312
  onClose: t,
313
313
  children: /* @__PURE__ */ B("form", {
314
314
  onSubmit: (a) => {
315
- if (a.preventDefault(), g(null), !i.trim()) {
316
- g(n("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."));
315
+ if (a.preventDefault(), _(null), !i.trim()) {
316
+ _(n("relationships.detail.addEntitlementModal.nameRequired", "An entitlement name is required."));
317
317
  return;
318
318
  }
319
319
  r.mutate({
320
320
  relationshipId: e,
321
321
  name: i.trim(),
322
322
  type: o,
323
- ...l.trim() ? { quota: Number(l) } : {},
324
- ...d.trim() ? { unit: d.trim() } : {},
325
- ...p.trim() ? { description: p.trim() } : {}
323
+ ...u.trim() ? { quota: Number(u) } : {},
324
+ ...f.trim() ? { unit: f.trim() } : {},
325
+ ...m.trim() ? { description: m.trim() } : {}
326
326
  }, {
327
327
  onSuccess: () => t(),
328
- onError: (e) => g(e instanceof Error ? e.message : n("relationships.detail.addEntitlementModal.error", "Could not add entitlement."))
328
+ onError: (e) => _(e instanceof Error ? e.message : n("relationships.detail.addEntitlementModal.error", "Could not add entitlement."))
329
329
  });
330
330
  },
331
331
  className: "space-y-4",
332
332
  children: [
333
- h && /* @__PURE__ */ z("div", {
333
+ g && /* @__PURE__ */ z("div", {
334
334
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
335
- children: h
335
+ children: g
336
336
  }),
337
337
  /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ B("label", {
338
338
  htmlFor: "ent-name",
@@ -379,8 +379,8 @@ function se({ relationshipId: e, onClose: t }) {
379
379
  id: "ent-quota",
380
380
  type: "number",
381
381
  min: "0",
382
- value: l,
383
- onChange: (e) => u(e.target.value),
382
+ value: u,
383
+ onChange: (e) => d(e.target.value),
384
384
  placeholder: n("relationships.detail.addEntitlementModal.quotaPlaceholder", "e.g. 5"),
385
385
  className: H
386
386
  })] }),
@@ -391,8 +391,8 @@ function se({ relationshipId: e, onClose: t }) {
391
391
  }), /* @__PURE__ */ z("input", {
392
392
  id: "ent-unit",
393
393
  type: "text",
394
- value: d,
395
- onChange: (e) => f(e.target.value),
394
+ value: f,
395
+ onChange: (e) => p(e.target.value),
396
396
  placeholder: n("relationships.detail.addEntitlementModal.unitPlaceholder", "e.g. seats, GB"),
397
397
  className: H
398
398
  })] })
@@ -404,8 +404,8 @@ function se({ relationshipId: e, onClose: t }) {
404
404
  children: n("relationships.detail.addEntitlementModal.descriptionLabel", "Description")
405
405
  }), /* @__PURE__ */ z("textarea", {
406
406
  id: "ent-desc",
407
- value: p,
408
- onChange: (e) => m(e.target.value),
407
+ value: m,
408
+ onChange: (e) => h(e.target.value),
409
409
  rows: 2,
410
410
  className: H
411
411
  })] }),
@@ -428,34 +428,34 @@ function se({ relationshipId: e, onClose: t }) {
428
428
  });
429
429
  }
430
430
  function ce({ relationshipId: e, onClose: t }) {
431
- let n = T(), r = g(), { uploadFile: i, progress: a, isUploading: o } = w(), [s, l] = E(""), [u, d] = E("RECEIPT"), [f, p] = E(null), [m, h] = E(""), [_, v] = E(null), y = o || r.isPending;
431
+ let n = l(), r = _(), { uploadFile: i, progress: a, isUploading: o } = T(), [s, u] = E(""), [d, f] = E("RECEIPT"), [p, m] = E(null), [h, g] = E(""), [v, y] = E(null), b = o || r.isPending;
432
432
  return /* @__PURE__ */ z(c, {
433
433
  title: n("relationships.detail.attachAssetModal.title", "Attach asset"),
434
434
  onClose: t,
435
435
  children: /* @__PURE__ */ B("form", {
436
436
  onSubmit: async (a) => {
437
- if (a.preventDefault(), v(null), !f) {
438
- v(n("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."));
437
+ if (a.preventDefault(), y(null), !p) {
438
+ y(n("relationships.detail.attachAssetModal.chooseFile", "Choose a file to attach."));
439
439
  return;
440
440
  }
441
441
  try {
442
- let { fileId: n, fileName: a } = await i(f);
442
+ let { fileId: n, fileName: a } = await i(p);
443
443
  await r.mutateAsync({
444
444
  relationshipId: e,
445
445
  name: s.trim() || a,
446
- type: u,
446
+ type: d,
447
447
  fileId: n,
448
- ...m ? { expiresAt: new Date(m).toISOString() } : {}
448
+ ...h ? { expiresAt: new Date(h).toISOString() } : {}
449
449
  }), t();
450
450
  } catch (e) {
451
- v(e instanceof Error ? e.message : n("relationships.detail.attachAssetModal.error", "Could not attach the asset."));
451
+ y(e instanceof Error ? e.message : n("relationships.detail.attachAssetModal.error", "Could not attach the asset."));
452
452
  }
453
453
  },
454
454
  className: "space-y-4",
455
455
  children: [
456
- _ && /* @__PURE__ */ z("div", {
456
+ v && /* @__PURE__ */ z("div", {
457
457
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
458
- children: _
458
+ children: v
459
459
  }),
460
460
  /* @__PURE__ */ B("div", { children: [
461
461
  /* @__PURE__ */ B("label", {
@@ -475,7 +475,7 @@ function ce({ relationshipId: e, onClose: t }) {
475
475
  type: "file",
476
476
  onChange: (e) => {
477
477
  let t = e.target.files?.[0] ?? null;
478
- p(t), t && !s.trim() && l(t.name);
478
+ m(t), t && !s.trim() && u(t.name);
479
479
  },
480
480
  className: "w-full text-sm text-text-secondary file:mr-3 file:rounded-lg file:border file:border-border-subtle file:bg-bg-surface file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-text-primary hover:file:bg-bg-sunken"
481
481
  }),
@@ -494,7 +494,7 @@ function ce({ relationshipId: e, onClose: t }) {
494
494
  id: "asset-name",
495
495
  type: "text",
496
496
  value: s,
497
- onChange: (e) => l(e.target.value),
497
+ onChange: (e) => u(e.target.value),
498
498
  placeholder: n("relationships.detail.attachAssetModal.namePlaceholder", "Defaults to the file name"),
499
499
  className: H
500
500
  })] }), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("label", {
@@ -503,8 +503,8 @@ function ce({ relationshipId: e, onClose: t }) {
503
503
  children: n("relationships.detail.attachAssetModal.typeLabel", "Type")
504
504
  }), /* @__PURE__ */ z("select", {
505
505
  id: "asset-type",
506
- value: u,
507
- onChange: (e) => d(e.target.value),
506
+ value: d,
507
+ onChange: (e) => f(e.target.value),
508
508
  className: H,
509
509
  children: K.map((e) => /* @__PURE__ */ z("option", {
510
510
  value: e,
@@ -519,8 +519,8 @@ function ce({ relationshipId: e, onClose: t }) {
519
519
  }), /* @__PURE__ */ z("input", {
520
520
  id: "asset-expires",
521
521
  type: "date",
522
- value: m,
523
- onChange: (e) => h(e.target.value),
522
+ value: h,
523
+ onChange: (e) => g(e.target.value),
524
524
  className: H
525
525
  })] }),
526
526
  o && /* @__PURE__ */ z("p", {
@@ -536,9 +536,9 @@ function ce({ relationshipId: e, onClose: t }) {
536
536
  children: n("relationships.detail.attachAssetModal.cancel", "Cancel")
537
537
  }), /* @__PURE__ */ z("button", {
538
538
  type: "submit",
539
- disabled: y,
539
+ disabled: b,
540
540
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
541
- children: y ? n("relationships.detail.attachAssetModal.attaching", "Attaching…") : n("relationships.detail.attachAssetModal.submit", "Attach asset")
541
+ children: b ? n("relationships.detail.attachAssetModal.attaching", "Attaching…") : n("relationships.detail.attachAssetModal.submit", "Attach asset")
542
542
  })]
543
543
  })
544
544
  ]
@@ -546,7 +546,7 @@ function ce({ relationshipId: e, onClose: t }) {
546
546
  });
547
547
  }
548
548
  function le({ asset: e }) {
549
- let t = T(), n = v(), [a, o] = E(!1);
549
+ let t = l(), n = y(), [a, o] = E(!1);
550
550
  return /* @__PURE__ */ B("div", {
551
551
  className: "flex items-center justify-between gap-3 p-3",
552
552
  children: [/* @__PURE__ */ B("div", {
@@ -591,7 +591,7 @@ function le({ asset: e }) {
591
591
  });
592
592
  }
593
593
  function ue({ invoice: e }) {
594
- let t = T(), a = e.number ?? t("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
594
+ let t = l(), a = e.number ?? t("relationships.detail.invoiceRow.unnumbered", "Unnumbered invoice");
595
595
  return /* @__PURE__ */ B("div", {
596
596
  className: "flex items-center justify-between gap-3 p-3",
597
597
  children: [/* @__PURE__ */ B("div", {
@@ -613,19 +613,19 @@ function ue({ invoice: e }) {
613
613
  });
614
614
  }
615
615
  function X() {
616
- let c = T(), { id: g } = ne(), { navigateTo: _ } = e(), { data: v, isLoading: y, isError: b, refetch: C } = x(g), w = S(), M = h(), [N, P] = E(null), [I, H] = E(!1), [U, W] = E(!1), [G, K] = E(!1);
617
- if (y) return /* @__PURE__ */ z(t, {
616
+ let c = l(), { id: _ } = ne(), { navigateTo: v } = e(), { data: y, isLoading: b, isError: x, refetch: w } = S(_), T = C(), M = g(), [N, P] = E(null), [I, H] = E(!1), [U, W] = E(!1), [G, K] = E(!1);
617
+ if (b) return /* @__PURE__ */ z(t, {
618
618
  title: c("relationships.title", "Relationship"),
619
- children: /* @__PURE__ */ z(u, { label: c("relationships.detail.loading", "Loading relationship…") })
619
+ children: /* @__PURE__ */ z(d, { label: c("relationships.detail.loading", "Loading relationship…") })
620
620
  });
621
- if (b) return /* @__PURE__ */ z(t, {
621
+ if (x) return /* @__PURE__ */ z(t, {
622
622
  title: c("relationships.title", "Relationship"),
623
- children: /* @__PURE__ */ z(l, {
623
+ children: /* @__PURE__ */ z(u, {
624
624
  message: c("relationships.detail.error", "Could not load this relationship."),
625
- onRetry: () => void C()
625
+ onRetry: () => void w()
626
626
  })
627
627
  });
628
- if (!v) return /* @__PURE__ */ z(t, {
628
+ if (!y) return /* @__PURE__ */ z(t, {
629
629
  title: c("relationships.title", "Relationship"),
630
630
  children: /* @__PURE__ */ z(s, {
631
631
  illustration: "empty-data",
@@ -633,14 +633,14 @@ function X() {
633
633
  description: c("relationships.detail.notFoundDescription", "It may have been removed, or you may not have access to it."),
634
634
  action: /* @__PURE__ */ z("button", {
635
635
  type: "button",
636
- onClick: () => _("/relationships"),
636
+ onClick: () => v("/relationships"),
637
637
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
638
638
  children: c("relationships.detail.backToRelationships", "Back to relationships")
639
639
  })
640
640
  })
641
641
  });
642
- let Y = v, X = w.isPending || M.isPending, de = (e) => {
643
- P(null), w.mutate({
642
+ let Y = y, X = T.isPending || M.isPending, de = (e) => {
643
+ P(null), T.mutate({
644
644
  id: Y.id,
645
645
  status: e
646
646
  }, { onError: (e) => P(e instanceof Error ? e.message : c("relationships.detail.transitionError", "Transition failed")) });
@@ -677,7 +677,7 @@ function X() {
677
677
  ]
678
678
  }), /* @__PURE__ */ B("button", {
679
679
  type: "button",
680
- onClick: () => _("/relationships"),
680
+ onClick: () => v("/relationships"),
681
681
  className: "inline-flex items-center gap-2 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
682
682
  children: [
683
683
  /* @__PURE__ */ z(O, { className: "h-4 w-4" }),
@@ -860,7 +860,7 @@ function X() {
860
860
  })]
861
861
  })]
862
862
  }),
863
- /* @__PURE__ */ z(d, {
863
+ /* @__PURE__ */ z(f, {
864
864
  className: "mt-0",
865
865
  title: c("relationships.detail.sections.entitlements", "Entitlements"),
866
866
  description: c("relationships.detail.sections.entitlementsDescription", "What this relationship grants you"),
@@ -910,7 +910,7 @@ function X() {
910
910
  className: "tabular-nums",
911
911
  children: [Math.round(e.used / e.quota * 100), "%"]
912
912
  })]
913
- }), /* @__PURE__ */ z(p, {
913
+ }), /* @__PURE__ */ z(m, {
914
914
  value: e.used,
915
915
  max: e.quota,
916
916
  tone: e.used / e.quota >= .9 ? "negative" : e.used / e.quota >= .7 ? "warning" : "accent",
@@ -922,7 +922,7 @@ function X() {
922
922
  })
923
923
  })
924
924
  }),
925
- /* @__PURE__ */ z(d, {
925
+ /* @__PURE__ */ z(f, {
926
926
  className: "mt-0",
927
927
  title: c("relationships.detail.sections.assets", "Assets"),
928
928
  description: c("relationships.detail.sections.assetsDescription", "Invoices, contracts, licenses and credentials"),
@@ -986,14 +986,14 @@ function X() {
986
986
  children: c("relationships.detail.empty.noHealthScore", "Not scored yet. A health score appears once Subscriber Bot has enough signal.")
987
987
  }) : /* @__PURE__ */ B("div", {
988
988
  className: "mt-4 flex flex-col items-center",
989
- children: [/* @__PURE__ */ z(f, {
989
+ children: [/* @__PURE__ */ z(p, {
990
990
  value: Y.healthScore,
991
991
  max: 100,
992
992
  size: 160,
993
993
  label: c("relationships.detail.outOf100", "of 100")
994
994
  }), /* @__PURE__ */ z("div", {
995
995
  className: "mt-2 w-full",
996
- children: /* @__PURE__ */ z(p, {
996
+ children: /* @__PURE__ */ z(m, {
997
997
  value: Y.healthScore,
998
998
  max: 100,
999
999
  tone: ae(Y.healthScore)
@@ -1023,7 +1023,7 @@ function X() {
1023
1023
  title: c("relationships.detail.empty.noRenewalEventsTitle", "No renewal events"),
1024
1024
  description: c("relationships.detail.empty.noRenewalEventsDescription", "Renewals and price changes will appear here as they're detected.")
1025
1025
  })
1026
- }) : /* @__PURE__ */ z(m, {
1026
+ }) : /* @__PURE__ */ z(h, {
1027
1027
  items: Z,
1028
1028
  className: "mt-4"
1029
1029
  })
@@ -1,9 +1,9 @@
1
1
  import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { formatEnumLabel as n } from "../../utils/formatters.js";
4
- import { ErrorView as r } from "../../components/StateViews.js";
5
- import { useCreateRelationship as i, usePlans as a, useProviders as o } from "../../hooks/useSubscriberBotApi.js";
6
- import { useTr as s } from "../../hooks/useTr.js";
4
+ import { useTr as r } from "../../hooks/useTr.js";
5
+ import { ErrorView as i } from "../../components/StateViews.js";
6
+ import { useCreateRelationship as a, usePlans as o, useProviders as s } from "../../hooks/useSubscriberBotApi.js";
7
7
  import { useState as c } from "react";
8
8
  import { ArrowLeft as l, Building2 as u, StickyNote as d, Tag as f, Wallet as p } from "lucide-react";
9
9
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
@@ -63,13 +63,13 @@ function C({ icon: e, title: t, description: n, children: r }) {
63
63
  });
64
64
  }
65
65
  function w() {
66
- let g = s(), { navigateTo: w } = e(), T = i(), E = o({ pagination: {
66
+ let g = r(), { navigateTo: w } = e(), T = a(), E = s({ pagination: {
67
67
  limit: 100,
68
68
  offset: 0
69
- } }), [D, O] = c(""), [k, A] = c("SUBSCRIPTION"), [j, M] = c(""), [N, P] = c(""), [F, I] = c(""), [L, R] = c("USD"), [z, B] = c("MONTHLY"), [V, H] = c(""), [U, W] = c(!0), [G, K] = c(""), [q, J] = c(null), Y = a(j || void 0), X = E.data?.items ?? [], Z = Y.data ?? [];
69
+ } }), [D, O] = c(""), [k, A] = c("SUBSCRIPTION"), [j, M] = c(""), [N, P] = c(""), [F, I] = c(""), [L, R] = c("USD"), [z, B] = c("MONTHLY"), [V, H] = c(""), [U, W] = c(!0), [G, K] = c(""), [q, J] = c(null), Y = o(j || void 0), X = E.data?.items ?? [], Z = Y.data ?? [];
70
70
  return E.isError ? /* @__PURE__ */ m(t, {
71
71
  title: g("relationships.new.title", "Add relationship"),
72
- children: /* @__PURE__ */ m(r, {
72
+ children: /* @__PURE__ */ m(i, {
73
73
  message: g("relationships.new.providerError", "Could not load the provider registry."),
74
74
  onRetry: () => void E.refetch()
75
75
  })
@@ -4,11 +4,11 @@ import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { formatCurrency as r, formatDate as i, formatEnumLabel as a, formatIntervalSuffix as o } from "../../utils/formatters.js";
5
5
  import { StatusBadge as s } from "../../components/StatusBadge.js";
6
6
  import { EmptyState as c } from "../../components/EmptyState.js";
7
- import { ErrorView as l, LoadingView as u } from "../../components/StateViews.js";
8
- import { MiniProgress as d } from "../../components/viz.js";
7
+ import { useTr as l } from "../../hooks/useTr.js";
8
+ import { ErrorView as u, LoadingView as d } from "../../components/StateViews.js";
9
+ import { MiniProgress as f } from "../../components/viz.js";
9
10
  import "../../components/index.js";
10
- import { useRelationships as f } from "../../hooks/useSubscriberBotApi.js";
11
- import { useTr as p } from "../../hooks/useTr.js";
11
+ import { useRelationships as p } from "../../hooks/useSubscriberBotApi.js";
12
12
  import { useMemo as m, useState as h } from "react";
13
13
  import { ChevronRight as g, Plus as _, Repeat2 as v, Search as y } from "lucide-react";
14
14
  import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
@@ -53,7 +53,7 @@ function j(e) {
53
53
  return e == null ? "accent" : e >= 66 ? "positive" : e >= 33 ? "warning" : "negative";
54
54
  }
55
55
  function M() {
56
- let M = p(), { navigateTo: N } = e(), [P, F] = h(0), [I, L] = h(""), [R, z] = h(""), [B, V] = h(""), [H, U] = h(""), { data: W, isLoading: G, isError: K, refetch: q, isFetching: J } = f({
56
+ let M = l(), { navigateTo: N } = e(), [P, F] = h(0), [I, L] = h(""), [R, z] = h(""), [B, V] = h(""), [H, U] = h(""), { data: W, isLoading: G, isError: K, refetch: q, isFetching: J } = p({
57
57
  status: I || void 0,
58
58
  kind: R || void 0,
59
59
  search: B || void 0,
@@ -132,7 +132,7 @@ function M() {
132
132
  })]
133
133
  })
134
134
  }),
135
- G ? /* @__PURE__ */ x(u, { label: M("relationships.loading", "Loading relationships…") }) : K ? /* @__PURE__ */ x(l, {
135
+ G ? /* @__PURE__ */ x(d, { label: M("relationships.loading", "Loading relationships…") }) : K ? /* @__PURE__ */ x(u, {
136
136
  message: M("relationships.error", "Could not load relationships."),
137
137
  onRetry: () => void q()
138
138
  }) : Y.length === 0 ? /* @__PURE__ */ x("div", {
@@ -215,7 +215,7 @@ function M() {
215
215
  children: [t == null ? /* @__PURE__ */ x("span", {
216
216
  className: "text-xs text-text-secondary",
217
217
  children: "—"
218
- }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(d, {
218
+ }) : /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(f, {
219
219
  value: t,
220
220
  max: 100,
221
221
  tone: j(t),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-subscriberbot",
3
- "version": "2026.1023.2",
3
+ "version": "2026.1029.1",
4
4
  "description": "Burdenoff SubscriberBot Microfrontend",
5
5
  "type": "module",
6
6
  "files": [