@burdenoff/microfe-proserviceworld 2026.827.1 → 2026.1009.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 (27) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/proserviceworld/components/ui.js +1 -1
  3. package/dist/proserviceworld/components/ui.js.map +1 -1
  4. package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
  5. package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
  6. package/dist/proserviceworld/hooks/useTr.d.ts +19 -0
  7. package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -0
  8. package/dist/proserviceworld/hooks/useTr.js +33 -0
  9. package/dist/proserviceworld/hooks/useTr.js.map +1 -0
  10. package/dist/proserviceworld/i18n/index.d.ts +1 -1
  11. package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
  12. package/dist/proserviceworld/i18n/index.js +723 -18
  13. package/dist/proserviceworld/i18n/index.js.map +1 -1
  14. package/dist/proserviceworld/index.js +4 -4
  15. package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
  16. package/dist/proserviceworld/pages/ClientsPage.js +166 -164
  17. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
  18. package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -1
  19. package/dist/proserviceworld/pages/DashboardPage.js +152 -142
  20. package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
  21. package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
  22. package/dist/proserviceworld/pages/EngagementsPage.js +135 -135
  23. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
  24. package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
  25. package/dist/proserviceworld/pages/MattersPage.js +204 -197
  26. package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
  27. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { useProServiceWorld as e } from "./proserviceworld/providers/ProServiceWorldProvider.js";
2
- import { ProServiceWorldRoot as t } from "./proserviceworld/ProServiceWorldRoot.js";
3
- import { useSandboxAssistantTransport as n } from "./proserviceworld/services/createSandboxAssistantTransport.js";
4
- import { t as r } from "./proserviceworld/i18n/index.js";
2
+ import { t } from "./proserviceworld/i18n/index.js";
3
+ import { ProServiceWorldRoot as n } from "./proserviceworld/ProServiceWorldRoot.js";
4
+ import { useSandboxAssistantTransport as r } from "./proserviceworld/services/createSandboxAssistantTransport.js";
5
5
  import "./proserviceworld/index.js";
6
- export { t as ProServiceWorldRoot, r as t, e as useProServiceWorld, n as useSandboxAssistantTransport };
6
+ export { n as ProServiceWorldRoot, t, e as useProServiceWorld, r as useSandboxAssistantTransport };
@@ -156,7 +156,7 @@ var u = (e) => (e ?? "").toLowerCase().replace(/_/g, " ").replace(/\b\w/g, (e) =
156
156
  className: e(x, "min-h-[80px] resize-y", t),
157
157
  ...n
158
158
  }), T = ({ className: t, children: n, ...r }) => /* @__PURE__ */ s("select", {
159
- className: e(x, "appearance-none pr-8"),
159
+ className: e(x, "appearance-none pr-8", t),
160
160
  ...r,
161
161
  children: n
162
162
  }), E = (e) => e.map((e) => /* @__PURE__ */ s("option", {
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","names":[],"sources":["../../../src/proserviceworld/components/ui.tsx"],"sourcesContent":["/**\n * ProServiceWorld shared UI kit.\n *\n * Self-contained, token-driven primitives (no raw colors) shared by every page:\n * page header, metric cards, section cards, a mobile-friendly modal, token-styled\n * native form controls, status pills, inline banners, and empty/loading/error\n * states. Actions reuse the fe-libs Button (brand variants); everything else is\n * built from semantic tokens so theming works across light/dark/any theme.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { useEffect } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { AlertCircle, CheckCircle2, Info, Loader2, X } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\n// ---------------------------------------------------------------------------\n// Formatters\n// ---------------------------------------------------------------------------\nexport const humanize = (v: string | null | undefined): string =>\n (v ?? '')\n .toLowerCase()\n .replace(/_/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\nexport const fmtDate = (iso: string | null | undefined): string => {\n if (!iso) return '—';\n const d = new Date(iso);\n return Number.isNaN(d.getTime())\n ? '—'\n : d.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' });\n};\n\nexport const fmtMoney = (amount: number | null | undefined, currency = 'USD'): string => {\n const n = amount ?? 0;\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n }).format(n);\n } catch {\n return `${currency} ${n.toLocaleString()}`;\n }\n};\n\nexport const fmtHours = (h: number | null | undefined): string =>\n `${(h ?? 0).toLocaleString(undefined, { maximumFractionDigits: 1 })}h`;\nexport const fmtMinutesAsHours = (m: number | null | undefined): string => fmtHours((m ?? 0) / 60);\n\n// ---------------------------------------------------------------------------\n// Status tone mapping\n// ---------------------------------------------------------------------------\nexport type Tone = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';\n\nconst TONE_CLASS: Record<Tone, string> = {\n neutral: 'bg-bg-sunken text-text-secondary',\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n danger: 'bg-status-error-bg-subtle text-status-error-text',\n info: 'bg-bg-sunken text-text-link',\n accent: 'bg-bg-sunken text-accent',\n};\n\nconst STATUS_TONE: Record<string, Tone> = {\n // clients / generic\n ACTIVE: 'success',\n PROSPECT: 'info',\n INACTIVE: 'neutral',\n ARCHIVED: 'neutral',\n // engagements\n PROPOSAL: 'info',\n ACCEPTED: 'accent',\n IN_PROGRESS: 'accent',\n REVIEW: 'warning',\n DELIVERED: 'success',\n INVOICED: 'success',\n CLOSED: 'neutral',\n CANCELLED: 'danger',\n // matters\n OPEN: 'accent',\n ON_HOLD: 'warning',\n // priority\n LOW: 'neutral',\n MEDIUM: 'info',\n HIGH: 'warning',\n CRITICAL: 'danger',\n // deliverable / doc\n DRAFT: 'neutral',\n INTERNAL_REVIEW: 'info',\n CLIENT_REVIEW: 'warning',\n REJECTED: 'danger',\n FINAL: 'success',\n // time\n SUBMITTED: 'info',\n APPROVED: 'success',\n BILLED: 'accent',\n // invoice\n SENT: 'info',\n PAID: 'success',\n OVERDUE: 'danger',\n // compliance / conflict\n PENDING: 'warning',\n IN_REVIEW: 'info',\n PASSED: 'success',\n FAILED: 'danger',\n WAIVED: 'neutral',\n CLEAR: 'success',\n POTENTIAL_CONFLICT: 'warning',\n CONFLICT: 'danger',\n // milestone\n COMPLETED: 'success',\n // e-signatures (BOFF-4212)\n VIEWED: 'info',\n PARTIALLY_SIGNED: 'accent',\n SIGNED: 'success',\n DECLINED: 'danger',\n EXPIRED: 'neutral',\n // client portal (BOFF-4283)\n REVOKED: 'neutral',\n};\n\nexport const StatusPill: FC<{ status: string; className?: string }> = ({ status, className }) => (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap',\n TONE_CLASS[STATUS_TONE[status] ?? 'neutral'],\n className\n )}\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-current opacity-70\" />\n {humanize(status)}\n </span>\n);\n\n// ---------------------------------------------------------------------------\n// Page header\n// ---------------------------------------------------------------------------\nexport const PageHeader: FC<{\n title: string;\n subtitle?: string;\n actions?: ReactNode;\n icon?: ReactNode;\n}> = ({ title, subtitle, actions, icon }) => (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-3.5\">\n {icon ? (\n <div className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-accent\">\n {icon}\n </div>\n ) : null}\n <div>\n <h1 className=\"text-2xl font-bold tracking-tight text-text-primary sm:text-3xl\">{title}</h1>\n {subtitle ? (\n <p className=\"mt-1.5 max-w-2xl text-sm leading-relaxed text-text-secondary\">{subtitle}</p>\n ) : null}\n </div>\n </div>\n {actions ? <div className=\"flex flex-wrap items-center gap-2\">{actions}</div> : null}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Metric card\n// ---------------------------------------------------------------------------\nexport const MetricCard: FC<{\n label: string;\n value: ReactNode;\n hint?: string;\n icon?: ReactNode;\n tone?: Tone;\n}> = ({ label, value, hint, icon, tone = 'neutral' }) => (\n <div className=\"vc-lift-on-hover rounded-2xl border border-border-seam bg-bg-surface p-5 shadow-sm\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-xs font-medium uppercase tracking-wider text-text-tertiary\">\n {label}\n </span>\n {icon ? (\n <span\n className={cn('flex h-9 w-9 items-center justify-center rounded-full', TONE_CLASS[tone])}\n >\n {icon}\n </span>\n ) : null}\n </div>\n <div className=\"mt-3 text-2xl font-semibold tracking-tight text-text-primary sm:text-3xl\">\n {value}\n </div>\n {hint ? <div className=\"mt-1 text-xs text-text-tertiary\">{hint}</div> : null}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Section card\n// ---------------------------------------------------------------------------\nexport const SectionCard: FC<{\n title?: string;\n description?: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n}> = ({ title, description, action, children, className }) => (\n <section\n className={cn('rounded-2xl border border-border-seam bg-bg-surface shadow-sm', className)}\n >\n {(title || action) && (\n <header className=\"flex items-center justify-between gap-3 border-b border-border-seam px-5 py-3.5\">\n <div>\n {title ? <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2> : null}\n {description ? <p className=\"mt-0.5 text-xs text-text-tertiary\">{description}</p> : null}\n </div>\n {action}\n </header>\n )}\n <div className=\"p-5\">{children}</div>\n </section>\n);\n\n// ---------------------------------------------------------------------------\n// Form controls (token-styled native elements — reliable inside modals)\n// ---------------------------------------------------------------------------\nconst controlClass =\n 'w-full rounded-lg border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder:text-text-tertiary focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:opacity-50';\n\nexport const Field: FC<{\n label: string;\n required?: boolean;\n hint?: string;\n children: ReactNode;\n className?: string;\n}> = ({ label, required, hint, children, className }) => (\n <label className={cn('block', className)}>\n <span className=\"mb-1 block text-xs font-medium text-text-secondary\">\n {label}\n {required ? <span className=\"text-status-error-text\"> *</span> : null}\n </span>\n {children}\n {hint ? <span className=\"mt-1 block text-xs text-text-tertiary\">{hint}</span> : null}\n </label>\n);\n\nexport const TextInput: FC<React.InputHTMLAttributes<HTMLInputElement>> = ({\n className,\n ...props\n}) => <input className={cn(controlClass, className)} {...props} />;\nexport const TextArea: FC<React.TextareaHTMLAttributes<HTMLTextAreaElement>> = ({\n className,\n ...props\n}) => <textarea className={cn(controlClass, 'min-h-[80px] resize-y', className)} {...props} />;\nexport const NativeSelect: FC<React.SelectHTMLAttributes<HTMLSelectElement>> = ({\n className,\n children,\n ...props\n}) => (\n <select className={cn(controlClass, 'appearance-none pr-8')} {...props}>\n {children}\n </select>\n);\n\n/** Turn an enum-value list into <option>s with humanized labels. */\nexport const enumOptions = (values: readonly string[]): ReactNode =>\n values.map((v) => (\n <option key={v} value={v}>\n {humanize(v)}\n </option>\n ));\n\n// ---------------------------------------------------------------------------\n// Inline banner\n// ---------------------------------------------------------------------------\nexport const Banner: FC<{\n tone?: 'success' | 'danger' | 'info';\n children: ReactNode;\n onClose?: () => void;\n}> = ({ tone = 'info', children, onClose }) => {\n const Icon = tone === 'success' ? CheckCircle2 : tone === 'danger' ? AlertCircle : Info;\n const toneClass =\n tone === 'success'\n ? TONE_CLASS.success\n : tone === 'danger'\n ? TONE_CLASS.danger\n : 'bg-bg-sunken text-text-secondary';\n return (\n <div className={cn('flex items-start gap-2 rounded-lg px-3 py-2 text-sm', toneClass)}>\n <Icon className=\"mt-0.5 h-4 w-4 shrink-0\" />\n <div className=\"flex-1\">{children}</div>\n {onClose ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"opacity-70 hover:opacity-100\"\n aria-label=\"Dismiss\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n ) : null}\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Modal (centered on desktop, full-height sheet on mobile)\n// ---------------------------------------------------------------------------\nexport const Modal: FC<{\n open: boolean;\n onClose: () => void;\n title: string;\n children: ReactNode;\n footer?: ReactNode;\n wide?: boolean;\n}> = ({ open, onClose, title, children, footer, wide }) => {\n useEffect(() => {\n if (!open) return;\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose();\n };\n document.addEventListener('keydown', onKey);\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = '';\n };\n }, [open, onClose]);\n\n if (!open) return null;\n return (\n <div\n className=\"fixed inset-0 z-50 flex items-end justify-center sm:items-center\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={title}\n >\n <div className=\"absolute inset-0 bg-black/50 backdrop-blur-sm\" onClick={onClose} />\n <div\n className={cn(\n 'relative flex max-h-[92vh] w-full flex-col overflow-hidden rounded-t-2xl border border-border-seam bg-bg-surface shadow-xl sm:max-h-[88vh] sm:rounded-2xl',\n wide ? 'sm:max-w-3xl' : 'sm:max-w-lg'\n )}\n >\n <header className=\"flex items-center justify-between border-b border-border-seam px-4 py-3\">\n <h2 className=\"text-base font-semibold text-text-primary\">{title}</h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary\"\n aria-label=\"Close\"\n >\n <X className=\"h-5 w-5\" />\n </button>\n </header>\n <div className=\"flex-1 overflow-y-auto px-4 py-4\">{children}</div>\n {footer ? (\n <footer className=\"flex items-center justify-end gap-2 border-t border-border-seam px-4 py-3\">\n {footer}\n </footer>\n ) : null}\n </div>\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// States\n// ---------------------------------------------------------------------------\nexport const LoadingBlock: FC<{ label?: string }> = ({ label = 'Loading…' }) => (\n <div className=\"flex min-h-[220px] flex-col items-center justify-center gap-3 text-text-tertiary\">\n <Loader2 className=\"h-7 w-7 animate-spin text-accent\" />\n <span className=\"text-sm\">{label}</span>\n </div>\n);\n\nexport const ErrorState: FC<{ error: unknown; onRetry?: () => void }> = ({ error, onRetry }) => (\n <div className=\"flex min-h-[220px] flex-col items-center justify-center gap-3 text-center\">\n <AlertCircle className=\"h-8 w-8 text-status-error-text\" />\n <p className=\"max-w-md text-sm text-text-secondary\">\n {error instanceof Error ? error.message : 'Something went wrong.'}\n </p>\n {onRetry ? (\n <Button variant=\"outline\" size=\"sm\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n </div>\n);\n\nexport const Empty: FC<{\n title: string;\n description?: string;\n icon?: ReactNode;\n action?: ReactNode;\n}> = ({ title, description, icon, action }) => (\n <div className=\"flex min-h-[240px] flex-col items-center justify-center gap-4 rounded-2xl border border-dashed border-border-seam bg-bg-surface/50 px-6 py-12 text-center\">\n {icon ? (\n <div className=\"flex h-14 w-14 items-center justify-center rounded-2xl bg-bg-sunken text-text-tertiary\">\n {icon}\n </div>\n ) : null}\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{title}</p>\n {description ? (\n <p className=\"mt-1 max-w-sm text-sm text-text-tertiary\">{description}</p>\n ) : null}\n </div>\n {action}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Simple responsive table wrapper (scrolls horizontally on small screens)\n// ---------------------------------------------------------------------------\nexport const TableWrap: FC<{ children: ReactNode }> = ({ children }) => (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full min-w-[560px] text-left text-sm\">{children}</table>\n </div>\n);\nexport const Th: FC<{ children?: ReactNode; className?: string }> = ({ children, className }) => (\n <th\n className={cn(\n 'bg-bg-sunken px-4 py-2.5 text-xs font-semibold uppercase tracking-wide text-text-tertiary',\n className\n )}\n >\n {children}\n </th>\n);\nexport const Td: FC<{ children?: ReactNode; className?: string }> = ({ children, className }) => (\n <td className={cn('border-t border-border-seam px-4 py-3 text-text-secondary', className)}>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,CAAA,CACpC;IAGM,KAA4D,EAAE,UAAO,iBAChF,kBAAC,OAAD;CAAK,WAAU;WAAf;EACE,kBAAC,GAAD,EAAa,WAAU,iCAAkC,CAAA;EACzD,kBAAC,KAAD;GAAG,WAAU;aACV,aAAiB,QAAQ,EAAM,UAAU;EACzC,CAAA;EACF,IACC,kBAAC,GAAD;GAAQ,SAAQ;GAAU,MAAK;GAAK,SAAS;aAAS;EAE9C,CAAA,IACN;CACD;IAGM,KAKP,EAAE,UAAO,gBAAa,SAAM,gBAChC,kBAAC,OAAD;CAAK,WAAU;WAAf;EACG,IACC,kBAAC,OAAD;GAAK,WAAU;aACZ;EACE,CAAA,IACH;EACJ,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;GAAG,WAAU;aAAyC;EAAS,CAAA,GAC9D,IACC,kBAAC,KAAD;GAAG,WAAU;aAA4C;EAAe,CAAA,IACtE,IACD,EAAA,CAAA;EACJ;CACE;IAMM,KAA0C,EAAE,kBACvD,kBAAC,OAAD;CAAK,WAAU;WACb,kBAAC,SAAD;EAAO,WAAU;EAA0C;CAAgB,CAAA;AACxE,CAAA,GAEM,KAAwD,EAAE,aAAU,mBAC/E,kBAAC,MAAD;CACE,WAAW,EACT,6FACA,CACF;CAEC;AACC,CAAA,GAEO,KAAwD,EAAE,aAAU,mBAC/E,kBAAC,MAAD;CAAI,WAAW,EAAG,6DAA6D,CAAS;CACrF;AACC,CAAA"}
1
+ {"version":3,"file":"ui.js","names":[],"sources":["../../../src/proserviceworld/components/ui.tsx"],"sourcesContent":["/**\n * ProServiceWorld shared UI kit.\n *\n * Self-contained, token-driven primitives (no raw colors) shared by every page:\n * page header, metric cards, section cards, a mobile-friendly modal, token-styled\n * native form controls, status pills, inline banners, and empty/loading/error\n * states. Actions reuse the fe-libs Button (brand variants); everything else is\n * built from semantic tokens so theming works across light/dark/any theme.\n */\n\nimport type { FC, ReactNode } from 'react';\nimport { useEffect } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { AlertCircle, CheckCircle2, Info, Loader2, X } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\n// ---------------------------------------------------------------------------\n// Formatters\n// ---------------------------------------------------------------------------\nexport const humanize = (v: string | null | undefined): string =>\n (v ?? '')\n .toLowerCase()\n .replace(/_/g, ' ')\n .replace(/\\b\\w/g, (c) => c.toUpperCase());\n\nexport const fmtDate = (iso: string | null | undefined): string => {\n if (!iso) return '—';\n const d = new Date(iso);\n return Number.isNaN(d.getTime())\n ? '—'\n : d.toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' });\n};\n\nexport const fmtMoney = (amount: number | null | undefined, currency = 'USD'): string => {\n const n = amount ?? 0;\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency,\n maximumFractionDigits: 0,\n }).format(n);\n } catch {\n return `${currency} ${n.toLocaleString()}`;\n }\n};\n\nexport const fmtHours = (h: number | null | undefined): string =>\n `${(h ?? 0).toLocaleString(undefined, { maximumFractionDigits: 1 })}h`;\nexport const fmtMinutesAsHours = (m: number | null | undefined): string => fmtHours((m ?? 0) / 60);\n\n// ---------------------------------------------------------------------------\n// Status tone mapping\n// ---------------------------------------------------------------------------\nexport type Tone = 'neutral' | 'success' | 'warning' | 'danger' | 'info' | 'accent';\n\nconst TONE_CLASS: Record<Tone, string> = {\n neutral: 'bg-bg-sunken text-text-secondary',\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n danger: 'bg-status-error-bg-subtle text-status-error-text',\n info: 'bg-bg-sunken text-text-link',\n accent: 'bg-bg-sunken text-accent',\n};\n\nconst STATUS_TONE: Record<string, Tone> = {\n // clients / generic\n ACTIVE: 'success',\n PROSPECT: 'info',\n INACTIVE: 'neutral',\n ARCHIVED: 'neutral',\n // engagements\n PROPOSAL: 'info',\n ACCEPTED: 'accent',\n IN_PROGRESS: 'accent',\n REVIEW: 'warning',\n DELIVERED: 'success',\n INVOICED: 'success',\n CLOSED: 'neutral',\n CANCELLED: 'danger',\n // matters\n OPEN: 'accent',\n ON_HOLD: 'warning',\n // priority\n LOW: 'neutral',\n MEDIUM: 'info',\n HIGH: 'warning',\n CRITICAL: 'danger',\n // deliverable / doc\n DRAFT: 'neutral',\n INTERNAL_REVIEW: 'info',\n CLIENT_REVIEW: 'warning',\n REJECTED: 'danger',\n FINAL: 'success',\n // time\n SUBMITTED: 'info',\n APPROVED: 'success',\n BILLED: 'accent',\n // invoice\n SENT: 'info',\n PAID: 'success',\n OVERDUE: 'danger',\n // compliance / conflict\n PENDING: 'warning',\n IN_REVIEW: 'info',\n PASSED: 'success',\n FAILED: 'danger',\n WAIVED: 'neutral',\n CLEAR: 'success',\n POTENTIAL_CONFLICT: 'warning',\n CONFLICT: 'danger',\n // milestone\n COMPLETED: 'success',\n // e-signatures (BOFF-4212)\n VIEWED: 'info',\n PARTIALLY_SIGNED: 'accent',\n SIGNED: 'success',\n DECLINED: 'danger',\n EXPIRED: 'neutral',\n // client portal (BOFF-4283)\n REVOKED: 'neutral',\n};\n\nexport const StatusPill: FC<{ status: string; className?: string }> = ({ status, className }) => (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap',\n TONE_CLASS[STATUS_TONE[status] ?? 'neutral'],\n className\n )}\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-current opacity-70\" />\n {humanize(status)}\n </span>\n);\n\n// ---------------------------------------------------------------------------\n// Page header\n// ---------------------------------------------------------------------------\nexport const PageHeader: FC<{\n title: string;\n subtitle?: string;\n actions?: ReactNode;\n icon?: ReactNode;\n}> = ({ title, subtitle, actions, icon }) => (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-3.5\">\n {icon ? (\n <div className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-accent\">\n {icon}\n </div>\n ) : null}\n <div>\n <h1 className=\"text-2xl font-bold tracking-tight text-text-primary sm:text-3xl\">{title}</h1>\n {subtitle ? (\n <p className=\"mt-1.5 max-w-2xl text-sm leading-relaxed text-text-secondary\">{subtitle}</p>\n ) : null}\n </div>\n </div>\n {actions ? <div className=\"flex flex-wrap items-center gap-2\">{actions}</div> : null}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Metric card\n// ---------------------------------------------------------------------------\nexport const MetricCard: FC<{\n label: string;\n value: ReactNode;\n hint?: string;\n icon?: ReactNode;\n tone?: Tone;\n}> = ({ label, value, hint, icon, tone = 'neutral' }) => (\n <div className=\"vc-lift-on-hover rounded-2xl border border-border-seam bg-bg-surface p-5 shadow-sm\">\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-xs font-medium uppercase tracking-wider text-text-tertiary\">\n {label}\n </span>\n {icon ? (\n <span\n className={cn('flex h-9 w-9 items-center justify-center rounded-full', TONE_CLASS[tone])}\n >\n {icon}\n </span>\n ) : null}\n </div>\n <div className=\"mt-3 text-2xl font-semibold tracking-tight text-text-primary sm:text-3xl\">\n {value}\n </div>\n {hint ? <div className=\"mt-1 text-xs text-text-tertiary\">{hint}</div> : null}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Section card\n// ---------------------------------------------------------------------------\nexport const SectionCard: FC<{\n title?: string;\n description?: string;\n action?: ReactNode;\n children: ReactNode;\n className?: string;\n}> = ({ title, description, action, children, className }) => (\n <section\n className={cn('rounded-2xl border border-border-seam bg-bg-surface shadow-sm', className)}\n >\n {(title || action) && (\n <header className=\"flex items-center justify-between gap-3 border-b border-border-seam px-5 py-3.5\">\n <div>\n {title ? <h2 className=\"text-sm font-semibold text-text-primary\">{title}</h2> : null}\n {description ? <p className=\"mt-0.5 text-xs text-text-tertiary\">{description}</p> : null}\n </div>\n {action}\n </header>\n )}\n <div className=\"p-5\">{children}</div>\n </section>\n);\n\n// ---------------------------------------------------------------------------\n// Form controls (token-styled native elements — reliable inside modals)\n// ---------------------------------------------------------------------------\nconst controlClass =\n 'w-full rounded-lg border border-border-seam bg-bg-canvas px-3 py-2 text-sm text-text-primary placeholder:text-text-tertiary focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/30 disabled:opacity-50';\n\nexport const Field: FC<{\n label: string;\n required?: boolean;\n hint?: string;\n children: ReactNode;\n className?: string;\n}> = ({ label, required, hint, children, className }) => (\n <label className={cn('block', className)}>\n <span className=\"mb-1 block text-xs font-medium text-text-secondary\">\n {label}\n {required ? <span className=\"text-status-error-text\"> *</span> : null}\n </span>\n {children}\n {hint ? <span className=\"mt-1 block text-xs text-text-tertiary\">{hint}</span> : null}\n </label>\n);\n\nexport const TextInput: FC<React.InputHTMLAttributes<HTMLInputElement>> = ({\n className,\n ...props\n}) => <input className={cn(controlClass, className)} {...props} />;\nexport const TextArea: FC<React.TextareaHTMLAttributes<HTMLTextAreaElement>> = ({\n className,\n ...props\n}) => <textarea className={cn(controlClass, 'min-h-[80px] resize-y', className)} {...props} />;\nexport const NativeSelect: FC<React.SelectHTMLAttributes<HTMLSelectElement>> = ({\n className,\n children,\n ...props\n}) => (\n <select className={cn(controlClass, 'appearance-none pr-8', className)} {...props}>\n {children}\n </select>\n);\n\n/** Turn an enum-value list into <option>s with humanized labels. */\nexport const enumOptions = (values: readonly string[]): ReactNode =>\n values.map((v) => (\n <option key={v} value={v}>\n {humanize(v)}\n </option>\n ));\n\n// ---------------------------------------------------------------------------\n// Inline banner\n// ---------------------------------------------------------------------------\nexport const Banner: FC<{\n tone?: 'success' | 'danger' | 'info';\n children: ReactNode;\n onClose?: () => void;\n}> = ({ tone = 'info', children, onClose }) => {\n const Icon = tone === 'success' ? CheckCircle2 : tone === 'danger' ? AlertCircle : Info;\n const toneClass =\n tone === 'success'\n ? TONE_CLASS.success\n : tone === 'danger'\n ? TONE_CLASS.danger\n : 'bg-bg-sunken text-text-secondary';\n return (\n <div className={cn('flex items-start gap-2 rounded-lg px-3 py-2 text-sm', toneClass)}>\n <Icon className=\"mt-0.5 h-4 w-4 shrink-0\" />\n <div className=\"flex-1\">{children}</div>\n {onClose ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"opacity-70 hover:opacity-100\"\n aria-label=\"Dismiss\"\n >\n <X className=\"h-4 w-4\" />\n </button>\n ) : null}\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Modal (centered on desktop, full-height sheet on mobile)\n// ---------------------------------------------------------------------------\nexport const Modal: FC<{\n open: boolean;\n onClose: () => void;\n title: string;\n children: ReactNode;\n footer?: ReactNode;\n wide?: boolean;\n}> = ({ open, onClose, title, children, footer, wide }) => {\n useEffect(() => {\n if (!open) return;\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose();\n };\n document.addEventListener('keydown', onKey);\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = '';\n };\n }, [open, onClose]);\n\n if (!open) return null;\n return (\n <div\n className=\"fixed inset-0 z-50 flex items-end justify-center sm:items-center\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={title}\n >\n <div className=\"absolute inset-0 bg-black/50 backdrop-blur-sm\" onClick={onClose} />\n <div\n className={cn(\n 'relative flex max-h-[92vh] w-full flex-col overflow-hidden rounded-t-2xl border border-border-seam bg-bg-surface shadow-xl sm:max-h-[88vh] sm:rounded-2xl',\n wide ? 'sm:max-w-3xl' : 'sm:max-w-lg'\n )}\n >\n <header className=\"flex items-center justify-between border-b border-border-seam px-4 py-3\">\n <h2 className=\"text-base font-semibold text-text-primary\">{title}</h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary\"\n aria-label=\"Close\"\n >\n <X className=\"h-5 w-5\" />\n </button>\n </header>\n <div className=\"flex-1 overflow-y-auto px-4 py-4\">{children}</div>\n {footer ? (\n <footer className=\"flex items-center justify-end gap-2 border-t border-border-seam px-4 py-3\">\n {footer}\n </footer>\n ) : null}\n </div>\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// States\n// ---------------------------------------------------------------------------\nexport const LoadingBlock: FC<{ label?: string }> = ({ label = 'Loading…' }) => (\n <div className=\"flex min-h-[220px] flex-col items-center justify-center gap-3 text-text-tertiary\">\n <Loader2 className=\"h-7 w-7 animate-spin text-accent\" />\n <span className=\"text-sm\">{label}</span>\n </div>\n);\n\nexport const ErrorState: FC<{ error: unknown; onRetry?: () => void }> = ({ error, onRetry }) => (\n <div className=\"flex min-h-[220px] flex-col items-center justify-center gap-3 text-center\">\n <AlertCircle className=\"h-8 w-8 text-status-error-text\" />\n <p className=\"max-w-md text-sm text-text-secondary\">\n {error instanceof Error ? error.message : 'Something went wrong.'}\n </p>\n {onRetry ? (\n <Button variant=\"outline\" size=\"sm\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n </div>\n);\n\nexport const Empty: FC<{\n title: string;\n description?: string;\n icon?: ReactNode;\n action?: ReactNode;\n}> = ({ title, description, icon, action }) => (\n <div className=\"flex min-h-[240px] flex-col items-center justify-center gap-4 rounded-2xl border border-dashed border-border-seam bg-bg-surface/50 px-6 py-12 text-center\">\n {icon ? (\n <div className=\"flex h-14 w-14 items-center justify-center rounded-2xl bg-bg-sunken text-text-tertiary\">\n {icon}\n </div>\n ) : null}\n <div>\n <p className=\"text-sm font-medium text-text-primary\">{title}</p>\n {description ? (\n <p className=\"mt-1 max-w-sm text-sm text-text-tertiary\">{description}</p>\n ) : null}\n </div>\n {action}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Simple responsive table wrapper (scrolls horizontally on small screens)\n// ---------------------------------------------------------------------------\nexport const TableWrap: FC<{ children: ReactNode }> = ({ children }) => (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full min-w-[560px] text-left text-sm\">{children}</table>\n </div>\n);\nexport const Th: FC<{ children?: ReactNode; className?: string }> = ({ children, className }) => (\n <th\n className={cn(\n 'bg-bg-sunken px-4 py-2.5 text-xs font-semibold uppercase tracking-wide text-text-tertiary',\n className\n )}\n >\n {children}\n </th>\n);\nexport const Td: FC<{ children?: ReactNode; className?: string }> = ({ children, className }) => (\n <td className={cn('border-t border-border-seam px-4 py-3 text-text-secondary', className)}>\n {children}\n </td>\n);\n"],"mappings":";;;;;;AAmBA,IAAa,KAAY,OACtB,KAAK,GAAA,CACH,YAAY,CAAC,CACb,QAAQ,MAAM,GAAG,CAAC,CAClB,QAAQ,UAAU,MAAM,EAAE,YAAY,CAAC,GAE/B,KAAW,MAA2C;CACjE,IAAI,CAAC,GAAK,OAAO;CACjB,IAAM,IAAI,IAAI,KAAK,CAAG;CACtB,OAAO,OAAO,MAAM,EAAE,QAAQ,CAAC,IAC3B,MACA,EAAE,mBAAmB,KAAA,GAAW;EAAE,MAAM;EAAW,OAAO;EAAS,KAAK;CAAU,CAAC;AACzF,GAEa,KAAY,GAAmC,IAAW,UAAkB;CACvF,IAAM,IAAI,KAAU;CACpB,IAAI;EACF,OAAO,IAAI,KAAK,aAAa,KAAA,GAAW;GACtC,OAAO;GACP;GACA,uBAAuB;EACzB,CAAC,CAAC,CAAC,OAAO,CAAC;CACb,QAAQ;EACN,OAAO,GAAG,EAAS,GAAG,EAAE,eAAe;CACzC;AACF,GAEa,KAAY,MACvB,IAAI,KAAK,EAAA,CAAG,eAAe,KAAA,GAAW,EAAE,uBAAuB,EAAE,CAAC,EAAE,IACzD,KAAqB,MAAyC,GAAU,KAAK,KAAK,EAAE,GAO3F,IAAmC;CACvC,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,QAAQ;AACV,GAEM,IAAoC;CAExC,QAAQ;CACR,UAAU;CACV,UAAU;CACV,UAAU;CAEV,UAAU;CACV,UAAU;CACV,aAAa;CACb,QAAQ;CACR,WAAW;CACX,UAAU;CACV,QAAQ;CACR,WAAW;CAEX,MAAM;CACN,SAAS;CAET,KAAK;CACL,QAAQ;CACR,MAAM;CACN,UAAU;CAEV,OAAO;CACP,iBAAiB;CACjB,eAAe;CACf,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Q,iBAC7D,kBAAC,OAAD;CAAK,WAAU;WAAf,CACE,kBAAC,GAAD,EAAS,WAAU,mCAAoC,CAAA,GACvD,kBAAC,QAAD;EAAM,WAAU;YAAW;CAAY,CAAA,CACpC;IAGM,KAA4D,EAAE,UAAO,iBAChF,kBAAC,OAAD;CAAK,WAAU;WAAf;EACE,kBAAC,GAAD,EAAa,WAAU,iCAAkC,CAAA;EACzD,kBAAC,KAAD;GAAG,WAAU;aACV,aAAiB,QAAQ,EAAM,UAAU;EACzC,CAAA;EACF,IACC,kBAAC,GAAD;GAAQ,SAAQ;GAAU,MAAK;GAAK,SAAS;aAAS;EAE9C,CAAA,IACN;CACD;IAGM,KAKP,EAAE,UAAO,gBAAa,SAAM,gBAChC,kBAAC,OAAD;CAAK,WAAU;WAAf;EACG,IACC,kBAAC,OAAD;GAAK,WAAU;aACZ;EACE,CAAA,IACH;EACJ,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;GAAG,WAAU;aAAyC;EAAS,CAAA,GAC9D,IACC,kBAAC,KAAD;GAAG,WAAU;aAA4C;EAAe,CAAA,IACtE,IACD,EAAA,CAAA;EACJ;CACE;IAMM,KAA0C,EAAE,kBACvD,kBAAC,OAAD;CAAK,WAAU;WACb,kBAAC,SAAD;EAAO,WAAU;EAA0C;CAAgB,CAAA;AACxE,CAAA,GAEM,KAAwD,EAAE,aAAU,mBAC/E,kBAAC,MAAD;CACE,WAAW,EACT,6FACA,CACF;CAEC;AACC,CAAA,GAEO,KAAwD,EAAE,aAAU,mBAC/E,kBAAC,MAAD;CAAI,WAAW,EAAG,6DAA6D,CAAS;CACrF;AACC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useProServiceWorldApi.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/hooks/useProServiceWorldApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA4CH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAA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ServiceWorldApi.ts"],"sourcesContent":["/**\n * ProServiceWorld API hooks\n * @module proserviceworld/hooks\n *\n * Real data layer for the ProServiceWorld workspace subgraph (`proserviceworld`\n * Hive service / `wspace-proserviceworld-svc`). Every hook talks to the live\n * workspace GraphQL gateway via {@link graphqlFetch} with inline operations\n * whose fields mirror `.hive-schema.graphql` exactly. No mocks.\n *\n * Conventions (mirror microfe-hookmovies / microfe-collabkin):\n * - `pswQuery` wraps graphqlFetch({ gateway: 'workspace', workspaceToken: true })\n * and throws on GraphQL errors / missing data.\n * - One react-query `useQuery` per read op and `useMutation` per write op.\n * - Strict hand-written result interfaces — no `any`.\n * - Lists paginate by offset (the workspaces gateway strips the cursor arg);\n * `*Connection { items, pageInfo { hasMore cursor }, totalCount }` verbatim.\n * - After any successful mutation we clear fe-libs' short-lived graphqlFetch\n * read cache so the very next refetch is fresh (fleet stale-read fix).\n */\n\nimport { useMutation, useQuery, useQueryClient, type QueryClient } from '@tanstack/react-query';\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { clearGraphqlFetchResponseCache } from '@burdenoff/fe-libs/shared/graphql/fetch';\n\n// ============================================================================\n// Low-level runner\n// ============================================================================\n\nasync function pswQuery<TData>(\n query: string,\n variables: Record<string, unknown> = {}\n): Promise<TData> {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n query,\n variables,\n workspaceToken: true,\n });\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (query.trimStart().startsWith('mutation')) {\n clearGraphqlFetchResponseCache();\n }\n return response.data;\n}\n\nconst QK = 'proserviceworld' as const;\n\n/** Invalidate a set of top-level query keys after a write. */\nfunction invalidate(qc: QueryClient, ...keys: string[]): void {\n for (const key of keys) void qc.invalidateQueries({ queryKey: [QK, key] });\n}\n\n// ============================================================================\n// Shared types (mirror .hive-schema.graphql)\n// ============================================================================\n\nexport interface PswPagination {\n limit?: number;\n offset?: number;\n}\nexport interface PswPageInfo {\n hasMore: boolean;\n cursor: string | null;\n}\nexport interface PswConnection<T> {\n items: T[];\n pageInfo: PswPageInfo;\n totalCount: number;\n}\n\nexport type PswClientType = 'INDIVIDUAL' | 'ORGANIZATION';\nexport type PswClientStatus = 'PROSPECT' | 'ACTIVE' | 'INACTIVE' | 'ARCHIVED';\nexport type PswFeeArrangement = 'FIXED' | 'HOURLY' | 'RETAINER' | 'VALUE_BASED';\nexport type PswEngagementStatus =\n | 'PROPOSAL'\n | 'ACCEPTED'\n | 'IN_PROGRESS'\n | 'REVIEW'\n | 'DELIVERED'\n | 'INVOICED'\n | 'CLOSED'\n | 'CANCELLED';\nexport type PswMatterStatus = 'OPEN' | 'ON_HOLD' | 'CLOSED' | 'ARCHIVED';\nexport type PswMatterPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';\nexport type PswDeliverableStatus =\n 'DRAFT' | 'INTERNAL_REVIEW' | 'CLIENT_REVIEW' | 'ACCEPTED' | 'REJECTED';\nexport type PswMilestoneStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';\nexport type PswDocumentStatus = 'DRAFT' | 'FINAL' | 'ARCHIVED';\nexport type PswDocumentClassification = 'PUBLIC' | 'INTERNAL' | 'CONFIDENTIAL' | 'PRIVILEGED';\nexport type PswTimeEntryStatus = 'DRAFT' | 'SUBMITTED' | 'APPROVED' | 'REJECTED' | 'BILLED';\nexport type PswInvoiceStatus = 'DRAFT' | 'SENT' | 'PAID' | 'OVERDUE' | 'CANCELLED';\nexport type PswComplianceType =\n | 'ENGAGEMENT_ACCEPTANCE'\n | 'INDEPENDENCE'\n | 'LICENSING'\n | 'CONTINUING_EDUCATION'\n | 'DATA_RETENTION'\n | 'LEGAL_HOLD';\nexport type PswComplianceStatus = 'PENDING' | 'IN_REVIEW' | 'PASSED' | 'FAILED' | 'WAIVED';\nexport type PswConflictCheckStatus =\n 'PENDING' | 'CLEAR' | 'POTENTIAL_CONFLICT' | 'CONFLICT' | 'WAIVED';\nexport type PswTeamRole = 'PARTNER' | 'MANAGER' | 'ASSOCIATE' | 'SPECIALIST' | 'SUPPORT';\n\nexport interface PswClient {\n id: string;\n name: string;\n type: PswClientType;\n status: PswClientStatus;\n industry: string | null;\n contactName: string | null;\n contactEmail: string | null;\n contactPhone: string | null;\n address: string | null;\n relationshipOwnerId: string | null;\n notes: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\nexport interface PswClientDetail extends PswClient {\n engagements: PswEngagement[];\n matters: PswMatter[];\n}\nexport interface PswEngagement {\n id: string;\n clientId: string;\n practiceAreaId: string | null;\n name: string;\n description: string | null;\n status: PswEngagementStatus;\n feeArrangement: PswFeeArrangement;\n feeAmount: number;\n currency: string;\n startDate: string | null;\n endDate: string | null;\n responsiblePartnerId: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n client?: { id: string; name: string } | null;\n}\nexport interface PswDeliverable {\n id: string;\n engagementId: string;\n name: string;\n description: string | null;\n status: PswDeliverableStatus;\n version: number;\n acceptanceCriteria: string | null;\n dueDate: string | null;\n acceptedAt: string | null;\n createdAt: string;\n}\nexport interface PswMilestone {\n id: string;\n engagementId: string;\n name: string;\n description: string | null;\n status: PswMilestoneStatus;\n dueDate: string | null;\n completedAt: string | null;\n triggerAmount: number;\n triggersInvoice: boolean;\n createdAt: string;\n}\nexport interface PswEngagementDetail extends PswEngagement {\n deliverables: PswDeliverable[];\n milestones: PswMilestone[];\n}\nexport interface PswTeamAssignment {\n id: string;\n engagementId: string | null;\n matterId: string | null;\n practitionerId: string;\n role: PswTeamRole;\n billingRate: number;\n allocationPct: number;\n isLead: boolean;\n createdAt: string;\n updatedAt: string;\n}\nexport interface PswMatter {\n id: string;\n clientId: string;\n engagementId: string | null;\n practiceAreaId: string | null;\n reference: string | null;\n title: string;\n description: string | null;\n status: PswMatterStatus;\n priority: PswMatterPriority;\n isPrivileged: boolean;\n dueDate: string | null;\n closedAt: string | null;\n leadPractitionerId: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n client?: { id: string; name: string } | null;\n}\nexport interface PswTimeEntry {\n id: string;\n engagementId: string | null;\n matterId: string | null;\n practitionerId: string;\n date: string;\n minutes: number;\n billable: boolean;\n rate: number;\n narrative: string | null;\n status: PswTimeEntryStatus;\n invoiceId: string | null;\n createdAt: string;\n}\nexport interface PswInvoice {\n id: string;\n clientId: string;\n engagementId: string | null;\n number: string;\n status: PswInvoiceStatus;\n currency: string;\n subtotal: number;\n taxAmount: number;\n total: number;\n issueDate: string | null;\n dueDate: string | null;\n paidAt: string | null;\n notes: string | null;\n createdAt: string;\n}\nexport interface PswComplianceCheck {\n id: string;\n type: PswComplianceType;\n status: PswComplianceStatus;\n subjectType: string;\n subjectId: string;\n title: string;\n details: string | null;\n reviewerId: string | null;\n dueDate: string | null;\n resolvedAt: string | null;\n createdAt: string;\n}\nexport interface PswConflictCheck {\n id: string;\n clientId: string;\n matterId: string | null;\n status: PswConflictCheckStatus;\n searchedParties: string[];\n findings: string | null;\n waiverReason: string | null;\n resolvedAt: string | null;\n createdAt: string;\n}\nexport interface PswPracticeArea {\n id: string;\n name: string;\n code: string | null;\n description: string | null;\n isActive: boolean;\n createdAt: string;\n}\nexport interface PswDocument {\n id: string;\n name: string;\n description: string | null;\n status: PswDocumentStatus;\n classification: PswDocumentClassification;\n version: number;\n legalHold: boolean;\n retainUntil: string | null;\n matterId: string | null;\n engagementId: string | null;\n tags: string[];\n file: { id: string } | null;\n createdAt: string;\n}\nexport interface PswStatusCount {\n status: string;\n count: number;\n}\nexport interface PswMonthlyAmount {\n month: string;\n amount: number;\n}\nexport interface PswDashboardStats {\n totalClients: number;\n activeClients: number;\n activeEngagements: number;\n openMatters: number;\n outstandingInvoiceTotal: number;\n paidInvoiceTotal: number;\n unbilledHours: number;\n billedHours: number;\n pendingComplianceChecks: number;\n openConflictChecks: number;\n engagementsByStatus: PswStatusCount[];\n invoicesByStatus: PswStatusCount[];\n mattersByStatus: PswStatusCount[];\n revenueByMonth: PswMonthlyAmount[];\n trustHeldTotal: number;\n activeTrustAccounts: number;\n}\n\n// ----------------------------------------------------------------------------\n// Trust accounting / IOLTA reconciliation (BOFF-4209)\n// ----------------------------------------------------------------------------\nexport type PswTrustAccountStatus = 'ACTIVE' | 'CLOSED';\nexport type PswTrustTransactionType = 'DEPOSIT' | 'WITHDRAWAL' | 'TRANSFER_OUT' | 'ADJUSTMENT';\nexport type PswTrustTransferStatus = 'COMPLETED' | 'REVERSED';\n\nexport interface PswTrustAccount {\n id: string;\n name: string;\n institutionName: string | null;\n accountNumberLast4: string | null;\n currency: string;\n status: PswTrustAccountStatus;\n createdAt: string;\n}\nexport interface PswTrustTransaction {\n id: string;\n trustAccountId: string;\n clientId: string;\n matterId: string | null;\n type: PswTrustTransactionType;\n amount: number;\n balanceAfter: number;\n description: string | null;\n reference: string | null;\n transferId: string | null;\n reconciled: boolean;\n reconciledAt: string | null;\n createdAt: string;\n}\nexport interface PswTrustTransfer {\n id: string;\n trustAccountId: string;\n clientId: string;\n matterId: string | null;\n invoiceId: string | null;\n amount: number;\n reason: string | null;\n status: PswTrustTransferStatus;\n transferredAt: string;\n createdAt: string;\n}\nexport interface PswTrustClientBalance {\n clientId: string;\n matterId: string | null;\n balance: number;\n}\nexport interface PswTrustReconciliationReport {\n trustAccountId: string;\n asOf: string;\n bookBalance: number;\n statementBalance: number | null;\n difference: number | null;\n inBalance: boolean;\n clientBalances: PswTrustClientBalance[];\n reconciledCount: number;\n}\n\n// ============================================================================\n// GraphQL fragments\n// ============================================================================\n\nconst CLIENT_F = `\n id name type status industry contactName contactEmail contactPhone address\n relationshipOwnerId notes tags createdAt updatedAt`;\nconst ENGAGEMENT_F = `\n id clientId practiceAreaId name description status feeArrangement feeAmount currency\n startDate endDate responsiblePartnerId tags createdAt updatedAt client { id name }`;\nconst DELIVERABLE_F = `id engagementId name description status version acceptanceCriteria dueDate acceptedAt createdAt`;\nconst MILESTONE_F = `id engagementId name description status dueDate completedAt triggerAmount triggersInvoice createdAt`;\nconst TEAM_ASSIGNMENT_F = `id engagementId matterId practitionerId role billingRate allocationPct isLead createdAt updatedAt`;\nconst MATTER_F = `\n id clientId engagementId practiceAreaId reference title description status priority isPrivileged\n dueDate closedAt leadPractitionerId tags createdAt updatedAt client { id name }`;\nconst TIME_F = `id engagementId matterId practitionerId date minutes billable rate narrative status invoiceId createdAt`;\nconst INVOICE_F = `id clientId engagementId number status currency subtotal taxAmount total issueDate dueDate paidAt notes createdAt`;\nconst COMPLIANCE_F = `id type status subjectType subjectId title details reviewerId dueDate resolvedAt createdAt`;\nconst CONFLICT_F = `id clientId matterId status searchedParties findings waiverReason resolvedAt createdAt`;\nconst PRACTICE_AREA_F = `id name code description isActive createdAt`;\nconst DOCUMENT_F = `id name description status classification version legalHold retainUntil matterId engagementId tags file { id } createdAt`;\nconst TRUST_ACCOUNT_F = `id name institutionName accountNumberLast4 currency status createdAt`;\nconst TRUST_TXN_F = `id trustAccountId clientId matterId type amount balanceAfter description reference transferId reconciled reconciledAt createdAt`;\nconst TRUST_TRANSFER_F = `id trustAccountId clientId matterId invoiceId amount reason status transferredAt createdAt`;\n\n// ============================================================================\n// Dashboard\n// ============================================================================\n\nexport function useDashboardStats() {\n return useQuery({\n queryKey: [QK, 'dashboard'],\n queryFn: async () => {\n const data = await pswQuery<{ pswDashboardStats: PswDashboardStats }>(`\n query PswDashboard {\n pswDashboardStats {\n totalClients activeClients activeEngagements openMatters\n outstandingInvoiceTotal paidInvoiceTotal unbilledHours billedHours\n pendingComplianceChecks openConflictChecks\n engagementsByStatus { status count }\n invoicesByStatus { status count }\n mattersByStatus { status count }\n revenueByMonth { month amount }\n trustHeldTotal activeTrustAccounts\n }\n }`);\n return data.pswDashboardStats;\n },\n });\n}\n\n// ============================================================================\n// Trust accounting / IOLTA reconciliation (BOFF-4209)\n// ============================================================================\n\nexport function useTrustAccounts(\n args: { status?: PswTrustAccountStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'trustAccounts', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustAccounts: PswConnection<PswTrustAccount> }>(\n `query PswTrustAccounts($status: PswTrustAccountStatus, $pagination: PaginationInput) {\n pswListTrustAccounts(status: $status, pagination: $pagination) {\n items { ${TRUST_ACCOUNT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListTrustAccounts;\n },\n });\n}\n\nexport function useCreateTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateTrustAccount($input: PswCreateTrustAccountInput!) {\n pswCreateTrustAccount(input: $input) { ${TRUST_ACCOUNT_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useCloseTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswCloseTrustAccount($id: ID!) { pswCloseTrustAccount(id: $id) { ${TRUST_ACCOUNT_F} } }`,\n {\n id,\n }\n ),\n onSuccess: () => invalidate(qc, 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useTrustTransactions(\n args: {\n trustAccountId?: string;\n clientId?: string;\n matterId?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'trustTransactions', args],\n enabled: !!args.trustAccountId,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustTransactions: PswConnection<PswTrustTransaction> }>(\n `query PswTrustTransactions($trustAccountId: ID, $clientId: ID, $matterId: ID, $pagination: PaginationInput) {\n pswListTrustTransactions(\n trustAccountId: $trustAccountId\n clientId: $clientId\n matterId: $matterId\n pagination: $pagination\n ) {\n items { ${TRUST_TXN_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n trustAccountId: args.trustAccountId ?? null,\n clientId: args.clientId ?? null,\n matterId: args.matterId ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTrustTransactions;\n },\n });\n}\n\nexport function useTrustTransfers(args: { trustAccountId?: string; clientId?: string } = {}) {\n return useQuery({\n queryKey: [QK, 'trustTransfers', args],\n enabled: !!args.trustAccountId,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustTransfers: PswConnection<PswTrustTransfer> }>(\n `query PswTrustTransfers($trustAccountId: ID, $clientId: ID) {\n pswListTrustTransfers(trustAccountId: $trustAccountId, clientId: $clientId) {\n items { ${TRUST_TRANSFER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { trustAccountId: args.trustAccountId ?? null, clientId: args.clientId ?? null }\n );\n return data.pswListTrustTransfers;\n },\n });\n}\n\nexport function useTrustClientBalance(\n trustAccountId?: string,\n clientId?: string,\n matterId?: string\n) {\n return useQuery({\n queryKey: [QK, 'trustClientBalance', trustAccountId, clientId, matterId],\n enabled: !!trustAccountId && !!clientId,\n queryFn: async () => {\n const data = await pswQuery<{ pswTrustClientBalance: PswTrustClientBalance }>(\n `query PswTrustClientBalance($trustAccountId: ID!, $clientId: ID!, $matterId: ID) {\n pswTrustClientBalance(trustAccountId: $trustAccountId, clientId: $clientId, matterId: $matterId) {\n clientId matterId balance\n }\n }`,\n { trustAccountId, clientId, matterId: matterId ?? null }\n );\n return data.pswTrustClientBalance;\n },\n });\n}\n\nexport function useRecordTrustDeposit() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswRecordTrustDeposit($input: PswRecordTrustDepositInput!) {\n pswRecordTrustDeposit(input: $input) { ${TRUST_TXN_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(qc, 'trustTransactions', 'trustClientBalance', 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useRecordTrustWithdrawal() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswRecordTrustWithdrawal($input: PswRecordTrustWithdrawalInput!) {\n pswRecordTrustWithdrawal(input: $input) { ${TRUST_TXN_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(qc, 'trustTransactions', 'trustClientBalance', 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useCreateTrustTransfer() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateTrustTransfer($input: PswCreateTrustTransferInput!) {\n pswCreateTrustTransfer(input: $input) { ${TRUST_TRANSFER_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(\n qc,\n 'trustTransactions',\n 'trustTransfers',\n 'trustClientBalance',\n 'trustAccounts',\n 'dashboard'\n ),\n });\n}\n\nexport function useReconcileTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswReconcileTrustAccount: PswTrustReconciliationReport }>(\n `mutation PswReconcileTrustAccount($input: PswReconcileTrustAccountInput!) {\n pswReconcileTrustAccount(input: $input) {\n trustAccountId asOf bookBalance statementBalance difference inBalance reconciledCount\n clientBalances { clientId matterId balance }\n }\n }`,\n { input }\n ).then((d) => d.pswReconcileTrustAccount),\n onSuccess: () => invalidate(qc, 'trustTransactions', 'trustAccounts', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Clients\n// ============================================================================\n\nexport function useClients(\n args: { status?: PswClientStatus; search?: string; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'clients', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListClients: PswConnection<PswClient> }>(\n `query PswClients($status: PswClientStatus, $search: String, $pagination: PaginationInput) {\n pswListClients(status: $status, search: $search, pagination: $pagination) {\n items { ${CLIENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListClients;\n },\n });\n}\n\nexport function useClient(id: string | null) {\n return useQuery({\n queryKey: [QK, 'client', id],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await pswQuery<{ pswClient: PswClientDetail | null }>(\n `query PswClient($id: ID!) {\n pswClient(id: $id) {\n ${CLIENT_F}\n engagements { ${ENGAGEMENT_F} }\n matters { ${MATTER_F} }\n }\n }`,\n { id }\n );\n return data.pswClient;\n },\n });\n}\n\nexport function useCreateClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswCreateClient: PswClient }>(\n `mutation PswCreateClient($input: PswCreateClientInput!) { pswCreateClient(input: $input) { ${CLIENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'clients', 'dashboard'),\n });\n}\nexport function useUpdateClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateClient($id: ID!, $input: PswUpdateClientInput!) { pswUpdateClient(id: $id, input: $input) { ${CLIENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'clients', 'dashboard');\n void qc.invalidateQueries({ queryKey: [QK, 'client', v.id] });\n },\n });\n}\nexport function useArchiveClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswArchiveClient($id: ID!) { pswArchiveClient(id: $id) }`, { id }),\n onSuccess: () => invalidate(qc, 'clients', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Engagements\n// ============================================================================\n\nexport function useEngagements(\n args: {\n clientId?: string;\n status?: PswEngagementStatus;\n search?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'engagements', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListEngagements: PswConnection<PswEngagement> }>(\n `query PswEngagements($clientId: ID, $status: PswEngagementStatus, $search: String, $pagination: PaginationInput) {\n pswListEngagements(clientId: $clientId, status: $status, search: $search, pagination: $pagination) {\n items { ${ENGAGEMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListEngagements;\n },\n });\n}\n\nexport function useEngagement(id: string | null) {\n return useQuery({\n queryKey: [QK, 'engagement', id],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await pswQuery<{ pswEngagement: PswEngagementDetail | null }>(\n `query PswEngagement($id: ID!) {\n pswEngagement(id: $id) {\n ${ENGAGEMENT_F}\n deliverables { ${DELIVERABLE_F} }\n milestones { ${MILESTONE_F} }\n }\n }`,\n { id }\n );\n return data.pswEngagement;\n },\n });\n}\n\nexport function useCreateEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateEngagement($input: PswCreateEngagementInput!) { pswCreateEngagement(input: $input) { ${ENGAGEMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'engagements', 'dashboard'),\n });\n}\nexport function useUpdateEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateEngagement($id: ID!, $input: PswUpdateEngagementInput!) { pswUpdateEngagement(id: $id, input: $input) { ${ENGAGEMENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'engagements');\n void qc.invalidateQueries({ queryKey: [QK, 'engagement', v.id] });\n },\n });\n}\nexport function useTransitionEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswEngagementStatus }) =>\n pswQuery(\n `mutation PswTransitionEngagement($id: ID!, $status: PswEngagementStatus!) { pswTransitionEngagement(id: $id, status: $status) { ${ENGAGEMENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'engagements', 'dashboard');\n void qc.invalidateQueries({ queryKey: [QK, 'engagement', v.id] });\n },\n });\n}\n\n// ============================================================================\n// Deliverables & Milestones (engagement delivery)\n// ============================================================================\n\nexport function useCreateDeliverable() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateDeliverable($input: PswCreateDeliverableInput!) { pswCreateDeliverable(input: $input) { ${DELIVERABLE_F} } }`,\n { input }\n ),\n onSuccess: (_d, input) =>\n qc.invalidateQueries({\n queryKey: [QK, 'engagement', (input as { engagementId: string }).engagementId],\n }),\n });\n}\nexport function useTransitionDeliverable() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswDeliverableStatus; engagementId: string }) =>\n pswQuery(\n `mutation PswTransitionDeliverable($id: ID!, $status: PswDeliverableStatus!) { pswTransitionDeliverable(id: $id, status: $status) { ${DELIVERABLE_F} } }`,\n {\n id: vars.id,\n status: vars.status,\n }\n ),\n onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: [QK, 'engagement', v.engagementId] }),\n });\n}\nexport function useCreateMilestone() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateMilestone($input: PswCreateMilestoneInput!) { pswCreateMilestone(input: $input) { ${MILESTONE_F} } }`,\n { input }\n ),\n onSuccess: (_d, input) =>\n qc.invalidateQueries({\n queryKey: [QK, 'engagement', (input as { engagementId: string }).engagementId],\n }),\n });\n}\nexport function useCompleteMilestone() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; engagementId: string }) =>\n pswQuery(\n `mutation PswCompleteMilestone($id: ID!) { pswCompleteMilestone(id: $id) { ${MILESTONE_F} } }`,\n { id: vars.id }\n ),\n onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: [QK, 'engagement', v.engagementId] }),\n });\n}\n\n// ============================================================================\n// Team assignments (staffing)\n// ============================================================================\n\n/**\n * Staffing rows for one engagement or matter (`pswListTeamAssignments`).\n * `practitionerId` is a workspace actor id — resolve it to a human name with\n * {@link useActorNames}, never render the raw id as if it were a person.\n */\nexport function useTeamAssignments(\n args: {\n engagementId?: string;\n matterId?: string;\n practitionerId?: string;\n pagination?: PswPagination;\n } = {}\n) {\n const enabled = Boolean(args.engagementId || args.matterId || args.practitionerId);\n return useQuery({\n queryKey: [QK, 'teamAssignments', args],\n enabled,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTeamAssignments: PswConnection<PswTeamAssignment> }>(\n `query PswTeamAssignments($engagementId: ID, $matterId: ID, $practitionerId: ID, $pagination: PaginationInput) {\n pswListTeamAssignments(engagementId: $engagementId, matterId: $matterId, practitionerId: $practitionerId, pagination: $pagination) {\n items { ${TEAM_ASSIGNMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n practitionerId: args.practitionerId ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTeamAssignments;\n },\n });\n}\n\n/** One staffing row plus the engagement/matter it was staffed against. */\nexport interface PswTeamAssignmentScoped extends PswTeamAssignment {\n scopeType: 'engagement' | 'matter';\n scopeId: string;\n scopeName: string;\n}\n\n/**\n * Client-level staffing roll-up. `pswListTeamAssignments` has no `clientId`\n * filter, so the client's engagements and matters (already loaded by the\n * client detail query) are each queried as an alias inside ONE operation —\n * one round trip, no N+1, and no invented rows for scopes the caller did not\n * pass in.\n */\nexport function useClientTeamAssignments(\n scopes: Array<{ type: 'engagement' | 'matter'; id: string; name: string }>\n) {\n const key = scopes.map((s) => `${s.type}:${s.id}`).join(',');\n return useQuery({\n queryKey: [QK, 'clientTeamAssignments', key],\n enabled: scopes.length > 0,\n queryFn: async () => {\n const args = scopes\n .map((_s, i) => `$scope${i}: ID`)\n .concat('$pagination: PaginationInput')\n .join(', ');\n const body = scopes\n .map(\n (s, i) =>\n ` a${i}: pswListTeamAssignments(${s.type === 'engagement' ? 'engagementId' : 'matterId'}: $scope${i}, pagination: $pagination) {\n items { ${TEAM_ASSIGNMENT_F} } pageInfo { hasMore cursor } totalCount\n }`\n )\n .join('\\n');\n const variables: Record<string, unknown> = { pagination: { limit: 100 } };\n scopes.forEach((s, i) => {\n variables[`scope${i}`] = s.id;\n });\n\n const data = await pswQuery<Record<string, PswConnection<PswTeamAssignment>>>(\n `query PswClientTeam(${args}) {\\n${body}\\n}`,\n variables\n );\n\n const rows: PswTeamAssignmentScoped[] = [];\n scopes.forEach((s, i) => {\n for (const item of data[`a${i}`]?.items ?? []) {\n rows.push({ ...item, scopeType: s.type, scopeId: s.id, scopeName: s.name });\n }\n });\n return rows;\n },\n });\n}\n\nexport function useAddTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswAddTeamAssignment: PswTeamAssignment }>(\n `mutation PswAddTeamAssignment($input: PswCreateTeamAssignmentInput!) { pswAddTeamAssignment(input: $input) { ${TEAM_ASSIGNMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\nexport function useUpdateTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery<{ pswUpdateTeamAssignment: PswTeamAssignment }>(\n `mutation PswUpdateTeamAssignment($id: ID!, $input: PswUpdateTeamAssignmentInput!) { pswUpdateTeamAssignment(id: $id, input: $input) { ${TEAM_ASSIGNMENT_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\nexport function useRemoveTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery<{ pswRemoveTeamAssignment: boolean }>(\n `mutation PswRemoveTeamAssignment($id: ID!) { pswRemoveTeamAssignment(id: $id) }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\n// ============================================================================\n// Matters\n// ============================================================================\n\nexport function useMatters(\n args: {\n clientId?: string;\n engagementId?: string;\n status?: PswMatterStatus;\n search?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'matters', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListMatters: PswConnection<PswMatter> }>(\n `query PswMatters($clientId: ID, $engagementId: ID, $status: PswMatterStatus, $search: String, $pagination: PaginationInput) {\n pswListMatters(clientId: $clientId, engagementId: $engagementId, status: $status, search: $search, pagination: $pagination) {\n items { ${MATTER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n engagementId: args.engagementId ?? null,\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListMatters;\n },\n });\n}\nexport function useCreateMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateMatter($input: PswCreateMatterInput!) { pswCreateMatter(input: $input) { ${MATTER_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'matters', 'dashboard'),\n });\n}\nexport function useUpdateMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateMatter($id: ID!, $input: PswUpdateMatterInput!) { pswUpdateMatter(id: $id, input: $input) { ${MATTER_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'matters'),\n });\n}\nexport function useCloseMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswCloseMatter($id: ID!) { pswCloseMatter(id: $id) { ${MATTER_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'matters', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Time entries\n// ============================================================================\n\nexport function useTimeEntries(\n args: {\n engagementId?: string;\n matterId?: string;\n status?: PswTimeEntryStatus;\n billable?: boolean;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'time', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListTimeEntries: PswConnection<PswTimeEntry> }>(\n `query PswTimeEntries($engagementId: ID, $matterId: ID, $status: PswTimeEntryStatus, $billable: Boolean, $pagination: PaginationInput) {\n pswListTimeEntries(engagementId: $engagementId, matterId: $matterId, status: $status, billable: $billable, pagination: $pagination) {\n items { ${TIME_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n status: args.status ?? null,\n billable: args.billable ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTimeEntries;\n },\n });\n}\nexport function useLogTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswLogTime($input: PswCreateTimeEntryInput!) { pswLogTimeEntry(input: $input) { ${TIME_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'time', 'dashboard'),\n });\n}\nexport function useSubmitTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswSubmitTime($id: ID!) { pswSubmitTimeEntry(id: $id) { ${TIME_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'time'),\n });\n}\nexport function useApproveTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswApproveTime($id: ID!) { pswApproveTimeEntry(id: $id) { ${TIME_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'time'),\n });\n}\n\n// ============================================================================\n// Invoices\n// ============================================================================\n\nexport function useInvoices(\n args: { clientId?: string; status?: PswInvoiceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'invoices', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListInvoices: PswConnection<PswInvoice> }>(\n `query PswInvoices($clientId: ID, $status: PswInvoiceStatus, $pagination: PaginationInput) {\n pswListInvoices(clientId: $clientId, status: $status, pagination: $pagination) {\n items { ${INVOICE_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListInvoices;\n },\n });\n}\nexport function useCreateInvoice() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateInvoice($input: PswCreateInvoiceInput!) { pswCreateInvoice(input: $input) { ${INVOICE_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'invoices', 'dashboard'),\n });\n}\nexport function useMarkInvoicePaid() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswMarkPaid($id: ID!) { pswMarkInvoicePaid(id: $id) { ${INVOICE_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'invoices', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Compliance\n// ============================================================================\n\nexport function useComplianceChecks(\n args: { status?: PswComplianceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'compliance', args],\n queryFn: async () => {\n const data = await pswQuery<{\n pswListComplianceChecks: PswConnection<PswComplianceCheck>;\n }>(\n `query PswCompliance($status: PswComplianceStatus, $pagination: PaginationInput) {\n pswListComplianceChecks(status: $status, pagination: $pagination) {\n items { ${COMPLIANCE_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListComplianceChecks;\n },\n });\n}\nexport function useCreateComplianceCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateCompliance($input: PswCreateComplianceCheckInput!) { pswCreateComplianceCheck(input: $input) { ${COMPLIANCE_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'compliance', 'dashboard'),\n });\n}\nexport function useResolveComplianceCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswComplianceStatus; details?: string }) =>\n pswQuery(\n `mutation PswResolveCompliance($id: ID!, $status: PswComplianceStatus!, $details: String) { pswResolveComplianceCheck(id: $id, status: $status, details: $details) { ${COMPLIANCE_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'compliance', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Conflict checks\n// ============================================================================\n\nexport function useConflictChecks(args: { clientId?: string; pagination?: PswPagination } = {}) {\n return useQuery({\n queryKey: [QK, 'conflicts', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListConflictChecks: PswConnection<PswConflictCheck> }>(\n `query PswConflicts($clientId: ID, $pagination: PaginationInput) {\n pswListConflictChecks(clientId: $clientId, pagination: $pagination) {\n items { ${CONFLICT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { clientId: args.clientId ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListConflictChecks;\n },\n });\n}\nexport function useCreateConflictCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateConflict($input: PswCreateConflictCheckInput!) { pswCreateConflictCheck(input: $input) { ${CONFLICT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'conflicts', 'dashboard'),\n });\n}\nexport function useResolveConflictCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: {\n id: string;\n status: PswConflictCheckStatus;\n findings?: string;\n waiverReason?: string;\n }) =>\n pswQuery(\n `mutation PswResolveConflict($id: ID!, $status: PswConflictCheckStatus!, $findings: String, $waiverReason: String) {\n pswResolveConflictCheck(id: $id, status: $status, findings: $findings, waiverReason: $waiverReason) { ${CONFLICT_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'conflicts', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Practice areas\n// ============================================================================\n\nexport function usePracticeAreas() {\n return useQuery({\n queryKey: [QK, 'practiceAreas'],\n queryFn: async () => {\n const data = await pswQuery<{ pswListPracticeAreas: PswConnection<PswPracticeArea> }>(\n `query PswPracticeAreas {\n pswListPracticeAreas(pagination: { limit: 100 }) {\n items { ${PRACTICE_AREA_F} } pageInfo { hasMore cursor } totalCount\n }\n }`\n );\n return data.pswListPracticeAreas;\n },\n });\n}\nexport function useCreatePracticeArea() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreatePracticeArea($input: PswCreatePracticeAreaInput!) { pswCreatePracticeArea(input: $input) { ${PRACTICE_AREA_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'practiceAreas'),\n });\n}\nexport function useUpdatePracticeArea() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdatePracticeArea($id: ID!, $input: PswUpdatePracticeAreaInput!) { pswUpdatePracticeArea(id: $id, input: $input) { ${PRACTICE_AREA_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'practiceAreas'),\n });\n}\n\n// ============================================================================\n// Documents (metadata over wspace-files-svc)\n// ============================================================================\n\nexport function useDocuments(\n args: {\n engagementId?: string;\n matterId?: string;\n classification?: PswDocumentClassification;\n status?: PswDocumentStatus;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'documents', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListDocuments: PswConnection<PswDocument> }>(\n `query PswDocuments($engagementId: ID, $matterId: ID, $classification: PswDocumentClassification, $status: PswDocumentStatus, $pagination: PaginationInput) {\n pswListDocuments(engagementId: $engagementId, matterId: $matterId, classification: $classification, status: $status, pagination: $pagination) {\n items { ${DOCUMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n classification: args.classification ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListDocuments;\n },\n });\n}\nexport function useCreateDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateDocument($input: PswCreateDocumentInput!) { pswCreateDocument(input: $input) { ${DOCUMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'documents'),\n });\n}\nexport function useArchiveDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswArchiveDocument($id: ID!) { pswArchiveDocument(id: $id) { ${DOCUMENT_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'documents'),\n });\n}\n\n// ============================================================================\n// Native E-Signatures (BOFF-4212)\n// ============================================================================\n// Scope: a real capture-and-audit core. Signers are existing platform actors\n// (workspace members or ACTIVE client-portal contacts) — no anonymous\n// email-only signing link, no third-party e-signature provider integration.\n// See wspace-proserviceworld-svc/prisma/schema/signatures.prisma.\n\nexport type PswSignatureRequestStatus =\n | 'DRAFT'\n | 'SENT'\n | 'VIEWED'\n | 'PARTIALLY_SIGNED'\n | 'COMPLETED'\n | 'DECLINED'\n | 'CANCELLED'\n | 'EXPIRED';\nexport type PswSignatureSignerStatus = 'PENDING' | 'VIEWED' | 'SIGNED' | 'DECLINED';\nexport type PswSignatureType = 'TYPED' | 'DRAWN';\n\nexport interface PswSignatureSigner {\n id: string;\n signatureRequestId: string;\n actorId: string;\n name: string;\n email: string;\n order: number;\n status: PswSignatureSignerStatus;\n viewedAt: string | null;\n signedAt: string | null;\n declinedAt: string | null;\n declineReason: string | null;\n signatureType: PswSignatureType | null;\n typedName: string | null;\n signatureImage: string | null;\n signedIp: string | null;\n createdAt: string;\n /** Only populated by pswMyPendingSignatureRequests (self-scoped signer list). */\n signatureRequest?: PswSignatureRequest | null;\n}\nexport interface PswSignatureRequest {\n id: string;\n documentId: string;\n document: { id: string; name: string } | null;\n status: PswSignatureRequestStatus;\n message: string | null;\n documentVersion: number | null;\n expiresAt: string | null;\n sentAt: string | null;\n completedAt: string | null;\n createdAt: string;\n signers: PswSignatureSigner[];\n}\nexport interface PswSignatureAuditEvent {\n id: string;\n signatureRequestId: string;\n signerId: string | null;\n eventType: string;\n actorId: string;\n actorLabel: string;\n ipAddress: string | null;\n documentVersion: number | null;\n createdAt: string;\n}\n\nconst SIGNER_F = `id signatureRequestId actorId name email order status viewedAt signedAt declinedAt declineReason signatureType typedName signatureImage signedIp createdAt`;\nconst SIGNATURE_REQUEST_F = `id documentId document { id name } status message documentVersion expiresAt sentAt completedAt createdAt signers { ${SIGNER_F} }`;\nconst AUDIT_EVENT_F = `id signatureRequestId signerId eventType actorId actorLabel ipAddress documentVersion createdAt`;\n\n/** Practitioner-side: signature requests for the workspace (optionally by document). */\nexport function useSignatureRequests(\n args: { documentId?: string; status?: PswSignatureRequestStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'signatureRequests', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListSignatureRequests: PswConnection<PswSignatureRequest> }>(\n `query PswSignatureRequests($documentId: ID, $status: PswSignatureRequestStatus, $pagination: PaginationInput) {\n pswListSignatureRequests(documentId: $documentId, status: $status, pagination: $pagination) {\n items { ${SIGNATURE_REQUEST_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n documentId: args.documentId ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListSignatureRequests;\n },\n });\n}\n\n/** Immutable audit trail for one signature request — compliance evidence. */\nexport function useSignatureAuditEvents(signatureRequestId: string | null) {\n return useQuery({\n queryKey: [QK, 'signatureAuditEvents', signatureRequestId],\n enabled: !!signatureRequestId,\n queryFn: async () => {\n const data = await pswQuery<{\n pswListSignatureAuditEvents: PswConnection<PswSignatureAuditEvent>;\n }>(\n `query PswSignatureAuditEvents($signatureRequestId: ID!, $pagination: PaginationInput) {\n pswListSignatureAuditEvents(signatureRequestId: $signatureRequestId, pagination: $pagination) {\n items { ${AUDIT_EVENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { signatureRequestId, pagination: { limit: 100 } }\n );\n return data.pswListSignatureAuditEvents;\n },\n });\n}\n\nexport function useCreateSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateSignatureRequest($input: PswCreateSignatureRequestInput!) {\n pswCreateSignatureRequest(input: $input) { ${SIGNATURE_REQUEST_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\nexport function useSendSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswSendSignatureRequest($id: ID!) { pswSendSignatureRequest(id: $id) { ${SIGNATURE_REQUEST_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\nexport function useCancelSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswCancelSignatureRequest($id: ID!) { pswCancelSignatureRequest(id: $id) { ${SIGNATURE_REQUEST_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\n\n/** Signer-side (self-scoped): requests awaiting the calling actor's signature. */\nexport function useMyPendingSignatureRequests() {\n return useQuery({\n queryKey: [QK, 'myPendingSignatures'],\n queryFn: async () => {\n const data = await pswQuery<{\n pswMyPendingSignatureRequests: PswConnection<PswSignatureSigner>;\n }>(\n `query PswMyPendingSignatureRequests($pagination: PaginationInput) {\n pswMyPendingSignatureRequests(pagination: $pagination) {\n items { ${SIGNER_F} signatureRequest { ${SIGNATURE_REQUEST_F} } } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { pagination: { limit: 100 } }\n );\n return data.pswMyPendingSignatureRequests;\n },\n });\n}\nexport function useViewSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (signerId: string) =>\n pswQuery(\n `mutation PswViewSignatureRequest($signerId: ID!) { pswViewSignatureRequest(signerId: $signerId) { ${SIGNER_F} } }`,\n { signerId }\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures'),\n });\n}\nexport function useSignDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { signerId: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswSignDocument($signerId: ID!, $input: PswSignDocumentInput!) {\n pswSignDocument(signerId: $signerId, input: $input) { ${SIGNER_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures', 'signatureRequests', 'documents'),\n });\n}\nexport function useDeclineSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { signerId: string; reason?: string }) =>\n pswQuery(\n `mutation PswDeclineSignatureRequest($signerId: ID!, $reason: String) {\n pswDeclineSignatureRequest(signerId: $signerId, reason: $reason) { ${SIGNER_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures', 'signatureRequests', 'documents'),\n });\n}\n\n// ============================================================================\n// Client Portal (BOFF-4283)\n// ============================================================================\n// Scope: a genuine, correctly-scoped MVP. Every \"my*\" hook here is self-scoped\n// (Type C) — the client-portal contact sees only what their ACTIVE\n// PswClientPortalUser link exposes, no identity/clientId arg is ever sent.\n\nexport type PswClientPortalUserStatus = 'ACTIVE' | 'REVOKED';\n\nexport interface PswClientPortalUser {\n id: string;\n clientId: string;\n actorId: string;\n name: string;\n email: string;\n status: PswClientPortalUserStatus;\n invitedBy: string;\n invitedAt: string;\n revokedAt: string | null;\n createdAt: string;\n}\n\nconst PORTAL_USER_F = `id clientId actorId name email status invitedBy invitedAt revokedAt createdAt`;\n\n/** Practitioner-side: who has client-portal access (optionally scoped to one client). */\nexport function useClientPortalUsers(args: { clientId?: string; pagination?: PswPagination } = {}) {\n return useQuery({\n queryKey: [QK, 'clientPortalUsers', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListClientPortalUsers: PswConnection<PswClientPortalUser> }>(\n `query PswClientPortalUsers($clientId: ID, $pagination: PaginationInput) {\n pswListClientPortalUsers(clientId: $clientId, pagination: $pagination) {\n items { ${PORTAL_USER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { clientId: args.clientId ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListClientPortalUsers;\n },\n });\n}\nexport function useInviteClientPortalUser() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswInviteClientPortalUser($input: PswInviteClientPortalUserInput!) {\n pswInviteClientPortalUser(input: $input) { ${PORTAL_USER_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'clientPortalUsers'),\n });\n}\nexport function useRevokeClientPortalUser() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswRevokeClientPortalUser($id: ID!) { pswRevokeClientPortalUser(id: $id) { ${PORTAL_USER_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'clientPortalUsers'),\n });\n}\n\n/** Client-portal side (self-scoped): the client(s) the calling actor may see. */\nexport function useMyClientPortalClients() {\n return useQuery({\n queryKey: [QK, 'myClientPortalClients'],\n queryFn: async () => {\n const data = await pswQuery<{\n pswMyClientPortalClients: Array<{ id: string; name: string }>;\n }>(`query PswMyClientPortalClients { pswMyClientPortalClients { id name } }`);\n return data.pswMyClientPortalClients;\n },\n });\n}\n/** Client-portal side (self-scoped): matters for the calling actor's own linked client(s). */\nexport function useMyMatters(pagination?: PswPagination) {\n return useQuery({\n queryKey: [QK, 'myMatters', pagination],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyMatters: PswConnection<PswMatter> }>(\n `query PswMyMatters($pagination: PaginationInput) {\n pswMyMatters(pagination: $pagination) { items { ${MATTER_F} } pageInfo { hasMore cursor } totalCount }\n }`,\n { pagination: pagination ?? { limit: 100 } }\n );\n return data.pswMyMatters;\n },\n });\n}\n/** Client-portal side (self-scoped): invoices for the calling actor's own linked client(s). */\nexport function useMyInvoices(\n args: { status?: PswInvoiceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'myInvoices', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyInvoices: PswConnection<PswInvoice> }>(\n `query PswMyInvoices($status: PswInvoiceStatus, $pagination: PaginationInput) {\n pswMyInvoices(status: $status, pagination: $pagination) { items { ${INVOICE_F} } pageInfo { hasMore cursor } totalCount }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswMyInvoices;\n },\n });\n}\n/**\n * Client-portal side (self-scoped): documents for the calling actor's own\n * linked client(s) — the backend restricts this to classification PUBLIC\n * only, regardless of what's requested here.\n */\nexport function useMyDocuments(pagination?: PswPagination) {\n return useQuery({\n queryKey: [QK, 'myDocuments', pagination],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyDocuments: PswConnection<PswDocument> }>(\n `query PswMyDocuments($pagination: PaginationInput) {\n pswMyDocuments(pagination: $pagination) { items { ${DOCUMENT_F} } pageInfo { hasMore cursor } totalCount }\n }`,\n { pagination: pagination ?? { limit: 100 } }\n );\n return data.pswMyDocuments;\n },\n });\n}\n"],"mappings":";;;;AA6BA,eAAe,EACb,GACA,IAAqC,CAAC,GACtB;CAChB,IAAM,IAAW,MAAM,EAAoB;EACzC,SAAS;EACT;EACA;EACA,gBAAgB;CAClB,CAAC;CACD,IAAI,EAAS,QAAQ,QACnB,MAAU,MAAM,EAAS,OAAO,EAAE,EAAE,WAAW,wBAAwB;CAEzE,IAAI,CAAC,EAAS,MACZ,MAAU,MAAM,uCAAuC;CAKzD,OAHI,EAAM,UAAU,CAAC,CAAC,WAAW,UAAU,KACzC,EAA+B,GAE1B,EAAS;AAClB;AAEA,IAAM,IAAK;AAGX,SAAS,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C,SAAS,aAOA,MANY,EACjB;8EACsE,EAAU;YAEhF;GAAE,QAAQ,EAAK,UAAU;GAAM,YAAY,EAAK,cAAc,EAAE,OAAO,IAAI;EAAE,CAC/E,EAAA,CACY;CAEhB,CAAC;AACH;AAMA,SAAgB,GAAe,GAA4B;CACzD,OAAO,EAAS;EACd,UAAU;GAAC;GAAI;GAAe;EAAU;EACxC,SAAS,aAOA,MANY,EACjB;8DACsD,EAAW;YAEjE,EAAE,YAAY,KAAc,EAAE,OAAO,IAAI,EAAE,CAC7C,EAAA,CACY;CAEhB,CAAC;AACH"}
1
+ {"version":3,"file":"useProServiceWorldApi.js","names":[],"sources":["../../../src/proserviceworld/hooks/useProServiceWorldApi.ts"],"sourcesContent":["/**\n * ProServiceWorld API hooks\n * @module proserviceworld/hooks\n *\n * Real data layer for the ProServiceWorld workspace subgraph (`proserviceworld`\n * Hive service / `wspace-proserviceworld-svc`). Every hook talks to the live\n * workspace GraphQL gateway via {@link graphqlFetch} with inline operations\n * whose fields mirror `.hive-schema.graphql` exactly. No mocks.\n *\n * Conventions (mirror microfe-hookmovies / microfe-collabkin):\n * - `pswQuery` wraps graphqlFetch({ gateway: 'workspace', workspaceToken: true })\n * and throws on GraphQL errors / missing data.\n * - One react-query `useQuery` per read op and `useMutation` per write op.\n * - Strict hand-written result interfaces — no `any`.\n * - Lists paginate by offset (the workspaces gateway strips the cursor arg);\n * `*Connection { items, pageInfo { hasMore cursor }, totalCount }` verbatim.\n * - After any successful mutation we clear fe-libs' short-lived graphqlFetch\n * read cache so the very next refetch is fresh (fleet stale-read fix).\n */\n\nimport { useMutation, useQuery, useQueryClient, type QueryClient } from '@tanstack/react-query';\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { clearGraphqlFetchResponseCache } from '@burdenoff/fe-libs/shared/graphql/fetch';\n\n// ============================================================================\n// Low-level runner\n// ============================================================================\n\nasync function pswQuery<TData>(\n query: string,\n variables: Record<string, unknown> = {}\n): Promise<TData> {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n query,\n variables,\n workspaceToken: true,\n });\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n if (query.trimStart().startsWith('mutation')) {\n clearGraphqlFetchResponseCache();\n }\n return response.data;\n}\n\nconst QK = 'proserviceworld' as const;\n\n/** Invalidate a set of top-level query keys after a write. */\nfunction invalidate(qc: QueryClient, ...keys: string[]): void {\n for (const key of keys) void qc.invalidateQueries({ queryKey: [QK, key] });\n}\n\n// ============================================================================\n// Shared types (mirror .hive-schema.graphql)\n// ============================================================================\n\nexport interface PswPagination {\n limit?: number;\n offset?: number;\n}\nexport interface PswPageInfo {\n hasMore: boolean;\n cursor: string | null;\n}\nexport interface PswConnection<T> {\n items: T[];\n pageInfo: PswPageInfo;\n totalCount: number;\n}\n\nexport type PswClientType = 'INDIVIDUAL' | 'ORGANIZATION';\nexport type PswClientStatus = 'PROSPECT' | 'ACTIVE' | 'INACTIVE' | 'ARCHIVED';\nexport type PswFeeArrangement = 'FIXED' | 'HOURLY' | 'RETAINER' | 'VALUE_BASED';\nexport type PswEngagementStatus =\n | 'PROPOSAL'\n | 'ACCEPTED'\n | 'IN_PROGRESS'\n | 'REVIEW'\n | 'DELIVERED'\n | 'INVOICED'\n | 'CLOSED'\n | 'CANCELLED';\nexport type PswMatterStatus = 'OPEN' | 'ON_HOLD' | 'CLOSED' | 'ARCHIVED';\nexport type PswMatterPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';\nexport type PswDeliverableStatus =\n | 'DRAFT'\n | 'INTERNAL_REVIEW'\n | 'CLIENT_REVIEW'\n | 'ACCEPTED'\n | 'REJECTED';\nexport type PswMilestoneStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';\nexport type PswDocumentStatus = 'DRAFT' | 'FINAL' | 'ARCHIVED';\nexport type PswDocumentClassification = 'PUBLIC' | 'INTERNAL' | 'CONFIDENTIAL' | 'PRIVILEGED';\nexport type PswTimeEntryStatus = 'DRAFT' | 'SUBMITTED' | 'APPROVED' | 'REJECTED' | 'BILLED';\nexport type PswInvoiceStatus = 'DRAFT' | 'SENT' | 'PAID' | 'OVERDUE' | 'CANCELLED';\nexport type PswComplianceType =\n | 'ENGAGEMENT_ACCEPTANCE'\n | 'INDEPENDENCE'\n | 'LICENSING'\n | 'CONTINUING_EDUCATION'\n | 'DATA_RETENTION'\n | 'LEGAL_HOLD';\nexport type PswComplianceStatus = 'PENDING' | 'IN_REVIEW' | 'PASSED' | 'FAILED' | 'WAIVED';\nexport type PswConflictCheckStatus =\n | 'PENDING'\n | 'CLEAR'\n | 'POTENTIAL_CONFLICT'\n | 'CONFLICT'\n | 'WAIVED';\nexport type PswTeamRole = 'PARTNER' | 'MANAGER' | 'ASSOCIATE' | 'SPECIALIST' | 'SUPPORT';\n\nexport interface PswClient {\n id: string;\n name: string;\n type: PswClientType;\n status: PswClientStatus;\n industry: string | null;\n contactName: string | null;\n contactEmail: string | null;\n contactPhone: string | null;\n address: string | null;\n relationshipOwnerId: string | null;\n notes: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\nexport interface PswClientDetail extends PswClient {\n engagements: PswEngagement[];\n matters: PswMatter[];\n}\nexport interface PswEngagement {\n id: string;\n clientId: string;\n practiceAreaId: string | null;\n name: string;\n description: string | null;\n status: PswEngagementStatus;\n feeArrangement: PswFeeArrangement;\n feeAmount: number;\n currency: string;\n startDate: string | null;\n endDate: string | null;\n responsiblePartnerId: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n client?: { id: string; name: string } | null;\n}\nexport interface PswDeliverable {\n id: string;\n engagementId: string;\n name: string;\n description: string | null;\n status: PswDeliverableStatus;\n version: number;\n acceptanceCriteria: string | null;\n dueDate: string | null;\n acceptedAt: string | null;\n createdAt: string;\n}\nexport interface PswMilestone {\n id: string;\n engagementId: string;\n name: string;\n description: string | null;\n status: PswMilestoneStatus;\n dueDate: string | null;\n completedAt: string | null;\n triggerAmount: number;\n triggersInvoice: boolean;\n createdAt: string;\n}\nexport interface PswEngagementDetail extends PswEngagement {\n deliverables: PswDeliverable[];\n milestones: PswMilestone[];\n}\nexport interface PswTeamAssignment {\n id: string;\n engagementId: string | null;\n matterId: string | null;\n practitionerId: string;\n role: PswTeamRole;\n billingRate: number;\n allocationPct: number;\n isLead: boolean;\n createdAt: string;\n updatedAt: string;\n}\nexport interface PswMatter {\n id: string;\n clientId: string;\n engagementId: string | null;\n practiceAreaId: string | null;\n reference: string | null;\n title: string;\n description: string | null;\n status: PswMatterStatus;\n priority: PswMatterPriority;\n isPrivileged: boolean;\n dueDate: string | null;\n closedAt: string | null;\n leadPractitionerId: string | null;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n client?: { id: string; name: string } | null;\n}\nexport interface PswTimeEntry {\n id: string;\n engagementId: string | null;\n matterId: string | null;\n practitionerId: string;\n date: string;\n minutes: number;\n billable: boolean;\n rate: number;\n narrative: string | null;\n status: PswTimeEntryStatus;\n invoiceId: string | null;\n createdAt: string;\n}\nexport interface PswInvoice {\n id: string;\n clientId: string;\n engagementId: string | null;\n number: string;\n status: PswInvoiceStatus;\n currency: string;\n subtotal: number;\n taxAmount: number;\n total: number;\n issueDate: string | null;\n dueDate: string | null;\n paidAt: string | null;\n notes: string | null;\n createdAt: string;\n}\nexport interface PswComplianceCheck {\n id: string;\n type: PswComplianceType;\n status: PswComplianceStatus;\n subjectType: string;\n subjectId: string;\n title: string;\n details: string | null;\n reviewerId: string | null;\n dueDate: string | null;\n resolvedAt: string | null;\n createdAt: string;\n}\nexport interface PswConflictCheck {\n id: string;\n clientId: string;\n matterId: string | null;\n status: PswConflictCheckStatus;\n searchedParties: string[];\n findings: string | null;\n waiverReason: string | null;\n resolvedAt: string | null;\n createdAt: string;\n}\nexport interface PswPracticeArea {\n id: string;\n name: string;\n code: string | null;\n description: string | null;\n isActive: boolean;\n createdAt: string;\n}\nexport interface PswDocument {\n id: string;\n name: string;\n description: string | null;\n status: PswDocumentStatus;\n classification: PswDocumentClassification;\n version: number;\n legalHold: boolean;\n retainUntil: string | null;\n matterId: string | null;\n engagementId: string | null;\n tags: string[];\n file: { id: string } | null;\n createdAt: string;\n}\nexport interface PswStatusCount {\n status: string;\n count: number;\n}\nexport interface PswMonthlyAmount {\n month: string;\n amount: number;\n}\nexport interface PswDashboardStats {\n totalClients: number;\n activeClients: number;\n activeEngagements: number;\n openMatters: number;\n outstandingInvoiceTotal: number;\n paidInvoiceTotal: number;\n unbilledHours: number;\n billedHours: number;\n pendingComplianceChecks: number;\n openConflictChecks: number;\n engagementsByStatus: PswStatusCount[];\n invoicesByStatus: PswStatusCount[];\n mattersByStatus: PswStatusCount[];\n revenueByMonth: PswMonthlyAmount[];\n trustHeldTotal: number;\n activeTrustAccounts: number;\n}\n\n// ----------------------------------------------------------------------------\n// Trust accounting / IOLTA reconciliation (BOFF-4209)\n// ----------------------------------------------------------------------------\nexport type PswTrustAccountStatus = 'ACTIVE' | 'CLOSED';\nexport type PswTrustTransactionType = 'DEPOSIT' | 'WITHDRAWAL' | 'TRANSFER_OUT' | 'ADJUSTMENT';\nexport type PswTrustTransferStatus = 'COMPLETED' | 'REVERSED';\n\nexport interface PswTrustAccount {\n id: string;\n name: string;\n institutionName: string | null;\n accountNumberLast4: string | null;\n currency: string;\n status: PswTrustAccountStatus;\n createdAt: string;\n}\nexport interface PswTrustTransaction {\n id: string;\n trustAccountId: string;\n clientId: string;\n matterId: string | null;\n type: PswTrustTransactionType;\n amount: number;\n balanceAfter: number;\n description: string | null;\n reference: string | null;\n transferId: string | null;\n reconciled: boolean;\n reconciledAt: string | null;\n createdAt: string;\n}\nexport interface PswTrustTransfer {\n id: string;\n trustAccountId: string;\n clientId: string;\n matterId: string | null;\n invoiceId: string | null;\n amount: number;\n reason: string | null;\n status: PswTrustTransferStatus;\n transferredAt: string;\n createdAt: string;\n}\nexport interface PswTrustClientBalance {\n clientId: string;\n matterId: string | null;\n balance: number;\n}\nexport interface PswTrustReconciliationReport {\n trustAccountId: string;\n asOf: string;\n bookBalance: number;\n statementBalance: number | null;\n difference: number | null;\n inBalance: boolean;\n clientBalances: PswTrustClientBalance[];\n reconciledCount: number;\n}\n\n// ============================================================================\n// GraphQL fragments\n// ============================================================================\n\nconst CLIENT_F = `\n id name type status industry contactName contactEmail contactPhone address\n relationshipOwnerId notes tags createdAt updatedAt`;\nconst ENGAGEMENT_F = `\n id clientId practiceAreaId name description status feeArrangement feeAmount currency\n startDate endDate responsiblePartnerId tags createdAt updatedAt client { id name }`;\nconst DELIVERABLE_F = `id engagementId name description status version acceptanceCriteria dueDate acceptedAt createdAt`;\nconst MILESTONE_F = `id engagementId name description status dueDate completedAt triggerAmount triggersInvoice createdAt`;\nconst TEAM_ASSIGNMENT_F = `id engagementId matterId practitionerId role billingRate allocationPct isLead createdAt updatedAt`;\nconst MATTER_F = `\n id clientId engagementId practiceAreaId reference title description status priority isPrivileged\n dueDate closedAt leadPractitionerId tags createdAt updatedAt client { id name }`;\nconst TIME_F = `id engagementId matterId practitionerId date minutes billable rate narrative status invoiceId createdAt`;\nconst INVOICE_F = `id clientId engagementId number status currency subtotal taxAmount total issueDate dueDate paidAt notes createdAt`;\nconst COMPLIANCE_F = `id type status subjectType subjectId title details reviewerId dueDate resolvedAt createdAt`;\nconst CONFLICT_F = `id clientId matterId status searchedParties findings waiverReason resolvedAt createdAt`;\nconst PRACTICE_AREA_F = `id name code description isActive createdAt`;\nconst DOCUMENT_F = `id name description status classification version legalHold retainUntil matterId engagementId tags file { id } createdAt`;\nconst TRUST_ACCOUNT_F = `id name institutionName accountNumberLast4 currency status createdAt`;\nconst TRUST_TXN_F = `id trustAccountId clientId matterId type amount balanceAfter description reference transferId reconciled reconciledAt createdAt`;\nconst TRUST_TRANSFER_F = `id trustAccountId clientId matterId invoiceId amount reason status transferredAt createdAt`;\n\n// ============================================================================\n// Dashboard\n// ============================================================================\n\nexport function useDashboardStats() {\n return useQuery({\n queryKey: [QK, 'dashboard'],\n queryFn: async () => {\n const data = await pswQuery<{ pswDashboardStats: PswDashboardStats }>(`\n query PswDashboard {\n pswDashboardStats {\n totalClients activeClients activeEngagements openMatters\n outstandingInvoiceTotal paidInvoiceTotal unbilledHours billedHours\n pendingComplianceChecks openConflictChecks\n engagementsByStatus { status count }\n invoicesByStatus { status count }\n mattersByStatus { status count }\n revenueByMonth { month amount }\n trustHeldTotal activeTrustAccounts\n }\n }`);\n return data.pswDashboardStats;\n },\n });\n}\n\n// ============================================================================\n// Trust accounting / IOLTA reconciliation (BOFF-4209)\n// ============================================================================\n\nexport function useTrustAccounts(\n args: { status?: PswTrustAccountStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'trustAccounts', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustAccounts: PswConnection<PswTrustAccount> }>(\n `query PswTrustAccounts($status: PswTrustAccountStatus, $pagination: PaginationInput) {\n pswListTrustAccounts(status: $status, pagination: $pagination) {\n items { ${TRUST_ACCOUNT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListTrustAccounts;\n },\n });\n}\n\nexport function useCreateTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateTrustAccount($input: PswCreateTrustAccountInput!) {\n pswCreateTrustAccount(input: $input) { ${TRUST_ACCOUNT_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useCloseTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswCloseTrustAccount($id: ID!) { pswCloseTrustAccount(id: $id) { ${TRUST_ACCOUNT_F} } }`,\n {\n id,\n }\n ),\n onSuccess: () => invalidate(qc, 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useTrustTransactions(\n args: {\n trustAccountId?: string;\n clientId?: string;\n matterId?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'trustTransactions', args],\n enabled: !!args.trustAccountId,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustTransactions: PswConnection<PswTrustTransaction> }>(\n `query PswTrustTransactions($trustAccountId: ID, $clientId: ID, $matterId: ID, $pagination: PaginationInput) {\n pswListTrustTransactions(\n trustAccountId: $trustAccountId\n clientId: $clientId\n matterId: $matterId\n pagination: $pagination\n ) {\n items { ${TRUST_TXN_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n trustAccountId: args.trustAccountId ?? null,\n clientId: args.clientId ?? null,\n matterId: args.matterId ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTrustTransactions;\n },\n });\n}\n\nexport function useTrustTransfers(args: { trustAccountId?: string; clientId?: string } = {}) {\n return useQuery({\n queryKey: [QK, 'trustTransfers', args],\n enabled: !!args.trustAccountId,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTrustTransfers: PswConnection<PswTrustTransfer> }>(\n `query PswTrustTransfers($trustAccountId: ID, $clientId: ID) {\n pswListTrustTransfers(trustAccountId: $trustAccountId, clientId: $clientId) {\n items { ${TRUST_TRANSFER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { trustAccountId: args.trustAccountId ?? null, clientId: args.clientId ?? null }\n );\n return data.pswListTrustTransfers;\n },\n });\n}\n\nexport function useTrustClientBalance(\n trustAccountId?: string,\n clientId?: string,\n matterId?: string\n) {\n return useQuery({\n queryKey: [QK, 'trustClientBalance', trustAccountId, clientId, matterId],\n enabled: !!trustAccountId && !!clientId,\n queryFn: async () => {\n const data = await pswQuery<{ pswTrustClientBalance: PswTrustClientBalance }>(\n `query PswTrustClientBalance($trustAccountId: ID!, $clientId: ID!, $matterId: ID) {\n pswTrustClientBalance(trustAccountId: $trustAccountId, clientId: $clientId, matterId: $matterId) {\n clientId matterId balance\n }\n }`,\n { trustAccountId, clientId, matterId: matterId ?? null }\n );\n return data.pswTrustClientBalance;\n },\n });\n}\n\nexport function useRecordTrustDeposit() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswRecordTrustDeposit($input: PswRecordTrustDepositInput!) {\n pswRecordTrustDeposit(input: $input) { ${TRUST_TXN_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(qc, 'trustTransactions', 'trustClientBalance', 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useRecordTrustWithdrawal() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswRecordTrustWithdrawal($input: PswRecordTrustWithdrawalInput!) {\n pswRecordTrustWithdrawal(input: $input) { ${TRUST_TXN_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(qc, 'trustTransactions', 'trustClientBalance', 'trustAccounts', 'dashboard'),\n });\n}\n\nexport function useCreateTrustTransfer() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateTrustTransfer($input: PswCreateTrustTransferInput!) {\n pswCreateTrustTransfer(input: $input) { ${TRUST_TRANSFER_F} }\n }`,\n { input }\n ),\n onSuccess: () =>\n invalidate(\n qc,\n 'trustTransactions',\n 'trustTransfers',\n 'trustClientBalance',\n 'trustAccounts',\n 'dashboard'\n ),\n });\n}\n\nexport function useReconcileTrustAccount() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswReconcileTrustAccount: PswTrustReconciliationReport }>(\n `mutation PswReconcileTrustAccount($input: PswReconcileTrustAccountInput!) {\n pswReconcileTrustAccount(input: $input) {\n trustAccountId asOf bookBalance statementBalance difference inBalance reconciledCount\n clientBalances { clientId matterId balance }\n }\n }`,\n { input }\n ).then((d) => d.pswReconcileTrustAccount),\n onSuccess: () => invalidate(qc, 'trustTransactions', 'trustAccounts', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Clients\n// ============================================================================\n\nexport function useClients(\n args: { status?: PswClientStatus; search?: string; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'clients', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListClients: PswConnection<PswClient> }>(\n `query PswClients($status: PswClientStatus, $search: String, $pagination: PaginationInput) {\n pswListClients(status: $status, search: $search, pagination: $pagination) {\n items { ${CLIENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListClients;\n },\n });\n}\n\nexport function useClient(id: string | null) {\n return useQuery({\n queryKey: [QK, 'client', id],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await pswQuery<{ pswClient: PswClientDetail | null }>(\n `query PswClient($id: ID!) {\n pswClient(id: $id) {\n ${CLIENT_F}\n engagements { ${ENGAGEMENT_F} }\n matters { ${MATTER_F} }\n }\n }`,\n { id }\n );\n return data.pswClient;\n },\n });\n}\n\nexport function useCreateClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswCreateClient: PswClient }>(\n `mutation PswCreateClient($input: PswCreateClientInput!) { pswCreateClient(input: $input) { ${CLIENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'clients', 'dashboard'),\n });\n}\nexport function useUpdateClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateClient($id: ID!, $input: PswUpdateClientInput!) { pswUpdateClient(id: $id, input: $input) { ${CLIENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'clients', 'dashboard');\n void qc.invalidateQueries({ queryKey: [QK, 'client', v.id] });\n },\n });\n}\nexport function useArchiveClient() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswArchiveClient($id: ID!) { pswArchiveClient(id: $id) }`, { id }),\n onSuccess: () => invalidate(qc, 'clients', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Engagements\n// ============================================================================\n\nexport function useEngagements(\n args: {\n clientId?: string;\n status?: PswEngagementStatus;\n search?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'engagements', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListEngagements: PswConnection<PswEngagement> }>(\n `query PswEngagements($clientId: ID, $status: PswEngagementStatus, $search: String, $pagination: PaginationInput) {\n pswListEngagements(clientId: $clientId, status: $status, search: $search, pagination: $pagination) {\n items { ${ENGAGEMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListEngagements;\n },\n });\n}\n\nexport function useEngagement(id: string | null) {\n return useQuery({\n queryKey: [QK, 'engagement', id],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await pswQuery<{ pswEngagement: PswEngagementDetail | null }>(\n `query PswEngagement($id: ID!) {\n pswEngagement(id: $id) {\n ${ENGAGEMENT_F}\n deliverables { ${DELIVERABLE_F} }\n milestones { ${MILESTONE_F} }\n }\n }`,\n { id }\n );\n return data.pswEngagement;\n },\n });\n}\n\nexport function useCreateEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateEngagement($input: PswCreateEngagementInput!) { pswCreateEngagement(input: $input) { ${ENGAGEMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'engagements', 'dashboard'),\n });\n}\nexport function useUpdateEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateEngagement($id: ID!, $input: PswUpdateEngagementInput!) { pswUpdateEngagement(id: $id, input: $input) { ${ENGAGEMENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'engagements');\n void qc.invalidateQueries({ queryKey: [QK, 'engagement', v.id] });\n },\n });\n}\nexport function useTransitionEngagement() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswEngagementStatus }) =>\n pswQuery(\n `mutation PswTransitionEngagement($id: ID!, $status: PswEngagementStatus!) { pswTransitionEngagement(id: $id, status: $status) { ${ENGAGEMENT_F} } }`,\n vars\n ),\n onSuccess: (_d, v) => {\n invalidate(qc, 'engagements', 'dashboard');\n void qc.invalidateQueries({ queryKey: [QK, 'engagement', v.id] });\n },\n });\n}\n\n// ============================================================================\n// Deliverables & Milestones (engagement delivery)\n// ============================================================================\n\nexport function useCreateDeliverable() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateDeliverable($input: PswCreateDeliverableInput!) { pswCreateDeliverable(input: $input) { ${DELIVERABLE_F} } }`,\n { input }\n ),\n onSuccess: (_d, input) =>\n qc.invalidateQueries({\n queryKey: [QK, 'engagement', (input as { engagementId: string }).engagementId],\n }),\n });\n}\nexport function useTransitionDeliverable() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswDeliverableStatus; engagementId: string }) =>\n pswQuery(\n `mutation PswTransitionDeliverable($id: ID!, $status: PswDeliverableStatus!) { pswTransitionDeliverable(id: $id, status: $status) { ${DELIVERABLE_F} } }`,\n {\n id: vars.id,\n status: vars.status,\n }\n ),\n onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: [QK, 'engagement', v.engagementId] }),\n });\n}\nexport function useCreateMilestone() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateMilestone($input: PswCreateMilestoneInput!) { pswCreateMilestone(input: $input) { ${MILESTONE_F} } }`,\n { input }\n ),\n onSuccess: (_d, input) =>\n qc.invalidateQueries({\n queryKey: [QK, 'engagement', (input as { engagementId: string }).engagementId],\n }),\n });\n}\nexport function useCompleteMilestone() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; engagementId: string }) =>\n pswQuery(\n `mutation PswCompleteMilestone($id: ID!) { pswCompleteMilestone(id: $id) { ${MILESTONE_F} } }`,\n { id: vars.id }\n ),\n onSuccess: (_d, v) => qc.invalidateQueries({ queryKey: [QK, 'engagement', v.engagementId] }),\n });\n}\n\n// ============================================================================\n// Team assignments (staffing)\n// ============================================================================\n\n/**\n * Staffing rows for one engagement or matter (`pswListTeamAssignments`).\n * `practitionerId` is a workspace actor id — resolve it to a human name with\n * {@link useActorNames}, never render the raw id as if it were a person.\n */\nexport function useTeamAssignments(\n args: {\n engagementId?: string;\n matterId?: string;\n practitionerId?: string;\n pagination?: PswPagination;\n } = {}\n) {\n const enabled = Boolean(args.engagementId || args.matterId || args.practitionerId);\n return useQuery({\n queryKey: [QK, 'teamAssignments', args],\n enabled,\n queryFn: async () => {\n const data = await pswQuery<{ pswListTeamAssignments: PswConnection<PswTeamAssignment> }>(\n `query PswTeamAssignments($engagementId: ID, $matterId: ID, $practitionerId: ID, $pagination: PaginationInput) {\n pswListTeamAssignments(engagementId: $engagementId, matterId: $matterId, practitionerId: $practitionerId, pagination: $pagination) {\n items { ${TEAM_ASSIGNMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n practitionerId: args.practitionerId ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTeamAssignments;\n },\n });\n}\n\n/** One staffing row plus the engagement/matter it was staffed against. */\nexport interface PswTeamAssignmentScoped extends PswTeamAssignment {\n scopeType: 'engagement' | 'matter';\n scopeId: string;\n scopeName: string;\n}\n\n/**\n * Client-level staffing roll-up. `pswListTeamAssignments` has no `clientId`\n * filter, so the client's engagements and matters (already loaded by the\n * client detail query) are each queried as an alias inside ONE operation —\n * one round trip, no N+1, and no invented rows for scopes the caller did not\n * pass in.\n */\nexport function useClientTeamAssignments(\n scopes: Array<{ type: 'engagement' | 'matter'; id: string; name: string }>\n) {\n const key = scopes.map((s) => `${s.type}:${s.id}`).join(',');\n return useQuery({\n queryKey: [QK, 'clientTeamAssignments', key],\n enabled: scopes.length > 0,\n queryFn: async () => {\n const args = scopes\n .map((_s, i) => `$scope${i}: ID`)\n .concat('$pagination: PaginationInput')\n .join(', ');\n const body = scopes\n .map(\n (s, i) =>\n ` a${i}: pswListTeamAssignments(${s.type === 'engagement' ? 'engagementId' : 'matterId'}: $scope${i}, pagination: $pagination) {\n items { ${TEAM_ASSIGNMENT_F} } pageInfo { hasMore cursor } totalCount\n }`\n )\n .join('\\n');\n const variables: Record<string, unknown> = { pagination: { limit: 100 } };\n scopes.forEach((s, i) => {\n variables[`scope${i}`] = s.id;\n });\n\n const data = await pswQuery<Record<string, PswConnection<PswTeamAssignment>>>(\n `query PswClientTeam(${args}) {\\n${body}\\n}`,\n variables\n );\n\n const rows: PswTeamAssignmentScoped[] = [];\n scopes.forEach((s, i) => {\n for (const item of data[`a${i}`]?.items ?? []) {\n rows.push({ ...item, scopeType: s.type, scopeId: s.id, scopeName: s.name });\n }\n });\n return rows;\n },\n });\n}\n\nexport function useAddTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery<{ pswAddTeamAssignment: PswTeamAssignment }>(\n `mutation PswAddTeamAssignment($input: PswCreateTeamAssignmentInput!) { pswAddTeamAssignment(input: $input) { ${TEAM_ASSIGNMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\nexport function useUpdateTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery<{ pswUpdateTeamAssignment: PswTeamAssignment }>(\n `mutation PswUpdateTeamAssignment($id: ID!, $input: PswUpdateTeamAssignmentInput!) { pswUpdateTeamAssignment(id: $id, input: $input) { ${TEAM_ASSIGNMENT_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\nexport function useRemoveTeamAssignment() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery<{ pswRemoveTeamAssignment: boolean }>(\n `mutation PswRemoveTeamAssignment($id: ID!) { pswRemoveTeamAssignment(id: $id) }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'teamAssignments', 'clientTeamAssignments'),\n });\n}\n\n// ============================================================================\n// Matters\n// ============================================================================\n\nexport function useMatters(\n args: {\n clientId?: string;\n engagementId?: string;\n status?: PswMatterStatus;\n search?: string;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'matters', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListMatters: PswConnection<PswMatter> }>(\n `query PswMatters($clientId: ID, $engagementId: ID, $status: PswMatterStatus, $search: String, $pagination: PaginationInput) {\n pswListMatters(clientId: $clientId, engagementId: $engagementId, status: $status, search: $search, pagination: $pagination) {\n items { ${MATTER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n engagementId: args.engagementId ?? null,\n status: args.status ?? null,\n search: args.search ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListMatters;\n },\n });\n}\nexport function useCreateMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateMatter($input: PswCreateMatterInput!) { pswCreateMatter(input: $input) { ${MATTER_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'matters', 'dashboard'),\n });\n}\nexport function useUpdateMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdateMatter($id: ID!, $input: PswUpdateMatterInput!) { pswUpdateMatter(id: $id, input: $input) { ${MATTER_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'matters'),\n });\n}\nexport function useCloseMatter() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswCloseMatter($id: ID!) { pswCloseMatter(id: $id) { ${MATTER_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'matters', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Time entries\n// ============================================================================\n\nexport function useTimeEntries(\n args: {\n engagementId?: string;\n matterId?: string;\n status?: PswTimeEntryStatus;\n billable?: boolean;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'time', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListTimeEntries: PswConnection<PswTimeEntry> }>(\n `query PswTimeEntries($engagementId: ID, $matterId: ID, $status: PswTimeEntryStatus, $billable: Boolean, $pagination: PaginationInput) {\n pswListTimeEntries(engagementId: $engagementId, matterId: $matterId, status: $status, billable: $billable, pagination: $pagination) {\n items { ${TIME_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n status: args.status ?? null,\n billable: args.billable ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListTimeEntries;\n },\n });\n}\nexport function useLogTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswLogTime($input: PswCreateTimeEntryInput!) { pswLogTimeEntry(input: $input) { ${TIME_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'time', 'dashboard'),\n });\n}\nexport function useSubmitTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswSubmitTime($id: ID!) { pswSubmitTimeEntry(id: $id) { ${TIME_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'time'),\n });\n}\nexport function useApproveTimeEntry() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswApproveTime($id: ID!) { pswApproveTimeEntry(id: $id) { ${TIME_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'time'),\n });\n}\n\n// ============================================================================\n// Invoices\n// ============================================================================\n\nexport function useInvoices(\n args: { clientId?: string; status?: PswInvoiceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'invoices', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListInvoices: PswConnection<PswInvoice> }>(\n `query PswInvoices($clientId: ID, $status: PswInvoiceStatus, $pagination: PaginationInput) {\n pswListInvoices(clientId: $clientId, status: $status, pagination: $pagination) {\n items { ${INVOICE_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n clientId: args.clientId ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListInvoices;\n },\n });\n}\nexport function useCreateInvoice() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateInvoice($input: PswCreateInvoiceInput!) { pswCreateInvoice(input: $input) { ${INVOICE_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'invoices', 'dashboard'),\n });\n}\nexport function useMarkInvoicePaid() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(`mutation PswMarkPaid($id: ID!) { pswMarkInvoicePaid(id: $id) { ${INVOICE_F} } }`, {\n id,\n }),\n onSuccess: () => invalidate(qc, 'invoices', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Compliance\n// ============================================================================\n\nexport function useComplianceChecks(\n args: { status?: PswComplianceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'compliance', args],\n queryFn: async () => {\n const data = await pswQuery<{\n pswListComplianceChecks: PswConnection<PswComplianceCheck>;\n }>(\n `query PswCompliance($status: PswComplianceStatus, $pagination: PaginationInput) {\n pswListComplianceChecks(status: $status, pagination: $pagination) {\n items { ${COMPLIANCE_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListComplianceChecks;\n },\n });\n}\nexport function useCreateComplianceCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateCompliance($input: PswCreateComplianceCheckInput!) { pswCreateComplianceCheck(input: $input) { ${COMPLIANCE_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'compliance', 'dashboard'),\n });\n}\nexport function useResolveComplianceCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; status: PswComplianceStatus; details?: string }) =>\n pswQuery(\n `mutation PswResolveCompliance($id: ID!, $status: PswComplianceStatus!, $details: String) { pswResolveComplianceCheck(id: $id, status: $status, details: $details) { ${COMPLIANCE_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'compliance', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Conflict checks\n// ============================================================================\n\nexport function useConflictChecks(args: { clientId?: string; pagination?: PswPagination } = {}) {\n return useQuery({\n queryKey: [QK, 'conflicts', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListConflictChecks: PswConnection<PswConflictCheck> }>(\n `query PswConflicts($clientId: ID, $pagination: PaginationInput) {\n pswListConflictChecks(clientId: $clientId, pagination: $pagination) {\n items { ${CONFLICT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { clientId: args.clientId ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListConflictChecks;\n },\n });\n}\nexport function useCreateConflictCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateConflict($input: PswCreateConflictCheckInput!) { pswCreateConflictCheck(input: $input) { ${CONFLICT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'conflicts', 'dashboard'),\n });\n}\nexport function useResolveConflictCheck() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: {\n id: string;\n status: PswConflictCheckStatus;\n findings?: string;\n waiverReason?: string;\n }) =>\n pswQuery(\n `mutation PswResolveConflict($id: ID!, $status: PswConflictCheckStatus!, $findings: String, $waiverReason: String) {\n pswResolveConflictCheck(id: $id, status: $status, findings: $findings, waiverReason: $waiverReason) { ${CONFLICT_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'conflicts', 'dashboard'),\n });\n}\n\n// ============================================================================\n// Practice areas\n// ============================================================================\n\nexport function usePracticeAreas() {\n return useQuery({\n queryKey: [QK, 'practiceAreas'],\n queryFn: async () => {\n const data = await pswQuery<{ pswListPracticeAreas: PswConnection<PswPracticeArea> }>(\n `query PswPracticeAreas {\n pswListPracticeAreas(pagination: { limit: 100 }) {\n items { ${PRACTICE_AREA_F} } pageInfo { hasMore cursor } totalCount\n }\n }`\n );\n return data.pswListPracticeAreas;\n },\n });\n}\nexport function useCreatePracticeArea() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreatePracticeArea($input: PswCreatePracticeAreaInput!) { pswCreatePracticeArea(input: $input) { ${PRACTICE_AREA_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'practiceAreas'),\n });\n}\nexport function useUpdatePracticeArea() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { id: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswUpdatePracticeArea($id: ID!, $input: PswUpdatePracticeAreaInput!) { pswUpdatePracticeArea(id: $id, input: $input) { ${PRACTICE_AREA_F} } }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'practiceAreas'),\n });\n}\n\n// ============================================================================\n// Documents (metadata over wspace-files-svc)\n// ============================================================================\n\nexport function useDocuments(\n args: {\n engagementId?: string;\n matterId?: string;\n classification?: PswDocumentClassification;\n status?: PswDocumentStatus;\n pagination?: PswPagination;\n } = {}\n) {\n return useQuery({\n queryKey: [QK, 'documents', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListDocuments: PswConnection<PswDocument> }>(\n `query PswDocuments($engagementId: ID, $matterId: ID, $classification: PswDocumentClassification, $status: PswDocumentStatus, $pagination: PaginationInput) {\n pswListDocuments(engagementId: $engagementId, matterId: $matterId, classification: $classification, status: $status, pagination: $pagination) {\n items { ${DOCUMENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n engagementId: args.engagementId ?? null,\n matterId: args.matterId ?? null,\n classification: args.classification ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListDocuments;\n },\n });\n}\nexport function useCreateDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateDocument($input: PswCreateDocumentInput!) { pswCreateDocument(input: $input) { ${DOCUMENT_F} } }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'documents'),\n });\n}\nexport function useArchiveDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswArchiveDocument($id: ID!) { pswArchiveDocument(id: $id) { ${DOCUMENT_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'documents'),\n });\n}\n\n// ============================================================================\n// Native E-Signatures (BOFF-4212)\n// ============================================================================\n// Scope: a real capture-and-audit core. Signers are existing platform actors\n// (workspace members or ACTIVE client-portal contacts) — no anonymous\n// email-only signing link, no third-party e-signature provider integration.\n// See wspace-proserviceworld-svc/prisma/schema/signatures.prisma.\n\nexport type PswSignatureRequestStatus =\n | 'DRAFT'\n | 'SENT'\n | 'VIEWED'\n | 'PARTIALLY_SIGNED'\n | 'COMPLETED'\n | 'DECLINED'\n | 'CANCELLED'\n | 'EXPIRED';\nexport type PswSignatureSignerStatus = 'PENDING' | 'VIEWED' | 'SIGNED' | 'DECLINED';\nexport type PswSignatureType = 'TYPED' | 'DRAWN';\n\nexport interface PswSignatureSigner {\n id: string;\n signatureRequestId: string;\n actorId: string;\n name: string;\n email: string;\n order: number;\n status: PswSignatureSignerStatus;\n viewedAt: string | null;\n signedAt: string | null;\n declinedAt: string | null;\n declineReason: string | null;\n signatureType: PswSignatureType | null;\n typedName: string | null;\n signatureImage: string | null;\n signedIp: string | null;\n createdAt: string;\n /** Only populated by pswMyPendingSignatureRequests (self-scoped signer list). */\n signatureRequest?: PswSignatureRequest | null;\n}\nexport interface PswSignatureRequest {\n id: string;\n documentId: string;\n document: { id: string; name: string } | null;\n status: PswSignatureRequestStatus;\n message: string | null;\n documentVersion: number | null;\n expiresAt: string | null;\n sentAt: string | null;\n completedAt: string | null;\n createdAt: string;\n signers: PswSignatureSigner[];\n}\nexport interface PswSignatureAuditEvent {\n id: string;\n signatureRequestId: string;\n signerId: string | null;\n eventType: string;\n actorId: string;\n actorLabel: string;\n ipAddress: string | null;\n documentVersion: number | null;\n createdAt: string;\n}\n\nconst SIGNER_F = `id signatureRequestId actorId name email order status viewedAt signedAt declinedAt declineReason signatureType typedName signatureImage signedIp createdAt`;\nconst SIGNATURE_REQUEST_F = `id documentId document { id name } status message documentVersion expiresAt sentAt completedAt createdAt signers { ${SIGNER_F} }`;\nconst AUDIT_EVENT_F = `id signatureRequestId signerId eventType actorId actorLabel ipAddress documentVersion createdAt`;\n\n/** Practitioner-side: signature requests for the workspace (optionally by document). */\nexport function useSignatureRequests(\n args: { documentId?: string; status?: PswSignatureRequestStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'signatureRequests', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListSignatureRequests: PswConnection<PswSignatureRequest> }>(\n `query PswSignatureRequests($documentId: ID, $status: PswSignatureRequestStatus, $pagination: PaginationInput) {\n pswListSignatureRequests(documentId: $documentId, status: $status, pagination: $pagination) {\n items { ${SIGNATURE_REQUEST_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n {\n documentId: args.documentId ?? null,\n status: args.status ?? null,\n pagination: args.pagination ?? { limit: 100 },\n }\n );\n return data.pswListSignatureRequests;\n },\n });\n}\n\n/** Immutable audit trail for one signature request — compliance evidence. */\nexport function useSignatureAuditEvents(signatureRequestId: string | null) {\n return useQuery({\n queryKey: [QK, 'signatureAuditEvents', signatureRequestId],\n enabled: !!signatureRequestId,\n queryFn: async () => {\n const data = await pswQuery<{\n pswListSignatureAuditEvents: PswConnection<PswSignatureAuditEvent>;\n }>(\n `query PswSignatureAuditEvents($signatureRequestId: ID!, $pagination: PaginationInput) {\n pswListSignatureAuditEvents(signatureRequestId: $signatureRequestId, pagination: $pagination) {\n items { ${AUDIT_EVENT_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { signatureRequestId, pagination: { limit: 100 } }\n );\n return data.pswListSignatureAuditEvents;\n },\n });\n}\n\nexport function useCreateSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswCreateSignatureRequest($input: PswCreateSignatureRequestInput!) {\n pswCreateSignatureRequest(input: $input) { ${SIGNATURE_REQUEST_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\nexport function useSendSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswSendSignatureRequest($id: ID!) { pswSendSignatureRequest(id: $id) { ${SIGNATURE_REQUEST_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\nexport function useCancelSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswCancelSignatureRequest($id: ID!) { pswCancelSignatureRequest(id: $id) { ${SIGNATURE_REQUEST_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'signatureRequests', 'documents'),\n });\n}\n\n/** Signer-side (self-scoped): requests awaiting the calling actor's signature. */\nexport function useMyPendingSignatureRequests() {\n return useQuery({\n queryKey: [QK, 'myPendingSignatures'],\n queryFn: async () => {\n const data = await pswQuery<{\n pswMyPendingSignatureRequests: PswConnection<PswSignatureSigner>;\n }>(\n `query PswMyPendingSignatureRequests($pagination: PaginationInput) {\n pswMyPendingSignatureRequests(pagination: $pagination) {\n items { ${SIGNER_F} signatureRequest { ${SIGNATURE_REQUEST_F} } } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { pagination: { limit: 100 } }\n );\n return data.pswMyPendingSignatureRequests;\n },\n });\n}\nexport function useViewSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (signerId: string) =>\n pswQuery(\n `mutation PswViewSignatureRequest($signerId: ID!) { pswViewSignatureRequest(signerId: $signerId) { ${SIGNER_F} } }`,\n { signerId }\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures'),\n });\n}\nexport function useSignDocument() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { signerId: string; input: Record<string, unknown> }) =>\n pswQuery(\n `mutation PswSignDocument($signerId: ID!, $input: PswSignDocumentInput!) {\n pswSignDocument(signerId: $signerId, input: $input) { ${SIGNER_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures', 'signatureRequests', 'documents'),\n });\n}\nexport function useDeclineSignatureRequest() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (vars: { signerId: string; reason?: string }) =>\n pswQuery(\n `mutation PswDeclineSignatureRequest($signerId: ID!, $reason: String) {\n pswDeclineSignatureRequest(signerId: $signerId, reason: $reason) { ${SIGNER_F} }\n }`,\n vars\n ),\n onSuccess: () => invalidate(qc, 'myPendingSignatures', 'signatureRequests', 'documents'),\n });\n}\n\n// ============================================================================\n// Client Portal (BOFF-4283)\n// ============================================================================\n// Scope: a genuine, correctly-scoped MVP. Every \"my*\" hook here is self-scoped\n// (Type C) — the client-portal contact sees only what their ACTIVE\n// PswClientPortalUser link exposes, no identity/clientId arg is ever sent.\n\nexport type PswClientPortalUserStatus = 'ACTIVE' | 'REVOKED';\n\nexport interface PswClientPortalUser {\n id: string;\n clientId: string;\n actorId: string;\n name: string;\n email: string;\n status: PswClientPortalUserStatus;\n invitedBy: string;\n invitedAt: string;\n revokedAt: string | null;\n createdAt: string;\n}\n\nconst PORTAL_USER_F = `id clientId actorId name email status invitedBy invitedAt revokedAt createdAt`;\n\n/** Practitioner-side: who has client-portal access (optionally scoped to one client). */\nexport function useClientPortalUsers(args: { clientId?: string; pagination?: PswPagination } = {}) {\n return useQuery({\n queryKey: [QK, 'clientPortalUsers', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswListClientPortalUsers: PswConnection<PswClientPortalUser> }>(\n `query PswClientPortalUsers($clientId: ID, $pagination: PaginationInput) {\n pswListClientPortalUsers(clientId: $clientId, pagination: $pagination) {\n items { ${PORTAL_USER_F} } pageInfo { hasMore cursor } totalCount\n }\n }`,\n { clientId: args.clientId ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswListClientPortalUsers;\n },\n });\n}\nexport function useInviteClientPortalUser() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (input: Record<string, unknown>) =>\n pswQuery(\n `mutation PswInviteClientPortalUser($input: PswInviteClientPortalUserInput!) {\n pswInviteClientPortalUser(input: $input) { ${PORTAL_USER_F} }\n }`,\n { input }\n ),\n onSuccess: () => invalidate(qc, 'clientPortalUsers'),\n });\n}\nexport function useRevokeClientPortalUser() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n pswQuery(\n `mutation PswRevokeClientPortalUser($id: ID!) { pswRevokeClientPortalUser(id: $id) { ${PORTAL_USER_F} } }`,\n { id }\n ),\n onSuccess: () => invalidate(qc, 'clientPortalUsers'),\n });\n}\n\n/** Client-portal side (self-scoped): the client(s) the calling actor may see. */\nexport function useMyClientPortalClients() {\n return useQuery({\n queryKey: [QK, 'myClientPortalClients'],\n queryFn: async () => {\n const data = await pswQuery<{\n pswMyClientPortalClients: Array<{ id: string; name: string }>;\n }>(`query PswMyClientPortalClients { pswMyClientPortalClients { id name } }`);\n return data.pswMyClientPortalClients;\n },\n });\n}\n/** Client-portal side (self-scoped): matters for the calling actor's own linked client(s). */\nexport function useMyMatters(pagination?: PswPagination) {\n return useQuery({\n queryKey: [QK, 'myMatters', pagination],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyMatters: PswConnection<PswMatter> }>(\n `query PswMyMatters($pagination: PaginationInput) {\n pswMyMatters(pagination: $pagination) { items { ${MATTER_F} } pageInfo { hasMore cursor } totalCount }\n }`,\n { pagination: pagination ?? { limit: 100 } }\n );\n return data.pswMyMatters;\n },\n });\n}\n/** Client-portal side (self-scoped): invoices for the calling actor's own linked client(s). */\nexport function useMyInvoices(\n args: { status?: PswInvoiceStatus; pagination?: PswPagination } = {}\n) {\n return useQuery({\n queryKey: [QK, 'myInvoices', args],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyInvoices: PswConnection<PswInvoice> }>(\n `query PswMyInvoices($status: PswInvoiceStatus, $pagination: PaginationInput) {\n pswMyInvoices(status: $status, pagination: $pagination) { items { ${INVOICE_F} } pageInfo { hasMore cursor } totalCount }\n }`,\n { status: args.status ?? null, pagination: args.pagination ?? { limit: 100 } }\n );\n return data.pswMyInvoices;\n },\n });\n}\n/**\n * Client-portal side (self-scoped): documents for the calling actor's own\n * linked client(s) — the backend restricts this to classification PUBLIC\n * only, regardless of what's requested here.\n */\nexport function useMyDocuments(pagination?: PswPagination) {\n return useQuery({\n queryKey: [QK, 'myDocuments', pagination],\n queryFn: async () => {\n const data = await pswQuery<{ pswMyDocuments: PswConnection<PswDocument> }>(\n `query PswMyDocuments($pagination: PaginationInput) {\n pswMyDocuments(pagination: $pagination) { items { ${DOCUMENT_F} } pageInfo { hasMore cursor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,CAAC;AACH;AAGA,SAAgB,KAA2B;CACzC,OAAO,EAAS;EACd,UAAU,CAAC,GAAI,uBAAuB;EACtC,SAAS,aAIA,MAHY,EAEhB,yEAAyE,EAAA,CAChE;CAEhB,CAAC;AACH;AAEA,SAAgB,GAAa,GAA4B;CACvD,OAAO,EAAS;EACd,UAAU;GAAC;GAAI;GAAa;EAAU;EACtC,SAAS,aAOA,MANY,EACjB;4DACoD,EAAS;YAE7D,EAAE,YAAY,KAAc,EAAE,OAAO,IAAI,EAAE,CAC7C,EAAA,CACY;CAEhB,CAAC;AACH;AAEA,SAAgB,GACd,IAAkE,CAAC,GACnE;CACA,OAAO,EAAS;EACd,UAAU;GAAC;GAAI;GAAc;EAAI;EACjC,SAAS,aAOA,MANY,EACjB;8EACsE,EAAU;YAEhF;GAAE,QAAQ,EAAK,UAAU;GAAM,YAAY,EAAK,cAAc,EAAE,OAAO,IAAI;EAAE,CAC/E,EAAA,CACY;CAEhB,CAAC;AACH;AAMA,SAAgB,GAAe,GAA4B;CACzD,OAAO,EAAS;EACd,UAAU;GAAC;GAAI;GAAe;EAAU;EACxC,SAAS,aAOA,MANY,EACjB;8DACsD,EAAW;YAEjE,EAAE,YAAY,KAAc,EAAE,OAAO,IAAI,EAAE,CAC7C,EAAA,CACY;CAEhB,CAAC;AACH"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * useTr — translation hook with fallback semantics for ProServiceWorld MFE.
3
+ *
4
+ * Wraps the shell's `useI18n().t()` and the local bundled `t()` so that:
5
+ * - when running inside the app shell, shell translations take precedence;
6
+ * - when a key is missing from the shell, the MFE's curated local bundle is
7
+ * used (useful for dev harnesses and offline fallback);
8
+ * - when neither source has the key, the caller's English fallback string is
9
+ * shown instead of leaking a raw key into the UI.
10
+ *
11
+ * Supports optional interpolation params using `{{key}}` placeholders.
12
+ *
13
+ * @example
14
+ * const tr = useTr();
15
+ * return <h1>{tr('psw.dashboard.title', 'Practice overview')}</h1>;
16
+ * return <p>{tr('psw.clients.selected', '{{count}} clients', { count: 5 })}</p>;
17
+ */
18
+ export declare function useTr(): (key: string, fallback: string, params?: Record<string, string | number>) => string;
19
+ //# sourceMappingURL=useTr.d.ts.map