Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
NIST SP 800-171 audit: least-privilege wildcard removal + Vault-encrypted integration secrets (#1414)
Brad Barbin3e8ebbf238d0
diff --git a/.ai/lessons.md b/.ai/lessons.mdindex 20ffbe2ff9..d5f2cceb2c 100644--- a/.ai/lessons.md+++ b/.ai/lessons.md@@ -824,6 +824,26 @@ canvas hosting Radix popovers/selects.**Applies to:** `packages/database/src/audit.config.ts` (`fkDisplayRegistry`, `fkDisplayHops`, `snapshotFields`), `packages/jobs/src/inngest/functions/events/fk-snapshots.ts` + `audit.ts`, and any migration adding reference columns to tables listed in `auditConfig.entities`.+## An `isolation: "worktree"` subagent forks from `main`, not the parent's current branch++**Context:** Dispatching three `Agent` subagents with `isolation: "worktree"` to run `/feature` autonomously for NIST items, each told it was "forked from branch `nist-800-110-audit`" and building on code that lives ONLY on that branch (`packages/auth/src/services/auth-events.server.ts` etc., absent from `main`).++**Problem:** The worktree the Agent tool creates forks from the repo's default (`main`), NOT the parent session's current branch HEAD. A subagent that trusts the "you are on <branch>" framing is actually on a `main`-based commit missing all the branch's work. Two of three agents noticed (the referenced file was absent at HEAD) and re-branched from `origin/nist-800-110-audit`; the third did not — it **vendored a duplicate** of the branch-only `auth-events.server.ts`, and its PR branch dragged in ~70 files of `main`-only work plus the duplicate, so the PR was unmergeable and had to be rebuilt by hand.++**Rule:** When an agent's task depends on unmerged branch code, do not assume the worktree is based on that branch. In the dispatch prompt, require the agent to `git fetch origin` and explicitly branch from `origin/<intended-base>`, set the PR `--base` to it, and **verify the base before writing code** (confirm a known branch-only file exists at HEAD; STOP and report if it is missing rather than recreating/vendoring it). When a delivered branch looks wrong, check `git merge-base <base> <deliveredBranch>` against the base HEAD — a merge-base far back means it forked from the wrong place. To salvage a mis-based branch, extract only its real new files onto a fresh branch off the correct base (don't cherry-pick its whole divergent history).++**Applies to:** any `Agent` call with `isolation: "worktree"` whose work builds on unmerged branch state; PR base selection for agent-produced branches.++## Resolve merge conflicts in GENERATED files by regenerating, not by hand-editing the markers++**Context:** Merging `origin/main` into a long-lived feature branch where both sides had added migrations. The only conflicts were generated outputs: `packages/database/src/types.ts` + `functions/lib/types.ts` (one FK-relationship hunk each) and `apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json`.++**Problem:** Git auto-combined most of the generated output but left one view's relationship list conflicting. Hand-picking a side drops one branch's relationships (the view genuinely has all the columns); union-merging risks duplicating entries; either way the result may not match what the real generator emits from the COMBINED schema. Generated files are outputs, not source — resolving their conflict markers by hand is guessing at the generator.++**Rule:** For a conflict in a generated file, regenerate instead of editing markers. For `@carbon/database` types: start the postgres container, apply BOTH branches' pending migrations (`pnpm db:migrate`), then `pnpm run generate:types` — it overwrites `types.ts` + `functions/lib/types.ts` from the live schema, connects via `SUPABASE_DB_URL`, and needs only postgres (not the full stack; the chained swagger step needs PostgREST and can fail harmlessly). `git add` the regenerated files to resolve. For build-time artifacts that regenerate on `pnpm dev`/build (`swagger-docs-schema.ts`, `tool-metadata.json`), take the superset side (usually `main`'s) as a placeholder — it self-corrects on next build. `generate:types` FK ordering is non-deterministic, so ignore ordering-only churn afterward (see the turbo-regen lesson above). Applying pending migrations forward is NOT a DB rebuild — that is the normal path; a full reset still needs the user.++**Applies to:** merging `main` into any branch with migrations on both sides; conflicts in `packages/database/src/types.ts`, `functions/lib/types.ts`, `swagger-docs-schema.ts`, `apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json`, and any committed generated artifact.+## A flip/refactor must not add ledger rows to a code path that deliberately posted none**Context:** Implementing the batch-split identity flip (spec `2026-08-04-batch-split-identity-flip.md`) via a shared `buildBatchSplitRecords` builder that emits a 2-row net-zero `Batch Split` `itemLedger` pair. Wired it into all five split writers uniformly, including `post-shipment`'s Purchase-Order-sourced block.diff --git a/.ai/plans/2026-08-15-nist-800-171-app-remediation.md b/.ai/plans/2026-08-15-nist-800-171-app-remediation.mdnew file mode 100644index 0000000000..724f42e88e--- /dev/null+++ b/.ai/plans/2026-08-15-nist-800-171-app-remediation.md@@ -0,0 +1,141 @@+# NIST SP 800-171 — Carbon Application Remediation Plan++Status: **MOSTLY IMPLEMENTED** — last synced 2026-08-18. Branch `nist-800-110-audit`+is **up to date with `origin/main`** (merged at `3f89af06e`; 43 ahead / 0 behind) and+carries the NIST [app] work. This file tracks **only the residual TODOs**; completed+sub-efforts have their own spec+plan under `.ai/specs/implemented/` and+`.ai/plans/implemented/` (indexed below).++The Carbon-repo half of a two-repo effort. The infrastructure/chart half and the+full 110-control gap assessment live in the **helm** repo+(`helm/niamey/docs/nist-800-171-audit.md` and `.../nist-800-171-remediation-plan.md`).+This plan covers only the items tagged **[app]** there.++Guiding decision unchanged: **`CONTROLLED_ENVIRONMENT` is the CUI switch** — every+hardening keys off it the way MFA enforcement does (on and non-overridable when+true, opt-in otherwise). No new global flags.++---++## Completed (on branch)++Verified against code + commits. Sub-efforts with their own docs are linked.++| Item | Control | Evidence (commit / PR / file) |+|------|---------|--------------------------|+| **TOTP MFA foundation** | 3.5.3 | `plans/implemented/2026-08-15-totp-mfa.md`; `mfa.server.ts`, `/mfa` routes, enrollment in `account+/security.tsx` |+| **Session lock + termination** (2.2/2.3) | 3.1.10 / 3.1.11 | `specs+plans/implemented/2026-08-17-session-lock-timeout.md`; commits `c76e15e4c`→`c7a076477` |+| **Passkey session-lock unlock + MES passkey login** | 3.1.10 / 3.5.3 | commit `e9636bb0e` — `/unlock` passkey branch (ERP+MES, resumes in place, rejects mismatched userId); MES `api+/passkey.authenticate.{options,verify}.ts` (were missing); `AUTH_PROVIDERS` gained `passkey`; Account→Security UI + i18n (`c4c75df34`). **Residual: WebAuthn browser proof** (below) |+| **Remove `"0"` permission wildcard** (2.8) | 3.1.5 | `specs+plans/implemented/2026-08-16-remove-global-permission-wildcard.md`; commit `0cbaf1390` (verified in browser `ba340f2d9`); `owner.test.ts` reconciled |+| **Integration secrets → Supabase Vault** (1C.1) | 3.13.16 / SC-28 | `specs+plans/implemented/…-integration-secret-encryption.md`; `packages/ee/src/integrations/secrets.ts`, migration `20260817122916_integration-secret-vault.sql`; commits `a21c1840d`,`497ca158d`,`7fc7f26aa`,`ef6116975` |+| **Backfill + scrub plaintext secrets** (1C.2) | 3.13.16 | **consolidated** into one idempotent, auto-applied migration `20260817132607_backfill-and-scrub-integration-secrets.sql` (vault-move + strip in one pass; RAISEs on an unmapped secret). The old split (manual script + separate scrub migration) was deleted — closes the deploy-ordering hazard |+| **Constant-time webhook HMAC** (1C.3) | 3.13.x | commit `add16f739` (paperless-parts → `timingSafeEqual`) |+| **Capture auth events** (1A.1 app) | 3.3.1/3.3.2 | `packages/auth/src/services/auth-events.server.ts`; commits `52cb260d5`,`dc3c55f71` — login_success/failed/rate_limited, magic_link_sent, mfa_challenge_*, permission_denied, **login_locked**. *(Residual: `logout` + MES-login parity, below)* |+| **Permission/role-change audit events** (1A.2) | 3.3.1/3.3.2 | **PR #1424, merged (`dbe4db3f2`)** — `permission_changed`/`role_changed` + actor threading from `users.server.ts` deactivate flows, `update-permissions` job, ERP permission routes. Run record `.ai/runs/2026-08-18-nist-1a2-permission-audit.md` |+| **Audit permission-denied** (1A.3) | 3.1.7 | `auth.server.ts` `logAuthEvent("permission_denied", …)` |+| **Audit on-by-default + locked under CUI** (1A.4) | 3.3.1 | commit `3393d5404` |+| **Append-only audit tables** (1B.1) | 3.3.8 / AU-9 | commit `f0ec59811` |+| **Audit retention ≥ 1 year** (1B.2) | 3.3.1 | `audit-archive.ts` floors hot window at 365d under CUI (`56d8a16e5`) |+| **Per-account failed-login lockout** (2.1) | 3.1.8 | **PR #1423, merged (`957a6866c`)** — `@carbon/kv` `lockout` module (email-keyed, exponential backoff, fails open), `login_locked` event, ERP+MES login + MES passkey reset. Run record `.ai/runs/2026-08-18-nist-2.1-login-lockout.md` |+| **MFA fail-closed under CUI** (2.4) | 3.5.3 | commit `add16f739` |+| **Consent-to-monitoring banner** (2.7) | 3.1.9 | MET — `ItarLoginDisclaimer` under CUI (no code) |+| **Deepen `/health`** (4.2) | 3.14.6 | Redis + DB probes, always-200 body-status (`56d8a16e5`) |+| **Error-detail leak fix** (4.4) | SI-11 | commit `add16f739` |+| **Analytics inert under CUI** (4.5) | 3.4.6 | boot assertion in `entry.client.tsx` (`56d8a16e5`) |++Bonus authz fix: `15545ecee` — `is_claims_admin` checked the reversed permission.++---++## Deferred (implemented, NOT merged into this branch)++### 2.6 — Auto-disable inactive accounts — 3.5.6 — **DONE on PR #1425, DEFERRED**++Implemented and green on **PR #1425** (`feat/nist-2.6-inactive-account-disable`) — a+`disable-inactive-accounts` step in the existing `scheduled/cleanup.ts` (gated on+`CONTROLLED_ENVIRONMENT`, idle > 35d from `auth.audit_log_entries`, reuses+`deactivateUser`, scrubs residual `userId` refs, emits `account_auto_deactivated`).+The PR is CLEAN/MERGEABLE and rebased onto the current HEAD, but **out of scope for+this branch — not being merged now**. Land it separately when 2.6 is in scope.++---++## Remaining TODOs [app]++### 4.3 — File-upload validation — 3.14.2/3.7.4 — **OPEN** (size limits partial)++Only `private` (50 MB) and `temp-staging` (2.5 GB) buckets have `file_size_limit`;+`public`/`avatars`/`company-templates`/feedback have none. **No** bucket sets+`allowed_mime_types`, and there is **no** server-side magic-byte check — the serve+route `file+/preview+/$bucket.$.tsx` maps `Content-Type` from the file **extension**.++- **Approach:** set `allowed_mime_types` + `file_size_limit` on every bucket (migrations);+ add a server-side magic-byte check (`file-type`/`fileTypeFromBuffer`) on upload.+ Quarantine-on-hit is app-side; the AV scan (ClamAV/Lambda) is **[chart]**.+- **Verify:** oversized / wrong-MIME / spoofed-extension upload is rejected.++### 4.1 — Security monitoring hooks (app side) — 3.14.6/3.14.7 — **PARTIAL**++App-side structured logging is **done** (`logAuthEvent` + `entry.server.tsx handleError`+ship JSONL with stable `authEvent`/`error` fields). **Remaining app decision:** add a+self-hosted Sentry **or** an OTel exporter in-code (currently console-only sink), OR+derive metrics downstream from the logs. CloudWatch log group + metric filters + alarms+are **[chart]** (helm).++### 2.5 — Password grant under CUI — 3.5.7/3.5.8/3.5.9 — **MET by architecture** (optional)++No `password` provider exists — `AuthProvider` is `email|google|azure|passkey`, magic-link+is primary, no `signInWithPassword`/reset route to reach. **Optional:** a+`CONTROLLED_ENVIRONMENT` assertion that `AUTH_PROVIDERS` excludes `password`+(defense-in-depth). Low priority — a no-op today.++### N1 — Console PIN stored/compared in plaintext — 3.5.10 — **OPEN** (found in audit)++`apps/mes/app/routes/x+/console.pin-in.tsx` verifies the operator PIN with a plaintext+`pin !== storedPin` against `employee.pin` (stored in the clear).++- **Approach:** hash the PIN at rest (salted argon2/bcrypt, or SHA-256+salt) + constant-time+ compare; update the write path (`employee.pin`) and a migration to hash existing PINs (or+ force re-set). Distinct from passkeys — the shared-kiosk factor.++### N2 — Passkey assurance posture for CUI — 3.13.11 / 3.5.3 (AAL) — **DECISION (POA&M)**++Registration uses `attestationType:"none"` and allows **syncable** authenticators, and+`authenticatorAttachment:"platform"` excludes roaming FIDO2 keys — fine for **AAL2** but+not provably AAL3/FIPS-140.++- **Decision (not necessarily code):** (a) document a risk acceptance that passkeys operate+ at AAL2 for the CUI boundary, or (b) tighten (`attestation:"direct"` + approved-AAGUID+ allowlist + cross-platform authenticators) if AAL3/hardware-keys are required. Confirm+ the deployment's FIPS-140 crypto posture.++---++## Residuals on completed items (small, non-blocking)++- **1A.1 parity:** the `logout` event is defined but **never emitted**; **MES login** does+ not call `logAuthEvent` (ERP-only). `login_locked` is now emitted (via 2.1). Wire logout ++ MES for full coverage.+- **Passkey / session-lock browser verification:** WebAuthn can't run headless, so the+ passkey **register → login → unlock** flow on both apps is unproven (the session-lock+ plan's last "Task 10"). Needs a virtual-authenticator or manual pass before it counts as+ verified.++---++## Not in this repo (tracked in helm/niamey)++Pod `securityContext`, in-cluster mTLS, S3 Object Lock (audit-archive immutability),+blocking CI scans + SAST + secret-scan + SBOM/signing, CloudWatch alarms/dashboards ++metric filters, GoTrue log shipping (fluent-bit, `SB_FORWARDED_FOR`), AV scanning, the CI+OIDC/ARC cutover, and all Phase-5 program artifacts (SSP, POA&M, IR plan, ConMon,+inheritance statements). See `helm/niamey/docs/nist-800-171-remediation-plan.md`.++## Suggested order for the residual++1. Quick, self-contained: **N1** (hash console PIN), **1A.1 parity** (logout + MES event),+ **2.5** assertion.+2. Integrity/monitoring: **4.3** (upload validation), **4.1** (exporter decision).+3. Governance: **N2** passkey AAL risk-acceptance (POA&M) — no code unless AAL3 required.+4. Verification: WebAuthn browser proof of the passkey register→login→unlock flow.+5. When back in scope: land **PR #1425** (2.6 auto-disable inactive accounts).diff --git a/.ai/plans/2026-08-15-totp-mfa.md b/.ai/plans/implemented/2026-08-15-totp-mfa.mdsimilarity index 98%rename from .ai/plans/2026-08-15-totp-mfa.mdrename to .ai/plans/implemented/2026-08-15-totp-mfa.mdindex 5d78ec77c7..25db75218f 100644--- a/.ai/plans/2026-08-15-totp-mfa.md+++ b/.ai/plans/implemented/2026-08-15-totp-mfa.md@@ -1,7 +1,8 @@# TOTP MFA (Authenticator App) — Implementation Plan-Status: IMPLEMENTED 2026-08-15 (uncommitted; see "Resolved decisions" and-"Implementation deltas" below).+Status: IMPLEMENTED 2026-08-15 (committed on `nist-800-110-audit`; the unchecked task+boxes below are stale — the code shipped. See "Resolved decisions" and+"Implementation deltas").Reference: https://supabase.com/docs/guides/auth/auth-mfa/totp## Resolved decisions (2026-08-15)diff --git a/.ai/plans/implemented/2026-08-16-integration-secret-encryption.md b/.ai/plans/implemented/2026-08-16-integration-secret-encryption.mdnew file mode 100644index 0000000000..859bd6e034--- /dev/null+++ b/.ai/plans/implemented/2026-08-16-integration-secret-encryption.md@@ -0,0 +1,398 @@+# Integration Secret Encryption via Supabase Vault — implementation plan++Status: IMPLEMENTED 2026-08-18 (all tasks; Task 8 blocker resolved by `7fc7f26aa`).++**Spec:** .ai/specs/implemented/2026-08-15-integration-secret-encryption.md+**Branch:** port-louis (or a dedicated `integration-secret-encryption`)++Implements spec decisions D1–D8. Encrypt third-party integration credentials into+Supabase Vault; `companyIntegration.metadata` keeps only non-secret config + a+`secretRef`. Closes NIST 800-171 **3.13.16**. Landing order is accounting-first+behind shared helpers, but the exit criterion is **zero plaintext secrets across+every integration** (D6).++## Progress+- [x] Task 1: Vault plumbing — extension, `secretRef`, RPC wrappers, delete trigger (round-trip verified; fixed create→`vault.update_secret` for in-place upsert)+- [x] Task 2: Regenerate DB types (RPCs + `secretRef` typed)+- [x] Task 3: `SECRET_KEYS` map + helpers (+ 11 unit tests); added `email` after config cross-check+- [x] Task 4: jsonschema rows stripped of secret keys (0 remain)+- [x] Task 5: providers read via resolve / write via persist (incl. slack notify + doc-sync found outside recon)+- [x] Task 6: settings cache/writes stop handling secret material+- [x] Task 7: reveal endpoint — VERIFIED end-to-end (authed → value; unknown key rejected; audit row written)+- [~] Task 8: masked+reveal UI + anti-overwrite (splitSecrets empty-skip) done; **BLOCKED on one design decision** — the EE config zod schemas `.min(1)`-require secret fields, so post-scrub editing an installed integration without re-entering its secret fails validation. Needs: optionalize secret fields in the config schemas + enforce presence at install/activation.+- [x] Task 9+10 (AMENDED 2026-08-18): the manual TS backfill script + the separate+ `secretRef IS NOT NULL`-gated scrub migration were **consolidated** into a single+ auto-applied, idempotent migration `20260817132607_backfill-and-scrub-integration-secrets.sql`+ (vault-move + strip in one pass; RAISEs on an unmapped secret-looking integration).+ The split was a deploy-ordering hazard: on auto-apply the scrub ran before the manual+ backfill set `secretRef`, matched zero rows, and never re-ran — leaving plaintext forever.+ `packages/jobs/src/scripts/backfill-integration-secrets.ts` and+ `…_scrub-integration-plaintext-secrets.sql` were deleted.+- [x] Task 9 (superseded): backfill script — VERIFIED (vaulted a seeded plaintext apiKey, stamped secretRef)+- [x] Task 10 (superseded): scrub + fail-closed — VERIFIED (plaintext gone, vault preserved, **0 plaintext remain**)+- [x] Task 11: verify — vault round-trip, backfill/scrub on real data, reveal e2e, delete-trigger cascade, ee suite 556, typecheck ee/jobs/erp all PASS++## Known follow-ups+- **Task 8 validation gap** (above) — the one blocker to a fully-usable settings form.+- Per-reveal TOTP re-challenge under CONTROLLED_ENVIRONMENT (currently relies on session MFA).+- The "Reveal" UI string needs translations (`/translate`).++## Dependencies+- Task 2 needs Task 1. Task 3 needs Task 2 (typed RPCs). Tasks 4 and 5–8 need Task 3.+- Task 9 needs 1–5 (helpers + schema in place). Task 10 needs Task 9 confirmed in prod-like data. Task 11 last.+- Tasks 5, 7, 8 are largely independent of each other once Task 3 lands — may run as parallel subagents.++> The whole change handles live credentials. If any provider has a secret field+> NOT captured by the `SECRET_KEYS` map (Task 3), or a read/write site not in the+> recon list (Task 5), **STOP and report — do not improvise.** A missed secret+> field either leaks (left in plaintext) or corrupts (scrubbed but not vaulted).++---++## Task 1: Migration — enable Vault, add `secretRef`, secret RPC wrappers + delete trigger++**Depends on:** none+**Files:**+- Create: `packages/database/supabase/migrations/{ts}_integration-secret-vault.sql` (via the command; never hand-pick the timestamp)+- Copy from (precedent): `packages/database/supabase/migrations/20250304230559_nanoid.sql` (`CREATE EXTENSION IF NOT EXISTS` pattern), `20240119095150_integrations.sql` (the `companyIntegration` table + `verify_integration` trigger style)++**Steps:**+1. `pnpm db:migrate:new integration-secret-vault`+2. Paste EXACTLY:+ ```sql+ -- NIST 800-171 3.13.16: encrypt integration secrets in Supabase Vault.+ -- supabase_vault is pgsodium-backed; the supabase/postgres image preloads+ -- pgsodium in shared_preload_libraries. If this CREATE fails locally, the+ -- extension is unavailable — STOP and report (infra prerequisite), do not work around it.+ CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault CASCADE;++ ALTER TABLE "companyIntegration" ADD COLUMN IF NOT EXISTS "secretRef" TEXT;++ -- Upsert an integration's secret bag (flat {path: value} JSON) into the vault,+ -- keyed by a deterministic name; store the vault id back on the row.+ CREATE OR REPLACE FUNCTION upsert_integration_secret(p_company_id text, p_integration_id text, p_secret jsonb)+ RETURNS text LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ DECLARE+ v_name text := 'integration:' || p_company_id || ':' || p_integration_id;+ v_id uuid;+ BEGIN+ SELECT id INTO v_id FROM vault.secrets WHERE name = v_name;+ IF v_id IS NULL THEN+ v_id := vault.create_secret(p_secret::text, v_name, 'Carbon integration secret');+ ELSE+ UPDATE vault.secrets SET secret = p_secret::text, updated_at = now() WHERE id = v_id;+ END IF;+ UPDATE "companyIntegration" SET "secretRef" = v_id::text+ WHERE "companyId" = p_company_id AND id = p_integration_id;+ RETURN v_id::text;+ END;+ $$;++ CREATE OR REPLACE FUNCTION get_integration_secret(p_company_id text, p_integration_id text)+ RETURNS jsonb LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ DECLARE+ v_ref text;+ v_secret text;+ BEGIN+ SELECT "secretRef" INTO v_ref FROM "companyIntegration"+ WHERE "companyId" = p_company_id AND id = p_integration_id;+ IF v_ref IS NULL THEN RETURN NULL; END IF; -- caller applies transitional fallback / fails closed+ SELECT decrypted_secret INTO v_secret FROM vault.decrypted_secrets WHERE id = v_ref::uuid;+ IF v_secret IS NULL THEN RETURN NULL; END IF;+ RETURN v_secret::jsonb;+ END;+ $$;++ CREATE OR REPLACE FUNCTION delete_integration_secret(p_company_id text, p_integration_id text)+ RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ BEGIN+ DELETE FROM vault.secrets WHERE name = 'integration:' || p_company_id || ':' || p_integration_id;+ END;+ $$;++ -- Service-role only. The app calls these via getCarbonServiceRole(); no user+ -- client (anon/authenticated) may decrypt a secret.+ REVOKE ALL ON FUNCTION upsert_integration_secret(text,text,jsonb) FROM PUBLIC, anon, authenticated;+ REVOKE ALL ON FUNCTION get_integration_secret(text,text) FROM PUBLIC, anon, authenticated;+ REVOKE ALL ON FUNCTION delete_integration_secret(text,text) FROM PUBLIC, anon, authenticated;+ GRANT EXECUTE ON FUNCTION upsert_integration_secret(text,text,jsonb) TO service_role;+ GRANT EXECUTE ON FUNCTION get_integration_secret(text,text) TO service_role;+ GRANT EXECUTE ON FUNCTION delete_integration_secret(text,text) TO service_role;++ -- Cascade: drop the paired vault secret when the integration row is deleted+ -- (vault.secrets does not cascade on its own).+ CREATE OR REPLACE FUNCTION drop_integration_secret_on_delete()+ RETURNS trigger LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+ BEGIN+ DELETE FROM vault.secrets WHERE name = 'integration:' || OLD."companyId" || ':' || OLD.id;+ RETURN OLD;+ END;+ $$;+ DROP TRIGGER IF EXISTS trg_drop_integration_secret ON "companyIntegration";+ CREATE TRIGGER trg_drop_integration_secret+ AFTER DELETE ON "companyIntegration"+ FOR EACH ROW EXECUTE FUNCTION drop_integration_secret_on_delete();++ NOTIFY pgrst, 'reload schema';+ ```+3. `pnpm db:migrate`. If `CREATE EXTENSION supabase_vault` errors, STOP and report — the local/target Postgres lacks pgsodium; that is an infra prerequisite, not something to patch around.++**Verify:**+```bash+psql "$SUPABASE_DB_URL" -At -c "SELECT extname FROM pg_extension WHERE extname='supabase_vault';"+# Expected: supabase_vault+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM information_schema.columns WHERE table_name='companyIntegration' AND column_name='secretRef';"+# Expected: 1+psql "$SUPABASE_DB_URL" -At -c "SELECT proname FROM pg_proc WHERE proname IN ('upsert_integration_secret','get_integration_secret','delete_integration_secret') ORDER BY 1;"+# Expected: three rows+```+Stack down ⇒ blocked, not done.++**Out of scope:** touching `verify_integration` (Task 4 handles the schema); any provider code.++---++## Task 2: Regenerate DB types++**Depends on:** Task 1+**Steps:** `pnpm run generate:types`++**Verify:**+```bash+grep -n "get_integration_secret\|upsert_integration_secret\|secretRef" packages/database/src/types.ts | head+# Expected: the three RPCs typed with Args {p_company_id,p_integration_id,...}; companyIntegration row has secretRef: string | null+```++---++## Task 3: `SECRET_KEYS` map + secret helpers in `@carbon/ee`++**Depends on:** Task 2+**Files:**+- Create: `packages/ee/src/integrations/secrets.ts`+- Create: `packages/ee/src/integrations/secrets.test.ts`+- Modify: `packages/ee/src/index.ts` — export the helpers+- Copy from (precedent): `packages/ee/src/accounting/core/models.ts` (`normalizeStoredCredentials` transitional-shape pattern), `packages/auth/src/lib/supabase/client.server.ts` (`getCarbonServiceRole`)++**Steps:**+1. Define the secret-key map (dot-paths into `metadata`). Cross-check each against the provider `config.ts` `type:"secret"|"password"` fields AND the jsonschema (Task 4). If any provider has a secret field not listed here, STOP and report:+ ```ts+ // The ONLY place that declares which metadata keys are secret. Dot-paths.+ export const SECRET_KEYS: Record<string, string[]> = {+ linear: ["apiKey"],+ slack: ["access_token"],+ jira: ["credentials.accessToken", "credentials.refreshToken"],+ onshape: ["credentials.accessToken", "credentials.refreshToken"],+ xero: ["credentials.accessToken", "credentials.refreshToken"],+ quickbooks: ["credentials.accessToken", "credentials.refreshToken"],+ rillet: ["credentials.apiKey", "credentials.providerMetadata.webhookToken"],+ "paperless-parts": ["apiKey", "secretKey"],+ resend: ["apiKey"],+ // exchange-rates-v1: none (apiKey is env-based). email/sage: verify config; add if a secret lands in metadata.+ };+ ```+2. Implement (with dot-path get/set helpers — do NOT pull in lodash; small local `getPath`/`setPath`/`deletePath`):+ - `class IntegrationSecretUnavailableError extends Error` (D8).+ - `splitSecrets(integrationId, metadata): { config, secrets }` — moves each `SECRET_KEYS` path out of a copy of `metadata` into a flat `{ [path]: value }` bag; returns the stripped `config` and the `secrets` bag (omitting undefined paths).+ - `persistIntegrationSecrets(serviceClient, companyId, integrationId, metadata)` — `splitSecrets`, then `serviceClient.rpc("upsert_integration_secret", { p_company_id, p_integration_id, p_secret: secrets })`, then write the stripped `config` back to `companyIntegration.metadata` (via the settings service; Task 6 wires the call sites). Returns the stripped config.+ - `resolveIntegrationSecrets(serviceClient, companyId, integrationId, metadata)` — reads the bag via `rpc("get_integration_secret", ...)`. If it returns a bag, `setPath` each back into a **copy** of `metadata` and return the merged object (so providers keep reading `metadata.credentials.accessToken` unchanged). **Transitional fallback (D7):** if the row's `secretRef` is null / rpc returns null AND `metadata` still contains the plaintext at those paths, return `metadata` as-is. If `secretRef` is set but the rpc returns null → throw `IntegrationSecretUnavailableError` (fail closed, D8).+3. Unit tests (`secrets.test.ts`): round-trip split→merge for a nested accounting credential and a flat linear apiKey; masking never returned; fail-closed when secretRef set but bag missing; transitional fallback when secretRef null.++**Verify:**+```bash+pnpm --filter @carbon/ee test -- secrets+# Expected: all secrets.test.ts pass+pnpm exec turbo run typecheck --filter=@carbon/ee+# Expected: PASS+```++**Out of scope:** changing provider call sites (Task 5); UI (Task 8).++---++## Task 4: Migration — rewrite integration `jsonschema` rows to drop secret keys++**Depends on:** Task 2 (ordering only; no type impact)+**Files:**+- Create: `packages/database/supabase/migrations/{ts}_integration-jsonschema-drop-secrets.sql`+- Copy from (precedent): `20240930162032_exchange-rates-api-key.sql` (an `UPDATE integration SET jsonschema=...` that already dropped a secret key)++**Steps:**+1. `pnpm db:migrate:new integration-jsonschema-drop-secrets`+2. `UPDATE "integration" SET "jsonschema" = ... ` for each row whose schema still lists a secret property (from recon): `linear` (drop `apiKey`), `paperless-parts` (drop `apiKey`,`secretKey`), `resend` (drop `apiKey`), `slack` (drop `access_token`), `onshape` (drop `credentials.accessToken`/`refreshToken` from the nested schema). Accounting (`xero`/`quickbooks`/`rillet`) and `jira` are already `{}` — no change. Each `UPDATE` idempotent (guarded by id). End with `NOTIFY pgrst, 'reload schema';` only if needed (data change — not required, but harmless).+3. `pnpm db:migrate`.++**Verify:**+```bash+psql "$SUPABASE_DB_URL" -At -c "SELECT id FROM integration WHERE jsonschema::text LIKE '%apiKey%' OR jsonschema::text LIKE '%secretKey%' OR jsonschema::text LIKE '%access_token%' OR jsonschema::text LIKE '%accessToken%';"+# Expected: no rows+```++**Out of scope:** editing historical migrations (never); the `verify_integration` trigger body (unchanged — it validates the now-secret-free schema).++---++## Task 5: Route every provider read + token-refresh write through the helpers++**Depends on:** Task 3+**Files (from recon — read sites):**+- Modify: `packages/ee/src/linear/lib/client.ts:33` — replace `integration.metadata as {apiKey}` with a `resolveIntegrationSecrets(...)` read.+- Modify: `packages/ee/src/jira/lib/client.ts:159` (`getCredentials`) and the refresh write at `packages/ee/src/jira/lib/service.ts:31-56` (`updateJiraCredentials` → `persistIntegrationSecrets`).+- Modify: `packages/ee/src/onshape/lib/client.ts:609-657` (read) and the inline refresh write at `:633-651` → `persistIntegrationSecrets`.+- Modify: `apps/erp/app/modules/settings/settings.server.ts:235-256` (`getSlackIntegration`, reads `metadata.access_token`) → resolve via helper.+- Modify: accounting shared reader `packages/ee/src/accounting/core/service.ts:160-182` (read) and the `onTokenRefresh` write at `:186-220` → `persistIntegrationSecrets`.+- Modify: paperless read `packages/jobs/src/inngest/functions/integrations/paperless-parts.ts:126`.+- **Non-secret mirror (recon flag):** `getAccountingIntegration` filters on `metadata->credentials->>tenantId` / `->providerMetadata->>tenantId` (`accounting/core/service.ts:97-100`). `tenantId`/`realmId` are NON-secret and MUST stay in `metadata` (they are not in `SECRET_KEYS`), so this filter keeps working. Confirm `splitSecrets` leaves `credentials.providerMetadata.tenantId/realmId` in `config`. If the filter still breaks, STOP and report.++**Steps:**+1. For each read site: obtain a service-role client (these paths already run server-side / in jobs), call `resolveIntegrationSecrets(...)`, and read the merged metadata exactly as before (shape is unchanged).+2. For each token-refresh write site (jira, onshape, accounting `onTokenRefresh`, plus the initial OAuth stores listed in recon §4): replace the direct `companyIntegration.metadata` update with `persistIntegrationSecrets(...)` so refreshed tokens land in the vault, not the column.+3. Leave `exchange-rates` untouched (env-based, no metadata secret).++**Verify:**+```bash+grep -rn "metadata.*apiKey\|metadata.*access_token\|metadata.*accessToken" packages/ee/src apps/erp/app/modules/settings packages/jobs/src/inngest/functions/integrations --include="*.ts"+# Expected: no direct plaintext secret reads remain (all go through resolveIntegrationSecrets)+pnpm exec turbo run typecheck --filter=@carbon/ee --filter=@carbon/jobs --filter=erp+# Expected: PASS+```++**Out of scope:** scrubbing plaintext (Task 10 — the transitional fallback means reads still work pre-scrub).++---++## Task 6: Settings service + Redis cache stop handling secret material++**Depends on:** Task 3+**Files:**+- Modify: `apps/erp/app/modules/settings/settings.server.ts:110-211` (`getCompanyIntegrations`, Redis-cached) — do NOT serialize secret material into Redis. Cache only the stripped (non-secret) metadata; the cache key `integrations:${companyId}` stays.+- Modify: `apps/erp/app/modules/settings/settings.service.ts:952-970` (`updateIntegrationMetadata`) and `settings.server.ts:264-289` (`upsertCompanyIntegration`) — route secret-bearing writes through `persistIntegrationSecrets` so the column never receives a secret.++**Steps:**+1. In the cache path, strip secret keys (`splitSecrets(...).config`) before `redis.set`. Since Task 5 already prevents secrets from reaching the column post-backfill, this mainly protects the transitional window and the cache.+2. In the write paths, split → vault + stripped config to the column.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: PASS+# Manual: after saving an integration, inspect Redis integrations:<companyId> — no token/apiKey present.+```++**Out of scope:** UI (Task 7/8).++---++## Task 7: Reveal endpoint (service-role, gated, audited)++**Depends on:** Task 3+**Files:**+- Create: `apps/erp/app/routes/x+/settings+/integrations.$id.reveal.tsx` (action-only route)+- Copy from (precedent): an existing `settings_update`-gated action under `apps/erp/app/routes/x+/settings+/integrations.$id.tsx` (permission gate + `getCarbonServiceRole`), and `packages/database/src/audit.ts` `insertAuditLogEntries` (the reveal audit write)++**Steps:**+1. `requirePermissions(request, { update: "settings" })`; read the requested secret key from the form.+2. Under `CONTROLLED_ENVIRONMENT` (read via `@carbon/env`), require a fresh MFA challenge before revealing (reuse the MFA session helpers per `.ai/plans/2026-08-15-totp-mfa.md`); otherwise skip.+3. Resolve the secret with a service-role client via `resolveIntegrationSecrets(...)` and return ONLY the requested key's value.+4. Emit an audit event via `insertAuditLogEntries(serviceClient, companyId, [{ ... }])` — action = "viewed integration secret", actor = userId, entityType/entityId = the integration id, timestamp now. (Reuses the `insert_audit_log_batch` path; no new audit plumbing.)++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: PASS+# Manual (/test in Task 11): reveal returns the value AND writes one audit row; a settings_view-only user is denied.+```++**Out of scope:** building an in-app audit viewer for these events (they show in the existing audit UI).++---++## Task 8: Settings UI — masked default + Reveal + anti-overwrite save (D4/D4a)++**Depends on:** Tasks 6, 7+**Files:**+- Modify: `apps/erp/app/routes/x+/settings+/integrations.$id.tsx` — loader (`:497-825`) MUST NOT send secret values to the browser; pass a masked placeholder + a `configured: boolean` per secret field. Action (`:1360-1470`) must apply the anti-overwrite rule.+- Modify: `apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx` — `SecretField` (`:310-333`) becomes masked-by-default with a **Reveal** button (calls the Task 7 route) + dirty-tracking.+- Copy from (precedent): the existing `SecretField` at `IntegrationForm.tsx:310-333` (already wraps `@carbon/form` `Password` with reveal + copy) — extend it, don't rewrite.++**Steps:**+1. Loader: for each `type:"secret"`/`"password"` field, send `""`/mask + `configured=true|false` (from whether the vault bag / `secretRef` holds it) — never the real value.+2. `SecretField`: show masked; add **Reveal** (fetches plaintext from the reveal route on demand) and keep Copy. Track a `secretChanged` flag set only when the user edits the field.+3. Action anti-overwrite (D4a): write the secret to the vault **only if `secretChanged`**; an untouched field omits the secret from the update payload. Belt-and-suspenders: the server action rejects/ignores a submitted value equal to the mask sentinel. Prefer the explicit `secretChanged` flag over string comparison.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+# Expected: PASS+# Manual (Task 11): save non-secret config without touching the key → key unchanged in vault; edit the key → vault updated; Reveal shows the value + writes an audit row.+```++**Out of scope:** provider-specific form fields beyond the secret inputs.++---++## Task 9: Backfill script — plaintext → Vault (no scrub yet)++**Depends on:** Tasks 1,3,4,5+**Files:**+- Create: `packages/database/src/scripts/backfill-integration-secrets.ts` (run as a deploy step like `seed.ts`)+- Copy from (precedent): `packages/database/src/seed.ts` (service-role client bootstrap + run-as-script shape)++**Steps:**+1. For every `companyIntegration` row: `splitSecrets(id, metadata)`; if the secrets bag is non-empty, `upsert_integration_secret(...)` (sets `secretRef`). **Do NOT strip plaintext from the column yet** — the transitional fallback (Task 3) keeps reads working. Idempotent: re-running upserts the same vault name in place; a row already carrying `secretRef` is skipped or re-upserted harmlessly.+2. Log per-integration counts; log any integration id NOT in `SECRET_KEYS` that nonetheless has secret-looking keys (STOP-and-report signal, per the top-of-plan rule).++**Verify:**+```bash+pnpm --filter @carbon/database tsx src/scripts/backfill-integration-secrets.ts # against a dev DB+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM \"companyIntegration\" WHERE \"secretRef\" IS NOT NULL;"+# Expected: equals the number of integrations that carry secrets+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM vault.secrets WHERE name LIKE 'integration:%';"+# Expected: matches the above+```++**Out of scope:** the scrub (Task 10) — must be a separate, later step so a bad backfill can't destroy the only copy.++---++## Task 10: Scrub plaintext + remove the transitional fallback++**Depends on:** Task 9 (confirmed: every secret-bearing row has a `secretRef` and reads succeed on vault)+**Files:**+- Create: `packages/database/supabase/migrations/{ts}_scrub-integration-plaintext-secrets.sql` (strip `SECRET_KEYS` paths from `companyIntegration.metadata`)+- Modify: `packages/ee/src/integrations/secrets.ts` — remove the transitional plaintext fallback from `resolveIntegrationSecrets` (a missing bag now always fails closed, D8).++**Steps:**+1. Migration: for each integration id, remove its `SECRET_KEYS` paths from `metadata` (JSONB `#-` for top-level; nested paths need a small `jsonb_set`/`#-` per path). Guard: only scrub rows whose `secretRef IS NOT NULL` (never scrub a row we didn't vault).+2. Remove the fallback branch in `resolveIntegrationSecrets`; add/keep the `IntegrationSecretUnavailableError` throw.+3. Update `secrets.test.ts` to drop the fallback case and assert fail-closed.++**Verify:**+```bash+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM \"companyIntegration\" WHERE metadata::text ~ '(access_token|accessToken|refreshToken|\"apiKey\"|secretKey|webhookToken)';"+# Expected: 0 (no plaintext secret remains anywhere)+pnpm --filter @carbon/ee test -- secrets+# Expected: pass (fail-closed, no fallback)+```+This count being **0** is the spec's exit criterion (D6). If it is not 0, an integration was missed — STOP and report which.++**Out of scope:** none — this is the closing step.++---++## Task 11: Verify — typecheck + provider smoke + `/test` reveal + anti-overwrite++**Depends on:** Tasks 1–10+**Steps:**+1. Scoped typecheck: `pnpm exec turbo run typecheck --filter=@carbon/ee --filter=@carbon/jobs --filter=erp --filter=@carbon/database`+2. `pnpm --filter @carbon/ee test`+3. `/test` (requires `crbn up`): (a) an accounting or Slack sync still authenticates end-to-end (proves vault read on a live provider path); (b) in Settings → Integrations, reveal a key → value shown + one audit row written; (c) save non-secret config without touching the key → the vaulted secret is unchanged (anti-overwrite); (d) a `settings_view`-only user cannot reveal.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/ee --filter=@carbon/jobs --filter=erp --filter=@carbon/database+# Expected: all PASS+```+Plus the four `/test` checks passing and the Task 10 plaintext count = 0.++**Out of scope:** the chart/infra items (KMS-at-rest already covers vault storage); those live in `helm/niamey`.diff --git a/.ai/plans/implemented/2026-08-16-remove-global-permission-wildcard.md b/.ai/plans/implemented/2026-08-16-remove-global-permission-wildcard.mdnew file mode 100644index 0000000000..7de9ada89f--- /dev/null+++ b/.ai/plans/implemented/2026-08-16-remove-global-permission-wildcard.md@@ -0,0 +1,295 @@+# Remove the `"0"` Global-Company Permission Wildcard — implementation plan++Status: IMPLEMENTED 2026-08-18 (commit `0cbaf1390`, verified `ba340f2d9`).++**Spec:** .ai/specs/implemented/2026-08-16-remove-global-permission-wildcard.md+**Branch:** port-louis (or a dedicated `remove-permission-wildcard`)++## Progress+- [x] Task 1: Migration — expand residual `"0"` grants, then de-wildcard the 2 functions + re-sign `is_claims_admin` (applied `20260817030612`; all 6 verify checks pass; local seed had 0 residual `"0"`)+- [x] Task 2: Regenerate DB types (crbn regenerated on migrate; `is_claims_admin: { Args: { company: string } }`)+- [x] Task 3: Strip the 10 app-layer `"0"` reads + pass `companyId` to `is_claims_admin` + defensive strip on write (grep clean; both rpc calls pass company; typecheck auth/erp/jobs green)+- [x] Task 4: Verify — scoped typecheck (auth/erp/jobs/react) ✓; `@carbon/auth` tests 17 passed ✓; browser smoke ✓ (login + all modules render = no lockout; permission matrix renders; edited a permission → "Permissions updated" + persisted to DB as `[]`; defensive strip confirmed — no `"0"` reintroduced). Note found (OUT OF SCOPE, pre-existing): `is_claims_admin` checks the reversed key `update_users` instead of `users_update`; behavior-neutral to this change (empty array either way), passes in local dev via the non-authenticator ELSE branch.++## Dependencies+- Task 2 needs Task 1 (types regenerate from the new `is_claims_admin(text)` signature).+- Task 3 needs Task 2 (the `client.rpc("is_claims_admin", { company })` call must typecheck against the regenerated `Database` type).+- Task 4 is last.++> Whole change is authorization-core. If any assumption below turns out false+> (e.g. a residual `"0"` row whose expansion is ambiguous, or an unexpected SQL+> caller of `is_claims_admin`), **STOP and report — do not improvise.**++---++## Task 1: Migration — expand residual `"0"` grants, then de-wildcard the functions++**Depends on:** none+**Files:**+- Create: `packages/database/supabase/migrations/{ts}_remove-global-permission-wildcard.sql` (via the command below — never hand-pick the timestamp)+- Copy from (precedent): `packages/database/supabase/migrations/20241210140215_rls-performance.sql` (current `has_company_permission`), `packages/database/supabase/migrations/20260219162954_api-key-scopes-rate-limits.sql` (current `get_companies_with_employee_permission`), `packages/database/supabase/migrations/20230123004206_claims.sql` (current `is_claims_admin`)++**Steps:**+1. Create the file:+ ```bash+ pnpm db:migrate:new remove-global-permission-wildcard+ ```+2. Paste EXACTLY this SQL (order matters: data-expand first, then redefine, then reload — one transaction, atomic):+ ```sql+ -- NIST 800-171 3.1.5: remove the "0" global-company permission wildcard.+ -- Expand-then-drop: rewrite any residual "0" grant to explicit companies+ -- BEFORE the functions stop interpreting "0", so no one is locked out.++ -- 1a. userPermission.permissions (JSONB: "<module>_<action>" -> [companyId,...])+ -- Replace "0" in any array with the user's userToCompany companies (any role).+ DO $$+ DECLARE+ r RECORD;+ new_perms jsonb;+ k text;+ arr jsonb;+ companies text[];+ BEGIN+ FOR r IN+ SELECT id, permissions FROM public."userPermission"+ WHERE permissions::text LIKE '%"0"%'+ LOOP+ SELECT COALESCE(array_agg("companyId"::text), '{}')+ INTO companies+ FROM public."userToCompany" WHERE "userId" = r.id;++ new_perms := r.permissions;+ FOR k IN SELECT jsonb_object_keys(r.permissions) LOOP+ arr := r.permissions -> k;+ IF jsonb_typeof(arr) = 'array' AND (arr ? '0') THEN+ new_perms := jsonb_set(+ new_perms,+ ARRAY[k],+ (+ SELECT COALESCE(jsonb_agg(DISTINCT elem), '[]'::jsonb)+ FROM (+ SELECT e AS elem FROM jsonb_array_elements_text(arr) e WHERE e <> '0'+ UNION+ SELECT unnest(companies) AS elem+ ) s+ )+ );+ END IF;+ END LOOP;++ UPDATE public."userPermission" SET permissions = new_perms WHERE id = r.id;+ END LOOP;+ END $$;++ -- 1b. employeeTypePermission (TEXT[] columns): "0" -> the employee type's company.+ UPDATE public."employeeTypePermission" etp+ SET+ "create" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."create", '0', et."companyId")) c),+ "update" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."update", '0', et."companyId")) c),+ "view" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."view", '0', et."companyId")) c),+ "delete" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."delete", '0', et."companyId")) c)+ FROM public."employeeType" et+ WHERE et.id = etp."employeeTypeId"+ AND ('0' = ANY(etp."create") OR '0' = ANY(etp."update") OR '0' = ANY(etp."view") OR '0' = ANY(etp."delete"));++ -- 2. Redefine has_company_permission WITHOUT the "0" wildcard branch.+ -- (fork of 20241210140215; attributes preserved exactly.)+ CREATE OR REPLACE FUNCTION has_company_permission(claim text, company text) RETURNS "bool"+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public+ AS $$+ DECLARE+ permission_value text[];+ BEGIN+ SELECT jsonb_to_text_array(coalesce(permissions->claim, '[]'))+ INTO permission_value+ FROM public."userPermission" WHERE id = (SELECT auth.uid()::text);+ IF permission_value IS NULL THEN+ return false;+ ELSIF company = ANY(permission_value::text[]) THEN+ return true;+ ELSE+ return false;+ END IF;+ END;+ $$;++ -- 3. Redefine get_companies_with_employee_permission WITHOUT the "0" expand block.+ -- (fork of 20260219162954; attributes preserved exactly.)+ CREATE OR REPLACE FUNCTION get_companies_with_employee_permission (permission text) RETURNS text[] LANGUAGE "plpgsql" SECURITY DEFINER+ SET search_path = public AS $$+ DECLARE+ permission_companies text[];+ api_key_company text;+ employee_companies text[];+ api_key_scopes JSONB;+ BEGIN+ api_key_company := get_company_id_from_api_key();++ IF api_key_company IS NOT NULL THEN+ api_key_scopes := get_api_key_scopes();+ IF api_key_scopes IS NULL OR api_key_scopes = '{}'::jsonb THEN+ RETURN '{}';+ END IF;+ IF (api_key_scopes ? permission)+ AND api_key_company = ANY(jsonb_to_text_array(api_key_scopes->permission)) THEN+ RETURN ARRAY[api_key_company];+ ELSE+ RETURN '{}';+ END IF;+ END IF;++ SELECT array_agg("companyId"::text)+ INTO employee_companies+ FROM "userToCompany"+ WHERE "userId" = auth.uid()::text AND "role" = 'employee';++ SELECT jsonb_to_text_array(COALESCE(permissions->permission, '[]'))+ INTO permission_companies+ FROM public."userPermission"+ WHERE id::text = auth.uid()::text;++ IF permission_companies IS NOT NULL AND employee_companies IS NOT NULL THEN+ SELECT array_agg(company)+ INTO permission_companies+ FROM unnest(permission_companies) company+ WHERE company = ANY(employee_companies);+ ELSE+ permission_companies := '{}';+ END IF;++ RETURN permission_companies;+ END;+ $$;++ -- 4. Re-sign is_claims_admin per-company (drop the no-arg global-admin version).+ DROP FUNCTION IF EXISTS is_claims_admin();+ CREATE OR REPLACE FUNCTION is_claims_admin(company text) RETURNS "bool"+ LANGUAGE "plpgsql"+ AS $$+ BEGIN+ IF session_user = 'authenticator' THEN+ IF extract(epoch from now()) > coalesce((current_setting('request.jwt.claims', true)::jsonb)->>'exp', '0')::numeric THEN+ return false; -- jwt expired+ END IF;+ IF has_company_permission('update_users', company) THEN+ return true;+ ELSE+ return false;+ END IF;+ ELSE -- not a user session (trigger etc.)+ return true;+ END IF;+ END;+ $$;++ -- 5. Reload PostgREST so the new is_claims_admin(text) signature is exposed.+ NOTIFY pgrst, 'reload schema';+ ```+3. Apply and confirm zero residual `"0"`:+ ```bash+ pnpm db:migrate+ ```++**Verify:**+```bash+# Requires the local stack up (crbn up). Both counts MUST be 0.+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM \"userPermission\" WHERE permissions::text LIKE '%\"0\"%';"+# Expected: 0+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM \"employeeTypePermission\" WHERE '0'=ANY(\"create\") OR '0'=ANY(\"update\") OR '0'=ANY(\"view\") OR '0'=ANY(\"delete\");"+# Expected: 0+# is_claims_admin now takes one arg; the no-arg form is gone.+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM pg_proc WHERE proname='is_claims_admin' AND pronargs=1;"+# Expected: 1+psql "$SUPABASE_DB_URL" -At -c "SELECT count(*) FROM pg_proc WHERE proname='is_claims_admin' AND pronargs=0;"+# Expected: 0+```+If the stack is down, this task cannot be verified — do NOT mark it done; report "blocked on stack".++**Out of scope:** `get_claims`, `get_companies_with_employee_role` (no `"0"` — leave untouched); removing `has_company_permission` (keep it, only its wildcard branch is dropped).++---++## Task 2: Regenerate DB types++**Depends on:** Task 1+**Files:** Modify (generated): `packages/database/src/types.ts`, `packages/database/supabase/functions/lib/types.ts`++**Steps:**+1. `pnpm run generate:types`+2. Confirm the `is_claims_admin` RPC type changed from `Args: never` to a `{ company: string }` arg.++**Verify:**+```bash+grep -n "is_claims_admin" packages/database/src/types.ts+# Expected: an entry whose Args include `company: string` (no longer `Args: never`)+```++**Out of scope:** hand-editing the generated types (never).++---++## Task 3: Strip the 10 app-layer `"0"` reads, pass `companyId` to `is_claims_admin`, reject `"0"` on write++**Depends on:** Task 2+**Files:**+- Modify: `packages/auth/src/services/auth.server.ts` — line ~364: delete the `permissionForCompany?.includes("0") ||` disjunct so only `?.includes(companyId)` remains.+- Modify: `apps/erp/app/modules/users/users.server.ts` —+ - `makeCompanyPermissionsFromClaims` (lines 1164,1169,1174,1179) and `makeCompanyPermissionsFromEmployeeType` (1279,1282,1285,1288): drop the `...includes("0") ||` disjunct at each of the 8 sites (keep `...includes(companyId)`).+ - `updatePermissions` (~1441): `client.rpc("is_claims_admin")` → `client.rpc("is_claims_admin", { company: companyId })` (companyId is in scope, ~1432).+ - Defensive strip: where `updatePermissions` builds the permission arrays before the service-role write (~1473–1556), filter `"0"` out of every array so it can never persist.+- Modify: `packages/jobs/src/inngest/functions/tasks/update-permissions.ts` — line 53: `client.rpc("is_claims_admin")` → `client.rpc("is_claims_admin", { company: companyId })` (companyId is a fn param, line 41/50); apply the same defensive `"0"` strip before its write.+- Modify: `apps/erp/app/hooks/usePermissions.tsx` — line ~29: drop the `...includes("0") ||` disjunct.+- Modify: `apps/erp/app/routes/api+/search.tsx` — line ~63: same.+- Modify: `apps/erp/app/routes/x+/workflow+/$id.test-run.tsx` — line ~192: `if (!granted.includes("0") && !granted.includes(gate.companyId))` → `if (!granted.includes(gate.companyId))`.+- Modify: `packages/jobs/src/workflows/engine/owner.ts` — line ~83: `return granted.includes("0") || granted.includes(companyId);` → `return granted.includes(companyId);`.++**Steps:**+1. Make each edit above. The pattern is uniform: remove the `.includes("0")` disjunct; the `companyId` match already exists beside it in every case. Do NOT alter the array-form branch in `auth.server.ts` (it already ignores `"0"`).+2. Update both `is_claims_admin` call sites to pass `{ company: companyId }`.+3. Add the defensive `"0"` filter in both `updatePermissions` writers (ERP + job) so the authoritative table can never hold `"0"` again.+4. If any of the 10 sites no longer matches the quoted code (line drift), grep for the pattern first:+ ```bash+ grep -rn 'includes("0")' packages apps --include="*.ts" --include="*.tsx"+ ```+ Every hit here must be removed. If a hit exists that is NOT in the list above, STOP and report (a new reader was added since recon).++**Verify:**+```bash+# No permission-wildcard reads remain anywhere.+grep -rn 'includes("0")' packages apps --include="*.ts" --include="*.tsx"+# Expected: no output+# Both is_claims_admin calls pass a company.+grep -rn 'rpc("is_claims_admin"' packages apps --include="*.ts" --include="*.tsx"+# Expected: both hits include `{ company: companyId }`+pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=@carbon/jobs+# Expected: PASS (no type errors)+```++**Out of scope:** the JWT-expiry `'0'` default (`claims.sql:14`), `lpad(...,'0')`, and the `"1"/"0"` MFA Redis flag (`mfa.server.ts:94`) — none are company sentinels; leave them.++---++## Task 4: Verify — scoped typecheck + permission smoke test++**Depends on:** Tasks 1–3+**Files:** none (verification only)++**Steps:**+1. Scoped typecheck (never whole-repo — it OOMs):+ ```bash+ pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=@carbon/jobs --filter=@carbon/react+ ```+2. Run the auth/users unit tests if present:+ ```bash+ pnpm --filter @carbon/auth test+ ```+3. Browser smoke (requires `crbn up`): via `/test` — log in as an admin, open **Settings → People → an employee → Permissions**, toggle a module permission for the active company, save, and confirm the change persists and the user's access reflects it (still scoped to the active company). Confirm a second company's data is NOT reachable by that user. This exercises `updatePermissions` → `is_claims_admin(company)` → `has_company_permission` end-to-end.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=@carbon/jobs --filter=@carbon/react+# Expected: all PASS+```+Plus the `/test` playbook passing (permission edit saves; cross-company access denied).++**Out of scope:** rewriting portal RLS off the deprecated `has_company_permission` (separate cleanup, noted in the spec).diff --git a/.ai/plans/implemented/2026-08-17-session-lock-timeout.md b/.ai/plans/implemented/2026-08-17-session-lock-timeout.mdnew file mode 100644index 0000000000..a7cec3bbac--- /dev/null+++ b/.ai/plans/implemented/2026-08-17-session-lock-timeout.md@@ -0,0 +1,399 @@+# Session Lock & Session Termination under CUI — implementation plan++Status: IMPLEMENTED 2026-08-18 (residual: `/test` browser verification + passkey-unlock+addition — see `.ai/plans/2026-08-15-nist-800-171-app-remediation.md`).++**Spec:** .ai/specs/implemented/2026-08-17-session-lock-timeout.md+**Research:** .ai/research/session-lock-timeout.md+**Branch:** nist-800-110-audit (single PR #1414)++NIST 800-171 3.1.10 (session lock) + 3.1.11 (session termination), gated on+`CONTROLLED_ENVIRONMENT`, inert otherwise. No DB migration — two optional cookie+fields on `AuthSession`. Server-authoritative enforcement in `requireAuthSession`;+client idle UX drives concealment + a throttled activity heartbeat.++## Progress+- [x] Task 1: Add session-timeout constants to `@carbon/env`+- [x] Task 2: Add `createdAt`/`lastActiveAt` to `AuthSession`+- [x] Task 3: Stamp at mint, preserve across refresh; add predicates + `touchAuthSession` (+ unit tests)+- [x] Task 4: Enforce idle-lock + absolute-termination in `requireAuthSession`+- [x] Task 5: Heartbeat route (ERP + MES)+- [x] Task 6: `/unlock` TOTP route (ERP + MES)+- [x] Task 7: `useIdle` client hook (activity + heartbeat + cross-tab)+- [x] Task 8: `SessionLockOverlay` + wire into ERP/MES shells+- [x] Task 9: MES console idle-lock (tighten pin-in window under CUI)+- [ ] Task 10: Browser verification via `/test`++## Dependencies+- Task 3 needs Tasks 1–2 (constants + type fields).+- Task 4 needs Task 3 (predicates).+- Tasks 5 and 6 need Task 3 (`touchAuthSession` / `completeMfaChallenge` stamping). Tasks 5 and 6 are independent of each other.+- Task 7 needs Task 5 (heartbeat endpoint path). Task 8 needs Tasks 6–7. Task 9 is independent of Tasks 5–8 (separate console mechanism).+- Task 10 is last (needs everything).++---++## Task 1: Add session-timeout constants to `@carbon/env`++**Depends on:** none+**Files:**+- Modify: `packages/env/src/index.ts` — add three numeric constants next to the existing session constants.+- Copy from (precedent): the existing `SESSION_MAX_AGE` / `REFRESH_ACCESS_TOKEN_THRESHOLD` declarations at `packages/env/src/index.ts:372-373` (plain literal `export const`, seconds/ms literals — NOT `getEnv`).++**Steps:**+1. After line 373 (`export const REFRESH_ACCESS_TOKEN_THRESHOLD = 60 * 10; // ...`), add:+ ```ts+ // Session lock / termination (NIST 800-171 3.1.10 / 3.1.11). All in MILLISECONDS+ // (unlike SESSION_MAX_AGE above, which is seconds for the cookie maxAge). Enforced+ // only when CONTROLLED_ENVIRONMENT is true. Plain literals, matching SESSION_MAX_AGE+ // precedent (not env-overridable in v1).+ export const SESSION_IDLE_LOCK_MS = 15 * 60 * 1000; // 15 min — DISA App-Sec STIG web-app idle+ export const SESSION_ABSOLUTE_MAX_MS = 12 * 60 * 60 * 1000; // 12 h — absolute session cap+ export const SESSION_HEARTBEAT_MS = 60 * 1000; // client activity heartbeat throttle+ ```+2. These are re-exported automatically: `@carbon/auth` does `export * from "@carbon/env"` (via `@carbon/config`/`config/env`). No change needed to `@carbon/auth` exports.+3. Do NOT add them to `getBrowserEnv()` — the client receives the values as loader data (Task 8), matching how `session.expiresAt` reaches `CarbonProvider`.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/env+# Expected: typecheck passes (1 successful)+```++**Out of scope:** Do not touch `SESSION_MAX_AGE`, `getBrowserEnv`, or the `Window.env` interface.++---++## Task 2: Add `createdAt`/`lastActiveAt` to `AuthSession`++**Depends on:** none+**Files:**+- Modify: `packages/auth/src/types.ts` — add two optional fields to the `AuthSession` interface.++**Steps:**+1. In the `AuthSession` interface (currently ends at the `mfaVerified?: boolean;` field, `packages/auth/src/types.ts:3-19`), add after `mfaVerified`:+ ```ts+ /**+ * Session start (unix ms). Stamped once at mint; PRESERVED across token+ * refresh (never reset by refreshAuthSession). Basis of the 12h absolute cap+ * (SESSION_ABSOLUTE_MAX_MS). Optional for back-compat with sessions minted+ * before this shipped — treated as "now" on first sight.+ */+ createdAt?: number;+ /**+ * Last real user activity (unix ms). Updated only by the activity heartbeat+ * and on unlock — NOT by background requests or token refresh. Basis of the+ * 15min idle lock (SESSION_IDLE_LOCK_MS). Optional for back-compat.+ */+ lastActiveAt?: number;+ ```++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/auth+# Expected: typecheck passes+```++**Out of scope:** Do not change any other field or the `Company`/`Permission`/`Result` types.++---++## Task 3: Stamp at mint, preserve across refresh; add predicates + `touchAuthSession` (+ unit tests)++**Depends on:** Tasks 1, 2+**Files:**+- Modify: `packages/auth/src/services/auth.server.ts` — stamp `createdAt`/`lastActiveAt` in `makeAuthSession`.+- Modify: `packages/auth/src/services/session.server.ts` — preserve both across refresh in `refreshAuthSession`; add `isSessionExpiredAbsolute` / `isSessionIdleLocked` pure predicates and `touchAuthSession`.+- Create: `packages/auth/src/services/session-timeout.test.ts` — unit tests.+- Copy from (precedent): the existing preserve block in `refreshAuthSession` (`session.server.ts:330-337`, which preserves `console`/`mfaVerified`); the existing `mfa-session.test.ts` for the test harness shape.++**Steps:**+1. **Stamp at mint** — in `makeAuthSession` (`auth.server.ts:146-157`), add `createdAt`/`lastActiveAt` to the returned object. Because `makeAuthSession` is also called by `refreshAccessToken` (line 518), stamping `now` here is correct ONLY because `refreshAuthSession` overwrites them with the preserved values in step 2. Add before the `...(options?.mfaVerified ...)` spread:+ ```ts+ createdAt: Date.now(),+ lastActiveAt: Date.now(),+ ```+ (NOTE: this uses `Date.now()` for an absolute instant / elapsed-ms comparison — the narrow exception in `.claude/rules/date-handling.md`; this is not a calendar date. The file already uses `Date.now()` — e.g. `isExpiringSoon`.)+2. **Escape hatch:** confirm the only `makeAuthSession` caller that is a *refresh* (not a fresh login/re-auth) is `refreshAccessToken` (`auth.server.ts:503-519`). The fresh-mint callers are `signInWithBypassEmail` (472), `signInWithEmail` (496), `signInWithPasskey` (595), and `completeMfaChallenge` (177) — all of which SHOULD get `createdAt = now`. If you find another refresh-style caller that must preserve session age, STOP and report — do not improvise.+3. **Preserve across refresh** — in `refreshAuthSession` (`session.server.ts:319-370`), extend the existing preserve block (after the `mfaVerified` preserve at line 335-337) with:+ ```ts+ // Preserve session age + last-activity across a silent token refresh — a+ // refresh is neither a re-auth nor user activity, so it must not reset the+ // absolute-cap clock or the idle clock.+ if (refreshedAuthSession && authSession?.createdAt) {+ refreshedAuthSession.createdAt = authSession.createdAt;+ }+ if (refreshedAuthSession && authSession?.lastActiveAt) {+ refreshedAuthSession.lastActiveAt = authSession.lastActiveAt;+ }+ ```+4. **Pure predicates** — add near `isExpiringSoon` (`session.server.ts:281-283`), importing the two new constants from `../config/env`:+ ```ts+ /** Absolute cap (3.1.11). Missing createdAt = never expired (back-compat; the+ * session gets stamped on next mint/refresh). */+ export function isSessionExpiredAbsolute(session: AuthSession): boolean {+ if (!session.createdAt) return false;+ return Date.now() - session.createdAt > SESSION_ABSOLUTE_MAX_MS;+ }+ /** Idle lock (3.1.10). Missing lastActiveAt = not locked (back-compat). */+ export function isSessionIdleLocked(session: AuthSession): boolean {+ if (!session.lastActiveAt) return false;+ return Date.now() - session.lastActiveAt > SESSION_IDLE_LOCK_MS;+ }+ ```+ Add `SESSION_ABSOLUTE_MAX_MS`, `SESSION_IDLE_LOCK_MS` to the existing import from `../config/env` at `session.server.ts:6-13`.+5. **`touchAuthSession`** — add an exported helper that re-commits the signed cookie with a fresh `lastActiveAt` (used by the heartbeat and unlock). Model it on `updateSessionConsole` (`session.server.ts:372-387`):+ ```ts+ /** Re-commit the session cookie with lastActiveAt = now. Used by the activity+ * heartbeat and on unlock. Returns the Set-Cookie string, or null if no session. */+ export async function touchAuthSession(request: Request): Promise<string | null> {+ const session = await getSession(request);+ const authSession = await getAuthSession(request);+ if (!authSession) return null;+ session.set(SESSION_KEY, { ...authSession, lastActiveAt: Date.now() });+ return sessionStorage.commitSession(session, { maxAge: SESSION_MAX_AGE });+ }+ ```+6. **Unit tests** (`session-timeout.test.ts`): cover+ - `isSessionExpiredAbsolute`: false when `createdAt` missing; false at `now - createdAt < 12h`; true at `> 12h`.+ - `isSessionIdleLocked`: false when `lastActiveAt` missing; false `< 15min`; true `> 15min`.+ - Preserve-across-refresh: simulate `refreshAuthSession` preserving `createdAt`/`lastActiveAt` — assert a refreshed session keeps the ORIGINAL `createdAt` (i.e. the absolute clock does not reset on refresh). Follow the mock style in `mfa-session.test.ts` (mock `makeAuthSession`/`refreshAccessToken`). Use `vi.useFakeTimers()` / `vi.setSystemTime(...)` for the elapsed-time assertions.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/auth+pnpm --filter @carbon/auth test+# Expected: typecheck passes; new session-timeout tests pass; existing auth tests still pass+```++**Out of scope:** Do not add the enforcement branch to `requireAuthSession` yet (Task 4). Do not touch `completeMfaChallenge` beyond what `makeAuthSession` already gives it (it re-stamps `createdAt`/`lastActiveAt = now` on unlock, which is the intended re-auth behavior).++---++## Task 4: Enforce idle-lock + absolute-termination in `requireAuthSession`++**Depends on:** Task 3+**Files:**+- Modify: `packages/auth/src/services/session.server.ts` — add the two enforcement checks inside `requireAuthSession` (`:285-317`), gated on `CONTROLLED_ENVIRONMENT`, skipping console device sessions.+- Copy from (precedent): the existing MFA re-check redirect in the same function (`session.server.ts:309-314`) and the `destroyAuthSession` termination pattern (`:214-219`).++**Steps:**+1. Import `CONTROLLED_ENVIRONMENT` from `../config/env` (add to the existing import block).+2. In `requireAuthSession`, AFTER the refresh (`:301-303`) and BEFORE the MFA re-check (`:309`), insert:+ ```ts+ // NIST 800-171 3.1.10 / 3.1.11 — controlled environments only. Console DEVICE+ // sessions are exempt: their lock is the operator pin-in (see console.server),+ // and a shared kiosk must not be force-logged-out mid-shift (spec D8).+ if (CONTROLLED_ENVIRONMENT && !authSession.console) {+ if (isSessionExpiredAbsolute(authSession)) {+ // 3.1.11 termination — destroy the session, force full re-login.+ throw await destroyAuthSession(request);+ }+ if (isSessionIdleLocked(authSession)) {+ // 3.1.10 lock — session PRESERVED; re-auth at /unlock to resume.+ throw redirect(`${path.to.unlock}?${makeRedirectToFromHere(request)}`);+ }+ }+ ```+3. Add `path.to.unlock` to the auth package path helper (`packages/auth/src/utils/path.ts`) — find where `path.to.mfa` / `path.to.login` are defined and add `unlock: "/unlock"` in the same shape. If `path.to.mfa` is defined there, mirror it exactly. If the path helper does not have `mfa`, STOP and report (the redirect target must resolve).+4. `destroyAuthSession` already returns a `redirect(...)` Response — `throw` it (matches how `refreshAuthSession` throws its redirect).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=@carbon/auth+pnpm --filter @carbon/auth test+# Expected: passes. (Behavioral verification is Task 10 — CONTROLLED_ENVIRONMENT is unset locally.)+```++**Out of scope:** The API-key path (`auth.server.ts:219-330`) — it never calls `requireAuthSession`, so machine callers are exempt by construction; do not add a check there. Do not gate on anything other than `CONTROLLED_ENVIRONMENT` (no per-company toggle in v1).++---++## Task 5: Heartbeat route (ERP + MES)++**Depends on:** Task 3+**Files:**+- Create: `apps/erp/app/routes/api+/session.heartbeat.ts`+- Create: `apps/mes/app/routes/api+/session.heartbeat.ts`+- Copy from (precedent): `apps/erp/app/routes/_public+/refresh-session.tsx` (POST-only action that re-issues the session cookie and returns a small JSON body).++**Steps:**+1. Each file: POST-only action. Require a valid session (call `requirePermissions(request, {})` — an empty permission set just asserts an authenticated session), then call `touchAuthSession(request)` and return `data({ ok: true }, { headers: { "Set-Cookie": cookie } })` when a cookie came back, else `data({ ok: false })`.+ ```ts+ import { assertIsPost } from "@carbon/auth";+ import { requirePermissions } from "@carbon/auth/auth.server";+ import { touchAuthSession } from "@carbon/auth/session.server";+ import { data, type ActionFunctionArgs } from "react-router";++ export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ await requirePermissions(request, {});+ const cookie = await touchAuthSession(request);+ return data(+ { ok: Boolean(cookie) },+ cookie ? { headers: { "Set-Cookie": cookie } } : undefined+ );+ }+ ```+2. Confirm the flat-route filename maps to `/api/session/heartbeat` (the `api+/` + `.` segment convention, e.g. existing `api+/…` files). If the resolved path differs, note the real path for Task 7.+3. NOTE: `requireAuthSession` runs inside `requirePermissions`, so a heartbeat from an already-idle session would itself redirect to `/unlock` before touching. That is correct — once locked, the heartbeat stops resuming the session; only `/unlock` re-auth does. The heartbeat's job is to keep an ACTIVE session from locking, firing well within the 15-min window.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+pnpm exec turbo run typecheck --filter=mes+# Expected: both pass+```++**Out of scope:** No rate-limit table needed; the endpoint only re-signs a cookie. Do not add idle logic here — enforcement lives in `requireAuthSession`.++---++## Task 6: `/unlock` TOTP route (ERP + MES)++**Depends on:** Task 3+**Files:**+- Create: `apps/erp/app/routes/_public+/unlock.tsx`+- Create: `apps/mes/app/routes/_public+/unlock.tsx`+- Copy from (precedent): `apps/erp/app/routes/_public+/mfa.tsx` (loader guards, `completeMfaChallenge` action, Set-Cookie of the rotated session, OTP input via `~/components/TotpEnrollment`) and `apps/mes/app/routes/_public+/mfa.tsx` for the MES variant.++**Steps:**+1. Build `unlock.tsx` as a near-copy of `mfa.tsx` with these differences:+ - **Loader**: redirect away (to `redirectTo` or authenticated root) if the session is NOT actually idle-locked — i.e. if `getAuthSession` returns a session and `!isSessionIdleLocked(session)` and `!isSessionExpiredAbsolute(session)`. If the session is absolute-expired or missing, redirect to `/login` (termination wins). Only render the unlock form when the session exists and is idle-locked.+ - **Action**: identical to `mfa.tsx` — `completeMfaChallenge(request, code)`; on success Set-Cookie the rotated session (which now carries fresh `createdAt`/`lastActiveAt` from `makeAuthSession`) and redirect to `redirectTo`. Rate-limit the same way `mfa.tsx` does.+ - **Copy/label**: "Session locked — enter your authentication code to resume" instead of the enrollment-challenge copy. Reuse the shared `OtpInput` / `useTotpEnrollment` from `~/components/TotpEnrollment` and `INVALID_CODE_MESSAGE`.+2. MES `unlock.tsx`: mirror the MES `mfa.tsx` (its layout/console handling). Console-mode sessions never reach `/unlock` (Task 4 skips `authSession.console`); the MES `/unlock` serves non-console MES sessions.+3. If `mfa.tsx` relies on the pending-MFA session (`getPendingMfaSession`) in its loader, DROP that branch for `/unlock` — an unlock always operates on the existing full session, never a pending one.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+pnpm exec turbo run typecheck --filter=mes+# Expected: both pass+```++**Out of scope:** Do not implement PIN unlock here — console PIN is Task 9. Do not modify `completeMfaChallenge` (Task 3 already made it re-stamp timestamps).++---++## Task 7: `useIdle` client hook (activity + heartbeat + cross-tab)++**Depends on:** Task 5+**Files:**+- Create: `apps/erp/app/hooks/useIdle.tsx`+- Create: `apps/mes/app/hooks/useIdle.tsx` (or a shared spot if both apps import from one — prefer per-app to match the existing per-app hooks dir; keep them identical).+- Copy from (precedent): `packages/auth/src/lib/supabase/provider.tsx:63-105` (the existing `visibilitychange` listener + `useInterval` refresh loop — reuse this activity/interval shape).++**Steps:**+1. `useIdle({ idleMs, heartbeatMs, heartbeatUrl, enabled })` returns `{ isIdle, resume }`:+ - When `enabled` is false (non-controlled env), the hook is inert: never sets `isIdle`, never posts.+ - Track `lastActivityRef = Date.now()` updated on `mousemove`, `mousedown`, `keydown`, `touchstart`, `scroll`, `visibilitychange` (visible). Throttle activity handling to avoid per-event work.+ - A `setInterval` (~1s) sets `isIdle = true` once `Date.now() - lastActivity > idleMs`.+ - **Heartbeat**: while active (not idle) and at most once per `heartbeatMs`, `fetch(heartbeatUrl, { method: "POST" })` (credentials same-origin). Do NOT heartbeat while idle.+ - **Cross-tab** via `BroadcastChannel("carbon-session-activity")`: on local activity, post `{ t: Date.now() }` (throttled); on receiving a peer activity message, update `lastActivity` and clear `isIdle`. On local lock, post `{ locked: true }`; peers set `isIdle = true`. Guard `typeof BroadcastChannel !== "undefined"`. Close the channel on unmount.+ - `resume()` clears `isIdle` and resets `lastActivity` (called after a successful unlock navigation).+2. Use plain `Date.now()` here — client-side elapsed-ms, the allowed exception; this is not a calendar date.+3. Do NOT add `react-idle-timer` or any dependency (spec D10).++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+pnpm exec turbo run typecheck --filter=mes+# Expected: both pass+```++**Out of scope:** No server calls other than the heartbeat POST. The hook renders nothing — the overlay is Task 8.++---++## Task 8: `SessionLockOverlay` + wire into ERP/MES shells++**Depends on:** Tasks 6, 7+**Files:**+- Create: `apps/erp/app/components/SessionLockOverlay.tsx`+- Create: `apps/mes/app/components/SessionLockOverlay.tsx` (identical shape, MES sizing `size="lg"` per `.claude/rules` MES convention).+- Modify: `apps/erp/app/routes/x+/_layout.tsx` — pass timeout config from loader; render the overlay driven by `useIdle`.+- Modify: `apps/mes/app/routes/x+/_layout.tsx` — same.+- Copy from (precedent): `apps/erp/app/components/MfaEnrollmentRequired.tsx` (full-screen blocking-screen shape) and the shell's existing `mfaScreen` render (`apps/erp/app/routes/x+/_layout.tsx:397-411`); the session prop is already passed to `CarbonProvider` at `x+/_layout.tsx:413` and `session.expiresAt` at `:259-264`.++**Steps:**+1. **Shell loader**: in each `x+/_layout.tsx` loader, add to the returned data a `sessionTimeout` object:+ ```ts+ sessionTimeout: {+ enabled: CONTROLLED_ENVIRONMENT,+ idleMs: SESSION_IDLE_LOCK_MS,+ heartbeatMs: SESSION_HEARTBEAT_MS,+ }+ ```+ Import the three from `@carbon/auth` (re-exported from `@carbon/env`). Console sessions: pass `enabled: false` when `consoleMode` is true (console uses the pin-in path, Task 9) — read the existing `consoleMode`/`authSession.console` already available in the loader.+2. **`SessionLockOverlay`**: a full-viewport fixed overlay (mirror `MfaEnrollmentRequired`'s container) that renders ONLY when its `isIdle` prop is true. It must **conceal page content** (opaque background, high z-index, covers the shell) — pattern-hiding (AC-11(1)). Content: a lock icon, "Session locked" heading, short copy, and a link/button that navigates to `/unlock?redirectTo=<current path>` (the actual TOTP form lives on `/unlock`, Task 6 — the overlay just conceals + funnels there). Optionally embed the OTP form inline later; for v1 the overlay conceals and routes to `/unlock`.+3. **Wire in**: in the shell component, call `useIdle({ enabled: sessionTimeout.enabled, idleMs, heartbeatMs, heartbeatUrl: "/api/session/heartbeat" })` and render `<SessionLockOverlay isIdle={isIdle} />` alongside the existing `mfaScreen`/ITAR blocking screens. When `isIdle`, render the overlay INSTEAD OF / on top of the `Outlet` so content is concealed even on a same-pathname navigation (the server enforcement in Task 4 is the boundary; this overlay is the immediate concealment).+4. Keep it inert when `!sessionTimeout.enabled` — non-controlled deployments see nothing.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=erp+pnpm exec turbo run typecheck --filter=mes+pnpm run lint+# Expected: typecheck + biome pass+```++**Out of scope:** Do not change the MFA/ITAR blocking screens. Do not add the overlay to non-`x+` routes (public routes have no session shell).++---++## Task 9: MES console idle-lock (tighten pin-in window under CUI)++**Depends on:** none (independent console mechanism)+**Files:**+- Modify: `apps/mes/app/services/console.server.ts` — make the pin-in idle window `SESSION_IDLE_LOCK_MS` under `CONTROLLED_ENVIRONMENT` (currently fixed 1h, `CONSOLE_PIN_MAX_AGE`).+- Modify: `packages/auth/src/services/auth.server.ts:187-194` — `getEffectiveUser` reads the pin cookie with a hard-coded `3600000` (1h) expiry; apply the same tightening so the server drops an idle operator to "not pinned in".+- Modify: `apps/mes/app/components/PinInOverlay.tsx` — surface the pin-in overlay after `SESSION_IDLE_LOCK_MS` of idle when controlled (reuse the `useIdle` hook from Task 7 to trigger re-display).+- Copy from (precedent): the existing `getConsolePinIn` expiry check (`console.server.ts:29-30`) and `getEffectiveUser` (`auth.server.ts:190-194`).++**Steps:**+1. In `console.server.ts`, replace the fixed `CONSOLE_PIN_MAX_AGE_MS` used in `getConsolePinIn`'s elapsed check with `CONTROLLED_ENVIRONMENT ? SESSION_IDLE_LOCK_MS : CONSOLE_PIN_MAX_AGE_MS`. Import both from `@carbon/auth`. Keep the cookie `maxAge` on `setConsolePinIn` as-is (the manual elapsed check is the tightening point; a shorter maxAge would also work but the elapsed check is the defense-in-depth already there).+2. In `getEffectiveUser` (`auth.server.ts:190-194`), replace the literal `3600000` with `CONTROLLED_ENVIRONMENT ? SESSION_IDLE_LOCK_MS : 3600000` so the server-side effective-user resolution matches. Import `CONTROLLED_ENVIRONMENT` + `SESSION_IDLE_LOCK_MS`.+3. In `PinInOverlay.tsx`, use `useIdle` (enabled only when controlled + console) so that after 15 min idle the overlay re-appears (operator must re-PIN). If the existing overlay is already shown whenever no operator is pinned in, the tightened server expiry (steps 1–2) may be sufficient on the next navigation; add the client `useIdle` trigger so concealment is immediate rather than waiting for a request. If the existing pin-in display logic already reacts to "no pinned-in user", wire `isIdle` to force that state.+4. **Escape hatch:** if `CONTROLLED_ENVIRONMENT` / `SESSION_IDLE_LOCK_MS` cannot be imported into `console.server.ts` without a circular import, STOP and report — fall back to reading `SESSION_IDLE_LOCK_MS` via a small constant duplicated with a comment rather than breaking the build.++**Verify:**+```bash+pnpm exec turbo run typecheck --filter=mes+pnpm exec turbo run typecheck --filter=@carbon/auth+# Expected: both pass+```++**Out of scope:** Do not force the console DEVICE session to re-login (spec D8 — device exempt from the 12h cap; Task 4 already skips `authSession.console`). Do not change how PINs are stored/verified (`console.pin-in.tsx`).++---++## Task 10: Browser verification via `/test`++**Depends on:** Tasks 1–9+**Files:** none (verification only)++**Steps:**+1. This feature is gated on `CONTROLLED_ENVIRONMENT`, which is NOT set in normal local dev. To verify, boot the stack with `CONTROLLED_ENVIRONMENT=true` (via the `.env` `#force` escape hatch documented in `.claude/rules/environment-configuration.md`, so `crbn up` won't overwrite it), then run `/test`.+2. Verify against the spec Acceptance Criteria, at minimum:+ - Idle 15 min (temporarily lower `SESSION_IDLE_LOCK_MS` to ~30s for the test run, or drive via the hook) → lock overlay conceals content.+ - Active mouse/keyboard → never locks; leaving the tab idle with only background traffic → DOES lock (proves request-time is not the activity signal).+ - Unlock with a valid TOTP → resumes the same page; wrong code → stays locked.+ - `curl` with an idle-expired cookie → redirected to `/unlock`, no protected data.+ - Absolute cap → terminates to `/login` regardless of activity.+ - Cross-tab lock propagation.+ - `CONTROLLED_ENVIRONMENT` unset → no lock, identical to today.+ - MES console → pin-in re-PIN after idle; device not force-logged-out.+ - Capture agent-browser screenshots of the lock overlay + unlock for the PR (per the surface-designs-with-screenshots convention).+3. If the stack cannot boot with the controlled flag, the loop is BLOCKED (not done) — report per the loop-proof philosophy.++**Verify:**+```bash+# Full typecheck of touched packages + lint before calling done:+pnpm exec turbo run typecheck --filter=@carbon/auth --filter=@carbon/env --filter=erp --filter=mes+pnpm run lint+pnpm --filter @carbon/auth test+# Expected: all pass; acceptance criteria demonstrated in the browser with screenshots.+```++**Out of scope:** Do not restore any temporarily-lowered constant without noting it; ship the real 15 min / 12 h values.diff --git a/.ai/research/session-lock-timeout.md b/.ai/research/session-lock-timeout.mdnew file mode 100644index 0000000000..636ae2b33f--- /dev/null+++ b/.ai/research/session-lock-timeout.md@@ -0,0 +1,263 @@+# Session Lock & Termination Research: Best-Practice Survey++## Summary++Researched how to implement **session lock (NIST 800-171 3.1.10 / 800-53 AC-11)**+and **session termination (3.1.11 / AC-12)** for Carbon (React Router v7 ++Supabase-Auth cookie session), against three sources: the normative NIST/CMMC/DISA+control text, OWASP + comparable enterprise apps (AWS, Salesforce, Supabase,+HIPAA/EHR), and Carbon's actual session code.++**The two controls are distinct and BOTH are required** — lock ≠ termination is an+explicit assessment point. A **lock** (3.1.10) obscures the screen after inactivity,+*preserves* the session, and clears only on re-authentication. A **termination**+(3.1.11) ends the logical session on an org-defined condition (inactivity is the+condition assessors most expect; an absolute max-lifetime is a valid additional+condition but not separately mandated). Both must be **server-authoritative** — a+client-side idle timer is UX only and is a security anti-pattern as the boundary.++Carbon's constraint that shapes everything: the session is a **signed react-router+cookie wrapping GoTrue JWTs, with no server-side session store and no+created-at/last-active timestamp**. So idle + absolute enforcement means adding+timestamps to the `AuthSession` payload and checking them at the one always-run+choke point (`requireAuthSession`, called by `requirePermissions` on every+authenticated leaf loader/action). Supabase's own timebox/inactivity knobs are+Pro-tier and only bite at the ~50-min refresh boundary — too coarse — so the app+must own enforcement.++## Standards & Apps Surveyed++- **NIST SP 800-53 Rev 5 AC-11 / AC-11(1) / AC-12** + **800-171 Rev 2 §3.1.10 /+ §3.1.11** (Rev 3 renames 3.1.10 to "Device Lock") — the controls being satisfied.+- **DISA Application Security & Development STIG** (rule V-222389) — the only+ source giving a concrete web-app number: **15 min** idle.+- **CMMC 2.0 L2 Assessment Guide** (AC.L2-3.1.10 / 3.1.11) — how an assessor checks.+- **OWASP Session Management Cheat Sheet / ASVS 3.3** — idle vs absolute vs renewal+ timeout; server-side enforcement mandate.+- **AWS Console** (12h hard cap, 20-min SSM idle), **Salesforce** (15min–24h+ configurable, 2h default, warning dialog), **Supabase Auth/GoTrue** (timebox ++ inactivity session controls), **HIPAA/EHR** guidance (automatic logoff §164.312).+- **react-idle-timer** — the standard client idle-UX library (cross-tab support).++## Key Consensus Patterns++### 1. Lock and termination are separate controls; implement both++- **NIST**: AC-11 lock is "temporary… not an acceptable substitute for logging+ out"; AC-12 "terminates all processes associated with a user's logical session."+ You cannot satisfy 3.1.11 with a lock, or 3.1.10 with a logout.+- **Rationale**: 3.1.10 protects the *display* (someone walks up to an unattended+ screen); 3.1.11 protects the *session* (bounds how long an unattended or hijacked+ session stays usable). Different threats → both required.+- **Practical shape for a web app**: a short **idle lock** (obscure + re-auth to+ resume, session preserved) *layered over* a real **server-side session+ expiry/termination** (idle-terminate + optional absolute max-age → full re-login).++### 2. Idle threshold is org-defined; 15 min is the defensible default++- **NIST/CMMC**: the period is `[Assignment: organization-defined]`; the assessor+ checks that you *defined and enforce* a period, not a specific number. NIST's+ Discussion example is 5 min.+- **DISA STIG**: **15 min** for non-privileged web-app sessions (V-222389).+- **OWASP**: idle 2–5 min (high-value) to 15–30 min (low-risk); **absolute 4–8h**+ for a full-workday app. AWS caps at 12h; Salesforce defaults 2h.+- **Consensus default for a CUI ERP**: **idle 15 min**, **absolute ~8–12h**, with a+ **warning prompt** at ~50–90% of the idle window.++### 3. Server-authoritative enforcement; client is UX only++- **OWASP/ASVS**: "Session timeout… must be enforced server-side. If the client is+ used to enforce the session timeout… an attacker could manipulate these." A+ stolen token replayed against the API must be rejected server-side regardless of+ any client timer.+- **Standard split**: client (react-idle-timer) tracks real mouse/keyboard/touch/+ visibility → drives warning modal + lock overlay; server independently records+ session start + last-activity and rejects/refreshes based on them. AWS,+ Salesforce, EHRs all enforce server-side.++### 4. The lock is a pattern-hiding overlay cleared by re-authentication++- **AC-11(1)**: "Conceal… information previously visible on the display with a+ publicly viewable image" → a full-viewport overlay that removes CUI from view+ (blank/solid/clock), content not merely blurred-but-present in the DOM.+- **AC-11**: "Retain the device lock until the user reestablishes access using+ established identification and authentication procedures" → unlock requires+ **re-auth**, not just activity. A screensaver that doesn't force re-auth fails+ (explicit in HIPAA guidance too).++### 5. Absolute lifetime must be tracked independently of token refresh++- **The trap**: with rotating refresh tokens an active user mints new access tokens+ forever — sliding expiry never ends. Enforce an absolute cap by storing a+ **session-start timestamp** and, on every request/refresh, forcing full re-login+ when `now - sessionStart > absoluteMax`. Do not let refresh reset it.+- Many OIDC providers lack a built-in absolute knob (authentik, MS moved to+ Conditional Access sign-in-frequency); apps enforce it themselves. Auth0 exposes+ paired idle+absolute refresh expiry; AWS hard-caps at 12h.++### 6. Cross-tab coordination via BroadcastChannel++- Activity in any tab resets the shared idle timer; a lock/logout in one tab+ broadcasts and all tabs follow. Modern primitive is **BroadcastChannel** (Web+ Locks to elect one refresh leader). **react-idle-timer has this built in**+ (`crossTab`, `leaderElection`, auto broadcastChannel + localStorage fallback).++## Answers to Research Questions++1. **Do the controls mandate a specific idle duration?** No — org-defined. NIST+ example 5 min; DISA STIG 15 min for web apps; OWASP 15–30 min general. **Use 15+ min** as the controlled-environment default (documented, defensible).+2. **Lock overlay vs full logout; can logout satisfy 3.1.10?** 3.1.10 wants a+ *lock* — obscure + preserve + re-auth-to-unlock — and explicitly says a lock is+ "not a substitute for logging out." A full logout implements *termination*+ (3.1.11), not the lock. Need both.+3. **Does unlocking require re-authentication?** Yes — AC-11 requires re-establishing+ access via I&A procedures; activity alone must not clear the lock.+4. **What is 3.1.11 termination and what triggers it?** Terminating the logical+ session (kill processes/resources, new logon required) on an org-defined+ condition. Inactivity is the condition assessors most expect; absolute+ max-lifetime and time-of-day are valid additional conditions; only "define ≥1 and+ enforce it" is mandated.+5. **Lock vs termination normative distinction?** Yes: LOCK = inactivity/user-init,+ short-term, session preserved, cleared by re-auth. TERMINATION = defined+ condition, session ended, new logon required.+6. **Is OS device-lock enough for a remote browser session on CUI?** No — the+ server session stays open behind an OS lock. NIST allows OS- or app-level lock,+ but for a remote web session accessing CUI the **application** must implement the+ lock/timeout (why DISA STIG puts it on the app). OS lock complements, doesn't+ replace.+7. **How to enforce absolute lifetime with JWT refresh?** Store session-start+ independently; force re-login past the cap regardless of refresh. See Pattern 5.+8. **Multi-tab?** BroadcastChannel / react-idle-timer cross-tab. See Pattern 6.++## Carbon-Specific Constraints (from the code)++Grounded in `packages/auth/src/services/{session,auth,mfa}.server.ts`,+`packages/auth/src/types.ts`, the ERP/MES `x+/_layout.tsx` shells, and+`supabase/config.toml`.++1. **Session = signed react-router cookie wrapping GoTrue JWTs** — no server-side+ session store. `AuthSession` (`types.ts:3-19`) carries `accessToken`,+ `refreshToken`, `userId`, `companyId`, `expiresIn`, `expiresAt`, `mfaVerified` —+ **no `createdAt`/`lastActiveAt`**. Both timeouts require adding timestamp fields+ and stamping them on the login/MFA/refresh mint paths.+2. **`expiresAt`/`expiresIn` track only JWT expiry (≤50 min) and `refreshAuthSession`+ silently rotates tokens** (`session.server.ts:319-370`) — token expiry cannot+ stand in for session age. Absolute age must be tracked independently or it resets+ on every refresh. Refresh only preserves `console`/`mfaVerified`+ (`session.server.ts:332-337`) — added stamps need explicit preserve/update.+3. **`requireAuthSession` (`session.server.ts:285-317`) is the one always-run choke+ point** — called by `requirePermissions` (`auth.server.ts:332`) on every+ authenticated leaf loader/action. It already computes expiry and can+ `throw redirect`. This is where server-authoritative idle/absolute checks belong.+4. **The API-key path never validates a session** (`auth.server.ts:219-330`) — a+ timeout gate must sit on the session path only (machine callers are exempt by+ nature).+5. **The shell loader is skipped on search-param-only navigations**+ (`x+/_layout.tsx:84-114` `shouldRevalidate`) — a gate placed *only* in the shell+ misses cheap same-pathname navigations/realtime revalidations. Put enforcement in+ `requireAuthSession`; use the shell only for the blocking lock *screen*.+6. **MFA gives the unlock precedent.** `/mfa` (`_public+/mfa.tsx`) ++ `completeMfaChallenge` (`session.server.ts:138-202`) re-establish trust by+ **rotating tokens in the existing `carbon` cookie without destroying it** — the+ only existing "re-auth into an existing session" flow. The pending-MFA state uses+ a **separate cookie key** (`MFA_SESSION_KEY = "mfa"`) to represent+ "authenticated-but-must-complete-a-challenge" — the same shape a lock state can use.+7. **`requireMfa`-under-CONTROLLED_ENVIRONMENT is the exact pattern to mirror.** ERP+ shell: `const mfaRequired = CONTROLLED_ENVIRONMENT || companySettings.requireMfa`+ → server-decided flag → **blocking screen `MfaEnrollmentRequired` rendered in+ place of the shell `Outlet`, never a redirect** (`x+/_layout.tsx:249-257,+ 393-411`). MES mirrors it with a console exemption. `userHasVerifiedTotpFactor`+ **fails closed** under `CONTROLLED_ENVIRONMENT` (`mfa.server.ts:96`). The lock+ screen mirrors this blocking-screen shape (so escape-hatch API routes stay+ reachable).+8. **Client scaffolding exists but no idle detection.** `CarbonProvider`+ (`provider.tsx`) has a `visibilitychange` refresh hook (`:63-85`) and a 60s+ `useInterval` that reloads once `expiresAt` passes (`:87-105`) — reusable hooks —+ but **no `react-idle-timer`** and no lock overlay. `@carbon/react` has+ `Modal`/`Drawer`; the strongest lock precedent is the MFA/ITAR blocking screen.+9. **Supabase does not enforce anything here.** `config.toml`: `jwt_expiry = 3000`+ (50 min), refresh rotation on, reuse interval 10s; **no timebox/inactivity_timeout+ set** (those are Pro-tier and only bite at the refresh boundary anyway). Clients+ are `autoRefreshToken:false, persistSession:false` — the app cookie is the sole+ session authority. So the app owns idle + absolute enforcement entirely.+10. **Current outer bound is a rolling 7-day cookie `maxAge`** (`SESSION_MAX_AGE`,+ re-committed on every `setAuthSession`) — a client-side rolling lifetime, not a+ server-enforced absolute cap.++## Recommended Approach for Carbon (feeds the spec)++Follows the layered model (OWASP/HIPAA) mirrored onto Carbon's MFA pattern:++1. **Gate on `CONTROLLED_ENVIRONMENT`** (optionally OR a future+ `companySettings.sessionTimeout` opt-in, mirroring `requireMfa`). Non-controlled+ deployments keep today's behavior.+2. **Add `createdAt` (session start) and `lastActiveAt` to `AuthSession`**; stamp+ `createdAt` at login/MFA mint (preserve across refresh), update `lastActiveAt` on+ activity. These are the two facts server enforcement needs.+3. **Server-authoritative enforcement in `requireAuthSession`** (the always-run+ point):+ - **Idle termination (3.1.11)**: `now - lastActiveAt > IDLE_LIMIT` (default 15+ min) → terminate the session (full logout) → redirect to login. This is the+ hard boundary.+ - **Absolute termination (3.1.11)**: `now - createdAt > ABSOLUTE_LIMIT` (default+ ~12h) → terminate → full re-login. Independent of refresh.+4. **Session lock (3.1.10) as the UX layer that satisfies pattern-hiding + re-auth**:+ a client idle detector (react-idle-timer, cross-tab) shows a **warning** near the+ idle limit, then a **full-screen lock overlay** (blocking-screen pattern, content+ removed from view). Unlock = **re-authenticate** via the MFA-style token-rotation+ flow into the *same* cookie when still within the server idle window; if the+ server idle/absolute limit already passed, the server has terminated it and the+ overlay's unlock falls through to full login.+ - Decision to resolve in the spec: lock-then-terminate (grace: lock at 15 min,+ terminate at e.g. 15 min + short grace) vs terminate-at-idle-with-lock-as-warning.+ NIST wants *both* a lock and a termination, so the clean model is **lock at the+ idle threshold, terminate at idle+grace and at the absolute cap**.+5. **Configurable, documented values** as named constants (like MFA/`CONTROLLED_+ ENVIRONMENT`), defaults idle 15 min / absolute 12h / warning at ~13 min — recorded+ in the security plan.+6. **Reuse, don't reinvent**: unlock via the `completeMfaChallenge`+ token-rotation-in-place mechanism; lock screen via the MFA/ITAR blocking-screen+ shape; client timers via the existing `CarbonProvider` interval/visibility hooks ++ react-idle-timer.++## Open Questions to carry into the spec++- **Idle → lock vs idle → terminate**: does the idle threshold *lock* (re-auth to+ resume, session preserved) with a separate longer *terminate*, or terminate at+ idle with the lock as a pre-warning? (NIST wants both a lock and a termination —+ recommend lock at threshold, terminate at threshold+grace and at absolute cap.)+- **Unlock credential**: MFA/TOTP re-challenge (reuses `completeMfaChallenge`+ cleanly, but only users with a factor) vs a password/magic-link re-auth vs+ passkey. What is the unlock proof for a controlled-env user (who is MFA-enrolled+ by force anyway)?+- **Configurability**: fixed policy constants vs per-company admin settings (like+ `requireMfa`). Controlled-env forces on regardless.+- **Exact defaults**: idle 15 min (DISA) confirmed? absolute 8h vs 12h (OWASP vs+ AWS)? warning lead time?+- **MES shop-floor exemption**: console/kiosk mode is MFA-exempt today+ (`mes x+/_layout.tsx:177-182`). Does idle-lock apply to console/kiosk sessions, or+ are shared shop-floor stations exempt/handled differently?+- **Scope of enforcement point**: `requireAuthSession` covers ERP + MES leaf loaders+ and API (non-key) routes uniformly — confirm that's the intended blast radius.++## Sources++- https://csf.tools/reference/nist-sp-800-53/r5/ac/ac-11/+- https://csf.tools/reference/nist-sp-800-53/r5/ac/ac-12/+- https://csf.tools/reference/nist-sp-800-171/r2/3-1/3-1-10/+- https://csf.tools/reference/nist-sp-800-171/r2/3-1/3-1-11/+- https://csf.tools/reference/nist-sp-800-171/r3-0/03-01/03-01-10/+- https://grcacademy.io/cmmc/controls/ac-l2-3-1-10/+- https://redspin.com/blog/commonly-confused-nist-sp-800-171-requirements/+- https://dodcio.defense.gov/Portals/0/Documents/CMMC/AssessmentGuideL2v2.pdf+- https://www.stigviewer.com/stig/application_security_and_development/ (rule V-222389, 15 min)+- https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html+- https://owasp-aasvs.readthedocs.io/en/latest/requirement-3.3.html+- https://supabase.com/docs/guides/auth/sessions+- https://idletimer.dev/docs/features/cross-tab+- https://www.npmjs.com/package/react-idle-timer+- https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html+- https://help.salesforce.com/s/articleView?id=sf.security_overview_sessions.htm+- https://www.accountablehq.com/post/hipaa-automatic-logoff-requirements-and-best-practices+- https://guptadeepak.com/ciam-compass/guides/token-lifetime-best-practices/diff --git a/.ai/runs/2026-08-17-session-lock-timeout.md b/.ai/runs/2026-08-17-session-lock-timeout.mdnew file mode 100644index 0000000000..cf6c9ba84c--- /dev/null+++ b/.ai/runs/2026-08-17-session-lock-timeout.md@@ -0,0 +1,58 @@+# Feature run: Session lock/timeout under CUI (NIST 800-171 3.1.10 / 3.1.11)++- Date: 2026-08-17+- Mode: approval-per-phase+- Request: "let's get started on session/lock timeout. treat this like a /feature" —+ Session lock/timeout under CUI for NIST 800-171 3.1.10 (session lock) and 3.1.11+ (session termination): controlled-environment idle lock + absolute session+ termination, mirroring the existing requireMfa / CONTROLLED_ENVIRONMENT gating.+- Phase plan: research [run — security-critical, implementation model is open] ·+ spec [run — touches auth/session, security contract, will have OQs] · plan [run] ·+ execute [run] · test [run — user-facing lock/re-auth flow] · self-review [run]++## Decisions+Steer from user: "as lenient as humanly possible while still remaining compliant."+Open Questions resolved (approval mode, human-decided) — 2026-08-17:+- OQ1 idle behavior: **idle → resumable LOCK only** (session preserved, re-auth to+ resume, no idle-logout). 3.1.10 satisfied by the lock; 3.1.11 satisfied by the+ ABSOLUTE cap + explicit logout (inactivity-termination is an NIST example, not a+ mandate). Most lenient compliant split.+- OQ2/OQ5 unlock credential: **console mode → PIN; all other (ERP + non-console MES)+ → TOTP re-challenge** via completeMfaChallenge rotation. (User: "for the MES — pin+ unlock in console mode — totp if not.")+- OQ3 config: **force-on under CONTROLLED_ENVIRONMENT only**; non-controlled+ deployments unaffected (mirror requireMfa).+- OQ4 defaults: idle-lock **15 min** (DISA web-app ceiling), absolute cap **12h**+ (AWS workday). Pre-lock warning modal OPTIONAL (lock is now non-destructive).+- OQ6 blast radius: enforce in **requireAuthSession** (ERP+MES interactive sessions);+ **API-key machine callers exempt**.+- NEW (surfaced in spec design) — MES console device absolute cap: **A, exempt the+ console DEVICE login from the 12h absolute termination**; console "lock" = existing+ pin-in dropping to re-PIN, tightened to 15 min under CONTROLLED_ENVIRONMENT. ERP ++ non-console MES get full model (15-min TOTP lock + 12h absolute termination).+ (User: "a".)+- Design-settled (codebase precedent, documented in spec, not user-gated):+ activity signal = throttled CLIENT heartbeat (not server request-time, which the+ 60s CarbonProvider poll + realtime revalidations would falsely register as active);+ createdAt/lastActiveAt live in the signed session cookie; unlock via dedicated+ /unlock route; NO new dependency — small in-house useIdle hook + BroadcastChannel+ (respects ask-first-on-deps).++## Phase log+- research: DONE → .ai/research/session-lock-timeout.md (NIST/CMMC + OWASP/apps + Carbon code, 3 subagents). Key: lock (3.1.10) ≠ termination (3.1.11), both required; 15-min idle (DISA), ~8–12h absolute (OWASP/AWS); server-authoritative in requireAuthSession; add createdAt/lastActiveAt to AuthSession; unlock via MFA token-rotation precedent; mirror requireMfa/CONTROLLED_ENVIRONMENT blocking-screen.+- spec: DONE → .ai/specs/2026-08-17-session-lock-timeout.md (all 6 OQs + 1 new OQ+ resolved with user before writing; 11 design decisions D1–D11; no migration —+ two optional AuthSession cookie fields).+- plan: DONE → .ai/plans/2026-08-17-session-lock-timeout.md (10 tasks). 🛑 plan-approved+ by user 2026-08-17 ("/execute"). Task 8 v1 confirmed: overlay conceals + funnels to+ /unlock (OTP form on the route, not embedded) — pending any user tweak.+- Set CONTROLLED_ENVIRONMENT=true in .env (gitignored; line 114) so the gated feature+ is testable in Task 10 (needs dev-server reboot to take effect).+- execute: Tasks 1–9 DONE + committed (c76e15e4c, 2c3337ee6, 9e47eaac6, 9fb42cbf3,+ db4a4cd5d, d66045d3b, 350236cb3, bb00c4dd8, 5939bb898). Typecheck (auth/env/erp/mes)+ green, lint green, 24 auth unit tests pass. Task 10 (browser /test) pending user go —+ needs stack reboot with CONTROLLED_ENVIRONMENT=true.+- (pending) test (Task 10) — user asked to surface before browser phase++## Outcome+- (pending)diff --git a/.ai/runs/2026-08-18-nist-1a2-permission-audit.md b/.ai/runs/2026-08-18-nist-1a2-permission-audit.mdnew file mode 100644index 0000000000..0e00871271--- /dev/null+++ b/.ai/runs/2026-08-18-nist-1a2-permission-audit.md@@ -0,0 +1,54 @@+# Run: NIST 1A.2 — Permission/role-change audit events (3.3.1/3.3.2)++Branch: `feat/nist-1a2-permission-audit` (base `nist-800-110-audit`)+Mode: fully autonomous — plan → execute → self-review (research/spec/grill skipped; design pre-resolved in plan §1A.2)++## Goal+Emit structured audit events (actor, target user, before/after permission set, companyId)+on permission/role mutations that today emit nothing.++## Design (grounded)+- Extend `packages/auth/src/services/auth-events.server.ts` `AuthEvent` union with+ `permission_changed` + `role_changed`. Add two typed helpers `logPermissionChange` /+ `logRoleChange` and a pure `grantedPermissionKeys(permissions, companyId)` summariser.+- Thread acting `userId` (actor) through the service-role write paths:+ - `deactivate{User,Employee,Customer,Supplier}` in `users.server.ts` gain optional `actorId`;+ each concrete deactivation emits `role_changed` (role → null) with the before/after+ permission summary for the company.+ - `carbon/update-permissions` + `carbon/user-admin` (deactivate) event payloads gain optional+ `actorId` (`packages/lib/src/events.ts`); ERP routes `bulk-edit-permissions.tsx`,+ `deactivate.tsx`, `revoke-invite.tsx` pass the acting `userId`.+ - `updatePermissions` job snapshots the before-set and emits `permission_changed`.+- Export `@carbon/auth/auth-events.server` subpath so the jobs package can import the emitter.++## TDD+- `packages/auth/src/services/auth-events.server.test.ts` — red→green: `grantedPermissionKeys`+ purity + `logPermissionChange`/`logRoleChange` payload shape (mock `@carbon/logger`).++## Gates+- `pnpm exec turbo run typecheck --filter=@carbon/auth --filter=erp --filter=@carbon/jobs`+- `pnpm run lint`+- `pnpm --filter @carbon/auth test`++## Additional path covered (analogous, not gold-plating)+- ERP single-user permission edit: `updateEmployee`/`updatePermissions` in+ `apps/erp/app/modules/users/users.server.ts` (route `employees.$employeeId.tsx`) — same+ class of `userPermission` write as the bulk path; emits `permission_changed` with actor.++## Deliberate scope boundaries (NOT emitting)+- Invite self-activation (`setUserPermissions` via invite acceptance): actor == target,+ permissions pre-approved by an admin at invite-creation time; a lifecycle event, not an+ admin permission mutation.+- `employeeTypePermission` role-template writes (employee-types route): role DEFINITION+ config, different shape, not a per-user grant; would need separate modeling.++## Status+- [x] tests written + green (`packages/auth/src/services/auth-events.test.ts`, 7 new)+- [x] implementation (emission wired into all named paths + analogous single-user path)+- [x] gates pass — typecheck (@carbon/auth, @carbon/jobs, erp, @carbon/lib), lint (33/33),+ auth tests (30 passed)+- [x] self-review + PR++## UNVERIFIED (environment cannot prove)+- Runtime/DB/browser emission (no stack booted): the actual CloudWatch/JSONL lines are not+ observed. Proven only by unit tests + typecheck.diff --git a/.ai/runs/2026-08-18-nist-2.1-login-lockout.md b/.ai/runs/2026-08-18-nist-2.1-login-lockout.mdnew file mode 100644index 0000000000..2f4578f830--- /dev/null+++ b/.ai/runs/2026-08-18-nist-2.1-login-lockout.md@@ -0,0 +1,34 @@+# Run: NIST 2.1 — Per-account failed-login lockout (3.1.8)++- Branch: `feat/nist-2.1-login-lockout` (base `nist-800-110-audit`)+- Mode: FULLY AUTONOMOUS `/feature` — plan → execute → self-review (research & grill skipped; design pre-resolved in `.ai/plans/2026-08-15-nist-800-171-app-remediation.md` §2.1)+- Autonomy: no human gates; gated PR is the supervision point.++## Grounding (verified in code)+- ERP `apps/erp/app/routes/_public+/login.tsx` L94-110: IP-only sliding-window rate-limit+ (`Ratelimit.slidingWindow(RATE_LIMIT, "1 h")`, key = `ip`), emits `login_rate_limited`.+- MES `apps/mes/app/routes/_public+/login.tsx` L79-94: same IP-only limit, no auth-event logging at all.+- `@carbon/kv` exports `Ratelimit` (upstash-compatible, ioredis) + `redis`. `Duration` type available.+- `logAuthEvent` + `AuthEvent` union in `packages/auth/src/services/auth-events.server.ts`; re-exported via `@carbon/auth/auth.server`.+- `redis` client is ioredis `Redis` (supports incr/expire/pttl/set EX/del).++## Design (resolved)+- New `@carbon/kv` module `src/lockout/` — email-keyed lockout layered ON TOP of the IP limit (additive).+ - Pure, TDD'd helpers: `normalizeLoginIdentifier`, `lockDurationSeconds` (exponential backoff, capped), `evaluateLockout`.+ - `AccountLockout` class: `status()` (read lock TTL), `recordFailure()` (count via `Ratelimit.slidingWindow`;+ engage/extend exponential lock when window exceeded), `reset()`.+- New auth event `login_locked` added to `AuthEvent` union (+ failure classification). Closes 1A.1 "no lockout event".+- Wire into ERP + MES login actions: check `status` (block early), else `recordFailure` (block on tip-over),+ generic non-enumerating message, emit `login_locked`. IP limit and all existing behavior preserved.++## Progress+- [x] Ground in real code+- [x] Red→green unit tests for pure helpers + class+- [x] `login_locked` event+- [x] ERP wiring+- [x] MES wiring+- [x] Scoped typecheck / lint / tests+- [ ] Runtime/browser proof (UNVERIFIED — needs running stack + redis)++## Gates+- see final reportdiff --git a/.ai/specs/implemented/2026-08-15-integration-secret-encryption.md b/.ai/specs/implemented/2026-08-15-integration-secret-encryption.mdnew file mode 100644index 0000000000..62bdba92de--- /dev/null+++ b/.ai/specs/implemented/2026-08-15-integration-secret-encryption.md@@ -0,0 +1,124 @@+# Integration Secret Encryption via Supabase Vault++Status: IMPLEMENTED 2026-08-18 (1C.1/1C.2/1C.3 — verified in the NIST audit; plan at+`.ai/plans/implemented/2026-08-16-integration-secret-encryption.md`). Residual deploy-+ordering + stale-comment notes live in `.ai/plans/2026-08-15-nist-800-171-app-remediation.md`.++Moves third-party integration credentials out of the plaintext+`companyIntegration.metadata` JSON column into encrypted storage, closing NIST+800-171 **3.13.16 (SC-28, confidentiality of CUI at rest)**. Item **1C** of+`.ai/plans/2026-08-15-nist-800-171-app-remediation.md`.++## Problem++`companyIntegration.metadata` (`20240119095150_integrations.sql`) is a single+`JSON` column holding, per company + integration, a **mix** of:+- **secrets** — OAuth access/refresh tokens, `apiKey`, `client_secret`, webhook+ secrets (Xero, QuickBooks Online, Rillet, Jira, Linear, Slack, OnShape,+ exchange-rates).+- **non-secret config** — `tenantId`, `tenantName`, sync direction, entity/account+ mappings, `providerMetadata`.++Exposure: RLS grants `SELECT` to any employee with `settings_view`+(`20240119095150_integrations.sql`, still the deprecated `has_role`/+`has_company_permission` pattern), so integration secrets are readable in cleartext+by any settings-viewer and sit unencrypted at the application layer (protected only+by Postgres-at-rest). A leaked DB dump or an over-broad settings role exposes live+third-party credentials.++Constraints discovered:+- A `verify_integration()` trigger validates the whole `metadata` blob against a+ per-integration `jsonschema` when `active=true` — moving fields out requires the+ schemas to change too.+- OAuth providers **refresh tokens** and write them back to metadata — the encryption+ path is write-hot, not read-only.+- The accounting module already has a credentials abstraction+ (`parseStoredCredentials`, `packages/ee/src/accounting/core/models.ts`); other+ integrations (linear/jira/slack/onshape) read `metadata` raw.++## Resolved decisions++- [x] **D1 — Encryption mechanism.** **Supabase Vault (`vault.secrets`).**+ `companyIntegration` keeps only a vault secret reference; ciphertext lives in the+ `vault` schema; decryption via `vault.decrypted_secrets`, readable only by+ `service_role`/postgres. Rationale: `supabase_vault`/`pgsodium` already preloaded;+ `vault-enc-key` already an infra concern (rotation doesn't touch app code); keeps+ the decrypt boundary at `service_role`, which every EE provider already uses.+ Tradeoff accepted: the settings UI must be reworked to never receive the secret.++## Resolved decisions (continued)++- [x] **D2 — Granularity.** **Secret-field split.** Only genuinely-secret fields+ (tokens, `apiKey`, `client_secret`, webhook secrets) move to vault; non-secret+ config (`tenantId`, `tenantName`, `syncDirection`, entity/account mappings,+ `providerMetadata`) stays in the plaintext `metadata` column. The secret-key set+ is declared in a **centralized, reviewable `SECRET_KEYS` map keyed by integration+ id** (not scattered per call site). Rationale: UI/sync read non-secret config+ constantly (avoids a vault decrypt per list render, keeps the RLS user client+ serving config), preserves `verify_integration` validation of the config+ remainder, mirrors the accounting module's existing `providerMetadata` vs+ credentials boundary. Risk accepted: a field mis-classified as non-secret leaks —+ mitigated by the single reviewable map.+- [x] **D3 — jsonschema reconciliation.** **Rewrite each integration's `jsonschema`**+ (one new idempotent migration `UPDATE`-ing the ~10 `integration.jsonschema` rows —+ NOT editing historical migrations) to describe only the non-secret config+ remainder; drop secret properties from `properties`/`required`. Secret *presence*+ is enforced in the app: zod on the credential form + a service-role check that the+ vault reference exists before flipping `active=true`. `verify_integration` stays,+ guarding config integrity.+- [x] **D4 — Read access model + reveal.** Secrets are read only through one+ server helper `getIntegrationSecret(companyId, integrationId, key)` (service-role);+ never decrypted in a loader that serializes to the browser; not cached in app+ memory. The settings UI shows non-secret config + a **masked** secret+ (`sk_live_••••4821`) by default. An explicit **Reveal** action calls a+ permission-gated service-role endpoint that returns plaintext on demand and+ **writes an audit event ("viewed integration secret": actor, integration, when)**.+ Users can see and edit their key; access is deliberate and accountable (AU-3).+ - **D4a — Anti-overwrite save semantics (critical).** The masked display value+ MUST NEVER be written back as the secret. Rules:+ (1) the secret input is dirty-tracked; on save the secret is written to vault+ **only if the field was actually changed by the user** — an untouched field+ (whether still masked or revealed-but-unedited) omits the secret from the update+ payload, leaving the vault secret unchanged;+ (2) the server-side update helper additionally **rejects/ignores a submitted+ secret equal to the mask sentinel** as a belt-and-suspenders guard;+ (3) prefer an explicit `secretChanged` flag over string comparison — never infer+ "unchanged" from the value alone.+ This is the one place the whole design can silently corrupt a live credential.+ - **D4b — Reveal/edit gate.** `settings_update` (same as editing), always+ audited; under `CONTROLLED_ENVIRONMENT` a reveal additionally re-challenges MFA.+ Rationale: whoever can rotate the credential can already obtain it, so a stricter+ view-gate adds friction without protection — accountability comes from the audit+ event.+- [x] **D5 — Write path & vault lifecycle.** **One vault secret per+ `(companyId, integrationId)`** holding a JSON object of all that integration's+ secret fields. **Deterministic name** `integration:{companyId}:{integrationId}` →+ writes are an idempotent **upsert** (token refresh updates in place, never creates+ a new secret; no orphan accumulation). Reference stored in a **new+ `companyIntegration.secretRef` column** (a real column, NOT in the `metadata` JSON+ the jsonschema validates / the RLS user client serves). Helpers (service-role):+ `getIntegrationSecret`, `putIntegrationSecret` (upsert), `deleteIntegrationSecret`.+ **Cleanup:** a DB trigger on `companyIntegration` DELETE drops the paired+ `vault.secrets` row (vault rows don't cascade on their own) — no orphan-sweep job.+- [x] **D6 — Scope.** **All providers, single backfill.** Implementation may land+ accounting-first behind the shared helpers, but the spec's exit criterion is+ **zero plaintext secrets across every integration** (Xero, QBO, Rillet, Jira,+ Linear, Slack, OnShape, exchange-rates, Resend, …). Any integration still reading a+ raw secret from `metadata` is a release blocker — 3.13.16 does not half-close.+- [x] **D7 — Backfill mechanism.** **Hybrid.** DDL via migrations (add `secretRef`+ column, rewrite the ~10 `integration.jsonschema` rows, add the delete trigger); the+ **data movement is an idempotent app-level backfill** reading the single TS+ `SECRET_KEYS` map via a service-role client (run as a deploy step like `seed.ts`).+ Keeps the secret-key classification in ONE place (SQL/TS drift can't leak or corrupt+ a field). **Transitional read-fallback:** `getIntegrationSecret` returns the vault+ value when `secretRef` is set, else falls back to legacy plaintext `metadata` — so+ providers work before/during/after backfill (mirrors `normalizeStoredCredentials`).+ The plaintext **scrub is the final step** of the same release, once reads are+ confirmed on vault; the transitional fallback is then removed.+- [x] **D8 — Vault-unavailable failure mode.** **Fail closed.** `getIntegrationSecret`+ raises a typed `IntegrationSecretUnavailableError` (never returns empty that a+ provider might read as "no auth"). Sync jobs surface it, retry via Inngest, and emit+ an alert metric (Phase-4 monitoring). Reveal shows an error, no crash. After scrub+ there is deliberately no plaintext fallback — a vault failure fails loudly rather+ than degrading silently. (Contrast the MFA fail-OPEN being closed in plan item 2.4 —+ here there is no "proceed" branch to protect.)diff --git a/.ai/specs/implemented/2026-08-16-remove-global-permission-wildcard.md b/.ai/specs/implemented/2026-08-16-remove-global-permission-wildcard.mdnew file mode 100644index 0000000000..8d4a0ab024--- /dev/null+++ b/.ai/specs/implemented/2026-08-16-remove-global-permission-wildcard.md@@ -0,0 +1,73 @@+# Remove the `"0"` Global-Company Permission Wildcard++Status: IMPLEMENTED 2026-08-18 (2.8 — commit `0cbaf1390`, verified in browser `ba340f2d9`)++Removes the `"0"` sentinel that grants a permission across ALL companies (present+and future) from Carbon's authorization layer. NIST 800-171 **3.1.5 (least+privilege)** hardening; item **2.8** of `.ai/plans/2026-08-15-nist-800-171-app-remediation.md`.+Decision confirmed by the user: "we don't use it."++## Problem++A permission array in `userPermission.permissions` (or an `employeeTypePermission`+column) containing `"0"` is interpreted as "granted for every company." It is a+broad-grant primitive the audit flagged under AC-6, and it auto-covers+future-created companies — exactly the over-broad grant an assessor dislikes.++## What actually interprets `"0"` (grounded recon 2026-08-16)++- **DB (2 functions):** `has_company_permission(claim, company)` (latest def+ `20241210140215_rls-performance.sql:12`, the `ELSIF '0' = ANY(...)` branch) and+ `get_companies_with_employee_permission(permission)` (latest def+ `20260219162954_api-key-scopes-rate-limits.sql:280`, the `IF ... '0'::text = ANY`+ expand-to-all-employee-companies block at ~line 328).+- **`get_claims(uid, company)` is transport, not interpreter** — returns the raw+ `userPermission.permissions` JSONB; no `"0"` logic. **No change.** Same for+ `get_companies_with_employee_role()`.+- **`is_claims_admin()`** (`20230123004206_claims.sql:3`, only def) gates+ `updatePermissions` via `has_company_permission('update_users','0')` = "must be a+ global user-admin." It takes **no company arg**.+- **App (10 sites):** `auth.server.ts:364`; six in `users.server.ts`+ (`makeCompanyPermissionsFromClaims` 1164/1169/1174/1179,+ `makeCompanyPermissionsFromEmployeeType` 1279/1282/1285/1288);+ `usePermissions.tsx:29`; `search.tsx:63`; workflow `$id.test-run.tsx:192`;+ `owner.ts:83`.+- **`is_claims_admin` callers (2, both with `companyId` in scope, none in SQL):**+ `apps/erp/app/modules/users/users.server.ts:1441` and+ `packages/jobs/src/inngest/functions/tasks/update-permissions.ts:53`.+- **No seed grants `"0"`.** After removal a residual `"0"` **fails closed** (grants+ nothing; no cross-tenant leak) — so the only risk is a lockout, prevented below.++## Resolved decisions++- [x] **D1 — Expand-then-drop (safe-by-construction).** One atomic migration:+ FIRST rewrite any residual `"0"` grant to explicit company IDs, THEN redefine the+ functions to stop interpreting `"0"`. No-op if truly unused; no lockout if not.+ (Live data unverifiable this session — stack down, MCP needs auth — so correctness+ must not depend on the "we don't use it" claim.)+- [x] **D2 — `is_claims_admin(company text)` (per-company, option B).**+ `DROP FUNCTION is_claims_admin()`; create `is_claims_admin(company text)` →+ `has_company_permission('update_users', company)`. Both call sites pass the+ `companyId` already in scope. It is the sole authZ before a service-role write, so+ tighten (per-company) rather than loosen (any-company). Rejected: `has_any_company_permission`.+- [x] **D3 — Expansion targets (behavior-preserving).**+ `userPermission.permissions`: each array containing `"0"` → the user's+ `userToCompany` company IDs (**any role** — covers both the employee-RLS path,+ which re-filters to employees, and the portal path). Empty membership → `"0"`+ simply removed (fails closed; the user had no real access anyway, since RLS+ requires a `userToCompany` row). `employeeTypePermission.{create,update,view,delete}`:+ `array_replace('0' → employeeType."companyId")` (each type belongs to one company).+- [x] **D4 — Reject `"0"` going forward.** The two `updatePermissions` writers strip+ `"0"` from every array before persisting, so the authoritative `userPermission`+ table can never hold `"0"` again (the UI never produces it; the only source is a+ hand-authored `employeeTypePermission` passed through `makePermissionsFromEmployeeType`).+- [x] **D5 — One migration, ordered, `NOTIFY pgrst`.** data-expand → redefine+ functions → `NOTIFY pgrst, 'reload schema'` (the new `is_claims_admin` signature+ must be reloaded, per the migrate-append lesson).++## Out of scope++- `get_claims`, `get_companies_with_employee_role` — no `"0"`; untouched.+- Removing the deprecated `has_company_permission` helper — still used by+ supplier/customer-portal RLS; only its `"0"` branch is dropped.+- Migrating portal RLS off the deprecated helper (separate cleanup).diff --git a/.ai/specs/implemented/2026-08-17-session-lock-timeout.md b/.ai/specs/implemented/2026-08-17-session-lock-timeout.mdnew file mode 100644index 0000000000..f1c9c091c6--- /dev/null+++ b/.ai/specs/implemented/2026-08-17-session-lock-timeout.md@@ -0,0 +1,294 @@+# Session Lock & Session Termination under CUI (NIST 800-171 3.1.10 / 3.1.11)++> Status: IMPLEMENTED 2026-08-18 (3.1.10/3.1.11 — commits `c76e15e4c`→`c7a076477`).+> Residual: browser-verification (`/test`) + passkey-unlock addition tracked in+> `.ai/plans/2026-08-15-nist-800-171-app-remediation.md`.+> Author: Brad Barbin (with Claude)+> Date: 2026-08-17++## TLDR++Add an **idle session lock** and an **absolute session-lifetime termination** to+Carbon, gated on `CONTROLLED_ENVIRONMENT` (ITAR/CUI), mirroring the existing+`requireMfa` + blocking-screen pattern. After 15 minutes of inactivity a+full-screen **lock** conceals the screen and requires **re-authentication** to+resume — the session and in-progress work are preserved (NIST 3.1.10 / AC-11). A+hard **12-hour** cap since session start **terminates** the session and forces a+full re-login regardless of activity (NIST 3.1.11 / AC-12). Enforcement is+**server-authoritative** in `requireAuthSession` (the one always-run choke point),+driven by two new timestamps (`createdAt`, `lastActiveAt`) on the signed session+cookie; a small in-house client idle hook drives the lock UX and a throttled+activity heartbeat. Non-controlled deployments are unaffected. MES console+(shared-kiosk) sessions lock the operator **pin-in** (re-PIN) instead of using+TOTP, and the console *device* login is exempt from the 12-hour cap.++Research: [.ai/research/session-lock-timeout.md](../research/session-lock-timeout.md).++## Problem Statement++Carbon has no session lock and no absolute session-lifetime cap. Today:++- The only outer bound is a **rolling 7-day cookie `maxAge`** (`SESSION_MAX_AGE`),+ re-committed on every request — a client-side rolling lifetime, not a+ server-enforced cap. An active user's refresh token rotates indefinitely, so a+ session can live effectively forever (`session.server.ts` `refreshAuthSession`).+- There is **no inactivity lock**: an unattended browser on a shop floor or desk+ keeps CUI on screen and the session fully usable.+- Supabase's own timebox/inactivity controls are Pro-tier and only bite at the+ ~50-minute JWT-refresh boundary — too coarse, and not configured+ (`config.toml`: no `sessions.timebox`/`inactivity_timeout`).++For a controlled (ITAR/CUI) deployment this fails two NIST 800-171 controls:++- **3.1.10 Session Lock (AC-11 / AC-11(1))** — initiate a session lock after an+ organization-defined period of inactivity; conceal previously visible+ information; retain the lock until the user re-establishes access via+ identification & authentication procedures. (A lock is *not* a substitute for+ logging out; it preserves the session.)+- **3.1.11 Session Termination (AC-12)** — automatically terminate a user session+ after an organization-defined condition. Lock ≠ termination — an assessor checks+ for both.++## Proposed Solution++Layer two mechanisms, both gated on `CONTROLLED_ENVIRONMENT`, both enforced+server-side, so the app is the authority (not client JS):++1. **Idle lock (3.1.10)** — at **15 min** of no *real user activity*, conceal the+ screen with a full-screen lock overlay and require re-authentication to resume.+ The session/cookie is **preserved** — no work lost. This is the leniency-max+ choice: idle never *logs you out*, it only locks.+2. **Absolute termination (3.1.11)** — **12 h** since session start (`createdAt`)+ terminates the session (destroy cookie → full login), independent of activity+ and independent of token refresh. This is the required termination condition;+ explicit logout is the other.++Both thresholds are named constants, force-on under `CONTROLLED_ENVIRONMENT`, and a+no-op otherwise (mirrors `requireMfa`).++### Where enforcement lives++`requireAuthSession` (`packages/auth/src/services/session.server.ts:285-317`) is the+single point called by `requirePermissions` on **every authenticated leaf+loader/action** in both apps. It already computes expiry and can `throw redirect`.+The two checks slot in there, after the existing token-refresh + MFA re-check:++- **Absolute**: `now - authSession.createdAt > SESSION_ABSOLUTE_MAX_MS` →+ `destroyAuthSession` → `/login` (a *termination*). Console device sessions+ (`authSession.console` set) are **exempt** (decision D8).+- **Idle**: `now - authSession.lastActiveAt > SESSION_IDLE_LOCK_MS` → `throw+ redirect('/unlock?redirectTo=…')` (a *lock* — session preserved, not destroyed).+ Console sessions redirect to the pin-in lock instead (D8).++Placing it here (not the shell loader) is deliberate: the shell loader is skipped+on search-param-only navigations (`x+/_layout.tsx` `shouldRevalidate`), so a+shell-only gate would miss cheap same-pathname navigations and realtime+revalidations; `requireAuthSession` runs on all of them. The **API-key path**+(`auth.server.ts:219-330`) never calls `requireAuthSession`, so machine callers are+exempt by construction.++### Activity signal = throttled client heartbeat, NOT server request-time++`lastActiveAt` must reflect **real user activity** (mouse/keyboard/touch), not HTTP+request time. Carbon issues background requests independent of the user — the 60 s+`CarbonProvider` interval (`provider.tsx:87-105`), realtime revalidations, and+prefetches — so updating `lastActiveAt` on every server request would keep an+unattended session "active" forever and defeat the lock. Therefore:++- A small in-house **`useIdle` client hook** listens to real activity events, and+ when the user is active POSTs a **throttled heartbeat** (~ every 60 s) to a+ `/api/session/heartbeat` action that re-commits the signed cookie with a fresh+ `lastActiveAt`. Only genuine activity moves the timestamp.+- The **server independently enforces** the threshold against `lastActiveAt`.+ Trusting the client for the *activity signal* (not the *enforcement*) is the+ OWASP-standard split and is sound here: idle timeout defends the *unattended*+ session; a thief who keeps a stolen token "active" is bounded instead by the 12 h+ absolute cap, the ≤50 min JWT, and refresh-reuse detection. The cookie is+ HMAC-signed, so the client cannot forge a future `lastActiveAt` — it only chooses+ *when* to heartbeat, through the signed round-trip.++### Client lock UX (concealment is immediate)++The `useIdle` hook also drives the **lock overlay** locally, so concealment+(AC-11(1)) is instant and does not wait on a server round-trip:++- At `SESSION_IDLE_LOCK_MS` the hook renders a **full-screen lock overlay** that+ removes app content from view (pattern-hiding: a blank/branded screen + a+ re-auth form), mirroring the `MfaEnrollmentRequired` / ITAR blocking-screen shape.+- Cross-tab: a `BroadcastChannel` (no new dependency) reconciles activity and lock+ across tabs — activity in any tab resets the shared timer; a lock in one tab+ locks all. (An optional ~13 min pre-lock toast; non-destructive, so it is only a+ courtesy, not a data-loss guard.)+- The overlay is UX; the server enforcement above is the boundary. A scripted+ request past the idle threshold still gets `throw redirect('/unlock')`.++### Unlock (re-authentication)++- **ERP + non-console MES → TOTP.** `/unlock` reuses `completeMfaChallenge`+ (`session.server.ts:138-202`), which rotates tokens **in place** in the same+ `carbon` cookie (no destroy) — the existing "re-auth into an existing session"+ precedent. On success it re-stamps `lastActiveAt = now`, preserves `createdAt`,+ and redirects back. Controlled-env users are force-MFA-enrolled, so a factor+ always exists.+- **MES console → PIN.** A console session's lock is the **operator pin-in**+ dropping to the existing `PinInOverlay` (`console.pin-in.tsx` verifies+ `employee.pin`, sets the `console-pin-{companyId}` cookie). Under+ `CONTROLLED_ENVIRONMENT` the pin-in idle window tightens from 1 h to+ `SESSION_IDLE_LOCK_MS` (15 min). Re-PIN resumes; the device login persists.+- If the **absolute** cap has also passed, termination wins over unlock: `/unlock`+ (and the pin-in) see the expired `createdAt` and fall through to full `/login`.++### Design Decisions++| Decision | Choice | Rationale |+|----------|--------|-----------|+| D1: Gate | Force-on under `CONTROLLED_ENVIRONMENT`; off (no-op) otherwise | Mirrors `requireMfa`; controlled deployments only. No per-company toggle in v1 (can add later like `companySettings.requireMfa`). |+| D2: Idle → lock, not logout | Idle triggers a **resumable lock** (session preserved, re-auth to resume); no idle-logout | Maximally lenient while compliant — 3.1.10 wants a lock (obscure + preserve + re-auth), and NIST lists inactivity-termination as an *example*, not a mandate. |+| D3: Termination condition | **Absolute 12 h cap** since `createdAt` + explicit logout satisfy 3.1.11 | Bounds total session/hijack window independent of refresh; 12 h = AWS full-workday precedent, lenient end of OWASP 4–8 h. |+| D4: Idle threshold | **15 min** | DISA App-Sec STIG web-app number (V-222389); the lenient ceiling (30 min invites a finding for CUI). NIST leaves it org-defined. |+| D5: Enforcement point | `requireAuthSession` (not the shell loader) | The one always-run choke point; shell loader is skipped on search-param navs. API-key path exempt by construction. |+| D6: Activity signal | Throttled **client heartbeat** updates cookie `lastActiveAt`; server enforces the threshold | Server request-time is a false "active" signal (60 s poll + realtime revalidations). OWASP split: client signals activity, server enforces. |+| D7: State storage | `createdAt` + `lastActiveAt` on the **signed session cookie** (`AuthSession`) | Carbon has no server session store; the cookie is the session. HMAC signing prevents forgery. Both must be preserved across `refreshAuthSession` (like `console`/`mfaVerified`); `lastActiveAt` updated only by the heartbeat/unlock. |+| D8: MES console | Console **device** login exempt from the 12 h cap; console lock = existing **pin-in** re-PIN, tightened to 15 min under CUI | Shared kiosk shouldn't force device re-login twice a shift; operator attribution + ≤15 min re-PIN covers the unattended-display risk. (User decision "a".) |+| D9: Unlock credential | TOTP (ERP/non-console MES) via `completeMfaChallenge`; PIN (console) | Reuses existing in-place re-auth; controlled-env users always have a TOTP factor; console already uses PINs. |+| D10: Dependency | **No new dependency** — in-house `useIdle` hook + `BroadcastChannel` | Respects ask-first-on-deps; idle logic is small and mirrors existing `CarbonProvider` visibility/interval hooks. |+| D11: Thresholds config | Named constants in `@carbon/env` (like `SESSION_MAX_AGE`/`REFRESH_ACCESS_TOKEN_THRESHOLD`) | Documented, single source, overridable by env for a deployment's risk analysis; defaults recorded in the security plan. |++## Data Model Changes++**No new tables and no migration.** The session is a signed react-router cookie,+not a DB row. The change is to the in-cookie `AuthSession` payload+(`packages/auth/src/types.ts`) — two optional fields, backward-compatible with+sessions minted before this ships:++```ts+export interface AuthSession {+ // …existing fields…+ console?: string;+ mfaVerified?: boolean;+ /** Session start (unix ms). Set once at mint; preserved across refresh. Basis of the 12h absolute cap. */+ createdAt?: number;+ /** Last real user-activity (unix ms). Updated by the activity heartbeat / on unlock. Basis of the 15min idle lock. */+ lastActiveAt?: number;+}+```++Backward compatibility: fields are optional. When a pre-existing session lacks+them, `requireAuthSession` treats `createdAt`/`lastActiveAt` as "now" on first+sight and stamps them (so the clock starts at first post-deploy request rather than+locking everyone out immediately). Both are stamped in every mint path — login+(`makeAuthSession`/`setAuthSession`), `completeMfaChallenge`, dev bypass — and+**preserved** (not reset) in `refreshAuthSession`, alongside the existing+`console`/`mfaVerified` preservation (`session.server.ts:330-337`).++New constants (`packages/env/src/index.ts`, re-exported by `@carbon/auth`):++```ts+export const SESSION_IDLE_LOCK_MS = getEnvNumber("SESSION_IDLE_LOCK_MS", 15 * 60 * 1000); // 15 min+export const SESSION_ABSOLUTE_MAX_MS = getEnvNumber("SESSION_ABSOLUTE_MAX_MS", 12 * 60 * 60 * 1000); // 12 h+export const SESSION_HEARTBEAT_MS = getEnvNumber("SESSION_HEARTBEAT_MS", 60 * 1000); // heartbeat throttle+```++## API / Service Changes++`packages/auth/src/services/session.server.ts`+- `makeAuthSession` (in `auth.server.ts`) / `setAuthSession`: stamp `createdAt = now`+ and `lastActiveAt = now` at mint.+- `refreshAuthSession`: **preserve** `createdAt`; preserve or refresh `lastActiveAt`+ (refresh is not user activity, so preserve — the heartbeat owns it).+- `completeMfaChallenge`: on a successful unlock/step-up, set `lastActiveAt = now`,+ preserve `createdAt`.+- `requireAuthSession`: after refresh + MFA re-check, run the absolute check (→+ `destroyAuthSession`) then the idle check (→ `throw redirect('/unlock')`), gated on+ `CONTROLLED_ENVIRONMENT`, skipping console device sessions per D8. A new+ `touchAuthSession(request, session)` helper re-commits the cookie with a fresh+ `lastActiveAt` for the heartbeat action.+- New: `isSessionExpiredAbsolute(session)` / `isSessionIdleLocked(session)` pure+ predicates (unit-testable, no I/O) — the enforcement math lives here.++Routes (ERP + MES):+- `apps/{erp,mes}/app/routes/api+/session.heartbeat.ts` — POST-only; requires a+ valid session, calls `touchAuthSession`, returns `{ ok: true }` + Set-Cookie.+ Throttled client-side; rate-limited server-side.+- `apps/{erp,mes}/app/routes/_public+/unlock.tsx` — the re-auth screen. ERP/non-console+ MES: TOTP form → `completeMfaChallenge`. Loader redirects away if the session is not+ actually idle-locked (like `/mfa`). Reuses `~/components/TotpEnrollment` OTP input.+- Console lock is handled by the existing `PinInOverlay` / `console.pin-in.tsx`; only+ the idle window constant changes under CUI.++## UI Changes++- **`useIdle` hook** (`packages/react/src/hooks` or app-level `~/hooks`): tracks real+ activity, exposes `{ isIdle, lastActive }`, fires the throttled heartbeat, and+ coordinates cross-tab via `BroadcastChannel`. Reuses the existing `visibilitychange`+ handling in `CarbonProvider` (`provider.tsx:63-85`).+- **`SessionLockOverlay`** — full-screen pattern-hiding overlay rendered when+ `isIdle`, mirroring `MfaEnrollmentRequired`. Contains the unlock form (TOTP for+ standard sessions; delegates to `PinInOverlay` for console). Wired into the ERP/MES+ shells, only active under `CONTROLLED_ENVIRONMENT`.+- No changes to non-controlled deployments (hook is inert when+ `CONTROLLED_ENVIRONMENT` is false).++## Acceptance Criteria++- [ ] With `CONTROLLED_ENVIRONMENT=true`, an idle ERP session shows a full-screen+ lock overlay concealing page content after 15 min of no mouse/keyboard activity.+- [ ] Continuous real activity (mouse/keyboard) never triggers the lock; background+ traffic alone (leaving the tab open with no user input) DOES trigger it at 15 min+ — proving the 60 s poll/realtime revalidations do not count as activity.+- [ ] Unlocking a standard session with a valid TOTP code restores the exact page and+ in-progress form state (session preserved, tokens rotated in place, not a new login).+- [ ] A wrong/absent TOTP does not unlock; the overlay stays and page content remains+ concealed.+- [ ] A scripted/`curl` request carrying an idle-expired session cookie is redirected to+ `/unlock` and served no protected data (server-authoritative, not client-only).+- [ ] At 12 h since session start, the next request terminates the session (cookie+ destroyed) and redirects to `/login`, regardless of activity and regardless of how+ many times the token refreshed in between.+- [ ] A locked tab propagates the lock to other open tabs of the same app within a few+ seconds; activity in one tab keeps the others unlocked.+- [ ] With `CONTROLLED_ENVIRONMENT` unset/false, no lock, no heartbeat, no absolute cap —+ behavior is identical to today (7-day rolling cookie).+- [ ] An MES console (console mode) session drops to the `PinInOverlay` after 15 min idle+ and requires the operator's PIN to resume; the console **device** login is NOT forced+ to fully re-login at 12 h.+- [ ] API-key (`carbon-key`) requests are never locked or absolute-terminated.+- [ ] `pnpm --filter @carbon/auth typecheck` and `pnpm --filter @carbon/auth test` pass;+ new unit tests cover `isSessionExpiredAbsolute` / `isSessionIdleLocked` and the+ preserve-across-refresh behavior.++## Risks++| Risk | Severity | Mitigation |+|------|----------|------------|+| Lockout / mass-invalidation from bad timestamp math or refresh not preserving `createdAt` | High | Optional fields; treat missing as "now" and stamp; unit tests for preserve-across-refresh; feature is inert unless `CONTROLLED_ENVIRONMENT`. |+| Heartbeat churn (Set-Cookie every 60 s) load | Low | Throttled to `SESSION_HEARTBEAT_MS`; only fires while genuinely active; heartbeat action is lightweight + rate-limited. |+| Client-sourced activity signal is "trusted" | Low | Threat model is the *unattended* session; a stolen token kept active is bounded by the 12 h absolute cap, ≤50 min JWT, refresh-reuse detection. Cookie HMAC prevents forging a future `lastActiveAt`. |+| Idle check misplaced (shell-only) misses cheap navigations | Med | Enforce in `requireAuthSession`, which runs on every leaf loader/action, not the shell. |+| Unlock redirect loop / escape-hatch maze (the MFA-enrollment lesson) | Med | Single dedicated `/unlock` route (not a shell-wide redirect allowlist); `/unlock` needs only a valid-but-idle session; console uses the existing pin-in. |+| MFA token rotation on unlock leaves a stale cookie | Med | `completeMfaChallenge` already returns the rotated cookie; `/unlock` Set-Cookies it (existing `/mfa` precedent). |+| Console kiosk exempt from absolute cap weakens 3.1.11 there | Low | Accepted (D8): operator attribution + ≤15 min re-PIN covers the display risk; documented in the security plan. |++## Open Questions++> Resolved with the user before writing (audit trail of the /grill step).++- [x] Idle → lock or terminate? — **Answer:** Idle → **resumable lock only** (session+ preserved, re-auth to resume). Termination comes from the 12 h absolute cap ++ explicit logout. Most lenient split that still satisfies both 3.1.10 and 3.1.11.+- [x] Unlock credential? — **Answer:** **Console mode → PIN; all other → TOTP** via+ `completeMfaChallenge`. (User: "for the MES — pin unlock in console mode — totp if not.")+- [x] Configurability? — **Answer:** Force-on under `CONTROLLED_ENVIRONMENT` only;+ no per-company toggle in v1 (mirror `requireMfa`, add later if wanted).+- [x] Defaults? — **Answer:** idle **15 min** (DISA), absolute **12 h** (AWS); optional+ ~13 min pre-lock toast.+- [x] Blast radius? — **Answer:** `requireAuthSession` (ERP + MES interactive leaf+ loaders/actions); API-key callers exempt by construction.+- [x] Does the 12 h absolute cap apply to the MES console *device* login? — **Answer:**+ **No (option A)** — exempt the console device login; the console lock is the+ operator pin-in re-PIN, tightened to 15 min under CUI. (User: "a".)++## Changelog++- 2026-08-17: Created. All open questions resolved with the user prior to writing+ (research → grill → spec). Ready for `/plan`.diff --git a/.claude/rules/audit-log-system.md b/.claude/rules/audit-log-system.mdindex fb069bac07..5ef3f9d4b6 100644--- a/.claude/rules/audit-log-system.md+++ b/.claude/rules/audit-log-system.md@@ -33,6 +33,29 @@ RLS is permissive (`USING true WITH CHECK true`) — isolation is the table nameat the app layer (`requirePermissions`). A separate `auditLogArchive` table tracks archive metadata(`archivePath`, `startDate`, `endDate`, `rowCount`, `sizeBytes`).+## Append-only (NIST 800-171 3.3.8 / AU-9)++Every `auditLog_{companyId}` table carries a `BEFORE UPDATE OR DELETE` trigger `append_only`+(`prevent_audit_log_mutation()`, migration `20260818014100_audit-log-append-only.sql`). UPDATE is+**always** rejected; DELETE is rejected unless the transaction has set the local flag+`app.audit_archiving = 'on'`. Even a service-role client cannot rewrite or casually erase history —+only the retention/archival path may delete. `delete_old_audit_logs` was forked to+`set_config('app.audit_archiving','on',true)` before its purge, and `create_audit_log_table` was+forked to attach the trigger to every new (and pre-existing) table via the idempotent helper+`attach_audit_log_append_only(table)`. The DELETE branch of `prevent_audit_log_mutation` is what the+`audit-archive` job relies on: it runs `delete_old_audit_logs`, so its per-day deletes carry the flag.++## On-by-default in controlled environments (3.3.1)++Audit is opt-in per company (`company.auditLogEnabled`), **except** under `CONTROLLED_ENVIRONMENT`+(ITAR/CUI), where it is mandatory and non-disableable — mirroring the `requireMfa` gate:+- Enabled at company creation: `company.new.tsx` + `companies.new.tsx` call `enableAuditLog` after+ `seedCompany` when `CONTROLLED_ENVIRONMENT`.+- The `audit-logs.tsx` loader enables it on demand for any controlled company not yet capturing+ (covers companies that predate the flag), and returns `controlled: CONTROLLED_ENVIRONMENT`.+- The `disable` action case refuses under `CONTROLLED_ENVIRONMENT`; `AuditLogSettings` receives+ `controlled` and locks the toggle with an explanatory note.+## Config (`packages/database/src/audit.config.ts`)`auditConfig.entities` maps an **entity key** → `{ label, tables }`. Each table has a role:diff --git a/.github/dependabot.yml b/.github/dependabot.ymlnew file mode 100644index 0000000000..0032d02f12--- /dev/null+++ b/.github/dependabot.yml@@ -0,0 +1,70 @@+# Dependabot configuration for automated dependency updates.+# Docs: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file+#+# One npm entry with directory "/" covers the whole pnpm workspace via the+# root pnpm-lock.yaml; one cargo entry likewise covers the Rust workspace via+# Cargo.lock. Updates are grouped to keep PR volume manageable in this monorepo.+version: 2+updates:+ # JavaScript/TypeScript — pnpm workspace (root lockfile covers all packages/apps)+ - package-ecosystem: "npm"+ directory: "/"+ schedule:+ interval: "weekly"+ day: "monday"+ open-pull-requests-limit: 10+ labels:+ - "dependencies"+ groups:+ dev-dependencies:+ dependency-type: "development"+ update-types:+ - "minor"+ - "patch"+ production-minor-patch:+ dependency-type: "production"+ update-types:+ - "minor"+ - "patch"++ # Rust — cargo workspace (root Cargo.lock covers all crates + assembler)+ - package-ecosystem: "cargo"+ directory: "/"+ schedule:+ interval: "weekly"+ day: "monday"+ open-pull-requests-limit: 5+ labels:+ - "dependencies"+ groups:+ cargo:+ update-types:+ - "minor"+ - "patch"++ # GitHub Actions used by workflows in .github/workflows+ - package-ecosystem: "github-actions"+ directory: "/"+ schedule:+ interval: "weekly"+ day: "monday"+ open-pull-requests-limit: 5+ labels:+ - "dependencies"+ groups:+ github-actions:+ update-types:+ - "minor"+ - "patch"++ # Docker base images+ - package-ecosystem: "docker"+ directories:+ - "/"+ - "/apps/assembler"+ schedule:+ interval: "weekly"+ day: "monday"+ open-pull-requests-limit: 5+ labels:+ - "dependencies"diff --git a/apps/erp/app/components/SessionLockOverlay.tsx b/apps/erp/app/components/SessionLockOverlay.tsxnew file mode 100644index 0000000000..9d4ec2608a--- /dev/null+++ b/apps/erp/app/components/SessionLockOverlay.tsx@@ -0,0 +1,220 @@+import {+ Hidden,+ InputOTP,+ Submit,+ useControlField,+ ValidatedForm+} from "@carbon/form";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ Card,+ CardContent,+ Heading,+ toast,+ VStack+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import {+ browserSupportsWebAuthn,+ startAuthentication+} from "@simplewebauthn/browser";+import { useEffect, useRef, useState } from "react";+import { LuFingerprint, LuLock } from "react-icons/lu";+import { Form, useFetcher, useLocation } from "react-router";+import { z } from "zod";++import type { Result } from "~/types";+import { path } from "~/utils/path";++/**+ * Full-screen pattern-hiding lock overlay + in-place re-auth (NIST 800-171+ * 3.1.10 / AC-11(1)). Shown by the shell when `useIdle` reports inactivity: it+ * CONCEALS all page content (opaque `bg-background`, top z-index) AND carries the+ * re-auth controls itself, so unlocking is a single screen. TOTP posts a form to+ * the `/unlock` action; a passkey posts the WebAuthn assertion as JSON. Both use+ * `inline=true`: on success the action resumes the SAME session in place (rotated+ * cookie returned as data, no navigation), the overlay calls `onUnlocked` to+ * clear the client lock, and React Router revalidates with the fresh session.+ * The server is still the real boundary (requireAuthSession redirects idle+ * requests to the full-page /unlock route); this overlay is the immediate+ * concealment + fast path.+ */+const overlayValidator = z.object({+ code: z.string().length(6),+ redirectTo: z.string().optional(),+ inline: z.string().optional()+});++/**+ * Lives inside ValidatedForm so it can reach the shared `code` field state. A+ * rejected code is cleared so the user can retype without stale digits.+ */+function UnlockCodeField({ result }: { result?: Result }) {+ const [, setCode] = useControlField<string>("code");+ const lastResult = useRef(result);++ useEffect(() => {+ if (result === lastResult.current) return;+ lastResult.current = result;+ if (result?.success === false) setCode("");+ }, [result, setCode]);++ return <InputOTP name="code" label="" />;+}++export default function SessionLockOverlay({+ onUnlocked,+ hasPasskeyAuth = false+}: {+ onUnlocked?: () => void;+ hasPasskeyAuth?: boolean;+}) {+ const { t } = useLingui();+ const location = useLocation();+ const redirectTo = `${location.pathname}${location.search}`;++ const fetcher = useFetcher<Result>();++ const [passkeySupported, setPasskeySupported] = useState(false);+ const [passkeyLoading, setPasskeyLoading] = useState(false);++ useEffect(() => {+ if (hasPasskeyAuth && browserSupportsWebAuthn()) setPasskeySupported(true);+ }, [hasPasskeyAuth]);++ // A successful in-place unlock (TOTP or passkey) rotated the cookie already;+ // clear the client lock so the overlay unmounts and the app (revalidated with+ // the fresh session) shows through.+ useEffect(() => {+ if (fetcher.data?.success === true) onUnlocked?.();+ }, [fetcher.data, onUnlocked]);++ const onUnlockWithPasskey = async () => {+ setPasskeyLoading(true);+ try {+ const optRes = await fetch("/api/passkey/authenticate/options", {+ method: "POST"+ });+ if (!optRes.ok) throw new Error("Failed to get options");+ const { challengeId, ...options } = await optRes.json();++ const credential = await startAuthentication({+ optionsJSON: options+ } as any);++ // inline=true → the action returns data (no navigation); the fetcher's+ // success effect above clears the lock in place.+ fetcher.submit({ credential, challengeId, inline: "true" } as any, {+ method: "post",+ action: "/unlock",+ encType: "application/json"+ });+ } catch (e: any) {+ if (e?.name !== "NotAllowedError" && e?.name !== "AbortError") {+ toast.error(t`Passkey unlock failed`);+ }+ } finally {+ setPasskeyLoading(false);+ }+ };++ return (+ <div className="fixed inset-0 z-[9999] flex items-center justify-center bg-background p-6">+ <Card className="w-[420px] max-w-full">+ <CardContent className="flex flex-col items-center gap-6 p-8 text-center">+ <span className="flex items-center justify-center size-14 rounded-full bg-muted">+ <LuLock className="size-6 text-muted-foreground" />+ </span>+ <VStack spacing={2} className="items-center">+ <Heading size="h2" className="text-balance">+ <Trans>Session locked</Trans>+ </Heading>+ <p className="text-sm text-muted-foreground text-pretty">+ <Trans>Your session was locked after inactivity.</Trans>+ </p>+ </VStack>++ <VStack spacing={4} className="items-center w-full">+ {fetcher.data?.success === false && fetcher.data?.message && (+ <Alert variant="destructive">+ <LuLock className="w-4 h-4" />+ <AlertTitle>+ <Trans>Unable to unlock</Trans>+ </AlertTitle>+ <AlertDescription>{fetcher.data.message}</AlertDescription>+ </Alert>+ )}++ {hasPasskeyAuth && passkeySupported && (+ <Button+ type="button"+ size="lg"+ variant="secondary"+ className="w-full"+ leftIcon={<LuFingerprint />}+ onClick={onUnlockWithPasskey}+ isDisabled={passkeyLoading || fetcher.state !== "idle"}+ isLoading={passkeyLoading}+ >+ <Trans>Unlock with passkey</Trans>+ </Button>+ )}++ {hasPasskeyAuth && passkeySupported && (+ <div className="flex items-center gap-3 w-full">+ <div className="h-px flex-1 bg-border" />+ <span className="text-xs text-muted-foreground uppercase">+ <Trans>or</Trans>+ </span>+ <div className="h-px flex-1 bg-border" />+ </div>+ )}++ <ValidatedForm+ fetcher={fetcher}+ validator={overlayValidator}+ method="post"+ action="/unlock"+ className="w-full"+ >+ <Hidden name="redirectTo" value={redirectTo} />+ <Hidden name="inline" value="true" />+ <VStack spacing={4} className="items-center">+ <p className="text-sm text-muted-foreground text-pretty">+ <Trans>+ Enter the 6-digit code from your authenticator app to+ resume.+ </Trans>+ </p>+ <UnlockCodeField result={fetcher.data} />++ <Submit+ size="lg"+ className="w-full"+ withBlocker={false}+ isDisabled={fetcher.state !== "idle"}+ >+ <Trans>Unlock</Trans>+ </Submit>+ </VStack>+ </ValidatedForm>+ </VStack>++ <Form method="post" action={path.to.logout}>+ <Button+ type="submit"+ variant="link"+ size="sm"+ className="text-muted-foreground"+ >+ <Trans>Sign out instead</Trans>+ </Button>+ </Form>+ </CardContent>+ </Card>+ </div>+ );+}diff --git a/apps/erp/app/entry.client.tsx b/apps/erp/app/entry.client.tsxindex 3391e36104..224d26ad3f 100644--- a/apps/erp/app/entry.client.tsx+++ b/apps/erp/app/entry.client.tsx@@ -34,6 +34,15 @@ if (POSTHOG_PROJECT_PUBLIC_KEY && !CONTROLLED_ENVIRONMENT) {});}+// Fail-fast boot assertion (NIST 800-171 3.4.6): analytics must never be live in+// a controlled environment. If a regression in the gate above lets posthog load,+// refuse to boot rather than silently phone home about a U.S.-Persons-only system.+if (CONTROLLED_ENVIRONMENT && posthog.__loaded) {+ throw new Error(+ "Analytics initialized in a controlled environment — refusing to boot"+ );+}+startTransition(() => {hydrateRoot(document, <HydratedRouter />);});diff --git a/apps/erp/app/hooks/index.ts b/apps/erp/app/hooks/index.tsindex 4f56116599..f24aa9a084 100644--- a/apps/erp/app/hooks/index.ts+++ b/apps/erp/app/hooks/index.ts@@ -21,6 +21,7 @@ import { useDateFormatter } from "./useDateFormatter";import { useFlags } from "./useFlags";import { useGooglePlaces } from "./useGooglePlaces";import { useHighlightFlash } from "./useHighlightFlash";+import { useIdle } from "./useIdle";import { useModelUpload } from "./useModelUpload";import { useAllModules, useModules, useSettingsModule } from "./useModules";import { useMovingCellRef } from "./useMovingCellRef";@@ -48,6 +49,7 @@ export {useDateFormatter,useFlags,useGooglePlaces,+ useIdle,useHighlightFlash,useAllModules,useModules,diff --git a/apps/erp/app/hooks/useIdle.tsx b/apps/erp/app/hooks/useIdle.tsxnew file mode 100644index 0000000000..12e0bf071c--- /dev/null+++ b/apps/erp/app/hooks/useIdle.tsx@@ -0,0 +1,146 @@+import { useCallback, useEffect, useRef, useState } from "react";++// UX-only idle detection for the NIST 3.1.10 session lock. The SERVER is the+// authority (requireAuthSession enforces the idle/absolute cap); this hook drives+// the immediate lock overlay + a throttled activity heartbeat. Background traffic+// (the 60s refresh poll, realtime revalidations) is NOT activity — only real+// user input moves lastActivity, so an unattended tab still locks.++const ACTIVITY_EVENTS = [+ "mousemove",+ "mousedown",+ "keydown",+ "touchstart",+ "scroll",+ "wheel"+] as const;++const CHANNEL_NAME = "carbon-session-activity";+const ACTIVITY_BROADCAST_THROTTLE_MS = 5000;+const CHECK_INTERVAL_MS = 1000;++type ChannelMessage = { type: "activity" } | { type: "lock" };++type UseIdleOptions = {+ /** Off (inert) unless true — non-controlled deployments pass false. */+ enabled: boolean;+ /** Idle window before locking (SESSION_IDLE_LOCK_MS). */+ idleMs: number;+ /** Heartbeat throttle while active (SESSION_HEARTBEAT_MS). */+ heartbeatMs: number;+ /** POST target that re-stamps lastActiveAt server-side. */+ heartbeatUrl: string;+};++export function useIdle({+ enabled,+ idleMs,+ heartbeatMs,+ heartbeatUrl+}: UseIdleOptions) {+ const [isIdle, setIsIdle] = useState(false);++ const lastActivityRef = useRef(Date.now());+ const lastHeartbeatRef = useRef(0);+ const lastBroadcastRef = useRef(0);+ const isIdleRef = useRef(false);+ const channelRef = useRef<BroadcastChannel | null>(null);++ useEffect(() => {+ isIdleRef.current = isIdle;+ }, [isIdle]);++ const resume = useCallback(() => {+ lastActivityRef.current = Date.now();+ isIdleRef.current = false;+ setIsIdle(false);+ // Tell peers the session is active again (an unlock in one tab clears all).+ channelRef.current?.postMessage({+ type: "activity"+ } satisfies ChannelMessage);+ }, []);++ useEffect(() => {+ if (!enabled || typeof window === "undefined") return;++ const channel =+ typeof BroadcastChannel !== "undefined"+ ? new BroadcastChannel(CHANNEL_NAME)+ : null;+ channelRef.current = channel;++ // Throttled activity heartbeat. It fires ONLY in response to real user input+ // (here), never on the idle countdown itself — otherwise the countdown would+ // keep re-stamping the server's `lastActiveAt` every heartbeatMs and the+ // session would never idle-lock server-side, so /unlock's loader would find+ // the session "not locked" and bounce straight back with no re-auth.+ const sendHeartbeat = (now: number) => {+ lastHeartbeatRef.current = now;+ void fetch(heartbeatUrl, {+ method: "POST",+ credentials: "same-origin"+ }).catch(() => {+ // Best-effort; a missed heartbeat just brings the lock closer.+ });+ };++ // Local real activity. Once locked, local activity does NOT clear the lock —+ // 3.1.10 requires re-authentication; only a successful unlock (resume) does.+ const onActivity = () => {+ if (isIdleRef.current) return;+ const now = Date.now();+ lastActivityRef.current = now;+ // Keep the server's lastActiveAt fresh while genuinely active, throttled.+ if (now - lastHeartbeatRef.current >= heartbeatMs) {+ sendHeartbeat(now);+ }+ if (+ channel &&+ now - lastBroadcastRef.current > ACTIVITY_BROADCAST_THROTTLE_MS+ ) {+ lastBroadcastRef.current = now;+ channel.postMessage({ type: "activity" } satisfies ChannelMessage);+ }+ };++ for (const evt of ACTIVITY_EVENTS) {+ window.addEventListener(evt, onActivity, { passive: true });+ }++ if (channel) {+ channel.onmessage = (e: MessageEvent<ChannelMessage>) => {+ if (e.data?.type === "activity") {+ // A peer is active → the session isn't idle. Keep this tab from locking.+ if (!isIdleRef.current) lastActivityRef.current = Date.now();+ } else if (e.data?.type === "lock") {+ // A peer locked → lock all tabs together.+ isIdleRef.current = true;+ setIsIdle(true);+ }+ };+ }++ const interval = window.setInterval(() => {+ const now = Date.now();+ if (isIdleRef.current) return;++ const idleFor = now - lastActivityRef.current;+ if (idleFor > idleMs) {+ isIdleRef.current = true;+ setIsIdle(true);+ channel?.postMessage({ type: "lock" } satisfies ChannelMessage);+ }+ }, CHECK_INTERVAL_MS);++ return () => {+ for (const evt of ACTIVITY_EVENTS) {+ window.removeEventListener(evt, onActivity);+ }+ window.clearInterval(interval);+ channel?.close();+ channelRef.current = null;+ };+ }, [enabled, idleMs, heartbeatMs, heartbeatUrl]);++ return { isIdle: enabled && isIdle, resume };+}diff --git a/apps/erp/app/hooks/usePermissions.tsx b/apps/erp/app/hooks/usePermissions.tsxindex 090804c72a..092fcb3650 100644--- a/apps/erp/app/hooks/usePermissions.tsx+++ b/apps/erp/app/hooks/usePermissions.tsx@@ -25,10 +25,7 @@ export function usePermissions() {const can = useCallback((action: "view" | "create" | "update" | "delete", feature: string) => {- return (- data?.permissions[feature]?.[action].includes("0") ||- data?.permissions[feature]?.[action].includes(companyId)- );+ return data?.permissions[feature]?.[action].includes(companyId);},[companyId, data?.permissions]);diff --git a/apps/erp/app/modules/settings/settings.server.ts b/apps/erp/app/modules/settings/settings.server.tsindex 064bde77b6..ee6656eabc 100644--- a/apps/erp/app/modules/settings/settings.server.ts+++ b/apps/erp/app/modules/settings/settings.server.ts@@ -1,5 +1,11 @@+import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database, Json } from "@carbon/database";-import { getIntegrationConfigById, type IntegrationID } from "@carbon/ee";+import {+ getIntegrationConfigById,+ type IntegrationID,+ resolveIntegrationSecrets,+ splitSecrets+} from "@carbon/ee";import { getIntegrationServerHooks } from "@carbon/ee/hooks.server";import { redis } from "@carbon/kv";import { getLogger } from "@carbon/logger";@@ -189,7 +195,14 @@ export async function getCompanyIntegrations(throw error;}- const integrations = data || [];+ // Secret material must never reach Redis. Strip each integration's secret keys+ // into the vault-backed shape (config only) before caching AND returning, so no+ // consumer of this function depends on a plaintext secret in `metadata` (secret+ // reads go through resolveIntegrationSecrets against the row, not this cache).+ const integrations = (data || []).map((integration) => ({+ ...integration,+ metadata: splitSecrets(integration.id, integration.metadata).config+ }));try {// Force string storage to avoid Upstash automatic deserialization issues@@ -236,13 +249,29 @@ export async function getSlackIntegration(client: SupabaseClient<Database>,companyId: string): Promise<{ token: string; channelId?: string } | null> {- const integration = await getCompanyIntegration(client, companyId, "slack");+ // The Redis cache (getCompanyIntegration) no longer holds secret material, so+ // read the row directly with a service-role client — required both to resolve+ // the vaulted access_token and, in the transitional window, to see the plaintext+ // still in the column.+ const serviceRole = getCarbonServiceRole();+ const { data: integration } = await serviceRole+ .from("companyIntegration")+ .select("metadata, secretRef, active")+ .eq("companyId", companyId)+ .eq("id", "slack")+ .maybeSingle();- if (!integration?.metadata) {+ if (!integration?.active || !integration.metadata) {return null;}- const metadata = integration.metadata as any;+ const metadata = (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as any;if (!metadata.access_token) {return null;@@ -271,9 +300,14 @@ export async function upsertCompanyIntegration(updatedBy: string;}) {+ // Split secret material out of the metadata: only the non-secret config is+ // written to the column; the secrets go to Supabase Vault. The row is upserted+ // FIRST (so it exists), then the vault RPC stamps `secretRef` onto it.+ const { config, secrets } = splitSecrets(update.id, update.metadata);+const result = await client.from("companyIntegration")- .upsert([update], {+ .upsert([{ ...update, metadata: config as Json }], {onConflict: "id,companyId"}).select()@@ -283,6 +317,25 @@ export async function upsertCompanyIntegration(return result;}+ if (Object.keys(secrets).length > 0) {+ const serviceRole = getCarbonServiceRole();+ const { error: vaultError } = await serviceRole.rpc(+ "upsert_integration_secret",+ {+ p_company_id: update.companyId,+ p_integration_id: update.id,+ p_secret: secrets as never+ }+ );+ if (vaultError) {+ logger.error("Failed to persist integration secret to vault", {+ error: vaultError,+ id: update.id+ });+ return { ...result, data: null, error: vaultError };+ }+ }+await clearCompanyIntegrationCache(update.companyId);return result;@@ -382,12 +435,35 @@ export async function getIntegrationHealth(};}+ // Resolve vaulted secrets back into the metadata before the healthcheck+ // builds its provider/client. Since the secret-vault refactor, credentials no+ // longer live in the plaintext `metadata` column, so an unresolved metadata+ // authenticates with nothing and every secret-bearing healthcheck (Rillet,+ // Xero, Email) would read "unhealthy". `resolveIntegrationSecrets` looks up+ // the row's `secretRef` itself (the `integrations` view doesn't expose it) and+ // throws when the secret can't be read — treat that as unhealthy rather than+ // crashing the whole settings page.+ let resolvedMetadata: Record<string, any>;+ try {+ resolvedMetadata = (await resolveIntegrationSecrets(+ getCarbonServiceRole(),+ companyId,+ integration.id!,+ (integration.metadata as Record<string, any>) ?? {}+ )) as Record<string, any>;+ } catch {+ return {+ ...integration,+ health: "unhealthy"+ };+ }+const status = await (healthcheck as (companyId: string,metadata: Record<string, any>) => Promise<boolean>- )(companyId, integration.metadata as Record<string, any>);+ )(companyId, resolvedMetadata);await redis.set(key, status ? "1" : "0", "EX", INTEGRATION_CACHE_TTL * 5); // Cache for 5 minutes@@ -428,3 +504,45 @@ export async function invalidateIntegrationHealthCache(return await redis.del(key);}++// Server-only (needs the service-role client for the Vault RPC). Lives here rather+// than in settings.service.ts because that file is re-exported by the client barrel;+// a client.server import there would leak the service-role client into the browser+// bundle. Reached by the MCP direct-executor, which imports this module server-side.+export async function updateIntegrationMetadata(+ client: SupabaseClient<Database>,+ companyId: string,+ integrationId: string,+ metadata: any,+ updatedBy?: string+) {+ // Split secret material out to Supabase Vault; only the non-secret config is+ // written to the column. The row already exists (this is an update), so vault+ // FIRST (fail-closed: if the vault write fails, the plaintext is left intact+ // rather than stripped-and-lost), then write the stripped config.+ const { config, secrets } = splitSecrets(integrationId, metadata);++ if (Object.keys(secrets).length > 0) {+ const serviceRole = getCarbonServiceRole();+ const { error } = await serviceRole.rpc("upsert_integration_secret", {+ p_company_id: companyId,+ p_integration_id: integrationId,+ p_secret: secrets as never+ });+ if (error) {+ return { data: null, error };+ }+ }++ return client+ .from("companyIntegration")+ .update(+ sanitize({+ metadata: config as Json,+ updatedAt: new Date().toISOString(),+ updatedBy+ })+ )+ .eq("companyId", companyId)+ .eq("id", integrationId);+}diff --git a/apps/erp/app/modules/settings/settings.service.ts b/apps/erp/app/modules/settings/settings.service.tsindex e85a76f4ad..319dc9ab2c 100644--- a/apps/erp/app/modules/settings/settings.service.ts+++ b/apps/erp/app/modules/settings/settings.service.ts@@ -949,25 +949,10 @@ export async function updateDigitalQuoteSetting(.eq("id", companyId);}-export async function updateIntegrationMetadata(- client: SupabaseClient<Database>,- companyId: string,- integrationId: string,- metadata: any,- updatedBy?: string-) {- return client- .from("companyIntegration")- .update(- sanitize({- metadata,- updatedAt: new Date().toISOString(),- updatedBy- })- )- .eq("companyId", companyId)- .eq("id", integrationId);-}+// NOTE: updateIntegrationMetadata lives in settings.server.ts, NOT here. It needs+// the service-role client for the Vault RPC, and this file is re-exported by the+// client barrel (~/modules/settings) — a `@carbon/auth/client.server` import here+// would pull the service-role client into the browser bundle (Vite blocks it).export async function updateAccountingEnabledSetting(client: SupabaseClient<Database>,diff --git a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogSettings.tsx b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogSettings.tsxindex 9776e5a304..b5a0a0453c 100644--- a/apps/erp/app/modules/settings/ui/AuditLog/AuditLogSettings.tsx+++ b/apps/erp/app/modules/settings/ui/AuditLog/AuditLogSettings.tsx@@ -20,6 +20,8 @@ import { DateTime } from "~/components";type AuditLogSettingsProps = {enabled: boolean;archives: AuditLogArchive[];+ /** Controlled (ITAR/CUI) environment: audit is required and cannot be disabled. */+ controlled?: boolean;};function formatBytes(bytes: number): string {@@ -31,7 +33,7 @@ function formatBytes(bytes: number): string {}const AuditLogSettings = memo(- ({ enabled, archives }: AuditLogSettingsProps) => {+ ({ enabled, archives, controlled }: AuditLogSettingsProps) => {const fetcher = useFetcher();const isToggling = fetcher.state !== "idle";@@ -78,7 +80,12 @@ const AuditLogSettings = memo()}</span><span className="text-sm text-muted-foreground">- {enabled ? (+ {controlled ? (+ <Trans>+ Required in a controlled environment — audit logging+ cannot be turned off.+ </Trans>+ ) : enabled ? (<Trans>All changes to auditable entities are being recorded.</Trans>@@ -92,7 +99,7 @@ const AuditLogSettings = memo(<Switchchecked={enabled}onCheckedChange={handleToggle}- disabled={isToggling}+ disabled={isToggling || controlled}/></HStack></CardContent>diff --git a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsxindex b739360d5d..9ba42df7cc 100644--- a/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx+++ b/apps/erp/app/modules/settings/ui/Integrations/IntegrationForm.tsx@@ -19,7 +19,6 @@ import {import {Badge,Button,- Copy,cn,Drawer,DrawerBody,@@ -220,8 +219,21 @@ function SettingFieldInner({ setting }: { setting: IntegrationSetting }) {</div>);+ // A vault-backed credential. The stored secret is never sent to the+ // browser, so the field loads empty: leaving it empty keeps the vaulted+ // value, typing a new one replaces it. Rendered as a plain `Password`+ // (which has its own show/hide toggle) — no separate "Reveal" affordance.case "secret":- return <SecretField setting={setting} />;+ return (+ <div className="w-full">+ <Password name={setting.name} label={setting.label} />+ {setting.description && (+ <p className="text-xs text-muted-foreground mt-1.5">+ {setting.description}+ </p>+ )}+ </div>+ );case "cards":return <CardSelector setting={setting} />;@@ -306,35 +318,6 @@ function SettingFieldInner({ setting }: { setting: IntegrationSetting }) {}}-/**- * A masked-but-recoverable credential field. Reuses the `Password` field- * (form binding + reveal toggle) and adds a copy button that reads the live- * form value via `useControlField`, so a stored secret prefilled by the- * loader can be revealed and copied without being re-typed. The value stays- * editable — pasting a new secret overwrites it. The copy button only shows- * once the field has a value.- */-function SecretField({ setting }: { setting: IntegrationSetting }) {- const [value] = useControlField<string>(setting.name);- const current = typeof value === "string" ? value : "";-- return (- <div className="w-full">- <div className="flex items-end gap-2">- <div className="min-w-0 flex-1">- <Password name={setting.name} label={setting.label} />- </div>- {current.length > 0 && <Copy text={current} className="shrink-0" />}- </div>- {setting.description && (- <p className="text-xs text-muted-foreground mt-1.5">- {setting.description}- </p>- )}- </div>- );-}-/*** Card-style picker for mutually-exclusive options. Wraps the shared* `ChoiceCardGroup` and binds it into the surrounding ValidatedForm viadiff --git a/apps/erp/app/modules/users/users.server.ts b/apps/erp/app/modules/users/users.server.tsindex da837f72fe..5adcf07c14 100644--- a/apps/erp/app/modules/users/users.server.ts+++ b/apps/erp/app/modules/users/users.server.ts@@ -1,5 +1,6 @@import { CONTROLLED_ENVIRONMENT, error, success } from "@carbon/auth";import { deleteAuthAccount } from "@carbon/auth/auth.server";+import { logPermissionChange } from "@carbon/auth/auth-events.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { flash, requireAuthSession } from "@carbon/auth/session.server";import {@@ -1160,23 +1161,19 @@ export function makeCompanyPermissionsFromClaims(switch (action) {case "view":// biome-ignore lint/complexity/useLiteralKeys: suppressed due to migration- permissions[module]["view"] =- value.includes("0") || value.includes(companyId);+ permissions[module]["view"] = value.includes(companyId);break;case "create":// biome-ignore lint/complexity/useLiteralKeys: suppressed due to migration- permissions[module]["create"] =- value.includes("0") || value.includes(companyId);+ permissions[module]["create"] = value.includes(companyId);break;case "update":// biome-ignore lint/complexity/useLiteralKeys: suppressed due to migration- permissions[module]["update"] =- value.includes("0") || value.includes(companyId);+ permissions[module]["update"] = value.includes(companyId);break;case "delete":// biome-ignore lint/complexity/useLiteralKeys: suppressed due to migration- permissions[module]["delete"] =- value.includes("0") || value.includes(companyId);+ permissions[module]["delete"] = value.includes(companyId);break;}}@@ -1275,18 +1272,10 @@ export function makeCompanyPermissionsFromEmployeeType(result[permission.module] = {name: permission.module.toLowerCase(),permission: {- view:- permission.view.includes("0") ||- permission.view.includes(companyId),- create:- permission.create.includes("0") ||- permission.create.includes(companyId),- update:- permission.update.includes("0") ||- permission.update.includes(companyId),- delete:- permission.delete.includes("0") ||- permission.delete.includes(companyId)+ view: permission.view.includes(companyId),+ create: permission.create.includes(companyId),+ update: permission.update.includes(companyId),+ delete: permission.delete.includes(companyId)}};}@@ -1406,12 +1395,16 @@ export async function updateEmployee(id,employeeType,permissions,- companyId+ companyId,+ actorId,+ ip}: {id: string;employeeType: string;permissions: Record<string, CompanyPermission>;companyId: string;+ actorId?: string;+ ip?: string;}): Promise<Result> {const updateEmployeeEmployeeType = await client@@ -1421,7 +1414,7 @@ export async function updateEmployee(if (updateEmployeeEmployeeType.error)return error(updateEmployeeEmployeeType.error, "Failed to update employee");- return updatePermissions(client, { id, permissions, companyId });+ return updatePermissions(client, { id, permissions, companyId, actorId, ip });}export async function updatePermissions(@@ -1430,15 +1423,19 @@ export async function updatePermissions(id,permissions,companyId,- addOnly = false+ addOnly = false,+ actorId,+ ip}: {id: string;permissions: Record<string, CompanyPermission>;companyId: string;addOnly?: boolean;+ actorId?: string;+ ip?: string;}): Promise<Result> {- if (await client.rpc("is_claims_admin")) {+ if (await client.rpc("is_claims_admin", { company: companyId })) {const claims = await getClaims(client, id);if (claims.error) return error(claims.error, "Failed to get claims");@@ -1453,6 +1450,10 @@ export async function updatePermissions(// biome-ignore lint/complexity/useLiteralKeys: suppressed due to migrationdelete updatedPermissions["role"];+ // Snapshot the effective grant set BEFORE the in-place mutation below, so+ // the audit event carries an honest before/after diff (NIST 3.3.1/3.3.2).+ const beforePermissions = structuredClone(updatedPermissions);+// add any missing claims to the current claimsObject.keys(permissions).forEach((name) => {const module = name.toLowerCase();@@ -1555,6 +1556,15 @@ export async function updatePermissions(});}+ // The "0" global-company wildcard is retired (NIST 800-171 3.1.5). Strip it+ // from every array so it can never be persisted to the authoritative table.+ for (const key of Object.keys(updatedPermissions)) {+ const value = updatedPermissions[key];+ if (Array.isArray(value)) {+ updatedPermissions[key] = value.filter((c: string) => c !== "0");+ }+ }+const permissionsUpdate = await getCarbonServiceRole().from("userPermission").update({ permissions: updatedPermissions })@@ -1564,6 +1574,17 @@ export async function updatePermissions(await redis.del(getPermissionCacheKey(id));+ // Audit the change (NIST 800-171 3.3.1/3.3.2): actor, target, before/after.+ logPermissionChange({+ actor: actorId,+ targetUserId: id,+ companyId,+ ip,+ before: beforePermissions,+ after: updatedPermissions,+ reason: addOnly ? "add" : "edit"+ });+return success("Permissions updated");} else {return error(null, "You do not have permission to update permissions");diff --git a/apps/erp/app/routes/_public+/callback.tsx b/apps/erp/app/routes/_public+/callback.tsxindex 93bb1a9852..c860ad1906 100644--- a/apps/erp/app/routes/_public+/callback.tsx+++ b/apps/erp/app/routes/_public+/callback.tsx@@ -18,6 +18,7 @@ import {} from "@carbon/auth/session.server";import { getUserByEmail } from "@carbon/auth/users.server";import { validator } from "@carbon/form";+import { AccountLockout, redis } from "@carbon/kv";import {Alert,AlertDescription,@@ -94,6 +95,11 @@ export async function action({ request }: ActionFunctionArgs) {const user = await getUserByEmail(authSession.email);if (user?.data) {+ // Genuine login (magic-link / OAuth first factor verified) — clear any+ // accumulated per-account lockout state (NIST 3.1.8 reset-on-success). Runs+ // before the TOTP gate so an MFA-enrolled user's counter clears too.+ await new AccountLockout({ redis }).reset(authSession.email);+// TOTP gate: park the tokens in the pending-MFA key and challenge before// any full session cookie exists. The /mfa action mints the real session.if (await userHasVerifiedTotpFactor(authSession.userId)) {diff --git a/apps/erp/app/routes/_public+/login.tsx b/apps/erp/app/routes/_public+/login.tsxindex 744a4cf457..652c17b54b 100644--- a/apps/erp/app/routes/_public+/login.tsx+++ b/apps/erp/app/routes/_public+/login.tsx@@ -11,6 +11,7 @@ import {RATE_LIMIT} from "@carbon/auth";import {+ logAuthEvent,sendMagicLink,signInWithBypassEmail,verifyAuthSession@@ -24,7 +25,7 @@ import {import { getUserByEmail } from "@carbon/auth/users.server";import { sendVerificationCode } from "@carbon/auth/verification.server";import { Hidden, Input, Submit, ValidatedForm, validator } from "@carbon/form";-import { Ratelimit, redis } from "@carbon/kv";+import { AccountLockout, Ratelimit, redis } from "@carbon/kv";import {Alert,AlertDescription,@@ -101,6 +102,7 @@ export async function action({ request }: ActionFunctionArgs) {const { success } = await ratelimit.limit(ip);if (!success) {+ logAuthEvent("login_rate_limited", { ip });return data(error(null, "Rate limit exceeded"),await flash(request, error(null, "Rate limit exceeded"))@@ -117,6 +119,29 @@ export async function action({ request }: ActionFunctionArgs) {const { email, turnstileToken } = validation.data;+ // Per-account lockout (NIST 800-171 3.1.8) — layered ON TOP of the IP limit+ // above. Keyed by the normalized email so an attacker rotating IPs, or+ // hammering one account to spam magic links / probe existence, is bounded per+ // account. The reply is deliberately GENERIC (never reveals whether the+ // account exists) to avoid user enumeration.+ const lockout = new AccountLockout({ redis });+ const LOCKED_MESSAGE =+ "For your security, sign-in for this account is temporarily paused. Please try again later.";++ const lockStatus = await lockout.status(email);+ if (lockStatus.locked) {+ logAuthEvent("login_locked", {+ actor: email,+ ip,+ reason: "account temporarily locked",+ retryAfterSeconds: lockStatus.retryAfterSeconds+ });+ return data(+ { success: false, message: LOCKED_MESSAGE },+ await flash(request, error(null, LOCKED_MESSAGE))+ );+ }+if (CarbonEdition === Edition.Cloud &&CLOUDFLARE_TURNSTILE_SITE_KEY !== "1x00000000000000000000AA"@@ -148,6 +173,23 @@ export async function action({ request }: ActionFunctionArgs) {}}+ // Count this attempt against the account. If it tips the account past the+ // window's allowance, an exponential-backoff lock engages now and we reject+ // this request with the same generic message.+ const attempt = await lockout.recordFailure(email);+ if (attempt.locked) {+ logAuthEvent("login_locked", {+ actor: email,+ ip,+ reason: "account temporarily locked",+ retryAfterSeconds: attempt.retryAfterSeconds+ });+ return data(+ { success: false, message: LOCKED_MESSAGE },+ await flash(request, error(null, LOCKED_MESSAGE))+ );+ }+const user = await getUserByEmail(email);const devBypassEmail = process.env.DEV_BYPASS_EMAIL;@@ -158,6 +200,9 @@ export async function action({ request }: ActionFunctionArgs) {) {const authSession = await signInWithBypassEmail(email);if (authSession) {+ // Genuine completed login — clear any accumulated lockout state.+ await lockout.reset(email);+ logAuthEvent("login_success", { actor: email, ip, method: "bypass" });const sessionCookie = await setAuthSession(request, { authSession });return redirect(path.to.authenticatedRoot, {headers: [["Set-Cookie", sessionCookie]]@@ -169,13 +214,24 @@ export async function action({ request }: ActionFunctionArgs) {const magicLink = await sendMagicLink(email);if (magicLink.error) {+ logAuthEvent("login_failed", {+ actor: email,+ ip,+ reason: "magic link send failed"+ });return data(error(magicLink, "Failed to send magic link"),await flash(request, error(magicLink, "Failed to send magic link")));}+ logAuthEvent("magic_link_sent", { actor: email, ip });return { success: true, mode: "login" };} else if (CarbonEdition === Edition.Enterprise) {+ logAuthEvent("login_failed", {+ actor: email,+ ip,+ reason: "user record not found"+ });return data({ success: false, message: "User record not found" },await flash(request, error(null, "Failed to sign in"))diff --git a/apps/erp/app/routes/_public+/unlock.tsx b/apps/erp/app/routes/_public+/unlock.tsxnew file mode 100644index 0000000000..1df322587d--- /dev/null+++ b/apps/erp/app/routes/_public+/unlock.tsx@@ -0,0 +1,485 @@+import {+ assertIsPost,+ error,+ isAuthProviderEnabled,+ RATE_LIMIT,+ safeRedirect+} from "@carbon/auth";+import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { userHasVerifiedTotpFactor } from "@carbon/auth/mfa.server";+import { verifyPasskeyAuthentication } from "@carbon/auth/passkey.server";+import {+ completeMfaChallenge,+ flash,+ getAuthSession,+ isSessionExpiredAbsolute,+ isSessionIdleLocked,+ setAuthSession+} from "@carbon/auth/session.server";+import {+ Hidden,+ InputOTP,+ Submit,+ useControlField,+ ValidatedForm,+ validator+} from "@carbon/form";+import { Ratelimit, redis } from "@carbon/kv";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ Heading,+ toast,+ VStack+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import type { WebAuthnCredential } from "@simplewebauthn/browser";+import {+ browserSupportsWebAuthn,+ startAuthentication+} from "@simplewebauthn/browser";+import { useEffect, useRef, useState } from "react";+import { LuFingerprint, LuLock } from "react-icons/lu";+import type {+ ActionFunctionArgs,+ LoaderFunctionArgs,+ MetaFunction+} from "react-router";+import {+ data,+ Form,+ redirect,+ useFetcher,+ useLoaderData,+ useSearchParams+} from "react-router";+import { z } from "zod";++import type { Result } from "~/types";+import { path } from "~/utils/path";++export const meta: MetaFunction = () => {+ return [{ title: "Carbon | Session Locked" }];+};++const unlockValidator = z.object({+ code: z.string().length(6),+ redirectTo: z.string().optional(),+ // "true" when submitted from the in-app SessionLockOverlay: re-auth resumes the+ // session IN PLACE (rotated cookie returned as data), so the overlay can clear+ // its lock without a full navigation. A full-page /unlock submit omits it and+ // gets the redirect back to `redirectTo` instead.+ inline: z.string().optional()+});++/** Does this user have at least one registered passkey? (Cheap count, head-only.) */+async function userHasPasskey(userId: string): Promise<boolean> {+ const serviceRole = getCarbonServiceRole();+ const { count, error: countError } = await (serviceRole as any)+ .from("passkeyCredential")+ .select("id", { count: "exact", head: true })+ .eq("userId", userId);+ if (countError) return false;+ return (count ?? 0) > 0;+}++export async function loader({ request }: LoaderFunctionArgs) {+ // Read the session DIRECTLY (never requireAuthSession — that is what redirects+ // here, which would loop). Only a genuinely idle-locked session stays.+ const authSession = await getAuthSession(request);+ if (!authSession) throw redirect(path.to.login);++ const redirectTo =+ new URL(request.url).searchParams.get("redirectTo") ?? undefined;++ // Absolute cap already passed → termination wins over lock; force full re-login.+ if (isSessionExpiredAbsolute(authSession)) {+ throw redirect(path.to.login);+ }+ // Not actually locked → nothing to unlock, send them where they were going.+ if (!isSessionIdleLocked(authSession)) {+ throw redirect(safeRedirect(redirectTo, path.to.authenticatedRoot));+ }++ // Unlock credentials: a verified TOTP factor and/or a registered passkey.+ // Either can re-establish access here; a session with neither cannot unlock+ // (should not happen under CONTROLLED_ENVIRONMENT, where MFA is forced) —+ // fall through to a full re-login.+ const [hasTotp, hasPasskey] = await Promise.all([+ userHasVerifiedTotpFactor(authSession.userId),+ isAuthProviderEnabled("passkey")+ ? userHasPasskey(authSession.userId)+ : Promise.resolve(false)+ ]);++ if (!hasTotp && !hasPasskey) {+ throw redirect(path.to.login);+ }++ return { hasTotp, hasPasskey };+}++/**+ * Passkey unlock. Unlike a login, this RESUMES the existing locked session in+ * place — it never mints a new one. The presented passkey must belong to the+ * locked session's user, or another user's passkey could unlock this session.+ */+async function unlockWithPasskey(request: Request) {+ if (!isAuthProviderEnabled("passkey")) {+ return data(error(null, "Passkeys are disabled"), { status: 404 });+ }++ // The session we are resuming. If there is none, there is nothing to unlock.+ const authSession = await getAuthSession(request);+ if (!authSession?.accessToken || !authSession?.refreshToken) {+ return data(error(null, "Your session has ended. Please sign in again."), {+ status: 401+ });+ }++ let body: {+ credential?: any;+ challengeId?: string;+ redirectTo?: string;+ inline?: string;+ };+ try {+ body = await request.json();+ } catch {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 400+ });+ }++ const {+ credential: webAuthnResponse,+ challengeId,+ redirectTo,+ inline+ } = body;+ if (!webAuthnResponse?.id || !challengeId) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 400+ });+ }++ const serviceRole = getCarbonServiceRole();++ const { data: credRow, error: credError } = await (serviceRole as any)+ .from("passkeyCredential")+ .select("id, userId, publicKey, counter, transports")+ .eq("id", webAuthnResponse.id)+ .maybeSingle();++ if (credError || !credRow) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 404+ });+ }++ // SECURITY: the passkey MUST belong to the locked session's user. Otherwise a+ // different user's passkey could resume this session in place.+ if (credRow.userId !== authSession.userId) {+ return data(error(null, "That passkey does not match this session."), {+ status: 403+ });+ }++ const storedCredential: WebAuthnCredential = {+ id: credRow.id,+ publicKey: new Uint8Array(Buffer.from(credRow.publicKey, "base64url")),+ counter: credRow.counter,+ transports: credRow.transports ?? null+ };++ try {+ const { newCounter } = await verifyPasskeyAuthentication(+ challengeId,+ webAuthnResponse,+ storedCredential+ );++ const returnedHandle = webAuthnResponse.response?.userHandle;+ if (returnedHandle) {+ const expectedHandle = Buffer.from(+ new TextEncoder().encode(credRow.userId)+ ).toString("base64url");+ if (returnedHandle !== expectedHandle) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 401+ });+ }+ }++ const { error: counterError } = await (serviceRole as any)+ .from("passkeyCredential")+ .update({ counter: newCounter, lastUsedAt: new Date().toISOString() })+ .eq("id", credRow.id);++ if (counterError) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 500+ });+ }++ // Resume in place: clear the idle-lock clock, and reset the absolute-cap+ // clock (a passkey re-auth is a fresh authentication, matching the TOTP+ // unlock via makeAuthSession). mfaVerified/console are preserved by spread.+ const resumed = {+ ...authSession,+ createdAt: Date.now(),+ lastActiveAt: Date.now()+ };+ const sessionCookie = await setAuthSession(request, {+ authSession: resumed+ });++ // In-app overlay: return the rotated cookie as data (no navigation) so the+ // overlay clears its lock in place and React Router revalidates with the+ // fresh session. Full-page submit: redirect back to where the lock hit.+ if (inline === "true") {+ return data<Result>(+ { success: true },+ { headers: [["Set-Cookie", sessionCookie]] }+ );+ }++ return redirect(safeRedirect(redirectTo, path.to.authenticatedRoot), {+ headers: [["Set-Cookie", sessionCookie]]+ });+ } catch {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 401+ });+ }+}++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";++ const ratelimit = new Ratelimit({+ redis,+ limiter: Ratelimit.slidingWindow(RATE_LIMIT, "1 h"),+ analytics: true+ });++ const { success } = await ratelimit.limit(ip);++ if (!success) {+ return data(+ error(null, "Rate limit exceeded"),+ await flash(request, error(null, "Rate limit exceeded"))+ );+ }++ // Passkey unlock arrives as JSON (the credential assertion); TOTP unlock is a+ // form POST. Branch on content type — the TOTP path below is unchanged.+ const contentType = request.headers.get("content-type") ?? "";+ if (contentType.includes("application/json")) {+ return unlockWithPasskey(request);+ }++ const validation = await validator(unlockValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return error(validation.error, "Invalid code");+ }++ const { code, redirectTo, inline } = validation.data;++ // Re-auth in place: completeMfaChallenge rotates tokens in the same cookie and+ // (via makeAuthSession) re-stamps createdAt/lastActiveAt = now, so the unlocked+ // session is neither locked nor expired.+ const result = await completeMfaChallenge(request, code);++ if (!result.success) {+ if (result.reason === "no-session") {+ throw redirect(path.to.login);+ }+ return data(+ error(null, "Invalid or expired code"),+ await flash(request, error(null, "Invalid or expired code"))+ );+ }++ // In-app overlay: return the rotated cookie as data (no navigation) so the+ // overlay clears its lock in place and React Router revalidates with the fresh+ // session. Full-page submit: redirect back to where the lock interrupted.+ if (inline === "true") {+ return data<Result>(+ { success: true },+ { headers: [["Set-Cookie", result.sessionCookie]] }+ );+ }++ return redirect(+ safeRedirect(result.redirectTo ?? redirectTo, path.to.authenticatedRoot),+ { headers: [["Set-Cookie", result.sessionCookie]] }+ );+}++/**+ * Lives inside ValidatedForm so it can reach the shared `code` field state. A+ * rejected code must be cleared so the auto-submit effect (fires on length === 6)+ * can run again. Mirrors MfaRoute's MfaCodeField.+ */+function UnlockCodeField({ result }: { result?: Result }) {+ const [, setCode] = useControlField<string>("code");+ const lastResult = useRef(result);++ useEffect(() => {+ if (result === lastResult.current) return;+ lastResult.current = result;+ if (result?.success === false) setCode("");+ }, [result, setCode]);++ return <InputOTP name="code" label="" />;+}++export default function UnlockRoute() {+ const { t } = useLingui();+ const { hasTotp, hasPasskey } = useLoaderData<typeof loader>();+ const [searchParams] = useSearchParams();+ const redirectTo = searchParams.get("redirectTo") ?? undefined;++ const fetcher = useFetcher<Result>();++ const [passkeySupported, setPasskeySupported] = useState(false);+ const [passkeyLoading, setPasskeyLoading] = useState(false);++ useEffect(() => {+ if (hasPasskey && browserSupportsWebAuthn()) setPasskeySupported(true);+ }, [hasPasskey]);++ const onUnlockWithPasskey = async () => {+ setPasskeyLoading(true);+ try {+ const optRes = await fetch("/api/passkey/authenticate/options", {+ method: "POST"+ });+ if (!optRes.ok) throw new Error("Failed to get options");+ const { challengeId, ...options } = await optRes.json();++ const credential = await startAuthentication({+ optionsJSON: options+ } as any);++ // No `inline` → the action redirects; the fetcher follows it and navigates+ // back to where the lock interrupted, with the resumed session cookie.+ fetcher.submit(+ { credential, challengeId, redirectTo: redirectTo ?? null } as any,+ { method: "post", action: "/unlock", encType: "application/json" }+ );+ } catch (e: any) {+ if (e?.name !== "NotAllowedError" && e?.name !== "AbortError") {+ toast.error(t`Passkey unlock failed`);+ }+ setPasskeyLoading(false);+ }+ };++ return (+ <>+ <div className="flex justify-center mb-8">+ <img+ src="/carbon-mark-light.svg"+ alt={t`Carbon Logo`}+ className="w-24 dark:hidden"+ />+ <img+ src="/carbon-mark-dark.svg"+ alt={t`Carbon Logo`}+ className="w-24 hidden dark:block"+ />+ </div>+ <div className="rounded-lg md:bg-card md:border md:border-border md:shadow-lg p-8 w-[380px]">+ <VStack spacing={4} className="items-center">+ <LuLock className="w-8 h-8 text-muted-foreground" />+ <Heading size="h3">+ <Trans>Session locked</Trans>+ </Heading>+ <p className="text-muted-foreground tracking-tight text-sm text-center">+ <Trans>Your session was locked after inactivity.</Trans>+ </p>++ {fetcher.data?.success === false && fetcher.data?.message && (+ <Alert variant="destructive">+ <LuLock className="w-4 h-4" />+ <AlertTitle>+ <Trans>Unable to unlock</Trans>+ </AlertTitle>+ <AlertDescription>{fetcher.data?.message}</AlertDescription>+ </Alert>+ )}++ {hasPasskey && passkeySupported && (+ <Button+ type="button"+ size="lg"+ variant="secondary"+ className="w-full"+ leftIcon={<LuFingerprint />}+ onClick={onUnlockWithPasskey}+ isDisabled={passkeyLoading || fetcher.state !== "idle"}+ isLoading={passkeyLoading}+ >+ <Trans>Unlock with passkey</Trans>+ </Button>+ )}++ {hasTotp && hasPasskey && passkeySupported && (+ <div className="flex items-center gap-3 w-full">+ <div className="h-px flex-1 bg-border" />+ <span className="text-xs text-muted-foreground uppercase">+ <Trans>or</Trans>+ </span>+ <div className="h-px flex-1 bg-border" />+ </div>+ )}++ {hasTotp && (+ <ValidatedForm+ fetcher={fetcher}+ validator={unlockValidator}+ method="post"+ className="w-full"+ >+ <Hidden name="redirectTo" value={redirectTo} />+ <VStack spacing={4} className="items-center">+ <p className="text-muted-foreground tracking-tight text-sm text-center">+ <Trans>+ Enter the 6-digit code from your authenticator app to+ resume.+ </Trans>+ </p>+ <UnlockCodeField result={fetcher.data} />+ <Submit+ size="lg"+ className="w-full"+ withBlocker={false}+ isDisabled={fetcher.state !== "idle"}+ >+ <Trans>Unlock</Trans>+ </Submit>+ </VStack>+ </ValidatedForm>+ )}+ </VStack>+ <Form+ method="post"+ action={path.to.logout}+ className="flex justify-center mt-4"+ >+ <Button type="submit" variant="link" size="sm">+ <Trans>Sign out instead</Trans>+ </Button>+ </Form>+ </div>+ </>+ );+}diff --git a/apps/erp/app/routes/api+/passkey.authenticate.verify.ts b/apps/erp/app/routes/api+/passkey.authenticate.verify.tsindex e1aa1c4c0b..9143e179bb 100644--- a/apps/erp/app/routes/api+/passkey.authenticate.verify.ts+++ b/apps/erp/app/routes/api+/passkey.authenticate.verify.ts@@ -8,6 +8,7 @@ import {setAuthSession,setPendingMfaSession} from "@carbon/auth/session.server";+import { AccountLockout, redis } from "@carbon/kv";import type { WebAuthnCredential } from "@simplewebauthn/browser";import type { ActionFunctionArgs } from "react-router";import { data, redirect } from "react-router";@@ -115,6 +116,10 @@ export async function action({ request }: ActionFunctionArgs) {});}+ // Genuine passkey login verified — clear any per-account lockout state+ // (NIST 3.1.8 reset-on-success), before the TOTP gate below.+ await new AccountLockout({ redis }).reset(authUser.user.email);+const employeeCompanies = await getEmployeeCompanies(serviceRole,credRow.userIddiff --git a/apps/erp/app/routes/api+/search.tsx b/apps/erp/app/routes/api+/search.tsxindex cbafe16a5f..079d326e89 100644--- a/apps/erp/app/routes/api+/search.tsx+++ b/apps/erp/app/routes/api+/search.tsx@@ -59,9 +59,7 @@ export async function loader({ request }: LoaderFunctionArgs) {const permission = claims.permissions[permissionModule];if (!permission) return false;// Check if user has view permission for this company- return (- permission.view.includes("0") || permission.view.includes(companyId)- );+ return permission.view.includes(companyId);}).map(([entityType]) => entityType);diff --git a/apps/erp/app/routes/api+/session.heartbeat.ts b/apps/erp/app/routes/api+/session.heartbeat.tsnew file mode 100644index 0000000000..215087d601--- /dev/null+++ b/apps/erp/app/routes/api+/session.heartbeat.ts@@ -0,0 +1,20 @@+import { assertIsPost } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { touchAuthSession } from "@carbon/auth/session.server";+import type { ActionFunctionArgs } from "react-router";+import { data } from "react-router";++// Activity heartbeat for the NIST 3.1.10 idle lock. The client posts here (throttled)+// only while the user is genuinely active; each call re-commits the session cookie with+// lastActiveAt = now. requirePermissions runs requireAuthSession, so once the session is+// already idle-locked this redirects to /unlock instead of resuming it — only a real+// re-auth clears the lock. Its job is to keep an ACTIVE session from ever locking.+export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ await requirePermissions(request, {});+ const cookie = await touchAuthSession(request);+ return data(+ { ok: Boolean(cookie) },+ cookie ? { headers: { "Set-Cookie": cookie } } : undefined+ );+}diff --git a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.tsindex 0973702930..3014c8f6da 100644--- a/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts+++ b/apps/erp/app/routes/api+/webhook.paperless-parts.$companyId.ts@@ -1,4 +1,5 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { resolveIntegrationSecrets } from "@carbon/ee";import { trigger } from "@carbon/jobs";import { getLogger } from "@carbon/logger";import crypto from "crypto";@@ -58,9 +59,16 @@ export async function action({ request, params }: ActionFunctionArgs) {}try {- const { apiKey, secretKey } = integrationValidator.parse(- paperlessPartsIntegration.data.metadata+ // Secret material (apiKey/secretKey) lives in Supabase Vault; merge it back+ // so we read the same shape as before. serviceRole is required for vault RPCs.+ const resolvedMetadata = await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "paperless-parts",+ paperlessPartsIntegration.data.metadata,+ paperlessPartsIntegration.data.secretRef);+ const { apiKey, secretKey } = integrationValidator.parse(resolvedMetadata);// The signature provided by Paperless Parts is computed using the Python json.dumps() function,// which formats the JSON string with newlines and whitespace.@@ -95,7 +103,15 @@ export async function action({ request, params }: ActionFunctionArgs) {timestamp);- if (signature !== expectedSignature) {+ // Constant-time comparison (SC-13): a plain `!==` leaks, via timing, how many+ // leading bytes of a forged signature are correct. Guard length first —+ // timingSafeEqual throws on unequal-length buffers.+ const signatureBuffer = Buffer.from(signature);+ const expectedBuffer = Buffer.from(expectedSignature);+ if (+ signatureBuffer.length !== expectedBuffer.length ||+ !crypto.timingSafeEqual(signatureBuffer, expectedBuffer)+ ) {return data({ success: false }, { status: 401 });}diff --git a/apps/erp/app/routes/health.test.ts b/apps/erp/app/routes/health.test.tsindex 30bf91e26d..6d10785400 100644--- a/apps/erp/app/routes/health.test.ts+++ b/apps/erp/app/routes/health.test.ts@@ -1,29 +1,59 @@import { redis } from "@carbon/kv";-import { describe, expect, it, vi } from "vitest";+import { beforeEach, describe, expect, it, vi } from "vitest";import { loader } from "./health";vi.mock("@carbon/kv", () => ({redis: { ping: vi.fn() }}));+const select = vi.fn();++vi.mock("@carbon/auth/client.server", () => ({+ getCarbonServiceRole: () => ({+ from: () => ({ select })+ })+}));+describe("health loader", () => {- it("reports degraded/down when redis.ping resolves null", async () => {+ beforeEach(() => {+ // Default: every dependency healthy.+ vi.mocked(redis.ping).mockResolvedValue("PONG");+ select.mockResolvedValue({ error: null });+ });++ it("reports healthy when every dependency is up", async () => {+ const response = await loader();+ const body = await response.json();++ expect(response.status).toBe(200);+ expect(body).toEqual({+ status: "healthy",+ checks: {+ redis: "up",+ database: "up"+ }+ });+ });++ it("stays 200 but reports degraded when redis is down", async () => {vi.mocked(redis.ping).mockResolvedValue(null as any);const response = await loader();const body = await response.json();expect(response.status).toBe(200);- expect(body).toEqual({ status: "degraded", redis: "down" });+ expect(body.status).toBe("degraded");+ expect(body.checks.redis).toBe("down");});- it("reports healthy/up when redis.ping resolves PONG", async () => {- vi.mocked(redis.ping).mockResolvedValue("PONG");+ it("reports the database down (never throws) on a query error", async () => {+ select.mockResolvedValue({ error: { message: "boom" } });const response = await loader();const body = await response.json();expect(response.status).toBe(200);- expect(body).toEqual({ status: "healthy", redis: "up" });+ expect(body.status).toBe("degraded");+ expect(body.checks.database).toBe("down");});});diff --git a/apps/erp/app/routes/health.ts b/apps/erp/app/routes/health.tsindex 8f4680399a..ff409d74b0 100644--- a/apps/erp/app/routes/health.ts+++ b/apps/erp/app/routes/health.ts@@ -1,12 +1,49 @@+import { getCarbonServiceRole } from "@carbon/auth/client.server";import { redis } from "@carbon/kv";-// Public health check: no auth. Redis is resilience-wrapped, so ping() resolves-// null instead of throwing when Redis is unreachable.+// Public health check: no auth, and it ALWAYS returns HTTP 200. This endpoint+// backs the load balancer's target-group health check, so a transient dependency+// blip must not mark every task unhealthy and cycle the whole service. The body+// reports per-dependency status for monitoring (NIST 800-171 3.14.6) instead.+const CHECK_TIMEOUT_MS = 2_000;++// Resolve a dependency probe to a boolean, treating a throw or a slow response as+// "down" so one hung dependency can't hang the endpoint.+function probe(check: () => Promise<boolean>): Promise<boolean> {+ return Promise.race([+ check().catch(() => false),+ new Promise<boolean>((resolve) =>+ setTimeout(() => resolve(false), CHECK_TIMEOUT_MS)+ )+ ]);+}+export async function loader() {- const ping = await redis.ping();- const up = !!ping;+ const client = getCarbonServiceRole();++ const [redisUp, databaseUp] = await Promise.all([+ // redis is resilience-wrapped: ping() resolves null instead of throwing when+ // Redis is unreachable.+ probe(async () => !!(await redis.ping())),+ // Cheapest possible round-trip to Postgres via PostgREST: HEAD with an+ // estimated count, no rows returned.+ probe(async () => {+ const { error } = await client+ .from("company")+ .select("id", { head: true, count: "estimated" });+ return !error;+ })+ ]);++ const checks = {+ redis: redisUp ? "up" : "down",+ database: databaseUp ? "up" : "down"+ };++ const healthy = redisUp && databaseUp;+return Response.json(- { status: up ? "healthy" : "degraded", redis: up ? "up" : "down" },+ { status: healthy ? "healthy" : "degraded", checks },{ status: 200 });}diff --git a/apps/erp/app/routes/x+/_layout.tsx b/apps/erp/app/routes/x+/_layout.tsxindex b1e2def44a..a6f31201c2 100644--- a/apps/erp/app/routes/x+/_layout.tsx+++ b/apps/erp/app/routes/x+/_layout.tsx@@ -4,7 +4,10 @@ import {CONTROLLED_ENVIRONMENT,getCarbon,getMESUrl,- ITAR_RIDER_PDF_PATH+ ITAR_RIDER_PDF_PATH,+ isAuthProviderEnabled,+ SESSION_HEARTBEAT_MS,+ SESSION_IDLE_LOCK_MS} from "@carbon/auth";import { getCompanyId, setCompanyId } from "@carbon/auth/company.server";import { userHasVerifiedTotpFactor } from "@carbon/auth/mfa.server";@@ -54,9 +57,10 @@ import {import { RealtimeDataProvider } from "~/components";import { PrimaryNavigation, Topbar } from "~/components/Layout";import MfaEnrollmentRequired from "~/components/MfaEnrollmentRequired";+import SessionLockOverlay from "~/components/SessionLockOverlay";import { TimeCardWarning } from "~/components/TimeCardWarning";import TrainingPanel from "~/components/TrainingPanel";-import { usePermissions } from "~/hooks";+import { useIdle, usePermissions } from "~/hooks";import { useTrainingPanel } from "~/hooks/useTrainingPanel";import { AgentRoot } from "~/modules/agent/ui/AgentRoot";import { getOpenClockEntry } from "~/modules/people";@@ -291,6 +295,17 @@ export async function loader({ request }: LoaderFunctionArgs) {required: mfaRequired && !mfaEnrolled,controlledEnvironment: CONTROLLED_ENVIRONMENT},+ // Session lock/termination (NIST 3.1.10/3.1.11) — client idle UX config. The+ // ERP shell already redirected any console session to MES above, so no console+ // exemption is needed here. Server enforcement lives in requireAuthSession.+ sessionTimeout: {+ enabled: CONTROLLED_ENVIRONMENT,+ idleMs: SESSION_IDLE_LOCK_MS,+ heartbeatMs: SESSION_HEARTBEAT_MS,+ // Offer passkey re-auth on the lock overlay when the provider is enabled;+ // the /unlock action gates the actual credential, TOTP stays available.+ hasPasskeyAuth: isAuthProviderEnabled("passkey")+ },supplierApprovalRequired: isApprovalRequired(client, "supplier", companyId),openClockEntry: companySettings.data?.timeCardEnabled? getOpenClockEntry(client, userId, companyId)@@ -307,12 +322,22 @@ export default function AuthenticatedRoute() {openClockEntry,printerRoutes,itarCertification,- mfaEnrollment+ mfaEnrollment,+ sessionTimeout} = useLoaderData<typeof loader>();const navigate = useNavigate();const permissions = usePermissions();const { isOpen, training, dismiss } = useTrainingPanel();+ // Session lock (NIST 3.1.10) — client idle UX only; the server enforces in+ // requireAuthSession. Inert unless CONTROLLED_ENVIRONMENT.+ const { isIdle, resume } = useIdle({+ enabled: sessionTimeout.enabled,+ idleMs: sessionTimeout.idleMs,+ heartbeatMs: sessionTimeout.heartbeatMs,+ heartbeatUrl: "/api/session/heartbeat"+ });+useNProgress();useKeyboardWedge({test: (input) => input.startsWith(MES_URL) || input.startsWith(ERP_URL),@@ -407,6 +432,14 @@ export default function AuthenticatedRoute() {return (<div className="h-[100dvh] flex flex-col">+ {/* Idle lock conceals the app (3.1.10). Not shown over the ITAR/MFA gates —+ the user has not fully entered the app there. */}+ {isIdle && !itarScreen && !mfaScreen && (+ <SessionLockOverlay+ onUnlocked={resume}+ hasPasskeyAuth={sessionTimeout.hasPasskeyAuth}+ />+ )}{(itarScreen ?? mfaScreen) ? ((itarScreen ?? mfaScreen)) : (diff --git a/apps/erp/app/routes/x+/account+/security.tsx b/apps/erp/app/routes/x+/account+/security.tsxindex 7f996e39b6..6d97ade4c2 100644--- a/apps/erp/app/routes/x+/account+/security.tsx+++ b/apps/erp/app/routes/x+/account+/security.tsx@@ -32,6 +32,7 @@ import {VStack} from "@carbon/react";import { msg } from "@lingui/core/macro";+import { Trans, useLingui } from "@lingui/react/macro";import { startRegistration } from "@simplewebauthn/browser";import { useState } from "react";import {@@ -143,6 +144,7 @@ export async function action({ request }: ActionFunctionArgs) {}export default function AccountSecurity() {+ const { t } = useLingui();const { passkeys, totpFactors } = useLoaderData<typeof loader>();const deleteFetcher = useFetcher();const renameFetcher = useFetcher();@@ -167,7 +169,7 @@ export default function AccountSecurity() {enrollAction: path.to.mfaEnroll,verifyAction: path.to.mfaVerify,onVerified: () => {- toast.success("Two-factor authentication enabled");+ toast.success(t`Two-factor authentication enabled`);resetMfaEnrollment();revalidate();}@@ -192,7 +194,7 @@ export default function AccountSecurity() {const body = await res.json().catch(() => ({}));throw new Error(body.message ?? INVALID_CODE_MESSAGE);}- toast.success("Two-factor authentication disabled");+ toast.success(t`Two-factor authentication disabled`);setRemoveFactor(null);setRemoveCode("");revalidate();@@ -206,7 +208,7 @@ export default function AccountSecurity() {const onAddPasskey = async () => {if (!passkeysEnabled) {- toast.error("Passkeys are disabled");+ toast.error(t`Passkeys are disabled`);return;}setRegistering(true);@@ -215,7 +217,7 @@ export default function AccountSecurity() {method: "POST"});- if (!optRes.ok) throw new Error("Failed to get options");+ if (!optRes.ok) throw new Error(t`Failed to get options`);const options = await optRes.json();const credential = await startRegistration({@@ -230,15 +232,15 @@ export default function AccountSecurity() {if (!verifyRes.ok) {const body = await verifyRes.json().catch(() => ({}));- throw new Error(body.message ?? "Registration failed");+ throw new Error(body.message ?? t`Registration failed`);}const result = await verifyRes.json();- toast.success(`${result.credentialName ?? "Passkey"} registered`);+ toast.success(t`${result.credentialName ?? "Passkey"} registered`);revalidate();} catch (e: any) {if (e?.name !== "NotAllowedError" && e?.name !== "AbortError") {- toast.error(e.message ?? "Failed to register passkey");+ toast.error(e.message ?? t`Failed to register passkey`);}} finally {setRegistering(false);@@ -283,10 +285,14 @@ export default function AccountSecurity() {<CardHeader><HStack className="justify-between"><div>- <CardTitle>Passkeys</CardTitle>+ <CardTitle>+ <Trans>Passkeys</Trans>+ </CardTitle><CardDescription>- Sign in with biometrics instead of a magic link. Passkeys are- secured by Face ID, Touch ID, or your device PIN.+ <Trans>+ Sign in with biometrics instead of a magic link. Passkeys+ are secured by Face ID, Touch ID, or your device PIN.+ </Trans></CardDescription></div><Button@@ -297,38 +303,48 @@ export default function AccountSecurity() {isLoading={registering}leftIcon={<LuFingerprint className="size-4" />}>- Add Passkey+ <Trans>Add Passkey</Trans></Button></HStack></CardHeader><CardContent>{passkeys.length === 0 ? (<p className="text-sm text-muted-foreground">- No passkeys registered yet.+ <Trans>No passkeys registered yet.</Trans></p>) : (- <HStack spacing={2}>+ <VStack spacing={2}>{passkeys.map((pk) => (<HStackkey={pk.id}- className="justify-between p-3 rounded-md border border-border space-x-4 cursor-pointer hover:bg-muted/40 transition-colors"+ spacing={4}+ className="w-full justify-between p-3 rounded-lg border border-border cursor-pointer transition-colors hover:bg-muted/40"onClick={() => openPasskeyDrawer(pk)}>- <HStack spacing={3} className="items-start">- <LuFingerprint className="size-4 text-muted-foreground shrink-0 mt-1" />- <VStack spacing={0}>- <p className="text-sm font-medium">+ <HStack spacing={3} className="min-w-0">+ <span className="flex items-center justify-center size-9 rounded-lg bg-muted shrink-0">+ <LuFingerprint className="size-4 text-muted-foreground" />+ </span>+ <VStack spacing={0} className="min-w-0">+ <p className="text-sm font-medium truncate">{pk.credentialName}</p><p className="text-xs text-muted-foreground">- Added <DateTime value={pk.createdAt} variant="date" />+ <Trans>Added</Trans>{" "}+ <DateTime value={pk.createdAt} variant="date" />{pk.lastUsedAt && (<>- {" · "}Last used{" "}+ {" · "}+ <Trans>Last used</Trans>{" "}<DateTime value={pk.lastUsedAt} variant="date" /></>)}- {pk.backedUp && " · Synced"}+ {pk.backedUp && (+ <>+ {" · "}+ <Trans>Synced</Trans>+ </>+ )}</p></VStack></HStack>@@ -338,15 +354,15 @@ export default function AccountSecurity() {e.stopPropagation();setConfirmDeleteId(pk.id);}}- aria-label="Delete passkey"+ aria-label={t`Delete passkey`}type="button"variant="ghost"icon={<LuTrash2 />}- className="cursor-pointer"+ className="shrink-0 cursor-pointer text-muted-foreground hover:text-foreground"/></HStack>))}- </HStack>+ </VStack>)}</CardContent></Card>@@ -356,10 +372,14 @@ export default function AccountSecurity() {<CardHeader><HStack className="justify-between"><div>- <CardTitle>Two-factor authentication</CardTitle>+ <CardTitle>+ <Trans>Two-factor authentication</Trans>+ </CardTitle><CardDescription>- Require a 6-digit code from an authenticator app when signing- in.+ <Trans>+ Require a 6-digit code from an authenticator app when signing+ in.+ </Trans></CardDescription></div><Button@@ -370,30 +390,33 @@ export default function AccountSecurity() {isLoading={mfaStarting}leftIcon={<LuShieldCheck className="size-4" />}>- Add Authenticator App+ <Trans>Add Authenticator App</Trans></Button></HStack></CardHeader><CardContent>{totpFactors.length === 0 ? (<p className="text-sm text-muted-foreground">- Two-factor authentication is not enabled.+ <Trans>Two-factor authentication is not enabled.</Trans></p>) : (- <HStack spacing={2}>+ <VStack spacing={2}>{totpFactors.map((factor) => (<HStackkey={factor.id}- className="justify-between p-3 rounded-md border border-border space-x-4"+ spacing={4}+ className="w-full justify-between p-3 rounded-lg border border-border">- <HStack spacing={3} className="items-start">- <LuShieldCheck className="size-4 text-muted-foreground shrink-0 mt-1" />- <VStack spacing={0}>- <p className="text-sm font-medium">- {factor.friendlyName ?? "Authenticator app"}+ <HStack spacing={3} className="min-w-0">+ <span className="flex items-center justify-center size-9 rounded-lg bg-muted shrink-0">+ <LuShieldCheck className="size-4 text-muted-foreground" />+ </span>+ <VStack spacing={0} className="min-w-0">+ <p className="text-sm font-medium truncate">+ {factor.friendlyName ?? t`Authenticator app`}</p><p className="text-xs text-muted-foreground">- Added{" "}+ <Trans>Added</Trans>{" "}<DateTime value={factor.createdAt} variant="date" /></p></VStack>@@ -404,15 +427,15 @@ export default function AccountSecurity() {setRemoveCode("");setRemoveFactor(factor);}}- aria-label="Remove authenticator app"+ aria-label={t`Remove authenticator app`}type="button"variant="ghost"icon={<LuTrash2 />}- className="cursor-pointer"+ className="shrink-0 cursor-pointer text-muted-foreground hover:text-foreground"/></HStack>))}- </HStack>+ </VStack>)}</CardContent></Card>@@ -425,31 +448,35 @@ export default function AccountSecurity() {><ModalContent size="small"><ModalHeader>- <ModalTitle>Set up two-factor authentication</ModalTitle>+ <ModalTitle>+ <Trans>Set up two-factor authentication</Trans>+ </ModalTitle></ModalHeader><ModalBody>{mfaEnrollment && (<VStack spacing={4} className="w-full items-center"><p className="text-sm text-muted-foreground">- Scan this QR code with your authenticator app (e.g. Google- Authenticator or 1Password), then enter the 6-digit code it- shows.+ <Trans>+ Scan this QR code with your authenticator app (e.g. Google+ Authenticator or 1Password), then enter the 6-digit code it+ shows.+ </Trans></p><imgsrc={mfaEnrollment.qrCode}- alt="Authenticator QR code"+ alt={t`Authenticator QR code`}className="size-44 rounded-md bg-white p-2"/><VStack spacing={1} className="w-full items-center"><p className="text-xs text-muted-foreground">- Or enter this secret manually:+ <Trans>Or enter this secret manually:</Trans></p><buttontype="button"className="font-mono text-xs break-all text-center cursor-pointer hover:text-foreground text-muted-foreground"onClick={() => {navigator.clipboard.writeText(mfaEnrollment.secret);- toast.success("Secret copied to clipboard");+ toast.success(t`Secret copied to clipboard`);}}>{mfaEnrollment.secret}@@ -459,7 +486,9 @@ export default function AccountSecurity() {{mfaError && (<Alert variant="destructive"><LuCircleAlert className="w-4 h-4" />- <AlertTitle>Verification failed</AlertTitle>+ <AlertTitle>+ <Trans>Verification failed</Trans>+ </AlertTitle><AlertDescription>{mfaError}</AlertDescription></Alert>)}@@ -472,7 +501,7 @@ export default function AccountSecurity() {variant="secondary"onClick={resetMfaEnrollment}>- Cancel+ <Trans>Cancel</Trans></Button><Buttontype="button"@@ -480,7 +509,7 @@ export default function AccountSecurity() {isDisabled={mfaCode.length !== 6 || mfaVerifying}isLoading={mfaVerifying}>- Verify+ <Trans>Verify</Trans></Button></ModalFooter></ModalContent>@@ -497,13 +526,17 @@ export default function AccountSecurity() {><ModalContent size="small"><ModalHeader>- <ModalTitle>Remove two-factor authentication</ModalTitle>+ <ModalTitle>+ <Trans>Remove two-factor authentication</Trans>+ </ModalTitle></ModalHeader><ModalBody><VStack spacing={4} className="w-full"><p className="text-sm text-muted-foreground">- Signing in will no longer require a code. Enter the current- 6-digit code from your authenticator app to confirm.+ <Trans>+ Signing in will no longer require a code. Enter the current+ 6-digit code from your authenticator app to confirm.+ </Trans></p><OtpInputvalue={removeCode}@@ -515,7 +548,9 @@ export default function AccountSecurity() {{removeError && (<Alert variant="destructive"><LuCircleAlert className="w-4 h-4" />- <AlertTitle>Verification failed</AlertTitle>+ <AlertTitle>+ <Trans>Verification failed</Trans>+ </AlertTitle><AlertDescription>{removeError}</AlertDescription></Alert>)}@@ -530,7 +565,7 @@ export default function AccountSecurity() {setRemoveCode("");}}>- Cancel+ <Trans>Cancel</Trans></Button><Buttontype="button"@@ -539,7 +574,7 @@ export default function AccountSecurity() {isDisabled={removeCode.length !== 6 || removing}isLoading={removing}>- Remove+ <Trans>Remove</Trans></Button></ModalFooter></ModalContent>@@ -553,22 +588,26 @@ export default function AccountSecurity() {><ModalContent size="small"><ModalHeader>- <ModalTitle>Edit Passkey</ModalTitle>+ <ModalTitle>+ <Trans>Edit Passkey</Trans>+ </ModalTitle></ModalHeader><ModalBody><VStack spacing={4} className="w-full"><VStack className="w-full" spacing={0}>- <label className="text-sm font-medium mb-1 block">Name</label>+ <label className="text-sm font-medium mb-1 block">+ <Trans>Name</Trans>+ </label><Inputvalue={editedName}onChange={(e) => setEditedName(e.target.value)}- placeholder="Passkey name"+ placeholder={t`Passkey name`}/></VStack>{selectedPasskey && (<VStack spacing={1} className="w-full"><p className="text-xs text-muted-foreground">- Added{" "}+ <Trans>Added</Trans>{" "}<DateTimevalue={selectedPasskey.createdAt}variant="date"@@ -576,7 +615,7 @@ export default function AccountSecurity() {</p>{selectedPasskey.lastUsedAt && (<p className="text-xs text-muted-foreground">- Last used{" "}+ <Trans>Last used</Trans>{" "}<DateTimevalue={selectedPasskey.lastUsedAt}variant="date"@@ -584,7 +623,9 @@ export default function AccountSecurity() {</p>)}{selectedPasskey.backedUp && (- <p className="text-xs text-muted-foreground">Synced</p>+ <p className="text-xs text-muted-foreground">+ <Trans>Synced</Trans>+ </p>)}</VStack>)}@@ -596,7 +637,7 @@ export default function AccountSecurity() {variant="secondary"onClick={closePasskeyDrawer}>- Cancel+ <Trans>Cancel</Trans></Button><Buttontype="button"@@ -606,7 +647,7 @@ export default function AccountSecurity() {editedName === selectedPasskey?.credentialName}>- Save+ <Trans>Save</Trans></Button></ModalFooter></ModalContent>@@ -620,11 +661,15 @@ export default function AccountSecurity() {><ModalContent size="small"><ModalHeader>- <ModalTitle>Delete Passkey</ModalTitle>+ <ModalTitle>+ <Trans>Delete Passkey</Trans>+ </ModalTitle></ModalHeader><ModalBody>- Are you sure you want to delete this passkey? You won't be able to- use it to sign in anymore.+ <Trans>+ Are you sure you want to delete this passkey? You won't be able to+ use it to sign in anymore.+ </Trans></ModalBody><ModalFooter><Button@@ -632,7 +677,7 @@ export default function AccountSecurity() {variant="secondary"onClick={() => setConfirmDeleteId(null)}>- Cancel+ <Trans>Cancel</Trans></Button><Buttontype="button"@@ -641,7 +686,7 @@ export default function AccountSecurity() {isLoading={deleteFetcher.state !== "idle"}isDisabled={deleteFetcher.state !== "idle"}>- Delete+ <Trans>Delete</Trans></Button></ModalFooter></ModalContent>diff --git a/apps/erp/app/routes/x+/settings+/audit-logs.tsx b/apps/erp/app/routes/x+/settings+/audit-logs.tsxindex 7ce5d0d53b..76394b6ced 100644--- a/apps/erp/app/routes/x+/settings+/audit-logs.tsx+++ b/apps/erp/app/routes/x+/settings+/audit-logs.tsx@@ -1,4 +1,4 @@-import { error, success } from "@carbon/auth";+import { CONTROLLED_ENVIRONMENT, error, success } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { flash } from "@carbon/auth/session.server";@@ -40,6 +40,18 @@ export async function loader({ request }: LoaderFunctionArgs) {// Table might not exist yet, that's ok}+ // Controlled environments (ITAR/CUI, NIST 800-171 3.3.1): audit logging is on+ // by default and cannot be turned off. Enable it on demand for any controlled+ // company that isn't already capturing.+ if (CONTROLLED_ENVIRONMENT && !enabled) {+ try {+ await enableAuditLog(client, companyId);+ enabled = true;+ } catch {+ // Best-effort; the write path degrades gracefully if it can't enable here.+ }+ }+// Sync subscriptions to pick up any newly added auditable tablesif (enabled) {try {@@ -62,7 +74,8 @@ export async function loader({ request }: LoaderFunctionArgs) {return {enabled,- archives+ archives,+ controlled: CONTROLLED_ENVIRONMENT};}@@ -101,6 +114,19 @@ export async function action({ request }: ActionFunctionArgs) {}case "disable": {+ // Controlled environments cannot turn audit logging off (3.3.1).+ if (CONTROLLED_ENVIRONMENT) {+ throw redirect(+ path.to.auditLog,+ await flash(+ request,+ error(+ null,+ "Audit logging cannot be disabled in a controlled environment"+ )+ )+ );+ }try {await disableAuditLog(client, companyId);throw redirect(@@ -147,7 +173,7 @@ export async function action({ request }: ActionFunctionArgs) {}export default function AuditLogRoute() {- const { enabled, archives } = useLoaderData<typeof loader>();+ const { enabled, archives, controlled } = useLoaderData<typeof loader>();const { isGated } = usePlanGate({ feature: "AUDIT_LOG" });if (isGated) {@@ -172,7 +198,11 @@ export default function AuditLogRoute() {</Button>)}</div>- <AuditLogSettings enabled={enabled} archives={archives} />+ <AuditLogSettings+ enabled={enabled}+ archives={archives}+ controlled={controlled}+ />{enabled && <Outlet />}</VStack></ScrollArea>diff --git a/apps/erp/app/routes/x+/settings+/companies.new.tsx b/apps/erp/app/routes/x+/settings+/companies.new.tsxindex 362a898b21..0fef79bd88 100644--- a/apps/erp/app/routes/x+/settings+/companies.new.tsx+++ b/apps/erp/app/routes/x+/settings+/companies.new.tsx@@ -1,7 +1,13 @@-import { assertIsPost, error, success } from "@carbon/auth";+import {+ assertIsPost,+ CONTROLLED_ENVIRONMENT,+ error,+ success+} from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { flash } from "@carbon/auth/session.server";+import { enableAuditLog } from "@carbon/database/audit";import { validationError, validator } from "@carbon/form";import {Modal,@@ -84,6 +90,12 @@ export async function action({ request }: ActionFunctionArgs) {);}+ // Controlled environments (ITAR/CUI, NIST 800-171 3.3.1) capture audit from+ // day one — enable it at company creation.+ if (CONTROLLED_ENVIRONMENT) {+ await enableAuditLog(client, companyId).catch(() => {});+ }+const locationInsert = await upsertLocation(client, {...locationData,name: "Headquarters",diff --git a/apps/erp/app/routes/x+/settings+/company.new.tsx b/apps/erp/app/routes/x+/settings+/company.new.tsxindex b7e1c4fed3..049b371820 100644--- a/apps/erp/app/routes/x+/settings+/company.new.tsx+++ b/apps/erp/app/routes/x+/settings+/company.new.tsx@@ -1,8 +1,9 @@-import { assertIsPost } from "@carbon/auth";+import { assertIsPost, CONTROLLED_ENVIRONMENT } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { setCompanyId } from "@carbon/auth/company.server";import { updateCompanySession } from "@carbon/auth/session.server";+import { enableAuditLog } from "@carbon/database/audit";import { validationError, validator } from "@carbon/form";import { redis } from "@carbon/kv";import { getLogger } from "@carbon/logger";@@ -50,6 +51,14 @@ export async function action({ request }: ActionFunctionArgs) {throw new Error("Fatal: failed to seed company");}+ // Controlled environments (ITAR/CUI, NIST 800-171 3.3.1) capture audit from+ // day one — enable it at company creation, not just when settings are opened.+ if (CONTROLLED_ENVIRONMENT) {+ await enableAuditLog(client, companyId).catch((err) =>+ logger.error("Failed to enable audit log for new company", { error: err })+ );+ }+// TODO: move all of this to transaction// biome-ignore lint/correctness/noUnusedVariables: suppressed due to migrationconst { baseCurrencyCode, ...locationData } = validation.data;diff --git a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx b/apps/erp/app/routes/x+/settings+/integrations.$id.tsxindex 851388363d..671f160ecf 100644--- a/apps/erp/app/routes/x+/settings+/integrations.$id.tsx+++ b/apps/erp/app/routes/x+/settings+/integrations.$id.tsx@@ -44,6 +44,7 @@ import {getIntegrationServerHooks,onshapeConnectionHasWriteScope} from "@carbon/ee/hooks.server";+import { getPath, SECRET_KEYS } from "@carbon/ee/integrations/secrets";import { isIntegrationWhitelisted } from "@carbon/ee/plan";import { requirePlan } from "@carbon/ee/plan.server";import { validationError, validator } from "@carbon/form";@@ -1412,6 +1413,38 @@ export async function action({ request, params }: ActionFunctionArgs) {const wasInstalled = existing.data?.active === true;+ // Install-time secret presence. The config schemas now let an empty secret+ // field mean "keep the existing vaulted value" (it loads masked, never sent to+ // the browser). A FRESH install with no secret at all would leave the+ // integration active but non-functional, so require one here. Scoped to+ // form-entered secrets — OAuth providers get their credentials via the+ // callback, so they are never blocked here.+ const FORM_SECRET_INTEGRATIONS = new Set([+ "linear",+ "paperless-parts",+ "email",+ "rillet"+ ]);+ if (FORM_SECRET_INTEGRATIONS.has(integrationId)) {+ const alreadyVaulted = existing.data?.secretRef != null;+ const providedSecret = (SECRET_KEYS[integrationId] ?? []).some((p) => {+ const v = getPath(metadata, p);+ return typeof v === "string" && v.trim().length > 0;+ });+ if (!alreadyVaulted && !providedSecret) {+ return data(+ {},+ await flash(+ request,+ error(+ null,+ `A credential is required to connect ${integration.name}.`+ )+ )+ );+ }+ }+const update = await upsertCompanyIntegration(client, {id: integrationId,active: true,diff --git a/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx b/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsxindex f9a29c1b66..b7f208cb20 100644--- a/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx+++ b/apps/erp/app/routes/x+/users+/bulk-edit-permissions.tsx@@ -13,7 +13,7 @@ import { getParams, path } from "~/utils/path";export async function action({ request }: ActionFunctionArgs) {assertIsPost(request);- const { companyId } = await requirePermissions(request, {+ const { companyId, userId } = await requirePermissions(request, {update: "users"});@@ -48,12 +48,16 @@ export async function action({ request }: ActionFunctionArgs) {);}+ const ip = request.headers.get("x-forwarded-for") ?? undefined;+const batchPayload = userIds.map((id) => ({payload: {id,permissions,addOnly,- companyId+ companyId,+ actorId: userId,+ ip}}));diff --git a/apps/erp/app/routes/x+/users+/deactivate.tsx b/apps/erp/app/routes/x+/users+/deactivate.tsxindex b95ae322b5..07954646c5 100644--- a/apps/erp/app/routes/x+/users+/deactivate.tsx+++ b/apps/erp/app/routes/x+/users+/deactivate.tsx@@ -27,6 +27,8 @@ export async function action({ request }: ActionFunctionArgs) {const { users, redirectTo } = validation.data;+ const ip = request.headers.get("x-forwarded-for") ?? undefined;+if (users.includes(userId)) {throw redirect(safeRedirect(redirectTo),@@ -37,7 +39,13 @@ export async function action({ request }: ActionFunctionArgs) {if (users.length === 1) {const [targetUserId] = users;// deactivateUser() handles Stripe subscription quantity update internally- const result = await deactivateUser(client, targetUserId, companyId);+ const result = await deactivateUser(+ client,+ targetUserId,+ companyId,+ userId,+ ip+ );throw redirect(safeRedirect(redirectTo), await flash(request, result));} else {@@ -45,7 +53,9 @@ export async function action({ request }: ActionFunctionArgs) {payload: {id,type: "deactivate" as const,- companyId+ companyId,+ actorId: userId,+ ip}}));diff --git a/apps/erp/app/routes/x+/users+/employees.$employeeId.tsx b/apps/erp/app/routes/x+/users+/employees.$employeeId.tsxindex f15efac3ab..df98396fc0 100644--- a/apps/erp/app/routes/x+/users+/employees.$employeeId.tsx+++ b/apps/erp/app/routes/x+/users+/employees.$employeeId.tsx@@ -99,7 +99,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {export async function action({ request }: ActionFunctionArgs) {assertIsPost(request);- const { client, companyId } = await requirePermissions(request, {+ const { client, companyId, userId } = await requirePermissions(request, {update: "users"});@@ -128,11 +128,15 @@ export async function action({ request }: ActionFunctionArgs) {);}+ const ip = request.headers.get("x-forwarded-for") ?? undefined;+const result = await updateEmployee(client, {id,employeeType,permissions,- companyId+ companyId,+ actorId: userId,+ ip});throw redirect(path.to.employeeAccounts, await flash(request, result));diff --git a/apps/erp/app/routes/x+/users+/revoke-invite.tsx b/apps/erp/app/routes/x+/users+/revoke-invite.tsxindex 6b4d271f80..40aed3f228 100644--- a/apps/erp/app/routes/x+/users+/revoke-invite.tsx+++ b/apps/erp/app/routes/x+/users+/revoke-invite.tsx@@ -30,6 +30,8 @@ export async function action({ request }: ActionFunctionArgs) {const { users } = validation.data;+ const ip = request.headers.get("x-forwarded-for") ?? undefined;+const serviceRole = getCarbonServiceRole();const usersToRevoke = await serviceRole@@ -51,7 +53,9 @@ export async function action({ request }: ActionFunctionArgs) {const deactivate = await deactivateUser(serviceRole,usersToRevoke.data[0].id,- companyId+ companyId,+ userId,+ ip);if (!deactivate.success) {return data(@@ -69,7 +73,9 @@ export async function action({ request }: ActionFunctionArgs) {payload: {id,type: "deactivate" as const,- companyId+ companyId,+ actorId: userId,+ ip}}));diff --git a/apps/erp/app/routes/x+/workflow+/$id.test-run.tsx b/apps/erp/app/routes/x+/workflow+/$id.test-run.tsxindex a23ff93ee3..4f3e77b354 100644--- a/apps/erp/app/routes/x+/workflow+/$id.test-run.tsx+++ b/apps/erp/app/routes/x+/workflow+/$id.test-run.tsx@@ -189,7 +189,7 @@ export async function action({ request, params }: ActionFunctionArgs) {if (module !== undefined) {const claims = await getUserClaims(gate.userId, gate.companyId);const granted = claims.permissions[module]?.view ?? [];- if (!granted.includes("0") && !granted.includes(gate.companyId)) {+ if (!granted.includes(gate.companyId)) {return refuse(noAccess(module), 403);}}diff --git a/apps/mes/app/components/SessionLockOverlay.tsx b/apps/mes/app/components/SessionLockOverlay.tsxnew file mode 100644index 0000000000..f533a0bbac--- /dev/null+++ b/apps/mes/app/components/SessionLockOverlay.tsx@@ -0,0 +1,221 @@+import {+ Hidden,+ InputOTP,+ Submit,+ useControlField,+ ValidatedForm+} from "@carbon/form";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ Card,+ CardContent,+ Heading,+ toast,+ VStack+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import {+ browserSupportsWebAuthn,+ startAuthentication+} from "@simplewebauthn/browser";+import { useEffect, useRef, useState } from "react";+import { LuFingerprint, LuLock } from "react-icons/lu";+import { Form, useFetcher, useLocation } from "react-router";+import { z } from "zod";++import { path } from "~/utils/path";++/**+ * Full-screen pattern-hiding lock overlay + in-place re-auth (NIST 800-171+ * 3.1.10 / AC-11(1)). Shown by the shell when `useIdle` reports inactivity: it+ * CONCEALS all page content (opaque `bg-background`, top z-index) AND carries the+ * re-auth controls itself, so unlocking is a single screen. TOTP posts a form to+ * the `/unlock` action; a passkey posts the WebAuthn assertion as JSON. Both use+ * `inline=true`: on success the action resumes the SAME session in place (rotated+ * cookie returned as data, no navigation), the overlay calls `onUnlocked` to+ * clear the client lock, and React Router revalidates with the fresh session.+ * The server is still the real boundary (requireAuthSession redirects idle+ * requests to the full-page /unlock route); this overlay is the immediate+ * concealment + fast path.+ */+type UnlockResult = { success: boolean; message?: string };++const overlayValidator = z.object({+ code: z.string().length(6),+ redirectTo: z.string().optional(),+ inline: z.string().optional()+});++/**+ * Lives inside ValidatedForm so it can reach the shared `code` field state. A+ * rejected code is cleared so the user can retype without stale digits.+ */+function UnlockCodeField({ result }: { result?: UnlockResult }) {+ const [, setCode] = useControlField<string>("code");+ const lastResult = useRef(result);++ useEffect(() => {+ if (result === lastResult.current) return;+ lastResult.current = result;+ if (result?.success === false) setCode("");+ }, [result, setCode]);++ return <InputOTP name="code" label="" />;+}++export default function SessionLockOverlay({+ onUnlocked,+ hasPasskeyAuth = false+}: {+ onUnlocked?: () => void;+ hasPasskeyAuth?: boolean;+}) {+ const { t } = useLingui();+ const location = useLocation();+ const redirectTo = `${location.pathname}${location.search}`;++ const fetcher = useFetcher<UnlockResult>();++ const [passkeySupported, setPasskeySupported] = useState(false);+ const [passkeyLoading, setPasskeyLoading] = useState(false);++ useEffect(() => {+ if (hasPasskeyAuth && browserSupportsWebAuthn()) setPasskeySupported(true);+ }, [hasPasskeyAuth]);++ // A successful in-place unlock (TOTP or passkey) rotated the cookie already;+ // clear the client lock so the overlay unmounts and the app (revalidated with+ // the fresh session) shows through.+ useEffect(() => {+ if (fetcher.data?.success === true) onUnlocked?.();+ }, [fetcher.data, onUnlocked]);++ const onUnlockWithPasskey = async () => {+ setPasskeyLoading(true);+ try {+ const optRes = await fetch("/api/passkey/authenticate/options", {+ method: "POST"+ });+ if (!optRes.ok) throw new Error("Failed to get options");+ const { challengeId, ...options } = await optRes.json();++ const credential = await startAuthentication({+ optionsJSON: options+ } as any);++ // inline=true → the action returns data (no navigation); the fetcher's+ // success effect above clears the lock in place.+ fetcher.submit({ credential, challengeId, inline: "true" } as any, {+ method: "post",+ action: "/unlock",+ encType: "application/json"+ });+ } catch (e: any) {+ if (e?.name !== "NotAllowedError" && e?.name !== "AbortError") {+ toast.error(t`Passkey unlock failed`);+ }+ } finally {+ setPasskeyLoading(false);+ }+ };++ return (+ <div className="fixed inset-0 z-[9999] flex items-center justify-center bg-background p-6">+ <Card className="w-[420px] max-w-full">+ <CardContent className="flex flex-col items-center gap-6 p-8 text-center">+ <span className="flex items-center justify-center size-14 rounded-full bg-muted">+ <LuLock className="size-6 text-muted-foreground" />+ </span>+ <VStack spacing={2} className="items-center">+ <Heading size="h2" className="text-balance">+ <Trans>Session locked</Trans>+ </Heading>+ <p className="text-sm text-muted-foreground text-pretty">+ <Trans>Your session was locked after inactivity.</Trans>+ </p>+ </VStack>++ <VStack spacing={4} className="items-center w-full">+ {fetcher.data?.success === false && fetcher.data?.message && (+ <Alert variant="destructive">+ <LuLock className="w-4 h-4" />+ <AlertTitle>+ <Trans>Unable to unlock</Trans>+ </AlertTitle>+ <AlertDescription>{fetcher.data.message}</AlertDescription>+ </Alert>+ )}++ {hasPasskeyAuth && passkeySupported && (+ <Button+ type="button"+ size="lg"+ variant="secondary"+ className="w-full"+ leftIcon={<LuFingerprint />}+ onClick={onUnlockWithPasskey}+ isDisabled={passkeyLoading || fetcher.state !== "idle"}+ isLoading={passkeyLoading}+ >+ <Trans>Unlock with passkey</Trans>+ </Button>+ )}++ {hasPasskeyAuth && passkeySupported && (+ <div className="flex items-center gap-3 w-full">+ <div className="h-px flex-1 bg-border" />+ <span className="text-xs text-muted-foreground uppercase">+ <Trans>or</Trans>+ </span>+ <div className="h-px flex-1 bg-border" />+ </div>+ )}++ <ValidatedForm+ fetcher={fetcher}+ validator={overlayValidator}+ method="post"+ action="/unlock"+ className="w-full"+ >+ <Hidden name="redirectTo" value={redirectTo} />+ <Hidden name="inline" value="true" />+ <VStack spacing={4} className="items-center">+ <p className="text-sm text-muted-foreground text-pretty">+ <Trans>+ Enter the 6-digit code from your authenticator app to+ resume.+ </Trans>+ </p>+ <UnlockCodeField result={fetcher.data} />++ <Submit+ size="lg"+ className="w-full"+ withBlocker={false}+ isDisabled={fetcher.state !== "idle"}+ >+ <Trans>Unlock</Trans>+ </Submit>+ </VStack>+ </ValidatedForm>+ </VStack>++ <Form method="post" action={path.to.logout}>+ <Button+ type="submit"+ variant="link"+ size="sm"+ className="text-muted-foreground"+ >+ <Trans>Sign out instead</Trans>+ </Button>+ </Form>+ </CardContent>+ </Card>+ </div>+ );+}diff --git a/apps/mes/app/entry.client.tsx b/apps/mes/app/entry.client.tsxindex efbd1b86e6..5507f6d214 100644--- a/apps/mes/app/entry.client.tsx+++ b/apps/mes/app/entry.client.tsx@@ -34,6 +34,15 @@ if (POSTHOG_PROJECT_PUBLIC_KEY && !CONTROLLED_ENVIRONMENT) {});}+// Fail-fast boot assertion (NIST 800-171 3.4.6): analytics must never be live in+// a controlled environment. If a regression in the gate above lets posthog load,+// refuse to boot rather than silently phone home about a U.S.-Persons-only system.+if (CONTROLLED_ENVIRONMENT && posthog.__loaded) {+ throw new Error(+ "Analytics initialized in a controlled environment — refusing to boot"+ );+}+startTransition(() => {hydrateRoot(document, <HydratedRouter />);});diff --git a/apps/mes/app/hooks/index.ts b/apps/mes/app/hooks/index.tsindex b3f564edaf..6f5d04f9df 100644--- a/apps/mes/app/hooks/index.ts+++ b/apps/mes/app/hooks/index.ts@@ -7,12 +7,14 @@ import {} from "@carbon/react";import { useCompanyTimeZone, useLocationTimeZone } from "./useCompanyTimeZone";import { useDateFormatter } from "./useDateFormatter";+import { useIdle } from "./useIdle";import { useRealtime } from "./useRealtime";import { useUser } from "./useUser";export {useCompanyTimeZone,useDateFormatter,+ useIdle,useLocationTimeZone,useNanoStore,useOptimisticLocation,diff --git a/apps/mes/app/hooks/useIdle.tsx b/apps/mes/app/hooks/useIdle.tsxnew file mode 100644index 0000000000..12e0bf071c--- /dev/null+++ b/apps/mes/app/hooks/useIdle.tsx@@ -0,0 +1,146 @@+import { useCallback, useEffect, useRef, useState } from "react";++// UX-only idle detection for the NIST 3.1.10 session lock. The SERVER is the+// authority (requireAuthSession enforces the idle/absolute cap); this hook drives+// the immediate lock overlay + a throttled activity heartbeat. Background traffic+// (the 60s refresh poll, realtime revalidations) is NOT activity — only real+// user input moves lastActivity, so an unattended tab still locks.++const ACTIVITY_EVENTS = [+ "mousemove",+ "mousedown",+ "keydown",+ "touchstart",+ "scroll",+ "wheel"+] as const;++const CHANNEL_NAME = "carbon-session-activity";+const ACTIVITY_BROADCAST_THROTTLE_MS = 5000;+const CHECK_INTERVAL_MS = 1000;++type ChannelMessage = { type: "activity" } | { type: "lock" };++type UseIdleOptions = {+ /** Off (inert) unless true — non-controlled deployments pass false. */+ enabled: boolean;+ /** Idle window before locking (SESSION_IDLE_LOCK_MS). */+ idleMs: number;+ /** Heartbeat throttle while active (SESSION_HEARTBEAT_MS). */+ heartbeatMs: number;+ /** POST target that re-stamps lastActiveAt server-side. */+ heartbeatUrl: string;+};++export function useIdle({+ enabled,+ idleMs,+ heartbeatMs,+ heartbeatUrl+}: UseIdleOptions) {+ const [isIdle, setIsIdle] = useState(false);++ const lastActivityRef = useRef(Date.now());+ const lastHeartbeatRef = useRef(0);+ const lastBroadcastRef = useRef(0);+ const isIdleRef = useRef(false);+ const channelRef = useRef<BroadcastChannel | null>(null);++ useEffect(() => {+ isIdleRef.current = isIdle;+ }, [isIdle]);++ const resume = useCallback(() => {+ lastActivityRef.current = Date.now();+ isIdleRef.current = false;+ setIsIdle(false);+ // Tell peers the session is active again (an unlock in one tab clears all).+ channelRef.current?.postMessage({+ type: "activity"+ } satisfies ChannelMessage);+ }, []);++ useEffect(() => {+ if (!enabled || typeof window === "undefined") return;++ const channel =+ typeof BroadcastChannel !== "undefined"+ ? new BroadcastChannel(CHANNEL_NAME)+ : null;+ channelRef.current = channel;++ // Throttled activity heartbeat. It fires ONLY in response to real user input+ // (here), never on the idle countdown itself — otherwise the countdown would+ // keep re-stamping the server's `lastActiveAt` every heartbeatMs and the+ // session would never idle-lock server-side, so /unlock's loader would find+ // the session "not locked" and bounce straight back with no re-auth.+ const sendHeartbeat = (now: number) => {+ lastHeartbeatRef.current = now;+ void fetch(heartbeatUrl, {+ method: "POST",+ credentials: "same-origin"+ }).catch(() => {+ // Best-effort; a missed heartbeat just brings the lock closer.+ });+ };++ // Local real activity. Once locked, local activity does NOT clear the lock —+ // 3.1.10 requires re-authentication; only a successful unlock (resume) does.+ const onActivity = () => {+ if (isIdleRef.current) return;+ const now = Date.now();+ lastActivityRef.current = now;+ // Keep the server's lastActiveAt fresh while genuinely active, throttled.+ if (now - lastHeartbeatRef.current >= heartbeatMs) {+ sendHeartbeat(now);+ }+ if (+ channel &&+ now - lastBroadcastRef.current > ACTIVITY_BROADCAST_THROTTLE_MS+ ) {+ lastBroadcastRef.current = now;+ channel.postMessage({ type: "activity" } satisfies ChannelMessage);+ }+ };++ for (const evt of ACTIVITY_EVENTS) {+ window.addEventListener(evt, onActivity, { passive: true });+ }++ if (channel) {+ channel.onmessage = (e: MessageEvent<ChannelMessage>) => {+ if (e.data?.type === "activity") {+ // A peer is active → the session isn't idle. Keep this tab from locking.+ if (!isIdleRef.current) lastActivityRef.current = Date.now();+ } else if (e.data?.type === "lock") {+ // A peer locked → lock all tabs together.+ isIdleRef.current = true;+ setIsIdle(true);+ }+ };+ }++ const interval = window.setInterval(() => {+ const now = Date.now();+ if (isIdleRef.current) return;++ const idleFor = now - lastActivityRef.current;+ if (idleFor > idleMs) {+ isIdleRef.current = true;+ setIsIdle(true);+ channel?.postMessage({ type: "lock" } satisfies ChannelMessage);+ }+ }, CHECK_INTERVAL_MS);++ return () => {+ for (const evt of ACTIVITY_EVENTS) {+ window.removeEventListener(evt, onActivity);+ }+ window.clearInterval(interval);+ channel?.close();+ channelRef.current = null;+ };+ }, [enabled, idleMs, heartbeatMs, heartbeatUrl]);++ return { isIdle: enabled && isIdle, resume };+}diff --git a/apps/mes/app/routes/_public+/callback.tsx b/apps/mes/app/routes/_public+/callback.tsxindex 51daec4f90..64cf2ecc73 100644--- a/apps/mes/app/routes/_public+/callback.tsx+++ b/apps/mes/app/routes/_public+/callback.tsx@@ -17,6 +17,7 @@ import {} from "@carbon/auth/session.server";import { getUserByEmail } from "@carbon/auth/users.server";import { validator } from "@carbon/form";+import { AccountLockout, redis } from "@carbon/kv";import {Alert,AlertDescription,@@ -82,6 +83,11 @@ export async function action({ request }: ActionFunctionArgs) {const user = await getUserByEmail(authSession.email);if (user?.data) {+ // Genuine login (magic-link / OAuth first factor verified) — clear any+ // accumulated per-account lockout state (NIST 3.1.8 reset-on-success). Runs+ // before the TOTP gate so an MFA-enrolled user's counter clears too.+ await new AccountLockout({ redis }).reset(authSession.email);+// TOTP gate: park the tokens in the pending-MFA key and challenge before// any full session cookie exists. The /mfa action mints the real session.if (await userHasVerifiedTotpFactor(authSession.userId)) {diff --git a/apps/mes/app/routes/_public+/login.tsx b/apps/mes/app/routes/_public+/login.tsxindex a3878ec6ad..eb0f14d070 100644--- a/apps/mes/app/routes/_public+/login.tsx+++ b/apps/mes/app/routes/_public+/login.tsx@@ -8,7 +8,11 @@ import {magicLinkValidator,RATE_LIMIT} from "@carbon/auth";-import { sendMagicLink, verifyAuthSession } from "@carbon/auth/auth.server";+import {+ logAuthEvent,+ sendMagicLink,+ verifyAuthSession+} from "@carbon/auth/auth.server";import {clearAuthCookies,flash,@@ -16,7 +20,7 @@ import {} from "@carbon/auth/session.server";import { getUserByEmail } from "@carbon/auth/users.server";import { Hidden, Input, Submit, ValidatedForm, validator } from "@carbon/form";-import { Ratelimit, redis } from "@carbon/kv";+import { AccountLockout, Ratelimit, redis } from "@carbon/kv";import {Alert,AlertDescription,@@ -102,6 +106,42 @@ export async function action({ request }: ActionFunctionArgs) {}const { email } = validation.data;++ // Per-account lockout (NIST 800-171 3.1.8) — layered ON TOP of the IP limit+ // above, keyed by the normalized email. Rejects with a GENERIC message that+ // never reveals whether the account exists (avoids user enumeration).+ const lockout = new AccountLockout({ redis });+ const LOCKED_MESSAGE =+ "For your security, sign-in for this account is temporarily paused. Please try again later.";++ const lockStatus = await lockout.status(email);+ if (lockStatus.locked) {+ logAuthEvent("login_locked", {+ actor: email,+ ip,+ reason: "account temporarily locked",+ retryAfterSeconds: lockStatus.retryAfterSeconds+ });+ return data(+ { success: false, message: LOCKED_MESSAGE },+ await flash(request, error(null, LOCKED_MESSAGE))+ );+ }++ const attempt = await lockout.recordFailure(email);+ if (attempt.locked) {+ logAuthEvent("login_locked", {+ actor: email,+ ip,+ reason: "account temporarily locked",+ retryAfterSeconds: attempt.retryAfterSeconds+ });+ return data(+ { success: false, message: LOCKED_MESSAGE },+ await flash(request, error(null, LOCKED_MESSAGE))+ );+ }+const user = await getUserByEmail(email);if (user.data && user.data.active) {diff --git a/apps/mes/app/routes/_public+/unlock.tsx b/apps/mes/app/routes/_public+/unlock.tsxnew file mode 100644index 0000000000..9bd2ba09af--- /dev/null+++ b/apps/mes/app/routes/_public+/unlock.tsx@@ -0,0 +1,493 @@+import {+ assertIsPost,+ error,+ isAuthProviderEnabled,+ RATE_LIMIT,+ safeRedirect+} from "@carbon/auth";+import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { setCompanyId } from "@carbon/auth/company.server";+import { userHasVerifiedTotpFactor } from "@carbon/auth/mfa.server";+import { verifyPasskeyAuthentication } from "@carbon/auth/passkey.server";+import {+ completeMfaChallenge,+ flash,+ getAuthSession,+ isSessionExpiredAbsolute,+ isSessionIdleLocked,+ setAuthSession+} from "@carbon/auth/session.server";+import {+ Hidden,+ InputOTP,+ Submit,+ useControlField,+ ValidatedForm,+ validator+} from "@carbon/form";+import { Ratelimit, redis } from "@carbon/kv";+import {+ Alert,+ AlertDescription,+ AlertTitle,+ Button,+ Heading,+ toast,+ VStack+} from "@carbon/react";+import { Trans, useLingui } from "@lingui/react/macro";+import {+ browserSupportsWebAuthn,+ startAuthentication+} from "@simplewebauthn/browser";+import { useEffect, useRef, useState } from "react";+import { LuFingerprint, LuLock } from "react-icons/lu";+import type {+ ActionFunctionArgs,+ LoaderFunctionArgs,+ MetaFunction+} from "react-router";+import {+ data,+ Form,+ redirect,+ useFetcher,+ useLoaderData,+ useSearchParams+} from "react-router";+import { z } from "zod";++import { path } from "~/utils/path";++export const meta: MetaFunction = () => {+ return [{ title: "Carbon | Session Locked" }];+};++const unlockValidator = z.object({+ code: z.string().length(6),+ redirectTo: z.string().optional(),+ // "true" when submitted from the in-app SessionLockOverlay: re-auth resumes the+ // session IN PLACE (rotated cookie returned as data), so the overlay can clear+ // its lock without a full navigation. A full-page /unlock submit omits it and+ // gets the redirect back to `redirectTo` instead.+ inline: z.string().optional()+});++type UnlockResult = { success: boolean; message?: string };++/** Does this user have at least one registered passkey? (Cheap count, head-only.) */+async function userHasPasskey(userId: string): Promise<boolean> {+ const serviceRole = getCarbonServiceRole();+ const { count, error: countError } = await (serviceRole as any)+ .from("passkeyCredential")+ .select("id", { count: "exact", head: true })+ .eq("userId", userId);+ if (countError) return false;+ return (count ?? 0) > 0;+}++export async function loader({ request }: LoaderFunctionArgs) {+ // Read the session DIRECTLY (never requireAuthSession — that is what redirects+ // here, which would loop). Only a genuinely idle-locked session stays. Console+ // DEVICE sessions never reach here (they are exempt in requireAuthSession).+ const authSession = await getAuthSession(request);+ if (!authSession) throw redirect(path.to.login);++ const redirectTo =+ new URL(request.url).searchParams.get("redirectTo") ?? undefined;++ if (isSessionExpiredAbsolute(authSession)) {+ throw redirect(path.to.login);+ }+ if (!isSessionIdleLocked(authSession)) {+ throw redirect(safeRedirect(redirectTo, path.to.authenticatedRoot));+ }++ // Unlock credentials: a verified TOTP factor and/or a registered passkey.+ // Either can re-establish access here; a session with neither cannot unlock+ // (should not happen under CONTROLLED_ENVIRONMENT, where MFA is forced) —+ // fall through to a full re-login.+ const [hasTotp, hasPasskey] = await Promise.all([+ userHasVerifiedTotpFactor(authSession.userId),+ isAuthProviderEnabled("passkey")+ ? userHasPasskey(authSession.userId)+ : Promise.resolve(false)+ ]);++ if (!hasTotp && !hasPasskey) {+ throw redirect(path.to.login);+ }++ return { hasTotp, hasPasskey };+}++/**+ * Passkey unlock. Unlike a login, this RESUMES the existing locked session in+ * place — it never mints a new one. The presented passkey must belong to the+ * locked session's user, or another user's passkey could unlock this session.+ */+async function unlockWithPasskey(request: Request) {+ if (!isAuthProviderEnabled("passkey")) {+ return data(error(null, "Passkeys are disabled"), { status: 404 });+ }++ const authSession = await getAuthSession(request);+ if (!authSession?.accessToken || !authSession?.refreshToken) {+ return data(error(null, "Your session has ended. Please sign in again."), {+ status: 401+ });+ }++ let body: {+ credential?: any;+ challengeId?: string;+ redirectTo?: string;+ inline?: string;+ };+ try {+ body = await request.json();+ } catch {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 400+ });+ }++ const {+ credential: webAuthnResponse,+ challengeId,+ redirectTo,+ inline+ } = body;+ if (!webAuthnResponse?.id || !challengeId) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 400+ });+ }++ const serviceRole = getCarbonServiceRole();++ const { data: credRow, error: credError } = await (serviceRole as any)+ .from("passkeyCredential")+ .select("id, userId, publicKey, counter, transports")+ .eq("id", webAuthnResponse.id)+ .maybeSingle();++ if (credError || !credRow) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 404+ });+ }++ // SECURITY: the passkey MUST belong to the locked session's user. Otherwise a+ // different user's passkey could resume this session in place.+ if (credRow.userId !== authSession.userId) {+ return data(error(null, "That passkey does not match this session."), {+ status: 403+ });+ }++ const storedCredential = {+ id: credRow.id,+ publicKey: new Uint8Array(Buffer.from(credRow.publicKey, "base64url")),+ counter: credRow.counter,+ transports: credRow.transports ?? null+ };++ try {+ const { newCounter } = await verifyPasskeyAuthentication(+ challengeId,+ webAuthnResponse,+ storedCredential+ );++ const returnedHandle = webAuthnResponse.response?.userHandle;+ if (returnedHandle) {+ const expectedHandle = Buffer.from(+ new TextEncoder().encode(credRow.userId)+ ).toString("base64url");+ if (returnedHandle !== expectedHandle) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 401+ });+ }+ }++ const { error: counterError } = await (serviceRole as any)+ .from("passkeyCredential")+ .update({ counter: newCounter, lastUsedAt: new Date().toISOString() })+ .eq("id", credRow.id);++ if (counterError) {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 500+ });+ }++ // Resume in place: clear the idle-lock clock, and reset the absolute-cap+ // clock (a passkey re-auth is a fresh authentication, matching the TOTP+ // unlock via makeAuthSession). mfaVerified/console are preserved by spread.+ const resumed = {+ ...authSession,+ createdAt: Date.now(),+ lastActiveAt: Date.now()+ };+ const sessionCookie = await setAuthSession(request, {+ authSession: resumed+ });++ if (inline === "true") {+ return data<UnlockResult>(+ { success: true },+ {+ headers: [+ ["Set-Cookie", sessionCookie],+ ["Set-Cookie", setCompanyId(resumed.companyId)]+ ]+ }+ );+ }++ return redirect(safeRedirect(redirectTo, path.to.authenticatedRoot), {+ headers: [+ ["Set-Cookie", sessionCookie],+ ["Set-Cookie", setCompanyId(resumed.companyId)]+ ]+ });+ } catch {+ return data(error(null, "Unable to unlock. Please try again."), {+ status: 401+ });+ }+}++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ const ip = request.headers.get("x-forwarded-for") ?? "127.0.0.1";++ const ratelimit = new Ratelimit({+ redis,+ limiter: Ratelimit.slidingWindow(RATE_LIMIT, "1 h"),+ analytics: true+ });++ const { success } = await ratelimit.limit(ip);++ if (!success) {+ return data(+ error(null, "Rate limit exceeded"),+ await flash(request, error(null, "Rate limit exceeded"))+ );+ }++ // Passkey unlock arrives as JSON (the credential assertion); TOTP unlock is a+ // form POST. Branch on content type — the TOTP path below is unchanged.+ const contentType = request.headers.get("content-type") ?? "";+ if (contentType.includes("application/json")) {+ return unlockWithPasskey(request);+ }++ const validation = await validator(unlockValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return error(validation.error, "Invalid code");+ }++ const { code, redirectTo, inline } = validation.data;++ // Re-auth in place: completeMfaChallenge rotates tokens in the same cookie and+ // (via makeAuthSession) re-stamps createdAt/lastActiveAt = now.+ const result = await completeMfaChallenge(request, code);++ if (!result.success) {+ if (result.reason === "no-session") {+ throw redirect(path.to.login);+ }+ return data(+ error(null, "Invalid or expired code"),+ await flash(request, error(null, "Invalid or expired code"))+ );+ }++ // In-app overlay: return the rotated cookie(s) as data (no navigation) so the+ // overlay clears its lock in place and React Router revalidates with the fresh+ // session. Full-page submit: redirect back to where the lock interrupted.+ if (inline === "true") {+ return data<UnlockResult>(+ { success: true },+ {+ headers: [+ ["Set-Cookie", result.sessionCookie],+ ["Set-Cookie", setCompanyId(result.authSession.companyId)]+ ]+ }+ );+ }++ return redirect(+ safeRedirect(result.redirectTo ?? redirectTo, path.to.authenticatedRoot),+ {+ headers: [+ ["Set-Cookie", result.sessionCookie],+ ["Set-Cookie", setCompanyId(result.authSession.companyId)]+ ]+ }+ );+}++function UnlockCodeField({ result }: { result?: UnlockResult }) {+ const [, setCode] = useControlField<string>("code");+ const lastResult = useRef(result);++ useEffect(() => {+ if (result === lastResult.current) return;+ lastResult.current = result;+ if (result?.success === false) setCode("");+ }, [result, setCode]);++ return <InputOTP name="code" label="" />;+}++export default function UnlockRoute() {+ const { t } = useLingui();+ const { hasTotp, hasPasskey } = useLoaderData<typeof loader>();+ const [searchParams] = useSearchParams();+ const redirectTo = searchParams.get("redirectTo") ?? undefined;++ const fetcher = useFetcher<UnlockResult>();++ const [passkeySupported, setPasskeySupported] = useState(false);+ const [passkeyLoading, setPasskeyLoading] = useState(false);++ useEffect(() => {+ if (hasPasskey && browserSupportsWebAuthn()) setPasskeySupported(true);+ }, [hasPasskey]);++ const onUnlockWithPasskey = async () => {+ setPasskeyLoading(true);+ try {+ const optRes = await fetch("/api/passkey/authenticate/options", {+ method: "POST"+ });+ if (!optRes.ok) throw new Error("Failed to get options");+ const { challengeId, ...options } = await optRes.json();++ const credential = await startAuthentication({+ optionsJSON: options+ } as any);++ // No `inline` → the action redirects; the fetcher follows it and navigates+ // back to where the lock interrupted, with the resumed session cookie.+ fetcher.submit(+ { credential, challengeId, redirectTo: redirectTo ?? null } as any,+ { method: "post", action: "/unlock", encType: "application/json" }+ );+ } catch (e: any) {+ if (e?.name !== "NotAllowedError" && e?.name !== "AbortError") {+ toast.error(t`Passkey unlock failed`);+ }+ setPasskeyLoading(false);+ }+ };++ return (+ <>+ <div className="flex justify-center mb-8">+ <img+ src="/carbon-mark-light.svg"+ alt={t`Carbon Logo`}+ className="w-24 dark:hidden"+ />+ <img+ src="/carbon-mark-dark.svg"+ alt={t`Carbon Logo`}+ className="w-24 hidden dark:block"+ />+ </div>+ <div className="rounded-lg md:bg-card md:border md:border-border md:shadow-lg p-8 w-[380px]">+ <VStack spacing={4} className="items-center">+ <LuLock className="w-8 h-8 text-muted-foreground" />+ <Heading size="h3">+ <Trans>Session locked</Trans>+ </Heading>+ <p className="text-muted-foreground tracking-tight text-sm text-center">+ <Trans>Your session was locked after inactivity.</Trans>+ </p>++ {fetcher.data?.success === false && fetcher.data?.message && (+ <Alert variant="destructive">+ <LuLock className="w-4 h-4" />+ <AlertTitle>+ <Trans>Unable to unlock</Trans>+ </AlertTitle>+ <AlertDescription>{fetcher.data?.message}</AlertDescription>+ </Alert>+ )}++ {hasPasskey && passkeySupported && (+ <Button+ type="button"+ size="lg"+ variant="secondary"+ className="w-full"+ leftIcon={<LuFingerprint />}+ onClick={onUnlockWithPasskey}+ isDisabled={passkeyLoading || fetcher.state !== "idle"}+ isLoading={passkeyLoading}+ >+ <Trans>Unlock with passkey</Trans>+ </Button>+ )}++ {hasTotp && hasPasskey && passkeySupported && (+ <div className="flex items-center gap-3 w-full">+ <div className="h-px flex-1 bg-border" />+ <span className="text-xs text-muted-foreground uppercase">+ <Trans>or</Trans>+ </span>+ <div className="h-px flex-1 bg-border" />+ </div>+ )}++ {hasTotp && (+ <ValidatedForm+ fetcher={fetcher}+ validator={unlockValidator}+ method="post"+ className="w-full"+ >+ <Hidden name="redirectTo" value={redirectTo} />+ <VStack spacing={4} className="items-center">+ <p className="text-muted-foreground tracking-tight text-sm text-center">+ <Trans>+ Enter the 6-digit code from your authenticator app to+ resume.+ </Trans>+ </p>+ <UnlockCodeField result={fetcher.data} />+ <Submit+ size="lg"+ className="w-full"+ withBlocker={false}+ isDisabled={fetcher.state !== "idle"}+ >+ <Trans>Unlock</Trans>+ </Submit>+ </VStack>+ </ValidatedForm>+ )}+ </VStack>+ <Form+ method="post"+ action={path.to.logout}+ className="flex justify-center mt-4"+ >+ <Button type="submit" variant="link" size="sm">+ <Trans>Sign out instead</Trans>+ </Button>+ </Form>+ </div>+ </>+ );+}diff --git a/apps/mes/app/routes/api+/passkey.authenticate.options.ts b/apps/mes/app/routes/api+/passkey.authenticate.options.tsnew file mode 100644index 0000000000..fb0874aa11--- /dev/null+++ b/apps/mes/app/routes/api+/passkey.authenticate.options.ts@@ -0,0 +1,18 @@+import { assertIsPost, error, isAuthProviderEnabled } from "@carbon/auth";+import { getPasskeyAuthenticationOptions } from "@carbon/auth/passkey.server";+import { nanoid } from "nanoid";+import type { ActionFunctionArgs } from "react-router";+import { data } from "react-router";++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);++ if (!isAuthProviderEnabled("passkey")) {+ return data(error(null, "Passkeys are disabled"), { status: 404 });+ }++ const challengeId = nanoid();+ const options = await getPasskeyAuthenticationOptions(challengeId);++ return data({ ...options, challengeId });+}diff --git a/apps/mes/app/routes/api+/passkey.authenticate.verify.ts b/apps/mes/app/routes/api+/passkey.authenticate.verify.tsnew file mode 100644index 0000000000..efc824c375--- /dev/null+++ b/apps/mes/app/routes/api+/passkey.authenticate.verify.ts@@ -0,0 +1,156 @@+import { assertIsPost, error, isAuthProviderEnabled } from "@carbon/auth";+import { signInWithPasskey } from "@carbon/auth/auth.server";+import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { setCompanyId } from "@carbon/auth/company.server";+import { userHasVerifiedTotpFactor } from "@carbon/auth/mfa.server";+import { verifyPasskeyAuthentication } from "@carbon/auth/passkey.server";+import {+ setAuthSession,+ setPendingMfaSession+} from "@carbon/auth/session.server";+import { AccountLockout, redis } from "@carbon/kv";+import type { WebAuthnCredential } from "@simplewebauthn/browser";+import type { ActionFunctionArgs } from "react-router";+import { data, redirect } from "react-router";+import { path } from "~/utils/path";++export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);++ if (!isAuthProviderEnabled("passkey")) {+ return data(error(null, "Passkeys are disabled"), { status: 404 });+ }++ let body: { credential: any; challengeId: string; redirectTo?: string };+ try {+ body = await request.json();+ } catch {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 400+ });+ }++ const { credential: webAuthnResponse, challengeId, redirectTo } = body;++ if (!webAuthnResponse?.id || !challengeId) {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 400+ });+ }++ const serviceRole = getCarbonServiceRole();++ // Look up stored credential by ID+ const { data: credRow, error: credError } = await (serviceRole as any)+ .from("passkeyCredential")+ .select("id, userId, publicKey, counter, transports")+ .eq("id", webAuthnResponse.id)+ .maybeSingle();++ if (credError || !credRow) {+ // Return info so client can call signalUnknownCredential+ return data(+ {+ success: false,+ unknownCredential: true,+ credentialId: webAuthnResponse.id+ },+ { status: 404 }+ );+ }++ const storedCredential: WebAuthnCredential = {+ id: credRow.id,+ publicKey: new Uint8Array(Buffer.from(credRow.publicKey, "base64url")),+ counter: credRow.counter,+ transports: credRow.transports ?? null+ };++ try {+ const { newCounter } = await verifyPasskeyAuthentication(+ challengeId,+ webAuthnResponse,+ storedCredential+ );++ const returnedHandle = webAuthnResponse.response?.userHandle;+ if (returnedHandle) {+ const expectedHandle = Buffer.from(+ new TextEncoder().encode(credRow.userId)+ ).toString("base64url");+ if (returnedHandle !== expectedHandle) {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 401+ });+ }+ }++ const { error: counterError } = await (serviceRole as any)+ .from("passkeyCredential")+ .update({ counter: newCounter, lastUsedAt: new Date().toISOString() })+ .eq("id", credRow.id);++ if (counterError) {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 500+ });+ }++ const { data: authUser } = await serviceRole.auth.admin.getUserById(+ credRow.userId+ );+ if (!authUser.user?.email) {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 401+ });+ }++ const authSession = await signInWithPasskey(+ credRow.userId,+ authUser.user.email+ );+ if (!authSession) {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 500+ });+ }++ // Genuine passkey login verified — clear any per-account lockout state+ // (NIST 3.1.8 reset-on-success), before the TOTP gate below.+ await new AccountLockout({ redis }).reset(authUser.user.email);++ const safeRedirect =+ redirectTo && redirectTo.startsWith("/") && !redirectTo.startsWith("//")+ ? redirectTo+ : path.to.authenticatedRoot;++ // TOTP gate: a passkey sign-in still lands at AAL1 (it is minted through+ // a server-side magic link), so an enrolled user is challenged like any+ // other login before the full session cookie exists. The /mfa route mints+ // the real session cookie AND the company cookie on success.+ if (await userHasVerifiedTotpFactor(credRow.userId)) {+ const pendingCookie = await setPendingMfaSession(request, {+ authSession,+ redirectTo: safeRedirect+ });+ return redirect(path.to.mfa, {+ headers: [["Set-Cookie", pendingCookie]]+ });+ }++ const sessionCookie = await setAuthSession(request, { authSession });++ // MES has no company picker (shop floor): always stamp the resolved company+ // cookie, matching the magic-link callback rather than ERP's <=1 gating.+ return redirect(safeRedirect, {+ headers: [+ ["Set-Cookie", sessionCookie],+ ["Set-Cookie", setCompanyId(authSession.companyId)]+ ]+ });+ } catch {+ return data(error(null, "Sign-in failed. Please try again."), {+ status: 401+ });+ }+}diff --git a/apps/mes/app/routes/api+/session.heartbeat.ts b/apps/mes/app/routes/api+/session.heartbeat.tsnew file mode 100644index 0000000000..5033f8a6a7--- /dev/null+++ b/apps/mes/app/routes/api+/session.heartbeat.ts@@ -0,0 +1,21 @@+import { assertIsPost } from "@carbon/auth";+import { requirePermissions } from "@carbon/auth/auth.server";+import { touchAuthSession } from "@carbon/auth/session.server";+import type { ActionFunctionArgs } from "react-router";+import { data } from "react-router";++// Activity heartbeat for the NIST 3.1.10 idle lock (MES). The client posts here+// (throttled) only while the user is genuinely active; each call re-commits the session+// cookie with lastActiveAt = now. requirePermissions runs requireAuthSession, so once the+// session is already idle-locked this redirects to /unlock instead of resuming it — only a+// real re-auth clears the lock. Console DEVICE sessions are exempt from the lock and never+// redirect here (see console.server / requireAuthSession).+export async function action({ request }: ActionFunctionArgs) {+ assertIsPost(request);+ await requirePermissions(request, {});+ const cookie = await touchAuthSession(request);+ return data(+ { ok: Boolean(cookie) },+ cookie ? { headers: { "Set-Cookie": cookie } } : undefined+ );+}diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsxindex e7bdaca8ee..96153f5c96 100644--- a/apps/mes/app/routes/x+/_layout.tsx+++ b/apps/mes/app/routes/x+/_layout.tsx@@ -6,7 +6,10 @@ import {getCarbon,getCompanies,getUser,- ITAR_RIDER_PDF_PATH+ ITAR_RIDER_PDF_PATH,+ isAuthProviderEnabled,+ SESSION_HEARTBEAT_MS,+ SESSION_IDLE_LOCK_MS} from "@carbon/auth";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { userHasVerifiedTotpFactor } from "@carbon/auth/mfa.server";@@ -56,8 +59,10 @@ import { AppSidebar } from "~/components";import { ConsolePill } from "~/components/ConsolePill";import { PinInOverlay } from "~/components/PinInOverlay";import RealtimeDataProvider from "~/components/RealtimeDataProvider";+import SessionLockOverlay from "~/components/SessionLockOverlay";import { TimeCardWarning } from "~/components/TimeCardWarning";import { userContext } from "~/context";+import { useIdle } from "~/hooks";import { userMiddleware } from "~/middleware/user";import { refreshConsolePinIn } from "~/services/console.server";import { getItarCertificationStatus } from "~/services/itar.service";@@ -251,7 +256,19 @@ export async function loader({ request, context }: LoaderFunctionArgs) {user: user.data,itarCertification,// Server-decided, never client-inferred — same reason as the ITAR gate.- mfaEnrollmentRequired+ mfaEnrollmentRequired,+ // Session lock (NIST 3.1.10) — client idle UX config. Console DEVICE+ // sessions are exempt (their lock is the operator pin-in; a shared kiosk+ // must not be force-logged-out mid-shift). Server enforcement lives in+ // requireAuthSession, which also skips console sessions.+ sessionTimeout: {+ enabled: CONTROLLED_ENVIRONMENT && !(consoleEnabled && consoleMode),+ idleMs: SESSION_IDLE_LOCK_MS,+ heartbeatMs: SESSION_HEARTBEAT_MS,+ // Offer passkey re-auth on the lock overlay when the provider is enabled;+ // the /unlock action gates the actual credential, TOTP stays available.+ hasPasskeyAuth: isAuthProviderEnabled("passkey")+ }},headers.has("Set-Cookie") ? { headers } : undefined);@@ -277,11 +294,38 @@ export default function AuthenticatedRoute() {useMetric,user,itarCertification,- mfaEnrollmentRequired+ mfaEnrollmentRequired,+ sessionTimeout} = useLoaderData<typeof loader>();const navigate = useNavigate();+ // Session lock (NIST 3.1.10) — client idle UX only; server enforces in+ // requireAuthSession. Inert unless CONTROLLED_ENVIRONMENT and non-console.+ const { isIdle, resume } = useIdle({+ enabled: sessionTimeout.enabled,+ idleMs: sessionTimeout.idleMs,+ heartbeatMs: sessionTimeout.heartbeatMs,+ heartbeatUrl: "/api/session/heartbeat"+ });++ // Console (shared-kiosk) idle lock (NIST 3.1.10). A controlled-environment+ // console session is exempt from the session-wide lock above (sessionTimeout.+ // enabled is false for it) — its lock is the operator pin-in. On idle, reload:+ // the server-tightened pin-in (console.server) has by then expired, so the+ // reload surfaces the PinInOverlay and the operator must re-PIN.+ const { isIdle: consoleIsIdle } = useIdle({+ enabled: CONTROLLED_ENVIRONMENT && consoleMode,+ idleMs: sessionTimeout.idleMs,+ heartbeatMs: sessionTimeout.heartbeatMs,+ heartbeatUrl: "/api/session/heartbeat"+ });+ useEffect(() => {+ if (consoleIsIdle && typeof window !== "undefined") {+ window.location.reload();+ }+ }, [consoleIsIdle]);+useNProgress();useKeyboardWedge({test: (input) =>@@ -388,6 +432,13 @@ export default function AuthenticatedRoute() {return (<div className="h-screen w-full overflow-y-auto lg:overflow-hidden">+ {/* Idle lock conceals the app (3.1.10). Not over the ITAR/MFA gates. */}+ {isIdle && !itarScreen && !mfaScreen && (+ <SessionLockOverlay+ onUnlocked={resume}+ hasPasskeyAuth={sessionTimeout.hasPasskeyAuth}+ />+ )}{(itarScreen ?? mfaScreen) ? ((itarScreen ?? mfaScreen)) : (diff --git a/apps/mes/app/services/console.server.ts b/apps/mes/app/services/console.server.tsindex 76890391c8..8ab9685407 100644--- a/apps/mes/app/services/console.server.ts+++ b/apps/mes/app/services/console.server.ts@@ -1,9 +1,16 @@+import { CONTROLLED_ENVIRONMENT, SESSION_IDLE_LOCK_MS } from "@carbon/auth";import * as cookie from "cookie";const CONSOLE_PIN_PREFIX = "console-pin-";const CONSOLE_PIN_MAX_AGE = 60 * 60; // 1 hour in secondsconst CONSOLE_PIN_MAX_AGE_MS = CONSOLE_PIN_MAX_AGE * 1000;+// A controlled environment (ITAR/CUI, NIST 3.1.10) drops a shared-console operator+// to re-PIN after the standard idle-lock window instead of 1h. pinnedAt is refreshed+// on every shell navigation (see x+/_layout loader), so this is an inactivity window.+const consolePinMaxAgeMs = () =>+ CONTROLLED_ENVIRONMENT ? SESSION_IDLE_LOCK_MS : CONSOLE_PIN_MAX_AGE_MS;+// --- Console Pin-In State ---export interface ConsolePinIn {@@ -27,7 +34,7 @@ export function getConsolePinIn(const parsed: ConsolePinIn = JSON.parse(raw);// Check manual expiry (defense-in-depth alongside cookie maxAge)const elapsed = Date.now() - parsed.pinnedAt;- if (elapsed > CONSOLE_PIN_MAX_AGE_MS) return null;+ if (elapsed > consolePinMaxAgeMs()) return null;return parsed;} catch {return null;diff --git a/packages/auth/package.json b/packages/auth/package.jsonindex 8b55656095..f1001a6e44 100644--- a/packages/auth/package.json+++ b/packages/auth/package.json@@ -13,6 +13,7 @@"exports": {".": "./src/index.ts","./auth.server": "./src/services/auth.server.ts",+ "./auth-events.server": "./src/services/auth-events.server.ts","./client.server": "./src/lib/supabase/client.server.ts","./download-token.server": "./src/lib/download-token.server.ts","./company.server": "./src/services/company.server.ts",diff --git a/packages/auth/src/services/auth-events.server.ts b/packages/auth/src/services/auth-events.server.tsnew file mode 100644index 0000000000..6f7966a718--- /dev/null+++ b/packages/auth/src/services/auth-events.server.ts@@ -0,0 +1,180 @@+import { getLogger } from "@carbon/logger";++const log = getLogger("auth", "events");++/**+ * Recorded as the actor when a permission/role change has no attributable human+ * — an automated job, a replay, or a system-initiated revocation. NIST 800-171+ * 3.3.2 requires every audited action to be traceable to an identity; a blank+ * actor is a traceability gap, so an unattributed change is stamped `system`+ * rather than omitted.+ */+export const SYSTEM_ACTOR = "system";++export type AuthEvent =+ | "login_success"+ | "login_failed"+ | "login_rate_limited"+ | "login_locked"+ | "magic_link_sent"+ | "mfa_challenge_success"+ | "mfa_challenge_failed"+ | "permission_denied"+ | "permission_changed"+ | "role_changed"+ | "logout";++/**+ * Emit a structured authentication / authorization event+ * (NIST 800-171 3.3.1 / 3.3.2 / AU-2 / AU-3).+ *+ * The application audit log records only business-entity CRUD; identity events+ * (login, logout, failed login, MFA challenge, permission denial) are captured+ * here instead. `@carbon/logger` ships to CloudWatch in production with field+ * redaction and request-id correlation, giving the org's security staff an+ * account + IP + outcome trail. `authEvent` is a stable field for CloudWatch+ * metric filters / SIEM alerting.+ *+ * The authenticating identity is carried under `actor` (NOT `email`): the logger+ * redacts a field literally named `email`, but an audit record must retain who+ * acted. `actor` is a deliberate, non-redacted identity field for that purpose.+ */+export function logAuthEvent(+ event: AuthEvent,+ fields: {+ /** The account that acted — email or userId. Deliberately not redacted. */+ actor?: string;+ userId?: string;+ ip?: string;+ companyId?: string;+ reason?: string;+ outcome?: "success" | "failure";+ [key: string]: unknown;+ }+): void {+ const failed =+ event === "login_failed" ||+ event === "login_rate_limited" ||+ event === "login_locked" ||+ event === "mfa_challenge_failed" ||+ event === "permission_denied";+ const outcome = fields.outcome ?? (failed ? "failure" : "success");+ const payload = { authEvent: event, outcome, ...fields };+ // Append the identity fields to the human-readable message so they are visible+ // in the dev ANSI console (whose formatter renders only the message, not the+ // structured properties). The properties above remain the machine-readable+ // source of truth for JSONL / CloudWatch — this line is a readable echo, not a+ // replacement.+ const target = fields.targetUserId;+ const message =+ `auth.${event}` ++ (fields.actor != null ? ` actor=${fields.actor}` : "") ++ (target != null ? ` target=${String(target)}` : "") ++ (fields.ip != null ? ` ip=${fields.ip}` : "") ++ (fields.outcome != null || failed ? ` outcome=${outcome}` : "");+ if (outcome === "failure") {+ log.warn(message, payload);+ } else {+ log.info(message, payload);+ }+}++/**+ * The permission keys (`${module}_${action}`) a user effectively holds in ONE+ * company, derived from the `userPermission.permissions` map — each key maps to+ * the list of company ids it is granted for, so a key is "held" when that list+ * includes `companyId`. Returned sorted so a before/after diff is stable and two+ * equal sets serialise identically. This is the compact, human-readable audit+ * projection of the full cross-company permission blob (which is large and noisy).+ */+export function grantedPermissionKeys(+ permissions: Record<string, string[]> | null | undefined,+ companyId: string+): string[] {+ if (!permissions) return [];+ return Object.entries(permissions)+ .filter(+ ([, companies]) =>+ Array.isArray(companies) && companies.includes(companyId)+ )+ .map(([key]) => key)+ .sort();+}++/**+ * Emit a `permission_changed` audit event (NIST 800-171 3.3.1 / 3.3.2 / AC-6).+ *+ * Records WHO changed WHOSE permissions in which company, plus the before/after+ * grant set for that company and the derived `granted` / `revoked` deltas. Used+ * by the granular permission-edit path (the `update-permissions` batch job).+ */+export function logPermissionChange(fields: {+ /** The acting admin's userId. Falls back to {@link SYSTEM_ACTOR} when absent. */+ actor?: string | null;+ /** The user whose permissions changed. */+ targetUserId: string;+ companyId: string;+ before: Record<string, string[]> | null | undefined;+ after: Record<string, string[]> | null | undefined;+ /** Source IP of the request that made the change (AU-3 "source of event"). */+ ip?: string | null;+ reason?: string;+}): void {+ const before = grantedPermissionKeys(fields.before, fields.companyId);+ const after = grantedPermissionKeys(fields.after, fields.companyId);+ logAuthEvent("permission_changed", {+ actor: fields.actor ?? SYSTEM_ACTOR,+ targetUserId: fields.targetUserId,+ companyId: fields.companyId,+ ip: fields.ip ?? undefined,+ before,+ after,+ granted: after.filter((key) => !before.includes(key)),+ revoked: before.filter((key) => !after.includes(key)),+ reason: fields.reason+ });+}++/**+ * Emit a `role_changed` audit event (NIST 800-171 3.3.1 / 3.3.2 / AC-2).+ *+ * Records a change to a user's company role/membership — notably deactivation,+ * where the role transitions to `null` and the company is stripped from every+ * permission array. When `before`/`after` permission maps are supplied, the+ * per-company grant summary and the `revoked` delta are attached for the audit+ * trail (deactivation revokes access as well as removing the role).+ */+export function logRoleChange(fields: {+ /** The acting admin's userId. Falls back to {@link SYSTEM_ACTOR} when absent. */+ actor?: string | null;+ /** The user whose role changed. */+ targetUserId: string;+ companyId: string;+ beforeRole?: string | null;+ afterRole?: string | null;+ before?: Record<string, string[]> | null;+ after?: Record<string, string[]> | null;+ /** Source IP of the request that made the change (AU-3 "source of event"). */+ ip?: string | null;+ reason?: string;+}): void {+ const payload: Record<string, unknown> = {+ actor: fields.actor ?? SYSTEM_ACTOR,+ targetUserId: fields.targetUserId,+ companyId: fields.companyId,+ ip: fields.ip ?? undefined,+ beforeRole: fields.beforeRole ?? null,+ afterRole: fields.afterRole ?? null,+ reason: fields.reason+ };++ if (fields.before !== undefined || fields.after !== undefined) {+ const before = grantedPermissionKeys(fields.before, fields.companyId);+ const after = grantedPermissionKeys(fields.after, fields.companyId);+ payload.before = before;+ payload.after = after;+ payload.revoked = before.filter((key) => !after.includes(key));+ }++ logAuthEvent("role_changed", payload);+}diff --git a/packages/auth/src/services/auth-events.test.ts b/packages/auth/src/services/auth-events.test.tsnew file mode 100644index 0000000000..238680a385--- /dev/null+++ b/packages/auth/src/services/auth-events.test.ts@@ -0,0 +1,152 @@+import { beforeEach, describe, expect, it, vi } from "vitest";++// Capture logger output without pulling in @logtape. `logAuthEvent` binds the+// logger at module load, so the mock must be hoisted and return a stable object.+const { info, warn, error } = vi.hoisted(() => ({+ info: vi.fn(),+ warn: vi.fn(),+ error: vi.fn()+}));++vi.mock("@carbon/logger", () => ({+ getLogger: () => ({ info, warn, error })+}));++import {+ grantedPermissionKeys,+ logPermissionChange,+ logRoleChange+} from "./auth-events.server";++const COMPANY = "cmp_1";+const OTHER = "cmp_2";++beforeEach(() => {+ info.mockClear();+ warn.mockClear();+ error.mockClear();+});++describe("grantedPermissionKeys", () => {+ it("returns only keys granted for the given company, sorted", () => {+ const permissions = {+ sales_view: [COMPANY, OTHER],+ sales_update: [COMPANY],+ parts_view: [OTHER],+ purchasing_view: []+ };+ expect(grantedPermissionKeys(permissions, COMPANY)).toEqual([+ "sales_update",+ "sales_view"+ ]);+ });++ it("is null/undefined safe", () => {+ expect(grantedPermissionKeys(null, COMPANY)).toEqual([]);+ expect(grantedPermissionKeys(undefined, COMPANY)).toEqual([]);+ });+});++describe("logPermissionChange", () => {+ it("emits permission_changed with actor, target, before/after and deltas", () => {+ logPermissionChange({+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ before: { sales_view: [COMPANY], parts_view: [COMPANY] },+ after: { sales_view: [COMPANY], purchasing_view: [COMPANY] }+ });++ expect(info).toHaveBeenCalledTimes(1);+ const [message, payload] = info.mock.calls[0]!;+ expect(message).toContain("auth.permission_changed");+ expect(message).toContain("actor=usr_admin");+ expect(payload).toMatchObject({+ authEvent: "permission_changed",+ outcome: "success",+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ before: ["parts_view", "sales_view"],+ after: ["purchasing_view", "sales_view"],+ granted: ["purchasing_view"],+ revoked: ["parts_view"]+ });+ });++ it("stamps a system actor when actor is missing (never unattributed)", () => {+ logPermissionChange({+ targetUserId: "usr_target",+ companyId: COMPANY,+ before: {},+ after: { sales_view: [COMPANY] }+ });+ const [, payload] = info.mock.calls[0]!;+ expect(payload.actor).toBe("system");+ expect(payload.granted).toEqual(["sales_view"]);+ expect(payload.revoked).toEqual([]);+ });++ it("records the source ip when provided", () => {+ logPermissionChange({+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ ip: "203.0.113.7",+ before: {},+ after: { sales_view: [COMPANY] }+ });+ const [, payload] = info.mock.calls[0]!;+ expect(payload.ip).toBe("203.0.113.7");+ });+});++describe("logRoleChange", () => {+ it("emits role_changed with role transition and revoked permissions on deactivation", () => {+ logRoleChange({+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ beforeRole: "employee",+ afterRole: null,+ before: { sales_view: [COMPANY, OTHER], parts_view: [COMPANY] },+ after: { sales_view: [OTHER], parts_view: [] },+ ip: "203.0.113.7",+ reason: "deactivate"+ });++ expect(info).toHaveBeenCalledTimes(1);+ const [message, payload] = info.mock.calls[0]!;+ expect(message).toContain("auth.role_changed");+ expect(message).toContain("ip=203.0.113.7");+ expect(payload).toMatchObject({+ authEvent: "role_changed",+ outcome: "success",+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ beforeRole: "employee",+ afterRole: null,+ before: ["parts_view", "sales_view"],+ after: [],+ revoked: ["parts_view", "sales_view"],+ ip: "203.0.113.7",+ reason: "deactivate"+ });+ });++ it("omits the permission summary when no before/after maps are given", () => {+ logRoleChange({+ actor: "usr_admin",+ targetUserId: "usr_target",+ companyId: COMPANY,+ beforeRole: "employee",+ afterRole: null+ });+ const [, payload] = info.mock.calls[0]!;+ expect(payload.before).toBeUndefined();+ expect(payload.after).toBeUndefined();+ expect(payload.beforeRole).toBe("employee");+ expect(payload.afterRole).toBeNull();+ });+});diff --git a/packages/auth/src/services/auth.server.ts b/packages/auth/src/services/auth.server.tsindex 1a1365fa9b..93c22b32a7 100644--- a/packages/auth/src/services/auth.server.ts+++ b/packages/auth/src/services/auth.server.ts@@ -12,7 +12,9 @@ import { createHash } from "crypto";import { redirect } from "react-router";import {CarbonEdition,+ CONTROLLED_ENVIRONMENT,REFRESH_ACCESS_TOKEN_THRESHOLD,+ SESSION_IDLE_LOCK_MS,STRIPE_BYPASS_COMPANY_IDS,VERCEL_URL} from "../config/env";@@ -22,6 +24,7 @@ import { getCarbonServiceRole } from "../lib/supabase/client.server";import type { AuthSession } from "../types";import { path } from "../utils/path";import { error } from "../utils/result";+import { logAuthEvent } from "./auth-events.server";import { isCarbonOwnedCompany } from "./company.server";import {destroyAuthSession,@@ -33,6 +36,8 @@ import { getUserClaims } from "./users.server";const log = getLogger("auth");+export { logAuthEvent } from "./auth-events.server";+// Each matched loader used to build its own Supabase client for identical// credentials; `createClient` is not free and they are interchangeable.const carbonForRequest = (accessToken: string) =>@@ -150,6 +155,11 @@ export function makeAuthSession(expiresIn:(supabaseSession.expires_in ?? 3000) - REFRESH_ACCESS_TOKEN_THRESHOLD,expiresAt: supabaseSession.expires_at ?? -1,+ // Session-lock/termination clocks (NIST 3.1.10/3.1.11). Stamped at every mint+ // AND on the refresh rebuild; refreshAuthSession then re-preserves the original+ // createdAt/lastActiveAt so a silent token refresh never resets either clock.+ createdAt: Date.now(),+ lastActiveAt: Date.now(),...(options?.mfaVerified ? { mfaVerified: true } : {})};}@@ -187,7 +197,12 @@ function getEffectiveUser(try {const pinIn = JSON.parse(pinRaw);const elapsed = Date.now() - pinIn.pinnedAt;- if (elapsed > 3600000) return sessionUserId;+ // Console operator idle window. A controlled environment (ITAR/CUI, NIST+ // 3.1.10) drops the operator to re-PIN after the standard idle-lock window+ // instead of the default 1h — pinnedAt is refreshed on every shell+ // navigation, so this is effectively an inactivity timeout.+ const maxAge = CONTROLLED_ENVIRONMENT ? SESSION_IDLE_LOCK_MS : 3600000;+ if (elapsed > maxAge) return sessionUserId;return pinIn.userId ?? sessionUserId;} catch {return sessionUserId;@@ -360,11 +375,7 @@ export async function requirePermissions(myClaims.permissions[permission]?.[action as "view" | "create" | "update" | "delete"];- return (- permissionForCompany?.includes("0") || // 0 is the wildcard for all companies- permissionForCompany?.includes(companyId) ||- false- );+ return permissionForCompany?.includes(companyId) || false;} else if (Array.isArray(permission)) {return permission.every((p) => {const permissionForCompany =@@ -380,6 +391,13 @@ export async function requirePermissions();if (!hasRequiredPermissions) {+ logAuthEvent("permission_denied", {+ userId,+ actor: email,+ companyId,+ ip: request.headers.get("x-forwarded-for") ?? undefined,+ reason: JSON.stringify(requiredPermissions)+ });if (myClaims.role === null) {throw redirect("/", await destroyAuthSession(request));}diff --git a/packages/auth/src/services/mfa-session.test.ts b/packages/auth/src/services/mfa-session.test.tsindex 2c52b9876c..7384a6ee67 100644--- a/packages/auth/src/services/mfa-session.test.ts+++ b/packages/auth/src/services/mfa-session.test.ts@@ -15,7 +15,10 @@ vi.mock("@carbon/kv", () => ({vi.mock("../config/env", () => ({DOMAIN: "localhost",CarbonEdition: "Community",+ CONTROLLED_ENVIRONMENT: false,REFRESH_ACCESS_TOKEN_THRESHOLD: 60,+ SESSION_ABSOLUTE_MAX_MS: 12 * 60 * 60 * 1000,+ SESSION_IDLE_LOCK_MS: 15 * 60 * 1000,SESSION_KEY: "auth",SESSION_MAX_AGE: 60 * 60 * 24 * 7,SESSION_SECRET: "test-session-secret"@@ -44,7 +47,8 @@ vi.mock("./auth.server", () => ({: null),refreshAccessToken: vi.fn(),- verifyAuthSession: vi.fn().mockResolvedValue(true)+ verifyAuthSession: vi.fn().mockResolvedValue(true),+ logAuthEvent: vi.fn()}));vi.mock("./company.server", () => ({diff --git a/packages/auth/src/services/mfa.server.ts b/packages/auth/src/services/mfa.server.tsindex 73322cb02b..3cfd41a526 100644--- a/packages/auth/src/services/mfa.server.ts+++ b/packages/auth/src/services/mfa.server.ts@@ -1,3 +1,4 @@+import { CONTROLLED_ENVIRONMENT } from "@carbon/env";import { redis } from "@carbon/kv";import { getLogger } from "@carbon/logger";import { oncePerRead } from "@carbon/logger/middleware.server";@@ -76,18 +77,25 @@ async function loadHasVerifiedTotpFactor(userId: string): Promise<boolean> {log.error("Failed to read MFA factor cache", { error: e });}- const { data, error } =- await getCarbonServiceRole().auth.admin.mfa.listFactors({ userId });-- if (error || !data) {- log.error("Failed to list MFA factors", { userId, error });- return false;+ let hasVerified: boolean;+ try {+ const { data, error } =+ await getCarbonServiceRole().auth.admin.mfa.listFactors({ userId });+ if (error || !data) {+ throw error ?? new Error("No MFA factor data returned");+ }+ hasVerified = data.factors.some(+ (factor) => factor.factor_type === "totp" && factor.status === "verified"+ );+ } catch (e) {+ log.error("Failed to list MFA factors", { userId, error: e });+ // Fail CLOSED under CONTROLLED_ENVIRONMENT (ITAR/CUI, NIST 800-171 3.5.3): a+ // lookup blip must not let an enrolled user skip the MFA challenge. Outside a+ // controlled environment fail OPEN, so a transient error can't lock out users+ // who have no factor enrolled.+ return CONTROLLED_ENVIRONMENT;}- const hasVerified = data.factors.some(- (factor) => factor.factor_type === "totp" && factor.status === "verified"- );-try {await redis.set(cacheKey,diff --git a/packages/auth/src/services/session-timeout.test.ts b/packages/auth/src/services/session-timeout.test.tsnew file mode 100644index 0000000000..b10eb43808--- /dev/null+++ b/packages/auth/src/services/session-timeout.test.ts@@ -0,0 +1,172 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";++// Isolation mocks — session.server's siblings pull in supabase/env at module+// load; stub them so the cookie/predicate logic under test runs against the+// real react-router session storage only. (Mirrors mfa-session.test.ts.)+vi.mock("@carbon/kv", () => ({+ redis: {+ get: vi.fn().mockResolvedValue(null),+ set: vi.fn().mockResolvedValue(null),+ del: vi.fn().mockResolvedValue(null)+ }+}));++const IDLE_MS = 15 * 60 * 1000;+const ABSOLUTE_MS = 12 * 60 * 60 * 1000;++vi.mock("../config/env", () => ({+ DOMAIN: "localhost",+ CarbonEdition: "Community",+ CONTROLLED_ENVIRONMENT: false,+ REFRESH_ACCESS_TOKEN_THRESHOLD: 60,+ SESSION_ABSOLUTE_MAX_MS: 12 * 60 * 60 * 1000,+ SESSION_IDLE_LOCK_MS: 15 * 60 * 1000,+ SESSION_KEY: "auth",+ SESSION_MAX_AGE: 60 * 60 * 24 * 7,+ SESSION_SECRET: "test-session-secret"+}));++vi.mock("./auth.server", () => ({+ // refreshAccessToken returns a FRESH-minted-looking session (createdAt/lastActiveAt+ // = "now"), so the preserve test proves refreshAuthSession restores the originals.+ makeAuthSession: vi.fn(),+ refreshAccessToken: vi.fn(),+ verifyAuthSession: vi.fn().mockResolvedValue(true)+}));++vi.mock("./company.server", () => ({+ setCompanyId: vi.fn(() => "companyId=cookie")+}));++vi.mock("./mfa.server", () => ({+ getTotpFactors: vi.fn().mockResolvedValue([]),+ userHasVerifiedTotpFactor: vi.fn().mockResolvedValue(false),+ verifyTotpChallenge: vi.fn().mockResolvedValue(null)+}));++vi.mock("./users", () => ({+ getPermissionCacheKey: (userId: string) => `permissions:${userId}`+}));++import type { AuthSession } from "../types";+import { refreshAccessToken } from "./auth.server";+import {+ isSessionExpiredAbsolute,+ isSessionIdleLocked,+ refreshAuthSession,+ setAuthSession+} from "./session.server";++const FUTURE_EXPIRES_AT = 4102444800; // far enough that isExpiringSoon is false++const makeSession = (overrides: Partial<AuthSession> = {}): AuthSession => ({+ accessToken: "access-token",+ refreshToken: "refresh-token",+ userId: "user_1",+ companyId: "company_1",+ companyGroupId: "group_1",+ email: "[email protected]",+ expiresIn: 3000,+ expiresAt: FUTURE_EXPIRES_AT,+ ...overrides+});++const requestWithCookie = (+ cookie: string,+ { method = "POST", url = "http://localhost:3000/x" } = {}+) => new Request(url, { method, headers: { Cookie: cookie } });++describe("session timeout predicates", () => {+ beforeEach(() => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date("2026-08-17T12:00:00Z"));+ });++ afterEach(() => {+ vi.useRealTimers();+ vi.clearAllMocks();+ });++ describe("isSessionExpiredAbsolute (3.1.11)", () => {+ it("is false when createdAt is missing (back-compat)", () => {+ expect(isSessionExpiredAbsolute(makeSession())).toBe(false);+ });++ it("is false within the 12h cap", () => {+ const session = makeSession({+ createdAt: Date.now() - (ABSOLUTE_MS - 1000)+ });+ expect(isSessionExpiredAbsolute(session)).toBe(false);+ });++ it("is true past the 12h cap", () => {+ const session = makeSession({+ createdAt: Date.now() - (ABSOLUTE_MS + 1000)+ });+ expect(isSessionExpiredAbsolute(session)).toBe(true);+ });+ });++ describe("isSessionIdleLocked (3.1.10)", () => {+ it("is false when lastActiveAt is missing (back-compat)", () => {+ expect(isSessionIdleLocked(makeSession())).toBe(false);+ });++ it("is false within the 15min idle window", () => {+ const session = makeSession({+ lastActiveAt: Date.now() - (IDLE_MS - 1000)+ });+ expect(isSessionIdleLocked(session)).toBe(false);+ });++ it("is true past the 15min idle window", () => {+ const session = makeSession({+ lastActiveAt: Date.now() - (IDLE_MS + 1000)+ });+ expect(isSessionIdleLocked(session)).toBe(true);+ });+ });+});++describe("refreshAuthSession preserves session-age clocks", () => {+ beforeEach(() => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date("2026-08-17T12:00:00Z"));+ });++ afterEach(() => {+ vi.useRealTimers();+ vi.clearAllMocks();+ });++ it("keeps the original createdAt/lastActiveAt across a silent token refresh", async () => {+ // Session was created 8h ago and last active 2min ago.+ const originalCreatedAt = Date.now() - 8 * 60 * 60 * 1000;+ const originalLastActiveAt = Date.now() - 2 * 60 * 1000;++ const cookie = await setAuthSession(+ new Request("http://localhost:3000/x"),+ {+ authSession: makeSession({+ createdAt: originalCreatedAt,+ lastActiveAt: originalLastActiveAt+ })+ }+ );++ // The refresh rebuild looks freshly-minted (createdAt/lastActiveAt = now).+ vi.mocked(refreshAccessToken).mockResolvedValue(+ makeSession({ createdAt: Date.now(), lastActiveAt: Date.now() })+ );++ // POST so refreshAuthSession returns inline rather than throwing a GET redirect.+ const refreshed = await refreshAuthSession(requestWithCookie(cookie));++ // The absolute-cap clock and idle clock are the ORIGINALS, not "now".+ expect(refreshed.createdAt).toBe(originalCreatedAt);+ expect(refreshed.lastActiveAt).toBe(originalLastActiveAt);+ // Sanity: a session 8h old is not yet absolute-expired, and 2min idle is not locked.+ expect(isSessionExpiredAbsolute(refreshed)).toBe(false);+ expect(isSessionIdleLocked(refreshed)).toBe(false);+ });+});diff --git a/packages/auth/src/services/session.server.ts b/packages/auth/src/services/session.server.tsindex 6b57dfe3de..20c9c5c3bd 100644--- a/packages/auth/src/services/session.server.ts+++ b/packages/auth/src/services/session.server.ts@@ -5,8 +5,11 @@ import { createCookieSessionStorage, redirect } from "react-router";import {CarbonEdition,+ CONTROLLED_ENVIRONMENT,DOMAIN,REFRESH_ACCESS_TOKEN_THRESHOLD,+ SESSION_ABSOLUTE_MAX_MS,+ SESSION_IDLE_LOCK_MS,SESSION_KEY,SESSION_MAX_AGE,SESSION_SECRET@@ -16,6 +19,7 @@ import { getCookieDomain } from "../utils/cookie";import { getCurrentPath, isGet, makeRedirectToFromHere } from "../utils/http";import { path } from "../utils/path";import {+ logAuthEvent,makeAuthSession,refreshAccessToken,verifyAuthSession@@ -169,6 +173,7 @@ export async function completeMfaChallenge(}if (!supabaseSession) {+ logAuthEvent("mfa_challenge_failed", { userId: source.userId });return { success: false, reason: "invalid-code" };}@@ -189,6 +194,8 @@ export async function completeMfaChallenge(const sessionCookie = await setAuthSession(request, { authSession });+ logAuthEvent("mfa_challenge_success", { userId: authSession.userId });+return {success: true,authSession,@@ -278,6 +285,25 @@ function isExpiringSoon(expiresAt: number) {return (expiresAt - REFRESH_ACCESS_TOKEN_THRESHOLD) * 1000 < Date.now();}+/**+ * Absolute session cap (NIST 800-171 3.1.11). A missing `createdAt` counts as+ * "never expired" — a session minted before this shipped gets stamped on its+ * next mint/refresh rather than being force-terminated on sight.+ */+export function isSessionExpiredAbsolute(session: AuthSession): boolean {+ if (!session.createdAt) return false;+ return Date.now() - session.createdAt > SESSION_ABSOLUTE_MAX_MS;+}++/**+ * Idle session lock (NIST 800-171 3.1.10). A missing `lastActiveAt` counts as+ * "not locked" (back-compat) — the heartbeat/unlock stamps it going forward.+ */+export function isSessionIdleLocked(session: AuthSession): boolean {+ if (!session.lastActiveAt) return false;+ return Date.now() - session.lastActiveAt > SESSION_IDLE_LOCK_MS;+}+export async function requireAuthSession(request: Request,{@@ -298,6 +324,21 @@ export async function requireAuthSession(authSession = await refreshAuthSession(request);}+ // NIST 800-171 3.1.10 (session lock) / 3.1.11 (session termination) — enforced+ // only in a controlled (ITAR/CUI) environment. Console DEVICE sessions are+ // exempt: their lock is the operator pin-in (see console.server), and a shared+ // shop-floor kiosk must not be force-logged-out mid-shift (spec D8).+ if (CONTROLLED_ENVIRONMENT && !authSession.console) {+ // Absolute cap (3.1.11): terminate — destroy the session, force full re-login.+ if (isSessionExpiredAbsolute(authSession)) {+ throw await destroyAuthSession(request);+ }+ // Idle lock (3.1.10): the session is PRESERVED; re-auth at /unlock to resume.+ if (isSessionIdleLocked(authSession)) {+ throw redirect(`${path.to.unlock}?${makeRedirectToFromHere(request)}`);+ }+ }+// Active MFA re-check: a session minted before the user enrolled a TOTP// factor (or on another device) is not trusted just because it exists —// send it through the challenge. Sessions issued after a passed challenge@@ -331,6 +372,15 @@ export async function refreshAuthSession(if (refreshedAuthSession && authSession?.mfaVerified) {refreshedAuthSession.mfaVerified = authSession.mfaVerified;}+ // Preserve session age + last-activity across a silent token refresh — a+ // refresh is neither a re-auth nor user activity, so it must not reset the+ // absolute-cap clock (3.1.11) or the idle clock (3.1.10).+ if (refreshedAuthSession && authSession?.createdAt) {+ refreshedAuthSession.createdAt = authSession.createdAt;+ }+ if (refreshedAuthSession && authSession?.lastActiveAt) {+ refreshedAuthSession.lastActiveAt = authSession.lastActiveAt;+ }if (!refreshedAuthSession) {const redirectUrl = `${path.to.login}?${makeRedirectToFromHere(request)}`;@@ -365,6 +415,23 @@ export async function refreshAuthSession(return refreshedAuthSession;}+/**+ * Re-commit the session cookie with `lastActiveAt = now`. Called by the activity+ * heartbeat (an active session pings this well within the idle window) and on a+ * successful unlock. Returns the Set-Cookie string, or null if there is no+ * session to touch. Only the idle clock moves — `createdAt` (the absolute-cap+ * clock) is left untouched.+ */+export async function touchAuthSession(+ request: Request+): Promise<string | null> {+ const session = await getSession(request);+ const authSession = await getAuthSession(request);+ if (!authSession) return null;+ session.set(SESSION_KEY, { ...authSession, lastActiveAt: Date.now() });+ return sessionStorage.commitSession(session, { maxAge: SESSION_MAX_AGE });+}+export async function updateSessionConsole(request: Request,consoleCompanyId: string | undefineddiff --git a/packages/auth/src/services/users.server.ts b/packages/auth/src/services/users.server.tsindex 3b0320eb21..2da605bf30 100644--- a/packages/auth/src/services/users.server.ts+++ b/packages/auth/src/services/users.server.ts@@ -6,6 +6,7 @@ import type { SupabaseClient } from "@supabase/supabase-js";import { getCarbonServiceRole } from "../lib/supabase/client.server";import type { Permission, Result } from "../types";import { error, success } from "../utils/result";+import { logRoleChange } from "./auth-events.server";import {getClaims,getPermissionCacheKey,@@ -102,7 +103,9 @@ async function loadUserClaims(userId: string, companyId: string) {export async function deactivateCustomer(serviceRole: SupabaseClient<Database>,userId: string,- companyId: string+ companyId: string,+ actorId?: string,+ ip?: string): Promise<Result> {const currentPermissions = await serviceRole.from("userPermission")@@ -114,12 +117,17 @@ export async function deactivateCustomer(return error(currentPermissions.error, "Failed to get user permissions");}- const permissions = Object.entries(- (currentPermissions.data?.permissions ?? {}) as Record<string, string[]>- ).reduce<Record<string, string[]>>((acc, [key, value]) => {- acc[key] = value.filter((id) => id !== companyId);- return acc;- }, {});+ const before = (currentPermissions.data?.permissions ?? {}) as Record<+ string,+ string[]+ >;+ const permissions = Object.entries(before).reduce<Record<string, string[]>>(+ (acc, [key, value]) => {+ acc[key] = value.filter((id) => id !== companyId);+ return acc;+ },+ {}+ );const companyGroups = await serviceRole.from("group")@@ -173,13 +181,27 @@ export async function deactivateCustomer();}+ logRoleChange({+ actor: actorId,+ targetUserId: userId,+ companyId,+ beforeRole: "customer",+ afterRole: null,+ before,+ after: permissions,+ ip,+ reason: "deactivate"+ });+return success("Sucessfully deactivated customer");}export async function deactivateEmployee(serviceRole: SupabaseClient<Database>,userId: string,- companyId: string+ companyId: string,+ actorId?: string,+ ip?: string): Promise<Result> {const currentPermissions = await serviceRole.from("userPermission")@@ -191,12 +213,17 @@ export async function deactivateEmployee(return error(currentPermissions.error, "Failed to get user permissions");}- const permissions = Object.entries(- (currentPermissions.data?.permissions ?? {}) as Record<string, string[]>- ).reduce<Record<string, string[]>>((acc, [key, value]) => {- acc[key] = value.filter((id) => id !== companyId);- return acc;- }, {});+ const before = (currentPermissions.data?.permissions ?? {}) as Record<+ string,+ string[]+ >;+ const permissions = Object.entries(before).reduce<Record<string, string[]>>(+ (acc, [key, value]) => {+ acc[key] = value.filter((id) => id !== companyId);+ return acc;+ },+ {}+ );const companyGroups = await serviceRole.from("group")@@ -252,13 +279,27 @@ export async function deactivateEmployee(return error(employeeDeactivate.error, "Failed to deactivate employee");}+ logRoleChange({+ actor: actorId,+ targetUserId: userId,+ companyId,+ beforeRole: "employee",+ afterRole: null,+ before,+ after: permissions,+ ip,+ reason: "deactivate"+ });+return success("Sucessfully deactivated employee");}export async function deactivateUser(serviceRole: SupabaseClient<Database>,userId: string,- companyId: string+ companyId: string,+ actorId?: string,+ ip?: string) {const userToCompany = await serviceRole.from("userToCompany")@@ -293,21 +334,57 @@ export async function deactivateUser(}if (invite.data.role === "customer") {- result = await deactivateCustomer(serviceRole, userId, companyId);+ result = await deactivateCustomer(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else if (invite.data.role === "employee") {- result = await deactivateEmployee(serviceRole, userId, companyId);+ result = await deactivateEmployee(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else if (invite.data.role === "supplier") {- result = await deactivateSupplier(serviceRole, userId, companyId);+ result = await deactivateSupplier(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else {throw new Error("Invalid user role");}} else {if (userToCompany.data?.role === "customer") {- result = await deactivateCustomer(serviceRole, userId, companyId);+ result = await deactivateCustomer(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else if (userToCompany.data?.role === "employee") {- result = await deactivateEmployee(serviceRole, userId, companyId);+ result = await deactivateEmployee(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else if (userToCompany.data?.role === "supplier") {- result = await deactivateSupplier(serviceRole, userId, companyId);+ result = await deactivateSupplier(+ serviceRole,+ userId,+ companyId,+ actorId,+ ip+ );} else {throw new Error("Invalid user role");}@@ -342,7 +419,9 @@ export async function deactivateUser(export async function deactivateSupplier(serviceRole: SupabaseClient<Database>,userId: string,- companyId: string+ companyId: string,+ actorId?: string,+ ip?: string): Promise<Result> {const currentPermissions = await serviceRole.from("userPermission")@@ -354,12 +433,17 @@ export async function deactivateSupplier(return error(currentPermissions.error, "Failed to get user permissions");}- const permissions = Object.entries(- (currentPermissions.data?.permissions ?? {}) as Record<string, string[]>- ).reduce<Record<string, string[]>>((acc, [key, value]) => {- acc[key] = value.filter((id) => id !== companyId);- return acc;- }, {});+ const before = (currentPermissions.data?.permissions ?? {}) as Record<+ string,+ string[]+ >;+ const permissions = Object.entries(before).reduce<Record<string, string[]>>(+ (acc, [key, value]) => {+ acc[key] = value.filter((id) => id !== companyId);+ return acc;+ },+ {}+ );const companyGroups = await serviceRole.from("group")@@ -413,5 +497,17 @@ export async function deactivateSupplier();}+ logRoleChange({+ actor: actorId,+ targetUserId: userId,+ companyId,+ beforeRole: "supplier",+ afterRole: null,+ before,+ after: permissions,+ ip,+ reason: "deactivate"+ });+return success("Sucessfully deactivated supplier");}diff --git a/packages/auth/src/types.ts b/packages/auth/src/types.tsindex 6bd33254ac..19bff0e9da 100644--- a/packages/auth/src/types.ts+++ b/packages/auth/src/types.ts@@ -16,6 +16,19 @@ export interface AuthSession {* sessions where this is unset but the user has a verified factor.*/mfaVerified?: boolean;+ /**+ * Session start (unix ms). Stamped once at mint; PRESERVED across token+ * refresh (never reset by refreshAuthSession). Basis of the 12h absolute cap+ * (SESSION_ABSOLUTE_MAX_MS). Optional for back-compat with sessions minted+ * before this shipped — treated as "now" on first sight.+ */+ createdAt?: number;+ /**+ * Last real user activity (unix ms). Updated only by the activity heartbeat+ * and on unlock — NOT by background requests or token refresh. Basis of the+ * 15min idle lock (SESSION_IDLE_LOCK_MS). Optional for back-compat.+ */+ lastActiveAt?: number;}export type Company = NonNullable<diff --git a/packages/auth/src/utils/path.ts b/packages/auth/src/utils/path.tsindex 4bfd8c7455..8d21e6763a 100644--- a/packages/auth/src/utils/path.ts+++ b/packages/auth/src/utils/path.ts@@ -4,6 +4,7 @@ export const path = {authenticatedRoot: x,login: "/login",mfa: "/mfa",+ unlock: "/unlock",refreshSession: "/refresh-session"}};diff --git a/packages/checks/src/conformance/baseline.json b/packages/checks/src/conformance/baseline.jsonindex ef8136894c..6006d6efb4 100644--- a/packages/checks/src/conformance/baseline.json+++ b/packages/checks/src/conformance/baseline.json@@ -163,6 +163,8 @@"no-legacy-rls::20250128094053_traceability.sql::has_company_permission(","no-legacy-rls::20260115143000_purchasing-rfq.sql::has_company_permission(","no-legacy-rls::20260430000001_tax-status.sql::has_company_permission(",+ "no-legacy-rls::20260817030612_remove-global-permission-wildcard.sql::has_company_permission(",+ "no-legacy-rls::20260817040245_fix-is-claims-admin-permission-key.sql::has_company_permission(","no-local-timezone::apps/erp/app/modules/accounting/accounting.ee.service.ts::new Date().toISOString().split(\"T\")[0]","no-local-timezone::apps/erp/app/modules/items/items.service.ts::new Date().toISOString().split(\"T\")[0]","no-local-timezone::apps/erp/app/modules/sales/sales.service.ts::new Date().toISOString().split(\"T\")[0]",diff --git a/packages/database/src/swagger-docs-schema.ts b/packages/database/src/swagger-docs-schema.tsindex 4f098a3eac..fbb69f9d39 100644--- a/packages/database/src/swagger-docs-schema.ts+++ b/packages/database/src/swagger-docs-schema.ts@@ -867,195 +867,6 @@ export default {tags: ["accountingSyncOperation"]}},- "/workflowVersion": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowVersion.id"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.versionNumber"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.formatVersion"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.nodes"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.edges"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/workflowVersion"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["workflowVersion"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.workflowVersion"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["workflowVersion"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowVersion.id"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.versionNumber"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.formatVersion"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.nodes"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.edges"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowVersion"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowVersion.id"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.versionNumber"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.formatVersion"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.nodes"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.edges"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedBy"- },- {- $ref: "#/parameters/rowFilter.workflowVersion.updatedAt"- },- {- $ref: "#/parameters/body.workflowVersion"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowVersion"]- }- },"/service": {get: {parameters: [@@ -6087,47 +5898,47 @@ export default {tags: ["companyUsage"]}},- "/workflow": {+ "/approvalRequests": {get: {parameters: [{- $ref: "#/parameters/rowFilter.workflow.id"+ $ref: "#/parameters/rowFilter.approvalRequests.id"},{- $ref: "#/parameters/rowFilter.workflow.companyId"+ $ref: "#/parameters/rowFilter.approvalRequests.documentType"},{- $ref: "#/parameters/rowFilter.workflow.name"+ $ref: "#/parameters/rowFilter.approvalRequests.documentId"},{- $ref: "#/parameters/rowFilter.workflow.description"+ $ref: "#/parameters/rowFilter.approvalRequests.status"},{- $ref: "#/parameters/rowFilter.workflow.ownerId"+ $ref: "#/parameters/rowFilter.approvalRequests.requestedBy"},{- $ref: "#/parameters/rowFilter.workflow.active"+ $ref: "#/parameters/rowFilter.approvalRequests.requestedAt"},{- $ref: "#/parameters/rowFilter.workflow.activeVersionId"+ $ref: "#/parameters/rowFilter.approvalRequests.decisionBy"},{- $ref: "#/parameters/rowFilter.workflow.nextRunAt"+ $ref: "#/parameters/rowFilter.approvalRequests.decisionAt"},{- $ref: "#/parameters/rowFilter.workflow.canvasState"+ $ref: "#/parameters/rowFilter.approvalRequests.decisionNotes"},{- $ref: "#/parameters/rowFilter.workflow.createdBy"+ $ref: "#/parameters/rowFilter.approvalRequests.companyId"},{- $ref: "#/parameters/rowFilter.workflow.createdAt"+ $ref: "#/parameters/rowFilter.approvalRequests.createdAt"},{- $ref: "#/parameters/rowFilter.workflow.updatedBy"+ $ref: "#/parameters/rowFilter.approvalRequests.documentReadableId"},{- $ref: "#/parameters/rowFilter.workflow.updatedAt"+ $ref: "#/parameters/rowFilter.approvalRequests.documentDescription"},{$ref: "#/parameters/select"@@ -6156,7 +5967,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/workflow"+ $ref: "#/definitions/approvalRequests"},type: "array"}@@ -6165,266 +5976,59 @@ export default {description: "Partial Content"}},- tags: ["workflow"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.workflow"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["workflow"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflow.id"- },- {- $ref: "#/parameters/rowFilter.workflow.companyId"- },- {- $ref: "#/parameters/rowFilter.workflow.name"- },- {- $ref: "#/parameters/rowFilter.workflow.description"- },- {- $ref: "#/parameters/rowFilter.workflow.ownerId"- },- {- $ref: "#/parameters/rowFilter.workflow.active"- },- {- $ref: "#/parameters/rowFilter.workflow.activeVersionId"- },- {- $ref: "#/parameters/rowFilter.workflow.nextRunAt"- },- {- $ref: "#/parameters/rowFilter.workflow.canvasState"- },- {- $ref: "#/parameters/rowFilter.workflow.createdBy"- },- {- $ref: "#/parameters/rowFilter.workflow.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflow.updatedBy"- },- {- $ref: "#/parameters/rowFilter.workflow.updatedAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflow"]- },- patch: {+ tags: ["approvalRequests"]+ }+ },+ "/inventoryCount": {+ get: {parameters: [{- $ref: "#/parameters/rowFilter.workflow.id"- },- {- $ref: "#/parameters/rowFilter.workflow.companyId"- },- {- $ref: "#/parameters/rowFilter.workflow.name"- },- {- $ref: "#/parameters/rowFilter.workflow.description"- },- {- $ref: "#/parameters/rowFilter.workflow.ownerId"- },- {- $ref: "#/parameters/rowFilter.workflow.active"- },- {- $ref: "#/parameters/rowFilter.workflow.activeVersionId"- },- {- $ref: "#/parameters/rowFilter.workflow.nextRunAt"- },- {- $ref: "#/parameters/rowFilter.workflow.canvasState"- },- {- $ref: "#/parameters/rowFilter.workflow.createdBy"- },- {- $ref: "#/parameters/rowFilter.workflow.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflow.updatedBy"+ $ref: "#/parameters/rowFilter.inventoryCount.id"},{- $ref: "#/parameters/rowFilter.workflow.updatedAt"+ $ref: "#/parameters/rowFilter.inventoryCount.companyId"},{- $ref: "#/parameters/body.workflow"+ $ref: "#/parameters/rowFilter.inventoryCount.inventoryCountId"},{- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflow"]- }- },- "/approvalRequests": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.approvalRequests.id"+ $ref: "#/parameters/rowFilter.inventoryCount.locationId"},{- $ref: "#/parameters/rowFilter.approvalRequests.documentType"+ $ref: "#/parameters/rowFilter.inventoryCount.status"},{- $ref: "#/parameters/rowFilter.approvalRequests.documentId"+ $ref: "#/parameters/rowFilter.inventoryCount.isBlind"},{- $ref: "#/parameters/rowFilter.approvalRequests.status"+ $ref: "#/parameters/rowFilter.inventoryCount.scope"},{- $ref: "#/parameters/rowFilter.approvalRequests.requestedBy"+ $ref: "#/parameters/rowFilter.inventoryCount.snapshotAt"},{- $ref: "#/parameters/rowFilter.approvalRequests.requestedAt"+ $ref: "#/parameters/rowFilter.inventoryCount.notes"},{- $ref: "#/parameters/rowFilter.approvalRequests.decisionBy"+ $ref: "#/parameters/rowFilter.inventoryCount.postedBy"},{- $ref: "#/parameters/rowFilter.approvalRequests.decisionAt"+ $ref: "#/parameters/rowFilter.inventoryCount.postedAt"},{- $ref: "#/parameters/rowFilter.approvalRequests.decisionNotes"+ $ref: "#/parameters/rowFilter.inventoryCount.createdBy"},{- $ref: "#/parameters/rowFilter.approvalRequests.companyId"+ $ref: "#/parameters/rowFilter.inventoryCount.createdAt"},{- $ref: "#/parameters/rowFilter.approvalRequests.createdAt"+ $ref: "#/parameters/rowFilter.inventoryCount.updatedBy"},{- $ref: "#/parameters/rowFilter.approvalRequests.documentReadableId"+ $ref: "#/parameters/rowFilter.inventoryCount.updatedAt"},{- $ref: "#/parameters/rowFilter.approvalRequests.documentDescription"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/approvalRequests"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["approvalRequests"]- }- },- "/inventoryCount": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.inventoryCount.id"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.companyId"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.inventoryCountId"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.locationId"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.status"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.isBlind"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.scope"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.snapshotAt"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.notes"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.postedBy"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.postedAt"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.createdBy"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.createdAt"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.updatedBy"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.updatedAt"- },- {- $ref: "#/parameters/rowFilter.inventoryCount.customFields"+ $ref: "#/parameters/rowFilter.inventoryCount.customFields"},{$ref: "#/parameters/select"@@ -6664,6 +6268,84 @@ export default {}},tags: ["eventSystemTrigger"]+ },+ post: {+ parameters: [+ {+ $ref: "#/parameters/body.eventSystemTrigger"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/preferPost"+ }+ ],+ responses: {+ "201": {+ description: "Created"+ }+ },+ tags: ["eventSystemTrigger"]+ },+ delete: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.tableName"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.type"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.attachedFunctions"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.status"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.systemTriggerName"+ },+ {+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["eventSystemTrigger"]+ },+ patch: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.tableName"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.type"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.attachedFunctions"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.status"+ },+ {+ $ref: "#/parameters/rowFilter.eventSystemTrigger.systemTriggerName"+ },+ {+ $ref: "#/parameters/body.eventSystemTrigger"+ },+ {+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["eventSystemTrigger"]}},"/jobOperationsWithDependencies": {@@ -6807,9 +6489,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.dependencies"},@@ -7010,9 +6689,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.dependencies"},@@ -7167,9 +6843,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithDependencies.inspectionDocumentId"- },{$ref: "#/parameters/rowFilter.jobOperationsWithDependencies.dependencies"},@@ -7992,35 +7665,38 @@ export default {tags: ["changeOrders"]}},- "/workflowLastRun": {+ "/dimension": {get: {parameters: [{- $ref: "#/parameters/rowFilter.workflowLastRun.companyId"+ $ref: "#/parameters/rowFilter.dimension.id"},{- $ref: "#/parameters/rowFilter.workflowLastRun.workflowId"+ $ref: "#/parameters/rowFilter.dimension.name"},{- $ref: "#/parameters/rowFilter.workflowLastRun.runId"+ $ref: "#/parameters/rowFilter.dimension.entityType"},{- $ref: "#/parameters/rowFilter.workflowLastRun.status"+ $ref: "#/parameters/rowFilter.dimension.companyGroupId"},{- $ref: "#/parameters/rowFilter.workflowLastRun.statusReason"+ $ref: "#/parameters/rowFilter.dimension.active"},{- $ref: "#/parameters/rowFilter.workflowLastRun.createdAt"+ $ref: "#/parameters/rowFilter.dimension.required"},{- $ref: "#/parameters/rowFilter.workflowLastRun.startedAt"+ $ref: "#/parameters/rowFilter.dimension.createdBy"},{- $ref: "#/parameters/rowFilter.workflowLastRun.completedAt"+ $ref: "#/parameters/rowFilter.dimension.createdAt"},{- $ref: "#/parameters/rowFilter.workflowLastRun.durationMs"+ $ref: "#/parameters/rowFilter.dimension.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.dimension.updatedAt"},{$ref: "#/parameters/select"@@ -8049,7 +7725,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/workflowLastRun"+ $ref: "#/definitions/dimension"},type: "array"}@@ -8058,11 +7734,28 @@ export default {description: "Partial Content"}},- tags: ["workflowLastRun"]- }- },- "/dimension": {- get: {+ tags: ["dimension"]+ },+ post: {+ parameters: [+ {+ $ref: "#/parameters/body.dimension"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/preferPost"+ }+ ],+ responses: {+ "201": {+ description: "Created"+ }+ },+ tags: ["dimension"]+ },+ delete: {parameters: [{$ref: "#/parameters/rowFilter.dimension.id"@@ -8095,106 +7788,17 @@ export default {$ref: "#/parameters/rowFilter.dimension.updatedAt"},{- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/dimension"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["dimension"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.dimension"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"+ $ref: "#/parameters/preferReturn"}],responses: {- "201": {- description: "Created"+ "204": {+ description: "No Content"}},tags: ["dimension"]},- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.dimension.id"- },- {- $ref: "#/parameters/rowFilter.dimension.name"- },- {- $ref: "#/parameters/rowFilter.dimension.entityType"- },- {- $ref: "#/parameters/rowFilter.dimension.companyGroupId"- },- {- $ref: "#/parameters/rowFilter.dimension.active"- },- {- $ref: "#/parameters/rowFilter.dimension.required"- },- {- $ref: "#/parameters/rowFilter.dimension.createdBy"- },- {- $ref: "#/parameters/rowFilter.dimension.createdAt"- },- {- $ref: "#/parameters/rowFilter.dimension.updatedBy"- },- {- $ref: "#/parameters/rowFilter.dimension.updatedAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["dimension"]- },- patch: {+ patch: {parameters: [{$ref: "#/parameters/rowFilter.dimension.id"@@ -13122,12 +12726,6 @@ export default {{$ref: "#/parameters/rowFilter.invite.updatedBy"},- {- $ref: "#/parameters/rowFilter.invite.attestedBy"- },- {- $ref: "#/parameters/rowFilter.invite.attestedAt"- },{$ref: "#/parameters/select"},@@ -13220,12 +12818,6 @@ export default {{$ref: "#/parameters/rowFilter.invite.updatedBy"},- {- $ref: "#/parameters/rowFilter.invite.attestedBy"- },- {- $ref: "#/parameters/rowFilter.invite.attestedAt"- },{$ref: "#/parameters/preferReturn"}@@ -13272,12 +12864,6 @@ export default {{$ref: "#/parameters/rowFilter.invite.updatedBy"},- {- $ref: "#/parameters/rowFilter.invite.attestedBy"- },- {- $ref: "#/parameters/rowFilter.invite.attestedAt"- },{$ref: "#/parameters/body.invite"},@@ -13722,12 +13308,6 @@ export default {{$ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.itemScrapPercentage"},- {- $ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.substitutedFromItemId"- },- {- $ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.substitutionFactor"- },{$ref: "#/parameters/rowFilter.jobMaterialWithMakeMethodId.storageUnitName"},@@ -19215,6 +18795,9 @@ export default {{$ref: "#/parameters/rowFilter.jobs.scrapQuantity"},+ {+ $ref: "#/parameters/rowFilter.jobs.productionQuantity"+ },{$ref: "#/parameters/rowFilter.jobs.quantityComplete"},@@ -19293,9 +18876,6 @@ export default {{$ref: "#/parameters/rowFilter.jobs.priority"},- {- $ref: "#/parameters/rowFilter.jobs.productionQuantity"- },{$ref: "#/parameters/rowFilter.jobs.jobMakeMethodId"},@@ -19383,93 +18963,6 @@ export default {tags: ["jobs"]}},- "/itemSerialSequences": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.itemSerialSequences.id"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.companyId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.itemId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.prefix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.suffix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.next"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.size"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.step"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.createdBy"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.createdAt"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.updatedBy"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.updatedAt"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.itemReadableId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.itemName"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequences.itemTrackingType"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/itemSerialSequences"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["itemSerialSequences"]- }- },"/department": {get: {parameters: [@@ -20289,9 +19782,6 @@ export default {{$ref: "#/parameters/rowFilter.itemLedger.correctionOfItemLedgerId"},- {- $ref: "#/parameters/rowFilter.itemLedger.scrapReasonId"- },{$ref: "#/parameters/select"},@@ -20411,9 +19901,6 @@ export default {{$ref: "#/parameters/rowFilter.itemLedger.correctionOfItemLedgerId"},- {- $ref: "#/parameters/rowFilter.itemLedger.scrapReasonId"- },{$ref: "#/parameters/preferReturn"}@@ -20487,9 +19974,6 @@ export default {{$ref: "#/parameters/rowFilter.itemLedger.correctionOfItemLedgerId"},- {- $ref: "#/parameters/rowFilter.itemLedger.scrapReasonId"- },{$ref: "#/parameters/body.itemLedger"},@@ -23418,9 +22902,6 @@ export default {{$ref: "#/parameters/rowFilter.location.tags"},- {- $ref: "#/parameters/rowFilter.location.code"- },{$ref: "#/parameters/select"},@@ -23534,9 +23015,6 @@ export default {{$ref: "#/parameters/rowFilter.location.tags"},- {- $ref: "#/parameters/rowFilter.location.code"- },{$ref: "#/parameters/preferReturn"}@@ -23604,9 +23082,6 @@ export default {{$ref: "#/parameters/rowFilter.location.tags"},- {- $ref: "#/parameters/rowFilter.location.code"- },{$ref: "#/parameters/body.location"},@@ -23964,9 +23439,6 @@ export default {{$ref: "#/parameters/rowFilter.companies.registrationNumber"},- {- $ref: "#/parameters/rowFilter.companies.timezone"- },{$ref: "#/parameters/rowFilter.companies.userId"},@@ -26530,78 +26002,6 @@ export default {}},tags: ["itemStockQuantities"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.itemStockQuantities"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["itemStockQuantities"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.itemStockQuantities.itemId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.companyId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.locationId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.quantityOnHand"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["itemStockQuantities"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.itemStockQuantities.itemId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.companyId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.locationId"- },- {- $ref: "#/parameters/rowFilter.itemStockQuantities.quantityOnHand"- },- {- $ref: "#/parameters/body.itemStockQuantities"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["itemStockQuantities"]}},"/demandActual": {@@ -28087,34 +27487,34 @@ export default {$ref: "#/parameters/rowFilter.purchaseInvoiceLines.jobOperationId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.accountId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.ownerId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.totalAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.accountId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLines.totalAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLines.sortOrder"},{$ref: "#/parameters/rowFilter.purchaseInvoiceLines.thumbnailPath"@@ -28626,203 +28026,50 @@ export default {tags: ["openJobMaterialLines"]}},- "/workflowTriggerEvent": {+ "/externalIntegrationMapping": {get: {parameters: [{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.id"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.id"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.companyId"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.entityType"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowId"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.entityId"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowVersionId"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.integration"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.eventId"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.externalId"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.allowDuplicateExternalId"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.origin"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.metadata"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.lastSyncedAt"},{- $ref: "#/parameters/rowFilter.workflowTriggerEvent.createdAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/workflowTriggerEvent"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["workflowTriggerEvent"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.workflowTriggerEvent"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["workflowTriggerEvent"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.id"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowVersionId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.eventId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.origin"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.createdAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowTriggerEvent"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.id"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.workflowVersionId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.eventId"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.origin"- },- {- $ref: "#/parameters/rowFilter.workflowTriggerEvent.createdAt"- },- {- $ref: "#/parameters/body.workflowTriggerEvent"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowTriggerEvent"]- }- },- "/externalIntegrationMapping": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.id"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.entityType"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.entityId"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.integration"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.externalId"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.allowDuplicateExternalId"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.metadata"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.lastSyncedAt"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.remoteUpdatedAt"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.createdAt"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.updatedAt"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.createdBy"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.companyId"- },- {- $ref: "#/parameters/rowFilter.externalIntegrationMapping.updatedBy"+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.remoteUpdatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.updatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.externalIntegrationMapping.updatedBy"},{$ref: "#/parameters/select"@@ -30780,9 +30027,6 @@ export default {{$ref: "#/parameters/rowFilter.itemLedgers.correctionOfItemLedgerId"},- {- $ref: "#/parameters/rowFilter.itemLedgers.scrapReasonId"- },{$ref: "#/parameters/rowFilter.itemLedgers.isCorrection"},@@ -30882,9 +30126,6 @@ export default {{$ref: "#/parameters/rowFilter.supplierProcesses.updatedAt"},- {- $ref: "#/parameters/rowFilter.supplierProcesses.tags"- },{$ref: "#/parameters/rowFilter.supplierProcesses.processName"},@@ -31905,6 +31146,9 @@ export default {{$ref: "#/parameters/rowFilter.job.scrapQuantity"},+ {+ $ref: "#/parameters/rowFilter.job.productionQuantity"+ },{$ref: "#/parameters/rowFilter.job.quantityComplete"},@@ -31983,9 +31227,6 @@ export default {{$ref: "#/parameters/rowFilter.job.priority"},- {- $ref: "#/parameters/rowFilter.job.productionQuantity"- },{$ref: "#/parameters/select"},@@ -32078,133 +31319,9 @@ export default {{$ref: "#/parameters/rowFilter.job.scrapQuantity"},- {- $ref: "#/parameters/rowFilter.job.quantityComplete"- },- {- $ref: "#/parameters/rowFilter.job.quantityShipped"- },- {- $ref: "#/parameters/rowFilter.job.quantityReceivedToInventory"- },- {- $ref: "#/parameters/rowFilter.job.salesOrderId"- },- {- $ref: "#/parameters/rowFilter.job.salesOrderLineId"- },- {- $ref: "#/parameters/rowFilter.job.quoteId"- },- {- $ref: "#/parameters/rowFilter.job.quoteLineId"- },- {- $ref: "#/parameters/rowFilter.job.modelUploadId"- },- {- $ref: "#/parameters/rowFilter.job.notes"- },- {- $ref: "#/parameters/rowFilter.job.assignee"- },- {- $ref: "#/parameters/rowFilter.job.customFields"- },- {- $ref: "#/parameters/rowFilter.job.companyId"- },- {- $ref: "#/parameters/rowFilter.job.createdAt"- },- {- $ref: "#/parameters/rowFilter.job.createdBy"- },- {- $ref: "#/parameters/rowFilter.job.updatedAt"- },- {- $ref: "#/parameters/rowFilter.job.updatedBy"- },- {- $ref: "#/parameters/rowFilter.job.tags"- },- {- $ref: "#/parameters/rowFilter.job.configuration"- },- {- $ref: "#/parameters/rowFilter.job.releasedDate"- },- {- $ref: "#/parameters/rowFilter.job.completedDate"- },- {- $ref: "#/parameters/rowFilter.job.estimatedTime"- },- {- $ref: "#/parameters/rowFilter.job.actualTime"- },- {- $ref: "#/parameters/rowFilter.job.secondsToComplete"- },- {- $ref: "#/parameters/rowFilter.job.startDate"- },- {- $ref: "#/parameters/rowFilter.job.storageUnitId"- },- {- $ref: "#/parameters/rowFilter.job.priority"- },{$ref: "#/parameters/rowFilter.job.productionQuantity"},- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["job"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.job.id"- },- {- $ref: "#/parameters/rowFilter.job.jobId"- },- {- $ref: "#/parameters/rowFilter.job.itemId"- },- {- $ref: "#/parameters/rowFilter.job.unitOfMeasureCode"- },- {- $ref: "#/parameters/rowFilter.job.customerId"- },- {- $ref: "#/parameters/rowFilter.job.locationId"- },- {- $ref: "#/parameters/rowFilter.job.status"- },- {- $ref: "#/parameters/rowFilter.job.dueDate"- },- {- $ref: "#/parameters/rowFilter.job.deadlineType"- },- {- $ref: "#/parameters/rowFilter.job.quantity"- },- {- $ref: "#/parameters/rowFilter.job.scrapQuantity"- },{$ref: "#/parameters/rowFilter.job.quantityComplete"},@@ -32283,9 +31400,133 @@ export default {{$ref: "#/parameters/rowFilter.job.priority"},+ {+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["job"]+ },+ patch: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.job.id"+ },+ {+ $ref: "#/parameters/rowFilter.job.jobId"+ },+ {+ $ref: "#/parameters/rowFilter.job.itemId"+ },+ {+ $ref: "#/parameters/rowFilter.job.unitOfMeasureCode"+ },+ {+ $ref: "#/parameters/rowFilter.job.customerId"+ },+ {+ $ref: "#/parameters/rowFilter.job.locationId"+ },+ {+ $ref: "#/parameters/rowFilter.job.status"+ },+ {+ $ref: "#/parameters/rowFilter.job.dueDate"+ },+ {+ $ref: "#/parameters/rowFilter.job.deadlineType"+ },+ {+ $ref: "#/parameters/rowFilter.job.quantity"+ },+ {+ $ref: "#/parameters/rowFilter.job.scrapQuantity"+ },{$ref: "#/parameters/rowFilter.job.productionQuantity"},+ {+ $ref: "#/parameters/rowFilter.job.quantityComplete"+ },+ {+ $ref: "#/parameters/rowFilter.job.quantityShipped"+ },+ {+ $ref: "#/parameters/rowFilter.job.quantityReceivedToInventory"+ },+ {+ $ref: "#/parameters/rowFilter.job.salesOrderId"+ },+ {+ $ref: "#/parameters/rowFilter.job.salesOrderLineId"+ },+ {+ $ref: "#/parameters/rowFilter.job.quoteId"+ },+ {+ $ref: "#/parameters/rowFilter.job.quoteLineId"+ },+ {+ $ref: "#/parameters/rowFilter.job.modelUploadId"+ },+ {+ $ref: "#/parameters/rowFilter.job.notes"+ },+ {+ $ref: "#/parameters/rowFilter.job.assignee"+ },+ {+ $ref: "#/parameters/rowFilter.job.customFields"+ },+ {+ $ref: "#/parameters/rowFilter.job.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.job.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.job.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.job.updatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.job.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.job.tags"+ },+ {+ $ref: "#/parameters/rowFilter.job.configuration"+ },+ {+ $ref: "#/parameters/rowFilter.job.releasedDate"+ },+ {+ $ref: "#/parameters/rowFilter.job.completedDate"+ },+ {+ $ref: "#/parameters/rowFilter.job.estimatedTime"+ },+ {+ $ref: "#/parameters/rowFilter.job.actualTime"+ },+ {+ $ref: "#/parameters/rowFilter.job.secondsToComplete"+ },+ {+ $ref: "#/parameters/rowFilter.job.startDate"+ },+ {+ $ref: "#/parameters/rowFilter.job.storageUnitId"+ },+ {+ $ref: "#/parameters/rowFilter.job.priority"+ },{$ref: "#/parameters/body.job"},@@ -34350,9 +33591,6 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},- {- $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"- },{$ref: "#/parameters/select"},@@ -34460,9 +33698,6 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},- {- $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"- },{$ref: "#/parameters/preferReturn"}@@ -34524,9 +33759,6 @@ export default {{$ref: "#/parameters/rowFilter.assemblyInstruction.updatedAt"},- {- $ref: "#/parameters/rowFilter.assemblyInstruction.rootInstructionId"- },{$ref: "#/parameters/body.assemblyInstruction"},@@ -34542,65 +33774,29 @@ export default {tags: ["assemblyInstruction"]}},- "/workflowStepRun": {+ "/purchaseOrderStatusHistory": {get: {parameters: [{- $ref: "#/parameters/rowFilter.workflowStepRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.runId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.sequence"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeType"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.itemKey"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.input"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.output"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.branchTaken"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.startedAt"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.id"},{- $ref: "#/parameters/rowFilter.workflowStepRun.completedAt"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.purchaseOrderId"},{- $ref: "#/parameters/rowFilter.workflowStepRun.durationMs"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.status"},{- $ref: "#/parameters/rowFilter.workflowStepRun.error"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.createdAt"},{- $ref: "#/parameters/rowFilter.workflowStepRun.compactedAt"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.createdBy"},{- $ref: "#/parameters/rowFilter.workflowStepRun.createdAt"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.companyId"},{- $ref: "#/parameters/rowFilter.workflowStepRun.detail"+ $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.updatedBy"},{$ref: "#/parameters/select"@@ -34629,7 +33825,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/workflowStepRun"+ $ref: "#/definitions/purchaseOrderStatusHistory"},type: "array"}@@ -34638,12 +33834,12 @@ export default {description: "Partial Content"}},- tags: ["workflowStepRun"]+ tags: ["purchaseOrderStatusHistory"]},post: {parameters: [{- $ref: "#/parameters/body.workflowStepRun"+ $ref: "#/parameters/body.purchaseOrderStatusHistory"},{$ref: "#/parameters/select"@@ -34657,232 +33853,7 @@ export default {description: "Created"}},- tags: ["workflowStepRun"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowStepRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.runId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.sequence"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeType"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.itemKey"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.input"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.output"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.branchTaken"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.startedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.completedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.durationMs"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.error"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.compactedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.detail"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowStepRun"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowStepRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.runId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.sequence"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeId"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.nodeType"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.itemKey"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.input"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.output"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.branchTaken"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.startedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.completedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.durationMs"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.error"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.compactedAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.createdAt"- },- {- $ref: "#/parameters/rowFilter.workflowStepRun.detail"- },- {- $ref: "#/parameters/body.workflowStepRun"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowStepRun"]- }- },- "/purchaseOrderStatusHistory": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.id"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.purchaseOrderId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.status"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.createdAt"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.createdBy"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.companyId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderStatusHistory.updatedBy"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/purchaseOrderStatusHistory"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["purchaseOrderStatusHistory"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.purchaseOrderStatusHistory"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["purchaseOrderStatusHistory"]+ tags: ["purchaseOrderStatusHistory"]},delete: {parameters: [@@ -36999,27 +35970,6 @@ export default {{$ref: "#/parameters/rowFilter.purchaseOrderLine.promisedDate"},- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.accountId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.requiredDate"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedDate"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.costCenterId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.ownerId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.sortOrder"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierPartId"- },{$ref: "#/parameters/rowFilter.purchaseOrderLine.unitPrice"},@@ -37032,182 +35982,6 @@ export default {{$ref: "#/parameters/rowFilter.purchaseOrderLine.taxAmount"},- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/purchaseOrderLine"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["purchaseOrderLine"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.purchaseOrderLine"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["purchaseOrderLine"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.id"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseOrderId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseOrderLineType"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.itemId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.assetId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.description"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseQuantity"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityReceived"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityInvoiced"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierUnitPrice"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.inventoryUnitOfMeasureCode"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseUnitOfMeasureCode"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.locationId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.storageUnitId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.setupPrice"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedComplete"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.invoicedComplete"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.companyId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.createdAt"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.createdBy"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.updatedAt"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.updatedBy"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.customFields"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.conversionFactor"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.tags"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.internalNotes"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.externalNotes"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.exchangeRate"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierShippingCost"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.modelUploadId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierTaxAmount"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityToReceive"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityToInvoice"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierExtendedPrice"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.taxPercent"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.jobId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.jobOperationId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityShipped"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.promisedDate"- },{$ref: "#/parameters/rowFilter.purchaseOrderLine.accountId"},@@ -37230,29 +36004,63 @@ export default {$ref: "#/parameters/rowFilter.purchaseOrderLine.supplierPartId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.unitPrice"+ $ref: "#/parameters/select"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.extendedPrice"+ $ref: "#/parameters/order"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.shippingCost"+ $ref: "#/parameters/range"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.taxAmount"+ $ref: "#/parameters/rangeUnit"},{- $ref: "#/parameters/preferReturn"+ $ref: "#/parameters/offset"+ },+ {+ $ref: "#/parameters/limit"+ },+ {+ $ref: "#/parameters/preferCount"}],responses: {- "204": {- description: "No Content"+ "200": {+ description: "OK",+ schema: {+ items: {+ $ref: "#/definitions/purchaseOrderLine"+ },+ type: "array"+ }+ },+ "206": {+ description: "Partial Content"}},tags: ["purchaseOrderLine"]},- patch: {+ post: {+ parameters: [+ {+ $ref: "#/parameters/body.purchaseOrderLine"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/preferPost"+ }+ ],+ responses: {+ "201": {+ description: "Created"+ }+ },+ tags: ["purchaseOrderLine"]+ },+ delete: {parameters: [{$ref: "#/parameters/rowFilter.purchaseOrderLine.id"@@ -37372,40 +36180,37 @@ export default {$ref: "#/parameters/rowFilter.purchaseOrderLine.promisedDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.accountId"- },- {- $ref: "#/parameters/rowFilter.purchaseOrderLine.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedDate"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.ownerId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.accountId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierPartId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLine.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.sortOrder"},{- $ref: "#/parameters/body.purchaseOrderLine"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierPartId"},{$ref: "#/parameters/preferReturn"@@ -37417,283 +36222,248 @@ export default {}},tags: ["purchaseOrderLine"]- }- },- "/stockTransferLines": {- get: {+ },+ patch: {parameters: [{- $ref: "#/parameters/rowFilter.stockTransferLines.id"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.stockTransferId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.jobId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.jobMaterialId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.itemId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.fromStorageUnitId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.toStorageUnitId"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.quantity"- },- {- $ref: "#/parameters/rowFilter.stockTransferLines.pickedQuantity"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.id"},{- $ref: "#/parameters/rowFilter.stockTransferLines.outstandingQuantity"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseOrderId"},{- $ref: "#/parameters/rowFilter.stockTransferLines.trackedEntityId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseOrderLineType"},{- $ref: "#/parameters/rowFilter.stockTransferLines.requiresBatchTracking"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.itemId"},{- $ref: "#/parameters/rowFilter.stockTransferLines.requiresSerialTracking"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.assetId"},{- $ref: "#/parameters/rowFilter.stockTransferLines.companyId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.description"},{- $ref: "#/parameters/rowFilter.stockTransferLines.createdAt"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseQuantity"},{- $ref: "#/parameters/rowFilter.stockTransferLines.createdBy"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityReceived"},{- $ref: "#/parameters/rowFilter.stockTransferLines.updatedAt"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityInvoiced"},{- $ref: "#/parameters/rowFilter.stockTransferLines.updatedBy"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierUnitPrice"},{- $ref: "#/parameters/rowFilter.stockTransferLines.thumbnailPath"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.inventoryUnitOfMeasureCode"},{- $ref: "#/parameters/rowFilter.stockTransferLines.itemReadableId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.purchaseUnitOfMeasureCode"},{- $ref: "#/parameters/rowFilter.stockTransferLines.itemDescription"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.locationId"},{- $ref: "#/parameters/rowFilter.stockTransferLines.unitOfMeasure"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.storageUnitId"},{- $ref: "#/parameters/rowFilter.stockTransferLines.fromStorageUnitName"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.setupPrice"},{- $ref: "#/parameters/rowFilter.stockTransferLines.toStorageUnitName"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedComplete"},{- $ref: "#/parameters/select"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.invoicedComplete"},{- $ref: "#/parameters/order"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.companyId"},{- $ref: "#/parameters/range"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.createdAt"},{- $ref: "#/parameters/rangeUnit"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.createdBy"},{- $ref: "#/parameters/offset"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.updatedAt"},{- $ref: "#/parameters/limit"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.updatedBy"},{- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/stockTransferLines"- },- type: "array"- }+ $ref: "#/parameters/rowFilter.purchaseOrderLine.customFields"},- "206": {- description: "Partial Content"- }- },- tags: ["stockTransferLines"]- }- },- "/accountDefault": {- get: {- parameters: [{- $ref: "#/parameters/rowFilter.accountDefault.companyId"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.conversionFactor"},{- $ref: "#/parameters/rowFilter.accountDefault.salesAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.tags"},{- $ref: "#/parameters/rowFilter.accountDefault.salesDiscountAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.internalNotes"},{- $ref: "#/parameters/rowFilter.accountDefault.costOfGoodsSoldAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.externalNotes"},{- $ref: "#/parameters/rowFilter.accountDefault.purchaseVarianceAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.exchangeRate"},{- $ref: "#/parameters/rowFilter.accountDefault.inventoryAdjustmentVarianceAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierShippingCost"},{- $ref: "#/parameters/rowFilter.accountDefault.materialVarianceAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.modelUploadId"},{- $ref: "#/parameters/rowFilter.accountDefault.laborAndMachineVarianceAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierTaxAmount"},{- $ref: "#/parameters/rowFilter.accountDefault.indirectCostAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityToReceive"},{- $ref: "#/parameters/rowFilter.accountDefault.maintenanceAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityToInvoice"},{- $ref: "#/parameters/rowFilter.accountDefault.assetDepreciationExpenseAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierExtendedPrice"},{- $ref: "#/parameters/rowFilter.accountDefault.serviceChargeAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.taxPercent"},{- $ref: "#/parameters/rowFilter.accountDefault.interestAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.jobId"},{- $ref: "#/parameters/rowFilter.accountDefault.supplierPaymentDiscountAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.jobOperationId"},{- $ref: "#/parameters/rowFilter.accountDefault.customerPaymentDiscountAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.quantityShipped"},{- $ref: "#/parameters/rowFilter.accountDefault.roundingAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.promisedDate"},{- $ref: "#/parameters/rowFilter.accountDefault.assetAquisitionCostAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.unitPrice"},{- $ref: "#/parameters/rowFilter.accountDefault.assetAquisitionCostOnDisposalAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.extendedPrice"},{- $ref: "#/parameters/rowFilter.accountDefault.accumulatedDepreciationAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.shippingCost"},{- $ref: "#/parameters/rowFilter.accountDefault.accumulatedDepreciationOnDisposalAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.taxAmount"},{- $ref: "#/parameters/rowFilter.accountDefault.workInProgressAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.accountId"},{- $ref: "#/parameters/rowFilter.accountDefault.receivablesAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.requiredDate"},{- $ref: "#/parameters/rowFilter.accountDefault.bankCashAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.receivedDate"},{- $ref: "#/parameters/rowFilter.accountDefault.bankLocalCurrencyAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.costCenterId"},{- $ref: "#/parameters/rowFilter.accountDefault.bankForeignCurrencyAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.ownerId"},{- $ref: "#/parameters/rowFilter.accountDefault.prepaymentAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.sortOrder"},{- $ref: "#/parameters/rowFilter.accountDefault.payablesAccount"+ $ref: "#/parameters/rowFilter.purchaseOrderLine.supplierPartId"},{- $ref: "#/parameters/rowFilter.accountDefault.salesTaxPayableAccount"+ $ref: "#/parameters/body.purchaseOrderLine"},{- $ref: "#/parameters/rowFilter.accountDefault.purchaseTaxPayableAccount"- },+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["purchaseOrderLine"]+ }+ },+ "/stockTransferLines": {+ get: {+ parameters: [{- $ref: "#/parameters/rowFilter.accountDefault.reverseChargeSalesTaxPayableAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.id"},{- $ref: "#/parameters/rowFilter.accountDefault.retainedEarningsAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.stockTransferId"},{- $ref: "#/parameters/rowFilter.accountDefault.updatedBy"+ $ref: "#/parameters/rowFilter.stockTransferLines.jobId"},{- $ref: "#/parameters/rowFilter.accountDefault.goodsReceivedNotInvoicedAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.jobMaterialId"},{- $ref: "#/parameters/rowFilter.accountDefault.overheadVarianceAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.itemId"},{- $ref: "#/parameters/rowFilter.accountDefault.lotSizeVarianceAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.fromStorageUnitId"},{- $ref: "#/parameters/rowFilter.accountDefault.subcontractingVarianceAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.toStorageUnitId"},{- $ref: "#/parameters/rowFilter.accountDefault.currencyTranslationAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.quantity"},{- $ref: "#/parameters/rowFilter.accountDefault.laborAbsorptionAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.pickedQuantity"},{- $ref: "#/parameters/rowFilter.accountDefault.deferredTaxLiabilityAccountId"+ $ref: "#/parameters/rowFilter.stockTransferLines.outstandingQuantity"},{- $ref: "#/parameters/rowFilter.accountDefault.deferredTaxExpenseAccountId"+ $ref: "#/parameters/rowFilter.stockTransferLines.trackedEntityId"},{- $ref: "#/parameters/rowFilter.accountDefault.customerWriteOffAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.requiresBatchTracking"},{- $ref: "#/parameters/rowFilter.accountDefault.supplierWriteOffAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.requiresSerialTracking"},{- $ref: "#/parameters/rowFilter.accountDefault.realizedExchangeGainAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.companyId"},{- $ref: "#/parameters/rowFilter.accountDefault.realizedExchangeLossAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.createdAt"},{- $ref: "#/parameters/rowFilter.accountDefault.intercompanyReceivablesAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.createdBy"},{- $ref: "#/parameters/rowFilter.accountDefault.overheadAbsorptionAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.updatedAt"},{- $ref: "#/parameters/rowFilter.accountDefault.supplierPrepaymentAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.updatedBy"},{- $ref: "#/parameters/rowFilter.accountDefault.rawMaterialsAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.thumbnailPath"},{- $ref: "#/parameters/rowFilter.accountDefault.finishedGoodsAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.itemReadableId"},{- $ref: "#/parameters/rowFilter.accountDefault.assetGainOnDisposalAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.itemDescription"},{- $ref: "#/parameters/rowFilter.accountDefault.assetLossOnDisposalAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.unitOfMeasure"},{- $ref: "#/parameters/rowFilter.accountDefault.scrapAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.fromStorageUnitName"},{- $ref: "#/parameters/rowFilter.accountDefault.intercompanyPayablesAccount"+ $ref: "#/parameters/rowFilter.stockTransferLines.toStorageUnitName"},{$ref: "#/parameters/select"@@ -37722,7 +36492,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/accountDefault"+ $ref: "#/definitions/stockTransferLines"},type: "array"}@@ -37731,28 +36501,11 @@ export default {description: "Partial Content"}},- tags: ["accountDefault"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.accountDefault"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["accountDefault"]- },- delete: {+ tags: ["stockTransferLines"]+ }+ },+ "/accountDefault": {+ get: {parameters: [{$ref: "#/parameters/rowFilter.accountDefault.companyId"@@ -37911,7 +36664,219 @@ export default {$ref: "#/parameters/rowFilter.accountDefault.scrapAccount"},{- $ref: "#/parameters/rowFilter.accountDefault.intercompanyPayablesAccount"+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/order"+ },+ {+ $ref: "#/parameters/range"+ },+ {+ $ref: "#/parameters/rangeUnit"+ },+ {+ $ref: "#/parameters/offset"+ },+ {+ $ref: "#/parameters/limit"+ },+ {+ $ref: "#/parameters/preferCount"+ }+ ],+ responses: {+ "200": {+ description: "OK",+ schema: {+ items: {+ $ref: "#/definitions/accountDefault"+ },+ type: "array"+ }+ },+ "206": {+ description: "Partial Content"+ }+ },+ tags: ["accountDefault"]+ },+ post: {+ parameters: [+ {+ $ref: "#/parameters/body.accountDefault"+ },+ {+ $ref: "#/parameters/select"+ },+ {+ $ref: "#/parameters/preferPost"+ }+ ],+ responses: {+ "201": {+ description: "Created"+ }+ },+ tags: ["accountDefault"]+ },+ delete: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.accountDefault.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.salesAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.salesDiscountAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.costOfGoodsSoldAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.purchaseVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.inventoryAdjustmentVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.materialVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.laborAndMachineVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.indirectCostAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.maintenanceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.assetDepreciationExpenseAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.serviceChargeAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.interestAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.supplierPaymentDiscountAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.customerPaymentDiscountAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.roundingAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.assetAquisitionCostAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.assetAquisitionCostOnDisposalAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.accumulatedDepreciationAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.accumulatedDepreciationOnDisposalAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.workInProgressAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.receivablesAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.bankCashAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.bankLocalCurrencyAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.bankForeignCurrencyAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.prepaymentAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.payablesAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.salesTaxPayableAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.purchaseTaxPayableAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.reverseChargeSalesTaxPayableAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.retainedEarningsAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.goodsReceivedNotInvoicedAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.overheadVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.lotSizeVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.subcontractingVarianceAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.currencyTranslationAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.laborAbsorptionAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.deferredTaxLiabilityAccountId"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.deferredTaxExpenseAccountId"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.customerWriteOffAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.supplierWriteOffAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.realizedExchangeGainAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.realizedExchangeLossAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.intercompanyReceivablesAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.overheadAbsorptionAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.supplierPrepaymentAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.rawMaterialsAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.finishedGoodsAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.assetGainOnDisposalAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.assetLossOnDisposalAccount"+ },+ {+ $ref: "#/parameters/rowFilter.accountDefault.scrapAccount"},{$ref: "#/parameters/preferReturn"@@ -38082,9 +37047,6 @@ export default {{$ref: "#/parameters/rowFilter.accountDefault.scrapAccount"},- {- $ref: "#/parameters/rowFilter.accountDefault.intercompanyPayablesAccount"- },{$ref: "#/parameters/body.accountDefault"},@@ -40428,294 +39390,6 @@ export default {tags: ["purchaseInvoice"]}},- "/workflowRun": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowVersionId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.eventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.sourceEventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerTable"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerRecordId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.ownerId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowRun.isTest"- },- {- $ref: "#/parameters/rowFilter.workflowRun.rootRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.causedByRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.depth"- },- {- $ref: "#/parameters/rowFilter.workflowRun.path"- },- {- $ref: "#/parameters/rowFilter.workflowRun.startedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.completedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.durationMs"- },- {- $ref: "#/parameters/rowFilter.workflowRun.error"- },- {- $ref: "#/parameters/rowFilter.workflowRun.compactedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.createdAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/workflowRun"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["workflowRun"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.workflowRun"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["workflowRun"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowVersionId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.eventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.sourceEventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerTable"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerRecordId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.ownerId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowRun.isTest"- },- {- $ref: "#/parameters/rowFilter.workflowRun.rootRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.causedByRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.depth"- },- {- $ref: "#/parameters/rowFilter.workflowRun.path"- },- {- $ref: "#/parameters/rowFilter.workflowRun.startedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.completedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.durationMs"- },- {- $ref: "#/parameters/rowFilter.workflowRun.error"- },- {- $ref: "#/parameters/rowFilter.workflowRun.compactedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.createdAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowRun"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.workflowRun.id"- },- {- $ref: "#/parameters/rowFilter.workflowRun.companyId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.workflowVersionId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.eventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.sourceEventId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerTable"- },- {- $ref: "#/parameters/rowFilter.workflowRun.triggerRecordId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.ownerId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.status"- },- {- $ref: "#/parameters/rowFilter.workflowRun.statusReason"- },- {- $ref: "#/parameters/rowFilter.workflowRun.isTest"- },- {- $ref: "#/parameters/rowFilter.workflowRun.rootRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.causedByRunId"- },- {- $ref: "#/parameters/rowFilter.workflowRun.depth"- },- {- $ref: "#/parameters/rowFilter.workflowRun.path"- },- {- $ref: "#/parameters/rowFilter.workflowRun.startedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.completedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.durationMs"- },- {- $ref: "#/parameters/rowFilter.workflowRun.error"- },- {- $ref: "#/parameters/rowFilter.workflowRun.compactedAt"- },- {- $ref: "#/parameters/rowFilter.workflowRun.createdAt"- },- {- $ref: "#/parameters/body.workflowRun"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["workflowRun"]- }- },"/userAttribute": {get: {parameters: [@@ -43272,268 +41946,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/quoteMaterial"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["quoteMaterial"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.quoteMaterial"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["quoteMaterial"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.quoteMaterial.id"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteLineId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.itemId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.itemType"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.methodType"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.order"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.description"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.unitOfMeasureCode"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.unitCost"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.companyId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.createdAt"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.createdBy"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.updatedAt"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.updatedBy"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.customFields"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteMakeMethodId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.tags"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.kit"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.storageUnitId"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["quoteMaterial"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.quoteMaterial.id"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteLineId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.itemId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.itemType"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.methodType"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.order"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.description"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.unitOfMeasureCode"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.unitCost"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.companyId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.createdAt"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.createdBy"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.updatedAt"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.updatedBy"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.customFields"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteMakeMethodId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.tags"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.kit"- },- {- $ref: "#/parameters/rowFilter.quoteMaterial.storageUnitId"- },- {- $ref: "#/parameters/body.quoteMaterial"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["quoteMaterial"]- }- },- "/customerStatus": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.customerStatus.id"- },- {- $ref: "#/parameters/rowFilter.customerStatus.name"- },- {- $ref: "#/parameters/rowFilter.customerStatus.companyId"- },- {- $ref: "#/parameters/rowFilter.customerStatus.createdAt"- },- {- $ref: "#/parameters/rowFilter.customerStatus.createdBy"- },- {- $ref: "#/parameters/rowFilter.customerStatus.updatedBy"- },- {- $ref: "#/parameters/rowFilter.customerStatus.updatedAt"- },- {- $ref: "#/parameters/rowFilter.customerStatus.customFields"- },- {- $ref: "#/parameters/rowFilter.customerStatus.tags"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/customerStatus"+ $ref: "#/definitions/quoteMaterial"},type: "array"}@@ -43542,12 +41955,12 @@ export default {description: "Partial Content"}},- tags: ["customerStatus"]+ tags: ["quoteMaterial"]},post: {parameters: [{- $ref: "#/parameters/body.customerStatus"+ $ref: "#/parameters/body.quoteMaterial"},{$ref: "#/parameters/select"@@ -43561,36 +41974,81 @@ export default {description: "Created"}},- tags: ["customerStatus"]+ tags: ["quoteMaterial"]},delete: {parameters: [{- $ref: "#/parameters/rowFilter.customerStatus.id"+ $ref: "#/parameters/rowFilter.quoteMaterial.id"},{- $ref: "#/parameters/rowFilter.customerStatus.name"+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteId"},{- $ref: "#/parameters/rowFilter.customerStatus.companyId"+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteLineId"},{- $ref: "#/parameters/rowFilter.customerStatus.createdAt"+ $ref: "#/parameters/rowFilter.quoteMaterial.itemId"},{- $ref: "#/parameters/rowFilter.customerStatus.createdBy"+ $ref: "#/parameters/rowFilter.quoteMaterial.itemType"},{- $ref: "#/parameters/rowFilter.customerStatus.updatedBy"+ $ref: "#/parameters/rowFilter.quoteMaterial.methodType"},{- $ref: "#/parameters/rowFilter.customerStatus.updatedAt"+ $ref: "#/parameters/rowFilter.quoteMaterial.order"},{- $ref: "#/parameters/rowFilter.customerStatus.customFields"+ $ref: "#/parameters/rowFilter.quoteMaterial.description"},{- $ref: "#/parameters/rowFilter.customerStatus.tags"+ $ref: "#/parameters/rowFilter.quoteMaterial.quantity"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.unitOfMeasureCode"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.unitCost"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.updatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.customFields"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteMakeMethodId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.tags"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.kit"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.storageUnitId"},{$ref: "#/parameters/preferReturn"@@ -43601,39 +42059,84 @@ export default {description: "No Content"}},- tags: ["customerStatus"]+ tags: ["quoteMaterial"]},patch: {parameters: [{- $ref: "#/parameters/rowFilter.customerStatus.id"+ $ref: "#/parameters/rowFilter.quoteMaterial.id"},{- $ref: "#/parameters/rowFilter.customerStatus.name"+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteId"},{- $ref: "#/parameters/rowFilter.customerStatus.companyId"+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteLineId"},{- $ref: "#/parameters/rowFilter.customerStatus.createdAt"+ $ref: "#/parameters/rowFilter.quoteMaterial.itemId"},{- $ref: "#/parameters/rowFilter.customerStatus.createdBy"+ $ref: "#/parameters/rowFilter.quoteMaterial.itemType"},{- $ref: "#/parameters/rowFilter.customerStatus.updatedBy"+ $ref: "#/parameters/rowFilter.quoteMaterial.methodType"},{- $ref: "#/parameters/rowFilter.customerStatus.updatedAt"+ $ref: "#/parameters/rowFilter.quoteMaterial.order"},{- $ref: "#/parameters/rowFilter.customerStatus.customFields"+ $ref: "#/parameters/rowFilter.quoteMaterial.description"},{- $ref: "#/parameters/rowFilter.customerStatus.tags"+ $ref: "#/parameters/rowFilter.quoteMaterial.quantity"},{- $ref: "#/parameters/body.customerStatus"+ $ref: "#/parameters/rowFilter.quoteMaterial.unitOfMeasureCode"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.unitCost"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.createdAt"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.createdBy"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.updatedAt"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.updatedBy"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.customFields"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteMakeMethodId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.quoteOperationId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.scrapQuantity"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.tags"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.productionQuantity"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.kit"+ },+ {+ $ref: "#/parameters/rowFilter.quoteMaterial.storageUnitId"+ },+ {+ $ref: "#/parameters/body.quoteMaterial"},{$ref: "#/parameters/preferReturn"@@ -43644,35 +42147,38 @@ export default {description: "No Content"}},- tags: ["customerStatus"]+ tags: ["quoteMaterial"]}},- "/reportPin": {+ "/customerStatus": {get: {parameters: [{- $ref: "#/parameters/rowFilter.reportPin.reportKey"+ $ref: "#/parameters/rowFilter.customerStatus.id"+ },+ {+ $ref: "#/parameters/rowFilter.customerStatus.name"},{- $ref: "#/parameters/rowFilter.reportPin.userId"+ $ref: "#/parameters/rowFilter.customerStatus.companyId"},{- $ref: "#/parameters/rowFilter.reportPin.companyId"+ $ref: "#/parameters/rowFilter.customerStatus.createdAt"},{- $ref: "#/parameters/rowFilter.reportPin.pinned"+ $ref: "#/parameters/rowFilter.customerStatus.createdBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdBy"+ $ref: "#/parameters/rowFilter.customerStatus.updatedBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdAt"+ $ref: "#/parameters/rowFilter.customerStatus.updatedAt"},{- $ref: "#/parameters/rowFilter.reportPin.updatedBy"+ $ref: "#/parameters/rowFilter.customerStatus.customFields"},{- $ref: "#/parameters/rowFilter.reportPin.updatedAt"+ $ref: "#/parameters/rowFilter.customerStatus.tags"},{$ref: "#/parameters/select"@@ -43701,7 +42207,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/reportPin"+ $ref: "#/definitions/customerStatus"},type: "array"}@@ -43710,12 +42216,12 @@ export default {description: "Partial Content"}},- tags: ["reportPin"]+ tags: ["customerStatus"]},post: {parameters: [{- $ref: "#/parameters/body.reportPin"+ $ref: "#/parameters/body.customerStatus"},{$ref: "#/parameters/select"@@ -43729,33 +42235,36 @@ export default {description: "Created"}},- tags: ["reportPin"]+ tags: ["customerStatus"]},delete: {parameters: [{- $ref: "#/parameters/rowFilter.reportPin.reportKey"+ $ref: "#/parameters/rowFilter.customerStatus.id"+ },+ {+ $ref: "#/parameters/rowFilter.customerStatus.name"},{- $ref: "#/parameters/rowFilter.reportPin.userId"+ $ref: "#/parameters/rowFilter.customerStatus.companyId"},{- $ref: "#/parameters/rowFilter.reportPin.companyId"+ $ref: "#/parameters/rowFilter.customerStatus.createdAt"},{- $ref: "#/parameters/rowFilter.reportPin.pinned"+ $ref: "#/parameters/rowFilter.customerStatus.createdBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdBy"+ $ref: "#/parameters/rowFilter.customerStatus.updatedBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdAt"+ $ref: "#/parameters/rowFilter.customerStatus.updatedAt"},{- $ref: "#/parameters/rowFilter.reportPin.updatedBy"+ $ref: "#/parameters/rowFilter.customerStatus.customFields"},{- $ref: "#/parameters/rowFilter.reportPin.updatedAt"+ $ref: "#/parameters/rowFilter.customerStatus.tags"},{$ref: "#/parameters/preferReturn"@@ -43766,36 +42275,39 @@ export default {description: "No Content"}},- tags: ["reportPin"]+ tags: ["customerStatus"]},patch: {parameters: [{- $ref: "#/parameters/rowFilter.reportPin.reportKey"+ $ref: "#/parameters/rowFilter.customerStatus.id"+ },+ {+ $ref: "#/parameters/rowFilter.customerStatus.name"},{- $ref: "#/parameters/rowFilter.reportPin.userId"+ $ref: "#/parameters/rowFilter.customerStatus.companyId"},{- $ref: "#/parameters/rowFilter.reportPin.companyId"+ $ref: "#/parameters/rowFilter.customerStatus.createdAt"},{- $ref: "#/parameters/rowFilter.reportPin.pinned"+ $ref: "#/parameters/rowFilter.customerStatus.createdBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdBy"+ $ref: "#/parameters/rowFilter.customerStatus.updatedBy"},{- $ref: "#/parameters/rowFilter.reportPin.createdAt"+ $ref: "#/parameters/rowFilter.customerStatus.updatedAt"},{- $ref: "#/parameters/rowFilter.reportPin.updatedBy"+ $ref: "#/parameters/rowFilter.customerStatus.customFields"},{- $ref: "#/parameters/rowFilter.reportPin.updatedAt"+ $ref: "#/parameters/rowFilter.customerStatus.tags"},{- $ref: "#/parameters/body.reportPin"+ $ref: "#/parameters/body.customerStatus"},{$ref: "#/parameters/preferReturn"@@ -43806,7 +42318,7 @@ export default {description: "No Content"}},- tags: ["reportPin"]+ tags: ["customerStatus"]}},"/storageUnit": {@@ -44806,34 +43318,34 @@ export default {$ref: "#/parameters/rowFilter.purchaseInvoiceLine.jobOperationId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"},{$ref: "#/parameters/select"@@ -44988,34 +43500,34 @@ export default {$ref: "#/parameters/rowFilter.purchaseInvoiceLine.jobOperationId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"},{$ref: "#/parameters/preferReturn"@@ -45124,34 +43636,34 @@ export default {$ref: "#/parameters/rowFilter.purchaseInvoiceLine.jobOperationId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.accountId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseInvoiceLine.totalAmount"+ $ref: "#/parameters/rowFilter.purchaseInvoiceLine.sortOrder"},{$ref: "#/parameters/body.purchaseInvoiceLine"@@ -46992,6 +45504,9 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.quantityPicked"},+ {+ $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"+ },{$ref: "#/parameters/rowFilter.pickingListLine.storageUnitId"},@@ -47019,12 +45534,6 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.customFields"},- {- $ref: "#/parameters/rowFilter.pickingListLine.quantityReturned"- },- {- $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"- },{$ref: "#/parameters/select"},@@ -47108,6 +45617,9 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.quantityPicked"},+ {+ $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"+ },{$ref: "#/parameters/rowFilter.pickingListLine.storageUnitId"},@@ -47135,12 +45647,6 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.customFields"},- {- $ref: "#/parameters/rowFilter.pickingListLine.quantityReturned"- },- {- $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"- },{$ref: "#/parameters/preferReturn"}@@ -47178,6 +45684,9 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.quantityPicked"},+ {+ $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"+ },{$ref: "#/parameters/rowFilter.pickingListLine.storageUnitId"},@@ -47205,12 +45714,6 @@ export default {{$ref: "#/parameters/rowFilter.pickingListLine.customFields"},- {- $ref: "#/parameters/rowFilter.pickingListLine.quantityReturned"- },- {- $ref: "#/parameters/rowFilter.pickingListLine.outstandingQuantity"- },{$ref: "#/parameters/body.pickingListLine"},@@ -50091,274 +48594,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/inspectionFeature"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["inspectionFeature"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.inspectionFeature"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["inspectionFeature"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.inspectionFeature.id"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.inspectionDocumentId"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.companyId"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.pageNumber"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.label"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.description"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.nominalValue"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.tolerancePlus"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.toleranceMinus"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.unit"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.createdBy"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.createdAt"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.updatedBy"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.updatedAt"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.type"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingPlanType"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingSampleSize"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingPercentage"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingAql"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingInspectionLevel"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingSeverity"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["inspectionFeature"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.inspectionFeature.id"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.inspectionDocumentId"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.companyId"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.pageNumber"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.label"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.description"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.nominalValue"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.tolerancePlus"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.toleranceMinus"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.unit"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.createdBy"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.createdAt"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.updatedBy"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.updatedAt"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.type"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingPlanType"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingSampleSize"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingPercentage"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingAql"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingInspectionLevel"- },- {- $ref: "#/parameters/rowFilter.inspectionFeature.samplingSeverity"- },- {- $ref: "#/parameters/body.inspectionFeature"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["inspectionFeature"]- }- },- "/itarCertification": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.itarCertification.id"- },- {- $ref: "#/parameters/rowFilter.itarCertification.companyId"- },- {- $ref: "#/parameters/rowFilter.itarCertification.type"- },- {- $ref: "#/parameters/rowFilter.itarCertification.userId"- },- {- $ref: "#/parameters/rowFilter.itarCertification.docVersion"- },- {- $ref: "#/parameters/rowFilter.itarCertification.docHash"- },- {- $ref: "#/parameters/rowFilter.itarCertification.fullLegalName"- },- {- $ref: "#/parameters/rowFilter.itarCertification.title"- },- {- $ref: "#/parameters/rowFilter.itarCertification.complianceContact"- },- {- $ref: "#/parameters/rowFilter.itarCertification.certifiedAt"- },- {- $ref: "#/parameters/rowFilter.itarCertification.ipAddress"- },- {- $ref: "#/parameters/rowFilter.itarCertification.userAgent"- },- {- $ref: "#/parameters/rowFilter.itarCertification.expiresAt"- },- {- $ref: "#/parameters/rowFilter.itarCertification.createdBy"- },- {- $ref: "#/parameters/rowFilter.itarCertification.createdAt"- },- {- $ref: "#/parameters/rowFilter.itarCertification.updatedBy"- },- {- $ref: "#/parameters/rowFilter.itarCertification.updatedAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/itarCertification"+ $ref: "#/definitions/inspectionFeature"},type: "array"}@@ -50367,12 +48603,12 @@ export default {description: "Partial Content"}},- tags: ["itarCertification"]+ tags: ["inspectionFeature"]},post: {parameters: [{- $ref: "#/parameters/body.itarCertification"+ $ref: "#/parameters/body.inspectionFeature"},{$ref: "#/parameters/select"@@ -50386,60 +48622,72 @@ export default {description: "Created"}},- tags: ["itarCertification"]+ tags: ["inspectionFeature"]},delete: {parameters: [{- $ref: "#/parameters/rowFilter.itarCertification.id"+ $ref: "#/parameters/rowFilter.inspectionFeature.id"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.inspectionDocumentId"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.pageNumber"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.label"},{- $ref: "#/parameters/rowFilter.itarCertification.companyId"+ $ref: "#/parameters/rowFilter.inspectionFeature.description"},{- $ref: "#/parameters/rowFilter.itarCertification.type"+ $ref: "#/parameters/rowFilter.inspectionFeature.nominalValue"},{- $ref: "#/parameters/rowFilter.itarCertification.userId"+ $ref: "#/parameters/rowFilter.inspectionFeature.tolerancePlus"},{- $ref: "#/parameters/rowFilter.itarCertification.docVersion"+ $ref: "#/parameters/rowFilter.inspectionFeature.toleranceMinus"},{- $ref: "#/parameters/rowFilter.itarCertification.docHash"+ $ref: "#/parameters/rowFilter.inspectionFeature.unit"},{- $ref: "#/parameters/rowFilter.itarCertification.fullLegalName"+ $ref: "#/parameters/rowFilter.inspectionFeature.createdBy"},{- $ref: "#/parameters/rowFilter.itarCertification.title"+ $ref: "#/parameters/rowFilter.inspectionFeature.createdAt"},{- $ref: "#/parameters/rowFilter.itarCertification.complianceContact"+ $ref: "#/parameters/rowFilter.inspectionFeature.updatedBy"},{- $ref: "#/parameters/rowFilter.itarCertification.certifiedAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.updatedAt"},{- $ref: "#/parameters/rowFilter.itarCertification.ipAddress"+ $ref: "#/parameters/rowFilter.inspectionFeature.type"},{- $ref: "#/parameters/rowFilter.itarCertification.userAgent"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingPlanType"},{- $ref: "#/parameters/rowFilter.itarCertification.expiresAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingSampleSize"},{- $ref: "#/parameters/rowFilter.itarCertification.createdBy"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingPercentage"},{- $ref: "#/parameters/rowFilter.itarCertification.createdAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingAql"},{- $ref: "#/parameters/rowFilter.itarCertification.updatedBy"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingInspectionLevel"},{- $ref: "#/parameters/rowFilter.itarCertification.updatedAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingSeverity"},{$ref: "#/parameters/preferReturn"@@ -50450,63 +48698,75 @@ export default {description: "No Content"}},- tags: ["itarCertification"]+ tags: ["inspectionFeature"]},patch: {parameters: [{- $ref: "#/parameters/rowFilter.itarCertification.id"+ $ref: "#/parameters/rowFilter.inspectionFeature.id"},{- $ref: "#/parameters/rowFilter.itarCertification.companyId"+ $ref: "#/parameters/rowFilter.inspectionFeature.inspectionDocumentId"},{- $ref: "#/parameters/rowFilter.itarCertification.type"+ $ref: "#/parameters/rowFilter.inspectionFeature.companyId"},{- $ref: "#/parameters/rowFilter.itarCertification.userId"+ $ref: "#/parameters/rowFilter.inspectionFeature.pageNumber"},{- $ref: "#/parameters/rowFilter.itarCertification.docVersion"+ $ref: "#/parameters/rowFilter.inspectionFeature.label"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.description"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.nominalValue"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.tolerancePlus"+ },+ {+ $ref: "#/parameters/rowFilter.inspectionFeature.toleranceMinus"},{- $ref: "#/parameters/rowFilter.itarCertification.docHash"+ $ref: "#/parameters/rowFilter.inspectionFeature.unit"},{- $ref: "#/parameters/rowFilter.itarCertification.fullLegalName"+ $ref: "#/parameters/rowFilter.inspectionFeature.createdBy"},{- $ref: "#/parameters/rowFilter.itarCertification.title"+ $ref: "#/parameters/rowFilter.inspectionFeature.createdAt"},{- $ref: "#/parameters/rowFilter.itarCertification.complianceContact"+ $ref: "#/parameters/rowFilter.inspectionFeature.updatedBy"},{- $ref: "#/parameters/rowFilter.itarCertification.certifiedAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.updatedAt"},{- $ref: "#/parameters/rowFilter.itarCertification.ipAddress"+ $ref: "#/parameters/rowFilter.inspectionFeature.type"},{- $ref: "#/parameters/rowFilter.itarCertification.userAgent"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingPlanType"},{- $ref: "#/parameters/rowFilter.itarCertification.expiresAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingSampleSize"},{- $ref: "#/parameters/rowFilter.itarCertification.createdBy"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingPercentage"},{- $ref: "#/parameters/rowFilter.itarCertification.createdAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingAql"},{- $ref: "#/parameters/rowFilter.itarCertification.updatedBy"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingInspectionLevel"},{- $ref: "#/parameters/rowFilter.itarCertification.updatedAt"+ $ref: "#/parameters/rowFilter.inspectionFeature.samplingSeverity"},{- $ref: "#/parameters/body.itarCertification"+ $ref: "#/parameters/body.inspectionFeature"},{$ref: "#/parameters/preferReturn"@@ -50517,7 +48777,7 @@ export default {description: "No Content"}},- tags: ["itarCertification"]+ tags: ["inspectionFeature"]}},"/warehouseTransfer": {@@ -50970,186 +49230,6 @@ export default {tags: ["customerItemPriceOverride"]}},- "/reportView": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.reportView.id"- },- {- $ref: "#/parameters/rowFilter.reportView.companyId"- },- {- $ref: "#/parameters/rowFilter.reportView.reportKey"- },- {- $ref: "#/parameters/rowFilter.reportView.name"- },- {- $ref: "#/parameters/rowFilter.reportView.config"- },- {- $ref: "#/parameters/rowFilter.reportView.visibility"- },- {- $ref: "#/parameters/rowFilter.reportView.createdBy"- },- {- $ref: "#/parameters/rowFilter.reportView.createdAt"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedBy"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/reportView"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["reportView"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.reportView"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["reportView"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.reportView.id"- },- {- $ref: "#/parameters/rowFilter.reportView.companyId"- },- {- $ref: "#/parameters/rowFilter.reportView.reportKey"- },- {- $ref: "#/parameters/rowFilter.reportView.name"- },- {- $ref: "#/parameters/rowFilter.reportView.config"- },- {- $ref: "#/parameters/rowFilter.reportView.visibility"- },- {- $ref: "#/parameters/rowFilter.reportView.createdBy"- },- {- $ref: "#/parameters/rowFilter.reportView.createdAt"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedBy"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["reportView"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.reportView.id"- },- {- $ref: "#/parameters/rowFilter.reportView.companyId"- },- {- $ref: "#/parameters/rowFilter.reportView.reportKey"- },- {- $ref: "#/parameters/rowFilter.reportView.name"- },- {- $ref: "#/parameters/rowFilter.reportView.config"- },- {- $ref: "#/parameters/rowFilter.reportView.visibility"- },- {- $ref: "#/parameters/rowFilter.reportView.createdBy"- },- {- $ref: "#/parameters/rowFilter.reportView.createdAt"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedBy"- },- {- $ref: "#/parameters/rowFilter.reportView.updatedAt"- },- {- $ref: "#/parameters/body.reportView"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["reportView"]- }- },"/companyIntegration": {get: {parameters: [@@ -55831,34 +53911,34 @@ export default {$ref: "#/parameters/rowFilter.salesOrderLines.quantityToInvoice"},{- $ref: "#/parameters/rowFilter.salesOrderLines.sentDate"+ $ref: "#/parameters/rowFilter.salesOrderLines.convertedAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLines.accountId"+ $ref: "#/parameters/rowFilter.salesOrderLines.convertedShippingCost"},{- $ref: "#/parameters/rowFilter.salesOrderLines.nonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLines.convertedUnitPrice"},{- $ref: "#/parameters/rowFilter.salesOrderLines.pricingRuleId"+ $ref: "#/parameters/rowFilter.salesOrderLines.sentDate"},{- $ref: "#/parameters/rowFilter.salesOrderLines.priceTrace"+ $ref: "#/parameters/rowFilter.salesOrderLines.accountId"},{- $ref: "#/parameters/rowFilter.salesOrderLines.sortOrder"+ $ref: "#/parameters/rowFilter.salesOrderLines.nonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLines.convertedAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLines.convertedNonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLines.convertedShippingCost"+ $ref: "#/parameters/rowFilter.salesOrderLines.pricingRuleId"},{- $ref: "#/parameters/rowFilter.salesOrderLines.convertedUnitPrice"+ $ref: "#/parameters/rowFilter.salesOrderLines.priceTrace"},{- $ref: "#/parameters/rowFilter.salesOrderLines.convertedNonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLines.sortOrder"},{$ref: "#/parameters/rowFilter.salesOrderLines.itemReadableId"@@ -61521,148 +59601,52 @@ export default {}},tags: ["ability"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.ability.id"- },- {- $ref: "#/parameters/rowFilter.ability.name"- },- {- $ref: "#/parameters/rowFilter.ability.curve"- },- {- $ref: "#/parameters/rowFilter.ability.shadowWeeks"- },- {- $ref: "#/parameters/rowFilter.ability.active"- },- {- $ref: "#/parameters/rowFilter.ability.companyId"- },- {- $ref: "#/parameters/rowFilter.ability.createdAt"- },- {- $ref: "#/parameters/rowFilter.ability.createdBy"- },- {- $ref: "#/parameters/rowFilter.ability.updatedAt"- },- {- $ref: "#/parameters/rowFilter.ability.updatedBy"- },- {- $ref: "#/parameters/body.ability"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["ability"]- }- },- "/assemblyInstructions": {- get: {+ },+ patch: {parameters: [{- $ref: "#/parameters/rowFilter.assemblyInstructions.id"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.name"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.modelUploadId"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.itemId"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.assemblyPlanJobId"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.status"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.version"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.publishedAt"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.settings"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.rootInstructionId"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.companyId"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.customFields"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.tags"- },- {- $ref: "#/parameters/rowFilter.assemblyInstructions.createdBy"+ $ref: "#/parameters/rowFilter.ability.id"},{- $ref: "#/parameters/rowFilter.assemblyInstructions.createdAt"+ $ref: "#/parameters/rowFilter.ability.name"},{- $ref: "#/parameters/rowFilter.assemblyInstructions.updatedBy"+ $ref: "#/parameters/rowFilter.ability.curve"},{- $ref: "#/parameters/rowFilter.assemblyInstructions.updatedAt"+ $ref: "#/parameters/rowFilter.ability.shadowWeeks"},{- $ref: "#/parameters/rowFilter.assemblyInstructions.versions"+ $ref: "#/parameters/rowFilter.ability.active"},{- $ref: "#/parameters/select"+ $ref: "#/parameters/rowFilter.ability.companyId"},{- $ref: "#/parameters/order"+ $ref: "#/parameters/rowFilter.ability.createdAt"},{- $ref: "#/parameters/range"+ $ref: "#/parameters/rowFilter.ability.createdBy"},{- $ref: "#/parameters/rangeUnit"+ $ref: "#/parameters/rowFilter.ability.updatedAt"},{- $ref: "#/parameters/offset"+ $ref: "#/parameters/rowFilter.ability.updatedBy"},{- $ref: "#/parameters/limit"+ $ref: "#/parameters/body.ability"},{- $ref: "#/parameters/preferCount"+ $ref: "#/parameters/preferReturn"}],responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/assemblyInstructions"- },- type: "array"- }- },- "206": {- description: "Partial Content"+ "204": {+ description: "No Content"}},- tags: ["assemblyInstructions"]+ tags: ["ability"]}},"/dimensionValues": {@@ -63021,15 +61005,6 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.shippingCost"},- {- $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"- },{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedUnitPrice"},@@ -63048,6 +61023,15 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedShippingCost"},+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"+ },{$ref: "#/parameters/select"},@@ -63143,15 +61127,6 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.shippingCost"},- {- $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"- },{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedUnitPrice"},@@ -63170,6 +61145,15 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedShippingCost"},+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"+ },{$ref: "#/parameters/preferReturn"}@@ -63219,15 +61203,6 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.shippingCost"},- {- $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"- },{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedUnitPrice"},@@ -63246,6 +61221,15 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrice.convertedShippingCost"},+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.categoryMarkups"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.companyId"+ },+ {+ $ref: "#/parameters/rowFilter.quoteLinePrice.priceSource"+ },{$ref: "#/parameters/body.quoteLinePrice"},@@ -64272,9 +62256,6 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxPercent"},- {- $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"- },{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.unitPrice"},@@ -64287,6 +62268,9 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxAmount"},+ {+ $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"+ },{$ref: "#/parameters/select"},@@ -64388,9 +62372,6 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxPercent"},- {- $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"- },{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.unitPrice"},@@ -64403,6 +62384,9 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxAmount"},+ {+ $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"+ },{$ref: "#/parameters/preferReturn"}@@ -64458,9 +62442,6 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxPercent"},- {- $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"- },{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.unitPrice"},@@ -64473,6 +62454,9 @@ export default {{$ref: "#/parameters/rowFilter.supplierQuoteLinePrice.taxAmount"},+ {+ $ref: "#/parameters/rowFilter.supplierQuoteLinePrice.companyId"+ },{$ref: "#/parameters/body.supplierQuoteLinePrice"},@@ -64773,181 +62757,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/nonConformanceActionProcess"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["nonConformanceActionProcess"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.nonConformanceActionProcess"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["nonConformanceActionProcess"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.id"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.actionTaskId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.processId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.companyId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdAt"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdBy"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedAt"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedBy"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["nonConformanceActionProcess"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.id"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.actionTaskId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.processId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.companyId"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdAt"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdBy"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedAt"- },- {- $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedBy"- },- {- $ref: "#/parameters/body.nonConformanceActionProcess"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["nonConformanceActionProcess"]- }- },- "/itemSerialSequence": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.itemSerialSequence.id"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.companyId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.itemId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.prefix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.suffix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.next"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.size"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.step"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.createdBy"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.createdAt"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedBy"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/itemSerialSequence"+ $ref: "#/definitions/nonConformanceActionProcess"},type: "array"}@@ -64956,12 +62766,12 @@ export default {description: "Partial Content"}},- tags: ["itemSerialSequence"]+ tags: ["nonConformanceActionProcess"]},post: {parameters: [{- $ref: "#/parameters/body.itemSerialSequence"+ $ref: "#/parameters/body.nonConformanceActionProcess"},{$ref: "#/parameters/select"@@ -64975,45 +62785,33 @@ export default {description: "Created"}},- tags: ["itemSerialSequence"]+ tags: ["nonConformanceActionProcess"]},delete: {parameters: [{- $ref: "#/parameters/rowFilter.itemSerialSequence.id"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.companyId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.itemId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.prefix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.suffix"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.id"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.next"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.actionTaskId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.size"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.processId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.step"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.companyId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.createdBy"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdAt"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.createdAt"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdBy"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedBy"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedAt"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedBy"},{$ref: "#/parameters/preferReturn"@@ -65024,48 +62822,36 @@ export default {description: "No Content"}},- tags: ["itemSerialSequence"]+ tags: ["nonConformanceActionProcess"]},patch: {parameters: [{- $ref: "#/parameters/rowFilter.itemSerialSequence.id"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.companyId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.itemId"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.prefix"- },- {- $ref: "#/parameters/rowFilter.itemSerialSequence.suffix"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.id"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.next"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.actionTaskId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.size"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.processId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.step"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.companyId"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.createdBy"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdAt"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.createdAt"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.createdBy"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedBy"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedAt"},{- $ref: "#/parameters/rowFilter.itemSerialSequence.updatedAt"+ $ref: "#/parameters/rowFilter.nonConformanceActionProcess.updatedBy"},{- $ref: "#/parameters/body.itemSerialSequence"+ $ref: "#/parameters/body.nonConformanceActionProcess"},{$ref: "#/parameters/preferReturn"@@ -65076,7 +62862,7 @@ export default {description: "No Content"}},- tags: ["itemSerialSequence"]+ tags: ["nonConformanceActionProcess"]}},"/batchProperty": {@@ -66708,12 +64494,6 @@ export default {{$ref: "#/parameters/rowFilter.quoteOperationsWithMakeMethods.procedureId"},- {- $ref: "#/parameters/rowFilter.quoteOperationsWithMakeMethods.assemblyInstructionId"- },- {- $ref: "#/parameters/rowFilter.quoteOperationsWithMakeMethods.inspectionDocumentId"- },{$ref: "#/parameters/select"},@@ -66976,34 +64756,34 @@ export default {$ref: "#/parameters/rowFilter.salesOrderLine.quantityToInvoice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.accountId"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"+ $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"},{- $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"+ $ref: "#/parameters/rowFilter.salesOrderLine.accountId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"+ $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"+ $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"},{$ref: "#/parameters/select"@@ -67167,34 +64947,34 @@ export default {$ref: "#/parameters/rowFilter.salesOrderLine.quantityToInvoice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.accountId"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"+ $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"},{- $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"+ $ref: "#/parameters/rowFilter.salesOrderLine.accountId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"+ $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"+ $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"},{$ref: "#/parameters/preferReturn"@@ -67312,34 +65092,34 @@ export default {$ref: "#/parameters/rowFilter.salesOrderLine.quantityToInvoice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.accountId"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"},{- $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"+ $ref: "#/parameters/rowFilter.salesOrderLine.sentDate"},{- $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"+ $ref: "#/parameters/rowFilter.salesOrderLine.accountId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"+ $ref: "#/parameters/rowFilter.salesOrderLine.nonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedShippingCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.pricingRuleId"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedUnitPrice"+ $ref: "#/parameters/rowFilter.salesOrderLine.priceTrace"},{- $ref: "#/parameters/rowFilter.salesOrderLine.convertedNonTaxableAddOnCost"+ $ref: "#/parameters/rowFilter.salesOrderLine.sortOrder"},{$ref: "#/parameters/body.salesOrderLine"@@ -67572,9 +65352,6 @@ export default {{$ref: "#/parameters/rowFilter.company.registrationNumber"},- {- $ref: "#/parameters/rowFilter.company.timezone"- },{$ref: "#/parameters/select"},@@ -67739,9 +65516,6 @@ export default {{$ref: "#/parameters/rowFilter.company.registrationNumber"},- {- $ref: "#/parameters/rowFilter.company.timezone"- },{$ref: "#/parameters/preferReturn"}@@ -67860,9 +65634,6 @@ export default {{$ref: "#/parameters/rowFilter.company.registrationNumber"},- {- $ref: "#/parameters/rowFilter.company.timezone"- },{$ref: "#/parameters/body.company"},@@ -73222,37 +70993,37 @@ export default {$ref: "#/parameters/rowFilter.purchaseOrderLines.promisedDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.accountId"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.unitPrice"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.requiredDate"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.extendedPrice"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.receivedDate"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.shippingCost"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.costCenterId"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.taxAmount"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.ownerId"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.accountId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.sortOrder"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.requiredDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.supplierPartId"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.receivedDate"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.unitPrice"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.costCenterId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.extendedPrice"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.ownerId"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.shippingCost"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.sortOrder"},{- $ref: "#/parameters/rowFilter.purchaseOrderLines.taxAmount"+ $ref: "#/parameters/rowFilter.purchaseOrderLines.supplierPartId"},{$ref: "#/parameters/rowFilter.purchaseOrderLines.supplierPartIdFromSupplier"@@ -75762,232 +73533,7 @@ export default {description: "OK",schema: {items: {- $ref: "#/definitions/passkeyCredential"- },- type: "array"- }- },- "206": {- description: "Partial Content"- }- },- tags: ["passkeyCredential"]- },- post: {- parameters: [- {- $ref: "#/parameters/body.passkeyCredential"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/preferPost"- }- ],- responses: {- "201": {- description: "Created"- }- },- tags: ["passkeyCredential"]- },- delete: {- parameters: [- {- $ref: "#/parameters/rowFilter.passkeyCredential.id"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.userId"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.publicKey"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.counter"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.deviceType"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.backedUp"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.transports"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.aaguid"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.rpId"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.userHandle"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.credentialName"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.createdAt"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.lastUsedAt"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["passkeyCredential"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.passkeyCredential.id"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.userId"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.publicKey"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.counter"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.deviceType"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.backedUp"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.transports"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.aaguid"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.rpId"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.userHandle"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.credentialName"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.createdAt"- },- {- $ref: "#/parameters/rowFilter.passkeyCredential.lastUsedAt"- },- {- $ref: "#/parameters/body.passkeyCredential"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["passkeyCredential"]- }- },- "/accountingSyncTieOut": {- get: {- parameters: [- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.id"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.companyId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.integration"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountingPeriodId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.carbonPostedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.syncedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.docBackedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.excludedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.pendingAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.blockedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.providerAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.internalDelta"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.externalDelta"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.computedAt"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdBy"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdAt"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedBy"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedAt"- },- {- $ref: "#/parameters/select"- },- {- $ref: "#/parameters/order"- },- {- $ref: "#/parameters/range"- },- {- $ref: "#/parameters/rangeUnit"- },- {- $ref: "#/parameters/offset"- },- {- $ref: "#/parameters/limit"- },- {- $ref: "#/parameters/preferCount"- }- ],- responses: {- "200": {- description: "OK",- schema: {- items: {- $ref: "#/definitions/accountingSyncTieOut"+ $ref: "#/definitions/passkeyCredential"},type: "array"}@@ -75996,12 +73542,12 @@ export default {description: "Partial Content"}},- tags: ["accountingSyncTieOut"]+ tags: ["passkeyCredential"]},post: {parameters: [{- $ref: "#/parameters/body.accountingSyncTieOut"+ $ref: "#/parameters/body.passkeyCredential"},{$ref: "#/parameters/select"@@ -76015,66 +73561,48 @@ export default {description: "Created"}},- tags: ["accountingSyncTieOut"]+ tags: ["passkeyCredential"]},delete: {parameters: [{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.id"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.companyId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.integration"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountingPeriodId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.carbonPostedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.syncedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.id"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.docBackedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.userId"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.excludedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.publicKey"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.pendingAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.counter"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.blockedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.deviceType"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.providerAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.backedUp"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.internalDelta"+ $ref: "#/parameters/rowFilter.passkeyCredential.transports"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.externalDelta"+ $ref: "#/parameters/rowFilter.passkeyCredential.aaguid"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.computedAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.rpId"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdBy"+ $ref: "#/parameters/rowFilter.passkeyCredential.userHandle"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.credentialName"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedBy"+ $ref: "#/parameters/rowFilter.passkeyCredential.createdAt"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.lastUsedAt"},{$ref: "#/parameters/preferReturn"@@ -76085,69 +73613,51 @@ export default {description: "No Content"}},- tags: ["accountingSyncTieOut"]+ tags: ["passkeyCredential"]},patch: {parameters: [{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.id"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.companyId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.integration"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountingPeriodId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.accountId"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.carbonPostedAmount"- },- {- $ref: "#/parameters/rowFilter.accountingSyncTieOut.syncedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.id"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.docBackedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.userId"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.excludedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.publicKey"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.pendingAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.counter"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.blockedAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.deviceType"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.providerAmount"+ $ref: "#/parameters/rowFilter.passkeyCredential.backedUp"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.internalDelta"+ $ref: "#/parameters/rowFilter.passkeyCredential.transports"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.externalDelta"+ $ref: "#/parameters/rowFilter.passkeyCredential.aaguid"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.computedAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.rpId"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdBy"+ $ref: "#/parameters/rowFilter.passkeyCredential.userHandle"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.createdAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.credentialName"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedBy"+ $ref: "#/parameters/rowFilter.passkeyCredential.createdAt"},{- $ref: "#/parameters/rowFilter.accountingSyncTieOut.updatedAt"+ $ref: "#/parameters/rowFilter.passkeyCredential.lastUsedAt"},{- $ref: "#/parameters/body.accountingSyncTieOut"+ $ref: "#/parameters/body.passkeyCredential"},{$ref: "#/parameters/preferReturn"@@ -76158,7 +73668,7 @@ export default {description: "No Content"}},- tags: ["accountingSyncTieOut"]+ tags: ["passkeyCredential"]}},"/fixedAsset": {@@ -78081,9 +75591,6 @@ export default {{$ref: "#/parameters/rowFilter.jobOperationsWithMakeMethods.assemblyInstructionId"},- {- $ref: "#/parameters/rowFilter.jobOperationsWithMakeMethods.inspectionDocumentId"- },{$ref: "#/parameters/select"},@@ -79560,15 +77067,6 @@ export default {{$ref: "#/parameters/rowFilter.quoteLinePrices.configuration"},- {- $ref: "#/parameters/rowFilter.quoteLinePrices.pricingRuleId"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrices.priceTrace"- },- {- $ref: "#/parameters/rowFilter.quoteLinePrices.sortOrder"- },{$ref: "#/parameters/rowFilter.quoteLinePrices.itemReadableId"},@@ -85494,6 +82992,12 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.supplierQuoteNotificationGroup"},+ {+ $ref: "#/parameters/rowFilter.companySettings.maintenanceGenerateInAdvance"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.maintenanceAdvanceDays"+ },{$ref: "#/parameters/rowFilter.companySettings.maintenanceDispatchNotificationGroup"},@@ -85578,18 +83082,6 @@ export default {{$ref: "#/parameters/rowFilter.companySettings.incompletePickingListPolicy"},- {- $ref: "#/parameters/rowFilter.companySettings.includeMaterialsOnTraveler"- },- {- $ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"- },- {- $ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"- },- {- $ref: "#/parameters/rowFilter.companySettings.requireMfa"- },{$ref: "#/parameters/select"},@@ -85695,158 +83187,10 @@ export default {$ref: "#/parameters/rowFilter.companySettings.supplierQuoteNotificationGroup"},{- $ref: "#/parameters/rowFilter.companySettings.maintenanceDispatchNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.qualityDispatchNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.operationsDispatchNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.otherDispatchNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.defaultSupplierCc"- },- {- $ref: "#/parameters/rowFilter.companySettings.defaultCustomerCc"- },- {- $ref: "#/parameters/rowFilter.companySettings.accountsPayableEmail"- },- {- $ref: "#/parameters/rowFilter.companySettings.accountsReceivableEmail"- },- {- $ref: "#/parameters/rowFilter.companySettings.accountsPayableAddress"- },- {- $ref: "#/parameters/rowFilter.companySettings.accountsReceivableAddress"- },- {- $ref: "#/parameters/rowFilter.companySettings.quoteLineCategoryMarkups"- },- {- $ref: "#/parameters/rowFilter.companySettings.qualityIssueTarget"- },- {- $ref: "#/parameters/rowFilter.companySettings.consoleEnabled"- },- {- $ref: "#/parameters/rowFilter.companySettings.timeCardEnabled"- },- {- $ref: "#/parameters/rowFilter.companySettings.printing"- },- {- $ref: "#/parameters/rowFilter.companySettings.updateLeadTimesOnReceipt"- },- {- $ref: "#/parameters/rowFilter.companySettings.enforceInspectionFourEyes"- },- {- $ref: "#/parameters/rowFilter.companySettings.samplingStandard"+ $ref: "#/parameters/rowFilter.companySettings.maintenanceGenerateInAdvance"},{- $ref: "#/parameters/rowFilter.companySettings.inventoryShelfLife"- },- {- $ref: "#/parameters/rowFilter.companySettings.accountingEnabled"- },- {- $ref: "#/parameters/rowFilter.companySettings.assetTaxDepreciationEnabled"- },- {- $ref: "#/parameters/rowFilter.companySettings.assetTaxRate"- },- {- $ref: "#/parameters/rowFilter.companySettings.showSupplierReadableId"- },- {- $ref: "#/parameters/rowFilter.companySettings.showCustomerReadableId"- },- {- $ref: "#/parameters/rowFilter.companySettings.autoStartOperationTimer"- },- {- $ref: "#/parameters/rowFilter.companySettings.plmReleaseControl"- },- {- $ref: "#/parameters/rowFilter.companySettings.autoSelectMaterialWithoutPickingList"- },- {- $ref: "#/parameters/rowFilter.companySettings.incompletePickingListPolicy"- },- {- $ref: "#/parameters/rowFilter.companySettings.includeMaterialsOnTraveler"- },- {- $ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"- },- {- $ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"- },- {- $ref: "#/parameters/rowFilter.companySettings.requireMfa"- },- {- $ref: "#/parameters/preferReturn"- }- ],- responses: {- "204": {- description: "No Content"- }- },- tags: ["companySettings"]- },- patch: {- parameters: [- {- $ref: "#/parameters/rowFilter.companySettings.id"- },- {- $ref: "#/parameters/rowFilter.companySettings.digitalQuoteEnabled"- },- {- $ref: "#/parameters/rowFilter.companySettings.digitalQuoteNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders"- },- {- $ref: "#/parameters/rowFilter.companySettings.rfqReadyNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.productLabelSize"- },- {- $ref: "#/parameters/rowFilter.companySettings.shelfLabelSize"- },- {- $ref: "#/parameters/rowFilter.companySettings.inventoryJobCompletedNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.salesJobCompletedNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.materialGeneratedIds"- },- {- $ref: "#/parameters/rowFilter.companySettings.useMetric"- },- {- $ref: "#/parameters/rowFilter.companySettings.kanbanOutput"- },- {- $ref: "#/parameters/rowFilter.companySettings.gaugeCalibrationExpiredNotificationGroup"- },- {- $ref: "#/parameters/rowFilter.companySettings.purchasePriceUpdateTiming"- },- {- $ref: "#/parameters/rowFilter.companySettings.supplierQuoteNotificationGroup"+ $ref: "#/parameters/rowFilter.companySettings.maintenanceAdvanceDays"},{$ref: "#/parameters/rowFilter.companySettings.maintenanceDispatchNotificationGroup"@@ -85933,16 +83277,152 @@ export default {$ref: "#/parameters/rowFilter.companySettings.incompletePickingListPolicy"},{- $ref: "#/parameters/rowFilter.companySettings.includeMaterialsOnTraveler"+ $ref: "#/parameters/preferReturn"+ }+ ],+ responses: {+ "204": {+ description: "No Content"+ }+ },+ tags: ["companySettings"]+ },+ patch: {+ parameters: [+ {+ $ref: "#/parameters/rowFilter.companySettings.id"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteEnabled"},{- $ref: "#/parameters/rowFilter.companySettings.returnPickedMaterialTiming"+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.digitalQuoteIncludesPurchaseOrders"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.rfqReadyNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.productLabelSize"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.shelfLabelSize"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.inventoryJobCompletedNotificationGroup"},{- $ref: "#/parameters/rowFilter.companySettings.showCurrencyTrailingZeros"+ $ref: "#/parameters/rowFilter.companySettings.salesJobCompletedNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.materialGeneratedIds"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.useMetric"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.kanbanOutput"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.gaugeCalibrationExpiredNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.purchasePriceUpdateTiming"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.supplierQuoteNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.maintenanceGenerateInAdvance"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.maintenanceAdvanceDays"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.maintenanceDispatchNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.qualityDispatchNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.operationsDispatchNotificationGroup"},{- $ref: "#/parameters/rowFilter.companySettings.requireMfa"+ $ref: "#/parameters/rowFilter.companySettings.otherDispatchNotificationGroup"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.defaultSupplierCc"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.defaultCustomerCc"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.accountsPayableEmail"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.accountsReceivableEmail"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.accountsPayableAddress"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.accountsReceivableAddress"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.quoteLineCategoryMarkups"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.qualityIssueTarget"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.consoleEnabled"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.timeCardEnabled"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.printing"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.updateLeadTimesOnReceipt"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.enforceInspectionFourEyes"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.samplingStandard"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.inventoryShelfLife"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.accountingEnabled"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.assetTaxDepreciationEnabled"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.assetTaxRate"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.showSupplierReadableId"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.showCustomerReadableId"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.autoStartOperationTimer"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.plmReleaseControl"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.autoSelectMaterialWithoutPickingList"+ },+ {+ $ref: "#/parameters/rowFilter.companySettings.incompletePickingListPolicy"},{$ref: "#/parameters/body.companySettings"@@ -87977,28 +85457,6 @@ export default {}},"/rpc/get_companies_with_employee_permission": {- get: {- parameters: [- {- format: "text",- in: "query",- name: "permission",- required: true,- type: "string"- }- ],- produces: [- "application/json",- "application/vnd.pgrst.object+json;nulls=stripped",- "application/vnd.pgrst.object+json"- ],- responses: {- "200": {- description: "OK"- }- },- tags: ["(rpc) get_companies_with_employee_permission"]- },post: {parameters: [{@@ -89145,6 +86603,41 @@ export default {tags: ["(rpc) get_companies_with_permission"]}},+ "/rpc/attach_audit_log_append_only": {+ post: {+ parameters: [+ {+ in: "body",+ name: "args",+ required: true,+ schema: {+ properties: {+ p_table_name: {+ format: "text",+ type: "string"+ }+ },+ required: ["p_table_name"],+ type: "object"+ }+ },+ {+ $ref: "#/parameters/preferParams"+ }+ ],+ produces: [+ "application/json",+ "application/vnd.pgrst.object+json;nulls=stripped",+ "application/vnd.pgrst.object+json"+ ],+ responses: {+ "200": {+ description: "OK"+ }+ },+ tags: ["(rpc) attach_audit_log_append_only"]+ }+ },"/rpc/get_inventory_tie_out": {post: {parameters: [@@ -89677,6 +87170,13 @@ export default {name: "args",required: true,schema: {+ properties: {+ company: {+ format: "text",+ type: "string"+ }+ },+ required: ["company"],type: "object"}},@@ -99002,8 +96502,7 @@ export default {"Completed","Failed","Warning",- "Skipped",- "Excluded"+ "Skipped"],format: 'public."syncOperationStatus"',type: "string"@@ -99064,74 +96563,6 @@ export default {},type: "object"},- workflowVersion: {- required: [- "id",- "companyId",- "workflowId",- "versionNumber",- "formatVersion",- "nodes",- "edges",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('wfv'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- workflowId: {- format: "text",- type: "string"- },- versionNumber: {- format: "integer",- type: "integer"- },- formatVersion: {- default: 1,- format: "integer",- type: "integer"- },- nodes: {- format: "jsonb"- },- edges: {- format: "jsonb"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },service: {required: ["id",@@ -101249,83 +98680,6 @@ export default {},type: "object"},- workflow: {- required: [- "id",- "companyId",- "name",- "ownerId",- "active",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('wf'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- name: {- format: "text",- type: "string"- },- description: {- format: "text",- type: "string"- },- ownerId: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- active: {- default: false,- format: "boolean",- type: "boolean"- },- activeVersionId: {- format: "text",- type: "string"- },- nextRunAt: {- format: "timestamp with time zone",- type: "string"- },- canvasState: {- format: "jsonb"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },approvalRequests: {properties: {id: {@@ -101770,12 +99124,6 @@ export default {format: "text",type: "string"},- inspectionDocumentId: {- description:- "Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",- format: "text",- type: "string"- },dependencies: {format: "text[]",items: {@@ -102201,50 +99549,6 @@ export default {},type: "object"},- workflowLastRun: {- properties: {- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- workflowId: {- format: "text",- type: "string"- },- runId: {- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- status: {- format: "text",- type: "string"- },- statusReason: {- format: "text",- type: "string"- },- createdAt: {- format: "timestamp with time zone",- type: "string"- },- startedAt: {- format: "timestamp with time zone",- type: "string"- },- completedAt: {- format: "timestamp with time zone",- type: "string"- },- durationMs: {- format: "integer",- type: "integer"- }- },- type: "object"- },dimension: {required: ["id",@@ -102283,8 +99587,7 @@ export default {"FixedAssetClass","Customer","Supplier",- "Item",- "ScrapReason"+ "Item"],format: 'public."dimensionEntityType"',type: "string"@@ -104627,16 +101930,6 @@ export default {"Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",format: "text",type: "string"- },- attestedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- attestedAt: {- format: "timestamp with time zone",- type: "string"}},type: "object"@@ -104966,14 +102259,6 @@ export default {format: "numeric",type: "number"},- substitutedFromItemId: {- format: "text",- type: "string"- },- substitutionFactor: {- format: "numeric",- type: "number"- },storageUnitName: {format: "text",type: "string"@@ -107641,6 +104926,10 @@ export default {format: "numeric",type: "number"},+ productionQuantity: {+ format: "numeric",+ type: "number"+ },quantityComplete: {format: "numeric",type: "number"@@ -107761,10 +105050,6 @@ export default {format: "double precision",type: "number"},- productionQuantity: {- format: "numeric",- type: "number"- },jobMakeMethodId: {description: "Note:\nThis is a Primary Key.<pk/>",format: "text",@@ -107844,81 +105129,6 @@ export default {},type: "object"},- itemSerialSequences: {- properties: {- id: {- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- itemId: {- description:- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",- format: "text",- type: "string"- },- prefix: {- format: "text",- type: "string"- },- suffix: {- format: "text",- type: "string"- },- next: {- format: "integer",- type: "integer"- },- size: {- format: "integer",- type: "integer"- },- step: {- format: "integer",- type: "integer"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- },- itemReadableId: {- format: "text",- type: "string"- },- itemName: {- format: "text",- type: "string"- },- itemTrackingType: {- enum: ["Inventory", "Non-Inventory", "Serial", "Batch"],- format: 'public."itemTrackingType"',- type: "string"- }- },- type: "object"- },department: {required: ["id", "name", "companyId", "createdBy", "createdAt"],properties: {@@ -108344,8 +105554,7 @@ export default {"Maintenance Consumption","Non-Conformance","Inbound Inspection",- "Inventory Count",- "Scrap"+ "Inventory Count"],format: 'public."itemLedgerDocumentType"',type: "string"@@ -108413,14 +105622,7 @@ export default {type: "string"},trackedEntityStatus: {- enum: [- "Available",- "Reserved",- "On Hold",- "Consumed",- "Rejected",- "Scrapped"- ],+ enum: ["Available", "Reserved", "On Hold", "Consumed", "Rejected"],format: 'public."trackedEntityStatus"',type: "string"},@@ -108433,12 +105635,6 @@ export default {correctionOfItemLedgerId: {format: "text",type: "string"- },- scrapReasonId: {- description:- "Note:\nThis is a Foreign Key to `scrapReason.id`.<fk table='scrapReason' column='id'/>",- format: "text",- type: "string"}},type: "object"@@ -109062,8 +106258,7 @@ export default {"Settings","Users","Quality",- "Printing",- "Workflows"+ "Printing"],format: "public.module",type: "string"@@ -109438,8 +106633,7 @@ export default {"Settings","Users","Quality",- "Printing",- "Workflows"+ "Printing"],format: "public.module",type: "string"@@ -109730,10 +106924,6 @@ export default {type: "string"},type: "array"- },- code: {- format: "text",- type: "string"}},type: "object"@@ -110040,10 +107230,6 @@ export default {format: "text",type: "string"},- timezone: {- format: "text",- type: "string"- },userId: {description:"Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",@@ -111180,26 +108366,24 @@ export default {type: "object"},itemStockQuantities: {- required: ["itemId", "companyId", "locationId", "quantityOnHand"],properties: {itemId: {- description: "Note:\nThis is a Primary Key.<pk/>",+ description:+ "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",format: "text",type: "string"},companyId: {- description: "Note:\nThis is a Primary Key.<pk/>",+ description:+ "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",format: "text",type: "string"},locationId: {- default: "",- description: "Note:\nThis is a Primary Key.<pk/>",format: "text",type: "string"},quantityOnHand: {- default: 0,format: "numeric",type: "number"}@@ -112030,6 +109214,26 @@ export default {format: "text",type: "string"},+ unitPrice: {+ format: "numeric",+ type: "number"+ },+ extendedPrice: {+ format: "numeric",+ type: "number"+ },+ shippingCost: {+ format: "numeric",+ type: "number"+ },+ taxAmount: {+ format: "numeric",+ type: "number"+ },+ totalAmount: {+ format: "numeric",+ type: "number"+ },accountId: {description:"Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",@@ -112056,26 +109260,6 @@ export default {format: "double precision",type: "number"},- unitPrice: {- format: "numeric",- type: "number"- },- extendedPrice: {- format: "numeric",- type: "number"- },- shippingCost: {- format: "numeric",- type: "number"- },- taxAmount: {- format: "numeric",- type: "number"- },- totalAmount: {- format: "numeric",- type: "number"- },thumbnailPath: {format: "text",type: "string"@@ -112318,54 +109502,6 @@ export default {},type: "object"},- workflowTriggerEvent: {- required: [- "id",- "companyId",- "workflowId",- "workflowVersionId",- "eventId",- "origin",- "createdAt"- ],- properties: {- id: {- default: "public.id('wfe'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- workflowId: {- format: "text",- type: "string"- },- workflowVersionId: {- format: "text",- type: "string"- },- eventId: {- format: "text",- type: "string"- },- origin: {- default: "Both",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },externalIntegrationMapping: {required: ["id",@@ -113155,8 +110291,7 @@ export default {"Maintenance Consumption","Non-Conformance","Inbound Inspection",- "Inventory Count",- "Scrap"+ "Inventory Count"],format: 'public."itemLedgerDocumentType"',type: "string"@@ -113222,14 +110357,7 @@ export default {type: "string"},trackedEntityStatus: {- enum: [- "Available",- "Reserved",- "On Hold",- "Consumed",- "Rejected",- "Scrapped"- ],+ enum: ["Available", "Reserved", "On Hold", "Consumed", "Rejected"],format: 'public."trackedEntityStatus"',type: "string"},@@ -113243,12 +110371,6 @@ export default {format: "text",type: "string"},- scrapReasonId: {- description:- "Note:\nThis is a Foreign Key to `scrapReason.id`.<fk table='scrapReason' column='id'/>",- format: "text",- type: "string"- },isCorrection: {format: "boolean",type: "boolean"@@ -113346,13 +110468,6 @@ export default {format: "timestamp with time zone",type: "string"},- tags: {- format: "text[]",- items: {- type: "string"- },- type: "array"- },processName: {format: "text",type: "string"@@ -113722,8 +110837,7 @@ export default {"Inventory Adjustment","Inventory Count","Non-Conformance",- "Inbound Inspection",- "Scrap"+ "Inbound Inspection"],format: 'public."journalLineDocumentType"',type: "string"@@ -113842,6 +110956,10 @@ export default {format: "numeric",type: "number"},+ productionQuantity: {+ format: "numeric",+ type: "number"+ },quantityComplete: {default: 0,format: "numeric",@@ -113966,10 +111084,6 @@ export default {default: 1,format: "double precision",type: "number"- },- productionQuantity: {- format: "numeric",- type: "number"}},type: "object"@@ -114932,109 +112046,6 @@ export default {updatedAt: {format: "timestamp with time zone",type: "string"- },- rootInstructionId: {- description:- "Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",- format: "text",- type: "string"- }- },- type: "object"- },- workflowStepRun: {- required: [- "id",- "companyId",- "runId",- "sequence",- "nodeId",- "nodeType",- "itemKey",- "status",- "createdAt"- ],- properties: {- id: {- default: "public.id('wfs'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- runId: {- format: "text",- type: "string"- },- sequence: {- format: "integer",- type: "integer"- },- nodeId: {- format: "text",- type: "string"- },- nodeType: {- format: "text",- type: "string"- },- itemKey: {- default: "",- format: "text",- type: "string"- },- status: {- format: "text",- type: "string"- },- statusReason: {- format: "text",- type: "string"- },- input: {- format: "jsonb"- },- output: {- format: "jsonb"- },- branchTaken: {- format: "text",- type: "string"- },- startedAt: {- format: "timestamp with time zone",- type: "string"- },- completedAt: {- format: "timestamp with time zone",- type: "string"- },- durationMs: {- format: "integer",- type: "integer"- },- error: {- format: "text",- type: "string"- },- compactedAt: {- format: "timestamp with time zone",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- detail: {- description:- 'Diagnostics only (per-clause condition evaluation). Never node data - that is "output".',- format: "jsonb"}},type: "object"@@ -116103,7 +113114,6 @@ export default {type: "number"},taxPercent: {- default: 0,format: "numeric",type: "number"},@@ -116127,6 +113137,22 @@ export default {format: "date",type: "string"},+ unitPrice: {+ format: "numeric",+ type: "number"+ },+ extendedPrice: {+ format: "numeric",+ type: "number"+ },+ shippingCost: {+ format: "numeric",+ type: "number"+ },+ taxAmount: {+ format: "numeric",+ type: "number"+ },accountId: {description:"Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",@@ -116161,22 +113187,6 @@ export default {supplierPartId: {format: "text",type: "string"- },- unitPrice: {- format: "numeric",- type: "number"- },- extendedPrice: {- format: "numeric",- type: "number"- },- shippingCost: {- format: "numeric",- type: "number"- },- taxAmount: {- format: "numeric",- type: "number"}},type: "object"@@ -116661,12 +113671,6 @@ export default {"Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",format: "text",type: "string"- },- intercompanyPayablesAccount: {- description:- "Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",- format: "text",- type: "string"}},type: "object"@@ -117775,126 +114779,6 @@ export default {},type: "object"},- workflowRun: {- required: [- "id",- "companyId",- "workflowId",- "workflowVersionId",- "eventId",- "sourceEventId",- "ownerId",- "status",- "isTest",- "depth",- "path",- "createdAt"- ],- properties: {- id: {- default: "public.id('wfr'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- workflowId: {- format: "text",- type: "string"- },- workflowVersionId: {- format: "text",- type: "string"- },- eventId: {- format: "text",- type: "string"- },- sourceEventId: {- format: "text",- type: "string"- },- triggerTable: {- format: "text",- type: "string"- },- triggerRecordId: {- format: "text",- type: "string"- },- ownerId: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- status: {- default: "Queued",- format: "text",- type: "string"- },- statusReason: {- format: "text",- type: "string"- },- isTest: {- default: false,- format: "boolean",- type: "boolean"- },- rootRunId: {- format: "text",- type: "string"- },- causedByRunId: {- format: "text",- type: "string"- },- depth: {- default: 0,- format: "integer",- type: "integer"- },- path: {- format: "text[]",- items: {- type: "string"- },- type: "array"- },- startedAt: {- format: "timestamp with time zone",- type: "string"- },- completedAt: {- format: "timestamp with time zone",- type: "string"- },- durationMs: {- format: "integer",- type: "integer"- },- error: {- format: "text",- type: "string"- },- compactedAt: {- format: "timestamp with time zone",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },userAttribute: {required: ["id",@@ -119241,61 +116125,6 @@ export default {},type: "object"},- reportPin: {- required: [- "reportKey",- "userId",- "companyId",- "pinned",- "createdBy",- "createdAt"- ],- properties: {- reportKey: {- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- userId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- pinned: {- format: "boolean",- type: "boolean"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },storageUnit: {required: ["id",@@ -119853,7 +116682,6 @@ export default {type: "number"},taxPercent: {- default: 0,format: "numeric",type: "number"},@@ -119863,6 +116691,26 @@ export default {format: "text",type: "string"},+ unitPrice: {+ format: "numeric",+ type: "number"+ },+ extendedPrice: {+ format: "numeric",+ type: "number"+ },+ shippingCost: {+ format: "numeric",+ type: "number"+ },+ taxAmount: {+ format: "numeric",+ type: "number"+ },+ totalAmount: {+ format: "numeric",+ type: "number"+ },accountId: {description:"Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",@@ -119889,26 +116737,6 @@ export default {default: 1,format: "double precision",type: "number"- },- unitPrice: {- format: "numeric",- type: "number"- },- extendedPrice: {- format: "numeric",- type: "number"- },- shippingCost: {- format: "numeric",- type: "number"- },- taxAmount: {- format: "numeric",- type: "number"- },- totalAmount: {- format: "numeric",- type: "number"}},type: "object"@@ -120987,8 +117815,7 @@ export default {"status","companyId","createdBy",- "createdAt",- "quantityReturned"+ "createdAt"],properties: {id: {@@ -121036,6 +117863,10 @@ export default {format: "numeric",type: "number"},+ outstandingQuantity: {+ format: "numeric",+ type: "number"+ },storageUnitId: {description:"Note:\nThis is a Foreign Key to `storageUnit.id`.<fk table='storageUnit' column='id'/>",@@ -121083,15 +117914,6 @@ export default {},customFields: {format: "jsonb"- },- quantityReturned: {- default: 0,- format: "numeric",- type: "number"- },- outstandingQuantity: {- format: "numeric",- type: "number"}},type: "object"@@ -122304,104 +119126,6 @@ export default {},type: "object"},- itarCertification: {- required: [- "id",- "companyId",- "type",- "userId",- "docVersion",- "docHash",- "fullLegalName",- "certifiedAt",- "expiresAt",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('itc'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- type: {- format: "text",- type: "string"- },- userId: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- docVersion: {- format: "text",- type: "string"- },- docHash: {- format: "text",- type: "string"- },- fullLegalName: {- format: "text",- type: "string"- },- title: {- format: "text",- type: "string"- },- complianceContact: {- format: "text",- type: "string"- },- certifiedAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- ipAddress: {- format: "text",- type: "string"- },- userAgent: {- format: "text",- type: "string"- },- expiresAt: {- format: "timestamp with time zone",- type: "string"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },warehouseTransfer: {required: ["id",@@ -122590,71 +119314,6 @@ export default {},type: "object"},- reportView: {- required: [- "id",- "companyId",- "reportKey",- "name",- "config",- "visibility",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('rv'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- reportKey: {- format: "text",- type: "string"- },- name: {- format: "text",- type: "string"- },- config: {- format: "jsonb"- },- visibility: {- default: "Private",- enum: ["Private", "Company"],- format: 'public."reportViewVisibility"',- type: "string"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },companyIntegration: {required: ["id", "metadata", "companyId", "active", "updatedAt"],properties: {@@ -124654,6 +121313,18 @@ export default {format: "numeric",type: "number"},+ convertedAddOnCost: {+ format: "numeric",+ type: "number"+ },+ convertedShippingCost: {+ format: "numeric",+ type: "number"+ },+ convertedUnitPrice: {+ format: "numeric",+ type: "number"+ },sentDate: {format: "date",type: "string"@@ -124668,6 +121339,10 @@ export default {format: "numeric",type: "number"},+ convertedNonTaxableAddOnCost: {+ format: "numeric",+ type: "number"+ },pricingRuleId: {description:"Note:\nThis is a Foreign Key to `pricingRule.id`.<fk table='pricingRule' column='id'/>",@@ -124681,22 +121356,6 @@ export default {format: "double precision",type: "number"},- convertedAddOnCost: {- format: "numeric",- type: "number"- },- convertedShippingCost: {- format: "numeric",- type: "number"- },- convertedUnitPrice: {- format: "numeric",- type: "number"- },- convertedNonTaxableAddOnCost: {- format: "numeric",- type: "number"- },itemReadableId: {format: "text",type: "string"@@ -124812,14 +121471,7 @@ export default {},status: {default: "Available",- enum: [- "Available",- "Reserved",- "On Hold",- "Consumed",- "Rejected",- "Scrapped"- ],+ enum: ["Available", "Reserved", "On Hold", "Consumed", "Rejected"],format: 'public."trackedEntityStatus"',type: "string"},@@ -126301,8 +122953,7 @@ export default {"Maintenance Consumption","Non-Conformance","Inbound Inspection",- "Inventory Count",- "Scrap"+ "Inventory Count"],format: 'public."itemLedgerDocumentType"',type: "string"@@ -126508,8 +123159,7 @@ export default {"Inventory Adjustment","Inventory Count","Non-Conformance",- "Inbound Inspection",- "Scrap"+ "Inbound Inspection"],format: 'public."journalLineDocumentType"',type: "string"@@ -126688,8 +123338,7 @@ export default {"Inventory Adjustment","Inventory Count","Non-Conformance",- "Inbound Inspection",- "Scrap"+ "Inbound Inspection"],format: 'public."journalLineDocumentType"',type: "string"@@ -127526,99 +124175,6 @@ export default {},type: "object"},- assemblyInstructions: {- properties: {- id: {- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- name: {- format: "text",- type: "string"- },- modelUploadId: {- description:- "Note:\nThis is a Foreign Key to `modelUpload.id`.<fk table='modelUpload' column='id'/>",- format: "text",- type: "string"- },- itemId: {- description:- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",- format: "text",- type: "string"- },- assemblyPlanJobId: {- description:- "Note:\nThis is a Foreign Key to `assemblyPlanJob.id`.<fk table='assemblyPlanJob' column='id'/>",- format: "text",- type: "string"- },- status: {- enum: ["Draft", "Published", "Archived"],- format: 'public."assemblyInstructionStatus"',- type: "string"- },- version: {- format: "integer",- type: "integer"- },- publishedAt: {- format: "timestamp with time zone",- type: "string"- },- settings: {- format: "jsonb"- },- rootInstructionId: {- description:- "Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- customFields: {- format: "jsonb"- },- tags: {- format: "text[]",- items: {- type: "string"- },- type: "array"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- },- versions: {- format: "jsonb"- }- },- type: "object"- },dimensionValues: {properties: {dimensionId: {@@ -127645,8 +124201,7 @@ export default {"FixedAssetClass","Customer","Supplier",- "Item",- "ScrapReason"+ "Item"],format: 'public."dimensionEntityType"',type: "string"@@ -128484,18 +125039,6 @@ export default {format: "numeric",type: "number"},- categoryMarkups: {- format: "jsonb"- },- companyId: {- format: "text",- type: "string"- },- priceSource: {- default: "system",- format: "text",- type: "string"- },convertedUnitPrice: {format: "numeric",type: "number"@@ -128519,6 +125062,18 @@ export default {convertedShippingCost: {format: "numeric",type: "number"+ },+ categoryMarkups: {+ format: "jsonb"+ },+ companyId: {+ format: "text",+ type: "string"+ },+ priceSource: {+ default: "system",+ format: "text",+ type: "string"}},type: "object"@@ -129119,14 +125674,9 @@ export default {type: "number"},taxPercent: {- default: 0,format: "numeric",type: "number"},- companyId: {- format: "text",- type: "string"- },unitPrice: {format: "numeric",type: "number"@@ -129142,6 +125692,10 @@ export default {taxAmount: {format: "numeric",type: "number"+ },+ companyId: {+ format: "text",+ type: "string"}},type: "object"@@ -129292,83 +125846,6 @@ export default {},type: "object"},- itemSerialSequence: {- required: [- "id",- "companyId",- "itemId",- "next",- "size",- "step",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('iss'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- itemId: {- description:- "Note:\nThis is a Foreign Key to `item.id`.<fk table='item' column='id'/>",- format: "text",- type: "string"- },- prefix: {- format: "text",- type: "string"- },- suffix: {- format: "text",- type: "string"- },- next: {- default: 0,- format: "integer",- type: "integer"- },- size: {- default: 5,- format: "integer",- type: "integer"- },- step: {- default: 1,- format: "integer",- type: "integer"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },batchProperty: {required: ["id",@@ -130296,18 +126773,6 @@ export default {"Note:\nThis is a Foreign Key to `procedure.id`.<fk table='procedure' column='id'/>",format: "text",type: "string"- },- assemblyInstructionId: {- description:- "Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",- format: "text",- type: "string"- },- inspectionDocumentId: {- description:- "Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",- format: "text",- type: "string"}},type: "object"@@ -130522,6 +126987,18 @@ export default {format: "numeric",type: "number"},+ convertedAddOnCost: {+ format: "numeric",+ type: "number"+ },+ convertedShippingCost: {+ format: "numeric",+ type: "number"+ },+ convertedUnitPrice: {+ format: "numeric",+ type: "number"+ },sentDate: {format: "date",type: "string"@@ -130537,6 +127014,10 @@ export default {format: "numeric",type: "number"},+ convertedNonTaxableAddOnCost: {+ format: "numeric",+ type: "number"+ },pricingRuleId: {description:"Note:\nThis is a Foreign Key to `pricingRule.id`.<fk table='pricingRule' column='id'/>",@@ -130550,22 +127031,6 @@ export default {default: 1,format: "double precision",type: "number"- },- convertedAddOnCost: {- format: "numeric",- type: "number"- },- convertedShippingCost: {- format: "numeric",- type: "number"- },- convertedUnitPrice: {- format: "numeric",- type: "number"- },- convertedNonTaxableAddOnCost: {- format: "numeric",- type: "number"}},type: "object"@@ -130597,8 +127062,7 @@ export default {"suggestionNotificationGroup","auditLogEnabled","isEliminationEntity",- "active",- "timezone"+ "active"],properties: {id: {@@ -130762,11 +127226,6 @@ export default {registrationNumber: {format: "text",type: "string"- },- timezone: {- default: "UTC",- format: "text",- type: "string"}},type: "object"@@ -132108,8 +128567,7 @@ export default {"Settings","Users","Quality",- "Printing",- "Workflows"+ "Printing"],format: "public.module",type: "string"@@ -133222,6 +129680,22 @@ export default {format: "date",type: "string"},+ unitPrice: {+ format: "numeric",+ type: "number"+ },+ extendedPrice: {+ format: "numeric",+ type: "number"+ },+ shippingCost: {+ format: "numeric",+ type: "number"+ },+ taxAmount: {+ format: "numeric",+ type: "number"+ },accountId: {description:"Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",@@ -133256,22 +129730,6 @@ export default {format: "text",type: "string"},- unitPrice: {- format: "numeric",- type: "number"- },- extendedPrice: {- format: "numeric",- type: "number"- },- shippingCost: {- format: "numeric",- type: "number"- },- taxAmount: {- format: "numeric",- type: "number"- },supplierPartIdFromSupplier: {format: "text",type: "string"@@ -134432,125 +130890,6 @@ export default {},type: "object"},- accountingSyncTieOut: {- required: [- "id",- "companyId",- "integration",- "accountingPeriodId",- "accountId",- "carbonPostedAmount",- "syncedAmount",- "docBackedAmount",- "excludedAmount",- "pendingAmount",- "blockedAmount",- "internalDelta",- "computedAt",- "createdBy",- "createdAt"- ],- properties: {- id: {- default: "public.id('tieout'::text)",- description: "Note:\nThis is a Primary Key.<pk/>",- format: "text",- type: "string"- },- companyId: {- description:- "Note:\nThis is a Primary Key.<pk/>\nThis is a Foreign Key to `company.id`.<fk table='company' column='id'/>",- format: "text",- type: "string"- },- integration: {- format: "text",- type: "string"- },- accountingPeriodId: {- description:- "Note:\nThis is a Foreign Key to `accountingPeriod.id`.<fk table='accountingPeriod' column='id'/>",- format: "text",- type: "string"- },- accountId: {- description:- "Note:\nThis is a Foreign Key to `account.id`.<fk table='account' column='id'/>",- format: "text",- type: "string"- },- carbonPostedAmount: {- default: 0,- format: "numeric",- type: "number"- },- syncedAmount: {- default: 0,- format: "numeric",- type: "number"- },- docBackedAmount: {- default: 0,- format: "numeric",- type: "number"- },- excludedAmount: {- default: 0,- format: "numeric",- type: "number"- },- pendingAmount: {- default: 0,- format: "numeric",- type: "number"- },- blockedAmount: {- default: 0,- format: "numeric",- type: "number"- },- providerAmount: {- format: "numeric",- type: "number"- },- internalDelta: {- default: 0,- format: "numeric",- type: "number"- },- externalDelta: {- format: "numeric",- type: "number"- },- computedAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- createdBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- createdAt: {- default: "now()",- format: "timestamp with time zone",- type: "string"- },- updatedBy: {- description:- "Note:\nThis is a Foreign Key to `user.id`.<fk table='user' column='id'/>",- format: "text",- type: "string"- },- updatedAt: {- format: "timestamp with time zone",- type: "string"- }- },- type: "object"- },fixedAsset: {required: ["id",@@ -135794,12 +132133,6 @@ export default {"Note:\nThis is a Foreign Key to `assemblyInstruction.id`.<fk table='assemblyInstruction' column='id'/>",format: "text",type: "string"- },- inspectionDocumentId: {- description:- "Note:\nThis is a Foreign Key to `inspectionDocument.id`.<fk table='inspectionDocument' column='id'/>",- format: "text",- type: "string"}},type: "object"@@ -136721,19 +133054,6 @@ export default {configuration: {format: "jsonb"},- pricingRuleId: {- description:- "Note:\nThis is a Foreign Key to `pricingRule.id`.<fk table='pricingRule' column='id'/>",- format: "text",- type: "string"- },- priceTrace: {- format: "jsonb"- },- sortOrder: {- format: "double precision",- type: "number"- },itemReadableId: {format: "text",type: "string"@@ -139178,8 +135498,7 @@ export default {"Settings","Users","Quality",- "Printing",- "Workflows"+ "Printing"],format: "public.module",type: "string"@@ -139242,6 +135561,8 @@ export default {"gaugeCalibrationExpiredNotificationGroup","purchasePriceUpdateTiming","supplierQuoteNotificationGroup",+ "maintenanceGenerateInAdvance",+ "maintenanceAdvanceDays","qualityIssueTarget","consoleEnabled","timeCardEnabled",@@ -139256,11 +135577,7 @@ export default {"autoStartOperationTimer","plmReleaseControl","autoSelectMaterialWithoutPickingList",- "incompletePickingListPolicy",- "includeMaterialsOnTraveler",- "returnPickedMaterialTiming",- "showCurrencyTrailingZeros",- "requireMfa"+ "incompletePickingListPolicy"],properties: {id: {@@ -139353,6 +135670,16 @@ export default {},type: "array"},+ maintenanceGenerateInAdvance: {+ default: true,+ format: "boolean",+ type: "boolean"+ },+ maintenanceAdvanceDays: {+ default: 3,+ format: "integer",+ type: "integer"+ },maintenanceDispatchNotificationGroup: {format: "text[]",items: {@@ -139496,26 +135823,6 @@ export default {default: "warn",format: "text",type: "string"- },- includeMaterialsOnTraveler: {- default: false,- format: "boolean",- type: "boolean"- },- returnPickedMaterialTiming: {- default: "job",- format: "text",- type: "string"- },- showCurrencyTrailingZeros: {- default: true,- format: "boolean",- type: "boolean"- },- requireMfa: {- default: false,- format: "boolean",- type: "boolean"}},type: "object"@@ -139702,8 +136009,7 @@ export default {"Settings","Users","Quality",- "Printing",- "Workflows"+ "Printing"],format: "public.module",type: "string"@@ -140570,81 +136876,6 @@ export default {in: "query",type: "string"},- "body.workflowVersion": {- name: "workflowVersion",- description: "workflowVersion",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflowVersion"- }- },- "rowFilter.workflowVersion.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.workflowId": {- name: "workflowId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.versionNumber": {- name: "versionNumber",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.formatVersion": {- name: "formatVersion",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.nodes": {- name: "nodes",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.edges": {- name: "edges",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowVersion.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.service": {name: "service",description: "service",@@ -143069,93 +139300,6 @@ export default {in: "query",type: "string"},- "body.workflow": {- name: "workflow",- description: "workflow",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflow"- }- },- "rowFilter.workflow.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.name": {- name: "name",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.description": {- name: "description",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.ownerId": {- name: "ownerId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.active": {- name: "active",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.activeVersionId": {- name: "activeVersionId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.nextRunAt": {- name: "nextRunAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.canvasState": {- name: "canvasState",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflow.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.approvalRequests": {name: "approvalRequests",description: "approvalRequests",@@ -143672,12 +139816,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobOperationsWithDependencies.inspectionDocumentId": {- name: "inspectionDocumentId",- required: false,- in: "query",- type: "string"- },"rowFilter.jobOperationsWithDependencies.dependencies": {name: "dependencies",required: false,@@ -144137,69 +140275,6 @@ export default {in: "query",type: "string"},- "body.workflowLastRun": {- name: "workflowLastRun",- description: "workflowLastRun",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflowLastRun"- }- },- "rowFilter.workflowLastRun.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.workflowId": {- name: "workflowId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.runId": {- name: "runId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.status": {- name: "status",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.statusReason": {- name: "statusReason",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.startedAt": {- name: "startedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.completedAt": {- name: "completedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowLastRun.durationMs": {- name: "durationMs",- required: false,- in: "query",- type: "string"- },"body.dimension": {name: "dimension",description: "dimension",@@ -146761,18 +142836,6 @@ export default {in: "query",type: "string"},- "rowFilter.invite.attestedBy": {- name: "attestedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.invite.attestedAt": {- name: "attestedAt",- required: false,- in: "query",- type: "string"- },"body.partners": {name: "partners",description: "partners",@@ -147172,18 +143235,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobMaterialWithMakeMethodId.substitutedFromItemId": {- name: "substitutedFromItemId",- required: false,- in: "query",- type: "string"- },- "rowFilter.jobMaterialWithMakeMethodId.substitutionFactor": {- name: "substitutionFactor",- required: false,- in: "query",- type: "string"- },"rowFilter.jobMaterialWithMakeMethodId.storageUnitName": {name: "storageUnitName",required: false,@@ -150223,6 +146274,12 @@ export default {in: "query",type: "string"},+ "rowFilter.jobs.productionQuantity": {+ name: "productionQuantity",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.jobs.quantityComplete": {name: "quantityComplete",required: false,@@ -150379,12 +146436,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobs.productionQuantity": {- name: "productionQuantity",- required: false,- in: "query",- type: "string"- },"rowFilter.jobs.jobMakeMethodId": {name: "jobMakeMethodId",required: false,@@ -150481,105 +146532,6 @@ export default {in: "query",type: "string"},- "body.itemSerialSequences": {- name: "itemSerialSequences",- description: "itemSerialSequences",- required: false,- in: "body",- schema: {- $ref: "#/definitions/itemSerialSequences"- }- },- "rowFilter.itemSerialSequences.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.itemId": {- name: "itemId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.prefix": {- name: "prefix",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.suffix": {- name: "suffix",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.next": {- name: "next",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.size": {- name: "size",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.step": {- name: "step",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.itemReadableId": {- name: "itemReadableId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.itemName": {- name: "itemName",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequences.itemTrackingType": {- name: "itemTrackingType",- required: false,- in: "query",- type: "string"- },"body.department": {name: "department",description: "department",@@ -151153,12 +147105,6 @@ export default {in: "query",type: "string"},- "rowFilter.itemLedger.scrapReasonId": {- name: "scrapReasonId",- required: false,- in: "query",- type: "string"- },"body.shippingTerm": {name: "shippingTerm",description: "shippingTerm",@@ -152563,12 +148509,6 @@ export default {in: "query",type: "string"},- "rowFilter.location.code": {- name: "code",- required: false,- in: "query",- type: "string"- },"body.kanbans": {name: "kanbans",description: "kanbans",@@ -152974,12 +148914,6 @@ export default {in: "query",type: "string"},- "rowFilter.companies.timezone": {- name: "timezone",- required: false,- in: "query",- type: "string"- },"rowFilter.companies.userId": {name: "userId",required: false,@@ -155163,62 +151097,62 @@ export default {in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.accountId": {- name: "accountId",+ "rowFilter.purchaseInvoiceLines.unitPrice": {+ name: "unitPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.costCenterId": {- name: "costCenterId",+ "rowFilter.purchaseInvoiceLines.extendedPrice": {+ name: "extendedPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.requiredDate": {- name: "requiredDate",+ "rowFilter.purchaseInvoiceLines.shippingCost": {+ name: "shippingCost",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.ownerId": {- name: "ownerId",+ "rowFilter.purchaseInvoiceLines.taxAmount": {+ name: "taxAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.sortOrder": {- name: "sortOrder",+ "rowFilter.purchaseInvoiceLines.totalAmount": {+ name: "totalAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.unitPrice": {- name: "unitPrice",+ "rowFilter.purchaseInvoiceLines.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.extendedPrice": {- name: "extendedPrice",+ "rowFilter.purchaseInvoiceLines.costCenterId": {+ name: "costCenterId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.shippingCost": {- name: "shippingCost",+ "rowFilter.purchaseInvoiceLines.requiredDate": {+ name: "requiredDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.taxAmount": {- name: "taxAmount",+ "rowFilter.purchaseInvoiceLines.ownerId": {+ name: "ownerId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLines.totalAmount": {- name: "totalAmount",+ "rowFilter.purchaseInvoiceLines.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"@@ -155508,57 +151442,6 @@ export default {in: "query",type: "string"},- "body.workflowTriggerEvent": {- name: "workflowTriggerEvent",- description: "workflowTriggerEvent",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflowTriggerEvent"- }- },- "rowFilter.workflowTriggerEvent.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.workflowId": {- name: "workflowId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.workflowVersionId": {- name: "workflowVersionId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.eventId": {- name: "eventId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.origin": {- name: "origin",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowTriggerEvent.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },"body.externalIntegrationMapping": {name: "externalIntegrationMapping",description: "externalIntegrationMapping",@@ -156555,12 +152438,6 @@ export default {in: "query",type: "string"},- "rowFilter.itemLedgers.scrapReasonId": {- name: "scrapReasonId",- required: false,- in: "query",- type: "string"- },"rowFilter.itemLedgers.isCorrection": {name: "isCorrection",required: false,@@ -156684,12 +152561,6 @@ export default {in: "query",type: "string"},- "rowFilter.supplierProcesses.tags": {- name: "tags",- required: false,- in: "query",- type: "string"- },"rowFilter.supplierProcesses.processName": {name: "processName",required: false,@@ -157173,6 +153044,12 @@ export default {in: "query",type: "string"},+ "rowFilter.job.productionQuantity": {+ name: "productionQuantity",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.job.quantityComplete": {name: "quantityComplete",required: false,@@ -157329,12 +153206,6 @@ export default {in: "query",type: "string"},- "rowFilter.job.productionQuantity": {- name: "productionQuantity",- required: false,- in: "query",- type: "string"- },"body.changeOrderAffectedItem": {name: "changeOrderAffectedItem",description: "changeOrderAffectedItem",@@ -158389,137 +154260,6 @@ export default {in: "query",type: "string"},- "rowFilter.assemblyInstruction.rootInstructionId": {- name: "rootInstructionId",- required: false,- in: "query",- type: "string"- },- "body.workflowStepRun": {- name: "workflowStepRun",- description: "workflowStepRun",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflowStepRun"- }- },- "rowFilter.workflowStepRun.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.runId": {- name: "runId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.sequence": {- name: "sequence",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.nodeId": {- name: "nodeId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.nodeType": {- name: "nodeType",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.itemKey": {- name: "itemKey",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.status": {- name: "status",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.statusReason": {- name: "statusReason",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.input": {- name: "input",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.output": {- name: "output",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.branchTaken": {- name: "branchTaken",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.startedAt": {- name: "startedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.completedAt": {- name: "completedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.durationMs": {- name: "durationMs",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.error": {- name: "error",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.compactedAt": {- name: "compactedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowStepRun.detail": {- name: "detail",- description:- 'Diagnostics only (per-clause condition evaluation). Never node data - that is "output".',- required: false,- in: "query",- type: "string"- },"body.purchaseOrderStatusHistory": {name: "purchaseOrderStatusHistory",description: "purchaseOrderStatusHistory",@@ -159732,68 +155472,68 @@ export default {in: "query",type: "string"},- "rowFilter.purchaseOrderLine.accountId": {- name: "accountId",+ "rowFilter.purchaseOrderLine.unitPrice": {+ name: "unitPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.requiredDate": {- name: "requiredDate",+ "rowFilter.purchaseOrderLine.extendedPrice": {+ name: "extendedPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.receivedDate": {- name: "receivedDate",+ "rowFilter.purchaseOrderLine.shippingCost": {+ name: "shippingCost",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.costCenterId": {- name: "costCenterId",+ "rowFilter.purchaseOrderLine.taxAmount": {+ name: "taxAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.ownerId": {- name: "ownerId",+ "rowFilter.purchaseOrderLine.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.sortOrder": {- name: "sortOrder",+ "rowFilter.purchaseOrderLine.requiredDate": {+ name: "requiredDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.supplierPartId": {- name: "supplierPartId",+ "rowFilter.purchaseOrderLine.receivedDate": {+ name: "receivedDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.unitPrice": {- name: "unitPrice",+ "rowFilter.purchaseOrderLine.costCenterId": {+ name: "costCenterId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.extendedPrice": {- name: "extendedPrice",+ "rowFilter.purchaseOrderLine.ownerId": {+ name: "ownerId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.shippingCost": {- name: "shippingCost",+ "rowFilter.purchaseOrderLine.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLine.taxAmount": {- name: "taxAmount",+ "rowFilter.purchaseOrderLine.supplierPartId": {+ name: "supplierPartId",required: false,in: "query",type: "string"@@ -160272,12 +156012,6 @@ export default {in: "query",type: "string"},- "rowFilter.accountDefault.intercompanyPayablesAccount": {- name: "intercompanyPayablesAccount",- required: false,- in: "query",- type: "string"- },"body.warehouse": {name: "warehouse",description: "warehouse",@@ -161484,147 +157218,6 @@ export default {in: "query",type: "string"},- "body.workflowRun": {- name: "workflowRun",- description: "workflowRun",- required: false,- in: "body",- schema: {- $ref: "#/definitions/workflowRun"- }- },- "rowFilter.workflowRun.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.workflowId": {- name: "workflowId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.workflowVersionId": {- name: "workflowVersionId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.eventId": {- name: "eventId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.sourceEventId": {- name: "sourceEventId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.triggerTable": {- name: "triggerTable",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.triggerRecordId": {- name: "triggerRecordId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.ownerId": {- name: "ownerId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.status": {- name: "status",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.statusReason": {- name: "statusReason",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.isTest": {- name: "isTest",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.rootRunId": {- name: "rootRunId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.causedByRunId": {- name: "causedByRunId",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.depth": {- name: "depth",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.path": {- name: "path",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.startedAt": {- name: "startedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.completedAt": {- name: "completedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.durationMs": {- name: "durationMs",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.error": {- name: "error",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.compactedAt": {- name: "compactedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.workflowRun.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },"body.userAttribute": {name: "userAttribute",description: "userAttribute",@@ -163022,63 +158615,6 @@ export default {in: "query",type: "string"},- "body.reportPin": {- name: "reportPin",- description: "reportPin",- required: false,- in: "body",- schema: {- $ref: "#/definitions/reportPin"- }- },- "rowFilter.reportPin.reportKey": {- name: "reportKey",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.userId": {- name: "userId",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.pinned": {- name: "pinned",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportPin.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.storageUnit": {name: "storageUnit",description: "storageUnit",@@ -163712,62 +159248,62 @@ export default {in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.accountId": {- name: "accountId",+ "rowFilter.purchaseInvoiceLine.unitPrice": {+ name: "unitPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.costCenterId": {- name: "costCenterId",+ "rowFilter.purchaseInvoiceLine.extendedPrice": {+ name: "extendedPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.requiredDate": {- name: "requiredDate",+ "rowFilter.purchaseInvoiceLine.shippingCost": {+ name: "shippingCost",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.ownerId": {- name: "ownerId",+ "rowFilter.purchaseInvoiceLine.taxAmount": {+ name: "taxAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.sortOrder": {- name: "sortOrder",+ "rowFilter.purchaseInvoiceLine.totalAmount": {+ name: "totalAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.unitPrice": {- name: "unitPrice",+ "rowFilter.purchaseInvoiceLine.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.extendedPrice": {- name: "extendedPrice",+ "rowFilter.purchaseInvoiceLine.costCenterId": {+ name: "costCenterId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.shippingCost": {- name: "shippingCost",+ "rowFilter.purchaseInvoiceLine.requiredDate": {+ name: "requiredDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.taxAmount": {- name: "taxAmount",+ "rowFilter.purchaseInvoiceLine.ownerId": {+ name: "ownerId",required: false,in: "query",type: "string"},- "rowFilter.purchaseInvoiceLine.totalAmount": {- name: "totalAmount",+ "rowFilter.purchaseInvoiceLine.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"@@ -165119,6 +160655,12 @@ export default {in: "query",type: "string"},+ "rowFilter.pickingListLine.outstandingQuantity": {+ name: "outstandingQuantity",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.pickingListLine.storageUnitId": {name: "storageUnitId",required: false,@@ -165173,18 +160715,6 @@ export default {in: "query",type: "string"},- "rowFilter.pickingListLine.quantityReturned": {- name: "quantityReturned",- required: false,- in: "query",- type: "string"- },- "rowFilter.pickingListLine.outstandingQuantity": {- name: "outstandingQuantity",- required: false,- in: "query",- type: "string"- },"body.storageType": {name: "storageType",description: "storageType",@@ -166538,117 +162068,6 @@ export default {in: "query",type: "string"},- "body.itarCertification": {- name: "itarCertification",- description: "itarCertification",- required: false,- in: "body",- schema: {- $ref: "#/definitions/itarCertification"- }- },- "rowFilter.itarCertification.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.type": {- name: "type",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.userId": {- name: "userId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.docVersion": {- name: "docVersion",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.docHash": {- name: "docHash",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.fullLegalName": {- name: "fullLegalName",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.title": {- name: "title",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.complianceContact": {- name: "complianceContact",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.certifiedAt": {- name: "certifiedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.ipAddress": {- name: "ipAddress",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.userAgent": {- name: "userAgent",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.expiresAt": {- name: "expiresAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itarCertification.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.warehouseTransfer": {name: "warehouseTransfer",description: "warehouseTransfer",@@ -166847,75 +162266,6 @@ export default {in: "query",type: "string"},- "body.reportView": {- name: "reportView",- description: "reportView",- required: false,- in: "body",- schema: {- $ref: "#/definitions/reportView"- }- },- "rowFilter.reportView.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.reportKey": {- name: "reportKey",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.name": {- name: "name",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.config": {- name: "config",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.visibility": {- name: "visibility",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.reportView.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.companyIntegration": {name: "companyIntegration",description: "companyIntegration",@@ -169116,62 +164466,62 @@ export default {in: "query",type: "string"},- "rowFilter.salesOrderLines.sentDate": {- name: "sentDate",+ "rowFilter.salesOrderLines.convertedAddOnCost": {+ name: "convertedAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.accountId": {- name: "accountId",+ "rowFilter.salesOrderLines.convertedShippingCost": {+ name: "convertedShippingCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.nonTaxableAddOnCost": {- name: "nonTaxableAddOnCost",+ "rowFilter.salesOrderLines.convertedUnitPrice": {+ name: "convertedUnitPrice",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.pricingRuleId": {- name: "pricingRuleId",+ "rowFilter.salesOrderLines.sentDate": {+ name: "sentDate",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.priceTrace": {- name: "priceTrace",+ "rowFilter.salesOrderLines.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.sortOrder": {- name: "sortOrder",+ "rowFilter.salesOrderLines.nonTaxableAddOnCost": {+ name: "nonTaxableAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.convertedAddOnCost": {- name: "convertedAddOnCost",+ "rowFilter.salesOrderLines.convertedNonTaxableAddOnCost": {+ name: "convertedNonTaxableAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.convertedShippingCost": {- name: "convertedShippingCost",+ "rowFilter.salesOrderLines.pricingRuleId": {+ name: "pricingRuleId",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.convertedUnitPrice": {- name: "convertedUnitPrice",+ "rowFilter.salesOrderLines.priceTrace": {+ name: "priceTrace",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLines.convertedNonTaxableAddOnCost": {- name: "convertedNonTaxableAddOnCost",+ "rowFilter.salesOrderLines.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"@@ -172382,123 +167732,6 @@ export default {in: "query",type: "string"},- "body.assemblyInstructions": {- name: "assemblyInstructions",- description: "assemblyInstructions",- required: false,- in: "body",- schema: {- $ref: "#/definitions/assemblyInstructions"- }- },- "rowFilter.assemblyInstructions.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.name": {- name: "name",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.modelUploadId": {- name: "modelUploadId",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.itemId": {- name: "itemId",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.assemblyPlanJobId": {- name: "assemblyPlanJobId",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.status": {- name: "status",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.version": {- name: "version",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.publishedAt": {- name: "publishedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.settings": {- name: "settings",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.rootInstructionId": {- name: "rootInstructionId",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.customFields": {- name: "customFields",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.tags": {- name: "tags",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.assemblyInstructions.versions": {- name: "versions",- required: false,- in: "query",- type: "string"- },"body.dimensionValues": {name: "dimensionValues",description: "dimensionValues",@@ -173486,24 +168719,6 @@ export default {in: "query",type: "string"},- "rowFilter.quoteLinePrice.categoryMarkups": {- name: "categoryMarkups",- required: false,- in: "query",- type: "string"- },- "rowFilter.quoteLinePrice.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.quoteLinePrice.priceSource": {- name: "priceSource",- required: false,- in: "query",- type: "string"- },"rowFilter.quoteLinePrice.convertedUnitPrice": {name: "convertedUnitPrice",required: false,@@ -173540,6 +168755,24 @@ export default {in: "query",type: "string"},+ "rowFilter.quoteLinePrice.categoryMarkups": {+ name: "categoryMarkups",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.quoteLinePrice.companyId": {+ name: "companyId",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.quoteLinePrice.priceSource": {+ name: "priceSource",+ required: false,+ in: "query",+ type: "string"+ },"body.attributeDataType": {name: "attributeDataType",description: "attributeDataType",@@ -174139,12 +169372,6 @@ export default {in: "query",type: "string"},- "rowFilter.supplierQuoteLinePrice.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },"rowFilter.supplierQuoteLinePrice.unitPrice": {name: "unitPrice",required: false,@@ -174169,6 +169396,12 @@ export default {in: "query",type: "string"},+ "rowFilter.supplierQuoteLinePrice.companyId": {+ name: "companyId",+ required: false,+ in: "query",+ type: "string"+ },"body.purchaseOrderSuppliers": {name: "purchaseOrderSuppliers",description: "purchaseOrderSuppliers",@@ -174322,87 +169555,6 @@ export default {in: "query",type: "string"},- "body.itemSerialSequence": {- name: "itemSerialSequence",- description: "itemSerialSequence",- required: false,- in: "body",- schema: {- $ref: "#/definitions/itemSerialSequence"- }- },- "rowFilter.itemSerialSequence.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.itemId": {- name: "itemId",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.prefix": {- name: "prefix",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.suffix": {- name: "suffix",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.next": {- name: "next",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.size": {- name: "size",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.step": {- name: "step",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.itemSerialSequence.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.batchProperty": {name: "batchProperty",description: "batchProperty",@@ -175432,18 +170584,6 @@ export default {in: "query",type: "string"},- "rowFilter.quoteOperationsWithMakeMethods.assemblyInstructionId": {- name: "assemblyInstructionId",- required: false,- in: "query",- type: "string"- },- "rowFilter.quoteOperationsWithMakeMethods.inspectionDocumentId": {- name: "inspectionDocumentId",- required: false,- in: "query",- type: "string"- },"body.config": {name: "config",description: "config",@@ -175684,62 +170824,62 @@ export default {in: "query",type: "string"},- "rowFilter.salesOrderLine.sentDate": {- name: "sentDate",+ "rowFilter.salesOrderLine.convertedAddOnCost": {+ name: "convertedAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.accountId": {- name: "accountId",+ "rowFilter.salesOrderLine.convertedShippingCost": {+ name: "convertedShippingCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.nonTaxableAddOnCost": {- name: "nonTaxableAddOnCost",+ "rowFilter.salesOrderLine.convertedUnitPrice": {+ name: "convertedUnitPrice",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.pricingRuleId": {- name: "pricingRuleId",+ "rowFilter.salesOrderLine.sentDate": {+ name: "sentDate",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.priceTrace": {- name: "priceTrace",+ "rowFilter.salesOrderLine.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.sortOrder": {- name: "sortOrder",+ "rowFilter.salesOrderLine.nonTaxableAddOnCost": {+ name: "nonTaxableAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.convertedAddOnCost": {- name: "convertedAddOnCost",+ "rowFilter.salesOrderLine.convertedNonTaxableAddOnCost": {+ name: "convertedNonTaxableAddOnCost",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.convertedShippingCost": {- name: "convertedShippingCost",+ "rowFilter.salesOrderLine.pricingRuleId": {+ name: "pricingRuleId",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.convertedUnitPrice": {- name: "convertedUnitPrice",+ "rowFilter.salesOrderLine.priceTrace": {+ name: "priceTrace",required: false,in: "query",type: "string"},- "rowFilter.salesOrderLine.convertedNonTaxableAddOnCost": {- name: "convertedNonTaxableAddOnCost",+ "rowFilter.salesOrderLine.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"@@ -175984,12 +171124,6 @@ export default {in: "query",type: "string"},- "rowFilter.company.timezone": {- name: "timezone",- required: false,- in: "query",- type: "string"- },"body.documentTemplate": {name: "documentTemplate",description: "documentTemplate",@@ -178717,68 +173851,68 @@ export default {in: "query",type: "string"},- "rowFilter.purchaseOrderLines.accountId": {- name: "accountId",+ "rowFilter.purchaseOrderLines.unitPrice": {+ name: "unitPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.requiredDate": {- name: "requiredDate",+ "rowFilter.purchaseOrderLines.extendedPrice": {+ name: "extendedPrice",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.receivedDate": {- name: "receivedDate",+ "rowFilter.purchaseOrderLines.shippingCost": {+ name: "shippingCost",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.costCenterId": {- name: "costCenterId",+ "rowFilter.purchaseOrderLines.taxAmount": {+ name: "taxAmount",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.ownerId": {- name: "ownerId",+ "rowFilter.purchaseOrderLines.accountId": {+ name: "accountId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.sortOrder": {- name: "sortOrder",+ "rowFilter.purchaseOrderLines.requiredDate": {+ name: "requiredDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.supplierPartId": {- name: "supplierPartId",+ "rowFilter.purchaseOrderLines.receivedDate": {+ name: "receivedDate",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.unitPrice": {- name: "unitPrice",+ "rowFilter.purchaseOrderLines.costCenterId": {+ name: "costCenterId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.extendedPrice": {- name: "extendedPrice",+ "rowFilter.purchaseOrderLines.ownerId": {+ name: "ownerId",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.shippingCost": {- name: "shippingCost",+ "rowFilter.purchaseOrderLines.sortOrder": {+ name: "sortOrder",required: false,in: "query",type: "string"},- "rowFilter.purchaseOrderLines.taxAmount": {- name: "taxAmount",+ "rowFilter.purchaseOrderLines.supplierPartId": {+ name: "supplierPartId",required: false,in: "query",type: "string"@@ -180091,129 +175225,6 @@ export default {in: "query",type: "string"},- "body.accountingSyncTieOut": {- name: "accountingSyncTieOut",- description: "accountingSyncTieOut",- required: false,- in: "body",- schema: {- $ref: "#/definitions/accountingSyncTieOut"- }- },- "rowFilter.accountingSyncTieOut.id": {- name: "id",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.companyId": {- name: "companyId",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.integration": {- name: "integration",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.accountingPeriodId": {- name: "accountingPeriodId",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.accountId": {- name: "accountId",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.carbonPostedAmount": {- name: "carbonPostedAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.syncedAmount": {- name: "syncedAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.docBackedAmount": {- name: "docBackedAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.excludedAmount": {- name: "excludedAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.pendingAmount": {- name: "pendingAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.blockedAmount": {- name: "blockedAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.providerAmount": {- name: "providerAmount",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.internalDelta": {- name: "internalDelta",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.externalDelta": {- name: "externalDelta",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.computedAt": {- name: "computedAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.createdBy": {- name: "createdBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.createdAt": {- name: "createdAt",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.updatedBy": {- name: "updatedBy",- required: false,- in: "query",- type: "string"- },- "rowFilter.accountingSyncTieOut.updatedAt": {- name: "updatedAt",- required: false,- in: "query",- type: "string"- },"body.fixedAsset": {name: "fixedAsset",description: "fixedAsset",@@ -181609,12 +176620,6 @@ export default {in: "query",type: "string"},- "rowFilter.jobOperationsWithMakeMethods.inspectionDocumentId": {- name: "inspectionDocumentId",- required: false,- in: "query",- type: "string"- },"body.supplierLedger": {name: "supplierLedger",description: "supplierLedger",@@ -182692,24 +177697,6 @@ export default {in: "query",type: "string"},- "rowFilter.quoteLinePrices.pricingRuleId": {- name: "pricingRuleId",- required: false,- in: "query",- type: "string"- },- "rowFilter.quoteLinePrices.priceTrace": {- name: "priceTrace",- required: false,- in: "query",- type: "string"- },- "rowFilter.quoteLinePrices.sortOrder": {- name: "sortOrder",- required: false,- in: "query",- type: "string"- },"rowFilter.quoteLinePrices.itemReadableId": {name: "itemReadableId",required: false,@@ -185506,6 +180493,18 @@ export default {in: "query",type: "string"},+ "rowFilter.companySettings.maintenanceGenerateInAdvance": {+ name: "maintenanceGenerateInAdvance",+ required: false,+ in: "query",+ type: "string"+ },+ "rowFilter.companySettings.maintenanceAdvanceDays": {+ name: "maintenanceAdvanceDays",+ required: false,+ in: "query",+ type: "string"+ },"rowFilter.companySettings.maintenanceDispatchNotificationGroup": {name: "maintenanceDispatchNotificationGroup",required: false,@@ -185674,30 +180673,6 @@ export default {in: "query",type: "string"},- "rowFilter.companySettings.includeMaterialsOnTraveler": {- name: "includeMaterialsOnTraveler",- required: false,- in: "query",- type: "string"- },- "rowFilter.companySettings.returnPickedMaterialTiming": {- name: "returnPickedMaterialTiming",- required: false,- in: "query",- type: "string"- },- "rowFilter.companySettings.showCurrencyTrailingZeros": {- name: "showCurrencyTrailingZeros",- required: false,- in: "query",- type: "string"- },- "rowFilter.companySettings.requireMfa": {- name: "requireMfa",- required: false,- in: "query",- type: "string"- },"body.part": {name: "part",description: "part",diff --git a/packages/database/src/types.ts b/packages/database/src/types.tsindex 009c1f9d80..80c020eb45 100644--- a/packages/database/src/types.ts+++ b/packages/database/src/types.ts@@ -6948,6 +6948,7 @@ export type Database = {companyId: stringid: stringmetadata: Json+ secretRef: string | nullupdatedAt: stringupdatedBy: string | null}@@ -6956,6 +6957,7 @@ export type Database = {companyId: stringid: stringmetadata?: Json+ secretRef?: string | nullupdatedAt?: stringupdatedBy?: string | null}@@ -6964,6 +6966,7 @@ export type Database = {companyId?: stringid?: stringmetadata?: Json+ secretRef?: string | nullupdatedAt?: stringupdatedBy?: string | null}@@ -71929,7 +71932,7 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -71943,7 +71946,7 @@ export type Database = {},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -75858,6 +75861,10 @@ export type Database = {netChange: number}[]}+ attach_audit_log_append_only: {+ Args: { p_table_name: string }+ Returns: undefined+ }attach_event_trigger: {Args: {after_sync_functions?: string[]@@ -76007,6 +76014,10 @@ export type Database = {}Returns: undefined}+ delete_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string }+ Returns: undefined+ }delete_old_audit_logs: {Args: { p_company_id: string; p_cutoff_date: string }Returns: number@@ -76529,6 +76540,10 @@ export type Database = {targetTable: string}[]}+ get_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string }+ Returns: Json+ }get_inventory_quantities: {Args: { company_id: string; item_id?: string; location_id: string }Returns: {@@ -77879,7 +77894,7 @@ export type Database = {Args: { p_company_id: string; p_entries: Json[] }Returns: number}- is_claims_admin: { Args: never; Returns: boolean }+ is_claims_admin: { Args: { company: string }; Returns: boolean }is_last_job_operation: {Args: { operation_id: string }Returns: boolean@@ -78457,6 +78472,10 @@ export type Database = {}Returns: undefined}+ upsert_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string; p_secret: Json }+ Returns: string+ }upsert_to_search_index: {Args: {p_company_id: stringdiff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.tsindex 009c1f9d80..80c020eb45 100644--- a/packages/database/supabase/functions/lib/types.ts+++ b/packages/database/supabase/functions/lib/types.ts@@ -6948,6 +6948,7 @@ export type Database = {companyId: stringid: stringmetadata: Json+ secretRef: string | nullupdatedAt: stringupdatedBy: string | null}@@ -6956,6 +6957,7 @@ export type Database = {companyId: stringid: stringmetadata?: Json+ secretRef?: string | nullupdatedAt?: stringupdatedBy?: string | null}@@ -6964,6 +6966,7 @@ export type Database = {companyId?: stringid?: stringmetadata?: Json+ secretRef?: string | nullupdatedAt?: stringupdatedBy?: string | null}@@ -71929,7 +71932,7 @@ export type Database = {Relationships: [{foreignKeyName: "address_countryCode_fkey"- columns: ["invoiceCountryCode"]+ columns: ["customerCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -71943,7 +71946,7 @@ export type Database = {},{foreignKeyName: "address_countryCode_fkey"- columns: ["customerCountryCode"]+ columns: ["invoiceCountryCode"]isOneToOne: falsereferencedRelation: "country"referencedColumns: ["alpha2"]@@ -75858,6 +75861,10 @@ export type Database = {netChange: number}[]}+ attach_audit_log_append_only: {+ Args: { p_table_name: string }+ Returns: undefined+ }attach_event_trigger: {Args: {after_sync_functions?: string[]@@ -76007,6 +76014,10 @@ export type Database = {}Returns: undefined}+ delete_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string }+ Returns: undefined+ }delete_old_audit_logs: {Args: { p_company_id: string; p_cutoff_date: string }Returns: number@@ -76529,6 +76540,10 @@ export type Database = {targetTable: string}[]}+ get_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string }+ Returns: Json+ }get_inventory_quantities: {Args: { company_id: string; item_id?: string; location_id: string }Returns: {@@ -77879,7 +77894,7 @@ export type Database = {Args: { p_company_id: string; p_entries: Json[] }Returns: number}- is_claims_admin: { Args: never; Returns: boolean }+ is_claims_admin: { Args: { company: string }; Returns: boolean }is_last_job_operation: {Args: { operation_id: string }Returns: boolean@@ -78457,6 +78472,10 @@ export type Database = {}Returns: undefined}+ upsert_integration_secret: {+ Args: { p_company_id: string; p_integration_id: string; p_secret: Json }+ Returns: string+ }upsert_to_search_index: {Args: {p_company_id: stringdiff --git a/packages/database/supabase/migrations/20260817030612_remove-global-permission-wildcard.sql b/packages/database/supabase/migrations/20260817030612_remove-global-permission-wildcard.sqlnew file mode 100644index 0000000000..5f8adce225--- /dev/null+++ b/packages/database/supabase/migrations/20260817030612_remove-global-permission-wildcard.sql@@ -0,0 +1,148 @@+-- NIST 800-171 3.1.5: remove the "0" global-company permission wildcard.+-- Expand-then-drop: rewrite any residual "0" grant to explicit companies+-- BEFORE the functions stop interpreting "0", so no one is locked out.++-- 1a. userPermission.permissions (JSONB: "<module>_<action>" -> [companyId,...])+-- Replace "0" in any array with the user's userToCompany companies (any role).+DO $$+DECLARE+ r RECORD;+ new_perms jsonb;+ k text;+ arr jsonb;+ companies text[];+BEGIN+ FOR r IN+ SELECT id, permissions FROM public."userPermission"+ WHERE permissions::text LIKE '%"0"%'+ LOOP+ SELECT COALESCE(array_agg("companyId"::text), '{}')+ INTO companies+ FROM public."userToCompany" WHERE "userId" = r.id;++ new_perms := r.permissions;+ FOR k IN SELECT jsonb_object_keys(r.permissions) LOOP+ arr := r.permissions -> k;+ IF jsonb_typeof(arr) = 'array' AND (arr ? '0') THEN+ new_perms := jsonb_set(+ new_perms,+ ARRAY[k],+ (+ SELECT COALESCE(jsonb_agg(DISTINCT elem), '[]'::jsonb)+ FROM (+ SELECT e AS elem FROM jsonb_array_elements_text(arr) e WHERE e <> '0'+ UNION+ SELECT unnest(companies) AS elem+ ) s+ )+ );+ END IF;+ END LOOP;++ UPDATE public."userPermission" SET permissions = new_perms WHERE id = r.id;+ END LOOP;+END $$;++-- 1b. employeeTypePermission (TEXT[] columns): "0" -> the employee type's company.+UPDATE public."employeeTypePermission" etp+SET+ "create" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."create", '0', et."companyId")) c),+ "update" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."update", '0', et."companyId")) c),+ "view" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."view", '0', et."companyId")) c),+ "delete" = (SELECT array_agg(DISTINCT c) FROM unnest(array_replace(etp."delete", '0', et."companyId")) c)+FROM public."employeeType" et+WHERE et.id = etp."employeeTypeId"+ AND ('0' = ANY(etp."create") OR '0' = ANY(etp."update") OR '0' = ANY(etp."view") OR '0' = ANY(etp."delete"));++-- 2. Redefine has_company_permission WITHOUT the "0" wildcard branch.+-- (fork of 20241210140215; attributes preserved exactly.)+CREATE OR REPLACE FUNCTION has_company_permission(claim text, company text) RETURNS "bool"+ LANGUAGE "plpgsql" SECURITY DEFINER SET search_path = public+ AS $$+ DECLARE+ permission_value text[];+ BEGIN+ SELECT jsonb_to_text_array(coalesce(permissions->claim, '[]'))+ INTO permission_value+ FROM public."userPermission" WHERE id = (SELECT auth.uid()::text);+ IF permission_value IS NULL THEN+ return false;+ ELSIF company = ANY(permission_value::text[]) THEN+ return true;+ ELSE+ return false;+ END IF;+ END;+$$;++-- 3. Redefine get_companies_with_employee_permission WITHOUT the "0" expand block.+-- (fork of 20260219162954; attributes preserved exactly.)+CREATE OR REPLACE FUNCTION get_companies_with_employee_permission (permission text) RETURNS text[] LANGUAGE "plpgsql" SECURITY DEFINER+SET search_path = public AS $$+DECLARE+ permission_companies text[];+ api_key_company text;+ employee_companies text[];+ api_key_scopes JSONB;+BEGIN+ api_key_company := get_company_id_from_api_key();++ IF api_key_company IS NOT NULL THEN+ api_key_scopes := get_api_key_scopes();+ IF api_key_scopes IS NULL OR api_key_scopes = '{}'::jsonb THEN+ RETURN '{}';+ END IF;+ IF (api_key_scopes ? permission)+ AND api_key_company = ANY(jsonb_to_text_array(api_key_scopes->permission)) THEN+ RETURN ARRAY[api_key_company];+ ELSE+ RETURN '{}';+ END IF;+ END IF;++ SELECT array_agg("companyId"::text)+ INTO employee_companies+ FROM "userToCompany"+ WHERE "userId" = auth.uid()::text AND "role" = 'employee';++ SELECT jsonb_to_text_array(COALESCE(permissions->permission, '[]'))+ INTO permission_companies+ FROM public."userPermission"+ WHERE id::text = auth.uid()::text;++ IF permission_companies IS NOT NULL AND employee_companies IS NOT NULL THEN+ SELECT array_agg(company)+ INTO permission_companies+ FROM unnest(permission_companies) company+ WHERE company = ANY(employee_companies);+ ELSE+ permission_companies := '{}';+ END IF;++ RETURN permission_companies;+END;+$$;++-- 4. Re-sign is_claims_admin per-company (drop the no-arg global-admin version).+DROP FUNCTION IF EXISTS is_claims_admin();+CREATE OR REPLACE FUNCTION is_claims_admin(company text) RETURNS "bool"+ LANGUAGE "plpgsql"+ AS $$+ BEGIN+ IF session_user = 'authenticator' THEN+ IF extract(epoch from now()) > coalesce((current_setting('request.jwt.claims', true)::jsonb)->>'exp', '0')::numeric THEN+ return false; -- jwt expired+ END IF;+ IF has_company_permission('update_users', company) THEN+ return true;+ ELSE+ return false;+ END IF;+ ELSE -- not a user session (trigger etc.)+ return true;+ END IF;+ END;+$$;++-- 5. Reload PostgREST so the new is_claims_admin(text) signature is exposed.+NOTIFY pgrst, 'reload schema';diff --git a/packages/database/supabase/migrations/20260817040245_fix-is-claims-admin-permission-key.sql b/packages/database/supabase/migrations/20260817040245_fix-is-claims-admin-permission-key.sqlnew file mode 100644index 0000000000..99e16eb7c1--- /dev/null+++ b/packages/database/supabase/migrations/20260817040245_fix-is-claims-admin-permission-key.sql@@ -0,0 +1,26 @@+-- Fix a pre-existing bug in is_claims_admin: it checked the REVERSED permission+-- key 'update_users' via has_company_permission, but userPermission keys are+-- '<module>_<action>' — the correct key is 'users_update'. 'update_users' never+-- exists, so has_company_permission always returned an empty array (the gate only+-- ever passed via the non-authenticator ELSE branch). Check the real key so the+-- gate enforces "caller may update users in this company" as intended.+CREATE OR REPLACE FUNCTION is_claims_admin(company text) RETURNS "bool"+ LANGUAGE "plpgsql"+ AS $$+ BEGIN+ IF session_user = 'authenticator' THEN+ IF extract(epoch from now()) > coalesce((current_setting('request.jwt.claims', true)::jsonb)->>'exp', '0')::numeric THEN+ return false; -- jwt expired+ END IF;+ IF has_company_permission('users_update', company) THEN+ return true;+ ELSE+ return false;+ END IF;+ ELSE -- not a user session (trigger etc.)+ return true;+ END IF;+ END;+$$;++NOTIFY pgrst, 'reload schema';diff --git a/packages/database/supabase/migrations/20260817122916_integration-secret-vault.sql b/packages/database/supabase/migrations/20260817122916_integration-secret-vault.sqlnew file mode 100644index 0000000000..d5473e5ff5--- /dev/null+++ b/packages/database/supabase/migrations/20260817122916_integration-secret-vault.sql@@ -0,0 +1,75 @@+-- NIST 800-171 3.13.16: encrypt integration secrets in Supabase Vault.+-- supabase_vault is pgsodium-backed; the supabase/postgres image preloads+-- pgsodium in shared_preload_libraries. If this CREATE fails, the extension is+-- unavailable — an infra prerequisite, not something to work around.+CREATE EXTENSION IF NOT EXISTS supabase_vault WITH SCHEMA vault CASCADE;++ALTER TABLE "companyIntegration" ADD COLUMN IF NOT EXISTS "secretRef" TEXT;++-- Upsert an integration's secret bag (flat {path: value} JSON) into the vault,+-- keyed by a deterministic name; store the vault id back on the row.+CREATE OR REPLACE FUNCTION upsert_integration_secret(p_company_id text, p_integration_id text, p_secret jsonb)+RETURNS text LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+DECLARE+ v_name text := 'integration:' || p_company_id || ':' || p_integration_id;+ v_id uuid;+BEGIN+ SELECT id INTO v_id FROM vault.secrets WHERE name = v_name;+ IF v_id IS NULL THEN+ v_id := vault.create_secret(p_secret::text, v_name, 'Carbon integration secret');+ ELSE+ -- Vault restricts direct UPDATE on vault.secrets; use the supported function.+ PERFORM vault.update_secret(v_id, p_secret::text);+ END IF;+ UPDATE "companyIntegration" SET "secretRef" = v_id::text+ WHERE "companyId" = p_company_id AND id = p_integration_id;+ RETURN v_id::text;+END;+$$;++CREATE OR REPLACE FUNCTION get_integration_secret(p_company_id text, p_integration_id text)+RETURNS jsonb LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+DECLARE+ v_ref text;+ v_secret text;+BEGIN+ SELECT "secretRef" INTO v_ref FROM "companyIntegration"+ WHERE "companyId" = p_company_id AND id = p_integration_id;+ IF v_ref IS NULL THEN RETURN NULL; END IF; -- caller applies transitional fallback / fails closed+ SELECT decrypted_secret INTO v_secret FROM vault.decrypted_secrets WHERE id = v_ref::uuid;+ IF v_secret IS NULL THEN RETURN NULL; END IF;+ RETURN v_secret::jsonb;+END;+$$;++CREATE OR REPLACE FUNCTION delete_integration_secret(p_company_id text, p_integration_id text)+RETURNS void LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+BEGIN+ DELETE FROM vault.secrets WHERE name = 'integration:' || p_company_id || ':' || p_integration_id;+END;+$$;++-- Service-role only. The app calls these via getCarbonServiceRole(); no user+-- client (anon/authenticated) may decrypt a secret.+REVOKE ALL ON FUNCTION upsert_integration_secret(text,text,jsonb) FROM PUBLIC, anon, authenticated;+REVOKE ALL ON FUNCTION get_integration_secret(text,text) FROM PUBLIC, anon, authenticated;+REVOKE ALL ON FUNCTION delete_integration_secret(text,text) FROM PUBLIC, anon, authenticated;+GRANT EXECUTE ON FUNCTION upsert_integration_secret(text,text,jsonb) TO service_role;+GRANT EXECUTE ON FUNCTION get_integration_secret(text,text) TO service_role;+GRANT EXECUTE ON FUNCTION delete_integration_secret(text,text) TO service_role;++-- Cascade: drop the paired vault secret when the integration row is deleted+-- (vault.secrets does not cascade on its own).+CREATE OR REPLACE FUNCTION drop_integration_secret_on_delete()+RETURNS trigger LANGUAGE plpgsql SECURITY DEFINER SET search_path = public, vault AS $$+BEGIN+ DELETE FROM vault.secrets WHERE name = 'integration:' || OLD."companyId" || ':' || OLD.id;+ RETURN OLD;+END;+$$;+DROP TRIGGER IF EXISTS trg_drop_integration_secret ON "companyIntegration";+CREATE TRIGGER trg_drop_integration_secret+ AFTER DELETE ON "companyIntegration"+ FOR EACH ROW EXECUTE FUNCTION drop_integration_secret_on_delete();++NOTIFY pgrst, 'reload schema';diff --git a/packages/database/supabase/migrations/20260817123719_integration-jsonschema-drop-secrets.sql b/packages/database/supabase/migrations/20260817123719_integration-jsonschema-drop-secrets.sqlnew file mode 100644index 0000000000..8bf797e151--- /dev/null+++ b/packages/database/supabase/migrations/20260817123719_integration-jsonschema-drop-secrets.sql@@ -0,0 +1,58 @@+-- NIST 800-171 3.13.16: secrets no longer live in companyIntegration.metadata+-- (they move to the vault), so drop them from each integration's jsonschema —+-- otherwise verify_integration() would reject the now-secret-free metadata for+-- active integrations. Only the config remainder is validated here; secret+-- presence is enforced in the app. Idempotent (guarded by id; UPDATE is a no-op+-- if the row is absent).++-- linear: only had apiKey.+UPDATE "integration"+SET "jsonschema" = '{"type":"object","properties":{}}'::json+WHERE id = 'linear';++-- paperless-parts: only had apiKey + secretKey.+UPDATE "integration"+SET "jsonschema" = '{"type":"object","properties":{}}'::json+WHERE id = 'paperless-parts';++-- slack: drop access_token, keep all non-secret channel/team config.+UPDATE "integration"+SET "jsonschema" = '{+ "type": "object",+ "properties": {+ "url": {"type": "string"},+ "channel": {"type": "string"},+ "team_id": {"type": "string"},+ "team_name": {"type": "string"},+ "channel_id": {"type": "string"},+ "bot_user_id": {"type": "string"},+ "slack_configuration_url": {"type": "string"},+ "nonconformance_channel_id": {"type": "string", "description": "Default Slack channel for non-conformance notifications"},+ "nonconformance_notifications_enabled": {"type": "boolean", "default": true, "description": "Enable automatic Slack notifications for non-conformances"}+ }+}'::json+WHERE id = 'slack';++-- onshape: drop credentials.accessToken/refreshToken; keep type + expiresAt.+UPDATE "integration"+SET "jsonschema" = '{+ "type": "object",+ "properties": {+ "baseUrl": {"type": "string"},+ "credentials": {+ "type": "object",+ "properties": {+ "type": {"type": "string"},+ "expiresAt": {"type": "string"}+ },+ "required": ["type"]+ },+ "assetSyncEnabled": {"type": "boolean"},+ "onshapeCompanyId": {"type": "string"},+ "scope": {"type": "string"}+ },+ "required": ["baseUrl", "credentials"]+}'::json+WHERE id = 'onshape';++NOTIFY pgrst, 'reload schema';diff --git a/packages/database/supabase/migrations/20260817132607_backfill-and-scrub-integration-secrets.sql b/packages/database/supabase/migrations/20260817132607_backfill-and-scrub-integration-secrets.sqlnew file mode 100644index 0000000000..97133c10dc--- /dev/null+++ b/packages/database/supabase/migrations/20260817132607_backfill-and-scrub-integration-secrets.sql@@ -0,0 +1,99 @@+-- NIST 800-171 3.13.16: one-time backfill — move every existing plaintext+-- integration secret out of companyIntegration.metadata INTO Supabase Vault AND+-- strip the plaintext, in a single auto-applied, idempotent pass.+--+-- This supersedes the manual TS backfill script + the separate scrub migration.+-- Those split the work in two: a manual `secretRef` backfill and an+-- auto-applied scrub gated on `secretRef IS NOT NULL`. On a normal deploy the+-- scrub ran BEFORE the manual step, matched zero rows, and never re-ran — so the+-- plaintext survived forever. Doing both here removes that ordering foot-gun:+-- the vault-move sets secretRef and the strip happens in the same statement.+--+-- The secret-path map below is a FROZEN snapshot of @carbon/ee's SECRET_KEYS at+-- backfill time. Runtime writes keep using that canonical TS map via+-- persistIntegrationSecrets; this migration only transforms rows that already+-- exist, so the snapshot never needs to stay in sync with the TS source.+--+-- Depends on upsert_integration_secret (20260817122916). metadata is a `json`+-- column, so cast json -> jsonb for path ops and back on write, matching the+-- vault reader's flat {dotPath: value} bag exactly (resolveIntegrationSecrets+-- setPath()s each dot key back onto the metadata copy).++-- Vault + strip one row for a set of dot-paths. Idempotent: re-running re-vaults+-- the same vault name (upsert) and re-strips already-absent paths (a no-op).+-- Only paths whose value is present and non-empty are vaulted — mirrors+-- splitSecrets' anti-overwrite rule so an empty placeholder is never stored.+CREATE OR REPLACE FUNCTION _backfill_integration_secret(+ p_company_id text, p_integration_id text, p_paths text[]+) RETURNS void LANGUAGE plpgsql AS $$+DECLARE+ v_meta jsonb;+ v_bag jsonb := '{}'::jsonb;+ v_path text;+ v_val jsonb;+BEGIN+ SELECT metadata::jsonb INTO v_meta FROM "companyIntegration"+ WHERE "companyId" = p_company_id AND id = p_integration_id;+ IF v_meta IS NULL THEN RETURN; END IF;++ -- Collect present, non-empty secret values into a flat {dotPath: value} bag.+ FOREACH v_path IN ARRAY p_paths LOOP+ v_val := v_meta #> string_to_array(v_path, '.');+ IF v_val IS NOT NULL AND v_val <> '""'::jsonb THEN+ v_bag := v_bag || jsonb_build_object(v_path, v_val);+ END IF;+ END LOOP;++ -- Nothing to vault (already stripped, or never carried a secret) → done.+ IF v_bag = '{}'::jsonb THEN RETURN; END IF;++ PERFORM upsert_integration_secret(p_company_id, p_integration_id, v_bag);++ -- Strip every secret path from the plaintext column.+ FOREACH v_path IN ARRAY p_paths LOOP+ v_meta := v_meta #- string_to_array(v_path, '.');+ END LOOP;+ UPDATE "companyIntegration" SET metadata = v_meta::json+ WHERE "companyId" = p_company_id AND id = p_integration_id;+END;+$$;++-- Drive the backfill. A known integration is vaulted+stripped; an UNKNOWN+-- integration whose metadata looks secret-bearing ABORTS the migration loudly+-- rather than silently leaving plaintext behind — add it to the map (here and in+-- @carbon/ee SECRET_KEYS) and redeploy.+DO $$+DECLARE+ r RECORD;+ v_paths text[];+BEGIN+ FOR r IN SELECT id, "companyId", metadata FROM "companyIntegration" LOOP+ v_paths := CASE r.id+ WHEN 'linear' THEN ARRAY['apiKey']+ WHEN 'resend' THEN ARRAY['apiKey']+ WHEN 'slack' THEN ARRAY['access_token']+ WHEN 'paperless-parts' THEN ARRAY['apiKey', 'secretKey']+ WHEN 'email' THEN ARRAY['apiKey', 'password']+ WHEN 'jira' THEN ARRAY['credentials.accessToken', 'credentials.refreshToken']+ WHEN 'onshape' THEN ARRAY['credentials.accessToken', 'credentials.refreshToken']+ WHEN 'xero' THEN ARRAY['credentials.accessToken', 'credentials.refreshToken']+ WHEN 'quickbooks' THEN ARRAY['credentials.accessToken', 'credentials.refreshToken']+ WHEN 'rillet' THEN ARRAY['credentials.apiKey', 'credentials.providerMetadata.webhookToken']+ ELSE NULL+ END;++ IF v_paths IS NULL THEN+ IF r.metadata::text ~* '"(apiKey|api_key|access_token|accessToken|refreshToken|secretKey|password|webhookToken|token|secret)"\s*:' THEN+ RAISE EXCEPTION+ 'companyIntegration "%" (company %) has secret-looking metadata but is not in the backfill map — add it to @carbon/ee SECRET_KEYS and this migration before deploying.',+ r.id, r."companyId";+ END IF;+ CONTINUE;+ END IF;++ PERFORM _backfill_integration_secret(r."companyId", r.id, v_paths);+ END LOOP;+END $$;++-- One-shot helper: drop it so it never becomes API surface.+DROP FUNCTION IF EXISTS _backfill_integration_secret(text, text, text[]);diff --git a/packages/database/supabase/migrations/20260818014100_audit-log-append-only.sql b/packages/database/supabase/migrations/20260818014100_audit-log-append-only.sqlnew file mode 100644index 0000000000..d297b347ee--- /dev/null+++ b/packages/database/supabase/migrations/20260818014100_audit-log-append-only.sql@@ -0,0 +1,161 @@+-- NIST 800-171 3.3.8 (AU-9): make the per-company audit log tables append-only.+-- The auditLog_{companyId} tables had permissive RLS (USING true) and no+-- immutability constraint, so any UPDATE/DELETE reaching them mutated the record+-- of who-did-what. Add a trigger that rejects UPDATE unconditionally and DELETE+-- unless the retention/archival path (delete_old_audit_logs) has set a+-- transaction-local flag. Even a service-role client can no longer casually+-- rewrite or erase audit history outside that one path.+--+-- This is defense-in-depth at the DB layer; stronger tamper-evidence (S3 Object+-- Lock on the archives, hash-chaining) is layered on top in the deployment.++CREATE OR REPLACE FUNCTION prevent_audit_log_mutation()+RETURNS trigger LANGUAGE plpgsql AS $$+BEGIN+ IF TG_OP = 'UPDATE' THEN+ RAISE EXCEPTION 'Audit log records are immutable (append-only)';+ END IF;+ -- DELETE: permitted only during retention/archival, which sets this flag.+ IF current_setting('app.audit_archiving', true) IS DISTINCT FROM 'on' THEN+ RAISE EXCEPTION 'Audit log records cannot be deleted (retention/archival only)';+ END IF;+ RETURN OLD;+END;+$$;++-- Idempotent: (re)attach the append-only trigger to one audit-log table.+CREATE OR REPLACE FUNCTION attach_audit_log_append_only(p_table_name TEXT)+RETURNS void LANGUAGE plpgsql AS $$+BEGIN+ EXECUTE format('DROP TRIGGER IF EXISTS "append_only" ON %I', p_table_name);+ EXECUTE format(+ 'CREATE TRIGGER "append_only" BEFORE UPDATE OR DELETE ON %I+ FOR EACH ROW EXECUTE FUNCTION prevent_audit_log_mutation()',+ p_table_name+ );+END;+$$;++-- Backfill: attach to every existing per-company audit table. The escaped+-- underscore matches "auditLog_<company>" but NOT "auditLogArchive".+DO $$+DECLARE t TEXT;+BEGIN+ FOR t IN+ SELECT tablename FROM pg_tables+ WHERE schemaname = 'public' AND tablename LIKE 'auditLog\_%' ESCAPE '\'+ LOOP+ PERFORM attach_audit_log_append_only(t);+ END LOOP;+END $$;++-- Fork create_audit_log_table (live def) to attach the trigger to new tables and+-- to any pre-existing table it touches.+CREATE OR REPLACE FUNCTION public.create_audit_log_table(p_company_id text)+ RETURNS void+ LANGUAGE plpgsql+ SECURITY DEFINER+AS $function$+DECLARE+ tbl_name TEXT;+BEGIN+ tbl_name := 'auditLog_' || p_company_id;++ IF EXISTS (+ SELECT 1 FROM information_schema.tables+ WHERE table_schema = 'public' AND information_schema.tables.table_name = tbl_name+ ) THEN+ -- Table exists; ensure recordId column is present (for tables created before this migration)+ IF NOT EXISTS (+ SELECT 1 FROM information_schema.columns+ WHERE table_schema = 'public'+ AND information_schema.columns.table_name = tbl_name+ AND column_name = 'recordId'+ ) THEN+ EXECUTE format('ALTER TABLE %I ADD COLUMN "recordId" TEXT', tbl_name);+ EXECUTE format('UPDATE %I SET "recordId" = "entityId" WHERE "recordId" IS NULL', tbl_name);+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("recordId")',+ 'idx_' || tbl_name || '_record', tbl_name);+ END IF;+ PERFORM attach_audit_log_append_only(tbl_name);+ RETURN;+ END IF;++ EXECUTE format('+ CREATE TABLE IF NOT EXISTS %I (+ "id" TEXT PRIMARY KEY DEFAULT id(''aud''),+ "tableName" TEXT NOT NULL,+ "entityType" TEXT NOT NULL,+ "entityId" TEXT NOT NULL,+ "recordId" TEXT,+ "operation" TEXT NOT NULL CHECK ("operation" IN (''INSERT'', ''UPDATE'', ''DELETE'')),+ "actorId" TEXT,+ "diff" JSONB,+ "metadata" JSONB,+ "createdAt" TIMESTAMPTZ NOT NULL DEFAULT NOW()+ )+ ', tbl_name);++ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("entityType", "entityId")',+ 'idx_' || tbl_name || '_entity', tbl_name);+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("tableName")',+ 'idx_' || tbl_name || '_table', tbl_name);+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("recordId")',+ 'idx_' || tbl_name || '_record', tbl_name);+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("actorId")',+ 'idx_' || tbl_name || '_actor', tbl_name);+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I ("createdAt" DESC)',+ 'idx_' || tbl_name || '_created', tbl_name);++ EXECUTE format('ALTER TABLE %I ENABLE ROW LEVEL SECURITY', tbl_name);++ EXECUTE format('+ CREATE POLICY "audit_log_access" ON %I+ FOR ALL+ USING (true)+ WITH CHECK (true)+ ', tbl_name);++ PERFORM attach_audit_log_append_only(tbl_name);+END;+$function$;++-- Fork delete_old_audit_logs (live def) to set the transaction-local flag the+-- append-only trigger checks, so the retention/archival delete is permitted.+CREATE OR REPLACE FUNCTION public.delete_old_audit_logs(p_company_id text, p_cutoff_date timestamp with time zone)+ RETURNS integer+ LANGUAGE plpgsql+ SECURITY DEFINER+AS $function$+DECLARE+ tbl_name TEXT;+ deleted_count INTEGER;+BEGIN+ tbl_name := 'auditLog_' || p_company_id;++ IF NOT EXISTS (+ SELECT 1 FROM information_schema.tables+ WHERE table_schema = 'public' AND information_schema.tables.table_name = tbl_name+ ) THEN+ RETURN 0;+ END IF;++ -- Authorize the append-only trigger to permit these retention deletes.+ PERFORM set_config('app.audit_archiving', 'on', true);++ EXECUTE format('+ WITH deleted AS (+ DELETE FROM %I+ WHERE "createdAt" < $1+ RETURNING *+ )+ SELECT COUNT(*) FROM deleted+ ', tbl_name)+ USING p_cutoff_date+ INTO deleted_count;++ RETURN deleted_count;+END;+$function$;++NOTIFY pgrst, 'reload schema';diff --git a/packages/ee/package.json b/packages/ee/package.jsonindex 4bf2295037..9eb57a7028 100644--- a/packages/ee/package.json+++ b/packages/ee/package.json@@ -5,6 +5,7 @@"exports": {".": "./src/index.ts","./accounting": "./src/accounting/index.ts",+ "./integrations/secrets": "./src/integrations/secrets.ts","./action-task-entity": "./src/lib/actionTaskEntity.ts","./storage-rules": "./src/storage-rules/index.ts","./storage-rules.server": "./src/storage-rules/server.ts",diff --git a/packages/ee/src/accounting/core/service.ts b/packages/ee/src/accounting/core/service.tsindex 64ff8e9ab0..fc6fb869a4 100644--- a/packages/ee/src/accounting/core/service.ts+++ b/packages/ee/src/accounting/core/service.ts@@ -2,6 +2,10 @@ import type { Database } from "@carbon/database";import { getLogger } from "@carbon/logger";import type { SupabaseClient } from "@supabase/supabase-js";import z from "zod";+import {+ persistIntegrationSecrets,+ resolveIntegrationSecrets+} from "../../integrations/secrets";import type { AccountingProvider } from "../providers";import { QboProvider } from "../providers/quickbooks-online";import { RilletProvider } from "../providers/rillet";@@ -111,10 +115,22 @@ export const getAccountingIntegration = async <T extends ProviderID>();}- const config = ProviderIntegrationMetadataSchema.safeParse(- integration.data.metadata+ // Merge vaulted secret material (accessToken/refreshToken) back into the+ // metadata before parsing, so provider construction reads credentials the same+ // as before. The tenantId/realmId used by the `.or(...)` filter above are NOT+ // secret and remain in the plaintext column, so that lookup is unaffected.+ // Vault RPCs require the service-role client.+ const { getCarbonServiceRole } = await import("@carbon/auth/client.server");+ const resolvedMetadata = await resolveIntegrationSecrets(+ getCarbonServiceRole(),+ integration.data.companyId,+ provider,+ integration.data.metadata,+ integration.data.secretRef);+ const config = ProviderIntegrationMetadataSchema.safeParse(resolvedMetadata);+if (!config.success) {logger.error("Invalid provider config", { error: config.error });throw new Error("Invalid provider config");@@ -206,11 +222,21 @@ export function getProviderIntegration(}};- await client- .from("companyIntegration")- .update({ metadata: { ...config, credentials: update } as any })- .eq("companyId", companyId)- .eq("id", provider);+ // Secret material is split out to Supabase Vault; only the non-secret+ // config is written back to the metadata column. Vault RPCs require the+ // service-role client.+ const { getCarbonServiceRole } = await import(+ "@carbon/auth/client.server"+ );+ await persistIntegrationSecrets(+ getCarbonServiceRole(),+ companyId,+ provider,+ {+ ...config,+ credentials: update+ }+ );} catch (error) {logger.error("Failed to update integration metadata", {provider,diff --git a/packages/ee/src/email/config.tsx b/packages/ee/src/email/config.tsxindex 6cb4ee89d6..874dc64fde 100644--- a/packages/ee/src/email/config.tsx+++ b/packages/ee/src/email/config.tsx@@ -60,7 +60,7 @@ export const Email = defineIntegration({name: "apiKey",label: "API key",description: "Create one in the Resend dashboard under API Keys.",- type: "password",+ type: "secret",required: true,value: "",group: "Resend",@@ -97,7 +97,7 @@ export const Email = defineIntegration({{name: "password",label: "Password",- type: "password",+ type: "secret",required: true,value: "",group: "SMTP",@@ -119,7 +119,8 @@ export const Email = defineIntegration({z.object({provider: z.literal("resend"),fromEmail: z.string().email(),- apiKey: z.string().min(1, { message: "API Key is required" })+ // Empty means "keep the existing vaulted secret"; presence enforced at install.+ apiKey: z.string()}),z.object({provider: z.literal("smtp"),@@ -131,7 +132,8 @@ export const Email = defineIntegration({.min(1, { message: "Port must be between 1 and 65535" }).max(65535, { message: "Port must be between 1 and 65535" }),username: z.string().min(1, { message: "Username is required" }),- password: z.string().min(1, { message: "Password is required" }),+ // Empty means "keep the existing vaulted secret"; presence enforced at install.+ password: z.string(),// `SwitchField` in the integration form always posts a literal// "true"/"false" string, and `z.coerce.boolean()` would treat both as// truthy (non-empty strings). Preprocess explicitly so unchecking thediff --git a/packages/ee/src/index.ts b/packages/ee/src/index.tsindex 11d48b7f11..dc8370c237 100644--- a/packages/ee/src/index.ts+++ b/packages/ee/src/index.ts@@ -64,6 +64,14 @@ export const getIntegrationConfigById = (id: IntegrationID) => {return integrations.find((integration) => integration.id === id);};+export {+ IntegrationSecretUnavailableError,+ persistIntegrationSecrets,+ resolveIntegrationSecrets,+ SECRET_KEYS,+ splitSecrets+} from "./integrations/secrets";+/*** Quick-install connectors are external link-outs with no DB state.* Each user connects individually. Currently empty — the section is hiddendiff --git a/packages/ee/src/integrations/secrets.test.ts b/packages/ee/src/integrations/secrets.test.tsnew file mode 100644index 0000000000..4433e59e57--- /dev/null+++ b/packages/ee/src/integrations/secrets.test.ts@@ -0,0 +1,221 @@+import { describe, expect, it, vi } from "vitest";+import {+ deletePath,+ getPath,+ IntegrationSecretUnavailableError,+ persistIntegrationSecrets,+ resolveIntegrationSecrets,+ setPath,+ splitSecrets+} from "./secrets";++describe("dot-path helpers", () => {+ it("gets, sets, and deletes nested paths", () => {+ const obj: Record<string, unknown> = { a: { b: { c: 1 } } };+ expect(getPath(obj, "a.b.c")).toBe(1);+ expect(getPath(obj, "a.x.y")).toBeUndefined();+ setPath(obj, "a.b.d", 2);+ expect(getPath(obj, "a.b.d")).toBe(2);+ setPath(obj, "p.q", 3); // creates intermediates+ expect(getPath(obj, "p.q")).toBe(3);+ deletePath(obj, "a.b.c");+ expect(getPath(obj, "a.b.c")).toBeUndefined();+ expect(getPath(obj, "a.b.d")).toBe(2); // sibling untouched+ });+});++describe("splitSecrets", () => {+ it("splits nested accounting credentials, keeping non-secret providerMetadata", () => {+ const metadata = {+ credentials: {+ type: "oauth2",+ accessToken: "at",+ refreshToken: "rt",+ expiresAt: "2026-01-01",+ providerMetadata: { tenantId: "T1", tenantName: "Acme" }+ },+ syncConfig: { direction: "two-way" }+ };+ const { config, secrets } = splitSecrets("xero", metadata);+ // secrets extracted+ expect(secrets).toEqual({+ "credentials.accessToken": "at",+ "credentials.refreshToken": "rt"+ });+ // config keeps everything non-secret, incl. the tenant mirror+ expect(getPath(config, "credentials.accessToken")).toBeUndefined();+ expect(getPath(config, "credentials.refreshToken")).toBeUndefined();+ expect(getPath(config, "credentials.providerMetadata.tenantId")).toBe("T1");+ expect(getPath(config, "credentials.expiresAt")).toBe("2026-01-01");+ expect(getPath(config, "syncConfig.direction")).toBe("two-way");+ // original not mutated+ expect(metadata.credentials.accessToken).toBe("at");+ });++ it("splits a flat linear apiKey", () => {+ const { config, secrets } = splitSecrets("linear", {+ apiKey: "lin_123",+ teamId: "team"+ });+ expect(secrets).toEqual({ apiKey: "lin_123" });+ expect(config).toEqual({ teamId: "team" });+ });++ it("handles email's two variants (Resend apiKey / SMTP password), omitting the absent one", () => {+ // Resend variant: only apiKey present+ expect(+ splitSecrets("email", { provider: "resend", apiKey: "re_1" })+ ).toEqual({+ config: { provider: "resend" },+ secrets: { apiKey: "re_1" }+ });+ // SMTP variant: only password present+ expect(+ splitSecrets("email", {+ provider: "smtp",+ host: "mail.example.com",+ username: "u",+ password: "p"+ })+ ).toEqual({+ config: { provider: "smtp", host: "mail.example.com", username: "u" },+ secrets: { password: "p" }+ });+ });++ it("anti-overwrite: an empty secret value is not persisted (D4a)", () => {+ // An untouched masked field submits "" — it must not clobber the vault.+ const { config, secrets } = splitSecrets("linear", {+ apiKey: "",+ teamId: "team"+ });+ expect(secrets).toEqual({}); // nothing to write -> vault unchanged+ expect(config).toEqual({ teamId: "team" }); // and no empty secret in the column+ });++ it("omits absent secret paths and passes through unknown integrations", () => {+ expect(splitSecrets("linear", { teamId: "team" })).toEqual({+ config: { teamId: "team" },+ secrets: {}+ });+ expect(splitSecrets("unknown-x", { a: 1 })).toEqual({+ config: { a: 1 },+ secrets: {}+ });+ });+});++// Minimal service-client mock: rpc + from().update()/select() chains.+function mockClient(opts: {+ rpc?: (fn: string, args: unknown) => { data: unknown; error: unknown };+ secretRef?: string | null;+}) {+ const rpc = vi.fn((fn: string, args: unknown) =>+ Promise.resolve(opts.rpc ? opts.rpc(fn, args) : { data: null, error: null })+ );+ const update = vi.fn(() => {+ const chain = { eq: vi.fn(() => chain), then: undefined } as never;+ // Support .update().eq().eq() resolving to { error: null }+ const eqable = {+ eq: vi.fn(() => eqable)+ } as unknown as { eq: unknown } & Promise<{ error: null }>;+ (eqable as unknown as Promise<{ error: null }>).then = (res: never) =>+ Promise.resolve({ error: null }).then(res);+ return eqable;+ });+ const select = vi.fn(() => {+ const chain = {+ eq: vi.fn(() => chain),+ maybeSingle: vi.fn(() =>+ Promise.resolve({+ data: { secretRef: opts.secretRef ?? null },+ error: null+ })+ )+ };+ return chain;+ });+ const from = vi.fn(() => ({ update, select }));+ return { rpc, from } as never;+}++describe("resolveIntegrationSecrets", () => {+ it("returns metadata as-is for an integration with no secret keys", async () => {+ const client = mockClient({});+ const metadata = { active: true, someConfig: "x" };+ // exchange-rates-v1 has no SECRET_KEYS entry — nothing to resolve.+ const merged = await resolveIntegrationSecrets(+ client,+ "co",+ "exchange-rates-v1",+ metadata,+ null+ );+ expect(merged).toEqual(metadata);+ });++ it("fails closed when a secret-bearing integration has no secretRef", async () => {+ const client = mockClient({});+ await expect(+ resolveIntegrationSecrets(client, "co", "xero", {}, null)+ ).rejects.toBeInstanceOf(IntegrationSecretUnavailableError);+ });++ it("merges the vaulted bag back into metadata when secretRef is set", async () => {+ const client = mockClient({+ rpc: () => ({+ data: {+ "credentials.accessToken": "vaulted-at",+ "credentials.refreshToken": "vaulted-rt"+ },+ error: null+ })+ });+ const metadata = {+ credentials: { type: "oauth2", providerMetadata: { tenantId: "T1" } }+ };+ const merged = await resolveIntegrationSecrets(+ client,+ "co",+ "xero",+ metadata,+ "vault-ref-1"+ );+ expect(getPath(merged, "credentials.accessToken")).toBe("vaulted-at");+ expect(getPath(merged, "credentials.refreshToken")).toBe("vaulted-rt");+ expect(getPath(merged, "credentials.providerMetadata.tenantId")).toBe("T1");+ });++ it("throws (fail-closed) when secretRef is set but the vault returns null", async () => {+ const client = mockClient({ rpc: () => ({ data: null, error: null }) });+ await expect(+ resolveIntegrationSecrets(client, "co", "xero", {}, "vault-ref-1")+ ).rejects.toBeInstanceOf(IntegrationSecretUnavailableError);+ });+});++describe("persistIntegrationSecrets", () => {+ it("upserts the secret bag and writes stripped config to the column", async () => {+ const rpc = vi.fn(() => Promise.resolve({ data: "vault-id", error: null }));+ // The .update().eq().eq() chain is thenable and resolves to { error: null }.+ const awaitableEq: never = Object.assign(Promise.resolve({ error: null }), {+ eq: vi.fn(() => awaitableEq)+ }) as never;+ const from = vi.fn(() => ({ update: vi.fn(() => awaitableEq) }));+ const client = { rpc, from } as never;++ const config = await persistIntegrationSecrets(client, "co", "linear", {+ apiKey: "secret",+ teamId: "team"+ });+ expect(rpc).toHaveBeenCalledWith(+ "upsert_integration_secret",+ expect.objectContaining({+ p_company_id: "co",+ p_integration_id: "linear",+ p_secret: { apiKey: "secret" }+ })+ );+ expect(config).toEqual({ teamId: "team" });+ });+});diff --git a/packages/ee/src/integrations/secrets.ts b/packages/ee/src/integrations/secrets.tsnew file mode 100644index 0000000000..62a361da3c--- /dev/null+++ b/packages/ee/src/integrations/secrets.ts@@ -0,0 +1,214 @@+import type { Database } from "@carbon/database";+import type { SupabaseClient } from "@supabase/supabase-js";++/**+ * Integration secret handling (NIST 800-171 3.13.16 / SC-28).+ *+ * Third-party credentials are encrypted at rest in Supabase Vault; only the+ * non-secret configuration stays in the plaintext `companyIntegration.metadata`+ * column. This module is the ONE place that declares which metadata keys are+ * secret, plus the read/write helpers that move them in and out of the vault.+ *+ * The vault schema is not exposed to PostgREST, so all vault access goes through+ * the SECURITY DEFINER RPCs added in the vault migration — always with a+ * service-role client. A user (anon/authenticated) client cannot decrypt a+ * secret.+ */++/**+ * The ONLY declaration of which `metadata` keys hold secrets, per integration+ * id. Dot-paths into the metadata object. Anything not listed here stays in the+ * plaintext column (tenantId/realmId/sync config/etc.). A field mis-classified+ * as non-secret leaks — keep this map exhaustive and reviewed.+ */+export const SECRET_KEYS: Record<string, string[]> = {+ linear: ["apiKey"],+ slack: ["access_token"],+ jira: ["credentials.accessToken", "credentials.refreshToken"],+ onshape: ["credentials.accessToken", "credentials.refreshToken"],+ xero: ["credentials.accessToken", "credentials.refreshToken"],+ quickbooks: ["credentials.accessToken", "credentials.refreshToken"],+ rillet: ["credentials.apiKey", "credentials.providerMetadata.webhookToken"],+ "paperless-parts": ["apiKey", "secretKey"],+ resend: ["apiKey"],+ // email carries a secret in EITHER variant: Resend `apiKey` or SMTP `password`+ // (top-level). splitSecrets omits whichever is absent for the active provider.+ email: ["apiKey", "password"]+ // exchange-rates-v1: none (apiKey is env-based, never in metadata).+};++/** Thrown when a secret is expected in the vault but cannot be read (fail-closed). */+export class IntegrationSecretUnavailableError extends Error {+ constructor(companyId: string, integrationId: string) {+ super(+ `Integration secret unavailable for ${integrationId} (company ${companyId})`+ );+ this.name = "IntegrationSecretUnavailableError";+ }+}++type Json = Record<string, unknown>;++/** Read a dot-path (`a.b.c`) from a nested object; undefined if any hop is missing. */+export function getPath(obj: unknown, path: string): unknown {+ const parts = path.split(".");+ let cur: unknown = obj;+ for (const part of parts) {+ if (typeof cur !== "object" || cur === null) return undefined;+ cur = (cur as Json)[part];+ }+ return cur;+}++/** Set a dot-path on a nested object, creating intermediate objects. Mutates `obj`. */+export function setPath(obj: Json, path: string, value: unknown): void {+ const parts = path.split(".");+ let cur: Json = obj;+ for (let i = 0; i < parts.length - 1; i++) {+ const part = parts[i]!;+ if (typeof cur[part] !== "object" || cur[part] === null) {+ cur[part] = {};+ }+ cur = cur[part] as Json;+ }+ cur[parts[parts.length - 1]!] = value;+}++/** Delete a dot-path leaf from a nested object. Mutates `obj`. Empty parents are left as-is. */+export function deletePath(obj: Json, path: string): void {+ const parts = path.split(".");+ let cur: Json = obj;+ for (let i = 0; i < parts.length - 1; i++) {+ const part = parts[i]!;+ if (typeof cur[part] !== "object" || cur[part] === null) return;+ cur = cur[part] as Json;+ }+ delete cur[parts[parts.length - 1]!];+}++/**+ * Split a metadata object into the non-secret `config` (a deep copy with every+ * SECRET_KEYS path removed) and a flat `secrets` bag (`{ [path]: value }`,+ * omitting paths whose value is undefined). Unknown integration ids have no+ * secret keys, so `config` is a pass-through and `secrets` is empty.+ */+export function splitSecrets(+ integrationId: string,+ metadata: unknown+): { config: Json; secrets: Record<string, unknown> } {+ const config: Json =+ typeof metadata === "object" && metadata !== null+ ? (structuredClone(metadata) as Json)+ : {};+ const secrets: Record<string, unknown> = {};+ for (const path of SECRET_KEYS[integrationId] ?? []) {+ const value = getPath(config, path);+ // Anti-overwrite (D4a): an empty/absent value is "unchanged, don't write" —+ // never persist it, so saving a form whose masked secret field was left+ // untouched (submitted as "" or omitted) cannot clobber the vaulted secret.+ if (value !== undefined && value !== "") {+ secrets[path] = value;+ }+ // Always strip the path from config so the plaintext column never keeps a+ // secret, even the empty placeholder.+ deletePath(config, path);+ }+ return { config, secrets };+}++/**+ * Persist an integration's secrets to the vault and write the stripped+ * (non-secret) config to `companyIntegration.metadata`. Replaces any direct+ * `metadata` write on a secret-bearing path. Requires a SERVICE-ROLE client.+ * Returns the stripped config that was written to the column.+ */+export async function persistIntegrationSecrets(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ integrationId: string,+ metadata: unknown+): Promise<Json> {+ const { config, secrets } = splitSecrets(integrationId, metadata);++ if (Object.keys(secrets).length > 0) {+ const { error } = await serviceClient.rpc("upsert_integration_secret", {+ p_company_id: companyId,+ p_integration_id: integrationId,+ p_secret: secrets as never+ });+ if (error)+ throw new IntegrationSecretUnavailableError(companyId, integrationId);+ }++ const { error: updateError } = await serviceClient+ .from("companyIntegration")+ .update({ metadata: config as never })+ .eq("companyId", companyId)+ .eq("id", integrationId);+ if (updateError) throw updateError;++ return config;+}++/**+ * Merge an integration's vaulted secrets back into a copy of its metadata so+ * callers read the same shape as before (e.g. `metadata.credentials.accessToken`).+ * Requires a SERVICE-ROLE client.+ *+ * - integration has no secret keys -> return metadata as-is (nothing to do).+ * - `secretRef` set + vault returns the bag -> merged metadata.+ * - `secretRef` set + vault returns null -> throw (fail-closed, D8).+ * - secret-bearing integration + no `secretRef` -> throw (fail-closed): the+ * plaintext has been scrubbed, so a missing vault pointer is a broken state,+ * never "return the secret-free metadata as if complete". (The transitional+ * plaintext fallback was removed with the backfill-and-scrub migration.)+ *+ * Pass `secretRef` from the row when you have it to skip the extra lookup.+ */+export async function resolveIntegrationSecrets(+ serviceClient: SupabaseClient<Database>,+ companyId: string,+ integrationId: string,+ metadata: unknown,+ secretRef?: string | null+): Promise<Json> {+ const base: Json =+ typeof metadata === "object" && metadata !== null+ ? (structuredClone(metadata) as Json)+ : {};++ // Integrations that store no secrets have nothing to resolve.+ if ((SECRET_KEYS[integrationId] ?? []).length === 0) return base;++ let ref = secretRef;+ if (ref === undefined) {+ const { data } = await serviceClient+ .from("companyIntegration")+ .select("secretRef")+ .eq("companyId", companyId)+ .eq("id", integrationId)+ .maybeSingle();+ ref = data?.secretRef ?? null;+ }++ // Fail closed: a secret-bearing integration must carry a vault pointer.+ if (!ref) {+ throw new IntegrationSecretUnavailableError(companyId, integrationId);+ }++ const { data: bag, error } = await serviceClient.rpc(+ "get_integration_secret",+ {+ p_company_id: companyId,+ p_integration_id: integrationId+ }+ );+ if (error || bag === null || typeof bag !== "object") {+ throw new IntegrationSecretUnavailableError(companyId, integrationId);+ }++ for (const [path, value] of Object.entries(bag as Record<string, unknown>)) {+ setPath(base, path, value);+ }+ return base;+}diff --git a/packages/ee/src/jira/lib/client.ts b/packages/ee/src/jira/lib/client.tsindex 29207d4178..e823adfeb9 100644--- a/packages/ee/src/jira/lib/client.ts+++ b/packages/ee/src/jira/lib/client.ts@@ -1,6 +1,9 @@import { JIRA_CLIENT_ID, JIRA_CLIENT_SECRET } from "@carbon/auth";import { getCarbonServiceRole } from "@carbon/auth/client.server";+import type { Database } from "@carbon/database";import { getLogger } from "@carbon/logger";+import type { SupabaseClient } from "@supabase/supabase-js";+import { resolveIntegrationSecrets } from "../../integrations/secrets";import { getJiraIntegration, updateJiraCredentials } from "./service";import type {CreateJiraIssueInput,@@ -156,9 +159,22 @@ export async function getAccessibleResources(* Jira Cloud REST API client.*/export class JiraClient {- private getCredentials(integration: { metadata: unknown }): JiraCredentials {- return (integration.metadata as { credentials: JiraCredentials })- .credentials;+ // Secret material (accessToken/refreshToken) lives in Supabase Vault; merge it+ // back so callers read `metadata.credentials` the same as before. Vault RPCs+ // require the service-role client.+ private async getCredentials(+ serviceRole: SupabaseClient<Database>,+ companyId: string,+ integration: { metadata: unknown; secretRef?: string | null }+ ): Promise<JiraCredentials> {+ const metadata = await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "jira",+ integration.metadata,+ integration.secretRef ?? null+ );+ return (metadata as { credentials: JiraCredentials }).credentials;}/**@@ -173,7 +189,11 @@ export class JiraClient {throw new Error("Jira integration not found for company");}- const credentials = this.getCredentials(integration);+ const credentials = await this.getCredentials(+ serviceRole,+ companyId,+ integration+ );// Check if token needs refresh (5 min buffer)const now = Date.now();@@ -217,7 +237,8 @@ export class JiraClient {throw new Error("Jira integration not found for company");}- return this.getCredentials(integration).cloudId;+ return (await this.getCredentials(serviceRole, companyId, integration))+ .cloudId;}/**@@ -232,7 +253,8 @@ export class JiraClient {throw new Error("Jira integration not found for company");}- return this.getCredentials(integration).siteUrl;+ return (await this.getCredentials(serviceRole, companyId, integration))+ .siteUrl;}/**diff --git a/packages/ee/src/jira/lib/service.ts b/packages/ee/src/jira/lib/service.tsindex 0fbcfe6e39..0f3d3d38ea 100644--- a/packages/ee/src/jira/lib/service.ts+++ b/packages/ee/src/jira/lib/service.ts@@ -2,6 +2,7 @@ import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database } from "@carbon/database";import { getLogger } from "@carbon/logger";import type { SupabaseClient } from "@supabase/supabase-js";+import { persistIntegrationSecrets } from "../../integrations/secrets";import type { ActionTaskEntityType } from "../../lib/actionTaskEntity";import { actionTaskEntities } from "../../lib/actionTaskEntity";import { adfToTiptap } from "./richtext";@@ -43,16 +44,13 @@ export async function updateJiraCredentials(const metadata = integration.metadata as Record<string, any>;- return await client- .from("companyIntegration")- .update({- metadata: {- ...metadata,- credentials- } as any- })- .eq("companyId", companyId)- .eq("id", "jira");+ // Secret material (accessToken/refreshToken) is split out to Supabase Vault;+ // only the non-secret config is written back to the metadata column. Requires+ // the service-role client (the caller passes one).+ return await persistIntegrationSecrets(client, companyId, "jira", {+ ...metadata,+ credentials+ });}/**diff --git a/packages/ee/src/linear/config.tsx b/packages/ee/src/linear/config.tsxindex aa56177994..acd36ba308 100644--- a/packages/ee/src/linear/config.tsx+++ b/packages/ee/src/linear/config.tsx@@ -18,16 +18,18 @@ export const Linear = defineIntegration({{name: "apiKey",label: "API Key",- type: "text",+ type: "secret",required: true,value: ""}],schema: z.object({+ // Empty means "keep the existing vaulted secret" (the field loads masked and+ // is not sent to the browser). Presence is enforced at install-time in the+ // settings action; a non-empty value must still be a valid Linear key.apiKey: z.string()- .min(1, { message: "API Key is required" })- .refine((val) => val.startsWith("lin_api"), {+ .refine((val) => val === "" || val.startsWith("lin_api"), {message: "Linear API Key must start with 'lin_api'"})})diff --git a/packages/ee/src/linear/lib/client.ts b/packages/ee/src/linear/lib/client.tsindex 53ce9b8571..237010bb5c 100644--- a/packages/ee/src/linear/lib/client.ts+++ b/packages/ee/src/linear/lib/client.ts@@ -1,6 +1,7 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";import { getLogger } from "@carbon/logger";import axios, { type AxiosInstance } from "axios";+import { resolveIntegrationSecrets } from "../../integrations/secrets";import { getLinearIntegration } from "./service";import type { LinearIssue, LinearTeam, LinearUser } from "./types";import type { LinearWorkStateType } from "./utils";@@ -30,7 +31,15 @@ export class LinearClient {throw new Error("Linear integration not found for company");}- const metadata = integration.metadata as { apiKey: string };+ // Secret material lives in Supabase Vault; merge it back so we read the+ // apiKey the same as before. Vault RPCs require the service-role client.+ const metadata = (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "linear",+ integration.metadata,+ integration.secretRef+ )) as { apiKey: string };return {Authorization: metadata.apiKeydiff --git a/packages/ee/src/onshape/lib/client.ts b/packages/ee/src/onshape/lib/client.tsindex 80953fb2ed..87df71c2c1 100644--- a/packages/ee/src/onshape/lib/client.ts+++ b/packages/ee/src/onshape/lib/client.ts@@ -7,6 +7,10 @@ import { ONSHAPE_CLIENT_ID, ONSHAPE_CLIENT_SECRET } from "@carbon/env";import { getLogger } from "@carbon/logger";import type { SupabaseClient } from "@supabase/supabase-js";import axios from "axios";+import {+ persistIntegrationSecrets,+ resolveIntegrationSecrets+} from "../../integrations/secrets";import type { OnshapeDocument } from "./document.type";import type { OnshapeElementType } from "./element.type";@@ -606,7 +610,18 @@ export async function getOnshapeClient(return { client: null, error: "Onshape integration not found" };}- const metadata = integration.data.metadata as Record<string, any>;+ // Secret material (accessToken/refreshToken) lives in Supabase Vault; merge it+ // back so we read `metadata.credentials` the same as before. Vault RPCs require+ // the service-role client (the passed `client` may be RLS-scoped).+ const { getCarbonServiceRole } = await import("@carbon/auth/client.server");+ const serviceRole = getCarbonServiceRole();+ const metadata = (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "onshape",+ integration.data.metadata,+ integration.data.secretRef+ )) as Record<string, any>;const credentials = metadata?.credentials;if (!credentials?.accessToken) {@@ -629,24 +644,17 @@ export async function getOnshapeClient(accessToken = refreshed.access_token;- // Persist the new tokens- await client- .from("companyIntegration")- .update({- metadata: {- ...metadata,- credentials: {- ...credentials,- accessToken: refreshed.access_token,- refreshToken: refreshed.refresh_token,- expiresAt: new Date(Date.now() + 3600 * 1000).toISOString()- }- },- updatedBy: userId,- updatedAt: new Date().toISOString()- })- .eq("id", "onshape")- .eq("companyId", companyId);+ // Persist the new tokens. Secret material is split out to Supabase Vault;+ // only the non-secret config is written to the metadata column.+ await persistIntegrationSecrets(serviceRole, companyId, "onshape", {+ ...metadata,+ credentials: {+ ...credentials,+ accessToken: refreshed.access_token,+ refreshToken: refreshed.refresh_token,+ expiresAt: new Date(Date.now() + 3600 * 1000).toISOString()+ }+ });} catch (error) {logger.error("Failed to refresh Onshape token", { error });return { client: null, error: "Failed to refresh Onshape token" };diff --git a/packages/ee/src/paperless-parts/config.tsx b/packages/ee/src/paperless-parts/config.tsxindex 23b55490f3..b81ef4d3f1 100644--- a/packages/ee/src/paperless-parts/config.tsx+++ b/packages/ee/src/paperless-parts/config.tsx@@ -2,7 +2,6 @@ import { Copy, cn, Input, InputGroup, InputRightElement } from "@carbon/react";import { isBrowser } from "@carbon/utils";import type { SVGProps } from "react";import { z } from "zod";-import { zfd } from "zod-form-data";import { defineIntegration } from "../fns";export const PaperlessParts = defineIntegration({@@ -21,14 +20,14 @@ export const PaperlessParts = defineIntegration({{name: "apiKey",label: "API Key",- type: "text",+ type: "secret",required: true,value: ""},{name: "secretKey",label: "Webhook Signing Secret",- type: "text",+ type: "secret",required: true,value: ""},@@ -64,14 +63,25 @@ export const PaperlessParts = defineIntegration({}],schema: z.object({- apiKey: z.string().min(1, { message: "API Key is required" }),- secretKey: z- .string()- .min(1, { message: "Webhook Signing Secret is required" }),+ // Empty means "keep the existing vaulted secret"; presence is enforced at+ // install-time in the settings action.+ apiKey: z.string(),+ secretKey: z.string(),methodType: z.enum(["Purchase to Order", "Pull from Inventory"]),trackingType: z.enum(["Inventory", "Non-Inventory", "Batch"]),billOfProcessBlackList: z.array(z.string()).optional(),- usePaperlessOrderNumber: zfd.checkbox()+ // `SwitchField` in the integration form always posts a literal+ // "true"/"false" string, which `zfd.checkbox()` (expects "on") rejects —+ // that rejection blocked every save. Preprocess the string into a boolean+ // the same way the email/onshape/xero configs do.+ usePaperlessOrderNumber: z+ .preprocess((v) => {+ if (typeof v === "boolean") return v;+ if (v === "true") return true;+ if (v === "false") return false;+ return v;+ }, z.boolean())+ .default(false)})});diff --git a/packages/ee/src/rillet/config.tsx b/packages/ee/src/rillet/config.tsxindex cef03189bf..43ebcb2415 100644--- a/packages/ee/src/rillet/config.tsx+++ b/packages/ee/src/rillet/config.tsx@@ -5,7 +5,8 @@ import { z } from "zod";import { defineIntegration } from "../fns";const RilletSettingsSchema = z.object({- apiKey: z.string().min(1, { message: "API key is required" }),+ // Empty means "keep the existing vaulted secret"; presence enforced at install.+ apiKey: z.string(),environment: z.enum(["production", "sandbox"]).default("production"),subsidiaryId: z.string().optional(),webhookToken: z.string().optional()diff --git a/packages/ee/src/slack/lib/service.ts b/packages/ee/src/slack/lib/service.tsindex e36bbbd1fc..6f1a5d098e 100644--- a/packages/ee/src/slack/lib/service.ts+++ b/packages/ee/src/slack/lib/service.ts@@ -5,6 +5,7 @@ import { trigger } from "@carbon/lib/trigger";import { getLogger } from "@carbon/logger";import { isUrl } from "@carbon/utils";import type { SupabaseClient } from "@supabase/supabase-js";+import { resolveIntegrationSecrets } from "../../integrations/secrets";import { createSlackWebClient } from "./client";const logger = getLogger("ee", "slack");@@ -213,7 +214,16 @@ export async function getSlackAuth(return null;}- const metadata = companyIntegration.data?.metadata as {+ // Secret material (access_token) lives in Supabase Vault; merge it back so we+ // read the same shape as before. Vault RPCs require the service-role client.+ const serviceRole = getCarbonServiceRole();+ const metadata = (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ companyIntegration.data.metadata,+ companyIntegration.data.secretRef+ )) as {access_token: string;channel_id: string;};diff --git a/packages/env/src/index.ts b/packages/env/src/index.tsindex 9c1462d1da..07a9c9c7a9 100644--- a/packages/env/src/index.ts+++ b/packages/env/src/index.ts@@ -371,6 +371,13 @@ export const REDIS_URL = getEnv("REDIS_URL", {});export const SESSION_MAX_AGE = 60 * 60 * 24 * 7; // 7 days;export const REFRESH_ACCESS_TOKEN_THRESHOLD = 60 * 10; // 10 minutes left before token expires+// Session lock / termination (NIST 800-171 3.1.10 / 3.1.11). All in MILLISECONDS+// (unlike SESSION_MAX_AGE above, which is seconds for the cookie maxAge). Enforced+// only when CONTROLLED_ENVIRONMENT is true. Plain literals, matching SESSION_MAX_AGE+// precedent (not env-overridable in v1).+export const SESSION_IDLE_LOCK_MS = 15 * 60 * 1000; // 15 min — DISA App-Sec STIG web-app idle+export const SESSION_ABSOLUTE_MAX_MS = 12 * 60 * 60 * 1000; // 12 h — absolute session cap+export const SESSION_HEARTBEAT_MS = 60 * 1000; // client activity heartbeat throttleexport const VERCEL_URL = getEnv("VERCEL_URL", { isSecret: false });export const XERO_CLIENT_ID = getEnv("XERO_CLIENT_ID", {diff --git a/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.tsindex 8df7e3534d..bb5980d313 100644--- a/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts+++ b/packages/jobs/src/inngest/functions/integrations/slack-document-sync.ts@@ -1,5 +1,6 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database } from "@carbon/database";+import { resolveIntegrationSecrets } from "@carbon/ee";import {type DocumentType,formatAssignmentUpdate,@@ -48,7 +49,7 @@ export const slackDocumentCreatedFunction = inngest.createFunction(const { data: integration } = await serviceRole.from("companyIntegration")- .select("metadata")+ .select("metadata, secretRef").eq("id", "slack").eq("companyId", companyId).single();@@ -57,7 +58,15 @@ export const slackDocumentCreatedFunction = inngest.createFunction(throw new Error("Slack integration not found");}- const slackToken = (integration.metadata as any)?.access_token as string;+ const slackToken = (+ (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as any+ ).access_token as string;const baseUrl = VERCEL_URL || "http://localhost:3000";await postToSlackThread({@@ -114,7 +123,7 @@ export const slackDocumentStatusUpdateFunction = inngest.createFunction(const { data: integration } = await serviceRole.from("companyIntegration")- .select("metadata")+ .select("metadata, secretRef").eq("id", "slack").eq("companyId", companyId).single();@@ -123,7 +132,15 @@ export const slackDocumentStatusUpdateFunction = inngest.createFunction(throw new Error("Slack integration not found");}- const slackToken = (integration.metadata as any).access_token as string;+ const slackToken = (+ (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as any+ ).access_token as string;const documentData = await getDocumentData(serviceRole,@@ -205,7 +222,7 @@ export const slackDocumentTaskUpdateFunction = inngest.createFunction(const { data: integration } = await serviceRole.from("companyIntegration")- .select("metadata")+ .select("metadata, secretRef").eq("id", "slack").eq("companyId", companyId).single();@@ -214,7 +231,15 @@ export const slackDocumentTaskUpdateFunction = inngest.createFunction(throw new Error("Slack integration not found");}- const slackToken = (integration.metadata as any).access_token as string;+ const slackToken = (+ (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as any+ ).access_token as string;const documentData = await getDocumentData(serviceRole,@@ -293,7 +318,7 @@ export const slackDocumentAssignmentUpdateFunction = inngest.createFunction(const { data: integration } = await serviceRole.from("companyIntegration")- .select("metadata")+ .select("metadata, secretRef").eq("id", "slack").eq("companyId", companyId).single();@@ -302,7 +327,15 @@ export const slackDocumentAssignmentUpdateFunction = inngest.createFunction(throw new Error("Slack integration not found");}- const slackToken = (integration.metadata as any).access_token as string;+ const slackToken = (+ (await resolveIntegrationSecrets(+ serviceRole,+ companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as any+ ).access_token as string;const documentData = await getDocumentData(serviceRole,diff --git a/packages/jobs/src/inngest/functions/notifications/notify.ts b/packages/jobs/src/inngest/functions/notifications/notify.tsindex a972f0a95e..e545f9c476 100644--- a/packages/jobs/src/inngest/functions/notifications/notify.ts+++ b/packages/jobs/src/inngest/functions/notifications/notify.ts@@ -1,4 +1,5 @@import { getCarbonServiceRole } from "@carbon/auth/client.server";+import { resolveIntegrationSecrets } from "@carbon/ee";import {type CompanyIntegration,notifyTaskAssigned@@ -656,7 +657,7 @@ export const notifyFunction = inngest.createFunction(async () => {const { data: integration, error } = await client.from("companyIntegration")- .select("active, metadata")+ .select("active, metadata, secretRef").eq("companyId", payload.companyId).eq("id", "slack").maybeSingle();@@ -667,9 +668,15 @@ export const notifyFunction = inngest.createFunction(}if (!integration?.active) return [];- const metadata = integration.metadata as {- access_token?: string;- } | null;+ // Secret material (access_token) lives in Supabase Vault; merge it+ // back so we read the same shape as before. `client` is service-role.+ const metadata = (await resolveIntegrationSecrets(+ client,+ payload.companyId,+ "slack",+ integration.metadata,+ integration.secretRef+ )) as { access_token?: string } | null;const accessToken = metadata?.access_token;if (!accessToken) return [];diff --git a/packages/jobs/src/inngest/functions/scheduled/audit-archive.ts b/packages/jobs/src/inngest/functions/scheduled/audit-archive.tsindex 23ebe502bf..486ab792cf 100644--- a/packages/jobs/src/inngest/functions/scheduled/audit-archive.ts+++ b/packages/jobs/src/inngest/functions/scheduled/audit-archive.ts@@ -1,4 +1,5 @@import { gzipSync } from "node:zlib";+import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";import { getCarbonServiceRole } from "@carbon/auth/client.server";import { auditConfig } from "@carbon/database/audit.config";import type { AuditLogEntry } from "@carbon/database/audit.types";@@ -8,6 +9,15 @@ import { inngest } from "../../client";const log = getLogger("jobs", "audit-archive");+// NIST 800-171 3.3.8 / AU-11: controlled environments keep one year of+// directly-queryable audit history hot before it is archived. Non-controlled+// deployments keep the shorter default window (`auditConfig.retentionDays`) and+// rely on the persisted gzip archives (never deleted by the app) for older records.+const CONTROLLED_RETENTION_DAYS = 365;+const RETENTION_DAYS = CONTROLLED_ENVIRONMENT+ ? CONTROLLED_RETENTION_DAYS+ : auditConfig.retentionDays;+// Type for RPC callstype AuditArchiveRpcClient = {rpc(@@ -121,7 +131,7 @@ export const auditArchiveFunction = inngest.createFunction(// Calculate cutoff dateconst cutoffDate = new Date();- cutoffDate.setDate(cutoffDate.getDate() - auditConfig.retentionDays);+ cutoffDate.setDate(cutoffDate.getDate() - RETENTION_DAYS);logger.info(`Archiving audit logs older than ${cutoffDate.toISOString()}`diff --git a/packages/jobs/src/inngest/functions/tasks/update-permissions.ts b/packages/jobs/src/inngest/functions/tasks/update-permissions.tsindex 4751caa51a..efeed869c7 100644--- a/packages/jobs/src/inngest/functions/tasks/update-permissions.ts+++ b/packages/jobs/src/inngest/functions/tasks/update-permissions.ts@@ -1,5 +1,6 @@import type { Result } from "@carbon/auth";import { error, getClaims, getPermissionCacheKey, success } from "@carbon/auth";+import { logPermissionChange } from "@carbon/auth/auth-events.server";import { getCarbonServiceRole } from "@carbon/auth/client.server";import type { Database } from "@carbon/database";import { redis } from "@carbon/kv";@@ -39,7 +40,9 @@ export async function updatePermissions(id,permissions,companyId,- addOnly = false+ addOnly = false,+ actorId,+ ip}: {id: string;addOnly: boolean;@@ -48,9 +51,11 @@ export async function updatePermissions({ view: boolean; create: boolean; update: boolean; delete: boolean }>;companyId: string;+ actorId?: string;+ ip?: string;}): Promise<Result> {- if (await client.rpc("is_claims_admin")) {+ if (await client.rpc("is_claims_admin", { company: companyId })) {const claims = await getClaims(client, id);if (claims.error) return error(claims.error, "Failed to get claims");@@ -64,6 +69,11 @@ export async function updatePermissions() as Record<string, string[]>;delete updatedPermissions.role;+ // Snapshot the effective grant set BEFORE mutation — `updatedPermissions`+ // is the same object reference we mutate in place below, so this must be a+ // deep copy taken now to produce an honest before/after audit diff.+ const beforePermissions = structuredClone(updatedPermissions);+// add any missing claims to the current claimsObject.keys(permissions).forEach((name) => {const module = name.toLowerCase();@@ -166,6 +176,15 @@ export async function updatePermissions(});}+ // The "0" global-company wildcard is retired (NIST 800-171 3.1.5). Strip it+ // from every array so it can never be persisted to the authoritative table.+ for (const key of Object.keys(updatedPermissions)) {+ const value = updatedPermissions[key];+ if (Array.isArray(value)) {+ updatedPermissions[key] = value.filter((c: string) => c !== "0");+ }+ }+const permissionsUpdate = await getCarbonServiceRole().from("userPermission").update({ permissions: updatedPermissions })@@ -175,6 +194,17 @@ export async function updatePermissions(await redis.del(getPermissionCacheKey(id));+ // Audit the change (NIST 800-171 3.3.1/3.3.2): actor, target, before/after.+ logPermissionChange({+ actor: actorId,+ targetUserId: id,+ companyId,+ ip,+ before: beforePermissions,+ after: updatedPermissions,+ reason: addOnly ? "bulk-add" : "bulk-edit"+ });+return success("Permissions updated");} else {return error(null, "You do not have permission to update permissions");diff --git a/packages/jobs/src/inngest/functions/tasks/user-admin.ts b/packages/jobs/src/inngest/functions/tasks/user-admin.tsindex 6082a63820..6583613ed1 100644--- a/packages/jobs/src/inngest/functions/tasks/user-admin.ts+++ b/packages/jobs/src/inngest/functions/tasks/user-admin.ts@@ -33,7 +33,9 @@ export const userAdminFunction = inngest.createFunction(result = await deactivateUser(serviceRole,payload.id,- payload.companyId+ payload.companyId,+ payload.actorId,+ payload.ip);if (result.success && CarbonEdition === Edition.Cloud) {await updateSubscriptionQuantityForCompany(payload.companyId);diff --git a/packages/jobs/src/workflows/engine/owner.test.ts b/packages/jobs/src/workflows/engine/owner.test.tsindex ea470ab09e..b5ecb56cc8 100644--- a/packages/jobs/src/workflows/engine/owner.test.ts+++ b/packages/jobs/src/workflows/engine/owner.test.ts@@ -27,9 +27,11 @@ function permissions(}describe("hasPermission", () => {- it("grants when the action holds the all-companies wildcard", () => {+ it("no longer grants on the retired all-companies wildcard (NIST 3.1.5)", () => {+ // "0" was the global-company wildcard; it was removed. It is now just a+ // literal company id that never matches a real one.const perms = permissions({ purchasing: { view: ["0"] } });- expect(hasPermission(perms, "purchasing", "view", "cmp_1")).toBe(true);+ expect(hasPermission(perms, "purchasing", "view", "cmp_1")).toBe(false);});it("grants when the action names the company exactly", () => {diff --git a/packages/jobs/src/workflows/engine/owner.ts b/packages/jobs/src/workflows/engine/owner.tsindex 95d8dc1985..1691e92b51 100644--- a/packages/jobs/src/workflows/engine/owner.ts+++ b/packages/jobs/src/workflows/engine/owner.ts@@ -79,6 +79,5 @@ export function hasPermission(): boolean {const granted = permissions[module]?.[action];if (!Array.isArray(granted)) return false;- // "0" is the wildcard for all companies.- return granted.includes("0") || granted.includes(companyId);+ return granted.includes(companyId);}diff --git a/packages/kv/src/index.ts b/packages/kv/src/index.tsindex ec946ed163..c82121047d 100644--- a/packages/kv/src/index.ts+++ b/packages/kv/src/index.ts@@ -1,6 +1,22 @@import redis from "./client";export { redis };+export type {+ AccountLockoutOptions,+ LockDurationOptions,+ LockoutStatus+} from "./lockout";+export {+ AccountLockout,+ DEFAULT_BASE_LOCK_SECONDS,+ DEFAULT_LEVEL_TTL_SECONDS,+ DEFAULT_MAX_ATTEMPTS,+ DEFAULT_MAX_LOCK_SECONDS,+ DEFAULT_WINDOW,+ evaluateLockFromPttl,+ lockDurationSeconds,+ normalizeLoginIdentifier+} from "./lockout";export type {Duration,RatelimitConfig,diff --git a/packages/kv/src/lockout/index.ts b/packages/kv/src/lockout/index.tsnew file mode 100644index 0000000000..258959897b--- /dev/null+++ b/packages/kv/src/lockout/index.ts@@ -0,0 +1,16 @@+export type {+ AccountLockoutOptions,+ LockDurationOptions,+ LockoutStatus+} from "./lockout";+export {+ AccountLockout,+ DEFAULT_BASE_LOCK_SECONDS,+ DEFAULT_LEVEL_TTL_SECONDS,+ DEFAULT_MAX_ATTEMPTS,+ DEFAULT_MAX_LOCK_SECONDS,+ DEFAULT_WINDOW,+ evaluateLockFromPttl,+ lockDurationSeconds,+ normalizeLoginIdentifier+} from "./lockout";diff --git a/packages/kv/src/lockout/lockout.test.ts b/packages/kv/src/lockout/lockout.test.tsnew file mode 100644index 0000000000..de95a2696a--- /dev/null+++ b/packages/kv/src/lockout/lockout.test.ts@@ -0,0 +1,269 @@+import type { Redis } from "ioredis";+import { beforeEach, describe, expect, it, vi } from "vitest";+import {+ AccountLockout,+ DEFAULT_BASE_LOCK_SECONDS,+ DEFAULT_MAX_LOCK_SECONDS,+ evaluateLockFromPttl,+ lockDurationSeconds,+ normalizeLoginIdentifier+} from "./lockout";++describe("normalizeLoginIdentifier", () => {+ it("lowercases and trims so one account has one key", () => {+ expect(normalizeLoginIdentifier(" [email protected] ")).toBe(+ );+ expect(normalizeLoginIdentifier("[email protected]")).toBe("[email protected]");+ expect(normalizeLoginIdentifier("[email protected]")).toBe("[email protected]");+ });+});++describe("lockDurationSeconds", () => {+ it("is 0 for a non-lock (level < 1)", () => {+ expect(lockDurationSeconds(0)).toBe(0);+ expect(lockDurationSeconds(-3)).toBe(0);+ expect(lockDurationSeconds(Number.NaN)).toBe(0);+ });++ it("doubles per level from the base", () => {+ expect(lockDurationSeconds(1)).toBe(DEFAULT_BASE_LOCK_SECONDS); // 60+ expect(lockDurationSeconds(2)).toBe(DEFAULT_BASE_LOCK_SECONDS * 2); // 120+ expect(lockDurationSeconds(3)).toBe(DEFAULT_BASE_LOCK_SECONDS * 4); // 240+ expect(lockDurationSeconds(4)).toBe(DEFAULT_BASE_LOCK_SECONDS * 8); // 480+ });++ it("caps at the max", () => {+ expect(lockDurationSeconds(99)).toBe(DEFAULT_MAX_LOCK_SECONDS);+ });++ it("honors custom base/max", () => {+ expect(lockDurationSeconds(1, { baseLockSeconds: 30 })).toBe(30);+ expect(lockDurationSeconds(3, { baseLockSeconds: 30 })).toBe(120);+ expect(+ lockDurationSeconds(10, { baseLockSeconds: 30, maxLockSeconds: 90 })+ ).toBe(90);+ });++ it("floors a fractional level", () => {+ expect(lockDurationSeconds(2.9)).toBe(DEFAULT_BASE_LOCK_SECONDS * 2);+ });+});++describe("evaluateLockFromPttl", () => {+ it("treats missing (-2) and no-expiry (-1) and <=0 as unlocked", () => {+ expect(evaluateLockFromPttl(-2)).toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ expect(evaluateLockFromPttl(-1)).toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ expect(evaluateLockFromPttl(0)).toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ });++ it("reports locked with ceil(seconds) for a positive TTL", () => {+ expect(evaluateLockFromPttl(59_400)).toEqual({+ locked: true,+ retryAfterSeconds: 60+ });+ expect(evaluateLockFromPttl(1)).toEqual({+ locked: true,+ retryAfterSeconds: 1+ });+ });+});++/**+ * Hand-rolled mock redis (mirrors ratelimit.test.ts): the sliding-window limiter+ * runs a lua `eval`, which ioredis-mock does not execute, so we control it here.+ */+const createMockRedis = () => {+ const storage = new Map<string, unknown>();++ return {+ eval: vi.fn(),+ pttl: vi.fn().mockImplementation((key: string) => {+ const entry = storage.get(key) as { pttl: number } | undefined;+ return Promise.resolve(entry ? entry.pttl : -2);+ }),+ incr: vi.fn().mockImplementation((key: string) => {+ const next = ((storage.get(key) as number | undefined) ?? 0) + 1;+ storage.set(key, next);+ return Promise.resolve(next);+ }),+ expire: vi.fn().mockResolvedValue(1),+ set: vi+ .fn()+ .mockImplementation(+ (+ key: string,+ _v: unknown,+ _ex: string,+ seconds: number,+ nx?: string+ ) => {+ // Honor SET ... NX: a claim on an already-held lock returns null,+ // which is how the resilient client also signals "not set".+ if (nx === "NX" && storage.has(key)) return Promise.resolve(null);+ storage.set(key, { pttl: seconds * 1000 });+ return Promise.resolve("OK");+ }+ ),+ del: vi.fn().mockImplementation((...keys: string[]) => {+ keys.forEach((k) => {+ storage.delete(k);+ });+ return Promise.resolve(keys.length);+ }),+ _storage: storage+ } as unknown as Redis & { _storage: Map<string, unknown> };+};++/** Make the sliding-window `eval` return [remaining, limit]. remaining<0 = over. */+const stubWindow = (redis: Redis, remaining: number, limit = 5) => {+ (redis.eval as ReturnType<typeof vi.fn>).mockResolvedValueOnce([+ remaining,+ limit+ ]);+};++describe("AccountLockout", () => {+ let redis: Redis & { _storage: Map<string, unknown> };++ beforeEach(() => {+ redis = createMockRedis();+ vi.clearAllMocks();+ });++ it("status is unlocked when no lock key exists", async () => {+ const lockout = new AccountLockout({ redis });+ await expect(lockout.status("[email protected]")).resolves.toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ });++ it("recordFailure under the window does not lock", async () => {+ const lockout = new AccountLockout({ redis });+ stubWindow(redis, 3); // still 3 attempts remaining+ const res = await lockout.recordFailure("[email protected]");+ expect(res.locked).toBe(false);+ expect(redis.set).not.toHaveBeenCalled();+ });++ it("recordFailure over the window engages a level-1 exponential lock", async () => {+ const lockout = new AccountLockout({ redis });+ stubWindow(redis, -1); // over the allowance+ const res = await lockout.recordFailure("[email protected] ");+ expect(res.locked).toBe(true);+ expect(res.retryAfterSeconds).toBe(DEFAULT_BASE_LOCK_SECONDS);+ // keyed by the NORMALIZED email, claimed atomically with NX+ expect(redis.set).toHaveBeenCalledWith(+ "@carbon/lockout:locked:[email protected]",+ "1",+ "EX",+ DEFAULT_BASE_LOCK_SECONDS,+ "NX"+ );+ });++ it("escalates the lock duration on repeat lockouts", async () => {+ const lockout = new AccountLockout({ redis });++ stubWindow(redis, -1);+ const first = await lockout.recordFailure("[email protected]");+ expect(first.retryAfterSeconds).toBe(DEFAULT_BASE_LOCK_SECONDS); // 60++ // Simulate the first lock having expired (clear lock key, keep level).+ redis._storage.delete("@carbon/lockout:locked:[email protected]");++ stubWindow(redis, -1);+ const second = await lockout.recordFailure("[email protected]");+ expect(second.retryAfterSeconds).toBe(DEFAULT_BASE_LOCK_SECONDS * 2); // 120+ });++ it("a concurrent burst engages the lock exactly once (no escalation inflation)", async () => {+ const lockout = new AccountLockout({ redis });+ // Every request in the burst clears the window.+ (redis.eval as ReturnType<typeof vi.fn>).mockResolvedValue([-1, 5]);++ const results = await Promise.all(+ Array.from({ length: 8 }, () => lockout.recordFailure("[email protected]"))+ );++ // All observe a lock, all at the BASE duration — one burst is ONE offense,+ // never eight escalations that inflate the lock toward the cap.+ expect(results.every((r) => r.locked)).toBe(true);+ expect(+ results.every((r) => r.retryAfterSeconds === DEFAULT_BASE_LOCK_SECONDS)+ ).toBe(true);+ // The escalation level was incremented once, by the single claim winner.+ expect(redis.incr).toHaveBeenCalledTimes(1);+ });++ it("fails OPEN (no phantom lock) when the lock write fails soft", async () => {+ const lockout = new AccountLockout({ redis });+ stubWindow(redis, -1); // over the window+ // The resilient client returns null for the SET when Redis is unreachable.+ (redis.set as ReturnType<typeof vi.fn>).mockResolvedValueOnce(null);++ const res = await lockout.recordFailure("[email protected]");++ // Must NOT report `{ locked: true, retryAfterSeconds: 0 }` with no stored+ // lock — a failed claim falls through to status(), which fails open.+ expect(res).toEqual({ locked: false, retryAfterSeconds: 0 });+ // No escalation on a claim that never landed.+ expect(redis.incr).not.toHaveBeenCalled();+ });++ it("recordFailure short-circuits to the existing lock without consuming an attempt", async () => {+ const lockout = new AccountLockout({ redis });+ // Pre-seed an active lock.+ redis._storage.set("@carbon/lockout:locked:[email protected]", { pttl: 30_000 });++ const res = await lockout.recordFailure("[email protected]");+ expect(res).toEqual({ locked: true, retryAfterSeconds: 30 });+ expect(redis.eval).not.toHaveBeenCalled(); // never touched the window counter+ });++ it("status reports an active lock with retry seconds", async () => {+ const lockout = new AccountLockout({ redis });+ redis._storage.set("@carbon/lockout:locked:[email protected]", { pttl: 45_000 });+ await expect(lockout.status("[email protected]")).resolves.toEqual({+ locked: true,+ retryAfterSeconds: 45+ });+ });++ it("reset clears the lock and level keys", async () => {+ const lockout = new AccountLockout({ redis });+ redis._storage.set("@carbon/lockout:locked:[email protected]", { pttl: 30_000 });+ redis._storage.set("@carbon/lockout:level:[email protected]", 2);++ await lockout.reset("[email protected]");+ expect(redis.del).toHaveBeenCalledWith(+ "@carbon/lockout:locked:[email protected]",+ "@carbon/lockout:level:[email protected]"+ );+ await expect(lockout.status("[email protected]")).resolves.toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ });++ it("fails OPEN when redis throws (a KV outage must not wall out auth)", async () => {+ const lockout = new AccountLockout({ redis });+ (redis.pttl as ReturnType<typeof vi.fn>).mockRejectedValueOnce(+ new Error("connection refused")+ );+ await expect(lockout.status("[email protected]")).resolves.toEqual({+ locked: false,+ retryAfterSeconds: 0+ });+ });+});diff --git a/packages/kv/src/lockout/lockout.ts b/packages/kv/src/lockout/lockout.tsnew file mode 100644index 0000000000..72dd83b020--- /dev/null+++ b/packages/kv/src/lockout/lockout.ts@@ -0,0 +1,218 @@+import type { Redis } from "ioredis";+import { Ratelimit } from "../ratelimit";+import type { Duration } from "../ratelimit/types";++/**+ * Per-account failed-login lockout (NIST SP 800-171 3.1.8 / AC-7).+ *+ * The login routes already rate-limit by IP (`Ratelimit.slidingWindow`, key = ip).+ * That caps a single source but never a single ACCOUNT: an attacker rotating IPs,+ * or hammering one email to spam magic links / probe existence, is unbounded per+ * email. This layer adds an EMAIL-keyed attempt counter with a temporary,+ * exponentially-backed-off lock — additive, on top of the IP limit, never a+ * replacement for it.+ *+ * The primary flow is passwordless magic-link, so "failed attempt" here means an+ * attempt against an account, not a wrong password; the control 3.1.8 asks for is+ * the account-scoped cap, which this provides while guarding enumeration/abuse.+ *+ * Redis outages fail OPEN (a KV blip must never wall a user out of auth): every+ * I/O path swallows its error and reports "not locked".+ */++export const DEFAULT_MAX_ATTEMPTS = 5;+export const DEFAULT_WINDOW: Duration = "15 m";+export const DEFAULT_BASE_LOCK_SECONDS = 60; // first lock: 1 minute+export const DEFAULT_MAX_LOCK_SECONDS = 60 * 60; // cap: 1 hour+/** How long a lock "level" survives so repeat offenders keep escalating. */+export const DEFAULT_LEVEL_TTL_SECONDS = 24 * 60 * 60; // 1 day++const DEFAULT_PREFIX = "@carbon/lockout";++/**+ * Normalize an email into the lockout key: trim + lowercase so `[email protected] `,+ * `[email protected]`, and `[email protected]` all count against ONE account. Keys are derived+ * only from this — never the raw input.+ */+export function normalizeLoginIdentifier(email: string): string {+ return email.trim().toLowerCase();+}++export interface LockDurationOptions {+ baseLockSeconds?: number;+ maxLockSeconds?: number;+}++/**+ * Exponential backoff for the Nth engaged lock, capped.+ * level 1 → base, level 2 → base·2, level 3 → base·4, … clamped to max.+ * `level < 1` is not a lock (0 seconds).+ */+export function lockDurationSeconds(+ level: number,+ options: LockDurationOptions = {}+): number {+ if (!Number.isFinite(level) || level < 1) return 0;+ const base = options.baseLockSeconds ?? DEFAULT_BASE_LOCK_SECONDS;+ const max = options.maxLockSeconds ?? DEFAULT_MAX_LOCK_SECONDS;+ const raw = base * 2 ** (Math.floor(level) - 1);+ return Math.min(raw, max);+}++export interface LockoutStatus {+ /** True while the account is inside an active lock window. */+ locked: boolean;+ /** Whole seconds until the lock lifts (ceil); 0 when not locked. */+ retryAfterSeconds: number;+}++const NOT_LOCKED: LockoutStatus = { locked: false, retryAfterSeconds: 0 };++/**+ * Turn a redis PTTL (ms; -1 no-expiry, -2 missing) into a status. Pure so the+ * lock-window decision is testable without redis.+ */+export function evaluateLockFromPttl(pttlMs: number): LockoutStatus {+ if (!Number.isFinite(pttlMs) || pttlMs <= 0) return NOT_LOCKED;+ return { locked: true, retryAfterSeconds: Math.ceil(pttlMs / 1000) };+}++export interface AccountLockoutOptions {+ redis: Redis;+ /** Failed attempts allowed per window before a lock engages. */+ maxAttempts?: number;+ /** Sliding window the attempts are counted over. */+ window?: Duration;+ baseLockSeconds?: number;+ maxLockSeconds?: number;+ levelTtlSeconds?: number;+ prefix?: string;+}++export class AccountLockout {+ private readonly redis: Redis;+ private readonly ratelimit: Ratelimit;+ private readonly baseLockSeconds: number;+ private readonly maxLockSeconds: number;+ private readonly levelTtlSeconds: number;+ private readonly prefix: string;++ constructor(options: AccountLockoutOptions) {+ this.redis = options.redis;+ this.baseLockSeconds = options.baseLockSeconds ?? DEFAULT_BASE_LOCK_SECONDS;+ this.maxLockSeconds = options.maxLockSeconds ?? DEFAULT_MAX_LOCK_SECONDS;+ this.levelTtlSeconds = options.levelTtlSeconds ?? DEFAULT_LEVEL_TTL_SECONDS;+ this.prefix = options.prefix ?? DEFAULT_PREFIX;++ this.ratelimit = new Ratelimit({+ redis: this.redis,+ limiter: Ratelimit.slidingWindow(+ options.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,+ options.window ?? DEFAULT_WINDOW+ ),+ prefix: `${this.prefix}:attempts`+ });+ }++ private lockKey(id: string): string {+ return `${this.prefix}:locked:${id}`;+ }++ private levelKey(id: string): string {+ return `${this.prefix}:level:${id}`;+ }++ /**+ * Read-only: is this account currently locked? Consumes no attempt — call it+ * first on every login POST so an already-locked account is rejected before+ * any work (magic link, user lookup) runs.+ */+ async status(email: string): Promise<LockoutStatus> {+ const id = normalizeLoginIdentifier(email);+ try {+ const pttl = await this.redis.pttl(this.lockKey(id));+ return evaluateLockFromPttl(pttl);+ } catch {+ return NOT_LOCKED; // fail open+ }+ }++ /**+ * Record one failed/abusive attempt for this account. If it pushes the account+ * past the window's allowance, engage (or escalate) an exponential lock and+ * return `locked: true`. Otherwise `locked: false`.+ *+ * Engagement is claimed with a single `SET … NX`, so a concurrent burst that+ * all clears the window engages the lock exactly ONCE: only the request that+ * wins the claim increments the escalation level and finalizes the TTL —+ * losers observe the winner's lock instead of each re-incrementing the level+ * and overwriting its TTL (which would inflate one burst into repeat+ * offenses). A failed write (the resilient client returns `null` when Redis is+ * unreachable) never reports a phantom lock: it falls through to `status()`,+ * which fails OPEN. A KV blip must never wall a user out of auth.+ */+ async recordFailure(email: string): Promise<LockoutStatus> {+ const id = normalizeLoginIdentifier(email);+ try {+ // If already locked, report it without burning a fresh attempt.+ const existing = await this.status(email);+ if (existing.locked) return existing;++ const { success } = await this.ratelimit.limit(id);+ if (success) return NOT_LOCKED;++ // Window exceeded → claim the lock. NX makes this the atomic mutual-+ // exclusion point: exactly one concurrent request wins and owns the+ // escalation below; a `null` result is either a peer's lock or Redis down.+ const claimed = await this.redis.set(+ this.lockKey(id),+ "1",+ "EX",+ this.baseLockSeconds,+ "NX"+ );+ if (claimed !== "OK") {+ // A peer already engaged → report their lock; Redis down → NOT_LOCKED.+ // Either way this reads the persisted TTL rather than inventing one, so+ // there is no `{ locked: true, retryAfterSeconds: 0 }` phantom lock.+ return this.status(email);+ }++ // We own the lock (currently at base TTL). Escalate the level ONCE and, if+ // this is a repeat offense, extend the TTL to match.+ const level = await this.redis.incr(this.levelKey(id));+ if (typeof level !== "number" || !Number.isFinite(level) || level < 1) {+ // Redis dropped after the claim — the base-TTL lock we just set stands.+ return { locked: true, retryAfterSeconds: this.baseLockSeconds };+ }+ await this.redis.expire(this.levelKey(id), this.levelTtlSeconds);+ const seconds = lockDurationSeconds(level, {+ baseLockSeconds: this.baseLockSeconds,+ maxLockSeconds: this.maxLockSeconds+ });+ if (seconds > this.baseLockSeconds) {+ await this.redis.set(this.lockKey(id), "1", "EX", seconds);+ }+ // Reset the attempt counter so a fresh window starts after the lock lifts.+ await this.ratelimit.resetUsedTokens(id);++ return { locked: true, retryAfterSeconds: seconds };+ } catch {+ return NOT_LOCKED; // fail open+ }+ }++ /**+ * Clear all lockout state for an account after a genuine success (e.g. the dev+ * bypass sign-in). Escalation history is dropped too.+ */+ async reset(email: string): Promise<void> {+ const id = normalizeLoginIdentifier(email);+ try {+ await this.redis.del(this.lockKey(id), this.levelKey(id));+ await this.ratelimit.resetUsedTokens(id);+ } catch {+ // Redis down: nothing to clear, don't throw.+ }+ }+}diff --git a/packages/lib/src/events.ts b/packages/lib/src/events.tsindex 61c5c960a2..274d9e4ceb 100644--- a/packages/lib/src/events.ts+++ b/packages/lib/src/events.ts@@ -233,6 +233,11 @@ export type Events = {{ view: boolean; create: boolean; update: boolean; delete: boolean }>;companyId: string;+ // The acting admin's userId — recorded as the actor on the audit event+ // (NIST 800-171 3.3.1/3.3.2). Optional for backward-compatible replays.+ actorId?: string;+ // Source IP of the request that triggered the change (AU-3 source-of-event).+ ip?: string;};};@@ -262,6 +267,11 @@ export type Events = {id: string;type: "deactivate";companyId: string;+ // The acting admin's userId — recorded as the actor on the audit+ // event (NIST 800-171 3.3.1/3.3.2). Optional for replay safety.+ actorId?: string;+ // Source IP of the request that triggered the change (AU-3 source-of-event).+ ip?: string;}| {id: string;diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex bba92a28eb..fbc815ea67 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -110,6 +110,10 @@ msgstr "{0} Probleme — nicht veröffentlicht"msgid "{0} Processes"msgstr "{0} Prozesse"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} registriert"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} Lieferanten mit einem Saldo"@@ -1062,6 +1066,9 @@ msgstr "Fügen Sie Notizen zu Ihrer Entscheidung hinzu..."msgid "Add Approval Requirement"msgstr "Genehmigungsanforderung hinzufügen"+msgid "Add Authenticator App"+msgstr "Authentifikator-App hinzufügen"+msgid "Add Calibration Record"msgstr "Kalibrierungsdatensatz hinzufügen"@@ -1137,6 +1144,9 @@ msgstr "Partner hinzufügen"msgid "Add parts"msgstr "Teile hinzufügen"+msgid "Add Passkey"+msgstr "Passkey hinzufügen"+msgid "Add path"msgstr "Pfad hinzufügen"@@ -1996,6 +2006,9 @@ msgstr "Sind Sie sicher, dass Sie diese Kanban-Karte löschen möchten? Dies kanmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Sind Sie sicher, dass Sie diesen Wartungseinsatz löschen möchten? Dies kann nicht rückgängig gemacht werden."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Sind Sie sicher, dass Sie diesen Passkey löschen möchten? Sie können sich damit nicht mehr anmelden."+msgid "Are you sure you want to delete this quality document?"msgstr "Sind Sie sicher, dass Sie dieses Qualitätsdokument löschen möchten?"@@ -2261,6 +2274,9 @@ msgstr "Audit-Protokolle"msgid "Authentication Error"msgstr "Authentifizierungsfehler"+msgid "Authenticator app"+msgstr "Authentifikator-App"+msgid "Authenticator QR code"msgstr "Authentifizierungs-QR-Code"@@ -4763,6 +4779,12 @@ msgstr "Teil löschen"msgid "Delete Partner"msgstr "Partner löschen"+msgid "Delete passkey"+msgstr "Passkey löschen"++msgid "Delete Passkey"+msgstr "Passkey löschen"+msgid "Delete Payment"msgstr "Zahlung löschen"@@ -5571,6 +5593,9 @@ msgstr "Teil bearbeiten"msgid "Edit Partner"msgstr "Partner bearbeiten"+msgid "Edit Passkey"+msgstr "Passkey bearbeiten"+msgid "Edit Payment"msgstr "Zahlung bearbeiten"@@ -5903,6 +5928,9 @@ msgstr "Text eingeben…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Geben Sie den 6-stelligen Code aus Ihrer Authentifizierungs-App ein"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Geben Sie den 6-stelligen Code aus Ihrer Authentifikator-App ein, um fortzufahren."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Geben Sie die Menge ein, die diese Bewegung hätte sein sollen. Eine Gegenbewegung für die Differenz wird neben dem Original in dessen Zeitraum verbucht."@@ -6443,6 +6471,9 @@ msgstr "Fehler beim Abrufen von Risiken"msgid "Failed to fetch suggestions"msgstr "Fehler beim Abrufen von Vorschlägen"+msgid "Failed to get options"+msgstr "Optionen konnten nicht abgerufen werden"+msgid "Failed to initialize Carbon client"msgstr "Fehler beim Initialisieren des Carbon-Clients"@@ -6513,6 +6544,9 @@ msgstr "Konto konnte nicht verschoben werden: {0}"msgid "Failed to regenerate thumbnail"msgstr "Fehler beim Neuerstellen der Miniaturansicht"+msgid "Failed to register passkey"+msgstr "Passkey konnte nicht registriert werden"+msgid "Failed to remove image: {errorMessage}"msgstr "Fehler beim Entfernen des Bildes: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Letzte Ausführung"msgid "Last synced: <0/>"msgstr "Zuletzt synchronisiert: <0/>"+msgid "Last used"+msgstr "Zuletzt verwendet"+msgid "Latest operation end"msgstr "Ende der neuesten Operation"@@ -9846,6 +9883,9 @@ msgstr "Keine Teile-ID"msgid "No parts"msgstr "Keine Teile"+msgid "No passkeys registered yet."+msgstr "Noch keine Passkeys registriert."+msgid "No payables"msgstr "Keine Verbindlichkeiten"@@ -10447,9 +10487,15 @@ msgstr "Optionale Seiten & Abschnitte"msgid "Options"msgstr "Optionen"+msgid "or"+msgstr "oder"+msgid "OR"msgstr "ODER"+msgid "Or enter this secret manually:"+msgstr "Oder geben Sie dieses Geheimnis manuell ein:"+msgid "Order"msgstr "Bestellung"@@ -10716,6 +10762,18 @@ msgstr "Bestanden"msgid "Passed"msgstr "Bestanden"+msgid "Passkey name"+msgstr "Passkey-Name"++msgid "Passkey unlock failed"+msgstr "Passkey-Entsperrung fehlgeschlagen"++msgid "Passkeys"+msgstr "Passkeys"++msgid "Passkeys are disabled"+msgstr "Passkeys sind deaktiviert"+msgid "Path"msgstr "Pfad"@@ -12011,6 +12069,9 @@ msgstr "Registriert"msgid "Registered"msgstr "Bestellpunkt"+msgid "Registration failed"+msgstr "Registrierung fehlgeschlagen"+msgid "Registration Number"msgstr "Registrierungsnummer"@@ -12087,6 +12148,9 @@ msgstr "Entfernen {0}"msgid "Remove {label}"msgstr "Entfernen {label}"+msgid "Remove authenticator app"+msgstr "Authentifikator-App entfernen"+msgid "Remove clause"msgstr "Klausel entfernen"@@ -12135,6 +12199,9 @@ msgstr "Entfernen Sie diesen Speichertyp aus allen referenzierenden Speichereinhmsgid "Remove tool"msgstr "Werkzeug entfernen"+msgid "Remove two-factor authentication"+msgstr "Zwei-Faktor-Authentifizierung entfernen"+msgid "Removed"msgstr "Entfernt"@@ -12241,6 +12308,9 @@ msgstr "Genehmigung anfordern"msgid "Requested Date"msgstr "Angeforderte Datum"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Erfordert einen 6-stelligen Code aus einer Authentifikator-App beim Anmelden."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Erfordert eine Authentifizierungs-App, bevor jemand dieses Unternehmen öffnen kann. Ihre anderen Unternehmen sind nicht betroffen. Besuchen Sie die <0>Seite mit den Mitarbeiterkonten</0>, um den Status jeder Person zu sehen."@@ -12274,6 +12344,9 @@ msgstr "Erforderliche Aktionen (in Reihenfolge)"msgid "Required Date"msgstr "Erforderliches Datum"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Erforderlich in einer kontrollierten Umgebung – Audit-Logging kann nicht deaktiviert werden."+msgid "Requirement"msgstr "Anforderung"@@ -12827,6 +12900,9 @@ msgstr "Scannen oder suchen..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Scannen Sie eine verfolgbare Entität aus dieser Charge oder wählen Sie eine aus, um sie als Beispielspalte hinzuzufügen, und erfassen Sie dann ihr Ergebnis in der Tabelle."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Scannen Sie diesen QR-Code mit Ihrer Authentifikator-App (z. B. Google Authenticator oder 1Password) und geben Sie dann den 6-stelligen Code ein, den sie anzeigt."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Scannen Sie dies mit Ihrer Authentifizierungs-App und geben Sie dann den 6-stelligen Code ein, der angezeigt wird."@@ -12989,6 +13065,9 @@ msgstr "Sekunden zum Abschluss"msgid "Seconds/Piece"msgstr "Sekunden/Stück"+msgid "Secret copied to clipboard"+msgstr "Geheimnis in die Zwischenablage kopiert"+msgid "Section"msgstr "Abschnitt"@@ -13306,6 +13385,9 @@ msgstr "Dienstleistungen"msgid "Services"msgstr "Dienstleistungen"+msgid "Session locked"+msgstr "Sitzung gesperrt"+msgid "Set a target"msgstr "Ziel festlegen"@@ -13342,6 +13424,9 @@ msgstr "Authentifizierungs-App einrichten"msgid "Set up the right way"msgstr "Richtig einrichten"+msgid "Set up two-factor authentication"+msgstr "Zwei-Faktor-Authentifizierung einrichten"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Richten Sie Ihr Unternehmen mit einem Schritt-für-Schritt-Implementierungsplan ein, der Einrichtung, Daten, Schulung und Go-live abdeckt."@@ -13617,6 +13702,9 @@ msgstr "Wird als schwacher Hintergrund hinter jeder Seite generierter PDFs angezmsgid "Shown to the user when this rule fails."msgstr "Wird dem Benutzer angezeigt, wenn diese Regel fehlschlägt."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Melden Sie sich mit Biometrie statt mit einem Magic Link an. Passkeys sind durch Face ID, Touch ID oder Ihre Geräte-PIN gesichert."+msgid "Sign in with Email"msgstr "Mit E-Mail anmelden"@@ -13635,6 +13723,9 @@ msgstr "Abmelden"msgid "Sign Out"msgstr "Abmelden"+msgid "Sign out instead"+msgstr "Stattdessen abmelden"+msgid "Sign-off review before moving to the next step"msgstr "Abzeichnung vor dem Übergang zum nächsten Schritt"@@ -13650,6 +13741,9 @@ msgstr "Signierte Menge – negativ für ausgehende Bewegungen"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Die Anmeldung erfordert auch einen Einmalcode aus Ihrer Authentifizierungs-App"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Die Anmeldung erfordert keinen Code mehr. Geben Sie den aktuellen 6-stelligen Code aus Ihrer Authentifikator-App ein, um zu bestätigen."+msgid "Sites & locations"msgstr "Standorte & Lagerorte"@@ -15824,9 +15918,18 @@ msgstr "Zwei-Faktor"msgid "Two-factor authentication"msgstr "Zwei-Faktor-Authentifizierung"+msgid "Two-factor authentication disabled"+msgstr "Zwei-Faktor-Authentifizierung deaktiviert"++msgid "Two-factor authentication enabled"+msgstr "Zwei-Faktor-Authentifizierung aktiviert"+msgid "Two-Factor Authentication Enforcement"msgstr "Erzwingung der Zwei-Faktor-Authentifizierung"+msgid "Two-factor authentication is not enabled."+msgstr "Zwei-Faktor-Authentifizierung ist nicht aktiviert."+msgid "Type"msgstr "Typ"@@ -15857,6 +15960,9 @@ msgstr "Typen"msgid "U.S. Person Attestation"msgstr "U.S. Person-Bestätigung"+msgid "Unable to unlock"+msgstr "Entsperrung nicht möglich"+msgid "Unapplied"msgstr "Nicht angewendet"@@ -15959,6 +16065,9 @@ msgstr "Auftrag von Verkaufsauftrag trennen?"msgid "Unlock"msgstr "Entsperren"+msgid "Unlock with passkey"+msgstr "Mit Passkey entsperren"+msgid "Unmapped accounts"msgstr "Nicht zugeordnete Konten"@@ -17301,6 +17410,9 @@ msgstr "Ihr Projektteam"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Ihre echten Daten sind geladen und Sie haben eine Stichprobe überprüft und genehmigt."+msgid "Your session was locked after inactivity."+msgstr "Ihre Sitzung wurde nach Inaktivität gesperrt."+msgid "Your source data is accessible and reasonably clean"msgstr "Ihre Quelldaten sind zugänglich und angemessen bereinigt"diff --git a/packages/locale/locales/de/mes.po b/packages/locale/locales/de/mes.poindex 35493d37f0..d36eec0e80 100644--- a/packages/locale/locales/de/mes.po+++ b/packages/locale/locales/de/mes.po@@ -425,6 +425,9 @@ msgstr "PIN für {0} eingeben"msgid "Enter the 6-digit code from your authenticator app"msgstr "Geben Sie den 6-stelligen Code aus Ihrer Authentifizierungs-App ein"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Geben Sie den 6-stelligen Code aus Ihrer Authenticator-App ein, um fortzufahren."+msgid "Error"msgstr "Fehler"@@ -926,6 +929,9 @@ msgstr "Vom Bediener durchgeführt"msgid "Optional"msgstr "Optional"+msgid "or"+msgstr "oder"+msgid "Overall result"msgstr "Gesamtergebnis"@@ -947,6 +953,9 @@ msgstr "Teilweise Disposition"msgid "Passed Inspection"msgstr "Prüfung bestanden"+msgid "Passkey unlock failed"+msgstr "Passkey-Entsperrung fehlgeschlagen"+msgid "Pause"msgstr "Pause"@@ -1221,6 +1230,9 @@ msgstr "Seriennummern"msgid "Serial Numbers"msgstr "Seriennummern"+msgid "Session locked"+msgstr "Sitzung gesperrt"+msgid "Set Clock Out"msgstr "Ausstempelzeit setzen"@@ -1260,6 +1272,9 @@ msgstr "Abmelden"msgid "Sign Out"msgstr "Abmelden"+msgid "Sign out instead"+msgstr "Stattdessen abmelden"+msgid "Signed in as {stationName}"msgstr "Angemeldet als {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Zwei-Faktor-Authentifizierung erforderlich"msgid "Type a message..."msgstr "Nachricht eingeben..."+msgid "Unable to unlock"+msgstr "Entsperrung nicht möglich"+msgid "Unissued serial/batch materials"msgstr "Nicht ausgegebene Serien-/Chargenmaterialien"msgid "Unknown"msgstr "Unbekannt"+msgid "Unlock"+msgstr "Entsperren"++msgid "Unlock with passkey"+msgstr "Mit Passkey entsperren"+msgid "Unpick"msgstr "Entfernen"@@ -1475,3 +1499,6 @@ msgstr "Sie sind seit {hoursElapsed} Stunden eingestempelt. Haben Sie vergessenmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Ihre Organisation erfordert eine Authentifizierungs-App. Richten Sie sie in Carbon ein und kommen Sie dann hierher zurück."++msgid "Your session was locked after inactivity."+msgstr "Ihre Sitzung wurde nach Inaktivität gesperrt."diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex eb2871b54e..0474168a33 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problems — not published"msgid "{0} Processes"msgstr "{0} Processes"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} registered"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} suppliers with a balance"@@ -1062,6 +1066,9 @@ msgstr "Add any notes about your decision..."msgid "Add Approval Requirement"msgstr "Add Approval Requirement"+msgid "Add Authenticator App"+msgstr "Add Authenticator App"+msgid "Add Calibration Record"msgstr "Add Calibration Record"@@ -1137,6 +1144,9 @@ msgstr "Add Partner"msgid "Add parts"msgstr "Add parts"+msgid "Add Passkey"+msgstr "Add Passkey"+msgid "Add path"msgstr "Add path"@@ -1996,6 +2006,9 @@ msgstr "Are you sure you want to delete this kanban card? This cannot be undone.msgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Are you sure you want to delete this maintenance dispatch? This cannot be undone."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgid "Are you sure you want to delete this quality document?"msgstr "Are you sure you want to delete this quality document?"@@ -2261,6 +2274,9 @@ msgstr "Audit Logs"msgid "Authentication Error"msgstr "Authentication Error"+msgid "Authenticator app"+msgstr "Authenticator app"+msgid "Authenticator QR code"msgstr "Authenticator QR code"@@ -4763,6 +4779,12 @@ msgstr "Delete Part"msgid "Delete Partner"msgstr "Delete Partner"+msgid "Delete passkey"+msgstr "Delete passkey"++msgid "Delete Passkey"+msgstr "Delete Passkey"+msgid "Delete Payment"msgstr "Delete Payment"@@ -5571,6 +5593,9 @@ msgstr "Edit Part"msgid "Edit Partner"msgstr "Edit Partner"+msgid "Edit Passkey"+msgstr "Edit Passkey"+msgid "Edit Payment"msgstr "Edit Payment"@@ -5903,6 +5928,9 @@ msgstr "Enter text…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Enter the 6-digit code from your authenticator app"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Enter the 6-digit code from your authenticator app to resume."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."@@ -6443,6 +6471,9 @@ msgstr "Failed to fetch risks"msgid "Failed to fetch suggestions"msgstr "Failed to fetch suggestions"+msgid "Failed to get options"+msgstr "Failed to get options"+msgid "Failed to initialize Carbon client"msgstr "Failed to initialize Carbon client"@@ -6513,6 +6544,9 @@ msgstr "Failed to move account: {0}"msgid "Failed to regenerate thumbnail"msgstr "Failed to regenerate thumbnail"+msgid "Failed to register passkey"+msgstr "Failed to register passkey"+msgid "Failed to remove image: {errorMessage}"msgstr "Failed to remove image: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Last Run"msgid "Last synced: <0/>"msgstr "Last synced: <0/>"+msgid "Last used"+msgstr "Last used"+msgid "Latest operation end"msgstr "Latest operation end"@@ -9846,6 +9883,9 @@ msgstr "No part ID"msgid "No parts"msgstr "No parts"+msgid "No passkeys registered yet."+msgstr "No passkeys registered yet."+msgid "No payables"msgstr "No payables"@@ -10447,9 +10487,15 @@ msgstr "Optional pages & sections"msgid "Options"msgstr "Options"+msgid "or"+msgstr "or"+msgid "OR"msgstr "OR"+msgid "Or enter this secret manually:"+msgstr "Or enter this secret manually:"+msgid "Order"msgstr "Order"@@ -10716,6 +10762,18 @@ msgstr "Pass"msgid "Passed"msgstr "Passed"+msgid "Passkey name"+msgstr "Passkey name"++msgid "Passkey unlock failed"+msgstr "Passkey unlock failed"++msgid "Passkeys"+msgstr "Passkeys"++msgid "Passkeys are disabled"+msgstr "Passkeys are disabled"+msgid "Path"msgstr "Path"@@ -12011,6 +12069,9 @@ msgstr "Register Existing Asset"msgid "Registered"msgstr "Registered"+msgid "Registration failed"+msgstr "Registration failed"+msgid "Registration Number"msgstr "Registration Number"@@ -12087,6 +12148,9 @@ msgstr "Remove {0}"msgid "Remove {label}"msgstr "Remove {label}"+msgid "Remove authenticator app"+msgstr "Remove authenticator app"+msgid "Remove clause"msgstr "Remove clause"@@ -12135,6 +12199,9 @@ msgstr "Remove this storage type from all referencing storage units and delete imsgid "Remove tool"msgstr "Remove tool"+msgid "Remove two-factor authentication"+msgstr "Remove two-factor authentication"+msgid "Removed"msgstr "Removed"@@ -12241,6 +12308,9 @@ msgstr "Request Approval"msgid "Requested Date"msgstr "Requested Date"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Require a 6-digit code from an authenticator app when signing in."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."@@ -12274,6 +12344,9 @@ msgstr "Required Actions (in order)"msgid "Required Date"msgstr "Required Date"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Required in a controlled environment — audit logging cannot be turned off."+msgid "Requirement"msgstr "Requirement"@@ -12827,6 +12900,9 @@ msgstr "Scan or search..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Scan this with your authenticator app, then enter the 6-digit code it shows."@@ -12989,6 +13065,9 @@ msgstr "Seconds to complete"msgid "Seconds/Piece"msgstr "Seconds/Piece"+msgid "Secret copied to clipboard"+msgstr "Secret copied to clipboard"+msgid "Section"msgstr "Section"@@ -13306,6 +13385,9 @@ msgstr "services"msgid "Services"msgstr "Services"+msgid "Session locked"+msgstr "Session locked"+msgid "Set a target"msgstr "Set a target"@@ -13342,6 +13424,9 @@ msgstr "Set up authenticator app"msgid "Set up the right way"msgstr "Set up the right way"+msgid "Set up two-factor authentication"+msgstr "Set up two-factor authentication"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."@@ -13617,6 +13702,9 @@ msgstr "Shown as a faint background behind every page of generated PDFs"msgid "Shown to the user when this rule fails."msgstr "Shown to the user when this rule fails."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgid "Sign in with Email"msgstr "Sign in with Email"@@ -13635,6 +13723,9 @@ msgstr "Sign out"msgid "Sign Out"msgstr "Sign Out"+msgid "Sign out instead"+msgstr "Sign out instead"+msgid "Sign-off review before moving to the next step"msgstr "Sign-off review before moving to the next step"@@ -13650,6 +13741,9 @@ msgstr "Signed quantity — negative for outbound movements"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Signing in also requires a one-time code from your authenticator app"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgid "Sites & locations"msgstr "Sites & locations"@@ -15824,9 +15918,18 @@ msgstr "Two-Factor"msgid "Two-factor authentication"msgstr "Two-factor authentication"+msgid "Two-factor authentication disabled"+msgstr "Two-factor authentication disabled"++msgid "Two-factor authentication enabled"+msgstr "Two-factor authentication enabled"+msgid "Two-Factor Authentication Enforcement"msgstr "Two-Factor Authentication Enforcement"+msgid "Two-factor authentication is not enabled."+msgstr "Two-factor authentication is not enabled."+msgid "Type"msgstr "Type"@@ -15857,6 +15960,9 @@ msgstr "Types"msgid "U.S. Person Attestation"msgstr "U.S. Person Attestation"+msgid "Unable to unlock"+msgstr "Unable to unlock"+msgid "Unapplied"msgstr "Unapplied"@@ -15959,6 +16065,9 @@ msgstr "Unlink job from sales order?"msgid "Unlock"msgstr "Unlock"+msgid "Unlock with passkey"+msgstr "Unlock with passkey"+msgid "Unmapped accounts"msgstr "Unmapped accounts"@@ -17305,6 +17414,9 @@ msgstr "Your Project Team"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Your real data is loaded and you have checked a sample and approved it."+msgid "Your session was locked after inactivity."+msgstr "Your session was locked after inactivity."+msgid "Your source data is accessible and reasonably clean"msgstr "Your source data is accessible and reasonably clean"diff --git a/packages/locale/locales/en/mes.po b/packages/locale/locales/en/mes.poindex ca875ec19b..135e0e31b1 100644--- a/packages/locale/locales/en/mes.po+++ b/packages/locale/locales/en/mes.po@@ -425,6 +425,9 @@ msgstr "Enter PIN for {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Enter the 6-digit code from your authenticator app"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Enter the 6-digit code from your authenticator app to resume."+msgid "Error"msgstr "Error"@@ -926,6 +929,9 @@ msgstr "Operator Performed"msgid "Optional"msgstr "Optional"+msgid "or"+msgstr "or"+msgid "Overall result"msgstr "Overall result"@@ -947,6 +953,9 @@ msgstr "Partial Disposition"msgid "Passed Inspection"msgstr "Passed Inspection"+msgid "Passkey unlock failed"+msgstr "Passkey unlock failed"+msgid "Pause"msgstr "Pause"@@ -1221,6 +1230,9 @@ msgstr "Serial numbers"msgid "Serial Numbers"msgstr "Serial Numbers"+msgid "Session locked"+msgstr "Session locked"+msgid "Set Clock Out"msgstr "Set Clock Out"@@ -1260,6 +1272,9 @@ msgstr "Sign out"msgid "Sign Out"msgstr "Sign Out"+msgid "Sign out instead"+msgstr "Sign out instead"+msgid "Signed in as {stationName}"msgstr "Signed in as {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Two-factor authentication required"msgid "Type a message..."msgstr "Type a message..."+msgid "Unable to unlock"+msgstr "Unable to unlock"+msgid "Unissued serial/batch materials"msgstr "Unissued serial/batch materials"msgid "Unknown"msgstr "Unknown"+msgid "Unlock"+msgstr "Unlock"++msgid "Unlock with passkey"+msgstr "Unlock with passkey"+msgid "Unpick"msgstr "Unpick"@@ -1475,3 +1499,6 @@ msgstr "You've been clocked in for {hoursElapsed} hours. Did you forget to clockmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Your organization requires an authenticator app. Set it up in Carbon, then come back here."++msgid "Your session was locked after inactivity."+msgstr "Your session was locked after inactivity."diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex df85cb9372..27b75fb505 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problemas — no publicado"msgid "{0} Processes"msgstr "{0} Procesos"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} registrado"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} proveedores con saldo"@@ -1062,6 +1066,9 @@ msgstr "Añade cualquier nota sobre tu decisión..."msgid "Add Approval Requirement"msgstr "Agregar Requisito de Aprobación"+msgid "Add Authenticator App"+msgstr "Agregar aplicación de autenticación"+msgid "Add Calibration Record"msgstr "Agregar Registro de Calibración"@@ -1137,6 +1144,9 @@ msgstr "Agregar Socio"msgid "Add parts"msgstr "Agregar piezas"+msgid "Add Passkey"+msgstr "Agregar contraseña de acceso"+msgid "Add path"msgstr "Agregar ruta"@@ -1996,6 +2006,9 @@ msgstr "¿Estás seguro de que deseas eliminar esta tarjeta kanban? Esto no se pmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "¿Estás seguro de que deseas eliminar este despacho de mantenimiento? Esto no se puede deshacer."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "¿Está seguro de que desea eliminar esta contraseña de acceso? Ya no podrá usarla para iniciar sesión."+msgid "Are you sure you want to delete this quality document?"msgstr "¿Estás seguro de que deseas eliminar este documento de calidad?"@@ -2261,6 +2274,9 @@ msgstr "Registros de Auditoría"msgid "Authentication Error"msgstr "Error de autenticación"+msgid "Authenticator app"+msgstr "Aplicación de autenticación"+msgid "Authenticator QR code"msgstr "Código QR del autenticador"@@ -4763,6 +4779,12 @@ msgstr "Eliminar Parte"msgid "Delete Partner"msgstr "Eliminar Socio"+msgid "Delete passkey"+msgstr "Eliminar contraseña de acceso"++msgid "Delete Passkey"+msgstr "Eliminar Contraseña de Acceso"+msgid "Delete Payment"msgstr "Eliminar Pago"@@ -5571,6 +5593,9 @@ msgstr "Editar Parte"msgid "Edit Partner"msgstr "Editar Socio"+msgid "Edit Passkey"+msgstr "Editar Contraseña de Acceso"+msgid "Edit Payment"msgstr "Editar Pago"@@ -5903,6 +5928,9 @@ msgstr "Ingrese texto…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Ingresa el código de 6 dígitos de tu aplicación autenticadora"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Ingrese el código de 6 dígitos de su aplicación de autenticación para continuar."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Ingrese la cantidad que debería haber sido este movimiento. Un movimiento opuesto para la diferencia se publica junto al original, en el período de tiempo del original."@@ -6443,6 +6471,9 @@ msgstr "Error al obtener riesgos"msgid "Failed to fetch suggestions"msgstr "Error al obtener sugerencias"+msgid "Failed to get options"+msgstr "Error al obtener opciones"+msgid "Failed to initialize Carbon client"msgstr "Error al inicializar el cliente de Carbon"@@ -6513,6 +6544,9 @@ msgstr "Error al mover cuenta: {0}"msgid "Failed to regenerate thumbnail"msgstr "Error al regenerar miniatura"+msgid "Failed to register passkey"+msgstr "Error al registrar la contraseña de acceso"+msgid "Failed to remove image: {errorMessage}"msgstr "Error al eliminar la imagen: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Última ejecución"msgid "Last synced: <0/>"msgstr "Última sincronización: <0/>"+msgid "Last used"+msgstr "Último uso"+msgid "Latest operation end"msgstr "Fin de la última operación"@@ -9846,6 +9883,9 @@ msgstr "Sin ID de pieza"msgid "No parts"msgstr "Sin piezas"+msgid "No passkeys registered yet."+msgstr "Aún no hay contraseñas de acceso registradas."+msgid "No payables"msgstr "Sin cuentas por pagar"@@ -10447,9 +10487,15 @@ msgstr "Páginas y secciones opcionales"msgid "Options"msgstr "Opciones"+msgid "or"+msgstr "o"+msgid "OR"msgstr "O"+msgid "Or enter this secret manually:"+msgstr "O ingrese este código secreto manualmente:"+msgid "Order"msgstr "Pedido"@@ -10716,6 +10762,18 @@ msgstr "Aprobar"msgid "Passed"msgstr "Aprobado"+msgid "Passkey name"+msgstr "Nombre de la contraseña de acceso"++msgid "Passkey unlock failed"+msgstr "Error al desbloquear la contraseña de acceso"++msgid "Passkeys"+msgstr "Contraseñas de Acceso"++msgid "Passkeys are disabled"+msgstr "Las contraseñas de acceso están deshabilitadas"+msgid "Path"msgstr "Ruta"@@ -12011,6 +12069,9 @@ msgstr "Registrado"msgid "Registered"msgstr "Punto de Reorden"+msgid "Registration failed"+msgstr "Error en el registro"+msgid "Registration Number"msgstr "Número de registro"@@ -12087,6 +12148,9 @@ msgstr "Eliminar {0}"msgid "Remove {label}"msgstr "Eliminar {label}"+msgid "Remove authenticator app"+msgstr "Quitar aplicación de autenticación"+msgid "Remove clause"msgstr "Eliminar cláusula"@@ -12135,6 +12199,9 @@ msgstr "Elimina este tipo de almacenamiento de todas las unidades de almacenamiemsgid "Remove tool"msgstr "Eliminar herramienta"+msgid "Remove two-factor authentication"+msgstr "Quitar autenticación de dos factores"+msgid "Removed"msgstr "Eliminado"@@ -12241,6 +12308,9 @@ msgstr "Solicitar Aprobación"msgid "Requested Date"msgstr "Fecha Solicitada"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Requerir un código de 6 dígitos de una aplicación de autenticación al iniciar sesión."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Requiere una aplicación autenticadora antes de que alguien pueda abrir esta empresa. Sus otras empresas no se ven afectadas. Visita la <0>página de cuentas de empleados</0> para ver el estado de cada persona."@@ -12274,6 +12344,9 @@ msgstr "Acciones Requeridas (en orden)"msgid "Required Date"msgstr "Fecha Requerida"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Requerido en un entorno controlado: el registro de auditoría no se puede desactivar."+msgid "Requirement"msgstr "Requisito"@@ -12827,6 +12900,9 @@ msgstr "Escanear o buscar..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Escanee o seleccione una entidad rastreada de este lote para agregarla como una columna de muestra, luego registre su resultado en la cuadrícula."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Escanee este código QR con su aplicación de autenticación (por ejemplo, Google Authenticator o 1Password), luego ingrese el código de 6 dígitos que se muestra."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Escanea esto con tu aplicación autenticadora, luego ingresa el código de 6 dígitos que muestra."@@ -12989,6 +13065,9 @@ msgstr "Segundos para completar"msgid "Seconds/Piece"msgstr "Segundos/Pieza"+msgid "Secret copied to clipboard"+msgstr "Código secreto copiado al portapapeles"+msgid "Section"msgstr "Sección"@@ -13306,6 +13385,9 @@ msgstr "servicios"msgid "Services"msgstr "Servicios"+msgid "Session locked"+msgstr "Sesión bloqueada"+msgid "Set a target"msgstr "Establecer un objetivo"@@ -13342,6 +13424,9 @@ msgstr "Configurar aplicación autenticadora"msgid "Set up the right way"msgstr "Configura de la manera correcta"+msgid "Set up two-factor authentication"+msgstr "Configurar autenticación de dos factores"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Configure su empresa con un plan de implementación paso a paso que cubre la configuración, los datos, la formación y la puesta en marcha."@@ -13617,6 +13702,9 @@ msgstr "Se muestra como un fondo tenue detrás de cada página de los PDF generamsgid "Shown to the user when this rule fails."msgstr "Se muestra al usuario cuando esta regla falla."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Inicie sesión con biometría en lugar de un enlace mágico. Las contraseñas de acceso están protegidas por Face ID, Touch ID o el PIN de su dispositivo."+msgid "Sign in with Email"msgstr "Iniciar sesión con correo electrónico"@@ -13635,6 +13723,9 @@ msgstr "Cerrar sesión"msgid "Sign Out"msgstr "Cerrar sesión"+msgid "Sign out instead"+msgstr "Cerrar sesión en su lugar"+msgid "Sign-off review before moving to the next step"msgstr "Revisión de aprobación antes de pasar al siguiente paso"@@ -13650,6 +13741,9 @@ msgstr "Cantidad con signo — negativa para movimientos de salida"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Iniciar sesión también requiere un código de un solo uso de tu aplicación autenticadora"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Iniciar sesión ya no requerirá un código. Ingrese el código de 6 dígitos actual de su aplicación de autenticación para confirmar."+msgid "Sites & locations"msgstr "Sitios y ubicaciones"@@ -15824,9 +15918,18 @@ msgstr "Dos Factores"msgid "Two-factor authentication"msgstr "Autenticación de dos factores"+msgid "Two-factor authentication disabled"+msgstr "Autenticación de dos factores deshabilitada"++msgid "Two-factor authentication enabled"+msgstr "Autenticación de dos factores habilitada"+msgid "Two-Factor Authentication Enforcement"msgstr "Cumplimiento de Autenticación de Dos Factores"+msgid "Two-factor authentication is not enabled."+msgstr "La autenticación de dos factores no está habilitada."+msgid "Type"msgstr "Tipo"@@ -15857,6 +15960,9 @@ msgstr "Tipos"msgid "U.S. Person Attestation"msgstr "Atestación de Persona Estadounidense"+msgid "Unable to unlock"+msgstr "No se puede desbloquear"+msgid "Unapplied"msgstr "No aplicado"@@ -15959,6 +16065,9 @@ msgstr "¿Desenlazar trabajo de la orden de venta?"msgid "Unlock"msgstr "Desbloquear"+msgid "Unlock with passkey"+msgstr "Desbloquear con contraseña de acceso"+msgid "Unmapped accounts"msgstr "Cuentas no asignadas"@@ -17301,6 +17410,9 @@ msgstr "Tu Equipo de Proyecto"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Tus datos reales están cargados y has verificado una muestra y la has aprobado."+msgid "Your session was locked after inactivity."+msgstr "Su sesión fue bloqueada después de la inactividad."+msgid "Your source data is accessible and reasonably clean"msgstr "Sus datos de origen son accesibles y están razonablemente limpios"diff --git a/packages/locale/locales/es/mes.po b/packages/locale/locales/es/mes.poindex c5c5816648..13b7cc0f99 100644--- a/packages/locale/locales/es/mes.po+++ b/packages/locale/locales/es/mes.po@@ -425,6 +425,9 @@ msgstr "Ingrese el PIN para {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Ingresa el código de 6 dígitos de tu aplicación de autenticación"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Ingrese el código de 6 dígitos de su aplicación de autenticador para reanudar."+msgid "Error"msgstr "Error"@@ -926,6 +929,9 @@ msgstr "Realizado por operador"msgid "Optional"msgstr "Opcional"+msgid "or"+msgstr "o"+msgid "Overall result"msgstr "Resultado general"@@ -947,6 +953,9 @@ msgstr "Disposición Parcial"msgid "Passed Inspection"msgstr "Inspección aprobada"+msgid "Passkey unlock failed"+msgstr "Error al desbloquear con clave de acceso"+msgid "Pause"msgstr "Pausar"@@ -1221,6 +1230,9 @@ msgstr "Números de serie"msgid "Serial Numbers"msgstr "Números de serie"+msgid "Session locked"+msgstr "Sesión bloqueada"+msgid "Set Clock Out"msgstr "Establecer salida"@@ -1260,6 +1272,9 @@ msgstr "Cerrar sesión"msgid "Sign Out"msgstr "Cerrar sesión"+msgid "Sign out instead"+msgstr "Cerrar sesión en su lugar"+msgid "Signed in as {stationName}"msgstr "Conectado como {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Se requiere autenticación de dos factores"msgid "Type a message..."msgstr "Escriba un mensaje..."+msgid "Unable to unlock"+msgstr "No se puede desbloquear"+msgid "Unissued serial/batch materials"msgstr "Materiales de serie/lote no emitidos"msgid "Unknown"msgstr "Desconocido"+msgid "Unlock"+msgstr "Desbloquear"++msgid "Unlock with passkey"+msgstr "Desbloquear con clave de acceso"+msgid "Unpick"msgstr "Descoger"@@ -1475,3 +1499,6 @@ msgstr "Ha estado registrado durante {hoursElapsed} horas. ¿Olvidó registrar lmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Tu organización requiere una aplicación de autenticación. Configúrala en Carbon y luego vuelve aquí."++msgid "Your session was locked after inactivity."+msgstr "Su sesión fue bloqueada después de la inactividad."diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 444c9c12c9..d4620ebf32 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problèmes — non publié"msgid "{0} Processes"msgstr "{0} Processus"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} enregistré"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} fournisseurs avec un solde"@@ -1062,6 +1066,9 @@ msgstr "Ajoutez des notes sur votre décision..."msgid "Add Approval Requirement"msgstr "Ajouter une exigence d'approbation"+msgid "Add Authenticator App"+msgstr "Ajouter une application d'authentification"+msgid "Add Calibration Record"msgstr "Ajouter un enregistrement d'étalonnage"@@ -1137,6 +1144,9 @@ msgstr "Ajouter un partenaire"msgid "Add parts"msgstr "Ajouter des pièces"+msgid "Add Passkey"+msgstr "Ajouter une clé d'accès"+msgid "Add path"msgstr "Ajouter un chemin"@@ -1996,6 +2006,9 @@ msgstr "Êtes-vous sûr de vouloir supprimer cette carte kanban ? Cette action nmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Êtes-vous sûr de vouloir supprimer cette demande de maintenance ? Cette action ne peut pas être annulée."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Êtes-vous sûr de vouloir supprimer cette clé d'accès ? Vous ne pourrez plus l'utiliser pour vous connecter."+msgid "Are you sure you want to delete this quality document?"msgstr "Êtes-vous sûr de vouloir supprimer ce document de qualité ?"@@ -2261,6 +2274,9 @@ msgstr "Journaux d'audit"msgid "Authentication Error"msgstr "Erreur d'authentification"+msgid "Authenticator app"+msgstr "Application d'authentification"+msgid "Authenticator QR code"msgstr "Code QR de l'authentificateur"@@ -4763,6 +4779,12 @@ msgstr "Supprimer la pièce"msgid "Delete Partner"msgstr "Supprimer le partenaire"+msgid "Delete passkey"+msgstr "Supprimer la clé d'accès"++msgid "Delete Passkey"+msgstr "Supprimer la clé d'accès"+msgid "Delete Payment"msgstr "Supprimer le paiement"@@ -5571,6 +5593,9 @@ msgstr "Modifier la pièce"msgid "Edit Partner"msgstr "Modifier le partenaire"+msgid "Edit Passkey"+msgstr "Modifier la clé d'accès"+msgid "Edit Payment"msgstr "Modifier le paiement"@@ -5903,6 +5928,9 @@ msgstr "Entrez du texte…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Entrez le code à 6 chiffres de votre application d'authentification"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Entrez le code à 6 chiffres de votre application d'authentification pour continuer."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Entrez la quantité que ce mouvement aurait dû avoir. Un mouvement opposé pour la différence est posté à côté de l'original, dans la période de l'original."@@ -6443,6 +6471,9 @@ msgstr "Échec de la récupération des risques"msgid "Failed to fetch suggestions"msgstr "Impossible de récupérer les suggestions"+msgid "Failed to get options"+msgstr "Impossible d'obtenir les options"+msgid "Failed to initialize Carbon client"msgstr "Impossible d'initialiser le client Carbon"@@ -6513,6 +6544,9 @@ msgstr "Impossible de déplacer le compte : {0}"msgid "Failed to regenerate thumbnail"msgstr "Échec de la régénération de la miniature"+msgid "Failed to register passkey"+msgstr "Impossible d'enregistrer la clé d'accès"+msgid "Failed to remove image: {errorMessage}"msgstr "Échec de la suppression de l'image : {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Dernière exécution"msgid "Last synced: <0/>"msgstr "Dernière synchronisation : <0/>"+msgid "Last used"+msgstr "Dernière utilisation"+msgid "Latest operation end"msgstr "Fin de la dernière opération"@@ -9846,6 +9883,9 @@ msgstr "Aucun ID de pièce"msgid "No parts"msgstr "Pas de pièces"+msgid "No passkeys registered yet."+msgstr "Aucune clé d'accès enregistrée pour le moment."+msgid "No payables"msgstr "Aucun compte créditeur"@@ -10447,9 +10487,15 @@ msgstr "Pages et sections optionnelles"msgid "Options"msgstr "Options"+msgid "or"+msgstr "ou"+msgid "OR"msgstr "OU"+msgid "Or enter this secret manually:"+msgstr "Ou entrez ce secret manuellement :"+msgid "Order"msgstr "Commande"@@ -10716,6 +10762,18 @@ msgstr "Réussir"msgid "Passed"msgstr "Réussi"+msgid "Passkey name"+msgstr "Nom de la clé d'accès"++msgid "Passkey unlock failed"+msgstr "Impossible de déverrouiller avec la clé d'accès"++msgid "Passkeys"+msgstr "Clés d'accès"++msgid "Passkeys are disabled"+msgstr "Les clés d'accès sont désactivées"+msgid "Path"msgstr "Chemin"@@ -12011,6 +12069,9 @@ msgstr "Enregistré"msgid "Registered"msgstr "Point de Réapprovisionnement"+msgid "Registration failed"+msgstr "L'enregistrement a échoué"+msgid "Registration Number"msgstr "Numéro d'enregistrement"@@ -12087,6 +12148,9 @@ msgstr "Supprimer {0}"msgid "Remove {label}"msgstr "Supprimer {label}"+msgid "Remove authenticator app"+msgstr "Supprimer l'application d'authentification"+msgid "Remove clause"msgstr "Supprimer la clause"@@ -12135,6 +12199,9 @@ msgstr "Supprimez ce type de stockage de toutes les unités de stockage qui le rmsgid "Remove tool"msgstr "Supprimer l'outil"+msgid "Remove two-factor authentication"+msgstr "Supprimer l'authentification à deux facteurs"+msgid "Removed"msgstr "Supprimé"@@ -12241,6 +12308,9 @@ msgstr "Demander l'approbation"msgid "Requested Date"msgstr "Date demandée"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Exiger un code à 6 chiffres d'une application d'authentification lors de la connexion."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Exigez une application d'authentification avant que quiconque ne puisse ouvrir cette entreprise. Leurs autres entreprises ne sont pas affectées. Visitez la <0>page des comptes d'employés</0> pour voir le statut de chaque personne."@@ -12274,6 +12344,9 @@ msgstr "Actions Requises (par ordre)"msgid "Required Date"msgstr "Date requise"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Requis dans un environnement contrôlé — la journalisation d'audit ne peut pas être désactivée."+msgid "Requirement"msgstr "Exigence"@@ -12827,6 +12900,9 @@ msgstr "Scannez ou recherchez..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Scannez ou sélectionnez une entité suivie de ce lot pour l'ajouter comme colonne d'échantillon, puis enregistrez son résultat dans la grille."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Scannez ce code QR avec votre application d'authentification (par exemple Google Authenticator ou 1Password), puis entrez le code à 6 chiffres qu'elle affiche."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Scannez ceci avec votre application d'authentification, puis entrez le code à 6 chiffres qu'elle affiche."@@ -12989,6 +13065,9 @@ msgstr "Secondes pour compléter"msgid "Seconds/Piece"msgstr "Secondes/Pièce"+msgid "Secret copied to clipboard"+msgstr "Secret copié dans le presse-papiers"+msgid "Section"msgstr "Section"@@ -13306,6 +13385,9 @@ msgstr "services"msgid "Services"msgstr "Services"+msgid "Session locked"+msgstr "Session verrouillée"+msgid "Set a target"msgstr "Définir un objectif"@@ -13342,6 +13424,9 @@ msgstr "Configurer l'application d'authentification"msgid "Set up the right way"msgstr "Configurer correctement"+msgid "Set up two-factor authentication"+msgstr "Configurer l'authentification à deux facteurs"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Configurez votre entreprise avec un plan d'implémentation étape par étape couvrant la configuration, les données, la formation et la mise en production."@@ -13617,6 +13702,9 @@ msgstr "Affiché en arrière-plan discret sur chaque page des PDF générés"msgid "Shown to the user when this rule fails."msgstr "Affiché à l'utilisateur lorsque cette règle échoue."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Connectez-vous avec la biométrie au lieu d'un lien magique. Les clés d'accès sont sécurisées par Face ID, Touch ID ou votre code PIN de l'appareil."+msgid "Sign in with Email"msgstr "Se connecter avec Email"@@ -13635,6 +13723,9 @@ msgstr "Se déconnecter"msgid "Sign Out"msgstr "Se déconnecter"+msgid "Sign out instead"+msgstr "Se déconnecter à la place"+msgid "Sign-off review before moving to the next step"msgstr "Examen de validation avant de passer à l'étape suivante"@@ -13650,6 +13741,9 @@ msgstr "Quantité signée — négative pour les mouvements sortants"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "La connexion nécessite également un code à usage unique de votre application d'authentification"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "La connexion ne nécessitera plus de code. Entrez le code à 6 chiffres actuel de votre application d'authentification pour confirmer."+msgid "Sites & locations"msgstr "Sites et emplacements"@@ -15824,9 +15918,18 @@ msgstr "Authentification à deux facteurs"msgid "Two-factor authentication"msgstr "Authentification à deux facteurs"+msgid "Two-factor authentication disabled"+msgstr "Authentification à deux facteurs désactivée"++msgid "Two-factor authentication enabled"+msgstr "Authentification à deux facteurs activée"+msgid "Two-Factor Authentication Enforcement"msgstr "Application de l'authentification à deux facteurs"+msgid "Two-factor authentication is not enabled."+msgstr "L'authentification à deux facteurs n'est pas activée."+msgid "Type"msgstr "Type"@@ -15857,6 +15960,9 @@ msgstr "Types"msgid "U.S. Person Attestation"msgstr "Attestation de personne des États-Unis"+msgid "Unable to unlock"+msgstr "Impossible de déverrouiller"+msgid "Unapplied"msgstr "Non appliqué"@@ -15959,6 +16065,9 @@ msgstr "Dissocier la commande de la commande client ?"msgid "Unlock"msgstr "Déverrouiller"+msgid "Unlock with passkey"+msgstr "Déverrouiller avec une clé d'accès"+msgid "Unmapped accounts"msgstr "Comptes non mappés"@@ -17301,6 +17410,9 @@ msgstr "Votre équipe de projet"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Vos données réelles sont chargées et vous avez vérifié un échantillon et l'avez approuvé."+msgid "Your session was locked after inactivity."+msgstr "Votre session a été verrouillée suite à l'inactivité."+msgid "Your source data is accessible and reasonably clean"msgstr "Vos données source sont accessibles et raisonnablement propres"diff --git a/packages/locale/locales/fr/mes.po b/packages/locale/locales/fr/mes.poindex b1bd369850..8bd4588524 100644--- a/packages/locale/locales/fr/mes.po+++ b/packages/locale/locales/fr/mes.po@@ -425,6 +425,9 @@ msgstr "Saisir le NIP pour {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Entrez le code à 6 chiffres de votre application d'authentification"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Entrez le code à 6 chiffres de votre application d'authentification pour continuer."+msgid "Error"msgstr "Erreur"@@ -926,6 +929,9 @@ msgstr "Effectué par l'opérateur"msgid "Optional"msgstr "Optionnel"+msgid "or"+msgstr "ou"+msgid "Overall result"msgstr "Résultat global"@@ -947,6 +953,9 @@ msgstr "Disposition partielle"msgid "Passed Inspection"msgstr "Inspection réussie"+msgid "Passkey unlock failed"+msgstr "Le déverrouillage par clé d'accès a échoué"+msgid "Pause"msgstr "Pause"@@ -1221,6 +1230,9 @@ msgstr "Numéros de série"msgid "Serial Numbers"msgstr "Numéros de série"+msgid "Session locked"+msgstr "Session verrouillée"+msgid "Set Clock Out"msgstr "Définir la sortie"@@ -1260,6 +1272,9 @@ msgstr "Se déconnecter"msgid "Sign Out"msgstr "Se déconnecter"+msgid "Sign out instead"+msgstr "Se déconnecter plutôt"+msgid "Signed in as {stationName}"msgstr "Connecté en tant que {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Authentification à deux facteurs requise"msgid "Type a message..."msgstr "Saisissez un message..."+msgid "Unable to unlock"+msgstr "Impossible de déverrouiller"+msgid "Unissued serial/batch materials"msgstr "Matériaux série/lot non distribués"msgid "Unknown"msgstr "Inconnu"+msgid "Unlock"+msgstr "Déverrouiller"++msgid "Unlock with passkey"+msgstr "Déverrouiller avec une clé d'accès"+msgid "Unpick"msgstr "Dépicker"@@ -1475,3 +1499,6 @@ msgstr "Vous êtes pointé depuis {hoursElapsed} heures. Avez-vous oublié de pomsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Votre organisation nécessite une application d'authentification. Configurez-la dans Carbon, puis revenez ici."++msgid "Your session was locked after inactivity."+msgstr "Votre session a été verrouillée après inactivité."diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex beedbc359b..165602489d 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -110,6 +110,10 @@ msgstr "{0} समस्याएं — प्रकाशित नहीं"msgid "{0} Processes"msgstr "{0} प्रक्रियाएं"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} पंजीकृत"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} आपूर्तिकर्ता शेष के साथ"@@ -1062,6 +1066,9 @@ msgstr "अपने निर्णय के बारे में कोईmsgid "Add Approval Requirement"msgstr "अनुमोदन आवश्यकता जोड़ें"+msgid "Add Authenticator App"+msgstr "ऑथेंटिकेटर ऐप जोड़ें"+msgid "Add Calibration Record"msgstr "कैलिब्रेशन रिकॉर्ड जोड़ें"@@ -1137,6 +1144,9 @@ msgstr "पार्टनर जोड़ें"msgid "Add parts"msgstr "पुर्जे जोड़ें"+msgid "Add Passkey"+msgstr "पासकी जोड़ें"+msgid "Add path"msgstr "पथ जोड़ें"@@ -1996,6 +2006,9 @@ msgstr "क्या आप सुनिश्चित हैं कि आपmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "क्या आप सुनिश्चित हैं कि आप इस रखरखाव प्रेषण को हटाना चाहते हैं? यह पूर्ववत नहीं किया जा सकता।"+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "क्या आप वाकई इस पासकी को हटाना चाहते हैं? आप इसे फिर से साइन इन करने के लिए उपयोग नहीं कर पाएंगे।"+msgid "Are you sure you want to delete this quality document?"msgstr "क्या आप सुनिश्चित हैं कि आप इस गुणवत्ता दस्तावेज़ को हटाना चाहते हैं?"@@ -2261,6 +2274,9 @@ msgstr "ऑडिट लॉग्स"msgid "Authentication Error"msgstr "प्रमाणीकरण त्रुटि"+msgid "Authenticator app"+msgstr "ऑथेंटिकेटर ऐप"+msgid "Authenticator QR code"msgstr "प्रमाणकर्ता QR कोड"@@ -4763,6 +4779,12 @@ msgstr "भाग हटाएं"msgid "Delete Partner"msgstr "पार्टनर हटाएं"+msgid "Delete passkey"+msgstr "पासकी हटाएं"++msgid "Delete Passkey"+msgstr "पासकी हटाएं"+msgid "Delete Payment"msgstr "भुगतान हटाएं"@@ -5571,6 +5593,9 @@ msgstr "भाग संपादित करें"msgid "Edit Partner"msgstr "पार्टनर संपादित करें"+msgid "Edit Passkey"+msgstr "पासकी संपादित करें"+msgid "Edit Payment"msgstr "भुगतान संपादित करें"@@ -5903,6 +5928,9 @@ msgstr "पाठ दर्ज करें…"msgid "Enter the 6-digit code from your authenticator app"msgstr "अपने प्रमाणकर्ता ऐप से 6-अंकीय कोड दर्ज करें"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "पुनः शुरू करने के लिए अपने ऑथेंटिकेटर ऐप से 6-अंकीय कोड दर्ज करें।"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "वह मात्रा दर्ज करें जो यह आंदोलन होना चाहिए था। अंतर के लिए एक विपरीत आंदोलन मूल के बगल में, मूल की समय अवधि में पोस्ट किया जाता है।"@@ -6443,6 +6471,9 @@ msgstr "जोखिमों को प्राप्त करने मेmsgid "Failed to fetch suggestions"msgstr "सुझाव प्राप्त करने में विफल"+msgid "Failed to get options"+msgstr "विकल्पों को प्राप्त करने में विफल"+msgid "Failed to initialize Carbon client"msgstr "Carbon क्लाइंट को इनिशियलाइज़ करने में विफल"@@ -6513,6 +6544,9 @@ msgstr "खाता स्थानांतरित करने मेंmsgid "Failed to regenerate thumbnail"msgstr "थंबनेल को पुनः उत्पन्न करने में विफल"+msgid "Failed to register passkey"+msgstr "पासकी को पंजीकृत करने में विफल"+msgid "Failed to remove image: {errorMessage}"msgstr "छवि हटाने में विफल: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "अंतिम रन"msgid "Last synced: <0/>"msgstr "अंतिम सिंक: <0/>"+msgid "Last used"+msgstr "अंतिम उपयोग"+msgid "Latest operation end"msgstr "नवीनतम ऑपरेशन अंत"@@ -9846,6 +9883,9 @@ msgstr "कोई भाग ID नहीं"msgid "No parts"msgstr "कोई पुर्जे नहीं"+msgid "No passkeys registered yet."+msgstr "अभी तक कोई पासकी पंजीकृत नहीं है।"+msgid "No payables"msgstr "कोई देय नहीं"@@ -10447,9 +10487,15 @@ msgstr "वैकल्पिक पृष्ठ और अनुभाग"msgid "Options"msgstr "विकल्प"+msgid "or"+msgstr "या"+msgid "OR"msgstr "या"+msgid "Or enter this secret manually:"+msgstr "या इस गुप्त को मैन्युअल रूप से दर्ज करें:"+msgid "Order"msgstr "आदेश"@@ -10716,6 +10762,18 @@ msgstr "पास"msgid "Passed"msgstr "पास किया गया"+msgid "Passkey name"+msgstr "पासकी का नाम"++msgid "Passkey unlock failed"+msgstr "पासकी अनलॉक विफल"++msgid "Passkeys"+msgstr "पासकीज़"++msgid "Passkeys are disabled"+msgstr "पासकीज़ अक्षम हैं"+msgid "Path"msgstr "पथ"@@ -12011,6 +12069,9 @@ msgstr "पंजीकृत"msgid "Registered"msgstr "पुन: आदेश बिंदु"+msgid "Registration failed"+msgstr "पंजीकरण विफल"+msgid "Registration Number"msgstr "पंजीकरण संख्या"@@ -12087,6 +12148,9 @@ msgstr "{0} को हटाएं"msgid "Remove {label}"msgstr "हटाएँ {label}"+msgid "Remove authenticator app"+msgstr "ऑथेंटिकेटर ऐप हटाएं"+msgid "Remove clause"msgstr "खंड हटाएं"@@ -12135,6 +12199,9 @@ msgstr "इस स्टोरेज प्रकार को सभी संmsgid "Remove tool"msgstr "उपकरण हटाएँ"+msgid "Remove two-factor authentication"+msgstr "दो-फ़ैक्टर प्रमाणीकरण हटाएं"+msgid "Removed"msgstr "हटाया गया"@@ -12241,6 +12308,9 @@ msgstr "अनुमोदन का अनुरोध करें"msgid "Requested Date"msgstr "अनुरोधित तारीख"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "साइन इन करते समय ऑथेंटिकेटर ऐप से 6-अंकीय कोड की आवश्यकता है।"+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "किसी को भी इस कंपनी को खोलने से पहले एक प्रमाणकर्ता ऐप की आवश्यकता है। उनकी अन्य कंपनियां प्रभावित नहीं हैं। प्रत्येक व्यक्ति की स्थिति देखने के लिए <0>कर्मचारी खातों पृष्ठ</0> पर जाएं।"@@ -12274,6 +12344,9 @@ msgstr "आवश्यक क्रियाएं (क्रम में)"msgid "Required Date"msgstr "आवश्यक तारीख"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "नियंत्रित वातावरण में आवश्यक — ऑडिट लॉगिंग को बंद नहीं किया जा सकता।"+msgid "Requirement"msgstr "आवश्यकता"@@ -12827,6 +12900,9 @@ msgstr "स्कैन या खोजें..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "इस लॉट से एक ट्रैक की गई इकाई को स्कैन या चुनें इसे एक नमूना कॉलम के रूप में जोड़ने के लिए, फिर ग्रिड में इसके परिणाम को रिकॉर्ड करें।"+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "अपने ऑथेंटिकेटर ऐप (जैसे Google Authenticator या 1Password) के साथ इस QR कोड को स्कैन करें, फिर यह जो 6-अंकीय कोड दिखाता है उसे दर्ज करें।"+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "अपने प्रमाणकर्ता ऐप से इसे स्कैन करें, फिर इसके द्वारा दिखाया गया 6-अंकीय कोड दर्ज करें।"@@ -12989,6 +13065,9 @@ msgstr "पूरा करने के सेकंड"msgid "Seconds/Piece"msgstr "सेकंड/पीस"+msgid "Secret copied to clipboard"+msgstr "गुप्त क्लिपबोर्ड में कॉपी किया गया"+msgid "Section"msgstr "अनुभाग"@@ -13306,6 +13385,9 @@ msgstr "सेवाएं"msgid "Services"msgstr "सेवाएं"+msgid "Session locked"+msgstr "सत्र लॉक किया गया"+msgid "Set a target"msgstr "लक्ष्य निर्धारित करें"@@ -13342,6 +13424,9 @@ msgstr "प्रमाणकर्ता ऐप सेटअप करें"msgid "Set up the right way"msgstr "सही तरीके से सेटअप करें"+msgid "Set up two-factor authentication"+msgstr "दो-फ़ैक्टर प्रमाणीकरण सेट करें"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "सेटअप, डेटा, प्रशिक्षण और go-live को कवर करने वाली चरण-दर-चरण कार्यान्वयन योजना के साथ अपनी कंपनी सेट करें।"@@ -13617,6 +13702,9 @@ msgstr "जनरेट की गई PDF के हर पेज के पीmsgid "Shown to the user when this rule fails."msgstr "जब यह नियम विफल हो तो उपयोगकर्ता को दिखाया जाता है।"+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "जादुई लिंक के बजाय बायोमेट्रिक्स के साथ साइन इन करें। पासकीज़ Face ID, Touch ID, या आपकी डिवाइस PIN द्वारा सुरक्षित हैं।"+msgid "Sign in with Email"msgstr "ईमेल के साथ साइन इन करें"@@ -13635,6 +13723,9 @@ msgstr "साइन आउट"msgid "Sign Out"msgstr "साइन आउट"+msgid "Sign out instead"+msgstr "बजाय इसके साइन आउट करें"+msgid "Sign-off review before moving to the next step"msgstr "अगले चरण में जाने से पहले साइन-ऑफ समीक्षा"@@ -13650,6 +13741,9 @@ msgstr "हस्ताक्षरित मात्रा — बाहरीmsgid "Signing in also requires a one-time code from your authenticator app"msgstr "साइन इन करने के लिए आपके प्रमाणकर्ता ऐप से एक बार का कोड भी आवश्यक है"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "साइन इन करने के लिए अब कोड की आवश्यकता नहीं होगी। पुष्टि करने के लिए अपने ऑथेंटिकेटर ऐप से वर्तमान 6-अंकीय कोड दर्ज करें।"+msgid "Sites & locations"msgstr "साइटें और स्थान"@@ -15824,9 +15918,18 @@ msgstr "दो-कारक"msgid "Two-factor authentication"msgstr "दो-कारक प्रमाणीकरण"+msgid "Two-factor authentication disabled"+msgstr "दो-फ़ैक्टर प्रमाणीकरण अक्षम"++msgid "Two-factor authentication enabled"+msgstr "दो-फ़ैक्टर प्रमाणीकरण सक्षम"+msgid "Two-Factor Authentication Enforcement"msgstr "दो-कारक प्रमाणीकरण प्रवर्तन"+msgid "Two-factor authentication is not enabled."+msgstr "दो-फ़ैक्टर प्रमाणीकरण सक्षम नहीं है।"+msgid "Type"msgstr "प्रकार"@@ -15857,6 +15960,9 @@ msgstr "प्रकार"msgid "U.S. Person Attestation"msgstr "U.S. व्यक्ति साक्ष्य"+msgid "Unable to unlock"+msgstr "अनलॉक करने में असमर्थ"+msgid "Unapplied"msgstr "अप्रयुक्त"@@ -15959,6 +16065,9 @@ msgstr "बिक्रय आदेश से नौकरी को अनलmsgid "Unlock"msgstr "अनलॉक करें"+msgid "Unlock with passkey"+msgstr "पासकी के साथ अनलॉक करें"+msgid "Unmapped accounts"msgstr "असंबद्ध खाते"@@ -17301,6 +17410,9 @@ msgstr "आपकी प्रोजेक्ट टीम"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "आपका वास्तविक डेटा लोड हो गया है और आपने एक नमूना जांचा है और इसे मंजूरी दे दी है।"+msgid "Your session was locked after inactivity."+msgstr "निष्क्रियता के बाद आपका सत्र लॉक कर दिया गया।"+msgid "Your source data is accessible and reasonably clean"msgstr "आपका स्रोत डेटा सुलभ है और उचित रूप से स्वच्छ है"diff --git a/packages/locale/locales/hi/mes.po b/packages/locale/locales/hi/mes.poindex da268f68bf..5c0aaf8e53 100644--- a/packages/locale/locales/hi/mes.po+++ b/packages/locale/locales/hi/mes.po@@ -425,6 +425,9 @@ msgstr "{0} के लिए PIN दर्ज करें"msgid "Enter the 6-digit code from your authenticator app"msgstr "अपने ऑथेंटिकेटर ऐप से 6-अंकीय कोड दर्ज करें"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "अपने प्रमाणक ऐप्लिकेशन से 6-अंकीय कोड दर्ज करें जारी रखने के लिए।"+msgid "Error"msgstr "त्रुटि"@@ -926,6 +929,9 @@ msgstr "ऑपरेटर द्वारा निष्पादित"msgid "Optional"msgstr "वैकल्पिक"+msgid "or"+msgstr "या"+msgid "Overall result"msgstr "समग्र परिणाम"@@ -947,6 +953,9 @@ msgstr "आंशिक निपटान"msgid "Passed Inspection"msgstr "निरीक्षण पास किया"+msgid "Passkey unlock failed"+msgstr "पासकी अनलॉक विफल"+msgid "Pause"msgstr "रोकें"@@ -1221,6 +1230,9 @@ msgstr "सीरियल नंबर"msgid "Serial Numbers"msgstr "सीरियल नंबर"+msgid "Session locked"+msgstr "सत्र लॉक किया गया"+msgid "Set Clock Out"msgstr "क्लॉक आउट सेट करें"@@ -1260,6 +1272,9 @@ msgstr "साइन आउट करें"msgid "Sign Out"msgstr "साइन आउट"+msgid "Sign out instead"+msgstr "इसके बजाय साइन आउट करें"+msgid "Signed in as {stationName}"msgstr "के रूप में साइन इन किया गया {stationName}"@@ -1393,12 +1408,21 @@ msgstr "दो-फ़ैक्टर प्रमाणीकरण आवश्msgid "Type a message..."msgstr "एक संदेश लिखें..."+msgid "Unable to unlock"+msgstr "अनलॉक करने में असमर्थ"+msgid "Unissued serial/batch materials"msgstr "अजारी सीरीज़/बैच सामग्री"msgid "Unknown"msgstr "अज्ञात"+msgid "Unlock"+msgstr "अनलॉक"++msgid "Unlock with passkey"+msgstr "पासकी से अनलॉक करें"+msgid "Unpick"msgstr "अनपिक करें"@@ -1475,3 +1499,6 @@ msgstr "आप {hoursElapsed} घंटे के लिए क्लॉक इmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "आपके संगठन को एक ऑथेंटिकेटर ऐप की आवश्यकता है। इसे Carbon में सेट अप करें, फिर यहाँ वापस आएं।"++msgid "Your session was locked after inactivity."+msgstr "आपका सत्र निष्क्रियता के बाद लॉक किया गया था।"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex f530bff3e1..c0a80bb316 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problemi — non pubblicato"msgid "{0} Processes"msgstr "{0} Processi"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} registrato"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} fornitori con un saldo"@@ -1062,6 +1066,9 @@ msgstr "Aggiungi eventuali note sulla tua decisione..."msgid "Add Approval Requirement"msgstr "Aggiungi Requisito di Approvazione"+msgid "Add Authenticator App"+msgstr "Aggiungi app autenticatore"+msgid "Add Calibration Record"msgstr "Aggiungi Record di Calibrazione"@@ -1137,6 +1144,9 @@ msgstr "Aggiungi Partner"msgid "Add parts"msgstr "Aggiungi parti"+msgid "Add Passkey"+msgstr "Aggiungi passkey"+msgid "Add path"msgstr "Aggiungi percorso"@@ -1996,6 +2006,9 @@ msgstr "Sei sicuro di voler eliminare questa scheda kanban? Questa azione non pumsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Sei sicuro di voler eliminare questo ordine di manutenzione? Questa azione non può essere annullata."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Sei sicuro di voler eliminare questa passkey? Non potrai più usarla per accedere."+msgid "Are you sure you want to delete this quality document?"msgstr "Sei sicuro di voler eliminare questo documento di qualità?"@@ -2261,6 +2274,9 @@ msgstr "Registri di Audit"msgid "Authentication Error"msgstr "Errore di autenticazione"+msgid "Authenticator app"+msgstr "App autenticatore"+msgid "Authenticator QR code"msgstr "Codice QR autenticatore"@@ -4763,6 +4779,12 @@ msgstr "Elimina Parte"msgid "Delete Partner"msgstr "Elimina Partner"+msgid "Delete passkey"+msgstr "Elimina passkey"++msgid "Delete Passkey"+msgstr "Elimina Passkey"+msgid "Delete Payment"msgstr "Elimina Pagamento"@@ -5571,6 +5593,9 @@ msgstr "Modifica Parte"msgid "Edit Partner"msgstr "Modifica Partner"+msgid "Edit Passkey"+msgstr "Modifica Passkey"+msgid "Edit Payment"msgstr "Modifica Pagamento"@@ -5903,6 +5928,9 @@ msgstr "Inserisci testo…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Inserisci il codice a 6 cifre dall'app autenticatore"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Inserisci il codice a 6 cifre dall'app autenticatore per continuare."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Inserisci la quantità che questo movimento avrebbe dovuto essere. Un movimento opposto per la differenza è registrato accanto all'originale, nel periodo temporale dell'originale."@@ -6443,6 +6471,9 @@ msgstr "Impossibile recuperare i rischi"msgid "Failed to fetch suggestions"msgstr "Impossibile recuperare i suggerimenti"+msgid "Failed to get options"+msgstr "Impossibile ottenere le opzioni"+msgid "Failed to initialize Carbon client"msgstr "Impossibile inizializzare il client Carbon"@@ -6513,6 +6544,9 @@ msgstr "Impossibile spostare il conto: {0}"msgid "Failed to regenerate thumbnail"msgstr "Impossibile rigenerare l'anteprima"+msgid "Failed to register passkey"+msgstr "Impossibile registrare la passkey"+msgid "Failed to remove image: {errorMessage}"msgstr "Impossibile rimuovere l'immagine: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Ultima esecuzione"msgid "Last synced: <0/>"msgstr "Ultimo sincronismo: <0/>"+msgid "Last used"+msgstr "Ultimo utilizzo"+msgid "Latest operation end"msgstr "Fine dell'ultimo operazione"@@ -9846,6 +9883,9 @@ msgstr "Nessun ID parte"msgid "No parts"msgstr "Nessuna parte"+msgid "No passkeys registered yet."+msgstr "Nessuna passkey registrata finora."+msgid "No payables"msgstr "Nessun debito"@@ -10447,9 +10487,15 @@ msgstr "Pagine e sezioni opzionali"msgid "Options"msgstr "Opzioni"+msgid "or"+msgstr "o"+msgid "OR"msgstr "O"+msgid "Or enter this secret manually:"+msgstr "Oppure inserisci questo segreto manualmente:"+msgid "Order"msgstr "Ordine"@@ -10716,6 +10762,18 @@ msgstr "Passa"msgid "Passed"msgstr "Superato"+msgid "Passkey name"+msgstr "Nome della passkey"++msgid "Passkey unlock failed"+msgstr "Sblocco della passkey non riuscito"++msgid "Passkeys"+msgstr "Passkey"++msgid "Passkeys are disabled"+msgstr "Le passkey sono disabilitate"+msgid "Path"msgstr "Percorso"@@ -12011,6 +12069,9 @@ msgstr "Registrato"msgid "Registered"msgstr "Punto di Riordino"+msgid "Registration failed"+msgstr "Registrazione non riuscita"+msgid "Registration Number"msgstr "Numero di Registrazione"@@ -12087,6 +12148,9 @@ msgstr "Rimuovi {0}"msgid "Remove {label}"msgstr "Rimuovi {label}"+msgid "Remove authenticator app"+msgstr "Rimuovi app autenticatore"+msgid "Remove clause"msgstr "Rimuovi clausola"@@ -12135,6 +12199,9 @@ msgstr "Rimuovi questo tipo di archiviazione da tutte le unità di archiviazionemsgid "Remove tool"msgstr "Rimuovi strumento"+msgid "Remove two-factor authentication"+msgstr "Rimuovi autenticazione a due fattori"+msgid "Removed"msgstr "Rimosso"@@ -12241,6 +12308,9 @@ msgstr "Richiedi Approvazione"msgid "Requested Date"msgstr "Data Richiesta"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Richiedi un codice a 6 cifre dall'app autenticatore al momento dell'accesso."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Richiedi un'app autenticatore prima che chiunque possa aprire questa azienda. Le loro altre aziende non sono interessate. Visita la <0>pagina degli account dei dipendenti</0> per vedere lo stato di ogni persona."@@ -12274,6 +12344,9 @@ msgstr "Azioni Richieste (in ordine)"msgid "Required Date"msgstr "Data Richiesta"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Richiesto in un ambiente controllato — i registri di audit non possono essere disattivati."+msgid "Requirement"msgstr "Requisito"@@ -12827,6 +12900,9 @@ msgstr "Scansiona o cerca..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Scansiona o seleziona un'entità tracciata da questo lotto per aggiungerla come colonna di esempio, quindi registra il suo risultato nella griglia."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Scansiona questo codice QR con la tua app autenticatore (ad es. Google Authenticator o 1Password), quindi inserisci il codice a 6 cifre che mostra."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Scannerizza questo con la tua app autenticatore, quindi inserisci il codice a 6 cifre che mostra."@@ -12989,6 +13065,9 @@ msgstr "Secondi per completare"msgid "Seconds/Piece"msgstr "Secondi/Pezzo"+msgid "Secret copied to clipboard"+msgstr "Segreto copiato negli appunti"+msgid "Section"msgstr "Sezione"@@ -13306,6 +13385,9 @@ msgstr "servizi"msgid "Services"msgstr "Servizi"+msgid "Session locked"+msgstr "Sessione bloccata"+msgid "Set a target"msgstr "Imposta un obiettivo"@@ -13342,6 +13424,9 @@ msgstr "Configura app autenticatore"msgid "Set up the right way"msgstr "Configura nel modo giusto"+msgid "Set up two-factor authentication"+msgstr "Configura l'autenticazione a due fattori"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Configura la tua azienda con un piano di implementazione passo dopo passo che copre configurazione, dati, formazione e go-live."@@ -13617,6 +13702,9 @@ msgstr "Mostrato come sfondo tenue dietro ogni pagina dei PDF generati"msgid "Shown to the user when this rule fails."msgstr "Mostrato all'utente quando questa regola non riesce."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Accedi con biometrica invece di un magic link. Le passkey sono protette da Face ID, Touch ID o dal PIN del tuo dispositivo."+msgid "Sign in with Email"msgstr "Accedi con Email"@@ -13635,6 +13723,9 @@ msgstr "Esci"msgid "Sign Out"msgstr "Esci"+msgid "Sign out instead"+msgstr "Esci invece"+msgid "Sign-off review before moving to the next step"msgstr "Revisione di approvazione prima di passare al passaggio successivo"@@ -13650,6 +13741,9 @@ msgstr "Quantità firmata — negativa per i movimenti in uscita"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "L'accesso richiede anche un codice monouso dalla tua app autenticatore"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "L'accesso non richiederà più un codice. Inserisci il codice a 6 cifre attuale dall'app autenticatore per confermare."+msgid "Sites & locations"msgstr "Siti e ubicazioni"@@ -15824,9 +15918,18 @@ msgstr "Due Fattori"msgid "Two-factor authentication"msgstr "Autenticazione a due fattori"+msgid "Two-factor authentication disabled"+msgstr "Autenticazione a due fattori disabilitata"++msgid "Two-factor authentication enabled"+msgstr "Autenticazione a due fattori abilitata"+msgid "Two-Factor Authentication Enforcement"msgstr "Applicazione dell'autenticazione a due fattori"+msgid "Two-factor authentication is not enabled."+msgstr "L'autenticazione a due fattori non è abilitata."+msgid "Type"msgstr "Tipo"@@ -15857,6 +15960,9 @@ msgstr "Tipi"msgid "U.S. Person Attestation"msgstr "Attestazione di Persona Statunitense"+msgid "Unable to unlock"+msgstr "Impossibile sbloccare"+msgid "Unapplied"msgstr "Non applicato"@@ -15959,6 +16065,9 @@ msgstr "Scollega il lavoro dall'ordine di vendita?"msgid "Unlock"msgstr "Sblocca"+msgid "Unlock with passkey"+msgstr "Sblocca con passkey"+msgid "Unmapped accounts"msgstr "Account non mappati"@@ -17301,6 +17410,9 @@ msgstr "Il tuo team di progetto"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "I tuoi dati reali sono caricati e hai controllato un campione e lo hai approvato."+msgid "Your session was locked after inactivity."+msgstr "La tua sessione è stata bloccata per inattività."+msgid "Your source data is accessible and reasonably clean"msgstr "I tuoi dati di origine sono accessibili e ragionevolmente puliti"diff --git a/packages/locale/locales/it/mes.po b/packages/locale/locales/it/mes.poindex 956e6349b4..579a81f427 100644--- a/packages/locale/locales/it/mes.po+++ b/packages/locale/locales/it/mes.po@@ -425,6 +425,9 @@ msgstr "Inserisci il PIN per {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Inserisci il codice a 6 cifre dalla tua app di autenticazione"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Inserisci il codice a 6 cifre dalla tua app di autenticazione per riprendere."+msgid "Error"msgstr "Errore"@@ -926,6 +929,9 @@ msgstr "Eseguito dall'Operatore"msgid "Optional"msgstr "Facoltativo"+msgid "or"+msgstr "o"+msgid "Overall result"msgstr "Risultato complessivo"@@ -947,6 +953,9 @@ msgstr "Disposizione Parziale"msgid "Passed Inspection"msgstr "Ispezione Superata"+msgid "Passkey unlock failed"+msgstr "Sblocco con passkey non riuscito"+msgid "Pause"msgstr "Pausa"@@ -1221,6 +1230,9 @@ msgstr "Numeri di serie"msgid "Serial Numbers"msgstr "Numeri di Serie"+msgid "Session locked"+msgstr "Sessione bloccata"+msgid "Set Clock Out"msgstr "Imposta Uscita"@@ -1260,6 +1272,9 @@ msgstr "Esci"msgid "Sign Out"msgstr "Esci"+msgid "Sign out instead"+msgstr "Esci invece"+msgid "Signed in as {stationName}"msgstr "Connesso come {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Autenticazione a due fattori richiesta"msgid "Type a message..."msgstr "Scrivi un messaggio..."+msgid "Unable to unlock"+msgstr "Impossibile sbloccare"+msgid "Unissued serial/batch materials"msgstr "Materiali seriali/lotto non prelevati"msgid "Unknown"msgstr "Sconosciuto"+msgid "Unlock"+msgstr "Sblocca"++msgid "Unlock with passkey"+msgstr "Sblocca con passkey"+msgid "Unpick"msgstr "Annulla prelievo"@@ -1475,3 +1499,6 @@ msgstr "Sei timbrato in ingresso da {hoursElapsed} ore. Hai dimenticato di timbrmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "La tua organizzazione richiede un'app di autenticazione. Configurala in Carbon, quindi torna qui."++msgid "Your session was locked after inactivity."+msgstr "La tua sessione è stata bloccata a causa dell'inattività."diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 40bb5c38e5..672a5ea85b 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -110,6 +110,10 @@ msgstr "{0}個の問題 — 未発行"msgid "{0} Processes"msgstr "{0}個のプロセス"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0}登録済み"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0}件の残高のある仕入先"@@ -1062,6 +1066,9 @@ msgstr "あなたの決定についてのメモを追加してください..."msgid "Add Approval Requirement"msgstr "承認要件を追加"+msgid "Add Authenticator App"+msgstr "認証器アプリを追加"+msgid "Add Calibration Record"msgstr "キャリブレーション記録を追加"@@ -1137,6 +1144,9 @@ msgstr "パートナーを追加"msgid "Add parts"msgstr "部品を追加"+msgid "Add Passkey"+msgstr "パスキーを追加"+msgid "Add path"msgstr "パスを追加"@@ -1996,6 +2006,9 @@ msgstr "このカンバンカードを削除してもよろしいですか?こmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "このメンテナンスディスパッチを削除してもよろしいですか?この操作は取り消せません。"+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "このパスキーを削除してもよろしいですか?サインインに使用できなくなります。"+msgid "Are you sure you want to delete this quality document?"msgstr "このクオリティドキュメントを削除してもよろしいですか?"@@ -2261,6 +2274,9 @@ msgstr "監査ログ"msgid "Authentication Error"msgstr "認証エラー"+msgid "Authenticator app"+msgstr "認証器アプリ"+msgid "Authenticator QR code"msgstr "認証器QRコード"@@ -4763,6 +4779,12 @@ msgstr "パーツを削除"msgid "Delete Partner"msgstr "パートナーを削除"+msgid "Delete passkey"+msgstr "パスキーを削除"++msgid "Delete Passkey"+msgstr "パスキーを削除"+msgid "Delete Payment"msgstr "支払いを削除"@@ -5571,6 +5593,9 @@ msgstr "パーツを編集"msgid "Edit Partner"msgstr "パートナーを編集"+msgid "Edit Passkey"+msgstr "パスキーを編集"+msgid "Edit Payment"msgstr "支払いを編集"@@ -5903,6 +5928,9 @@ msgstr "テキストを入力..."msgid "Enter the 6-digit code from your authenticator app"msgstr "認証アプリから6桁のコードを入力してください"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "認証器アプリから6桁のコードを入力して再開します。"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "この移動がどの数量であるべきかを入力します。差分の反対の移動は、オリジナルの横に、オリジナルの期間に投稿されます。"@@ -6443,6 +6471,9 @@ msgstr "リスクの取得に失敗しました"msgid "Failed to fetch suggestions"msgstr "提案の取得に失敗しました"+msgid "Failed to get options"+msgstr "オプションの取得に失敗しました"+msgid "Failed to initialize Carbon client"msgstr "Carbonクライアントの初期化に失敗しました"@@ -6513,6 +6544,9 @@ msgstr "勘定科目の移動に失敗しました: {0}"msgid "Failed to regenerate thumbnail"msgstr "サムネイルの再生成に失敗しました"+msgid "Failed to register passkey"+msgstr "パスキーの登録に失敗しました"+msgid "Failed to remove image: {errorMessage}"msgstr "画像の削除に失敗しました: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "最終実行"msgid "Last synced: <0/>"msgstr "最後に同期: <0/>"+msgid "Last used"+msgstr "最後に使用"+msgid "Latest operation end"msgstr "最終操作終了"@@ -9846,6 +9883,9 @@ msgstr "パーツIDなし"msgid "No parts"msgstr "部品がありません"+msgid "No passkeys registered yet."+msgstr "まだパスキーは登録されていません。"+msgid "No payables"msgstr "支払い義務なし"@@ -10447,9 +10487,15 @@ msgstr "オプションページとセクション"msgid "Options"msgstr "オプション"+msgid "or"+msgstr "または"+msgid "OR"msgstr "または"+msgid "Or enter this secret manually:"+msgstr "または、このシークレットを手動で入力します:"+msgid "Order"msgstr "注文"@@ -10716,6 +10762,18 @@ msgstr "合格"msgid "Passed"msgstr "完了"+msgid "Passkey name"+msgstr "パスキー名"++msgid "Passkey unlock failed"+msgstr "パスキーのロック解除に失敗しました"++msgid "Passkeys"+msgstr "パスキー"++msgid "Passkeys are disabled"+msgstr "パスキーは無効です"+msgid "Path"msgstr "パス"@@ -12011,6 +12069,9 @@ msgstr "登録済み"msgid "Registered"msgstr "再注文点"+msgid "Registration failed"+msgstr "登録に失敗しました"+msgid "Registration Number"msgstr "登録番号"@@ -12087,6 +12148,9 @@ msgstr "{0}を削除"msgid "Remove {label}"msgstr "{label}を削除"+msgid "Remove authenticator app"+msgstr "認証器アプリを削除"+msgid "Remove clause"msgstr "句を削除"@@ -12135,6 +12199,9 @@ msgstr "このストレージタイプをすべての参照ストレージユニmsgid "Remove tool"msgstr "ツールを削除"+msgid "Remove two-factor authentication"+msgstr "二要素認証を削除"+msgid "Removed"msgstr "削除済み"@@ -12241,6 +12308,9 @@ msgstr "承認をリクエスト"msgid "Requested Date"msgstr "リクエスト日"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "サインイン時に認証器アプリから6桁のコードが必要です。"+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "このコンパニーを開く前に認証アプリが必須になります。他のコンパニーには影響しません。<0>従業員アカウントページ</0>をご覧ください。"@@ -12274,6 +12344,9 @@ msgstr "必要なアクション(順番に)"msgid "Required Date"msgstr "必須日付"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "管理された環境では必須です。監査ログはオフにできません。"+msgid "Requirement"msgstr "要件"@@ -12827,6 +12900,9 @@ msgstr "スキャンまたは検索..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "このロットから追跡対象エンティティをスキャンまたは選択してサンプル列として追加し、グリッドにその結果を記録します。"+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "認証器アプリ(Google AuthenticatorまたはOne Passwordなど)でこのQRコードをスキャンしてから、表示される6桁のコードを入力します。"+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "認証アプリでスキャンして、表示される6桁のコードを入力してください。"@@ -12989,6 +13065,9 @@ msgstr "完了までの秒数"msgid "Seconds/Piece"msgstr "秒/個"+msgid "Secret copied to clipboard"+msgstr "シークレットをクリップボードにコピーしました"+msgid "Section"msgstr "セクション"@@ -13306,6 +13385,9 @@ msgstr "サービス"msgid "Services"msgstr "サービス"+msgid "Session locked"+msgstr "セッションがロック中"+msgid "Set a target"msgstr "ターゲットを設定"@@ -13342,6 +13424,9 @@ msgstr "認証アプリをセットアップ"msgid "Set up the right way"msgstr "正しい方法でセットアップ"+msgid "Set up two-factor authentication"+msgstr "二要素認証を設定"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "セットアップ、データ、トレーニング、本番稼働をカバーするステップバイステップの実装プランで会社をセットアップします。"@@ -13617,6 +13702,9 @@ msgstr "生成されたPDFの各ページの背景に薄く表示されます"msgid "Shown to the user when this rule fails."msgstr "このルールが失敗したときにユーザーに表示されます。"+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "マジックリンクの代わりに生体認証でサインインします。パスキーはFace ID、Touch ID、またはデバイスPINで保護されます。"+msgid "Sign in with Email"msgstr "メールでサインイン"@@ -13635,6 +13723,9 @@ msgstr "ログアウト"msgid "Sign Out"msgstr "サインアウト"+msgid "Sign out instead"+msgstr "代わりにサインアウト"+msgid "Sign-off review before moving to the next step"msgstr "次のステップに進む前のサインオフレビュー"@@ -13650,6 +13741,9 @@ msgstr "署名された数量 — アウトバウンド移動の場合は負数"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "サインインには認証アプリからのワンタイムコードも必要です"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "サインインにはコードが不要になります。確認するために、認証器アプリの現在の6桁のコードを入力します。"+msgid "Sites & locations"msgstr "サイトと場所"@@ -15824,9 +15918,18 @@ msgstr "2要素認証"msgid "Two-factor authentication"msgstr "2要素認証"+msgid "Two-factor authentication disabled"+msgstr "二要素認証が無効になりました"++msgid "Two-factor authentication enabled"+msgstr "二要素認証が有効になりました"+msgid "Two-Factor Authentication Enforcement"msgstr "2要素認証の強制実行"+msgid "Two-factor authentication is not enabled."+msgstr "二要素認証は有効になっていません。"+msgid "Type"msgstr "種類"@@ -15857,6 +15960,9 @@ msgstr "タイプ"msgid "U.S. Person Attestation"msgstr "米国人証明"+msgid "Unable to unlock"+msgstr "ロック解除できません"+msgid "Unapplied"msgstr "未適用"@@ -15959,6 +16065,9 @@ msgstr "販売注文からジョブのリンクを解除しますか?"msgid "Unlock"msgstr "ロック解除"+msgid "Unlock with passkey"+msgstr "パスキーでロック解除"+msgid "Unmapped accounts"msgstr "マップされていないアカウント"@@ -17301,6 +17410,9 @@ msgstr "あなたのプロジェクトチーム"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "あなたの実際のデータが読み込まれ、サンプルを確認して承認しました。"+msgid "Your session was locked after inactivity."+msgstr "セッションは非アクティブ後にロックされました。"+msgid "Your source data is accessible and reasonably clean"msgstr "あなたのソースデータはアクセス可能で、適切にクリーンです"diff --git a/packages/locale/locales/ja/mes.po b/packages/locale/locales/ja/mes.poindex 0b482abe52..5055d26efb 100644--- a/packages/locale/locales/ja/mes.po+++ b/packages/locale/locales/ja/mes.po@@ -425,6 +425,9 @@ msgstr "{0} のPINを入力"msgid "Enter the 6-digit code from your authenticator app"msgstr "認証器アプリから6桁のコードを入力してください"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "認証アプリから6桁のコードを入力して再開してください。"+msgid "Error"msgstr "エラー"@@ -926,6 +929,9 @@ msgstr "オペレーター実施"msgid "Optional"msgstr "オプション"+msgid "or"+msgstr "または"+msgid "Overall result"msgstr "全体的な結果"@@ -947,6 +953,9 @@ msgstr "部分的な処分"msgid "Passed Inspection"msgstr "検査合格"+msgid "Passkey unlock failed"+msgstr "パスキーのロック解除に失敗しました"+msgid "Pause"msgstr "一時停止"@@ -1221,6 +1230,9 @@ msgstr "シリアル番号"msgid "Serial Numbers"msgstr "シリアル番号"+msgid "Session locked"+msgstr "セッションがロックされています"+msgid "Set Clock Out"msgstr "退勤時間を設定"@@ -1260,6 +1272,9 @@ msgstr "サインアウト"msgid "Sign Out"msgstr "サインアウト"+msgid "Sign out instead"+msgstr "代わりにサインアウト"+msgid "Signed in as {stationName}"msgstr "{stationName} としてサインイン中"@@ -1393,12 +1408,21 @@ msgstr "二要素認証が必要です"msgid "Type a message..."msgstr "メッセージを入力..."+msgid "Unable to unlock"+msgstr "ロック解除できません"+msgid "Unissued serial/batch materials"msgstr "未払出のシリアル/バッチ材料"msgid "Unknown"msgstr "不明"+msgid "Unlock"+msgstr "ロック解除"++msgid "Unlock with passkey"+msgstr "パスキーでロック解除"+msgid "Unpick"msgstr "ピッキング解除"@@ -1475,3 +1499,6 @@ msgstr "{hoursElapsed} 時間出勤中です。退勤打刻を忘れていませmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "あなたの組織は認証器アプリが必要です。Carbonで設定してから、ここに戻ってください。"++msgid "Your session was locked after inactivity."+msgstr "非アクティブ後、セッションがロックされました。"diff --git a/packages/locale/locales/ko/erp.po b/packages/locale/locales/ko/erp.poindex d6688303af..f05fc88e69 100644--- a/packages/locale/locales/ko/erp.po+++ b/packages/locale/locales/ko/erp.po@@ -110,6 +110,10 @@ msgstr "{0}개 문제 — 발행되지 않음"msgid "{0} Processes"msgstr "공정 {0}개"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0}이 등록되었습니다"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "잔액이 있는 공급업체 {0}곳"@@ -1062,6 +1066,9 @@ msgstr "결정에 대한 메모를 추가하세요..."msgid "Add Approval Requirement"msgstr "승인 요구사항 추가"+msgid "Add Authenticator App"+msgstr "인증 앱 추가"+msgid "Add Calibration Record"msgstr "교정 기록 추가"@@ -1137,6 +1144,9 @@ msgstr "파트너 추가"msgid "Add parts"msgstr "부품 추가"+msgid "Add Passkey"+msgstr "패스키 추가"+msgid "Add path"msgstr "경로 추가"@@ -1996,6 +2006,9 @@ msgstr "이 칸반 카드를 삭제하시겠습니까? 이 작업은 되돌릴msgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "이 유지보수 작업지시를 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "이 패스키를 삭제하시겠습니까? 더 이상 로그인할 수 없습니다."+msgid "Are you sure you want to delete this quality document?"msgstr "이 품질 문서를 삭제하시겠습니까?"@@ -2261,6 +2274,9 @@ msgstr "감사 로그"msgid "Authentication Error"msgstr "인증 오류"+msgid "Authenticator app"+msgstr "인증 앱"+msgid "Authenticator QR code"msgstr "인증자 QR 코드"@@ -4763,6 +4779,12 @@ msgstr "품목 삭제"msgid "Delete Partner"msgstr "파트너 삭제"+msgid "Delete passkey"+msgstr "패스키 삭제"++msgid "Delete Passkey"+msgstr "패스키 삭제"+msgid "Delete Payment"msgstr "결제 삭제"@@ -5571,6 +5593,9 @@ msgstr "품목 수정"msgid "Edit Partner"msgstr "파트너 수정"+msgid "Edit Passkey"+msgstr "패스키 편집"+msgid "Edit Payment"msgstr "결제 수정"@@ -5903,6 +5928,9 @@ msgstr "텍스트 입력…"msgid "Enter the 6-digit code from your authenticator app"msgstr "인증자 앱에서 6자리 코드를 입력하세요"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "계속하려면 인증 앱의 6자리 코드를 입력하세요."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "이 이동이 있었어야 할 수량을 입력하십시오. 차이에 대한 반대 이동은 원본 옆의 원본의 시간 기간에 게시됩니다."@@ -6443,6 +6471,9 @@ msgstr "리스크 조회 실패"msgid "Failed to fetch suggestions"msgstr "제안 조회 실패"+msgid "Failed to get options"+msgstr "옵션을 가져올 수 없습니다"+msgid "Failed to initialize Carbon client"msgstr "Carbon 클라이언트 초기화 실패"@@ -6513,6 +6544,9 @@ msgstr "계정 이동 실패: {0}"msgid "Failed to regenerate thumbnail"msgstr "썸네일 재생성 실패"+msgid "Failed to register passkey"+msgstr "패스키 등록에 실패했습니다"+msgid "Failed to remove image: {errorMessage}"msgstr "이미지를 삭제하지 못했습니다: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "마지막 실행"msgid "Last synced: <0/>"msgstr "마지막 동기화: <0/>"+msgid "Last used"+msgstr "마지막 사용"+msgid "Latest operation end"msgstr "최신 작업 종료"@@ -9846,6 +9883,9 @@ msgstr "품목 ID 없음"msgid "No parts"msgstr "부품 없음"+msgid "No passkeys registered yet."+msgstr "등록된 패스키가 없습니다."+msgid "No payables"msgstr "매입채무가 없습니다"@@ -10447,9 +10487,15 @@ msgstr "선택적 페이지 및 섹션"msgid "Options"msgstr "옵션"+msgid "or"+msgstr "또는"+msgid "OR"msgstr "또는"+msgid "Or enter this secret manually:"+msgstr "또는 이 시크릿을 수동으로 입력하세요:"+msgid "Order"msgstr "주문"@@ -10716,6 +10762,18 @@ msgstr "합격"msgid "Passed"msgstr "합격됨"+msgid "Passkey name"+msgstr "패스키 이름"++msgid "Passkey unlock failed"+msgstr "패스키 잠금 해제 실패"++msgid "Passkeys"+msgstr "패스키"++msgid "Passkeys are disabled"+msgstr "패스키가 비활성화되었습니다"+msgid "Path"msgstr "경로"@@ -12011,6 +12069,9 @@ msgstr "기존 자산 등록"msgid "Registered"msgstr "등록됨"+msgid "Registration failed"+msgstr "등록 실패"+msgid "Registration Number"msgstr "등록 번호"@@ -12087,6 +12148,9 @@ msgstr "{0} 제거"msgid "Remove {label}"msgstr "제거 {label}"+msgid "Remove authenticator app"+msgstr "인증 앱 제거"+msgid "Remove clause"msgstr "절 제거"@@ -12135,6 +12199,9 @@ msgstr "이 저장 유형을 참조하는 모든 저장 단위에서 제거하msgid "Remove tool"msgstr "도구 제거"+msgid "Remove two-factor authentication"+msgstr "2단계 인증 제거"+msgid "Removed"msgstr "제거됨"@@ -12241,6 +12308,9 @@ msgstr "승인 요청"msgid "Requested Date"msgstr "요청일"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "로그인 시 인증 앱의 6자리 코드를 입력하세요."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "이 회사를 열기 전에 인증자 앱을 요구합니다. 다른 회사는 영향을 받지 않습니다. <0>직원 계정 페이지</0>를 방문하여 각 사람의 상태를 확인하세요."@@ -12274,6 +12344,9 @@ msgstr "필수 조치(순서대로)"msgid "Required Date"msgstr "필요일"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "통제된 환경에서 필수입니다 — 감사 로깅을 끌 수 없습니다."+msgid "Requirement"msgstr "요구사항"@@ -12827,6 +12900,9 @@ msgstr "스캔 또는 검색..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "이 로트에서 추적 엔티티를 스캔하거나 선택하여 샘플 열로 추가한 후 그리드에 결과를 기록하세요."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "인증 앱(예: Google Authenticator 또는 1Password)으로 이 QR 코드를 스캔한 후 표시된 6자리 코드를 입력하세요."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "인증자 앱으로 이것을 스캔한 후 표시된 6자리 코드를 입력하세요."@@ -12989,6 +13065,9 @@ msgstr "완료할 시간(초)"msgid "Seconds/Piece"msgstr "초/개"+msgid "Secret copied to clipboard"+msgstr "시크릿이 클립보드에 복사되었습니다"+msgid "Section"msgstr "섹션"@@ -13306,6 +13385,9 @@ msgstr "서비스"msgid "Services"msgstr "서비스"+msgid "Session locked"+msgstr "세션이 잠겼습니다"+msgid "Set a target"msgstr "목표 설정"@@ -13342,6 +13424,9 @@ msgstr "인증자 앱 설정"msgid "Set up the right way"msgstr "올바른 방식으로 설정하기"+msgid "Set up two-factor authentication"+msgstr "2단계 인증 설정"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "설정, 데이터, 교육, 도입까지 단계별 실행 계획으로 귀사를 구축하세요."@@ -13617,6 +13702,9 @@ msgstr "생성된 PDF의 모든 페이지 배경에 옅게 표시됩니다"msgid "Shown to the user when this rule fails."msgstr "이 규칙이 실패할 때 사용자에게 표시됩니다."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "매직 링크 대신 생체 인식으로 로그인하세요. 패스키는 Face ID, Touch ID 또는 기기 PIN으로 보호됩니다."+msgid "Sign in with Email"msgstr "이메일로 로그인"@@ -13635,6 +13723,9 @@ msgstr "로그아웃"msgid "Sign Out"msgstr "로그아웃"+msgid "Sign out instead"+msgstr "대신 로그아웃"+msgid "Sign-off review before moving to the next step"msgstr "다음 단계로 넘어가기 전 서명 검토"@@ -13650,6 +13741,9 @@ msgstr "서명된 수량 — 아웃바운드 이동의 경우 음수"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "로그인에는 인증자 앱의 일회용 코드도 필요합니다"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "로그인할 때 더 이상 코드가 필요하지 않습니다. 확인하려면 인증 앱의 현재 6자리 코드를 입력하세요."+msgid "Sites & locations"msgstr "사이트 및 위치"@@ -15824,9 +15918,18 @@ msgstr "2단계"msgid "Two-factor authentication"msgstr "2단계 인증"+msgid "Two-factor authentication disabled"+msgstr "2단계 인증이 비활성화되었습니다"++msgid "Two-factor authentication enabled"+msgstr "2단계 인증이 활성화되었습니다"+msgid "Two-Factor Authentication Enforcement"msgstr "2단계 인증 적용"+msgid "Two-factor authentication is not enabled."+msgstr "2단계 인증이 활성화되지 않았습니다."+msgid "Type"msgstr "유형"@@ -15857,6 +15960,9 @@ msgstr "유형"msgid "U.S. Person Attestation"msgstr "미국인 증명"+msgid "Unable to unlock"+msgstr "잠금 해제할 수 없습니다"+msgid "Unapplied"msgstr "미적용"@@ -15959,6 +16065,9 @@ msgstr "작업을 판매주문에서 연결 해제하시겠습니까?"msgid "Unlock"msgstr "잠금 해제"+msgid "Unlock with passkey"+msgstr "패스키로 잠금 해제"+msgid "Unmapped accounts"msgstr "매핑되지 않은 계정"@@ -17301,6 +17410,9 @@ msgstr "프로젝트 팀"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "실제 데이터가 로드되었고 샘플을 확인하여 승인했습니다."+msgid "Your session was locked after inactivity."+msgstr "비활성화 후 세션이 잠겼습니다."+msgid "Your source data is accessible and reasonably clean"msgstr "원본 데이터에 접근 가능하고 어느 정도 정리되어 있음"diff --git a/packages/locale/locales/ko/mes.po b/packages/locale/locales/ko/mes.poindex 633a35c35f..3f7e0e2800 100644--- a/packages/locale/locales/ko/mes.po+++ b/packages/locale/locales/ko/mes.po@@ -425,6 +425,9 @@ msgstr "{0}의 PIN 입력"msgid "Enter the 6-digit code from your authenticator app"msgstr "인증 앱의 6자리 코드를 입력하세요"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "인증 앱에서 6자리 코드를 입력하여 계속하세요."+msgid "Error"msgstr "오류"@@ -926,6 +929,9 @@ msgstr "작업자 수행"msgid "Optional"msgstr "선택 사항"+msgid "or"+msgstr "또는"+msgid "Overall result"msgstr "전체 결과"@@ -947,6 +953,9 @@ msgstr "부분 처리"msgid "Passed Inspection"msgstr "검사 합격"+msgid "Passkey unlock failed"+msgstr "패스키 잠금 해제 실패"+msgid "Pause"msgstr "일시정지"@@ -1221,6 +1230,9 @@ msgstr "일련번호"msgid "Serial Numbers"msgstr "일련번호"+msgid "Session locked"+msgstr "세션이 잠겨 있음"+msgid "Set Clock Out"msgstr "퇴근 처리"@@ -1260,6 +1272,9 @@ msgstr "로그아웃"msgid "Sign Out"msgstr "로그아웃"+msgid "Sign out instead"+msgstr "대신 로그아웃"+msgid "Signed in as {stationName}"msgstr "{stationName}(으)로 로그인됨"@@ -1393,12 +1408,21 @@ msgstr "2단계 인증 필수"msgid "Type a message..."msgstr "메시지를 입력하세요..."+msgid "Unable to unlock"+msgstr "잠금을 해제할 수 없음"+msgid "Unissued serial/batch materials"msgstr "출고되지 않은 일련번호/배치 자재"msgid "Unknown"msgstr "알 수 없음"+msgid "Unlock"+msgstr "잠금 해제"++msgid "Unlock with passkey"+msgstr "패스키로 잠금 해제"+msgid "Unpick"msgstr "피킹 취소"@@ -1475,3 +1499,6 @@ msgstr "{hoursElapsed}시간 동안 출근 상태입니다. 퇴근 처리를 잊msgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "조직에서 인증 앱을 요구하고 있습니다. Carbon에서 설정한 후 여기로 돌아오세요."++msgid "Your session was locked after inactivity."+msgstr "세션이 비활성 후 잠겼습니다."diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex b9ffc11768..84e23e20e4 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problemów — nie opublikowano"msgid "{0} Processes"msgstr "{0} Procesy"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} zarejestrowane"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} dostawców z saldem"@@ -1062,6 +1066,9 @@ msgstr "Dodaj dowolne notatki dotyczące Twojej decyzji..."msgid "Add Approval Requirement"msgstr "Dodaj wymóg zatwierdzenia"+msgid "Add Authenticator App"+msgstr "Dodaj aplikację Authenticator"+msgid "Add Calibration Record"msgstr "Dodaj Rekord Kalibracji"@@ -1137,6 +1144,9 @@ msgstr "Dodaj partnera"msgid "Add parts"msgstr "Dodaj części"+msgid "Add Passkey"+msgstr "Dodaj klucz dostępu"+msgid "Add path"msgstr "Dodaj ścieżkę"@@ -1996,6 +2006,9 @@ msgstr "Czy na pewno chcesz usunąć tę kartę kanban? Tej operacji nie możnamsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Czy na pewno chcesz usunąć tę dyspozycję konserwacji? Tej operacji nie można cofnąć."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Czy na pewno chcesz usunąć ten klucz dostępu? Nie będziesz mógł go używać do logowania."+msgid "Are you sure you want to delete this quality document?"msgstr "Czy na pewno chcesz usunąć ten dokument jakości?"@@ -2261,6 +2274,9 @@ msgstr "Dzienniki audytu"msgid "Authentication Error"msgstr "Błąd uwierzytelniania"+msgid "Authenticator app"+msgstr "Aplikacja Authenticator"+msgid "Authenticator QR code"msgstr "Kod QR authenticatora"@@ -4763,6 +4779,12 @@ msgstr "Usuń część"msgid "Delete Partner"msgstr "Usuń partnera"+msgid "Delete passkey"+msgstr "Usuń klucz dostępu"++msgid "Delete Passkey"+msgstr "Usuń klucz dostępu"+msgid "Delete Payment"msgstr "Usuń płatność"@@ -5571,6 +5593,9 @@ msgstr "Edytuj Część"msgid "Edit Partner"msgstr "Edytuj Partnera"+msgid "Edit Passkey"+msgstr "Edytuj klucz dostępu"+msgid "Edit Payment"msgstr "Edytuj Płatność"@@ -5903,6 +5928,9 @@ msgstr "Wprowadź tekst…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Wprowadź 6-cyfrowy kod z aplikacji authenticator"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Wpisz 6-cyfrowy kod z aplikacji Authenticator, aby wznowić."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Wprowadź ilość, która powinna być dla tego ruchu. Przeciwny ruch dla różnicy jest publikowany obok oryginału w okresie czasowym oryginału."@@ -6443,6 +6471,9 @@ msgstr "Nie udało się pobrać ryzyk"msgid "Failed to fetch suggestions"msgstr "Nie udało się pobrać sugestii"+msgid "Failed to get options"+msgstr "Nie udało się pobrać opcji"+msgid "Failed to initialize Carbon client"msgstr "Nie udało się zainicjować klienta Carbon"@@ -6513,6 +6544,9 @@ msgstr "Nie udało się przenieść konta: {0}"msgid "Failed to regenerate thumbnail"msgstr "Nie udało się ponownie wygenerować miniatury"+msgid "Failed to register passkey"+msgstr "Nie udało się zarejestrować klucza dostępu"+msgid "Failed to remove image: {errorMessage}"msgstr "Nie udało się usunąć obrazu: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Ostatnie uruchomienie"msgid "Last synced: <0/>"msgstr "Ostatnia synchronizacja: <0/>"+msgid "Last used"+msgstr "Ostatnio używany"+msgid "Latest operation end"msgstr "Koniec ostatniej operacji"@@ -9846,6 +9883,9 @@ msgstr "Brak identyfikatora części"msgid "No parts"msgstr "Brak części"+msgid "No passkeys registered yet."+msgstr "Nie zarejestrowano jeszcze żadnych kluczy dostępu."+msgid "No payables"msgstr "Brak zobowiązań"@@ -10447,9 +10487,15 @@ msgstr "Opcjonalne strony i sekcje"msgid "Options"msgstr "Opcje"+msgid "or"+msgstr "lub"+msgid "OR"msgstr "LUB"+msgid "Or enter this secret manually:"+msgstr "Lub wpisz tę sekretną wartość ręcznie:"+msgid "Order"msgstr "Zamówienie"@@ -10716,6 +10762,18 @@ msgstr "Zatwierdź"msgid "Passed"msgstr "Zaliczone"+msgid "Passkey name"+msgstr "Nazwa klucza dostępu"++msgid "Passkey unlock failed"+msgstr "Nie udało się odblokować za pomocą klucza dostępu"++msgid "Passkeys"+msgstr "Klucze dostępu"++msgid "Passkeys are disabled"+msgstr "Klucze dostępu są wyłączone"+msgid "Path"msgstr "Ścieżka"@@ -12011,6 +12069,9 @@ msgstr "Zarejestrowany"msgid "Registered"msgstr "Punkt Ponownego Zamówienia"+msgid "Registration failed"+msgstr "Rejestracja nie powiodła się"+msgid "Registration Number"msgstr "Numer rejestracyjny"@@ -12087,6 +12148,9 @@ msgstr "Usuń {0}"msgid "Remove {label}"msgstr "Usuń {label}"+msgid "Remove authenticator app"+msgstr "Usuń aplikację Authenticator"+msgid "Remove clause"msgstr "Usuń klauzulę"@@ -12135,6 +12199,9 @@ msgstr "Usuń ten typ magazynu ze wszystkich jednostek magazynowych, które sięmsgid "Remove tool"msgstr "Usuń narzędzie"+msgid "Remove two-factor authentication"+msgstr "Usuń uwierzytelnianie dwuskładnikowe"+msgid "Removed"msgstr "Usunięte"@@ -12241,6 +12308,9 @@ msgstr "Poproś o zatwierdzenie"msgid "Requested Date"msgstr "Data żądana"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Wymagaj 6-cyfrowego kodu z aplikacji Authenticator przy logowaniu."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Wymagaj aplikacji authenticator przed otwarciem tej firmy. Pozostałe firmy danej osoby nie są objęte. Odwiedź <0>stronę kont pracowników</0>, aby zobaczyć status każdej osoby."@@ -12274,6 +12344,9 @@ msgstr "Wymagane Działania (w porządku)"msgid "Required Date"msgstr "Data wymagana"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Wymagane w kontrolowanym środowisku — rejestrowanie audytu nie może być wyłączone."+msgid "Requirement"msgstr "Wymóg"@@ -12827,6 +12900,9 @@ msgstr "Skanuj lub wyszukaj..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Skanuj lub wybierz śledzoną jednostkę z tej partii, aby dodać ją jako kolumnę próbną, a następnie zanotuj jej wynik w siatce."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Zeskanuj ten kod QR za pomocą aplikacji Authenticator (np. Google Authenticator lub 1Password), a następnie wpisz wyświetlany 6-cyfrowy kod."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Zeskanuj to za pomocą aplikacji authenticator, a następnie wprowadź wyświetlany 6-cyfrowy kod."@@ -12989,6 +13065,9 @@ msgstr "Sekund do ukończenia"msgid "Seconds/Piece"msgstr "Sekundy/Sztuka"+msgid "Secret copied to clipboard"+msgstr "Sekretna wartość skopiowana do schowka"+msgid "Section"msgstr "Sekcja"@@ -13306,6 +13385,9 @@ msgstr "usługi"msgid "Services"msgstr "Usługi"+msgid "Session locked"+msgstr "Sesja zablokowana"+msgid "Set a target"msgstr "Ustaw cel"@@ -13342,6 +13424,9 @@ msgstr "Skonfiguruj aplikację authenticator"msgid "Set up the right way"msgstr "Prawidłowa konfiguracja"+msgid "Set up two-factor authentication"+msgstr "Skonfiguruj uwierzytelnianie dwuskładnikowe"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Skonfiguruj swoją firmę według planu wdrożenia krok po kroku, obejmującego konfigurację, dane, szkolenia i wdrożenie."@@ -13617,6 +13702,9 @@ msgstr "Wyświetlany jako delikatne tło za każdą stroną wygenerowanych plikmsgid "Shown to the user when this rule fails."msgstr "Wyświetlane użytkownikowi, gdy ta reguła się nie powiedzie."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Zaloguj się za pomocą biometrii zamiast linku magicznego. Klucze dostępu są zabezpieczone za pomocą Face ID, Touch ID lub numeru PIN urządzenia."+msgid "Sign in with Email"msgstr "Zaloguj się za pomocą poczty e-mail"@@ -13635,6 +13723,9 @@ msgstr "Wyloguj się"msgid "Sign Out"msgstr "Wyloguj sie"+msgid "Sign out instead"+msgstr "Zamiast tego wyloguj się"+msgid "Sign-off review before moving to the next step"msgstr "Zatwierdzenie przed przejściem do następnego kroku"@@ -13650,6 +13741,9 @@ msgstr "Ilość ze znakiem — ujemna dla ruchów wychodzących"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Logowanie wymaga również kodu jednorazowego z aplikacji authenticator"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Logowanie nie będzie już wymagać kodu. Wpisz bieżący 6-cyfrowy kod z aplikacji Authenticator, aby potwierdzić."+msgid "Sites & locations"msgstr "Lokalizacje i obiekty"@@ -15824,9 +15918,18 @@ msgstr "Dwuskładnikowe"msgid "Two-factor authentication"msgstr "Uwierzytelnianie dwuskładnikowe"+msgid "Two-factor authentication disabled"+msgstr "Uwierzytelnianie dwuskładnikowe wyłączone"++msgid "Two-factor authentication enabled"+msgstr "Uwierzytelnianie dwuskładnikowe włączone"+msgid "Two-Factor Authentication Enforcement"msgstr "Wymuszanie uwierzytelniania dwuskładnikowego"+msgid "Two-factor authentication is not enabled."+msgstr "Uwierzytelnianie dwuskładnikowe nie jest włączone."+msgid "Type"msgstr "Typ"@@ -15857,6 +15960,9 @@ msgstr "Typy"msgid "U.S. Person Attestation"msgstr "Zaświadczenie osoby ze Stanów Zjednoczonych"+msgid "Unable to unlock"+msgstr "Nie można odblokować"+msgid "Unapplied"msgstr "Niezastosowane"@@ -15959,6 +16065,9 @@ msgstr "Odłączyć zadanie od zamówienia sprzedaży?"msgid "Unlock"msgstr "Odblokuj"+msgid "Unlock with passkey"+msgstr "Odblokuj za pomocą klucza dostępu"+msgid "Unmapped accounts"msgstr "Niezamapowane konta"@@ -17301,6 +17410,9 @@ msgstr "Twój Zespół Projektowy"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Twoje rzeczywiste dane są załadowane i sprawdziłeś próbkę oraz ją zatwierdziłeś."+msgid "Your session was locked after inactivity."+msgstr "Twoja sesja została zablokowana z powodu braku aktywności."+msgid "Your source data is accessible and reasonably clean"msgstr "Twoje dane źródłowe są dostępne i w rozsądnie czystej formie"diff --git a/packages/locale/locales/pl/mes.po b/packages/locale/locales/pl/mes.poindex 77273d48c7..e3a3201ee5 100644--- a/packages/locale/locales/pl/mes.po+++ b/packages/locale/locales/pl/mes.po@@ -425,6 +425,9 @@ msgstr "Wprowadź PIN dla {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Wprowadź 6-cyfrowy kod z aplikacji uwierzytelniającej"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Wpisz 6-cyfrowy kod z twojej aplikacji autoryzacyjnej, aby wznowić."+msgid "Error"msgstr "Błąd"@@ -926,6 +929,9 @@ msgstr "Wykonane przez operatora"msgid "Optional"msgstr "Opcjonalnie"+msgid "or"+msgstr "lub"+msgid "Overall result"msgstr "Wynik ogólny"@@ -947,6 +953,9 @@ msgstr "Częściowa dyspozycja"msgid "Passed Inspection"msgstr "Inspekcja zaliczona"+msgid "Passkey unlock failed"+msgstr "Nieudane odblokowanie klucza dostępu"+msgid "Pause"msgstr "Pauza"@@ -1221,6 +1230,9 @@ msgstr "Numery seryjne"msgid "Serial Numbers"msgstr "Numery seryjne"+msgid "Session locked"+msgstr "Sesja zablokowana"+msgid "Set Clock Out"msgstr "Ustaw zakończenie zmiany"@@ -1260,6 +1272,9 @@ msgstr "Wyloguj się"msgid "Sign Out"msgstr "Wyloguj się"+msgid "Sign out instead"+msgstr "Zamiast tego wyloguj się"+msgid "Signed in as {stationName}"msgstr "Zalogowany jako {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Wymagane uwierzytelnianie dwuskładnikowe"msgid "Type a message..."msgstr "Wpisz wiadomość..."+msgid "Unable to unlock"+msgstr "Nie można odblokować"+msgid "Unissued serial/batch materials"msgstr "Niewydane materiały seryjne/partyjne"msgid "Unknown"msgstr "Nieznane"+msgid "Unlock"+msgstr "Odblokuj"++msgid "Unlock with passkey"+msgstr "Odblokuj za pomocą klucza dostępu"+msgid "Unpick"msgstr "Cofnij pobranie"@@ -1475,3 +1499,6 @@ msgstr "Jesteś zalogowany od {hoursElapsed} godzin. Czy zapomniałeś zakończymsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Twoja organizacja wymaga aplikacji uwierzytelniającej. Skonfiguruj ją w aplikacji Carbon, a następnie wróć tutaj."++msgid "Your session was locked after inactivity."+msgstr "Twoja sesja została zablokowana z powodu nieaktywności."diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex d87a54d2ef..80faf1cebf 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -110,6 +110,10 @@ msgstr "{0} problemas — não publicado"msgid "{0} Processes"msgstr "{0} Processos"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} registado"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} fornecedores com saldo"@@ -1062,6 +1066,9 @@ msgstr "Adicione qualquer nota sobre sua decisão..."msgid "Add Approval Requirement"msgstr "Adicionar Requisito de Aprovação"+msgid "Add Authenticator App"+msgstr "Adicionar Aplicação Autenticadora"+msgid "Add Calibration Record"msgstr "Adicionar Registro de Calibração"@@ -1137,6 +1144,9 @@ msgstr "Adicionar Parceiro"msgid "Add parts"msgstr "Adicionar peças"+msgid "Add Passkey"+msgstr "Adicionar Chave de Acesso"+msgid "Add path"msgstr "Adicionar caminho"@@ -1996,6 +2006,9 @@ msgstr "Tem a certeza de que deseja eliminar este cartão kanban? Esta ação nmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Tem a certeza de que deseja eliminar este despacho de manutenção? Esta ação não pode ser desfeita."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Tem certeza de que deseja eliminar esta chave de acesso? Não poderá mais usá-la para iniciar sessão."+msgid "Are you sure you want to delete this quality document?"msgstr "Tem a certeza de que deseja eliminar este documento de qualidade?"@@ -2261,6 +2274,9 @@ msgstr "Registos de Auditoria"msgid "Authentication Error"msgstr "Erro de Autenticação"+msgid "Authenticator app"+msgstr "Aplicação Autenticadora"+msgid "Authenticator QR code"msgstr "Código QR do autenticador"@@ -4763,6 +4779,12 @@ msgstr "Eliminar Peça"msgid "Delete Partner"msgstr "Eliminar Parceiro"+msgid "Delete passkey"+msgstr "Eliminar chave de acesso"++msgid "Delete Passkey"+msgstr "Eliminar Chave de Acesso"+msgid "Delete Payment"msgstr "Eliminar Pagamento"@@ -5571,6 +5593,9 @@ msgstr "Editar Peça"msgid "Edit Partner"msgstr "Editar Parceiro"+msgid "Edit Passkey"+msgstr "Editar Chave de Acesso"+msgid "Edit Payment"msgstr "Editar Pagamento"@@ -5903,6 +5928,9 @@ msgstr "Digite o texto…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Digite o código de 6 dígitos do seu aplicativo autenticador"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Introduza o código de 6 dígitos da sua aplicação autenticadora para continuar."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Insira a quantidade que esse movimento deveria ter sido. Um movimento oposto para a diferença é lançado ao lado do original, no período de tempo do original."@@ -6443,6 +6471,9 @@ msgstr "Falha ao buscar riscos"msgid "Failed to fetch suggestions"msgstr "Falha ao buscar sugestões"+msgid "Failed to get options"+msgstr "Falha ao obter opções"+msgid "Failed to initialize Carbon client"msgstr "Falha ao inicializar cliente Carbon"@@ -6513,6 +6544,9 @@ msgstr "Falha ao mover conta: {0}"msgid "Failed to regenerate thumbnail"msgstr "Falha ao regenerar miniatura"+msgid "Failed to register passkey"+msgstr "Falha ao registar chave de acesso"+msgid "Failed to remove image: {errorMessage}"msgstr "Falha ao remover imagem: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Última execução"msgid "Last synced: <0/>"msgstr "Última sincronização: <0/>"+msgid "Last used"+msgstr "Última utilização"+msgid "Latest operation end"msgstr "Término da operação mais recente"@@ -9846,6 +9883,9 @@ msgstr "Sem ID de peça"msgid "No parts"msgstr "Nenhuma peça"+msgid "No passkeys registered yet."+msgstr "Nenhuma chave de acesso registada ainda."+msgid "No payables"msgstr "Sem contas a pagar"@@ -10447,9 +10487,15 @@ msgstr "Páginas e seções opcionais"msgid "Options"msgstr "Opções"+msgid "or"+msgstr "ou"+msgid "OR"msgstr "OU"+msgid "Or enter this secret manually:"+msgstr "Ou introduza este segredo manualmente:"+msgid "Order"msgstr "Pedido"@@ -10716,6 +10762,18 @@ msgstr "Passar"msgid "Passed"msgstr "Aprovado"+msgid "Passkey name"+msgstr "Nome da chave de acesso"++msgid "Passkey unlock failed"+msgstr "Falha ao desbloquear com chave de acesso"++msgid "Passkeys"+msgstr "Chaves de Acesso"++msgid "Passkeys are disabled"+msgstr "As chaves de acesso estão desabilitadas"+msgid "Path"msgstr "Caminho"@@ -12011,6 +12069,9 @@ msgstr "Registrado"msgid "Registered"msgstr "Ponto de Reabastecimento"+msgid "Registration failed"+msgstr "Falha no registo"+msgid "Registration Number"msgstr "Número de Registro"@@ -12087,6 +12148,9 @@ msgstr "Remover {0}"msgid "Remove {label}"msgstr "Remover {label}"+msgid "Remove authenticator app"+msgstr "Remover aplicação autenticadora"+msgid "Remove clause"msgstr "Remover cláusula"@@ -12135,6 +12199,9 @@ msgstr "Remova este tipo de armazenamento de todas as unidades de armazenamentomsgid "Remove tool"msgstr "Remover ferramenta"+msgid "Remove two-factor authentication"+msgstr "Remover autenticação de dois fatores"+msgid "Removed"msgstr "Removido"@@ -12241,6 +12308,9 @@ msgstr "Solicitar Aprovação"msgid "Requested Date"msgstr "Data Solicitada"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Exigir um código de 6 dígitos de uma aplicação autenticadora ao iniciar sessão."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Requer um aplicativo autenticador antes de qualquer pessoa poder abrir esta empresa. Suas outras empresas não são afetadas. Visite a <0>página de contas de funcionários</0> para ver o status de cada pessoa."@@ -12274,6 +12344,9 @@ msgstr "Ações Obrigatórias (em ordem)"msgid "Required Date"msgstr "Data Necessária"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Obrigatório num ambiente controlado — o registo de auditoria não pode ser desativado."+msgid "Requirement"msgstr "Requisito"@@ -12827,6 +12900,9 @@ msgstr "Digitalize ou pesquise..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Digitalize ou selecione uma entidade rastreada deste lote para adicioná-la como coluna de amostra e, em seguida, registre seu resultado na grade."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Digitalize este código QR com a sua aplicação autenticadora (p.ex. Google Authenticator ou 1Password), depois introduza o código de 6 dígitos que apresenta."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Digitalize isto com seu aplicativo autenticador, depois digite o código de 6 dígitos que ele exibe."@@ -12989,6 +13065,9 @@ msgstr "Segundos para completar"msgid "Seconds/Piece"msgstr "Segundos/Peça"+msgid "Secret copied to clipboard"+msgstr "Segredo copiado para a área de transferência"+msgid "Section"msgstr "Seção"@@ -13306,6 +13385,9 @@ msgstr "serviços"msgid "Services"msgstr "Serviços"+msgid "Session locked"+msgstr "Sessão bloqueada"+msgid "Set a target"msgstr "Defina uma meta"@@ -13342,6 +13424,9 @@ msgstr "Configurar aplicativo autenticador"msgid "Set up the right way"msgstr "Configure da forma correta"+msgid "Set up two-factor authentication"+msgstr "Configurar autenticação de dois fatores"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Configure sua empresa com um plano de implementação passo a passo cobrindo configuração, dados, treinamento e go-live."@@ -13617,6 +13702,9 @@ msgstr "Exibido como um fundo suave atrás de cada página dos PDFs gerados"msgid "Shown to the user when this rule fails."msgstr "Mostrado ao usuário quando esta regra falha."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Inicie sessão com biometria em vez de uma ligação mágica. As chaves de acesso são protegidas por Face ID, Touch ID ou o PIN do seu dispositivo."+msgid "Sign in with Email"msgstr "Entrar com Email"@@ -13635,6 +13723,9 @@ msgstr "Sair"msgid "Sign Out"msgstr "Sair"+msgid "Sign out instead"+msgstr "Sair em vez disso"+msgid "Sign-off review before moving to the next step"msgstr "Revisão de aprovação antes de passar para a próxima etapa"@@ -13650,6 +13741,9 @@ msgstr "Quantidade assinada — negativa para movimentos de saída"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Entrar também requer um código único do seu aplicativo autenticador"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Iniciar sessão deixará de exigir um código. Introduza o código de 6 dígitos atual da sua aplicação autenticadora para confirmar."+msgid "Sites & locations"msgstr "Locais e instalações"@@ -15824,9 +15918,18 @@ msgstr "Dois Fatores"msgid "Two-factor authentication"msgstr "Autenticação de dois fatores"+msgid "Two-factor authentication disabled"+msgstr "Autenticação de dois fatores desabilitada"++msgid "Two-factor authentication enabled"+msgstr "Autenticação de dois fatores ativada"+msgid "Two-Factor Authentication Enforcement"msgstr "Imposição de Autenticação de Dois Fatores"+msgid "Two-factor authentication is not enabled."+msgstr "A autenticação de dois fatores não está ativada."+msgid "Type"msgstr "Tipo"@@ -15857,6 +15960,9 @@ msgstr "Tipos"msgid "U.S. Person Attestation"msgstr "Atestação de Pessoa dos EUA"+msgid "Unable to unlock"+msgstr "Incapaz de desbloquear"+msgid "Unapplied"msgstr "Não aplicado"@@ -15959,6 +16065,9 @@ msgstr "Desassociar trabalho da ordem de venda?"msgid "Unlock"msgstr "Desbloquear"+msgid "Unlock with passkey"+msgstr "Desbloquear com chave de acesso"+msgid "Unmapped accounts"msgstr "Contas não mapeadas"@@ -17301,6 +17410,9 @@ msgstr "Sua Equipe de Projeto"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Os seus dados reais foram carregados e você verificou uma amostra e aprovou."+msgid "Your session was locked after inactivity."+msgstr "A sua sessão foi bloqueada após inatividade."+msgid "Your source data is accessible and reasonably clean"msgstr "Os seus dados de origem estão acessíveis e razoavelmente limpos"diff --git a/packages/locale/locales/pt/mes.po b/packages/locale/locales/pt/mes.poindex d13848eccb..536e06bc54 100644--- a/packages/locale/locales/pt/mes.po+++ b/packages/locale/locales/pt/mes.po@@ -425,6 +425,9 @@ msgstr "Insira o PIN de {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Insira o código de 6 dígitos do seu aplicativo autenticador"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Digite o código de 6 dígitos do seu aplicativo autenticador para retomar."+msgid "Error"msgstr "Erro"@@ -926,6 +929,9 @@ msgstr "Realizado pelo Operador"msgid "Optional"msgstr "Opcional"+msgid "or"+msgstr "ou"+msgid "Overall result"msgstr "Resultado geral"@@ -947,6 +953,9 @@ msgstr "Disposição Parcial"msgid "Passed Inspection"msgstr "Aprovado na Inspeção"+msgid "Passkey unlock failed"+msgstr "Falha ao desbloquear com passkey"+msgid "Pause"msgstr "Pausar"@@ -1221,6 +1230,9 @@ msgstr "Números de série"msgid "Serial Numbers"msgstr "Números de Série"+msgid "Session locked"+msgstr "Sessão bloqueada"+msgid "Set Clock Out"msgstr "Definir Saída"@@ -1260,6 +1272,9 @@ msgstr "Sair"msgid "Sign Out"msgstr "Sair"+msgid "Sign out instead"+msgstr "Sair da sessão em vez disso"+msgid "Signed in as {stationName}"msgstr "Conectado como {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Autenticação de dois fatores obrigatória"msgid "Type a message..."msgstr "Digite uma mensagem..."+msgid "Unable to unlock"+msgstr "Não é possível desbloquear"+msgid "Unissued serial/batch materials"msgstr "Materiais de série/lote não emitidos"msgid "Unknown"msgstr "Desconhecido"+msgid "Unlock"+msgstr "Desbloquear"++msgid "Unlock with passkey"+msgstr "Desbloquear com passkey"+msgid "Unpick"msgstr "Desmarcar"@@ -1475,3 +1499,6 @@ msgstr "Você está registrado há {hoursElapsed} horas. Esqueceu de registrar amsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Sua organização requer um aplicativo autenticador. Configure-o no Carbon e retorne aqui."++msgid "Your session was locked after inactivity."+msgstr "Sua sessão foi bloqueada após inatividade."diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 80c0d4b875..7978e7fb7d 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -110,6 +110,10 @@ msgstr "{0} проблем — не опубликовано"msgid "{0} Processes"msgstr "{0} Процессов"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} зарегистрирован"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} поставщиков с остатком"@@ -1062,6 +1066,9 @@ msgstr "Добавьте любые заметки о вашем решении.msgid "Add Approval Requirement"msgstr "Добавить требование утверждения"+msgid "Add Authenticator App"+msgstr "Добавить приложение-аутентификатор"+msgid "Add Calibration Record"msgstr "Добавить запись калибровки"@@ -1137,6 +1144,9 @@ msgstr "Добавить партнера"msgid "Add parts"msgstr "Добавить детали"+msgid "Add Passkey"+msgstr "Добавить Passkey"+msgid "Add path"msgstr "Добавить путь"@@ -1996,6 +2006,9 @@ msgstr "Вы уверены, что хотите удалить эту картmsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Вы уверены, что хотите удалить эту заявку на техническое обслуживание? Это действие невозможно отменить."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Вы уверены, что хотите удалить этот Passkey? Вы больше не сможете использовать его для входа."+msgid "Are you sure you want to delete this quality document?"msgstr "Вы уверены, что хотите удалить этот документ качества?"@@ -2261,6 +2274,9 @@ msgstr "Журналы аудита"msgid "Authentication Error"msgstr "Ошибка аутентификации"+msgid "Authenticator app"+msgstr "Приложение-аутентификатор"+msgid "Authenticator QR code"msgstr "QR-код аутентификатора"@@ -4763,6 +4779,12 @@ msgstr "Удалить деталь"msgid "Delete Partner"msgstr "Удалить партнера"+msgid "Delete passkey"+msgstr "Удалить Passkey"++msgid "Delete Passkey"+msgstr "Удалить Passkey"+msgid "Delete Payment"msgstr "Удалить платеж"@@ -5571,6 +5593,9 @@ msgstr "Редактировать деталь"msgid "Edit Partner"msgstr "Редактировать партнера"+msgid "Edit Passkey"+msgstr "Редактировать Passkey"+msgid "Edit Payment"msgstr "Редактировать платеж"@@ -5903,6 +5928,9 @@ msgstr "Введите текст…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Введите 6-значный код из приложения аутентификации"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Введите 6-значный код из приложения-аутентификатора, чтобы продолжить."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Введите количество, которое должно было быть в этом движении. Противоположное движение для разницы размещается рядом с оригинальным в его временном периоде."@@ -6443,6 +6471,9 @@ msgstr "Ошибка при получении рисков"msgid "Failed to fetch suggestions"msgstr "Не удалось получить предложения"+msgid "Failed to get options"+msgstr "Не удалось получить параметры"+msgid "Failed to initialize Carbon client"msgstr "Не удалось инициализировать клиент Carbon"@@ -6513,6 +6544,9 @@ msgstr "Не удалось переместить счет: {0}"msgid "Failed to regenerate thumbnail"msgstr "Не удалось повторно создать миниатюру"+msgid "Failed to register passkey"+msgstr "Не удалось зарегистрировать Passkey"+msgid "Failed to remove image: {errorMessage}"msgstr "Не удалось удалить изображение: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Последний запуск"msgid "Last synced: <0/>"msgstr "Последняя синхронизация: <0/>"+msgid "Last used"+msgstr "Последний раз использован"+msgid "Latest operation end"msgstr "Конец последней операции"@@ -9846,6 +9883,9 @@ msgstr "Нет ID детали"msgid "No parts"msgstr "Нет деталей"+msgid "No passkeys registered yet."+msgstr "Ключи доступа еще не зарегистрированы."+msgid "No payables"msgstr "Нет кредиторской задолженности"@@ -10447,9 +10487,15 @@ msgstr "Дополнительные страницы и разделы"msgid "Options"msgstr "Параметры"+msgid "or"+msgstr "или"+msgid "OR"msgstr "ИЛИ"+msgid "Or enter this secret manually:"+msgstr "Или введите этот секрет вручную:"+msgid "Order"msgstr "Заказ"@@ -10716,6 +10762,18 @@ msgstr "Пройти"msgid "Passed"msgstr "Пройдено"+msgid "Passkey name"+msgstr "Имя Passkey"++msgid "Passkey unlock failed"+msgstr "Не удалось разблокировать Passkey"++msgid "Passkeys"+msgstr "Ключи доступа"++msgid "Passkeys are disabled"+msgstr "Ключи доступа отключены"+msgid "Path"msgstr "Путь"@@ -12011,6 +12069,9 @@ msgstr "Зарегистрирован"msgid "Registered"msgstr "Точка переза́каза"+msgid "Registration failed"+msgstr "Регистрация не удалась"+msgid "Registration Number"msgstr "Регистрационный номер"@@ -12087,6 +12148,9 @@ msgstr "Удалить {0}"msgid "Remove {label}"msgstr "Удалить {label}"+msgid "Remove authenticator app"+msgstr "Удалить приложение-аутентификатор"+msgid "Remove clause"msgstr "Удалить условие"@@ -12135,6 +12199,9 @@ msgstr "Удалите этот тип хранилища из всех ссылmsgid "Remove tool"msgstr "Удалить инструмент"+msgid "Remove two-factor authentication"+msgstr "Удалить двухфакторную аутентификацию"+msgid "Removed"msgstr "Удалено"@@ -12241,6 +12308,9 @@ msgstr "Запросить одобрение"msgid "Requested Date"msgstr "Запрашиваемая дата"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Требовать 6-значный код из приложения-аутентификатора при входе."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Требуется приложение аутентификации перед доступом к этой компании. Другие компании пользователей не затронуты. Посетите <0>страницу учетных записей сотрудников</0>, чтобы увидеть статус каждого человека."@@ -12274,6 +12344,9 @@ msgstr "Требуемые действия (по порядку)"msgid "Required Date"msgstr "Требуемая дата"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Требуется в контролируемой среде — ведение журнала аудита невозможно отключить."+msgid "Requirement"msgstr "Требование"@@ -12827,6 +12900,9 @@ msgstr "Сканировать или искать..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Отсканируйте или выберите отслеживаемую сущность из этой партии, чтобы добавить её в качестве столбца образца, затем запишите её результат в сетку."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Сканируйте этот QR-код с помощью приложения-аутентификатора (например, Google Authenticator или 1Password), а затем введите отображаемый 6-значный код."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Отсканируйте это в приложении аутентификации, а затем введите 6-значный код, который оно показывает."@@ -12989,6 +13065,9 @@ msgstr "Секунды для завершения"msgid "Seconds/Piece"msgstr "Секунды/Деталь"+msgid "Secret copied to clipboard"+msgstr "Секрет скопирован в буфер обмена"+msgid "Section"msgstr "Раздел"@@ -13306,6 +13385,9 @@ msgstr "услуги"msgid "Services"msgstr "Услуги"+msgid "Session locked"+msgstr "Сеанс заблокирован"+msgid "Set a target"msgstr "Установить цель"@@ -13342,6 +13424,9 @@ msgstr "Установить приложение аутентификации"msgid "Set up the right way"msgstr "Правильная настройка"+msgid "Set up two-factor authentication"+msgstr "Установить двухфакторную аутентификацию"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Настройте свою компанию с помощью пошагового плана внедрения, охватывающего настройку, данные, обучение и запуск в производство."@@ -13617,6 +13702,9 @@ msgstr "Отображается как бледный фон на каждойmsgid "Shown to the user when this rule fails."msgstr "Показывается пользователю при ошибке этого правила."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Войдите с использованием биометрии вместо волшебной ссылки. Ключи доступа защищены Face ID, Touch ID или PIN-кодом вашего устройства."+msgid "Sign in with Email"msgstr "Войти с помощью электронной почты"@@ -13635,6 +13723,9 @@ msgstr "Выход"msgid "Sign Out"msgstr "Выход"+msgid "Sign out instead"+msgstr "Вместо этого выйти"+msgid "Sign-off review before moving to the next step"msgstr "Утверждение перед переходом к следующему этапу"@@ -13650,6 +13741,9 @@ msgstr "Подписанное количество — отрицательноmsgid "Signing in also requires a one-time code from your authenticator app"msgstr "При входе также требуется одноразовый код из приложения аутентификации"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Вход больше не будет требовать кода. Введите текущий 6-значный код из приложения-аутентификатора для подтверждения."+msgid "Sites & locations"msgstr "Объекты и местоположения"@@ -15824,9 +15918,18 @@ msgstr "Двухфакторная аутентификация"msgid "Two-factor authentication"msgstr "Двухфакторная аутентификация"+msgid "Two-factor authentication disabled"+msgstr "Двухфакторная аутентификация отключена"++msgid "Two-factor authentication enabled"+msgstr "Двухфакторная аутентификация включена"+msgid "Two-Factor Authentication Enforcement"msgstr "Требование двухфакторной аутентификации"+msgid "Two-factor authentication is not enabled."+msgstr "Двухфакторная аутентификация не включена."+msgid "Type"msgstr "Тип"@@ -15857,6 +15960,9 @@ msgstr "Типы"msgid "U.S. Person Attestation"msgstr "Удостоверение лица США"+msgid "Unable to unlock"+msgstr "Не удается разблокировать"+msgid "Unapplied"msgstr "Неприменённые"@@ -15959,6 +16065,9 @@ msgstr "Отменить связь задания с заказом на проmsgid "Unlock"msgstr "Разблокировать"+msgid "Unlock with passkey"+msgstr "Разблокировка с помощью Passkey"+msgid "Unmapped accounts"msgstr "Несопоставленные счета"@@ -17301,6 +17410,9 @@ msgstr "Ваша команда проекта"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Ваши реальные данные загружены, вы проверили образец и одобрили его."+msgid "Your session was locked after inactivity."+msgstr "Ваш сеанс был заблокирован из-за неактивности."+msgid "Your source data is accessible and reasonably clean"msgstr "Ваши исходные данные доступны и находятся в приемлемом состоянии"diff --git a/packages/locale/locales/ru/mes.po b/packages/locale/locales/ru/mes.poindex b07b8962ee..789a10e6bb 100644--- a/packages/locale/locales/ru/mes.po+++ b/packages/locale/locales/ru/mes.po@@ -425,6 +425,9 @@ msgstr "Введите PIN для {0}"msgid "Enter the 6-digit code from your authenticator app"msgstr "Введите 6-значный код из приложения аутентификатора"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Введите 6-значный код из приложения аутентификатора для продолжения."+msgid "Error"msgstr "Ошибка"@@ -926,6 +929,9 @@ msgstr "Выполнено оператором"msgid "Optional"msgstr "Опционально"+msgid "or"+msgstr "или"+msgid "Overall result"msgstr "Общий результат"@@ -947,6 +953,9 @@ msgstr "Частичное распределение"msgid "Passed Inspection"msgstr "Контроль пройден"+msgid "Passkey unlock failed"+msgstr "Ошибка разблокировки по пропуску"+msgid "Pause"msgstr "Пауза"@@ -1221,6 +1230,9 @@ msgstr "Серийные номера"msgid "Serial Numbers"msgstr "Серийные номера"+msgid "Session locked"+msgstr "Сеанс заблокирован"+msgid "Set Clock Out"msgstr "Установить время ухода"@@ -1260,6 +1272,9 @@ msgstr "Выход"msgid "Sign Out"msgstr "Выйти"+msgid "Sign out instead"+msgstr "Вместо этого выйдите"+msgid "Signed in as {stationName}"msgstr "Вход выполнен как {stationName}"@@ -1393,12 +1408,21 @@ msgstr "Требуется двухфакторная аутентификациmsgid "Type a message..."msgstr "Введите сообщение..."+msgid "Unable to unlock"+msgstr "Не удалось разблокировать"+msgid "Unissued serial/batch materials"msgstr "Невыданные серийные/партионные материалы"msgid "Unknown"msgstr "Неизвестно"+msgid "Unlock"+msgstr "Разблокировать"++msgid "Unlock with passkey"+msgstr "Разблокировать с помощью пропуска"+msgid "Unpick"msgstr "Отменить выбор"@@ -1475,3 +1499,6 @@ msgstr "Вы на смене уже {hoursElapsed} часов. Вы забылиmsgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Ваша организация требует приложения аутентификатора. Настройте его в Carbon, а затем вернитесь сюда."++msgid "Your session was locked after inactivity."+msgstr "Ваш сеанс был заблокирован после неактивности."diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex cb23ac09af..b61a44b6f5 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -110,6 +110,10 @@ msgstr "{0} sorun — yayınlanmadı"msgid "{0} Processes"msgstr "{0} Süreçler"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} kayıtlı"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0} bakiyesi olan tedarikçi"@@ -1062,6 +1066,9 @@ msgstr "Kararınızla ilgili herhangi bir not ekleyin..."msgid "Add Approval Requirement"msgstr "Onay Gereksinimi Ekle"+msgid "Add Authenticator App"+msgstr "Kimlik Doğrulayıcı Uygulaması Ekle"+msgid "Add Calibration Record"msgstr "Kalibrasyon Kaydı Ekle"@@ -1137,6 +1144,9 @@ msgstr "Ortak Ekle"msgid "Add parts"msgstr "Parça ekle"+msgid "Add Passkey"+msgstr "Geçiş Anahtarı Ekle"+msgid "Add path"msgstr "Yol ekle"@@ -1996,6 +2006,9 @@ msgstr "Bu kanban kartını silmek istediğinizden emin misiniz? Bu geri alınammsgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "Bu bakım sevkini silmek istediğinizden emin misiniz? Bu geri alınamaz."+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "Bu geçiş anahtarını silmek istediğinizden emin misiniz? Artık oturum açmak için kullanamazsınız."+msgid "Are you sure you want to delete this quality document?"msgstr "Bu kalite belgesini silmek istediğinizden emin misiniz?"@@ -2261,6 +2274,9 @@ msgstr "Denetim Kayıtları"msgid "Authentication Error"msgstr "Kimlik Doğrulama Hatası"+msgid "Authenticator app"+msgstr "Kimlik Doğrulayıcı Uygulaması"+msgid "Authenticator QR code"msgstr "Doğrulayıcı QR kodu"@@ -4763,6 +4779,12 @@ msgstr "Parçayı Sil"msgid "Delete Partner"msgstr "Partneri Sil"+msgid "Delete passkey"+msgstr "Geçiş Anahtarını Sil"++msgid "Delete Passkey"+msgstr "Geçiş Anahtarını Sil"+msgid "Delete Payment"msgstr "Ödemeyi Sil"@@ -5571,6 +5593,9 @@ msgstr "Parç Düzenle"msgid "Edit Partner"msgstr "Partneri Düzenle"+msgid "Edit Passkey"+msgstr "Geçiş Anahtarını Düzenle"+msgid "Edit Payment"msgstr "Ödemeyi Düzenle"@@ -5903,6 +5928,9 @@ msgstr "Metin girin…"msgid "Enter the 6-digit code from your authenticator app"msgstr "Doğrulayıcı uygulamanızdaki 6 haneli kodu girin"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Devam etmek için kimlik doğrulayıcı uygulamanızdan 6 haneli kodu girin."+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "Bu hareketin olması gereken miktarı girin. Farktaki ters hareket, orijinalin zaman döneminde orijinalin yanında deftere kaydedilir."@@ -6443,6 +6471,9 @@ msgstr "Riskler alınamadı"msgid "Failed to fetch suggestions"msgstr "Öneriler alınamadı"+msgid "Failed to get options"+msgstr "Seçenekler alınamadı"+msgid "Failed to initialize Carbon client"msgstr "Carbon istemcisini başlatamadı"@@ -6513,6 +6544,9 @@ msgstr "Hesap taşınamadı: {0}"msgid "Failed to regenerate thumbnail"msgstr "Küçük resim yenileme başarısız"+msgid "Failed to register passkey"+msgstr "Geçiş anahtarı kaydedilemedi"+msgid "Failed to remove image: {errorMessage}"msgstr "Görsel kaldırılamadı: {errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "Son Çalıştırma"msgid "Last synced: <0/>"msgstr "Son senkronizasyon: <0/>"+msgid "Last used"+msgstr "Son Kullanılan"+msgid "Latest operation end"msgstr "En son işlem sonu"@@ -9846,6 +9883,9 @@ msgstr "Parça kimliği yok"msgid "No parts"msgstr "Parça yok"+msgid "No passkeys registered yet."+msgstr "Henüz hiçbir geçiş anahtarı kaydedilmedi."+msgid "No payables"msgstr "Ödeme yükümlülüğü yok"@@ -10447,9 +10487,15 @@ msgstr "İsteğe bağlı sayfalar ve bölümler"msgid "Options"msgstr "Seçenekler"+msgid "or"+msgstr "veya"+msgid "OR"msgstr "VEYA"+msgid "Or enter this secret manually:"+msgstr "Veya bu sırrı manuel olarak girin:"+msgid "Order"msgstr "Sipariş"@@ -10716,6 +10762,18 @@ msgstr "Geçerli"msgid "Passed"msgstr "Geçti"+msgid "Passkey name"+msgstr "Geçiş Anahtarı Adı"++msgid "Passkey unlock failed"+msgstr "Geçiş Anahtarı Kilidini Açma Başarısız Oldu"++msgid "Passkeys"+msgstr "Geçiş Anahtarları"++msgid "Passkeys are disabled"+msgstr "Geçiş Anahtarları Devre Dışı Bırakılmış"+msgid "Path"msgstr "Yol"@@ -12011,6 +12069,9 @@ msgstr "Kayıtlı"msgid "Registered"msgstr "Kayıtlı"+msgid "Registration failed"+msgstr "Kayıt Başarısız Oldu"+msgid "Registration Number"msgstr "Sicil Numarası"@@ -12087,6 +12148,9 @@ msgstr "Kaldır {0}"msgid "Remove {label}"msgstr "{label}'i Kaldır"+msgid "Remove authenticator app"+msgstr "Kimlik Doğrulayıcı Uygulamasını Kaldır"+msgid "Remove clause"msgstr "Maddeyi kaldır"@@ -12135,6 +12199,9 @@ msgstr "Bu depolama türünü tüm referans veren depolama birimlerinden kaldırmsgid "Remove tool"msgstr "Aracı kaldır"+msgid "Remove two-factor authentication"+msgstr "İki Faktörlü Kimlik Doğrulamayı Kaldır"+msgid "Removed"msgstr "Kaldırıldı"@@ -12241,6 +12308,9 @@ msgstr "Onay Talebi Oluştur"msgid "Requested Date"msgstr "Talep Edilen Tarih"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "Oturum açarken kimlik doğrulayıcı uygulamasından 6 haneli kod isteyini."+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "Bu şirketi açabilmek için doğrulayıcı uygulamayı gerektir. Diğer şirketleri etkilenmez. Her kişinin durumunu görmek için <0>çalışan hesapları sayfasını</0> ziyaret edin."@@ -12274,6 +12344,9 @@ msgstr "Gerekli İşlemler (sırayla)"msgid "Required Date"msgstr "Gerekli Tarih"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "Kontrollü ortamda gereklidir — denetim günlüğü kapatılamaz."+msgid "Requirement"msgstr "Gereksinim"@@ -12827,6 +12900,9 @@ msgstr "Tarama veya arayın..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "Bu lottan izlenen bir varlığı taramak veya seçmek için bunu örnek sütun olarak ekleyin, ardından sonucunu ızgarada kaydedin."+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "Bu QR kodunu kimlik doğrulayıcı uygulamanız (örn. Google Authenticator veya 1Password) ile tarayın, ardından gösterdiği 6 haneli kodu girin."+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "Bunu doğrulayıcı uygulamanızla tarayın, ardından gösterdiği 6 haneli kodu girin."@@ -12989,6 +13065,9 @@ msgstr "Tamamlanmak için gereken saniye"msgid "Seconds/Piece"msgstr "Saniye/Parça"+msgid "Secret copied to clipboard"+msgstr "Gizli, panoya kopyalandı"+msgid "Section"msgstr "Bölüm"@@ -13306,6 +13385,9 @@ msgstr "hizmetler"msgid "Services"msgstr "Hizmetler"+msgid "Session locked"+msgstr "Oturum Kilitli"+msgid "Set a target"msgstr "Hedef belirle"@@ -13342,6 +13424,9 @@ msgstr "Doğrulayıcı uygulamayı ayarla"msgid "Set up the right way"msgstr "Doğru şekilde ayarla"+msgid "Set up two-factor authentication"+msgstr "İki Faktörlü Kimlik Doğrulamayı Ayarla"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "Kurulum, veri, eğitim ve canlıya geçişi kapsayan adım adım bir uygulama planıyla şirketinizi kurun."@@ -13617,6 +13702,9 @@ msgstr "Oluşturulan PDF'lerin her sayfasının arkasında soluk bir arka plan omsgid "Shown to the user when this rule fails."msgstr "Bu kural başarısız olduğunda kullanıcıya gösterilir."+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "Sihirli bağlantı yerine biyometrik kimlik doğrulama ile oturum açın. Geçiş Anahtarları Face ID, Touch ID veya cihaz PIN'iniz tarafından korunur."+msgid "Sign in with Email"msgstr "E-posta ile Giriş Yap"@@ -13635,6 +13723,9 @@ msgstr "Çıkış yap"msgid "Sign Out"msgstr "Oturumu Kapat"+msgid "Sign out instead"+msgstr "Bunun yerine Oturumu Kapat"+msgid "Sign-off review before moving to the next step"msgstr "Bir sonraki adıma geçmeden önce onay incelemesi"@@ -13650,6 +13741,9 @@ msgstr "İmzalı miktar — giden hareketler için negatif"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "Oturum açma ayrıca doğrulayıcı uygulamanızdan bir kerelik kod gerektirir"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "Oturum açma artık kod gerektirmez. Onaylamak için kimlik doğrulayıcı uygulamanızdan mevcut 6 haneli kodu girin."+msgid "Sites & locations"msgstr "Siteler & konumlar"@@ -15824,9 +15918,18 @@ msgstr "İki Faktörlü"msgid "Two-factor authentication"msgstr "İki faktörlü kimlik doğrulaması"+msgid "Two-factor authentication disabled"+msgstr "İki Faktörlü Kimlik Doğrulama Devre Dışı Bırakıldı"++msgid "Two-factor authentication enabled"+msgstr "İki Faktörlü Kimlik Doğrulama Etkinleştirildi"+msgid "Two-Factor Authentication Enforcement"msgstr "İki Faktörlü Kimlik Doğrulaması Zorunluluğu"+msgid "Two-factor authentication is not enabled."+msgstr "İki Faktörlü Kimlik Doğrulama Etkin Değildir."+msgid "Type"msgstr "Tür"@@ -15857,6 +15960,9 @@ msgstr "Tipler"msgid "U.S. Person Attestation"msgstr "ABD Vatandaşı Tasdiki"+msgid "Unable to unlock"+msgstr "Kilit Açılamadı"+msgid "Unapplied"msgstr "Uygulanmamış"@@ -15959,6 +16065,9 @@ msgstr "İş emrini satış siparişinden ayır?"msgid "Unlock"msgstr "Kilidi Aç"+msgid "Unlock with passkey"+msgstr "Geçiş Anahtarı ile Kilit Aç"+msgid "Unmapped accounts"msgstr "Eşleştirilmemiş hesaplar"@@ -17301,6 +17410,9 @@ msgstr "Proje Ekibiniz"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "Gerçek verileriniz yüklendi ve bir örneği kontrol ederek onayladınız."+msgid "Your session was locked after inactivity."+msgstr "Oturumunuz hareketsizlikten sonra kilitlendi."+msgid "Your source data is accessible and reasonably clean"msgstr "Kaynak verileriniz erişilebilir ve makul ölçüde temizdir"diff --git a/packages/locale/locales/tr/mes.po b/packages/locale/locales/tr/mes.poindex 40f807a9dc..107e11003f 100644--- a/packages/locale/locales/tr/mes.po+++ b/packages/locale/locales/tr/mes.po@@ -425,6 +425,9 @@ msgstr "PIN'i {0} için girin"msgid "Enter the 6-digit code from your authenticator app"msgstr "Kimlik doğrulama uygulamanızdan 6 haneli kodu girin"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "Devam etmek için kimlik doğrulama uygulamanızdan 6 haneli kodu girin."+msgid "Error"msgstr "Hata"@@ -926,6 +929,9 @@ msgstr "Operatör Tarafından Yapıldı"msgid "Optional"msgstr "İsteğe bağlı"+msgid "or"+msgstr "veya"+msgid "Overall result"msgstr "Genel sonuç"@@ -947,6 +953,9 @@ msgstr "Kısmi Disposition"msgid "Passed Inspection"msgstr "Kontrolden Geçti"+msgid "Passkey unlock failed"+msgstr "Parola anahtarı kilidini açma başarısız oldu"+msgid "Pause"msgstr "Duraklat"@@ -1221,6 +1230,9 @@ msgstr "Seri numaraları"msgid "Serial Numbers"msgstr "Seri Numaraları"+msgid "Session locked"+msgstr "Oturum kilitlendi"+msgid "Set Clock Out"msgstr "Çıkış Yap"@@ -1260,6 +1272,9 @@ msgstr "Oturumu kapat"msgid "Sign Out"msgstr "Oturumu Kapat"+msgid "Sign out instead"+msgstr "Bunun yerine oturumu kapat"+msgid "Signed in as {stationName}"msgstr "Oturum açıldı olarak {stationName}"@@ -1393,12 +1408,21 @@ msgstr "İki faktörlü kimlik doğrulama gerekli"msgid "Type a message..."msgstr "Bir mesaj yaz..."+msgid "Unable to unlock"+msgstr "Kilit açılamıyor"+msgid "Unissued serial/batch materials"msgstr "Yayımlanmamış seri/parti malzemeleri"msgid "Unknown"msgstr "Bilinmiyor"+msgid "Unlock"+msgstr "Kilit aç"++msgid "Unlock with passkey"+msgstr "Parola anahtarı ile kilit aç"+msgid "Unpick"msgstr "Çıkart"@@ -1475,3 +1499,6 @@ msgstr "Ne kadar süredir giriş yaptınız? Çıkış yapmayı unuttunuz mu?"msgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "Kuruluşunuz bir kimlik doğrulama uygulaması gerektirir. Bunu Carbon'da ayarlayın, ardından buraya geri dönün."++msgid "Your session was locked after inactivity."+msgstr "Oturumunuz hareketsizlik nedeniyle kilitlendi."diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 8dcdc216a4..853b30fd4b 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -110,6 +110,10 @@ msgstr "{0} 个问题 — 未发布"msgid "{0} Processes"msgstr "{0} 个流程"+#. placeholder {0}: result.credentialName ?? "Passkey"+msgid "{0} registered"+msgstr "{0} 已注册"+#. placeholder {0}: ap.countmsgid "{0} suppliers with a balance"msgstr "{0}个有余额的供应商"@@ -1062,6 +1066,9 @@ msgstr "添加关于您的决定的任何备注..."msgid "Add Approval Requirement"msgstr "添加批准要求"+msgid "Add Authenticator App"+msgstr "添加身份验证器应用"+msgid "Add Calibration Record"msgstr "添加校准记录"@@ -1137,6 +1144,9 @@ msgstr "添加合作伙伴"msgid "Add parts"msgstr "添加零件"+msgid "Add Passkey"+msgstr "添加密钥"+msgid "Add path"msgstr "添加路径"@@ -1996,6 +2006,9 @@ msgstr "你确定要删除此看板卡吗?此操作无法撤销。"msgid "Are you sure you want to delete this maintenance dispatch? This cannot be undone."msgstr "您确定要删除此维护调度吗?此操作无法撤销。"+msgid "Are you sure you want to delete this passkey? You won't be able to use it to sign in anymore."+msgstr "您确定要删除此密钥吗?您将无法再使用它登录。"+msgid "Are you sure you want to delete this quality document?"msgstr "你确定要删除此质量文件吗?"@@ -2261,6 +2274,9 @@ msgstr "审计日志"msgid "Authentication Error"msgstr "身份验证错误"+msgid "Authenticator app"+msgstr "身份验证器应用"+msgid "Authenticator QR code"msgstr "身份验证器二维码"@@ -4763,6 +4779,12 @@ msgstr "删除零件"msgid "Delete Partner"msgstr "删除合作伙伴"+msgid "Delete passkey"+msgstr "删除密钥"++msgid "Delete Passkey"+msgstr "删除密钥"+msgid "Delete Payment"msgstr "删除付款"@@ -5571,6 +5593,9 @@ msgstr "编辑零件"msgid "Edit Partner"msgstr "编辑合作伙伴"+msgid "Edit Passkey"+msgstr "编辑密钥"+msgid "Edit Payment"msgstr "编辑付款"@@ -5903,6 +5928,9 @@ msgstr "输入文本…"msgid "Enter the 6-digit code from your authenticator app"msgstr "输入来自您的身份验证器应用的6位数代码"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "输入您的身份验证器应用中的 6 位数字代码以继续。"+msgid "Enter the quantity this movement should have been. An opposite movement for the difference is posted next to the original, in the original's time period."msgstr "输入此移动应该的数量。差异的相反移动将在原始时期内的原始移动旁发布。"@@ -6443,6 +6471,9 @@ msgstr "获取风险失败"msgid "Failed to fetch suggestions"msgstr "获取建议失败"+msgid "Failed to get options"+msgstr "获取选项失败"+msgid "Failed to initialize Carbon client"msgstr "未能初始化 Carbon 客户端"@@ -6513,6 +6544,9 @@ msgstr "移动账户失败: {0}"msgid "Failed to regenerate thumbnail"msgstr "未能重新生成缩略图"+msgid "Failed to register passkey"+msgstr "注册密钥失败"+msgid "Failed to remove image: {errorMessage}"msgstr "删除图像失败:{errorMessage}"@@ -8277,6 +8311,9 @@ msgstr "最后运行"msgid "Last synced: <0/>"msgstr "上次同步: <0/>"+msgid "Last used"+msgstr "最后使用"+msgid "Latest operation end"msgstr "最新操作结束"@@ -9846,6 +9883,9 @@ msgstr "无零件ID"msgid "No parts"msgstr "没有零件"+msgid "No passkeys registered yet."+msgstr "尚未注册任何密钥。"+msgid "No payables"msgstr "无应付款"@@ -10447,9 +10487,15 @@ msgstr "可选页面和部分"msgid "Options"msgstr "选项"+msgid "or"+msgstr "或"+msgid "OR"msgstr "或"+msgid "Or enter this secret manually:"+msgstr "或手动输入此密码:"+msgid "Order"msgstr "订单"@@ -10716,6 +10762,18 @@ msgstr "通过"msgid "Passed"msgstr "已通过"+msgid "Passkey name"+msgstr "密钥名称"++msgid "Passkey unlock failed"+msgstr "密钥解锁失败"++msgid "Passkeys"+msgstr "密钥"++msgid "Passkeys are disabled"+msgstr "密钥已禁用"+msgid "Path"msgstr "路径"@@ -12011,6 +12069,9 @@ msgstr "已注册"msgid "Registered"msgstr "重新订购点"+msgid "Registration failed"+msgstr "注册失败"+msgid "Registration Number"msgstr "注册号"@@ -12087,6 +12148,9 @@ msgstr "删除 {0}"msgid "Remove {label}"msgstr "移除 {label}"+msgid "Remove authenticator app"+msgstr "移除身份验证器应用"+msgid "Remove clause"msgstr "移除条款"@@ -12135,6 +12199,9 @@ msgstr "从所有引用此存储类型的存储单元中移除它并将其删除msgid "Remove tool"msgstr "移除工具"+msgid "Remove two-factor authentication"+msgstr "移除双因素身份验证"+msgid "Removed"msgstr "已移除"@@ -12241,6 +12308,9 @@ msgstr "请求批准"msgid "Requested Date"msgstr "请求日期"+msgid "Require a 6-digit code from an authenticator app when signing in."+msgstr "登录时需要来自身份验证器应用的 6 位数字代码。"+msgid "Require an authenticator app before anyone can open this company. Their other companies are unaffected. Visit the <0>employee accounts page</0> to see each person's status."msgstr "在任何人打开此公司之前需要身份验证器应用。他们的其他公司不受影响。访问<0>员工账户页面</0>以查看每个人的状态。"@@ -12274,6 +12344,9 @@ msgstr "必需的操作(按顺序)"msgid "Required Date"msgstr "所需日期"+msgid "Required in a controlled environment — audit logging cannot be turned off."+msgstr "在受控环境中需要 — 审计日志无法关闭。"+msgid "Requirement"msgstr "需求"@@ -12827,6 +12900,9 @@ msgstr "扫描或搜索..."msgid "Scan or select a tracked entity from this lot to add it as a sample column, then record its result in the grid."msgstr "从此批次扫描或选择被追踪的实体以将其作为样本列添加,然后在网格中记录其结果。"+msgid "Scan this QR code with your authenticator app (e.g. Google Authenticator or 1Password), then enter the 6-digit code it shows."+msgstr "使用您的身份验证器应用(例如 Google Authenticator 或 1Password)扫描此 QR 码,然后输入它显示的 6 位数字代码。"+msgid "Scan this with your authenticator app, then enter the 6-digit code it shows."msgstr "使用您的身份验证器应用扫描此内容,然后输入它显示的6位数代码。"@@ -12989,6 +13065,9 @@ msgstr "完成秒数"msgid "Seconds/Piece"msgstr "秒/件"+msgid "Secret copied to clipboard"+msgstr "密码已复制到剪贴板"+msgid "Section"msgstr "部分"@@ -13306,6 +13385,9 @@ msgstr "服务"msgid "Services"msgstr "服务"+msgid "Session locked"+msgstr "会话已锁定"+msgid "Set a target"msgstr "设置目标"@@ -13342,6 +13424,9 @@ msgstr "设置身份验证器应用"msgid "Set up the right way"msgstr "以正确的方式设置"+msgid "Set up two-factor authentication"+msgstr "设置双因素身份验证"+msgid "Set up your company with a step-by-step implementation plan covering setup, data, training, and go-live."msgstr "通过涵盖设置、数据、培训和上线的分步实施计划来设置您的公司。"@@ -13617,6 +13702,9 @@ msgstr "作为淡色背景显示在每个生成的PDF页面后面"msgid "Shown to the user when this rule fails."msgstr "当此规则失败时向用户显示。"+msgid "Sign in with biometrics instead of a magic link. Passkeys are secured by Face ID, Touch ID, or your device PIN."+msgstr "使用生物识别而不是魔法链接登录。密钥由 Face ID、Touch ID 或您的设备 PIN 保护。"+msgid "Sign in with Email"msgstr "用邮箱登录"@@ -13635,6 +13723,9 @@ msgstr "登出"msgid "Sign Out"msgstr "登出"+msgid "Sign out instead"+msgstr "改为登出"+msgid "Sign-off review before moving to the next step"msgstr "签署审查后再进行下一步"@@ -13650,6 +13741,9 @@ msgstr "有符号数量 — 出站移动为负"msgid "Signing in also requires a one-time code from your authenticator app"msgstr "登录还需要来自您的身份验证器应用的一次性代码"+msgid "Signing in will no longer require a code. Enter the current 6-digit code from your authenticator app to confirm."+msgstr "登录将不再需要代码。输入您的身份验证器应用中的当前 6 位数字代码以确认。"+msgid "Sites & locations"msgstr "站点和位置"@@ -15824,9 +15918,18 @@ msgstr "双因素"msgid "Two-factor authentication"msgstr "双因素认证"+msgid "Two-factor authentication disabled"+msgstr "双因素身份验证已禁用"++msgid "Two-factor authentication enabled"+msgstr "双因素身份验证已启用"+msgid "Two-Factor Authentication Enforcement"msgstr "双因素认证强制执行"+msgid "Two-factor authentication is not enabled."+msgstr "双因素身份验证未启用。"+msgid "Type"msgstr "类型"@@ -15857,6 +15960,9 @@ msgstr "类型"msgid "U.S. Person Attestation"msgstr "美国人证明"+msgid "Unable to unlock"+msgstr "无法解锁"+msgid "Unapplied"msgstr "未应用"@@ -15959,6 +16065,9 @@ msgstr "从销售订单取消关联工作?"msgid "Unlock"msgstr "解锁"+msgid "Unlock with passkey"+msgstr "使用密钥解锁"+msgid "Unmapped accounts"msgstr "未映射的账户"@@ -17301,6 +17410,9 @@ msgstr "您的项目团队"msgid "Your real data is loaded and you have checked a sample and approved it."msgstr "您的真实数据已加载,您已检查样本并批准了它。"+msgid "Your session was locked after inactivity."+msgstr "您的会话因不活动而被锁定。"+msgid "Your source data is accessible and reasonably clean"msgstr "您的源数据可访问且相对干净"diff --git a/packages/locale/locales/zh/mes.po b/packages/locale/locales/zh/mes.poindex 7bfdddc37e..666d9a8b3f 100644--- a/packages/locale/locales/zh/mes.po+++ b/packages/locale/locales/zh/mes.po@@ -425,6 +425,9 @@ msgstr "输入 {0} 的 PIN 码"msgid "Enter the 6-digit code from your authenticator app"msgstr "输入您的身份验证器应用中的6位代码"+msgid "Enter the 6-digit code from your authenticator app to resume."+msgstr "请输入身份验证器应用中的 6 位代码以继续。"+msgid "Error"msgstr "错误"@@ -926,6 +929,9 @@ msgstr "操作员执行"msgid "Optional"msgstr "可选"+msgid "or"+msgstr "或"+msgid "Overall result"msgstr "总体结果"@@ -947,6 +953,9 @@ msgstr "部分处置"msgid "Passed Inspection"msgstr "检验通过"+msgid "Passkey unlock failed"+msgstr "密钥解锁失败"+msgid "Pause"msgstr "暂停"@@ -1221,6 +1230,9 @@ msgstr "序列号"msgid "Serial Numbers"msgstr "序列号"+msgid "Session locked"+msgstr "会话已锁定"+msgid "Set Clock Out"msgstr "设置下班时间"@@ -1260,6 +1272,9 @@ msgstr "登出"msgid "Sign Out"msgstr "退出登录"+msgid "Sign out instead"+msgstr "改为登出"+msgid "Signed in as {stationName}"msgstr "已登录为 {stationName}"@@ -1393,12 +1408,21 @@ msgstr "需要双因素认证"msgid "Type a message..."msgstr "输入消息..."+msgid "Unable to unlock"+msgstr "无法解锁"+msgid "Unissued serial/batch materials"msgstr "未发放的序列号/批次物料"msgid "Unknown"msgstr "未知"+msgid "Unlock"+msgstr "解锁"++msgid "Unlock with passkey"+msgstr "使用密钥解锁"+msgid "Unpick"msgstr "取消拣选"@@ -1475,3 +1499,6 @@ msgstr "您已打卡上班 {hoursElapsed} 小时。您是否忘记打卡下班msgid "Your organization requires an authenticator app. Set it up in Carbon, then come back here."msgstr "您的组织需要身份验证器应用。在 Carbon 中设置,然后返回此处。"++msgid "Your session was locked after inactivity."+msgstr "您的会话因不活动而被锁定。"diff --git a/packages/react/src/Acknowledge.tsx b/packages/react/src/Acknowledge.tsxindex 6b1667ae23..3ea0a6e8ec 100644--- a/packages/react/src/Acknowledge.tsx+++ b/packages/react/src/Acknowledge.tsx@@ -12,6 +12,7 @@ import {ModalTitle} from "./Modal";import { toast } from "./Toast";+/***export function AcademyBanner({diff --git a/packages/react/src/ErrorBoundary/RootErrorBoundary.tsx b/packages/react/src/ErrorBoundary/RootErrorBoundary.tsxindex 84e7cc44fc..c527933577 100644--- a/packages/react/src/ErrorBoundary/RootErrorBoundary.tsx+++ b/packages/react/src/ErrorBoundary/RootErrorBoundary.tsx@@ -92,7 +92,12 @@ function resolveConfig(error: unknown, retry: () => void): ErrorScreenProps {};}- // 2. Real Error instances thrown during render / loaders / actions+ // 2. Real Error instances thrown during render / loaders / actions.+ // SI-11: never reveal internal error detail (message / source location) to end+ // users in production — it aids reconnaissance. Show it only in development.+ // Vite replaces `import.meta.env.DEV` at build; this shared package has no Vite+ // client types, so read it through a narrow cast.+ const isDev = (import.meta as { env?: { DEV?: boolean } }).env?.DEV === true;const message = error instanceof Error ? error.message : "unknown error";const stack =error instanceof Error && error.stack@@ -109,9 +114,9 @@ function resolveConfig(error: unknown, retry: () => void): ErrorScreenProps {logLines: ["> executing render pipeline ...","> exception thrown mid-stream",- `> message: ${message}`,+ isDev ? `> message: ${message}` : "> message: [redacted]","> status_code: 500 / INTERNAL_ERROR",- stack ? `> at: ${stack}` : "> stack: unavailable",+ isDev && stack ? `> at: ${stack}` : "> stack: unavailable","> stack unwound to nearest boundary","> recommendation: retry or return home"],diff --git a/packages/workflows/src/catalog/events.generated.ts b/packages/workflows/src/catalog/events.generated.tsindex 688aa3cc19..fdfb0fe296 100644--- a/packages/workflows/src/catalog/events.generated.ts+++ b/packages/workflows/src/catalog/events.generated.ts@@ -1047,8 +1047,7 @@ export const WORKFLOW_ENTITIES: Record<string, Record<string, ValueType>> = {longitude: { kind: "primitive", of: "number" },createdBy: { kind: "primitive", of: "string" },createdAt: { kind: "primitive", of: "date" },- tags: { kind: "list", of: { kind: "primitive", of: "string" } },- code: { kind: "primitive", of: "string" }+ tags: { kind: "list", of: { kind: "primitive", of: "string" } }},nonConformance: {id: { kind: "primitive", of: "string" },diff --git a/packages/workflows/src/catalog/labels.generated.ts b/packages/workflows/src/catalog/labels.generated.tsindex 75fb393471..4834b4b4e4 100644--- a/packages/workflows/src/catalog/labels.generated.ts+++ b/packages/workflows/src/catalog/labels.generated.ts@@ -222,7 +222,6 @@ export const WORKFLOW_LABELS: Record<string, MessageDescriptor> = {"entity.location.addressLine1": msg`Address line1`,"entity.location.addressLine2": msg`Address line2`,"entity.location.city": msg`City`,- "entity.location.code": msg`Code`,"entity.location.countryCode": msg`Country code`,"entity.location.createdAt": msg`Created at`,"entity.location.createdBy": msg`Created by`,